CVS commit: [netbsd-7-0] src/doc
Module Name:src Committed By: snj Date: Sat Mar 11 07:49:14 UTC 2017 Modified Files: src/doc [netbsd-7-0]: CHANGES-7.0.3 Log Message: 1384 To generate a diff of this commit: cvs rdiff -u -r1.1.2.33 -r1.1.2.34 src/doc/CHANGES-7.0.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.0.3 diff -u src/doc/CHANGES-7.0.3:1.1.2.33 src/doc/CHANGES-7.0.3:1.1.2.34 --- src/doc/CHANGES-7.0.3:1.1.2.33 Wed Mar 8 14:31:09 2017 +++ src/doc/CHANGES-7.0.3 Sat Mar 11 07:49:14 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0.3,v 1.1.2.33 2017/03/08 14:31:09 martin Exp $ +# $NetBSD: CHANGES-7.0.3,v 1.1.2.34 2017/03/11 07:49:14 snj Exp $ A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3 release: @@ -1312,3 +1312,8 @@ external/mit/xorg/server/xorg-server/os/ MIT-MAGIC-COOKIES, fixing CVE-2017-2624 [mrg, ticket #1381] +sys/conf/copyright1.14, 1.15 + + Update copyright year. + [tsutsui, ticket #1384] +
CVS commit: [netbsd-7-0] src/sys/conf
Module Name:src Committed By: snj Date: Sat Mar 11 07:48:22 UTC 2017 Modified Files: src/sys/conf [netbsd-7-0]: copyright Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1384): sys/conf/copyright: revision 1.14, 1.15 WELCOME 2016! -- goodbye 2016, hello 2017! To generate a diff of this commit: cvs rdiff -u -r1.12.4.1 -r1.12.4.1.2.1 src/sys/conf/copyright Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/copyright diff -u src/sys/conf/copyright:1.12.4.1 src/sys/conf/copyright:1.12.4.1.2.1 --- src/sys/conf/copyright:1.12.4.1 Mon Jun 29 17:15:28 2015 +++ src/sys/conf/copyright Sat Mar 11 07:48:22 2017 @@ -1,5 +1,5 @@ Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 +2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 The NetBSD Foundation, Inc. All rights reserved. Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved.
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: snj Date: Sat Mar 11 07:47:31 UTC 2017 Modified Files: src/doc [netbsd-7]: CHANGES-7.1 Log Message: 1366, 1384 To generate a diff of this commit: cvs rdiff -u -r1.1.2.162 -r1.1.2.163 src/doc/CHANGES-7.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.1 diff -u src/doc/CHANGES-7.1:1.1.2.162 src/doc/CHANGES-7.1:1.1.2.163 --- src/doc/CHANGES-7.1:1.1.2.162 Thu Mar 9 16:28:13 2017 +++ src/doc/CHANGES-7.1 Sat Mar 11 07:47:31 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.1,v 1.1.2.162 2017/03/09 16:28:13 snj Exp $ +# $NetBSD: CHANGES-7.1,v 1.1.2.163 2017/03/11 07:47:31 snj Exp $ A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1 release: @@ -8976,3 +8976,25 @@ sys/dev/pci/if_wmvar.h1.33 - Fix typo in comment. [msaitoh, ticket #1372] +sys/arch/arm/arm32/pmap.c 1.343, 1.344 +sys/arch/arm/include/arm32/pmap.h 1.145 +sys/arch/evbarm/gumstix/gumstix_machdep.c 1.58 via patch + + Fixup the compile time decisions around PMAP_{INCLUDE,NEEDS}_PTE_SYNC + and fix the options for xscale boards which require the code in + pmap_l2ptp_ctor marked as #ifndef PMAP_INCLUDE_PTE_SYNC. + + Fix the typo (pte -> opte) in this code block and consistently use + opte elsewhere. + + Set xscale_cache_clean_addr appropriately and re-arrange default KVA + layout to allow direct map for all boards. + + PRs 51990 and 52010. + [skrll, ticket #1366] + +sys/conf/copyright1.14, 1.15 + + Update copyright year. + [tsutsui, ticket #1384] +
CVS commit: [netbsd-7] src/sys/conf
Module Name:src Committed By: snj Date: Sat Mar 11 07:46:58 UTC 2017 Modified Files: src/sys/conf [netbsd-7]: copyright Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1384): sys/conf/copyright: 1.14, 1.15 WELCOME 2016! -- goodbye 2016, hello 2017! To generate a diff of this commit: cvs rdiff -u -r1.12.4.1 -r1.12.4.2 src/sys/conf/copyright Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/copyright diff -u src/sys/conf/copyright:1.12.4.1 src/sys/conf/copyright:1.12.4.2 --- src/sys/conf/copyright:1.12.4.1 Mon Jun 29 17:15:28 2015 +++ src/sys/conf/copyright Sat Mar 11 07:46:58 2017 @@ -1,5 +1,5 @@ Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 +2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 The NetBSD Foundation, Inc. All rights reserved. Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved.
CVS commit: [netbsd-7] src/sys/arch
Module Name:src Committed By: snj Date: Sat Mar 11 07:40:21 UTC 2017 Modified Files: src/sys/arch/arm/arm32 [netbsd-7]: pmap.c src/sys/arch/arm/include/arm32 [netbsd-7]: pmap.h src/sys/arch/evbarm/gumstix [netbsd-7]: gumstix_machdep.c Log Message: Pull up following revision(s) (requested by skrll in ticket #1366): sys/arch/arm/include/arm32/pmap.h: 1.145 sys/arch/arm/arm32/pmap.c: 1.343, 1.344 sys/arch/evbarm/gumstix/gumstix_machdep.c: 1.58 via patch Fixup the compile time decisions around PMAP_{INCLUDE,NEEDS}_PTE_SYNC and fix the options for xscale boards which require the code in pmap_l2ptp_ctor marked as #ifndef PMAP_INCLUDE_PTE_SYNC. Fix the typo (pte -> opte) in this code block and consistently use opte elsewhere. PR/51990: Regression data_abort_handler: data_aborts fsr=0x406 far=0xbfffeff5 on copyout in init -- fix unused. -- Set xscale_cache_clean_addr appropriately and re-arrange default KVA layout to allow direct map for all boards. OVERO/DUOVERO/PEPPER aren't tested. PR/52010: Regression: Gumstix Verdex is hanging in enabling cache + KASSERT ram_size To generate a diff of this commit: cvs rdiff -u -r1.295.2.8 -r1.295.2.9 src/sys/arch/arm/arm32/pmap.c cvs rdiff -u -r1.135.2.2 -r1.135.2.3 src/sys/arch/arm/include/arm32/pmap.h cvs rdiff -u -r1.50 -r1.50.2.1 src/sys/arch/evbarm/gumstix/gumstix_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm32/pmap.c diff -u src/sys/arch/arm/arm32/pmap.c:1.295.2.8 src/sys/arch/arm/arm32/pmap.c:1.295.2.9 --- src/sys/arch/arm/arm32/pmap.c:1.295.2.8 Fri Feb 26 22:31:06 2016 +++ src/sys/arch/arm/arm32/pmap.c Sat Mar 11 07:40:21 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.295.2.8 2016/02/26 22:31:06 snj Exp $ */ +/* $NetBSD: pmap.c,v 1.295.2.9 2017/03/11 07:40:21 snj Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -217,7 +217,7 @@ #include //#include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.295.2.8 2016/02/26 22:31:06 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.295.2.9 2017/03/11 07:40:21 snj Exp $"); //#define PMAP_DEBUG #ifdef PMAP_DEBUG @@ -968,6 +968,7 @@ pmap_is_cached(pmap_t pm) * - The specified pmap is 'active' in the cache/tlb. */ +#ifdef PMAP_INCLUDE_PTE_SYNC static inline void pmap_pte_sync_current(pmap_t pm, pt_entry_t *ptep) { @@ -976,10 +977,9 @@ pmap_pte_sync_current(pmap_t pm, pt_entr arm_dsb(); } -#ifdef PMAP_INCLUDE_PTE_SYNC -#define PTE_SYNC_CURRENT(pm, ptep) pmap_pte_sync_current(pm, ptep) +# define PTE_SYNC_CURRENT(pm, ptep) pmap_pte_sync_current(pm, ptep) #else -#define PTE_SYNC_CURRENT(pm, ptep) /* nothing */ +# define PTE_SYNC_CURRENT(pm, ptep) __nothing #endif /* @@ -1708,7 +1708,7 @@ pmap_l2ptp_ctor(void *arg, void *v, int /* * Page tables must have the cache-mode set correctly. */ - const pt_entry_t npte = (pte & ~L2_S_CACHE_MASK) + const pt_entry_t npte = (opte & ~L2_S_CACHE_MASK) | pte_l2_s_cache_mode_pt; l2pte_set(ptep, npte, opte); PTE_SYNC(ptep); @@ -1987,7 +1987,7 @@ pmap_vac_me_user(struct vm_page_md *md, pt_entry_t npte = opte & ~L2_S_CACHE_MASK; if ((va != pv->pv_va || pm != pv->pv_pmap) - && l2pte_valid_p(npte)) { + && l2pte_valid_p(opte)) { #ifdef PMAP_CACHE_VIVT pmap_cache_wbinv_page(pv->pv_pmap, pv->pv_va, true, pv->pv_flags); @@ -2315,7 +2315,7 @@ pmap_vac_me_harder(struct vm_page_md *md if (opte == npte) /* only update is there's a change */ continue; - if (l2pte_valid_p(npte)) { + if (l2pte_valid_p(opte)) { pmap_tlb_flush_SE(pv->pv_pmap, pv->pv_va, pv->pv_flags); } @@ -4252,7 +4252,7 @@ pmap_prefetchabt_fixup(void *v) if ((opte & L2_S_PROT_U) == 0 || (opte & L2_XS_XN) == 0) goto out; - paddr_t pa = l2pte_pa(pte); + paddr_t pa = l2pte_pa(opte); struct vm_page * const pg = PHYS_TO_VM_PAGE(pa); KASSERT(pg != NULL); Index: src/sys/arch/arm/include/arm32/pmap.h diff -u src/sys/arch/arm/include/arm32/pmap.h:1.135.2.2 src/sys/arch/arm/include/arm32/pmap.h:1.135.2.3 --- src/sys/arch/arm/include/arm32/pmap.h:1.135.2.2 Wed May 27 05:33:29 2015 +++ src/sys/arch/arm/include/arm32/pmap.h Sat Mar 11 07:40:21 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.135.2.2 2015/05/27 05:33:29 msaitoh Exp $ */ +/* $NetBSD: pmap.h,v 1.135.2.3 2017/03/11 07:40:21 snj Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -479,15 +479,21 @@ vtophys(vaddr_t va) extern int pmap_needs_pte_sync; #if defined(_KERNEL_OPT) /* + * Perform compile time evaluation of PMAP_NEEDS_PTE_SYNC when only a + * single MMU type is selected. + * * StrongARM SA-1 caches do not have a write-through mode. So, on these, - * we need to do PTE syncs. If only SA-1 is configured, then evaluate - * this at compile time. + * we need to do PTE syncs. Additionally, V6 MMUs also need PTE syncs. + * Finally, MEMC, GENERIC and XSCA
CVS commit: src/doc
Module Name:src Committed By: msaitoh Date: Sat Mar 11 07:23:14 UTC 2017 Modified Files: src/doc: TODO.smpnet Log Message: Add ixv(4) to MP-safe component's list. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/doc/TODO.smpnet Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/TODO.smpnet diff -u src/doc/TODO.smpnet:1.8 src/doc/TODO.smpnet:1.9 --- src/doc/TODO.smpnet:1.8 Sat Mar 11 06:40:19 2017 +++ src/doc/TODO.smpnet Sat Mar 11 07:23:13 2017 @@ -1,4 +1,4 @@ -$NetBSD: TODO.smpnet,v 1.8 2017/03/11 06:40:19 ozaki-r Exp $ +$NetBSD: TODO.smpnet,v 1.9 2017/03/11 07:23:13 msaitoh Exp $ MP-safe components == @@ -8,6 +8,7 @@ MP-safe components - vmx(4) - wm(4) - ixg(4) + - ixv(4) - Layer 2 - Ethernet (if_ethersubr.c) - bridge(4)
CVS commit: src/sys/arch
Module Name:src Committed By: nonaka Date: Sat Mar 11 07:21:10 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: bios32.c src/sys/arch/i386/i386: bios32.c src/sys/arch/x86/include: efi.h smbiosvar.h src/sys/arch/x86/x86: efi.c Log Message: search SMBIOS from UEFI configuration table when boot with UEFI. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/amd64/amd64/bios32.c cvs rdiff -u -r1.29 -r1.30 src/sys/arch/i386/i386/bios32.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x86/include/efi.h cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x86/include/smbiosvar.h cvs rdiff -u -r1.10 -r1.11 src/sys/arch/x86/x86/efi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/bios32.c diff -u src/sys/arch/amd64/amd64/bios32.c:1.21 src/sys/arch/amd64/amd64/bios32.c:1.22 --- src/sys/arch/amd64/amd64/bios32.c:1.21 Sun Nov 22 13:41:24 2015 +++ src/sys/arch/amd64/amd64/bios32.c Sat Mar 11 07:21:10 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: bios32.c,v 1.21 2015/11/22 13:41:24 maxv Exp $ */ +/* $NetBSD: bios32.c,v 1.22 2017/03/11 07:21:10 nonaka Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bios32.c,v 1.21 2015/11/22 13:41:24 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bios32.c,v 1.22 2017/03/11 07:21:10 nonaka Exp $"); #include #include @@ -72,6 +72,7 @@ __KERNEL_RCSID(0, "$NetBSD: bios32.c,v 1 #include #include #include +#include #include @@ -85,6 +86,11 @@ __KERNEL_RCSID(0, "$NetBSD: bios32.c,v 1 struct bios32_entry bios32_entry; struct smbios_entry smbios_entry; +static int smbios2_check_header(const uint8_t *); +static void smbios2_map_kva(const uint8_t *); +static int smbios3_check_header(const uint8_t *); +static void smbios3_map_kva(const uint8_t *); + /* * Initialize the BIOS32 interface. */ @@ -132,59 +138,147 @@ bios32_init(void) } #endif uint8_t *p; - int i; /* see if we have SMBIOS extentions */ +#ifndef XEN + if (efi_probe()) { + p = efi_getcfgtbl(&EFI_UUID_SMBIOS3); + if (p != NULL && smbios3_check_header(p)) { + smbios3_map_kva(p); + return; + } + p = efi_getcfgtbl(&EFI_UUID_SMBIOS); + if (p != NULL && smbios2_check_header(p)) { + smbios2_map_kva(p); + return; + } + } +#endif for (p = ISA_HOLE_VADDR(SMBIOS_START); p < (uint8_t *)ISA_HOLE_VADDR(SMBIOS_END); p+= 16) { - struct smbhdr * sh = (struct smbhdr *)p; - uint8_t chksum; - vaddr_t eva; - paddr_t pa, end; + if (smbios3_check_header(p)) { + smbios3_map_kva(p); + return; + } + if (smbios2_check_header(p)) { + smbios2_map_kva(p); + return; + } + } +} - if (sh->sig != BIOS32_MAKESIG('_', 'S', 'M', '_')) - continue; - i = sh->len; - for (chksum = 0; i--; ) - chksum += p[i]; - if (chksum != 0) - continue; - p += 0x10; - if (p[0] != '_' && p[1] != 'D' && p[2] != 'M' && - p[3] != 'I' && p[4] != '_') - continue; - for (chksum = 0, i = 0xf; i--; ) - chksum += p[i]; - if (chksum != 0) - continue; +static int +smbios2_check_header(const uint8_t *p) +{ + const struct smbhdr *sh = (const struct smbhdr *)p; + uint8_t chksum; + int i; - pa = trunc_page(sh->addr); - end = round_page(sh->addr + sh->size); - eva = uvm_km_alloc(kernel_map, end - pa, 0, UVM_KMF_VAONLY); - if (eva == 0) - break; + if (sh->sig != BIOS32_MAKESIG('_', 'S', 'M', '_')) + return 0; + i = sh->len; + for (chksum = 0; i--; ) + chksum += p[i]; + if (chksum != 0) + return 0; + p += 0x10; + if (p[0] != '_' || p[1] != 'D' || p[2] != 'M' || + p[3] != 'I' || p[4] != '_') + return 0; + for (chksum = 0, i = 0xf; i--; ) + chksum += p[i]; + if (chksum != 0) + return 0; - smbios_entry.addr = (uint8_t *)(eva + - (sh->addr & PGOFSET)); - smbios_entry.len = sh->size; - smbios_entry.mjr = sh->majrev; - smbios_entry.min = sh->minrev; - smbios_entry.count = sh->count; + return 1; +} - for (; pa < end; pa+= NBPG, eva+= NBPG) +static void +smbios2_map_kva(const uint8_t *p) +{ + const struct smbhdr *sh = (const struct smbhdr *)p; + paddr_t pa, end; + vaddr_t eva; + + pa = trunc_page(sh->addr); + end = round_page(sh->addr + sh->size); + eva = uvm_km_alloc(kernel_map, end - pa, 0, UVM_KMF_VAONLY); + if (eva == 0) + return; + + smbios_entry.addr = (uint8_t *)(eva + (sh->addr & PGOFSET)); + smbios_entry.len = sh->size; + smbios_entry.rev = 0; + smbios_entry.mjr = sh->majrev; + smbios_entry.min = sh->minrev; + smbios_entry.doc = 0; + smbios_entry.count = sh->count; + + for (; pa < end; pa+= NBPG, eva+= NBPG) #ifdef XEN - pmap_kenter_ma(eva, pa, VM_PROT_READ, 0); + pmap_kenter_ma(eva, pa, VM_PROT_READ, 0); #else - pmap_kenter_pa(eva, pa, VM_PROT_READ, 0); + pmap_kenter_pa(eva, pa, VM_PROT_READ, 0); #endif - pmap_update(pmap_kernel()); + pmap_update(pmap_kernel()); - aprint_debug("SMBIOS rev. %d.%d @ 0x%lx (%d entries)\n", - sh->ma
CVS commit: src/share/misc
Module Name:src Committed By: riastradh Date: Sat Mar 11 07:10:37 UTC 2017 Modified Files: src/share/misc: acronyms Log Message: AMA: ask me anything To generate a diff of this commit: cvs rdiff -u -r1.252 -r1.253 src/share/misc/acronyms Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms diff -u src/share/misc/acronyms:1.252 src/share/misc/acronyms:1.253 --- src/share/misc/acronyms:1.252 Tue Jan 31 03:44:14 2017 +++ src/share/misc/acronyms Sat Mar 11 07:10:37 2017 @@ -1,4 +1,4 @@ -$NetBSD: acronyms,v 1.252 2017/01/31 03:44:14 riastradh Exp $ +$NetBSD: acronyms,v 1.253 2017/03/11 07:10:37 riastradh Exp $ 10Q thank you 10X thanks 1337 elite ("leet") @@ -32,6 +32,7 @@ AIU as I understand AIUI as I understand it AKA also known as AM ante meridiem +AMA ask me anything AMOL a mountain of love ASAIC as soon as I can ASAP as soon as possible
CVS commit: src/doc
Module Name:src Committed By: ozaki-r Date: Sat Mar 11 06:40:19 UTC 2017 Modified Files: src/doc: TODO.smpnet Log Message: Add ixg(4) To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/doc/TODO.smpnet Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/TODO.smpnet diff -u src/doc/TODO.smpnet:1.7 src/doc/TODO.smpnet:1.8 --- src/doc/TODO.smpnet:1.7 Thu Mar 9 06:21:54 2017 +++ src/doc/TODO.smpnet Sat Mar 11 06:40:19 2017 @@ -1,4 +1,4 @@ -$NetBSD: TODO.smpnet,v 1.7 2017/03/09 06:21:54 ozaki-r Exp $ +$NetBSD: TODO.smpnet,v 1.8 2017/03/11 06:40:19 ozaki-r Exp $ MP-safe components == @@ -7,6 +7,7 @@ MP-safe components - vioif(4) - vmx(4) - wm(4) + - ixg(4) - Layer 2 - Ethernet (if_ethersubr.c) - bridge(4)
CVS commit: src
Module Name:src Committed By: ozaki-r Date: Sat Mar 11 04:24:52 UTC 2017 Modified Files: src/distrib/sets/lists/tests: mi src/tests/net/if_bridge: Makefile t_bridge.sh Added Files: src/tests/net/if_bridge: t_rtable.sh Log Message: Separate tests for learning table of bridge To generate a diff of this commit: cvs rdiff -u -r1.727 -r1.728 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.2 -r1.3 src/tests/net/if_bridge/Makefile cvs rdiff -u -r1.16 -r1.17 src/tests/net/if_bridge/t_bridge.sh cvs rdiff -u -r0 -r1.1 src/tests/net/if_bridge/t_rtable.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.727 src/distrib/sets/lists/tests/mi:1.728 --- src/distrib/sets/lists/tests/mi:1.727 Mon Mar 6 21:03:56 2017 +++ src/distrib/sets/lists/tests/mi Sat Mar 11 04:24:52 2017 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.727 2017/03/06 21:03:56 christos Exp $ +# $NetBSD: mi,v 1.728 2017/03/11 04:24:52 ozaki-r Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -3250,6 +3250,7 @@ ./usr/tests/net/if_bridge/Atffile tests-net-tests atf,rump ./usr/tests/net/if_bridge/Kyuafile tests-net-tests atf,rump,kyua ./usr/tests/net/if_bridge/t_bridge tests-net-tests atf,rump +./usr/tests/net/if_bridge/t_rtable tests-net-tests atf,rump ./usr/tests/net/if_giftests-net-tests compattestfile,atf ./usr/tests/net/if_gif/Atffile tests-net-tests atf,rump ./usr/tests/net/if_gif/Kyuafile tests-net-tests atf,rump,kyua Index: src/tests/net/if_bridge/Makefile diff -u src/tests/net/if_bridge/Makefile:1.2 src/tests/net/if_bridge/Makefile:1.3 --- src/tests/net/if_bridge/Makefile:1.2 Thu Nov 24 09:07:09 2016 +++ src/tests/net/if_bridge/Makefile Sat Mar 11 04:24:52 2017 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.2 2016/11/24 09:07:09 ozaki-r Exp $ +# $NetBSD: Makefile,v 1.3 2017/03/11 04:24:52 ozaki-r Exp $ # .include TESTSDIR= ${TESTSBASE}/net/if_bridge -.for name in bridge +.for name in bridge rtable TESTS_SH+= t_${name} TESTS_SH_SRC_t_${name}= ../net_common.sh t_${name}.sh .endfor Index: src/tests/net/if_bridge/t_bridge.sh diff -u src/tests/net/if_bridge/t_bridge.sh:1.16 src/tests/net/if_bridge/t_bridge.sh:1.17 --- src/tests/net/if_bridge/t_bridge.sh:1.16 Fri Nov 25 08:51:16 2016 +++ src/tests/net/if_bridge/t_bridge.sh Sat Mar 11 04:24:52 2017 @@ -1,4 +1,4 @@ -# $NetBSD: t_bridge.sh,v 1.16 2016/11/25 08:51:16 ozaki-r Exp $ +# $NetBSD: t_bridge.sh,v 1.17 2017/03/11 04:24:52 ozaki-r Exp $ # # Copyright (c) 2014 The NetBSD Foundation, Inc. # All rights reserved. @@ -42,7 +42,6 @@ TIMEOUT=5 atf_test_case bridge_ipv4 cleanup atf_test_case bridge_ipv6 cleanup -atf_test_case bridge_rtable cleanup atf_test_case bridge_member_ipv4 cleanup atf_test_case bridge_member_ipv6 cleanup @@ -58,12 +57,6 @@ bridge_ipv6_head() atf_set "require.progs" "rump_server" } -bridge_rtable_head() -{ - atf_set "descr" "Tests route table operations of if_bridge" - atf_set "require.progs" "rump_server" -} - bridge_member_ipv4_head() { atf_set "descr" "Tests if_bridge with members with an IP address" @@ -319,63 +312,6 @@ test_ping6_member() rump.ifconfig -v shmif0 } -get_number_of_caches() -{ - export RUMP_SERVER=$SOCK2 - export LD_PRELOAD=/usr/lib/librumphijack.so - echo $(($(/sbin/brconfig bridge0 |grep -A 100 "Address cache" |wc -l) - 1)) - unset LD_PRELOAD -} - -test_brconfig_maxaddr() -{ - addr1= addr3= n= - - # Get MAC addresses of the endpoints. - addr1=$(get_macaddr $SOCK1 shmif0) - addr3=$(get_macaddr $SOCK3 shmif0) - - # Refill the MAC addresses of the endpoints. - export RUMP_SERVER=$SOCK1 - atf_check -s exit:0 -o ignore rump.ping -n -w $TIMEOUT -c 1 $IP2 - export RUMP_SERVER=$SOCK2 - export LD_PRELOAD=/usr/lib/librumphijack.so - /sbin/brconfig bridge0 - atf_check -s exit:0 -o match:"$addr1 shmif0" /sbin/brconfig bridge0 - atf_check -s exit:0 -o match:"$addr3 shmif1" /sbin/brconfig bridge0 - - # Check the default # of caches is 100 - atf_check -s exit:0 -o match:"max cache: 100" /sbin/brconfig bridge0 - - # Test two MAC addresses are cached - n=$(get_number_of_caches) - atf_check_equal $n 2 - - # Limit # of caches to one - atf_check -s exit:0 -o ignore /sbin/brconfig bridge0 maxaddr 1 - atf_check -s exit:0 -o match:"max cache: 1" /sbin/brconfig bridge0 - /sbin/brconfig bridge0 - - # Test just one address is cached - n=$(get_number_of_caches) - atf_check_equal $n 1 - - # Increase # of caches to two - atf_check -s exit:0 -o ignore /sbin/brconfig bridge0 maxaddr 2 - atf_check -s exit:0 -o match:"max cache: 2" /sbin/brconfig bridge0 - unset LD_PRELOAD - - # Test we can cache two addresses again - export RUMP_SERVER=$SOCK1 - atf_check -s exit:0 -o ignore rump.ping -n -w $TIMEOUT -c 1 $IP2 - export RUMP_SERVER=$SOCK2 - export LD_PRELOAD=/usr/lib/librumphijack.so - /sbin/brconfig bridge0 -
CVS commit: src/tests/net/arp
Module Name:src Committed By: ozaki-r Date: Sat Mar 11 02:01:10 UTC 2017 Modified Files: src/tests/net/arp: t_dad.sh Log Message: Improve test stability and output messages on failure To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/tests/net/arp/t_dad.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/net/arp/t_dad.sh diff -u src/tests/net/arp/t_dad.sh:1.14 src/tests/net/arp/t_dad.sh:1.15 --- src/tests/net/arp/t_dad.sh:1.14 Wed Mar 8 05:30:56 2017 +++ src/tests/net/arp/t_dad.sh Sat Mar 11 02:01:10 2017 @@ -1,4 +1,4 @@ -# $NetBSD: t_dad.sh,v 1.14 2017/03/08 05:30:56 ozaki-r Exp $ +# $NetBSD: t_dad.sh,v 1.15 2017/03/11 02:01:10 ozaki-r Exp $ # # Copyright (c) 2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -168,21 +168,24 @@ dad_duplicated_body() export RUMP_SERVER=$SOCKLOCAL # The primary address isn't marked as duplicated - atf_check -s not-exit:0 -x "rump.ifconfig shmif0 |grep $localip1 |grep -iq duplicated" + atf_check -s exit:0 -o not-match:"${localip1}.+DUPLICATED" \ + rump.ifconfig shmif0 # # Add a new address duplicated with the peer server # atf_check -s exit:0 rump.ifconfig shmif0 inet $peerip alias - atf_check -s exit:0 sleep 1 + atf_check -s exit:0 sleep 2 # The new address is marked as duplicated - atf_check -s exit:0 -x "rump.ifconfig shmif0 |grep $peerip |grep -iq duplicated" + atf_check -s exit:0 -o match:"${peerip}.+DUPLICATED" \ + rump.ifconfig shmif0 # A unique address isn't marked as duplicated atf_check -s exit:0 rump.ifconfig shmif0 inet $localip2 alias - atf_check -s exit:0 sleep 1 - atf_check -s not-exit:0 -x "rump.ifconfig shmif0 |grep $localip2 |grep -iq duplicated" + atf_check -s exit:0 sleep 2 + atf_check -s exit:0 -o not-match:"${localip2}.+DUPLICATED" \ + rump.ifconfig shmif0 rump_server_destroy_ifaces }
CVS commit: src/lib/libc/arch/sh3/gen
Module Name:src Committed By: chs Date: Sat Mar 11 01:25:04 UTC 2017 Modified Files: src/lib/libc/arch/sh3/gen: flt_rounds.c Log Message: fix the mapping table. this sh3 version was originally copied from arm, but FP_RP and FP_RM have opposite values on sh3 vs. arm. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/sh3/gen/flt_rounds.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/sh3/gen/flt_rounds.c diff -u src/lib/libc/arch/sh3/gen/flt_rounds.c:1.6 src/lib/libc/arch/sh3/gen/flt_rounds.c:1.7 --- src/lib/libc/arch/sh3/gen/flt_rounds.c:1.6 Thu Mar 19 21:22:59 2015 +++ src/lib/libc/arch/sh3/gen/flt_rounds.c Sat Mar 11 01:25:04 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: flt_rounds.c,v 1.6 2015/03/19 21:22:59 joerg Exp $ */ +/* $NetBSD: flt_rounds.c,v 1.7 2017/03/11 01:25:04 chs Exp $ */ /* * Copyright (c) 1996 Mark Brinicombe @@ -33,7 +33,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: flt_rounds.c,v 1.6 2015/03/19 21:22:59 joerg Exp $"); +__RCSID("$NetBSD: flt_rounds.c,v 1.7 2017/03/11 01:25:04 chs Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -42,8 +42,8 @@ __RCSID("$NetBSD: flt_rounds.c,v 1.6 201 static const int map[] = { 1, /* round to nearest */ - 2, /* round to positive infinity */ - 3, /* round to negative infinity */ + 3, /* round to positive infinity */ + 2, /* round to negative infinity */ 0 /* round to zero */ };
CVS commit: src/sys/ufs/ffs
Module Name:src Committed By: jdolecek Date: Fri Mar 10 22:43:03 UTC 2017 Modified Files: src/sys/ufs/ffs: ffs_wapbl.c Log Message: sync any delayed writes when updating filesystem to log Adresses PR kern/52056 by Martin Husemann, fix helped by Juergen Hannken, thanks To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/ufs/ffs/ffs_wapbl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/ufs/ffs/ffs_wapbl.c diff -u src/sys/ufs/ffs/ffs_wapbl.c:1.37 src/sys/ufs/ffs/ffs_wapbl.c:1.38 --- src/sys/ufs/ffs/ffs_wapbl.c:1.37 Thu Nov 10 22:19:23 2016 +++ src/sys/ufs/ffs/ffs_wapbl.c Fri Mar 10 22:43:03 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs_wapbl.c,v 1.37 2016/11/10 22:19:23 jdolecek Exp $ */ +/* $NetBSD: ffs_wapbl.c,v 1.38 2017/03/10 22:43:03 jdolecek Exp $ */ /*- * Copyright (c) 2003,2006,2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ffs_wapbl.c,v 1.37 2016/11/10 22:19:23 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ffs_wapbl.c,v 1.38 2017/03/10 22:43:03 jdolecek Exp $"); #define WAPBL_INTERNAL @@ -338,6 +338,13 @@ ffs_wapbl_start(struct mount *mp) return EINVAL; } + /* + * Make sure we don't carry over any delayed write + * buffers when updating to log. + */ + if (mp->mnt_flag & MNT_UPDATE) +ffs_sync(mp, MNT_WAIT, FSCRED); + error = wapbl_log_position(mp, fs, devvp, &off, &count, &blksize, &extradata); if (error)
CVS commit: src/sys/ufs/ffs
Module Name:src Committed By: jdolecek Date: Fri Mar 10 20:38:28 UTC 2017 Modified Files: src/sys/ufs/ffs: ffs_vfsops.c Log Message: slightly rearrange the code for IMNT_WANTRDONLY + MNT_UPDATE case for better readability, no functional change To generate a diff of this commit: cvs rdiff -u -r1.349 -r1.350 src/sys/ufs/ffs/ffs_vfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/ufs/ffs/ffs_vfsops.c diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.349 src/sys/ufs/ffs/ffs_vfsops.c:1.350 --- src/sys/ufs/ffs/ffs_vfsops.c:1.349 Mon Mar 6 10:12:00 2017 +++ src/sys/ufs/ffs/ffs_vfsops.c Fri Mar 10 20:38:28 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs_vfsops.c,v 1.349 2017/03/06 10:12:00 hannken Exp $ */ +/* $NetBSD: ffs_vfsops.c,v 1.350 2017/03/10 20:38:28 jdolecek Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.349 2017/03/06 10:12:00 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.350 2017/03/10 20:38:28 jdolecek Exp $"); #if defined(_KERNEL_OPT) #include "opt_ffs.h" @@ -573,20 +573,23 @@ ffs_mount(struct mount *mp, const char * if (mp->mnt_flag & MNT_FORCE) flags |= FORCECLOSE; error = ffs_flushfiles(mp, flags, l); - if (error == 0) -error = UFS_WAPBL_BEGIN(mp); - if (error == 0 && - ffs_cgupdate(ump, MNT_WAIT) == 0 && + if (error) +return error; + + error = UFS_WAPBL_BEGIN(mp); + if (error) { +DPRINTF("wapbl %d", error); +return error; + } + + if (ffs_cgupdate(ump, MNT_WAIT) == 0 && fs->fs_clean & FS_WASCLEAN) { if (mp->mnt_flag & MNT_SOFTDEP) fs->fs_flags &= ~FS_DOSOFTDEP; fs->fs_clean = FS_ISCLEAN; (void) ffs_sbupdate(ump, MNT_WAIT); } - if (error) { -DPRINTF("wapbl %d", error); -return error; - } + UFS_WAPBL_END(mp); }
CVS commit: src/sys/netinet
Module Name:src Committed By: roy Date: Fri Mar 10 20:27:31 UTC 2017 Modified Files: src/sys/netinet: if_arp.c Log Message: If an ARP packet is received to the null host (0.0.0.0) then look for an address matching the sender IP address on the interface. This allows DAD to fail during the probe phase when a reverse ARP proxy is present. To generate a diff of this commit: cvs rdiff -u -r1.245 -r1.246 src/sys/netinet/if_arp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet/if_arp.c diff -u src/sys/netinet/if_arp.c:1.245 src/sys/netinet/if_arp.c:1.246 --- src/sys/netinet/if_arp.c:1.245 Thu Mar 9 08:41:56 2017 +++ src/sys/netinet/if_arp.c Fri Mar 10 20:27:31 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_arp.c,v 1.245 2017/03/09 08:41:56 roy Exp $ */ +/* $NetBSD: if_arp.c,v 1.246 2017/03/10 20:27:31 roy Exp $ */ /*- * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.245 2017/03/09 08:41:56 roy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.246 2017/03/10 20:27:31 roy Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -1058,11 +1058,15 @@ in_arpinput(struct mbuf *m) /* * Search for a matching interface address * or any address on the interface to use - * as a dummy address in the rest of this function + * as a dummy address in the rest of this function. + * + * If the target IP address is zero then try and find + * the sender address for DAD. */ + myaddr = in_nullhost(itaddr) ? isaddr : itaddr; s = pserialize_read_enter(); - IN_ADDRHASH_READER_FOREACH(ia, itaddr.s_addr) { - if (!in_hosteq(ia->ia_addr.sin_addr, itaddr)) + IN_ADDRHASH_READER_FOREACH(ia, myaddr.s_addr) { + if (!in_hosteq(ia->ia_addr.sin_addr, myaddr)) continue; #if NCARP > 0 if (ia->ia_ifp->if_type == IFT_CARP && @@ -1153,15 +1157,8 @@ in_arpinput(struct mbuf *m) else if (in_hosteq(isaddr, myaddr)) ARP_STATINC(ARP_STAT_RCVLOCALSPA); - /* - * If the target IP address is zero, ignore the packet. - * This prevents the code below from trying to answer - * when we are using IP address zero (booting). - */ - if (in_nullhost(itaddr)) { + if (in_nullhost(itaddr)) ARP_STATINC(ARP_STAT_RCVZEROTPA); - goto out; - } /* * DAD check, RFC 5227. @@ -1182,6 +1179,14 @@ in_arpinput(struct mbuf *m) goto out; } + /* + * If the target IP address is zero, ignore the packet. + * This prevents the code below from trying to answer + * when we are using IP address zero (booting). + */ + if (in_nullhost(itaddr)) + goto out; + if (in_nullhost(isaddr)) goto reply;
CVS commit: src/lib/libc/net
Module Name:src Committed By: maya Date: Fri Mar 10 18:02:32 UTC 2017 Modified Files: src/lib/libc/net: hesiod.c Log Message: Remove entirely redundant free right after declaration. This block existed because the original code used bindname as a global. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/lib/libc/net/hesiod.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/net/hesiod.c diff -u src/lib/libc/net/hesiod.c:1.29 src/lib/libc/net/hesiod.c:1.30 --- src/lib/libc/net/hesiod.c:1.29 Fri Mar 10 17:47:20 2017 +++ src/lib/libc/net/hesiod.c Fri Mar 10 18:02:32 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: hesiod.c,v 1.29 2017/03/10 17:47:20 maya Exp $ */ +/* $NetBSD: hesiod.c,v 1.30 2017/03/10 18:02:32 maya Exp $ */ /* Copyright (c) 1996 by Internet Software Consortium. * @@ -51,7 +51,7 @@ __IDSTRING(rcsid_hesiod_p_h, "#Id: hesiod_p.h,v 1.1 1996/12/08 21:39:37 ghudson Exp #"); __IDSTRING(rcsid_hescompat_c, "#Id: hescompat.c,v 1.1.2.1 1996/12/16 08:37:45 ghudson Exp #"); -__RCSID("$NetBSD: hesiod.c,v 1.29 2017/03/10 17:47:20 maya Exp $"); +__RCSID("$NetBSD: hesiod.c,v 1.30 2017/03/10 18:02:32 maya Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -553,8 +553,7 @@ hes_to_bind(const char *name, const char if (init_context() < 0) return NULL; - if (bindname) - free(bindname); + bindname = hesiod_to_bind(context, name, type); if (!bindname) translate_errors();
CVS commit: src/lib/libc/net
Module Name:src Committed By: maya Date: Fri Mar 10 17:47:20 UTC 2017 Modified Files: src/lib/libc/net: hesiod.c Log Message: Drop redundant null checks. this doesn't increase diff to upstream, the whole block differs already. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/lib/libc/net/hesiod.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/net/hesiod.c diff -u src/lib/libc/net/hesiod.c:1.28 src/lib/libc/net/hesiod.c:1.29 --- src/lib/libc/net/hesiod.c:1.28 Thu Sep 18 13:58:20 2014 +++ src/lib/libc/net/hesiod.c Fri Mar 10 17:47:20 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: hesiod.c,v 1.28 2014/09/18 13:58:20 christos Exp $ */ +/* $NetBSD: hesiod.c,v 1.29 2017/03/10 17:47:20 maya Exp $ */ /* Copyright (c) 1996 by Internet Software Consortium. * @@ -51,7 +51,7 @@ __IDSTRING(rcsid_hesiod_p_h, "#Id: hesiod_p.h,v 1.1 1996/12/08 21:39:37 ghudson Exp #"); __IDSTRING(rcsid_hescompat_c, "#Id: hescompat.c,v 1.1.2.1 1996/12/16 08:37:45 ghudson Exp #"); -__RCSID("$NetBSD: hesiod.c,v 1.28 2014/09/18 13:58:20 christos Exp $"); +__RCSID("$NetBSD: hesiod.c,v 1.29 2017/03/10 17:47:20 maya Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -152,10 +152,8 @@ hesiod_init(void **context) serrno = errno; if (ctx) { - if (ctx->lhs) - free(ctx->lhs); - if (ctx->rhs) - free(ctx->rhs); + free(ctx->lhs); + free(ctx->rhs); free(ctx); } errno = serrno;
CVS commit: src
Module Name:src Committed By: sevan Date: Fri Mar 10 17:15:47 UTC 2017 Modified Files: src: build.sh Log Message: State the reason script bombed. Reword recommendation. To generate a diff of this commit: cvs rdiff -u -r1.314 -r1.315 src/build.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/build.sh diff -u src/build.sh:1.314 src/build.sh:1.315 --- src/build.sh:1.314 Sun Dec 18 19:39:05 2016 +++ src/build.sh Fri Mar 10 17:15:47 2017 @@ -1,5 +1,5 @@ #! /usr/bin/env sh -# $NetBSD: build.sh,v 1.314 2016/12/18 19:39:05 christos Exp $ +# $NetBSD: build.sh,v 1.315 2017/03/10 17:15:47 sevan Exp $ # # Copyright (c) 2001-2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -458,7 +458,8 @@ initdefaults() [ -d usr.bin/make ] || cd "$(dirname $0)" [ -d usr.bin/make ] || - bomb "build.sh must be run from the top source level" + bomb "usr.bin/make not found; build.sh must be run from the top \ +level of source directory" [ -f share/mk/bsd.own.mk ] || bomb "src/share/mk is missing; please re-fetch the source tree" @@ -1892,7 +1893,7 @@ createmakewrapper() eval cat <
CVS commit: src/sys/arch
Module Name:src Committed By: skrll Date: Fri Mar 10 15:44:24 UTC 2017 Modified Files: src/sys/arch/arm/marvell: armadaxpreg.h mvsoc.c mvsoc_space.c mvsocvar.h pci_machdep.c src/sys/arch/evbarm/armadaxp: armadaxp_machdep.c Log Message: Initialise the windows and allow access to PCI Express port 1 first lane. Allows xhci(4) to attach in the MV78230 based Lenovo ix4-300d mvpex1 at mvsoc0 unit 4 offset 0x8-0x81fff irq 62: Marvell PCI Express Interface pci1 at mvpex1 xhci0 at pci1 dev 1 function 0: vendor 1033 product 0194 (rev. 0x04) xhci0: interrupting at interrupt pin INTA# usb3 at xhci0: USB revision 3.0 usb4 at xhci0: USB revision 2.0 To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/marvell/armadaxpreg.h cvs rdiff -u -r1.28 -r1.29 src/sys/arch/arm/marvell/mvsoc.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/marvell/mvsoc_space.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/marvell/mvsocvar.h cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/marvell/pci_machdep.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/armadaxp/armadaxp_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/marvell/armadaxpreg.h diff -u src/sys/arch/arm/marvell/armadaxpreg.h:1.7 src/sys/arch/arm/marvell/armadaxpreg.h:1.8 --- src/sys/arch/arm/marvell/armadaxpreg.h:1.7 Sat Jan 7 15:47:33 2017 +++ src/sys/arch/arm/marvell/armadaxpreg.h Fri Mar 10 15:44:24 2017 @@ -98,7 +98,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI #define ARMADAXP_ATTR_NAND_RESERVED 0x20 /* PCIe Attributes */ -/* port 0, 1 has 4 lanes */ +/* port 0 has 4 lanes. port 1 has either 4 or 1 lanes. */ #define ARMADAXP_ATTR_PEXx0_MEM 0xe8 #define ARMADAXP_ATTR_PEXx0_IO 0xe0 #define ARMADAXP_ATTR_PEXx1_MEM 0xd8 Index: src/sys/arch/arm/marvell/mvsoc.c diff -u src/sys/arch/arm/marvell/mvsoc.c:1.28 src/sys/arch/arm/marvell/mvsoc.c:1.29 --- src/sys/arch/arm/marvell/mvsoc.c:1.28 Fri Feb 24 17:07:13 2017 +++ src/sys/arch/arm/marvell/mvsoc.c Fri Mar 10 15:44:24 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: mvsoc.c,v 1.28 2017/02/24 17:07:13 skrll Exp $ */ +/* $NetBSD: mvsoc.c,v 1.29 2017/03/10 15:44:24 skrll Exp $ */ /* * Copyright (c) 2007, 2008, 2013, 2014, 2016 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mvsoc.c,v 1.28 2017/02/24 17:07:13 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mvsoc.c,v 1.29 2017/03/10 15:44:24 skrll Exp $"); #include "opt_cputypes.h" #include "opt_mvsoc.h" @@ -285,26 +285,52 @@ static struct { ARMADAXP_ATTR_PEXx0_MEM, ARMADAXP_UNITID_PEX0 }, { ARMADAXP_TAG_PEX00_IO, ARMADAXP_ATTR_PEXx0_IO, ARMADAXP_UNITID_PEX0 }, + { ARMADAXP_TAG_PEX01_MEM, ARMADAXP_ATTR_PEXx1_MEM, ARMADAXP_UNITID_PEX0 }, { ARMADAXP_TAG_PEX01_IO, ARMADAXP_ATTR_PEXx1_IO, ARMADAXP_UNITID_PEX0 }, + { ARMADAXP_TAG_PEX02_MEM, ARMADAXP_ATTR_PEXx2_MEM, ARMADAXP_UNITID_PEX0 }, { ARMADAXP_TAG_PEX02_IO, ARMADAXP_ATTR_PEXx2_IO, ARMADAXP_UNITID_PEX0 }, + { ARMADAXP_TAG_PEX03_MEM, ARMADAXP_ATTR_PEXx3_MEM, ARMADAXP_UNITID_PEX0 }, { ARMADAXP_TAG_PEX03_IO, ARMADAXP_ATTR_PEXx3_IO, ARMADAXP_UNITID_PEX0 }, + + { ARMADAXP_TAG_PEX10_MEM, + ARMADAXP_ATTR_PEXx0_MEM, ARMADAXP_UNITID_PEX1 }, + { ARMADAXP_TAG_PEX10_IO, + ARMADAXP_ATTR_PEXx0_IO, ARMADAXP_UNITID_PEX1 }, + + { ARMADAXP_TAG_PEX11_MEM, + ARMADAXP_ATTR_PEXx1_MEM, ARMADAXP_UNITID_PEX1 }, + { ARMADAXP_TAG_PEX11_IO, + ARMADAXP_ATTR_PEXx1_IO, ARMADAXP_UNITID_PEX1 }, + + { ARMADAXP_TAG_PEX12_MEM, + ARMADAXP_ATTR_PEXx2_MEM, ARMADAXP_UNITID_PEX1 }, + { ARMADAXP_TAG_PEX12_IO, + ARMADAXP_ATTR_PEXx2_IO, ARMADAXP_UNITID_PEX1 }, + + { ARMADAXP_TAG_PEX13_MEM, + ARMADAXP_ATTR_PEXx3_MEM, ARMADAXP_UNITID_PEX1 }, + { ARMADAXP_TAG_PEX13_IO, + ARMADAXP_ATTR_PEXx3_IO, ARMADAXP_UNITID_PEX1 }, + { ARMADAXP_TAG_PEX2_MEM, ARMADAXP_ATTR_PEX2_MEM, ARMADAXP_UNITID_PEX2 }, { ARMADAXP_TAG_PEX2_IO, ARMADAXP_ATTR_PEX2_IO, ARMADAXP_UNITID_PEX2 }, + { ARMADAXP_TAG_PEX3_MEM, ARMADAXP_ATTR_PEX3_MEM, ARMADAXP_UNITID_PEX3 }, { ARMADAXP_TAG_PEX3_IO, ARMADAXP_ATTR_PEX3_IO, ARMADAXP_UNITID_PEX3 }, + { ARMADAXP_TAG_CRYPT0, ARMADAXP_ATTR_CRYPT0_NOSWAP, ARMADAXP_UNITID_CRYPT }, { ARMADAXP_TAG_CRYPT1, @@ -853,7 +879,9 @@ static const struct mvsoc_periph { { ARMADAXP(MV78230), "mvpex", 1, ARMADAXP_PEX01_BASE,ARMADAXP_IRQ_PEX01 }, { ARMADAXP(MV78230), "mvpex", 2, ARMADAXP_PEX02_BASE,ARMADAXP_IRQ_PEX02 }, { ARMADAXP(MV78230), "mvpex", 3, ARMADAXP_PEX03_BASE,ARMADAXP_IRQ_PEX03 }, -{ ARMADAXP(MV78230), "mvpex", 4, ARMADAXP_PEX2_BASE,ARMADAXP_IRQ_PEX2 }, +{ ARMADAXP(MV78230), "mvpex", 4, ARMADAXP_PEX10_BASE,ARMADAXP_IRQ_PEX10 }, +{ ARMADAXP(MV78230), "mvpex", 5, ARMADAXP_PEX2_BASE,ARMADAXP_IRQ_PEX2 }, +{ ARMADAXP(MV78230), "mvpex", 6, ARMADAXP_PEX3_BASE,ARMADAXP_IRQ_PEX3 }, { ARMADAXP(MV78230), "mvsata", 0, ARMADAXP_SAT
CVS commit: src/usr.bin/pmc
Module Name:src Committed By: wiz Date: Fri Mar 10 15:34:17 UTC 2017 Modified Files: src/usr.bin/pmc: pmc.1 Log Message: Sort sections. Remove unnecessary/incorrect macros. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.bin/pmc/pmc.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/pmc/pmc.1 diff -u src/usr.bin/pmc/pmc.1:1.10 src/usr.bin/pmc/pmc.1:1.11 --- src/usr.bin/pmc/pmc.1:1.10 Fri Mar 10 13:09:11 2017 +++ src/usr.bin/pmc/pmc.1 Fri Mar 10 15:34:17 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: pmc.1,v 1.10 2017/03/10 13:09:11 maxv Exp $ +.\" $NetBSD: pmc.1,v 1.11 2017/03/10 15:34:17 wiz Exp $ .\" .\" Copyright (c) 2017 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -96,7 +96,6 @@ Stop any performance counters that are c values of these counters. .El .Sh EXAMPLES -.Pp The following command prints the available counters. .Dl $ pmc list .Pp @@ -114,7 +113,6 @@ track the same event. The latter will start one counter that tracks the event from all sources; it therefore does the sum of the two counters from the first command, but takes only one counter to do so. -.Ed .Sh DIAGNOSTICS .Bl -diag .It PMC support not compiled into the kernel @@ -127,12 +125,6 @@ See .Xr options 4 for details. .El -.Sh BUGS -The -.Nm -command currently only supports performance-monitoring counters -on the i386 architecture. -.El .Sh SEE ALSO .Xr options 4 .Sh HISTORY @@ -141,4 +133,8 @@ The command first appeared in .Nx 1.6 . It was revamped in 2017. - +.Sh BUGS +The +.Nm +command currently only supports performance-monitoring counters +on the i386 architecture.
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Fri Mar 10 15:30:45 UTC 2017 Modified Files: src/share/man/man9: cpu_lwp_fork.9 Log Message: Bump date for previous. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/share/man/man9/cpu_lwp_fork.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/cpu_lwp_fork.9 diff -u src/share/man/man9/cpu_lwp_fork.9:1.5 src/share/man/man9/cpu_lwp_fork.9:1.6 --- src/share/man/man9/cpu_lwp_fork.9:1.5 Fri Mar 10 09:08:47 2017 +++ src/share/man/man9/cpu_lwp_fork.9 Fri Mar 10 15:30:45 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: cpu_lwp_fork.9,v 1.5 2017/03/10 09:08:47 martin Exp $ +.\" $NetBSD: cpu_lwp_fork.9,v 1.6 2017/03/10 15:30:45 wiz Exp $ .\" .\" Copyright (c) 2002, 2005, 2006 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 13, 2010 +.Dd March 10, 2017 .Dt CPU_LWP_FORK 9 .Os .Sh NAME
CVS commit: src/usr.bin/pmc
Module Name:src Committed By: maxv Date: Fri Mar 10 15:06:21 UTC 2017 Modified Files: src/usr.bin/pmc: pmc.c Log Message: PRIu64 To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.bin/pmc/pmc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/pmc/pmc.c diff -u src/usr.bin/pmc/pmc.c:1.20 src/usr.bin/pmc/pmc.c:1.21 --- src/usr.bin/pmc/pmc.c:1.20 Fri Mar 10 13:09:11 2017 +++ src/usr.bin/pmc/pmc.c Fri Mar 10 15:06:20 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pmc.c,v 1.20 2017/03/10 13:09:11 maxv Exp $ */ +/* $NetBSD: pmc.c,v 1.21 2017/03/10 15:06:20 maxv Exp $ */ /* * Copyright (c) 2017 The NetBSD Foundation, Inc. @@ -66,9 +66,10 @@ #include #ifndef lint -__RCSID("$NetBSD: pmc.c,v 1.20 2017/03/10 13:09:11 maxv Exp $"); +__RCSID("$NetBSD: pmc.c,v 1.21 2017/03/10 15:06:20 maxv Exp $"); #endif +#include #include #include #include @@ -513,7 +514,7 @@ pmc_stop(const pmc_name2val_cpu_t *pncp, for (i = 0; i < n; i++) { printf("%zu\t\t", i); for (j = 0; j < nval; j++) { - printf("%llu\t\t", cpuval[i][j].ctrval); + printf("%" PRIu64 "\t\t", cpuval[i][j].ctrval); } printf("\n"); }
CVS commit: src/sys/arch
Module Name:src Committed By: maxv Date: Fri Mar 10 14:54:12 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: machdep.c src/sys/arch/amd64/conf: GENERIC src/sys/arch/x86/x86: sys_machdep.c Log Message: PMCs for amd64 - still disabled, like i386. To generate a diff of this commit: cvs rdiff -u -r1.252 -r1.253 src/sys/arch/amd64/amd64/machdep.c cvs rdiff -u -r1.454 -r1.455 src/sys/arch/amd64/conf/GENERIC cvs rdiff -u -r1.34 -r1.35 src/sys/arch/x86/x86/sys_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/machdep.c diff -u src/sys/arch/amd64/amd64/machdep.c:1.252 src/sys/arch/amd64/amd64/machdep.c:1.253 --- src/sys/arch/amd64/amd64/machdep.c:1.252 Thu Feb 23 03:34:22 2017 +++ src/sys/arch/amd64/amd64/machdep.c Fri Mar 10 14:54:12 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.252 2017/02/23 03:34:22 kamil Exp $ */ +/* $NetBSD: machdep.c,v 1.253 2017/03/10 14:54:12 maxv Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011 @@ -111,7 +111,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.252 2017/02/23 03:34:22 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.253 2017/03/10 14:54:12 maxv Exp $"); /* #define XENDEBUG_LOW */ @@ -170,6 +170,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v #include #include #include +#include #include #include #include @@ -1780,6 +1781,8 @@ init_x86_64(paddr_t first_avail) } #endif + pmc_init(); + pcb->pcb_dbregs = NULL; x86_dbregs_setup_initdbstate(); Index: src/sys/arch/amd64/conf/GENERIC diff -u src/sys/arch/amd64/conf/GENERIC:1.454 src/sys/arch/amd64/conf/GENERIC:1.455 --- src/sys/arch/amd64/conf/GENERIC:1.454 Sun Feb 26 12:41:50 2017 +++ src/sys/arch/amd64/conf/GENERIC Fri Mar 10 14:54:12 2017 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.454 2017/02/26 12:41:50 rin Exp $ +# $NetBSD: GENERIC,v 1.455 2017/03/10 14:54:12 maxv Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/amd64/conf/std.amd64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.454 $" +#ident "GENERIC-$Revision: 1.455 $" maxusers 64 # estimated number of users @@ -81,6 +81,8 @@ est0 at cpu0 # Intel Enhanced SpeedSte powernow0 at cpu0 # AMD PowerNow! and Cool'n'Quiet (non-ACPI) vmt0 at cpu0 # VMware Tools +#options PMC # performance-monitoring counters support + # Alternate buffer queue strategies for better responsiveness under high # disk I/O load. #options BUFQ_READPRIO Index: src/sys/arch/x86/x86/sys_machdep.c diff -u src/sys/arch/x86/x86/sys_machdep.c:1.34 src/sys/arch/x86/x86/sys_machdep.c:1.35 --- src/sys/arch/x86/x86/sys_machdep.c:1.34 Sat Feb 18 14:36:32 2017 +++ src/sys/arch/x86/x86/sys_machdep.c Fri Mar 10 14:54:12 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_machdep.c,v 1.34 2017/02/18 14:36:32 maxv Exp $ */ +/* $NetBSD: sys_machdep.c,v 1.35 2017/03/10 14:54:12 maxv Exp $ */ /*- * Copyright (c) 1998, 2007, 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.34 2017/02/18 14:36:32 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.35 2017/03/10 14:54:12 maxv Exp $"); #include "opt_mtrr.h" #include "opt_user_ldt.h" @@ -84,7 +84,6 @@ __KERNEL_RCSID(0, "$NetBSD: sys_machdep. */ #undef USER_LDT /* Need to be checked. */ -#undef PMC #undef IOPERM #else #if defined(XEN) @@ -94,6 +93,10 @@ __KERNEL_RCSID(0, "$NetBSD: sys_machdep. #endif /* defined(XEN) */ #endif +#ifdef XEN +#undef PMC +#endif + #ifdef VM86 #include #endif
CVS commit: src/sys/arch
Module Name:src Committed By: maxv Date: Fri Mar 10 14:40:56 UTC 2017 Modified Files: src/sys/arch/amd64/include: pmc.h src/sys/arch/i386/conf: files.i386 src/sys/arch/x86/conf: files.x86 src/sys/arch/xen/conf: files.xen Added Files: src/sys/arch/x86/x86: pmc.c Removed Files: src/sys/arch/i386/i386: pmc.c Log Message: Move pmc.c into x86/, it can be shared with amd64. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/amd64/include/pmc.h cvs rdiff -u -r1.377 -r1.378 src/sys/arch/i386/conf/files.i386 cvs rdiff -u -r1.25 -r0 src/sys/arch/i386/i386/pmc.c cvs rdiff -u -r1.87 -r1.88 src/sys/arch/x86/conf/files.x86 cvs rdiff -u -r0 -r1.1 src/sys/arch/x86/x86/pmc.c cvs rdiff -u -r1.144 -r1.145 src/sys/arch/xen/conf/files.xen Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/include/pmc.h diff -u src/sys/arch/amd64/include/pmc.h:1.3 src/sys/arch/amd64/include/pmc.h:1.4 --- src/sys/arch/amd64/include/pmc.h:1.3 Sat Feb 18 14:43:35 2017 +++ src/sys/arch/amd64/include/pmc.h Fri Mar 10 14:40:56 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pmc.h,v 1.3 2017/02/18 14:43:35 maxv Exp $ */ +/* $NetBSD: pmc.h,v 1.4 2017/03/10 14:40:56 maxv Exp $ */ /*- * Copyright (c) 2000 Zembu Labs, Inc. @@ -34,17 +34,14 @@ */ #ifdef _KERNEL -/* - * LEGACY PMC support - */ -struct x86_64_pmc_info_args; -int pmc_info(struct proc *, struct x86_64_pmc_info_args *, +struct x86_pmc_info_args; +struct x86_pmc_startstop_args; +struct x86_pmc_read_args; +void pmc_init(void); +int sys_pmc_info(struct lwp *, struct x86_pmc_info_args *, register_t *); -struct x86_64_pmc_startstop_args; -int pmc_startstop(struct proc *, struct x86_64_pmc_startstop_args *, +int sys_pmc_startstop(struct lwp *, struct x86_pmc_startstop_args *, register_t *); -struct x86_64_pmc_read_args; -int pmc_read(struct proc *, struct x86_64_pmc_read_args *, +int sys_pmc_read(struct lwp *, struct x86_pmc_read_args *, register_t *); -/* END LEGACY PMC SUPPORT */ #endif Index: src/sys/arch/i386/conf/files.i386 diff -u src/sys/arch/i386/conf/files.i386:1.377 src/sys/arch/i386/conf/files.i386:1.378 --- src/sys/arch/i386/conf/files.i386:1.377 Fri Feb 17 12:10:40 2017 +++ src/sys/arch/i386/conf/files.i386 Fri Mar 10 14:40:56 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.i386,v 1.377 2017/02/17 12:10:40 maxv Exp $ +# $NetBSD: files.i386,v 1.378 2017/03/10 14:40:56 maxv Exp $ # # new style config file for i386 architecture # @@ -74,7 +74,6 @@ file arch/i386/i386/kobj_machdep.c modul file arch/i386/i386/machdep.c file arch/i386/i386/longrun.c file arch/i386/i386/mtrr_k6.c mtrr -file arch/i386/i386/pmc.c file arch/i386/i386/process_machdep.c file arch/x86/x86/convert_xmm_s87.c file arch/i386/i386/trap.c Index: src/sys/arch/x86/conf/files.x86 diff -u src/sys/arch/x86/conf/files.x86:1.87 src/sys/arch/x86/conf/files.x86:1.88 --- src/sys/arch/x86/conf/files.x86:1.87 Sat Feb 27 00:09:45 2016 +++ src/sys/arch/x86/conf/files.x86 Fri Mar 10 14:40:56 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.x86,v 1.87 2016/02/27 00:09:45 tls Exp $ +# $NetBSD: files.x86,v 1.88 2017/03/10 14:40:56 maxv Exp $ # options for MP configuration through the MP spec defflag opt_mpbios.h MPBIOS MPVERBOSE MPDEBUG MPBIOS_SCANPCI @@ -88,6 +88,7 @@ file arch/x86/x86/patch.c machdep file arch/x86/x86/platform.c machdep file arch/x86/x86/pmap.c machdep file arch/x86/x86/pmap_tlb.c machdep +file arch/x86/x86/pmc.c machdep file arch/x86/x86/procfs_machdep.c procfs file arch/x86/x86/sys_machdep.c machdep file arch/x86/x86/syscall.c machdep Index: src/sys/arch/xen/conf/files.xen diff -u src/sys/arch/xen/conf/files.xen:1.144 src/sys/arch/xen/conf/files.xen:1.145 --- src/sys/arch/xen/conf/files.xen:1.144 Fri Feb 17 21:51:47 2017 +++ src/sys/arch/xen/conf/files.xen Fri Mar 10 14:40:56 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.xen,v 1.144 2017/02/17 21:51:47 kre Exp $ +# $NetBSD: files.xen,v 1.145 2017/03/10 14:40:56 maxv Exp $ # NetBSD: files.x86,v 1.10 2003/10/08 17:30:00 bouyer Exp # NetBSD: files.i386,v 1.254 2004/03/25 23:32:10 jmc Exp @@ -50,7 +50,6 @@ file arch/i386/i386/kobj_machdep.c modul file arch/i386/i386/machdep.c file arch/i386/i386/longrun.c file arch/i386/i386/mtrr_k6.c mtrr -file arch/i386/i386/pmc.c file arch/i386/i386/process_machdep.c file arch/i386/i386/trap.c file arch/i386/i386/lock_stubs.S @@ -141,6 +140,7 @@ file arch/xen/x86/intr.c machdep file arch/xen/x86/xen_ipi.c multiprocessor file arch/x86/x86/pmap.c machdep file arch/x86/x86/pmap_tlb.c machdep +file arch/x86/x86/pmc.c machdep file arch/x86/x86/procfs_machdep.c procfs file arch/x86/x86/sys_machdep.c machdep file arch/x86/x86/tsc.c machdep Added files: Index: src/sys/arch/x86/x86/pmc.c diff -u /dev/null src/sys/arch/x86/x86/pmc.c:1.1 --- /dev/null Fri Mar 10 14:40:56 2017 +++ src/sys/arch/x86/x86/pmc.c Fri Ma
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: maxv Date: Fri Mar 10 13:42:47 UTC 2017 Modified Files: src/sys/arch/i386/include: pmc.h Log Message: unused To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/i386/include/pmc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/pmc.h diff -u src/sys/arch/i386/include/pmc.h:1.10 src/sys/arch/i386/include/pmc.h:1.11 --- src/sys/arch/i386/include/pmc.h:1.10 Sat Feb 18 14:36:32 2017 +++ src/sys/arch/i386/include/pmc.h Fri Mar 10 13:42:47 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pmc.h,v 1.10 2017/02/18 14:36:32 maxv Exp $ */ +/* $NetBSD: pmc.h,v 1.11 2017/03/10 13:42:47 maxv Exp $ */ /*- * Copyright (c) 2000 Zembu Labs, Inc. @@ -36,24 +36,6 @@ #ifndef _I386_PMC_H_ #define _I386_PMC_H_ -#define PMC_CLASS_I586 0x1 /* i586-compatible */ -#define PMC_TYPE_I586_TSC 0x10001 /* cycle counter */ -#define PMC_TYPE_I586_PMCx 0x10002 /* performance counter */ - -#define PMC_CLASS_I686 0x2 /* i686-compatible */ -#define PMC_TYPE_I686_TSC 0x20001 /* cycle counter */ -#define PMC_TYPE_I686_PMCx 0x20002 /* performance counter */ - -#define PMC_CLASS_K7 0x3 /* K7-compatible */ -#define PMC_TYPE_K7_TSC 0x30001 /* cycle counter */ -#define PMC_TYPE_K7_PMCx 0x30002 /* performance counter */ - -/* - * Each PMC event on the x86 is associated with a processor unit. We - * encode the unit in the upper 16 bits of the event ID. - */ -#define __PMC_UNIT(x) ((x) << 16) - #if defined(_KERNEL) struct x86_pmc_info_args; struct x86_pmc_startstop_args;
CVS commit: src
Module Name:src Committed By: maxv Date: Fri Mar 10 13:09:11 UTC 2017 Modified Files: src/sys/arch/i386/i386: pmc.c src/sys/arch/x86/include: sysarch.h src/usr.bin/pmc: pmc.1 pmc.c Log Message: Switch to per-CPU PMC results, and completely rewrite the pmc(1) tool. Now the PMCs are system-wide, fine-grained and more tunable by the user. We don't do application tracking, since it would require to store the PMC values in mdproc and starting/stopping the counters on each context switch. While this doesn't seem to be particularly difficult to achieve, I don't think it is really interesting; and if someone really wants to measure the performance of an application, they can simply schedctl it to a cpu and look at the PMC results for this cpu. Note that several options are implemented but not yet used. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/i386/i386/pmc.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/x86/include/sysarch.h cvs rdiff -u -r1.9 -r1.10 src/usr.bin/pmc/pmc.1 cvs rdiff -u -r1.19 -r1.20 src/usr.bin/pmc/pmc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/i386/pmc.c diff -u src/sys/arch/i386/i386/pmc.c:1.24 src/sys/arch/i386/i386/pmc.c:1.25 --- src/sys/arch/i386/i386/pmc.c:1.24 Wed Mar 8 16:42:27 2017 +++ src/sys/arch/i386/i386/pmc.c Fri Mar 10 13:09:11 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pmc.c,v 1.24 2017/03/08 16:42:27 maxv Exp $ */ +/* $NetBSD: pmc.c,v 1.25 2017/03/10 13:09:11 maxv Exp $ */ /* * Copyright (c) 2017 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmc.c,v 1.24 2017/03/08 16:42:27 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmc.c,v 1.25 2017/03/10 13:09:11 maxv Exp $"); #include #include @@ -88,17 +88,15 @@ typedef struct { uint32_t evtmsr; /* event selector MSR */ uint64_t evtval; /* event selector value */ uint32_t ctrmsr; /* counter MSR */ - uint64_t ctrval; /* counter value */ - uint64_t tsc; + uint64_t ctrval; /* initial counter value */ } pmc_state_t; -static uint64_t pmc_val_cpus[MAXCPUS] __aligned(CACHE_LINE_SIZE); +static x86_pmc_cpuval_t pmc_val_cpus[MAXCPUS] __aligned(CACHE_LINE_SIZE); static kmutex_t pmc_lock; static pmc_state_t pmc_state[PMC_NCOUNTERS]; static int pmc_ncounters __read_mostly; static int pmc_type __read_mostly; -static int pmc_flags __read_mostly; static void pmc_read_cpu(void *arg1, void *arg2) @@ -106,29 +104,25 @@ pmc_read_cpu(void *arg1, void *arg2) pmc_state_t *pmc = (pmc_state_t *)arg1; struct cpu_info *ci = curcpu(); - pmc_val_cpus[cpu_index(ci)] = rdmsr(pmc->ctrmsr) & 0xffULL; + pmc_val_cpus[cpu_index(ci)].ctrval = + rdmsr(pmc->ctrmsr) & 0xffULL; + pmc_val_cpus[cpu_index(ci)].overfl = 0; } static void pmc_read(pmc_state_t *pmc) { uint64_t xc; - size_t i; xc = xc_broadcast(0, pmc_read_cpu, pmc, NULL); xc_wait(xc); - - pmc->ctrval = 0; - for (i = 0; i < ncpu; i++) { - /* XXX: really shitty */ - pmc->ctrval += pmc_val_cpus[i]; - } } static void pmc_apply_cpu(void *arg1, void *arg2) { pmc_state_t *pmc = (pmc_state_t *)arg1; + struct cpu_info *ci = curcpu(); wrmsr(pmc->ctrmsr, pmc->ctrval); switch (pmc_type) { @@ -142,6 +136,9 @@ pmc_apply_cpu(void *arg1, void *arg2) wrmsr(pmc->evtmsr, pmc->evtval); break; } + + pmc_val_cpus[cpu_index(ci)].ctrval = 0; + pmc_val_cpus[cpu_index(ci)].overfl = 0; } static void @@ -210,6 +207,7 @@ pmc_stop(pmc_state_t *pmc, struct x86_pm { pmc->running = false; pmc->evtval = 0; + pmc->ctrval = 0; pmc_apply(pmc); } @@ -262,9 +260,6 @@ pmc_init(void) break; } - if (pmc_type != PMC_TYPE_NONE && cpu_hascounter()) - pmc_flags |= PMC_INFO_HASTSC; - mutex_init(&pmc_lock, MUTEX_DEFAULT, IPL_NONE); } @@ -277,7 +272,7 @@ sys_pmc_info(struct lwp *l, struct x86_p rv.vers = PMC_VERSION; rv.type = pmc_type; - rv.flags = pmc_flags; + rv.nctrs = pmc_ncounters; return copyout(&rv, uargs, sizeof(rv)); } @@ -330,6 +325,7 @@ sys_pmc_read(struct lwp *l, struct x86_p { struct x86_pmc_read_args args; pmc_state_t *pmc; + size_t nval; int error; if (pmc_type == PMC_TYPE_NONE) @@ -341,20 +337,27 @@ sys_pmc_read(struct lwp *l, struct x86_p if (args.counter >= pmc_ncounters) return EINVAL; + if (args.values == NULL) + return EINVAL; + nval = MIN(ncpu, args.nval); + pmc = &pmc_state[args.counter]; mutex_enter(&pmc_lock); if (pmc->running) { pmc_read(pmc); - if (pmc_flags & PMC_INFO_HASTSC) - pmc->tsc = cpu_counter(); + error = copyout(&pmc_val_cpus, args.values, + nval * sizeof(x86_pmc_cpuval_t)); + args.nval = nval; + } else { + error = ENOENT; } - args.val = pmc->ctrval; - args.time = pmc->tsc; - mutex_exit(&pmc_lock); + if (error) + return error; + return copyout(&args, uargs, sizeof(args)); } Index: src/sys/arch/x86/include/sysarch.h diff -u src/s
CVS commit: src/libexec/ld.elf_so
Module Name:src Committed By: maya Date: Fri Mar 10 09:13:49 UTC 2017 Modified Files: src/libexec/ld.elf_so: map_object.c Log Message: Revert to version 1.55 of map_object.c. This reverts: "really unmap the gap between the text and data rather than just removing all access with mprotect(). the latter results in the kernel having to keep track of that range separately since the permissions are different. avoid calling mmap() with a size of zero." As per toolchain/52054: src/libexec/ld.elf_so update breaks everything, this commit is very broken for some people (but not others). chs mentioned he has a fix, but best not to leave -current broken in the meantime. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/libexec/ld.elf_so/map_object.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/map_object.c diff -u src/libexec/ld.elf_so/map_object.c:1.56 src/libexec/ld.elf_so/map_object.c:1.57 --- src/libexec/ld.elf_so/map_object.c:1.56 Thu Mar 9 00:43:50 2017 +++ src/libexec/ld.elf_so/map_object.c Fri Mar 10 09:13:49 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: map_object.c,v 1.56 2017/03/09 00:43:50 chs Exp $ */ +/* $NetBSD: map_object.c,v 1.57 2017/03/10 09:13:49 maya Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -34,7 +34,7 @@ #include #ifndef lint -__RCSID("$NetBSD: map_object.c,v 1.56 2017/03/09 00:43:50 chs Exp $"); +__RCSID("$NetBSD: map_object.c,v 1.57 2017/03/10 09:13:49 maya Exp $"); #endif /* not lint */ #include @@ -88,10 +88,8 @@ _rtld_map_object(const char *path, int f Elf_Off data_offset; Elf_Addr data_vaddr; Elf_Addr data_vlimit; - size_t data_size; int data_flags; caddr_t data_addr; - size_t bss_size; #if defined(__HAVE_TLS_VARIANT_I) || defined(__HAVE_TLS_VARIANT_II) Elf_Addr tls_vaddr = 0; /* Noise GCC */ #endif @@ -363,8 +361,7 @@ _rtld_map_object(const char *path, int f /* Overlay the data segment onto the proper region. */ data_addr = mapbase + (data_vaddr - base_vaddr); - data_size = data_vlimit - data_vaddr; - if (data_size != 0 && mmap(data_addr, data_size, data_flags, + if (mmap(data_addr, data_vlimit - data_vaddr, data_flags, MAP_FILE | MAP_PRIVATE | MAP_FIXED, fd, data_offset) == MAP_FAILED) { _rtld_error("mmap of data failed: %s", xstrerror(errno)); @@ -372,8 +369,7 @@ _rtld_map_object(const char *path, int f } /* Overlay the bss segment onto the proper region. */ - bss_size = base_vlimit - data_vlimit; - if (bss_size != 0 && mmap(mapbase + data_vlimit - base_vaddr, bss_size, + if (mmap(mapbase + data_vlimit - base_vaddr, base_vlimit - data_vlimit, data_flags, MAP_ANON | MAP_PRIVATE | MAP_FIXED, -1, 0) == MAP_FAILED) { _rtld_error("mmap of bss failed: %s", xstrerror(errno)); @@ -383,8 +379,8 @@ _rtld_map_object(const char *path, int f /* Unmap the gap between the text and data. */ gap_addr = mapbase + round_up(text_vlimit - base_vaddr); gap_size = data_addr - gap_addr; - if (gap_size != 0 && munmap(gap_addr, gap_size) == -1) { - _rtld_error("munmap of text -> data gap failed: %s", + if (gap_size != 0 && mprotect(gap_addr, gap_size, PROT_NONE) == -1) { + _rtld_error("mprotect of text -> data gap failed: %s", xstrerror(errno)); goto bad; }
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: martin Date: Fri Mar 10 09:12:46 UTC 2017 Modified Files: src/distrib/sets/lists/comp: mi Log Message: PR misc/52058: proc_trampoline became lwp_trampoline. Sort. To generate a diff of this commit: cvs rdiff -u -r1.2112 -r1.2113 src/distrib/sets/lists/comp/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.2112 src/distrib/sets/lists/comp/mi:1.2113 --- src/distrib/sets/lists/comp/mi:1.2112 Thu Feb 23 15:18:36 2017 +++ src/distrib/sets/lists/comp/mi Fri Mar 10 09:12:46 2017 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2112 2017/02/23 15:18:36 christos Exp $ +# $NetBSD: mi,v 1.2113 2017/03/10 09:12:46 martin Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.compcomp-sys-root @@ -2350,8 +2350,8 @@ ./usr/include/netinet6/in6.h comp-c-include ./usr/include/netinet6/in6_gif.h comp-c-include ./usr/include/netinet6/in6_ifattach.h comp-c-include -./usr/include/netinet6/in6_pcb.h comp-c-include ./usr/include/netinet6/in6_l2tp.h comp-c-include +./usr/include/netinet6/in6_pcb.h comp-c-include ./usr/include/netinet6/in6_var.h comp-c-include ./usr/include/netinet6/ip6.h comp-obsolete obsolete ./usr/include/netinet6/ip6_mroute.h comp-c-include @@ -3104,8 +3104,8 @@ ./usr/include/uvm/uvm_pager_i.h comp-obsolete obsolete ./usr/include/uvm/uvm_param.h comp-c-include ./usr/include/uvm/uvm_pdaemon.h comp-c-include -./usr/include/uvm/uvm_physseg.h comp-obsolete obsolete ./usr/include/uvm/uvm_pglist.h comp-c-include +./usr/include/uvm/uvm_physseg.h comp-obsolete obsolete ./usr/include/uvm/uvm_pmap.h comp-c-include ./usr/include/uvm/uvm_prot.h comp-c-include ./usr/include/uvm/uvm_stat.h comp-c-include @@ -9021,12 +9021,13 @@ ./usr/share/man/cat3/sl_find.0 comp-c-catman .cat ./usr/share/man/cat3/sl_free.0 comp-c-catman .cat ./usr/share/man/cat3/sl_init.0 comp-c-catman .cat -./usr/share/man/cat3/slk_attroff.0 comp-c-catman .cat +./usr/share/man/cat3/sleep.0 comp-c-catman .cat ./usr/share/man/cat3/slk_attr_off.0 comp-c-catman .cat -./usr/share/man/cat3/slk_attron.0 comp-c-catman .cat ./usr/share/man/cat3/slk_attr_on.0 comp-c-catman .cat -./usr/share/man/cat3/slk_attrset.0 comp-c-catman .cat ./usr/share/man/cat3/slk_attr_set.0 comp-c-catman .cat +./usr/share/man/cat3/slk_attroff.0 comp-c-catman .cat +./usr/share/man/cat3/slk_attron.0 comp-c-catman .cat +./usr/share/man/cat3/slk_attrset.0 comp-c-catman .cat ./usr/share/man/cat3/slk_clear.0 comp-c-catman .cat ./usr/share/man/cat3/slk_color.0 comp-c-catman .cat ./usr/share/man/cat3/slk_init.0 comp-c-catman .cat @@ -9037,7 +9038,6 @@ ./usr/share/man/cat3/slk_set.0 comp-c-catman .cat ./usr/share/man/cat3/slk_touch.0 comp-c-catman .cat ./usr/share/man/cat3/slk_wset.0 comp-c-catman .cat -./usr/share/man/cat3/sleep.0 comp-c-catman .cat ./usr/share/man/cat3/snprintb.0 comp-c-catman .cat ./usr/share/man/cat3/snprintb_m.0 comp-c-catman .cat ./usr/share/man/cat3/snprintf.0 comp-c-catman .cat @@ -9534,13 +9534,13 @@ ./usr/share/man/cat3/unsetenv.0 comp-c-catman .cat ./usr/share/man/cat3/untouchwin.0 comp-c-catman .cat ./usr/share/man/cat3/unvis.0 comp-c-catman .cat -./usr/share/man/cat3/use_env.0 comp-c-catman .cat ./usr/share/man/cat3/update_panels.0 comp-c-catman .cat ./usr/share/man/cat3/updlastlogx.0 comp-c-catman .cat ./usr/share/man/cat3/updwtmpx.0 comp-c-catman .cat ./usr/share/man/cat3/usb.0 comp-obsolete obsolete ./usr/share/man/cat3/usbhid.0 comp-c-catman .cat ./usr/share/man/cat3/use_default_colors.0 comp-c-catman .cat +./usr/share/man/cat3/use_env.0 comp-c-catman .cat ./usr/share/man/cat3/user_from_uid.0 comp-c-catman .cat ./usr/share/man/cat3/usleep.0 comp-c-catman .cat ./usr/share/man/cat3/util.0 comp-c-catman .cat @@ -10563,10 +10563,10 @@ ./usr/share/man/cat9/kmem.0 comp-sys-catman .cat ./usr/share/man/cat9/kmem_alloc.0 comp-sys-catman .cat ./usr/share/man/cat9/kmem_asprintf.0 comp-sys-catman .cat +./usr/share/man/cat9/kmem_free.0 comp-sys-catman .cat ./usr/share/man/cat9/kmem_intr_alloc.0 comp-sys-catman .cat ./usr/share/man/cat9/kmem_intr_free.0 comp-sys-catman .cat ./usr/share/man/cat9/kmem_intr_zalloc.0 comp-sys-catman .cat -./usr/share/man/cat9/kmem_free.0 comp-sys-catman .cat ./usr/share/man/cat9/kmem_zalloc.0 comp-sys-catman .cat ./usr/share/man/cat9/knote.0 comp-sys-catman .cat ./usr/share/man/cat9/kpause.0 comp-sys-catman .cat @@ -10602,6 +10602,7 @@ ./usr/share/man/cat9/longjmp.0 comp-sys-catman .cat ./usr/share/man/cat9/lookup.0 comp-sys-catman .cat ./usr/share/man/cat9/ltsleep.0 comp-sys-catman .cat +./usr/share/man/cat9/lwp_trampoline.0 comp-sys-catman .cat ./usr/share/man/cat9/m_adj.0 comp-sys-
CVS commit: src/share/man/man9
Module Name:src Committed By: martin Date: Fri Mar 10 09:08:47 UTC 2017 Modified Files: src/share/man/man9: Makefile cpu_lwp_fork.9 Log Message: PR misc/52058: replace all proc_trampoline with lwp_trampoline belatedly. To generate a diff of this commit: cvs rdiff -u -r1.402 -r1.403 src/share/man/man9/Makefile cvs rdiff -u -r1.4 -r1.5 src/share/man/man9/cpu_lwp_fork.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/Makefile diff -u src/share/man/man9/Makefile:1.402 src/share/man/man9/Makefile:1.403 --- src/share/man/man9/Makefile:1.402 Wed Feb 22 09:20:39 2017 +++ src/share/man/man9/Makefile Fri Mar 10 09:08:47 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.402 2017/02/22 09:20:39 msaitoh Exp $ +# $NetBSD: Makefile,v 1.403 2017/03/10 09:08:47 martin Exp $ # Makefile for section 9 (kernel function and variable) manual pages. @@ -258,7 +258,7 @@ MLINKS+=copy.9 copyin.9 copy.9 copyout.9 copy.9 ioctl_copyin.9 copy.9 ioctl_copyout.9 MLINKS+=cpu_dumpconf.9 cpu_dump.9 cpu_dumpconf.9 cpu_dumpsize.9 \ cpu_dumpconf.9 dumpsys.9 -MLINKS+=cpu_lwp_fork.9 child_return.9 cpu_lwp_fork.9 proc_trampoline.9 +MLINKS+=cpu_lwp_fork.9 child_return.9 cpu_lwp_fork.9 lwp_trampoline.9 MLINKS+=cpu_rootconf.9 setroot.9 \ cpu_rootconf.9 rootconf.9 MLINKS+=cpufreq.9 cpufreq_register.9 \ Index: src/share/man/man9/cpu_lwp_fork.9 diff -u src/share/man/man9/cpu_lwp_fork.9:1.4 src/share/man/man9/cpu_lwp_fork.9:1.5 --- src/share/man/man9/cpu_lwp_fork.9:1.4 Tue Apr 13 05:41:53 2010 +++ src/share/man/man9/cpu_lwp_fork.9 Fri Mar 10 09:08:47 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: cpu_lwp_fork.9,v 1.4 2010/04/13 05:41:53 jruoho Exp $ +.\" $NetBSD: cpu_lwp_fork.9,v 1.5 2017/03/10 09:08:47 martin Exp $ .\" .\" Copyright (c) 2002, 2005, 2006 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -33,7 +33,7 @@ .Sh NAME .Nm cpu_lwp_fork , .Nm child_return , -.Nm proc_trampoline +.Nm lwp_trampoline .Nd finish a fork operation .Sh SYNOPSIS .In sys/proc.h @@ -55,8 +55,8 @@ making the child ready to run. .Pp .Fn cpu_lwp_fork rigs the child's kernel stack so that it will start in -.Fn proc_trampoline . -.Fn proc_trampoline +.Fn lwp_trampoline . +.Fn lwp_trampoline does not have a normal calling sequence and is entered by .Fn cpu_switch . If an alternate user-level stack is requested (with non-zero values @@ -69,7 +69,7 @@ arguments), the user stack pointer is se After being entered by .Fn cpu_switch and while running in user context (within the kernel) -.Fn proc_trampoline +.Fn lwp_trampoline will invoke the function .Fa func with the argument