CVS commit: src/sys/compat/irix
Module Name:src Committed By: dholland Date: Mon Feb 15 09:39:01 UTC 2010 Modified Files: src/sys/compat/irix: irix_signal.c Log Message: typo in comment To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/compat/irix/irix_signal.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/compat/irix/irix_signal.c diff -u src/sys/compat/irix/irix_signal.c:1.53 src/sys/compat/irix/irix_signal.c:1.54 --- src/sys/compat/irix/irix_signal.c:1.53 Mon Dec 14 00:47:10 2009 +++ src/sys/compat/irix/irix_signal.c Mon Feb 15 09:39:00 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: irix_signal.c,v 1.53 2009/12/14 00:47:10 matt Exp $ */ +/* $NetBSD: irix_signal.c,v 1.54 2010/02/15 09:39:00 dholland Exp $ */ /*- * Copyright (c) 1994, 2001-2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: irix_signal.c,v 1.53 2009/12/14 00:47:10 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: irix_signal.c,v 1.54 2010/02/15 09:39:00 dholland Exp $); #include sys/types.h #include sys/signal.h @@ -397,7 +397,7 @@ scp-isc_cause = f-f_regs[_R_CAUSE]; /* - * Save the floating-pointstate, if necessary, then copy it. + * Save the floating-point state, if necessary, then copy it. */ pcb = lwp_getpcb(l); #ifndef SOFTFLOAT @@ -449,7 +449,7 @@ ucp-iuc_mcontext.svr4___gregs[IRIX_CTX_CAUSE] = f-f_regs[_R_CAUSE]; /* - * Save the floating-pointstate, if necessary, then copy it. + * Save the floating-point state, if necessary, then copy it. */ pcb = lwp_getpcb(l); #ifndef SOFTFLOAT
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: mrg Date: Mon Feb 15 09:56:34 UTC 2010 Modified Files: src/sys/arch/sparc64/sparc64: locore.s Log Message: use TLB_SIZE_SPITFIRE in a couple of places, and note that the {print,dump}_[id]tlb() versions are currently spitfire specific. To generate a diff of this commit: cvs rdiff -u -r1.314 -r1.315 src/sys/arch/sparc64/sparc64/locore.s 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/sparc64/sparc64/locore.s diff -u src/sys/arch/sparc64/sparc64/locore.s:1.314 src/sys/arch/sparc64/sparc64/locore.s:1.315 --- src/sys/arch/sparc64/sparc64/locore.s:1.314 Mon Feb 15 07:56:51 2010 +++ src/sys/arch/sparc64/sparc64/locore.s Mon Feb 15 09:56:33 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.314 2010/02/15 07:56:51 mrg Exp $ */ +/* $NetBSD: locore.s,v 1.315 2010/02/15 09:56:33 mrg Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath @@ -4360,7 +4360,7 @@ ENTRY_NOPROFILE(dump_dtlb) clr %o1 - add %o1, (64 * 8), %o3 + add %o1, (64 * 8), %o3 ! XXX TLB_SIZE 1: ldxa [%o1] ASI_DMMU_TLB_TAG, %o2 membar #Sync @@ -4381,7 +4381,7 @@ ENTRY_NOPROFILE(dump_itlb) clr %o1 - add %o1, (64 * 8), %o3 + add %o1, (64 * 8), %o3 ! XXX TLB_SIZE 1: ldxa [%o1] ASI_IMMU_TLB_TAG, %o2 membar #Sync @@ -4404,7 +4404,7 @@ ENTRY_NOPROFILE(print_dtlb) save %sp, -CC64FSZ, %sp clr %l1 - add %l1, (64 * 8), %l3 + add %l1, (64 * 8), %l3 ! XXX TLB_SIZE clr %l2 1: ldxa [%l1] ASI_DMMU_TLB_TAG, %o2 @@ -4438,7 +4438,7 @@ ENTRY_NOPROFILE(print_itlb) save %sp, -CC64FSZ, %sp clr %l1 - add %l1, (64 * 8), %l3 + add %l1, (64 * 8), %l3 ! XXX TLB_SIZE clr %l2 1: ldxa [%l1] ASI_IMMU_TLB_TAG, %o2 @@ -4478,7 +4478,7 @@ ENTRY_NOPROFILE(print_dtlb) save %sp, -CC64FSZ, %sp clr %l1 - add %l1, (64 * 8), %l3 + add %l1, (64 * 8), %l3 ! XXX TLB_SIZE clr %l2 1: ldxa [%l1] ASI_DMMU_TLB_TAG, %o2 @@ -4519,7 +4519,7 @@ ENTRY_NOPROFILE(print_itlb) save %sp, -CC64FSZ, %sp clr %l1 - add %l1, (64 * 8), %l3 + add %l1, (64 * 8), %l3 ! XXX TLB_SIZE clr %l2 1: ldxa [%l1] ASI_IMMU_TLB_TAG, %o2 @@ -5207,7 +5207,7 @@ rdpr %pstate, %o3 andn %o3, PSTATE_IE, %o4 ! disable interrupts wrpr %o4, 0, %pstate - set (63 * 8), %o0! last TLB entry + set ((TLB_SIZE_SPITFIRE-1) * 8), %o0 set CTX_SECONDARY, %o4 ldxa [%o4] ASI_DMMU, %o4 ! save secondary context set CTX_MASK, %o5 @@ -5242,7 +5242,7 @@ * now do the IMMU */ - set (63 * 8), %o0! last TLB entry + set ((TLB_SIZE_SPITFIRE-1) * 8), %o0 0: ldxa [%o0] ASI_IMMU_TLB_TAG, %o2 ! fetch the TLB tag
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: nakayama Date: Mon Feb 15 11:46:54 UTC 2010 Modified Files: src/sys/arch/sparc64/sparc64: locore.s Log Message: Fix linker error of GENERIC32 kernel. To generate a diff of this commit: cvs rdiff -u -r1.315 -r1.316 src/sys/arch/sparc64/sparc64/locore.s 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/sparc64/sparc64/locore.s diff -u src/sys/arch/sparc64/sparc64/locore.s:1.315 src/sys/arch/sparc64/sparc64/locore.s:1.316 --- src/sys/arch/sparc64/sparc64/locore.s:1.315 Mon Feb 15 09:56:33 2010 +++ src/sys/arch/sparc64/sparc64/locore.s Mon Feb 15 11:46:54 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.315 2010/02/15 09:56:33 mrg Exp $ */ +/* $NetBSD: locore.s,v 1.316 2010/02/15 11:46:54 nakayama Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath @@ -9709,13 +9709,13 @@ .globl _C_LABEL(dlflush_start) _C_LABEL(dlflush_start): - .xword dlflush1 - .xword dlflush2 - .xword dlflush3 - .xword dlflush4 - .xword 0 + POINTER dlflush1 + POINTER dlflush2 + POINTER dlflush3 + POINTER dlflush4 + POINTER 0 .globl _C_LABEL(nop_on_us_1_start) _C_LABEL(nop_on_us_1_start): - .xword nop_on_us_1 - .xword 0 + POINTER nop_on_us_1 + POINTER 0
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: mrg Date: Mon Feb 15 12:46:24 UTC 2010 Modified Files: src/sys/arch/sparc64/sparc64: locore.s Log Message: - don't flush 32-bit entries for 64-bit code, it does not seem to be necessary. #define TLB_FLUSH_LOWVA to turn it back on. - remove the #if 0'd code in sparc64_ipi_flush_pte_usiii(), i have verified that it is not required. - add a missing membar #Sync to sp_tlb_flush_pte_usiii(). To generate a diff of this commit: cvs rdiff -u -r1.316 -r1.317 src/sys/arch/sparc64/sparc64/locore.s 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/sparc64/sparc64/locore.s diff -u src/sys/arch/sparc64/sparc64/locore.s:1.316 src/sys/arch/sparc64/sparc64/locore.s:1.317 --- src/sys/arch/sparc64/sparc64/locore.s:1.316 Mon Feb 15 11:46:54 2010 +++ src/sys/arch/sparc64/sparc64/locore.s Mon Feb 15 12:46:24 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.316 2010/02/15 11:46:54 nakayama Exp $ */ +/* $NetBSD: locore.s,v 1.317 2010/02/15 12:46:24 mrg Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath @@ -65,6 +65,7 @@ #undef NO_TSB /* Don't use TSB */ #define USE_BLOCK_STORE_LOAD /* enable block load/store ops */ #define BB_ERRATA_1 /* writes to TICK_CMPR may fail */ +#undef TLB_FLUSH_LOWVA /* also flush 32-bit entries from the MMU */ #include opt_ddb.h #include opt_kgdb.h @@ -3501,10 +3502,12 @@ stx r1, [r2 + %lo(CPUINFO_VA+CI_IPIEVC+EVC_SIZE*n)] /* - * IPI handler to flush single pte. * void sparc64_ipi_flush_pte_us(void *); * void sparc64_ipi_flush_pte_usiii(void *); * + * IPI handler to flush single pte. We enter here with %tl already 1 + * and PSTATE_IE already disabled, so there's no need to do it again. + * * On entry: * %g2 = vaddr_t va * %g3 = int ctx @@ -3521,7 +3524,7 @@ or %g2, DEMAP_PAGE_SECONDARY, %g2 ! Demap page from secondary context only stxa %g2, [%g2] ASI_DMMU_DEMAP ! Do the demap stxa %g2, [%g2] ASI_IMMU_DEMAP ! to both TLBs -#ifdef _LP64 +#ifdef TLB_FLUSH_LOWVA srl %g2, 0, %g2 ! and make sure it's both 32- and 64-bit entries stxa %g2, [%g2] ASI_DMMU_DEMAP ! Do the demap stxa %g2, [%g2] ASI_IMMU_DEMAP ! Do the demap @@ -3535,17 +3538,6 @@ nop ENTRY(sparc64_ipi_flush_pte_usiii) -#if 0 - rdpr %pstate, %g1 - andn %g1, PSTATE_IE, %g4 - wrpr %g4, %pstate - - rdpr %tl, %g4 - brnz %g4, 1f - add %g4, 1, %g5 - wrpr %g5, %tl -1: -#endif andn %g2, 0xfff, %g2 ! drop unused va bits mov CTX_PRIMARY, %g5 ldxa [%g5] ASI_DMMU, %g6 ! Save primary context @@ -3556,7 +3548,7 @@ or %g2, DEMAP_PAGE_PRIMARY, %g2 stxa %g2, [%g2] ASI_DMMU_DEMAP ! Do the demap stxa %g2, [%g2] ASI_IMMU_DEMAP ! to both TLBs -#ifdef _LP64 +#ifdef TLB_FLUSH_LOWVA srl %g2, 0, %g2 ! and make sure it's both 32- and 64-bit entries stxa %g2, [%g2] ASI_DMMU_DEMAP ! Do the demap stxa %g2, [%g2] ASI_IMMU_DEMAP ! Do the demap @@ -3568,11 +3560,6 @@ flush %g7 IPIEVC_INC(IPI_EVCNT_TLB_PTE,%g2,%g3) -#if 0 - wrpr %g4, %tl - wrpr %g1, %pstate -#endif - ba,a ret_from_intr_vector nop @@ -5114,7 +5101,7 @@ or %o0, DEMAP_PAGE_SECONDARY, %o0 ! Demap page from secondary context only stxa %o0, [%o0] ASI_DMMU_DEMAP ! Do the demap stxa %o0, [%o0] ASI_IMMU_DEMAP ! to both TLBs -#ifdef _LP64 +#ifdef TLB_FLUSH_LOWVA srl %o0, 0, %o0! and make sure it's both 32- and 64-bit entries stxa %o0, [%o0] ASI_DMMU_DEMAP ! Do the demap stxa %o0, [%o0] ASI_IMMU_DEMAP ! Do the demap @@ -5181,13 +5168,14 @@ or %o0, DEMAP_PAGE_PRIMARY, %o0 stxa %o0, [%o0] ASI_DMMU_DEMAP ! Do the demap stxa %o0, [%o0] ASI_IMMU_DEMAP ! to both TLBs -#ifdef _LP64 +#ifdef TLB_FLUSH_LOWVA srl %o0, 0, %o0! and make sure it's both 32- and 64-bit entries stxa %o0, [%o0] ASI_DMMU_DEMAP ! Do the demap stxa %o0, [%o0] ASI_IMMU_DEMAP ! Do the demap #endif flush %o1 stxa %o5, [%o2] ASI_DMMU ! Restore primary context + membar #Sync brnz,pt %o3, 1f flush %o1 wrpr %g0, %o3, %tl! Return to kernel mode.
CVS commit: [netbsd-5] src/sys/arch
Module Name:src Committed By: sborrill Date: Mon Feb 15 18:04:11 UTC 2010 Modified Files: src/sys/arch/amd64/conf [netbsd-5]: XEN3_DOM0 XEN3_DOMU src/sys/arch/i386/conf [netbsd-5]: XEN2_DOM0 XEN2_DOMU Log Message: Pull up the following revisions(s) (requested by tron in ticket #1306): sys/arch/i386/conf/XEN2_DOM0patch sys/arch/i386/conf/XEN2_DOMUpatch sys/arch/amd64/conf/XEN3_DOM0 patch sys/arch/amd64/conf/XEN3_DOM0 patch Enable cgd(4) support on all amd64 and i386 XEN kernels. To generate a diff of this commit: cvs rdiff -u -r1.33.4.3 -r1.33.4.4 src/sys/arch/amd64/conf/XEN3_DOM0 cvs rdiff -u -r1.13.4.1 -r1.13.4.2 src/sys/arch/amd64/conf/XEN3_DOMU cvs rdiff -u -r1.53.2.3 -r1.53.2.4 src/sys/arch/i386/conf/XEN2_DOM0 cvs rdiff -u -r1.19.4.1 -r1.19.4.2 src/sys/arch/i386/conf/XEN2_DOMU 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/conf/XEN3_DOM0 diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.33.4.3 src/sys/arch/amd64/conf/XEN3_DOM0:1.33.4.4 --- src/sys/arch/amd64/conf/XEN3_DOM0:1.33.4.3 Sat Oct 3 23:57:54 2009 +++ src/sys/arch/amd64/conf/XEN3_DOM0 Mon Feb 15 18:04:11 2010 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOM0,v 1.33.4.3 2009/10/03 23:57:54 snj Exp $ +# $NetBSD: XEN3_DOM0,v 1.33.4.4 2010/02/15 18:04:11 sborrill Exp $ include arch/amd64/conf/std.xen @@ -742,7 +742,7 @@ # disk/mass storage pseudo-devices pseudo-device bio # RAID control device driver pseudo-device ccd 4 # concatenated/striped disk devices -#pseudo-device cgd 4 # cryptographic disk devices +pseudo-device cgd 4 # cryptographic disk devices pseudo-device raid 8 # RAIDframe disk driver options RAID_AUTOCONFIG # auto-configuration of RAID components # Options to enable various other RAIDframe RAID types. Index: src/sys/arch/amd64/conf/XEN3_DOMU diff -u src/sys/arch/amd64/conf/XEN3_DOMU:1.13.4.1 src/sys/arch/amd64/conf/XEN3_DOMU:1.13.4.2 --- src/sys/arch/amd64/conf/XEN3_DOMU:1.13.4.1 Sat Oct 3 23:55:43 2009 +++ src/sys/arch/amd64/conf/XEN3_DOMU Mon Feb 15 18:04:11 2010 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOMU,v 1.13.4.1 2009/10/03 23:55:43 snj Exp $ +# $NetBSD: XEN3_DOMU,v 1.13.4.2 2010/02/15 18:04:11 sborrill Exp $ include arch/amd64/conf/std.xen @@ -177,7 +177,7 @@ # disk/mass storage pseudo-devices pseudo-device ccd 4 # concatenated/striped disk devices -#pseudo-device cgd 4 # cryptographic disk devices +pseudo-device cgd 4 # cryptographic disk devices pseudo-device raid 8 # RAIDframe disk driver options RAID_AUTOCONFIG # auto-configuration of RAID components # Options to enable various other RAIDframe RAID types. Index: src/sys/arch/i386/conf/XEN2_DOM0 diff -u src/sys/arch/i386/conf/XEN2_DOM0:1.53.2.3 src/sys/arch/i386/conf/XEN2_DOM0:1.53.2.4 --- src/sys/arch/i386/conf/XEN2_DOM0:1.53.2.3 Sat Sep 26 19:52:09 2009 +++ src/sys/arch/i386/conf/XEN2_DOM0 Mon Feb 15 18:04:11 2010 @@ -1,4 +1,4 @@ -# $NetBSD: XEN2_DOM0,v 1.53.2.3 2009/09/26 19:52:09 snj Exp $ +# $NetBSD: XEN2_DOM0,v 1.53.2.4 2010/02/15 18:04:11 sborrill Exp $ include arch/xen/conf/std.xen @@ -712,7 +712,7 @@ # disk/mass storage pseudo-devices pseudo-device bio # RAID control device driver pseudo-device ccd 4 # concatenated/striped disk devices -#pseudo-device cgd 4 # cryptographic disk devices +pseudo-device cgd 4 # cryptographic disk devices pseudo-device raid 8 # RAIDframe disk driver options RAID_AUTOCONFIG # auto-configuration of RAID components # Options to enable various other RAIDframe RAID types. Index: src/sys/arch/i386/conf/XEN2_DOMU diff -u src/sys/arch/i386/conf/XEN2_DOMU:1.19.4.1 src/sys/arch/i386/conf/XEN2_DOMU:1.19.4.2 --- src/sys/arch/i386/conf/XEN2_DOMU:1.19.4.1 Tue Nov 18 01:56:59 2008 +++ src/sys/arch/i386/conf/XEN2_DOMU Mon Feb 15 18:04:11 2010 @@ -1,4 +1,4 @@ -# $NetBSD: XEN2_DOMU,v 1.19.4.1 2008/11/18 01:56:59 snj Exp $ +# $NetBSD: XEN2_DOMU,v 1.19.4.2 2010/02/15 18:04:11 sborrill Exp $ include arch/xen/conf/std.xen @@ -187,7 +187,7 @@ # disk/mass storage pseudo-devices pseudo-device ccd 4 # concatenated/striped disk devices -#pseudo-device cgd 4 # cryptographic disk devices +pseudo-device cgd 4 # cryptographic disk devices pseudo-device raid 8 # RAIDframe disk driver options RAID_AUTOCONFIG # auto-configuration of RAID components # Options to enable various other RAIDframe RAID types.
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: sborrill Date: Mon Feb 15 18:04:38 UTC 2010 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Ticket 1306 To generate a diff of this commit: cvs rdiff -u -r1.1.2.196 -r1.1.2.197 src/doc/CHANGES-5.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-5.1 diff -u src/doc/CHANGES-5.1:1.1.2.196 src/doc/CHANGES-5.1:1.1.2.197 --- src/doc/CHANGES-5.1:1.1.2.196 Sun Feb 14 14:05:54 2010 +++ src/doc/CHANGES-5.1 Mon Feb 15 18:04:37 2010 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.196 2010/02/14 14:05:54 bouyer Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.197 2010/02/15 18:04:37 sborrill Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -16756,3 +16756,11 @@ Bump the size of the pmax instkernel ramdisk to 2200k. [snj, ticket #1305] +sys/arch/i386/conf/XEN2_DOM0 patch +sys/arch/i386/conf/XEN2_DOMU patch +sys/arch/amd64/conf/XEN3_DOM0 patch +sys/arch/amd64/conf/XEN3_DOM0 patch + + Enable cgd(4) support on all amd64 and i386 XEN kernels. + [tron, ticket #1306] +
CVS commit: src/sys
Module Name:src Committed By: dyoung Date: Mon Feb 15 20:20:34 UTC 2010 Modified Files: src/sys/kern: subr_autoconf.c src/sys/sys: device.h Log Message: Extract a subroutine, const char *cfdata_ifattr(cfdata_t cf), that returns the name of the interface attribute that associates cf with its parent. Use cfdata_ifattr() at several sites in the autoconf code. To generate a diff of this commit: cvs rdiff -u -r1.200 -r1.201 src/sys/kern/subr_autoconf.c cvs rdiff -u -r1.133 -r1.134 src/sys/sys/device.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/kern/subr_autoconf.c diff -u src/sys/kern/subr_autoconf.c:1.200 src/sys/kern/subr_autoconf.c:1.201 --- src/sys/kern/subr_autoconf.c:1.200 Sun Jan 31 15:10:12 2010 +++ src/sys/kern/subr_autoconf.c Mon Feb 15 20:20:34 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_autoconf.c,v 1.200 2010/01/31 15:10:12 pooka Exp $ */ +/* $NetBSD: subr_autoconf.c,v 1.201 2010/02/15 20:20:34 dyoung Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -77,7 +77,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: subr_autoconf.c,v 1.200 2010/01/31 15:10:12 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: subr_autoconf.c,v 1.201 2010/02/15 20:20:34 dyoung Exp $); #ifdef _KERNEL_OPT #include opt_ddb.h @@ -537,7 +537,7 @@ const struct cflocdesc *cl; int nlocs, i; - ci = cfiattr_lookup(cf-cf_pspec-cfp_iattr, parent-dv_cfdriver); + ci = cfiattr_lookup(cfdata_ifattr(cf), parent-dv_cfdriver); KASSERT(ci); nlocs = ci-ci_loclen; KASSERT(!nlocs || locs); @@ -669,7 +669,7 @@ continue; (*d-dv_cfattach-ca_rescan)(d, -cf1-cf_pspec-cfp_iattr, cf1-cf_loc); +cfdata_ifattr(cf1), cf1-cf_loc); } } deviter_release(di); @@ -817,7 +817,7 @@ * consider only children which attach to * that attribute. */ - if (ifattr !STREQ(ifattr, cf-cf_pspec-cfp_iattr)) + if (ifattr !STREQ(ifattr, cfdata_ifattr(cf))) continue; if (cfparent_match(parent, cf-cf_pspec)) @@ -1220,8 +1220,7 @@ dev-dv_flags |= ca-ca_flags; /* inherit flags from class */ if (locs) { KASSERT(parent); /* no locators at root */ - ia = cfiattr_lookup(cf-cf_pspec-cfp_iattr, -parent-dv_cfdriver); + ia = cfiattr_lookup(cfdata_ifattr(cf), parent-dv_cfdriver); dev-dv_locators = kmem_alloc(sizeof(int [ia-ci_loclen + 1]), KM_SLEEP); *dev-dv_locators++ = sizeof(int [ia-ci_loclen + 1]); @@ -2587,6 +2586,12 @@ config_alldevs_unlock(s); } +const char * +cfdata_ifattr(const struct cfdata *cf) +{ + return cf-cf_pspec-cfp_iattr; +} + bool ifattr_match(const char *snull, const char *t) { Index: src/sys/sys/device.h diff -u src/sys/sys/device.h:1.133 src/sys/sys/device.h:1.134 --- src/sys/sys/device.h:1.133 Sat Jan 30 11:57:18 2010 +++ src/sys/sys/device.h Mon Feb 15 20:20:34 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: device.h,v 1.133 2010/01/30 11:57:18 mlelstv Exp $ */ +/* $NetBSD: device.h,v 1.134 2010/02/15 20:20:34 dyoung Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -446,6 +446,8 @@ struct cfattach *config_cfattach_lookup(const char *, const char *); const struct cfiattrdata *cfiattr_lookup(const char *, const struct cfdriver *); +const char *cfdata_ifattr(const struct cfdata *); + int config_stdsubmatch(device_t, cfdata_t, const int *, void *); cfdata_t config_search_loc(cfsubmatch_t, device_t, const char *, const int *, void *);
CVS commit: src/sys
Module Name:src Committed By: pgoyette Date: Mon Feb 15 22:32:04 UTC 2010 Modified Files: src/sys/dev/sysmon: sysmon_envsys.c sysmon_envsys_events.c sysmon_power.c src/sys/sys: envsys.h power.h Log Message: For symmetry, allow warning and critical upper-limits for capacity sensors. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/sys/dev/sysmon/sysmon_envsys.c cvs rdiff -u -r1.83 -r1.84 src/sys/dev/sysmon/sysmon_envsys_events.c cvs rdiff -u -r1.42 -r1.43 src/sys/dev/sysmon/sysmon_power.c cvs rdiff -u -r1.29 -r1.30 src/sys/sys/envsys.h cvs rdiff -u -r1.14 -r1.15 src/sys/sys/power.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/dev/sysmon/sysmon_envsys.c diff -u src/sys/dev/sysmon/sysmon_envsys.c:1.95 src/sys/dev/sysmon/sysmon_envsys.c:1.96 --- src/sys/dev/sysmon/sysmon_envsys.c:1.95 Sun Feb 14 23:06:01 2010 +++ src/sys/dev/sysmon/sysmon_envsys.c Mon Feb 15 22:32:04 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_envsys.c,v 1.95 2010/02/14 23:06:01 pgoyette Exp $ */ +/* $NetBSD: sysmon_envsys.c,v 1.96 2010/02/15 22:32:04 pgoyette Exp $ */ /*- * Copyright (c) 2007, 2008 Juan Romero Pardines. @@ -64,7 +64,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sysmon_envsys.c,v 1.95 2010/02/14 23:06:01 pgoyette Exp $); +__KERNEL_RCSID(0, $NetBSD: sysmon_envsys.c,v 1.96 2010/02/15 22:32:04 pgoyette Exp $); #include sys/param.h #include sys/types.h @@ -1061,6 +1061,18 @@ warning-capacity); ptype = PENVSYS_EVENT_CAPACITY; } + + if (edata-upropset PROP_BATTHIGH) { +prop_dictionary_remove(sdict, +high-capacity); +ptype = PENVSYS_EVENT_CAPACITY; + } + + if (edata-upropset PROP_BATTMAX) { +prop_dictionary_remove(sdict, +maximum-capacity); +ptype = PENVSYS_EVENT_CAPACITY; + } if (ptype != 0) sme_event_unregister(sme, edata-desc, ptype); @@ -1875,6 +1887,26 @@ } /* + * did the user want to set a high capacity event? + */ + obj2 = prop_dictionary_get(udict, high-capacity); + if (obj2 prop_object_type(obj2) == PROP_TYPE_NUMBER) { + targetfound = true; + lims.sel_warnmin = prop_number_integer_value(obj2); + props |= PROP_BATTHIGH; + } + + /* + * did the user want to set a maximum capacity event? + */ + obj2 = prop_dictionary_get(udict, maximum-capacity); + if (obj2 prop_object_type(obj2) == PROP_TYPE_NUMBER) { + targetfound = true; + lims.sel_warnmin = prop_number_integer_value(obj2); + props |= PROP_BATTMAX; + } + + /* * did the user want to set a critical max event? */ obj2 = prop_dictionary_get(udict, critical-max); Index: src/sys/dev/sysmon/sysmon_envsys_events.c diff -u src/sys/dev/sysmon/sysmon_envsys_events.c:1.83 src/sys/dev/sysmon/sysmon_envsys_events.c:1.84 --- src/sys/dev/sysmon/sysmon_envsys_events.c:1.83 Sun Feb 14 23:30:52 2010 +++ src/sys/dev/sysmon/sysmon_envsys_events.c Mon Feb 15 22:32:04 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_envsys_events.c,v 1.83 2010/02/14 23:30:52 pgoyette Exp $ */ +/* $NetBSD: sysmon_envsys_events.c,v 1.84 2010/02/15 22:32:04 pgoyette Exp $ */ /*- * Copyright (c) 2007, 2008 Juan Romero Pardines. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sysmon_envsys_events.c,v 1.83 2010/02/14 23:30:52 pgoyette Exp $); +__KERNEL_RCSID(0, $NetBSD: sysmon_envsys_events.c,v 1.84 2010/02/15 22:32:04 pgoyette Exp $); #include sys/param.h #include sys/types.h @@ -63,6 +63,8 @@ { ENVSYS_BATTERY_CAPACITY_NORMAL, PENVSYS_EVENT_NORMAL }, { ENVSYS_BATTERY_CAPACITY_WARNING, PENVSYS_EVENT_BATT_WARN }, { ENVSYS_BATTERY_CAPACITY_CRITICAL, PENVSYS_EVENT_BATT_CRIT }, + { ENVSYS_BATTERY_CAPACITY_HIGH, PENVSYS_EVENT_BATT_HIGH }, + { ENVSYS_BATTERY_CAPACITY_MAX, PENVSYS_EVENT_BATT_MAX }, { -1, -1 } }; @@ -137,19 +139,19 @@ __func__, sme-sme_name, edata-desc, crittype)); see = osee; - if (props PROP_CRITMAX) { + if (props (PROP_CRITMAX | PROP_BATTMAX)) { if (lims-sel_critmax == edata-limits.sel_critmax) { DPRINTF((%s: type=%d (critmax exists)\n, __func__, crittype)); error = EEXIST; -props = ~PROP_CRITMAX; +props = ~(PROP_CRITMAX | PROP_BATTMAX); } } - if (props PROP_WARNMAX) { + if (props (PROP_WARNMAX | PROP_BATTHIGH)) { if (lims-sel_warnmax == edata-limits.sel_warnmax) { DPRINTF((%s: warnmax exists\n, __func__)); error = EEXIST; -props = ~PROP_WARNMAX; +props = ~(PROP_WARNMAX | PROP_BATTHIGH); } } if (props (PROP_WARNMIN | PROP_BATTWARN)) { @@ -246,6 +248,8 @@ LIMIT_OP(critical-min, sel_critmin, PROP_CRITMIN); /* %Capacity-based limits */ + LIMIT_OP(maximum-capacity, sel_critmax, PROP_BATTMAX); + LIMIT_OP(high-capacity, sel_warnmax, PROP_BATTHIGH); LIMIT_OP(warning-capacity, sel_warnmin, PROP_BATTWARN); LIMIT_OP(critical-capacity, sel_critmin,
CVS commit: src/usr.sbin/envstat
Module Name:src Committed By: pgoyette Date: Mon Feb 15 22:37:14 UTC 2010 Modified Files: src/usr.sbin/envstat: config.c config_lex.l envstat.c Log Message: Update userland envstat(8) to handle new {high,maximum}-capacity limits. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/envstat/config.c cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/envstat/config_lex.l cvs rdiff -u -r1.76 -r1.77 src/usr.sbin/envstat/envstat.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.sbin/envstat/config.c diff -u src/usr.sbin/envstat/config.c:1.8 src/usr.sbin/envstat/config.c:1.9 --- src/usr.sbin/envstat/config.c:1.8 Fri Aug 22 11:27:50 2008 +++ src/usr.sbin/envstat/config.c Mon Feb 15 22:37:14 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: config.c,v 1.8 2008/08/22 11:27:50 pgoyette Exp $ */ +/* $NetBSD: config.c,v 1.9 2010/02/15 22:37:14 pgoyette Exp $ */ /*- * Copyright (c) 2007 Juan Romero Pardines. @@ -27,7 +27,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: config.c,v 1.8 2008/08/22 11:27:50 pgoyette Exp $); +__RCSID($NetBSD: config.c,v 1.9 2010/02/15 22:37:14 pgoyette Exp $); #endif /* not lint */ #include stdio.h @@ -502,6 +502,62 @@ } /* + * high-capacity property set? + */ + obj = prop_dictionary_get(csdict, high-capacity); + if (obj) { + obj2 = prop_dictionary_get(ksdict, want-percentage); + obj3 = prop_dictionary_get(ksdict, monitoring-supported); + if (prop_bool_true(obj2) prop_bool_true(obj3)) { + strval = prop_string_cstring(obj); + val = strtod(strval, endptr); + if ((*endptr != '\0') || (val 0 || val 100)) +config_errmsg(VALUE_ERR, + high-capacity, + sensor); + /* + * Convert the value to a valid percentage. + */ + obj = prop_dictionary_get(ksdict, max-value); + val = (val / 100) * prop_number_integer_value(obj); + + if (!prop_dictionary_set_uint32(csdict, + high-capacity, + val)) +err(EXIT_FAILURE, dict_set highcap); + } else + config_errmsg(PROP_ERR, high-capacity, sensor); + } + + /* + * maximum-capacity property set? + */ + obj = prop_dictionary_get(csdict, maximum-capacity); + if (obj) { + obj2 = prop_dictionary_get(ksdict, want-percentage); + obj3 = prop_dictionary_get(ksdict, monitoring-supported); + if (prop_bool_true(obj2) prop_bool_true(obj3)) { + strval = prop_string_cstring(obj); + val = strtod(strval, endptr); + if ((*endptr != '\0') || (val 0 || val 100)) +config_errmsg(VALUE_ERR, + maximum-capacity, + sensor); + /* + * Convert the value to a valid percentage. + */ + obj = prop_dictionary_get(ksdict, max-value); + val = (val / 100) * prop_number_integer_value(obj); + + if (!prop_dictionary_set_uint32(csdict, + maximum-capacity, + val)) +err(EXIT_FAILURE, dict_set maxcap); + } else + config_errmsg(PROP_ERR, maximum-capacity, sensor); + } + + /* * critical-max property set? */ obj = prop_dictionary_get(csdict, critical-max); Index: src/usr.sbin/envstat/config_lex.l diff -u src/usr.sbin/envstat/config_lex.l:1.6 src/usr.sbin/envstat/config_lex.l:1.7 --- src/usr.sbin/envstat/config_lex.l:1.6 Thu Oct 29 14:38:37 2009 +++ src/usr.sbin/envstat/config_lex.l Mon Feb 15 22:37:14 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: config_lex.l,v 1.6 2009/10/29 14:38:37 christos Exp $ */ +/* $NetBSD: config_lex.l,v 1.7 2010/02/15 22:37:14 pgoyette Exp $ */ /*- * Copyright (c) 2007 Juan Romero Pardines. @@ -29,7 +29,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: config_lex.l,v 1.6 2009/10/29 14:38:37 christos Exp $); +__RCSID($NetBSD: config_lex.l,v 1.7 2010/02/15 22:37:14 pgoyette Exp $); #endif /* not lint */ #include stdio.h @@ -49,7 +49,7 @@ DEVICEPROP refresh-timeout SENSOR sensor[0-9]+ -SENSORPROP warning-max|warning-min|warning-capacity|critical-max|critical-min|critical-capacity|rfact|description +SENSORPROP warning-max|high-capacity|warning-min|warning-capacity|critical-max|maximum-capacity|critical-min|critical-capacity|rfact|description SP_STRING [(+|\-)\$A-Za-z\.\/_\-0-9 ]* STRING [\$A-Za-z\.\/_\-0-9]* Index: src/usr.sbin/envstat/envstat.c diff -u src/usr.sbin/envstat/envstat.c:1.76 src/usr.sbin/envstat/envstat.c:1.77 --- src/usr.sbin/envstat/envstat.c:1.76 Fri Feb 12 14:26:27 2010 +++ src/usr.sbin/envstat/envstat.c Mon Feb 15 22:37:14 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: envstat.c,v 1.76 2010/02/12 14:26:27 njoly Exp $ */ +/* $NetBSD: envstat.c,v 1.77 2010/02/15 22:37:14 pgoyette Exp $ */ /*- * Copyright (c) 2007, 2008 Juan Romero Pardines. @@ -27,7 +27,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: envstat.c,v 1.76 2010/02/12 14:26:27 njoly Exp $); +__RCSID($NetBSD: envstat.c,v 1.77 2010/02/15 22:37:14 pgoyette Exp $); #endif /* not lint */ #include stdio.h @@ -64,10 +64,8 @@ int32_t max_value; int32_t min_value; int32_t
CVS commit: src/usr.sbin/envstat
Module Name:src Committed By: pgoyette Date: Mon Feb 15 22:38:28 UTC 2010 Modified Files: src/usr.sbin/envstat: envstat.8 Log Message: Update cross-reference to refer to new aibs(4) instead of aiboost(4) To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/usr.sbin/envstat/envstat.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/envstat/envstat.8 diff -u src/usr.sbin/envstat/envstat.8:1.54 src/usr.sbin/envstat/envstat.8:1.55 --- src/usr.sbin/envstat/envstat.8:1.54 Tue Feb 9 03:19:51 2010 +++ src/usr.sbin/envstat/envstat.8 Mon Feb 15 22:38:28 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: envstat.8,v 1.54 2010/02/09 03:19:51 cnst Exp $ +.\ $NetBSD: envstat.8,v 1.55 2010/02/15 22:38:28 pgoyette Exp $ .\ .\ Copyright (c) 2000, 2007, 2008, 2009 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -154,9 +154,9 @@ .Dl $ envstat -D .Pp To display the sensors of the driver -.Ar aiboost0 : +.Ar aibs0 : .Pp -.Dl $ envstat -d aiboost0 +.Dl $ envstat -d aibs0 .Pp To set all properties specified in the configuration file: .Pp
CVS commit: src/etc/powerd/scripts
Module Name:src Committed By: pgoyette Date: Mon Feb 15 22:56:13 UTC 2010 Modified Files: src/etc/powerd/scripts: sensor_battery Log Message: Add cases for new {high,maximum}-capacity events To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/etc/powerd/scripts/sensor_battery Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/powerd/scripts/sensor_battery diff -u src/etc/powerd/scripts/sensor_battery:1.6 src/etc/powerd/scripts/sensor_battery:1.7 --- src/etc/powerd/scripts/sensor_battery:1.6 Sat Jun 13 15:35:10 2009 +++ src/etc/powerd/scripts/sensor_battery Mon Feb 15 22:56:13 2010 @@ -1,6 +1,6 @@ #!/bin/sh - # -# $NetBSD: sensor_battery,v 1.6 2009/06/13 15:35:10 pgoyette Exp $ +# $NetBSD: sensor_battery,v 1.7 2010/02/15 22:56:13 pgoyette Exp $ # # Generic script for battery sensors. # @@ -28,6 +28,16 @@ ${0}: (${3}) capacity below critical limit [${1}] 1 exit 0 ;; +high-capacity) + logger -p warning \ + ${0}: (${3}) capacity above high limit [${1}] 1 + exit 0 + ;; +maximum-capacity) + logger -p warning \ + ${0}: (${3}) capacity above maximum limit [${1}] 1 + exit 0 + ;; # # This event is _ONLY_ received when all AC Adapters are OFF and all # batteries on the system are in CRITICAL or LOW state.
CVS commit: src/usr.sbin/envstat
Module Name:src Committed By: pgoyette Date: Mon Feb 15 23:04:11 UTC 2010 Modified Files: src/usr.sbin/envstat: envsys.conf.5 Log Message: Document the new {high, maximum}-capacity keywords, and some general clean-up. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/envstat/envsys.conf.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/envstat/envsys.conf.5 diff -u src/usr.sbin/envstat/envsys.conf.5:1.12 src/usr.sbin/envstat/envsys.conf.5:1.13 --- src/usr.sbin/envstat/envsys.conf.5:1.12 Wed May 13 23:03:54 2009 +++ src/usr.sbin/envstat/envsys.conf.5 Mon Feb 15 23:04:11 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: envsys.conf.5,v 1.12 2009/05/13 23:03:54 wiz Exp $ +.\ $NetBSD: envsys.conf.5,v 1.13 2010/02/15 23:04:11 pgoyette Exp $ .\ .\ - .\ Copyright (c) 2007, 2008 Juan Romero Pardines. @@ -25,7 +25,7 @@ .\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\ .\ -.Dd April 26, 2008 +.Dd February 15, 2010 .Dt ENVSYS.CONF 5 .Os .Sh NAME @@ -156,7 +156,7 @@ .Pp Only a value between 0 and 100 is allowed. When the limit is reached in the sensor, a -.Em user-capacity +.Em critical-capacity event will be sent to the .Xr powerd 8 daemon (if running) and will execute the block for this event in @@ -165,7 +165,7 @@ If this property is set, its value will be shown in the .Xr envstat 8 display output with a column named -.Ar CritCap . +.Ar CritMin . .It warning-capacity = 20; .Pp Sets a warning capacity limit property of 20 @@ -190,7 +190,75 @@ .Pp Only a value between 0 and 100 is allowed. When the limit is reached in the sensor, a -.Em user-warn-capacity +.Em warning-capacity +event will be sent to the +.Xr powerd 8 +daemon (if running) and will execute the block for this event in +.Pa /etc/powerd/scripts/sensor_battery . +.Pp +If this property is set, its value will be shown in the +.Xr envstat 8 +display output with a column named +.Ar WarnMin . +.It high-capacity = 90; +.Pp +Sets a high capacity limit property of 90 +percent in a battery sensor. +Battery sensors are those that report a percentage from the +.Xr envstat 8 +output. +.Pp +It is possible to find out if the sensor accepts this property +by running +.Ql envstat -x +and looking if the +.Em want-percentage +object is defined as +.Em true +on its dictionary. +For example: +.Bd -literal -offset indent + \*[Lt]key\*[Gt]want-percentage\*[Lt]/key\*[Gt] + \*[Lt]true/\*[Gt] +.Ed +.Pp +Only a value between 0 and 100 is allowed. +When the limit is reached in the sensor, a +.Em high-capacity +event will be sent to the +.Xr powerd 8 +daemon (if running) and will execute the block for this event in +.Pa /etc/powerd/scripts/sensor_battery . +.Pp +If this property is set, its value will be shown in the +.Xr envstat 8 +display output with a column named +.Ar WarnMax . +.It maximum-capacity = 99; +.Pp +Sets a warning capacity limit property of 99 +percent in a battery sensor. +Battery sensors are those that report a percentage from the +.Xr envstat 8 +output. +.Pp +It is possible to find out if the sensor accepts this property +by running +.Ql envstat -x +and looking if the +.Em want-percentage +object is defined as +.Em true +on its dictionary. +For example: +.Bd -literal -offset indent + \*[Lt]key\*[Gt]want-percentage\*[Lt]/key\*[Gt] + \*[Lt]true/\*[Gt] +.Ed +.Pp +Only a value between 0 and 100 is allowed. +When the limit is reached in the sensor, a +.Em warning-capacity event will be sent to the .Xr powerd 8 daemon (if running) and will execute the block for this event in @@ -199,10 +267,7 @@ If this property is set, its value will be shown in the .Xr envstat 8 display output with a column named -.Ar WarnCap -when the -.Fl -W -option is specified. +.Ar WarnMin . .It critical-max = 70C; .Pp Sets a critical maximum limit property in a sensor. @@ -212,9 +277,9 @@ .Em temperature sensors and that the value is specified as degrees .Em Celsius . -If degrees Fahrenheit are wanted, just change use the letter +If degrees Fahrenheit are wanted, just use the letter .Em F , -like: +as in: .Bd -literal -offset indent critical-max = 140F; .Ed @@ -239,7 +304,7 @@ .Pa /etc/powerd/scripts/sensor_foo script (depending on the sensor's type). .Pp -Please note that this property cannot be set in battery sensors +Please note that this property cannot be set in battery capacity sensors (those that have the .Em want-percentage object in their dictionary). @@ -253,10 +318,7 @@ If this property is set, its value will be shown in the .Xr envstat 8 display output with a column named -.Ar CritMax -unless the -.Fl W -option is specified. +.Ar CritMax . .It critical-min = 1.230; .Pp Sets a critical minimum limit property in a sensor. @@ -299,7 +361,7 @@ .Pa /etc/powerd/scripts/sensor_foo script (depending on the sensor's type). .Pp -Please note that this property cannot be set in
CVS commit: src/sys/arch
Module Name:src Committed By: dyoung Date: Mon Feb 15 23:53:08 UTC 2010 Modified Files: src/sys/arch/amd64/amd64: mainbus.c src/sys/arch/i386/i386: mainbus.c Log Message: Don't use the global variable pci_mode, but use a local copy of the return value of pci_mode_detect(), instead. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/amd64/amd64/mainbus.c cvs rdiff -u -r1.88 -r1.89 src/sys/arch/i386/i386/mainbus.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/mainbus.c diff -u src/sys/arch/amd64/amd64/mainbus.c:1.29 src/sys/arch/amd64/amd64/mainbus.c:1.30 --- src/sys/arch/amd64/amd64/mainbus.c:1.29 Tue Aug 18 16:41:02 2009 +++ src/sys/arch/amd64/amd64/mainbus.c Mon Feb 15 23:53:07 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.29 2009/08/18 16:41:02 jmcneill Exp $ */ +/* $NetBSD: mainbus.c,v 1.30 2010/02/15 23:53:07 dyoung Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.29 2009/08/18 16:41:02 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.30 2010/02/15 23:53:07 dyoung Exp $); #include sys/param.h #include sys/systm.h @@ -151,6 +151,7 @@ mainbus_attach(device_t parent, device_t self, void *aux) { #if NPCI 0 + int mode; union mainbus_attach_args mba; #endif #if NACPICA 0 @@ -176,9 +177,9 @@ /* * ACPI needs to be able to access PCI configuration space. */ - pci_mode = pci_mode_detect(); + mode = pci_mode_detect(); #if defined(PCI_BUS_FIXUP) - if (pci_mode != 0) { + if (mode != 0) { pci_maxbus = pci_bus_fixup(NULL, 0); aprint_debug(PCI bus max, after pci_bus_fixup: %i\n, pci_maxbus); @@ -252,7 +253,7 @@ #endif #if NPCI 0 - if (pci_mode != 0) { + if (mode != 0) { int npcibus = 0; mba.mba_pba.pba_iot = X86_BUS_SPACE_IO; Index: src/sys/arch/i386/i386/mainbus.c diff -u src/sys/arch/i386/i386/mainbus.c:1.88 src/sys/arch/i386/i386/mainbus.c:1.89 --- src/sys/arch/i386/i386/mainbus.c:1.88 Fri Jan 8 00:09:44 2010 +++ src/sys/arch/i386/i386/mainbus.c Mon Feb 15 23:53:07 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.88 2010/01/08 00:09:44 dyoung Exp $ */ +/* $NetBSD: mainbus.c,v 1.89 2010/02/15 23:53:07 dyoung Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.88 2010/01/08 00:09:44 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.89 2010/02/15 23:53:07 dyoung Exp $); #include sys/param.h #include sys/systm.h @@ -211,6 +211,9 @@ void mainbus_attach(device_t parent, device_t self, void *aux) { +#if NPCI 0 + int mode; +#endif struct mainbus_softc *sc = device_private(self); union mainbus_attach_args mba; #ifdef MPBIOS @@ -234,9 +237,9 @@ /* * ACPI needs to be able to access PCI configuration space. */ - pci_mode = pci_mode_detect(); + mode = pci_mode_detect(); #if defined(PCI_BUS_FIXUP) - if (pci_mode != 0) { + if (mode != 0) { pci_maxbus = pci_bus_fixup(NULL, 0); aprint_debug(PCI bus max, after pci_bus_fixup: %i\n, pci_maxbus); @@ -390,7 +393,7 @@ * XXX that's not currently possible. */ #if NPCI 0 - if (pci_mode != 0 ifattr_match(ifattr, pcibus)) { + if (pci_mode_detect() != 0 ifattr_match(ifattr, pcibus)) { int npcibus = 0; mba.mba_pba.pba_iot = X86_BUS_SPACE_IO;
CVS commit: src/sys/arch/xen/x86
Module Name:src Committed By: dyoung Date: Mon Feb 15 23:53:56 UTC 2010 Modified Files: src/sys/arch/xen/x86: mainbus.c Log Message: Don't use the global variable pci_mode, but use a local copy of the return value of pci_mode_detect(), instead. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/xen/x86/mainbus.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/xen/x86/mainbus.c diff -u src/sys/arch/xen/x86/mainbus.c:1.9 src/sys/arch/xen/x86/mainbus.c:1.10 --- src/sys/arch/xen/x86/mainbus.c:1.9 Tue Aug 18 16:41:03 2009 +++ src/sys/arch/xen/x86/mainbus.c Mon Feb 15 23:53:56 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.9 2009/08/18 16:41:03 jmcneill Exp $ */ +/* $NetBSD: mainbus.c,v 1.10 2010/02/15 23:53:56 dyoung Exp $ */ /* NetBSD: mainbus.c,v 1.53 2003/10/27 14:11:47 junyoung Exp */ /* @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.9 2009/08/18 16:41:03 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.10 2010/02/15 23:53:56 dyoung Exp $); #include sys/param.h #include sys/systm.h @@ -134,6 +134,9 @@ void mainbus_attach(device_t parent, device_t self, void *aux) { +#if NPCI 0 + int mode; +#endif union mainbus_attach_args mba; #if defined(DOM0OPS) int numcpus = 0; @@ -155,9 +158,9 @@ #endif #if NPCI 0 /* ACPI needs to be able to access PCI configuration space. */ - pci_mode = pci_mode_detect(); + mode = pci_mode_detect(); #ifdef PCI_BUS_FIXUP - if (pci_mode != 0) { + if (mode != 0) { pci_maxbus = pci_bus_fixup(NULL, 0); aprint_debug_dev(self, PCI bus max, after pci_bus_fixup: %i\n, pci_maxbus);
CVS commit: src/sys/arch/xen/include
Module Name:src Committed By: dyoung Date: Mon Feb 15 23:55:25 UTC 2010 Modified Files: src/sys/arch/xen/include: pci_machdep.h Log Message: Get pci_mode out of the global namespace. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/xen/include/pci_machdep.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/xen/include/pci_machdep.h diff -u src/sys/arch/xen/include/pci_machdep.h:1.13 src/sys/arch/xen/include/pci_machdep.h:1.14 --- src/sys/arch/xen/include/pci_machdep.h:1.13 Mon Oct 19 18:41:10 2009 +++ src/sys/arch/xen/include/pci_machdep.h Mon Feb 15 23:55:24 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.h,v 1.13 2009/10/19 18:41:10 bouyer Exp $ */ +/* $NetBSD: pci_machdep.h,v 1.14 2010/02/15 23:55:24 dyoung Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -121,7 +121,6 @@ */ #define X86_PCI_INTERRUPT_LINE_NO_CONNECTION 0xff -extern int pci_mode; int pci_mode_detect(void); int pci_bus_flags(void);
CVS commit: src/sys/arch
Module Name:src Committed By: dyoung Date: Tue Feb 16 00:03:48 UTC 2010 Modified Files: src/sys/arch/i386/pci: pcibios.c src/sys/arch/x86/include: pci_machdep.h src/sys/arch/x86/pci: pci_machdep.c Log Message: Get rid of all PCI_CONF_MODE #ifdef'age except for the little bit that initializes pci_mode, which I have moved to the top. Make pci_mode private to pci_machdep.c. Provide pci_mode_set() for pcibios.c to configure the PCI Configuration Mechanism. KASSERT() in pci_mode_set() that the mechanism is not changing from anything but the don't know value, -1. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/i386/pci/pcibios.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x86/include/pci_machdep.h cvs rdiff -u -r1.37 -r1.38 src/sys/arch/x86/pci/pci_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/i386/pci/pcibios.c diff -u src/sys/arch/i386/pci/pcibios.c:1.36 src/sys/arch/i386/pci/pcibios.c:1.37 --- src/sys/arch/i386/pci/pcibios.c:1.36 Mon Apr 28 20:23:25 2008 +++ src/sys/arch/i386/pci/pcibios.c Tue Feb 16 00:03:47 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pcibios.c,v 1.36 2008/04/28 20:23:25 martin Exp $ */ +/* $NetBSD: pcibios.c,v 1.37 2010/02/16 00:03:47 dyoung Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pcibios.c,v 1.36 2008/04/28 20:23:25 martin Exp $); +__KERNEL_RCSID(0, $NetBSD: pcibios.c,v 1.37 2010/02/16 00:03:47 dyoung Exp $); #include opt_pcibios.h #include opt_pcifixup.h @@ -180,7 +180,7 @@ * The PCI BIOS tells us the config mechanism; fill it in now * so that pci_mode_detect() doesn't have to look for it. */ - pci_mode = mech1 ? 1 : 2; + pci_mode_set(mech1 ? 1 : 2); pcibios_present = 1; Index: src/sys/arch/x86/include/pci_machdep.h diff -u src/sys/arch/x86/include/pci_machdep.h:1.8 src/sys/arch/x86/include/pci_machdep.h:1.9 --- src/sys/arch/x86/include/pci_machdep.h:1.8 Fri May 30 09:49:07 2008 +++ src/sys/arch/x86/include/pci_machdep.h Tue Feb 16 00:03:47 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.h,v 1.8 2008/05/30 09:49:07 joerg Exp $ */ +/* $NetBSD: pci_machdep.h,v 1.9 2010/02/16 00:03:47 dyoung Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -82,7 +82,7 @@ * i386-specific PCI variables and functions. * NOT TO BE USED DIRECTLY BY MACHINE INDEPENDENT CODE. */ -extern int pci_mode; +void pci_mode_set(int); int pci_mode_detect(void); int pci_bus_flags(void); struct pci_attach_args; Index: src/sys/arch/x86/pci/pci_machdep.c diff -u src/sys/arch/x86/pci/pci_machdep.c:1.37 src/sys/arch/x86/pci/pci_machdep.c:1.38 --- src/sys/arch/x86/pci/pci_machdep.c:1.37 Tue Aug 18 16:41:03 2009 +++ src/sys/arch/x86/pci/pci_machdep.c Tue Feb 16 00:03:47 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.c,v 1.37 2009/08/18 16:41:03 jmcneill Exp $ */ +/* $NetBSD: pci_machdep.c,v 1.38 2010/02/16 00:03:47 dyoung Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -73,7 +73,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pci_machdep.c,v 1.37 2009/08/18 16:41:03 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: pci_machdep.c,v 1.38 2010/02/16 00:03:47 dyoung Exp $); #include sys/types.h #include sys/param.h @@ -119,7 +119,15 @@ #endif #endif -int pci_mode = -1; +#ifdef PCI_CONF_MODE +#if (PCI_CONF_MODE == 1) || (PCI_CONF_MODE == 2) +static int pci_mode = PCI_CONF_MODE; +#else +#error Invalid PCI configuration mode. +#endif +#else +static int pci_mode = -1; +#endif static void pci_bridge_hook(pci_chipset_tag_t, pcitag_t, void *); struct pci_bridge_hook_arg { @@ -284,41 +292,25 @@ { pcitag_t tag; -#ifndef PCI_CONF_MODE switch (pci_mode) { case 1: - goto mode1; + if (bus = 256 || device = 32 || function = 8) + panic(pci_make_tag: bad request); + + tag.mode1 = PCI_MODE1_ENABLE | + (bus 16) | (device 11) | (function 8); + return tag; case 2: - goto mode2; + if (bus = 256 || device = 16 || function = 8) + panic(pci_make_tag: bad request); + + tag.mode2.port = 0xc000 | (device 8); + tag.mode2.enable = 0xf0 | (function 1); + tag.mode2.forward = bus; + return tag; default: panic(pci_make_tag: mode not configured); } -#endif - -#if !defined(PCI_CONF_MODE) || (PCI_CONF_MODE == 1) -#ifndef PCI_CONF_MODE -mode1: -#endif - if (bus = 256 || device = 32 || function = 8) - panic(pci_make_tag: bad request); - - tag.mode1 = PCI_MODE1_ENABLE | - (bus 16) | (device 11) | (function 8); - return tag; -#endif - -#if !defined(PCI_CONF_MODE) || (PCI_CONF_MODE == 2) -#ifndef PCI_CONF_MODE -mode2: -#endif - if (bus = 256 || device = 16 || function = 8) - panic(pci_make_tag: bad request); - - tag.mode2.port = 0xc000 | (device 8); - tag.mode2.enable = 0xf0 | (function 1); - tag.mode2.forward = bus; - return tag;
CVS commit: src/usr.sbin/cpuctl/arch
Module Name:src Committed By: mrg Date: Tue Feb 16 00:13:14 UTC 2010 Modified Files: src/usr.sbin/cpuctl/arch: i386.c Log Message: don't call most/all Core2's (Merom). To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/cpuctl/arch/i386.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.sbin/cpuctl/arch/i386.c diff -u src/usr.sbin/cpuctl/arch/i386.c:1.20 src/usr.sbin/cpuctl/arch/i386.c:1.21 --- src/usr.sbin/cpuctl/arch/i386.c:1.20 Fri Oct 2 13:54:01 2009 +++ src/usr.sbin/cpuctl/arch/i386.c Tue Feb 16 00:13:14 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: i386.c,v 1.20 2009/10/02 13:54:01 jmcneill Exp $ */ +/* $NetBSD: i386.c,v 1.21 2010/02/16 00:13:14 mrg Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: i386.c,v 1.20 2009/10/02 13:54:01 jmcneill Exp $); +__RCSID($NetBSD: i386.c,v 1.21 2010/02/16 00:13:14 mrg Exp $); #endif /* not lint */ #include sys/types.h @@ -309,7 +309,7 @@ Pentium III (Tualatin), 0, Pentium M (Dothan), Pentium M (Yonah), -Core 2 (Merom), +Core 2, Pentium Pro, II or III /* Default */ }, NULL,
CVS commit: src/regress/lib/libpthread/find
Module Name:src Committed By: mrg Date: Tue Feb 16 00:15:19 UTC 2010 Modified Files: src/regress/lib/libpthread/find: findthreads.c Log Message: if pthread_create() fails, display the iteration number in the error message. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/regress/lib/libpthread/find/findthreads.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/regress/lib/libpthread/find/findthreads.c diff -u src/regress/lib/libpthread/find/findthreads.c:1.1 src/regress/lib/libpthread/find/findthreads.c:1.2 --- src/regress/lib/libpthread/find/findthreads.c:1.1 Thu Apr 2 12:58:44 2009 +++ src/regress/lib/libpthread/find/findthreads.c Tue Feb 16 00:15:19 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: findthreads.c,v 1.1 2009/04/02 12:58:44 drochner Exp $ */ +/* $NetBSD: findthreads.c,v 1.2 2010/02/16 00:15:19 mrg Exp $ */ #include err.h #include pthread.h @@ -36,7 +36,7 @@ for (i = 0; i NUM; i++) { res = pthread_create(thr[i], 0, f, 0); if (res) - errx(1, pthread_create: %s, strerror(res)); + errx(1, pthread_create iter %d: %s, i, strerror(res)); for (j = 0; j = i; j++) { res = pthread_getname_np(thr[j], nam, sizeof(nam)); if (res) {
CVS commit: src/share/misc
Module Name:src Committed By: mrg Date: Tue Feb 16 00:16:28 UTC 2010 Modified Files: src/share/misc: na.phone Log Message: update this a little bit. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/share/misc/na.phone 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/na.phone diff -u src/share/misc/na.phone:1.18 src/share/misc/na.phone:1.19 --- src/share/misc/na.phone:1.18 Mon Mar 3 01:15:12 2003 +++ src/share/misc/na.phone Tue Feb 16 00:16:28 2010 @@ -1,4 +1,4 @@ -# $NetBSD: na.phone,v 1.18 2003/03/03 01:15:12 jhawk Exp $ +# $NetBSD: na.phone,v 1.19 2010/02/16 00:16:28 mrg Exp $ # Generated from http://www.nanpa.com/area_codes/index.html # (with local exceptions) # @@ -27,31 +27,33 @@ 219:Indiana (USA):Gary, Hammond, South Bend, Warsaw:IN 224:Illinois (USA):suburban Chicago:IL 225:Louisiana (USA):Baton Rouge, Plaquemine:LA -226*:Ontario:Overlay of 519 effective 02/19/2005 -227*:Maryland:Overlay of 240 (Pending) +226:Ontario:Overlay of 519 effective 02/19/2005 +227*:Maryland:Overlay of 240 and 301 (Pending) 228:Mississippi (USA):Biloxi, Gulfport, Pascagoula:MS 229:Georgia (USA):Albany:GA 231:Michigan (USA):Muskegon, Traverse City:MI 234:Ohio (USA):Akron, Youngstown:OH +236*:British Columbia (Canada):Relief for 250 and 778 (Pending) 239:Florida 240:Maryland (USA):Rockville, Silver Spring, Bethesda:MD 242:Bahamas (Caribbean):all locations: 246:Barbados (Caribbean):all locations: 248:Michigan (USA):Oakland county:MI +249*:British Columbia (Canada):Overlay of 704, effective March 2001 250:British Columbia (Canada):Kamloops, Kelowna, Victoria:BC -251:Alabama +251:Alabama (USA):Greenville, Kitty Hawk, Rocky Mount:AL 252:North Carolina (USA):Greenville, Morehead City, Rocky Mount:NC 253:Washington (USA):Auburn, Gig Harbor, Tacoma:WA 254:Texas (USA):Waco:TX 256:Alabama (USA):Decatur, Gadsden, Huntsville:AL -260:Indiana +260:Indiana (USA):Fort Wayne, New Haven, Decatur, Angola, Huntington, Wabash:IN 262:Wisconsin (USA):Kenosha, Racine, Waukesha:WI 264:Anguilla (Caribbean):all locations: 267:Pennsylvania (USA):Philadelphia:PA 268:Antigua and Barbuda (Caribbean):all locations: -269:Michigan +269:Michigan (USA):Battle Creek, Benton Harbor, Allegan, Hastings, Kalamazoo, St Joseph:MI 270:Kentucky (USA):Bowling Green, Paducah:KY -276:Virginia +276:Virginia (USA):Abingdon, Wytheville, Martinsville, Bluefield:VA 281:Texas (USA):Houston:TX 283*:Ohio:Overlay of 513 (Suspended) 284:British Virgin Islands (Caribbean):all locations:VI @@ -77,7 +79,8 @@ 320:Minnesota (USA):St. Cloud, Willmar:MN 321:Florida (USA):Cape Canaveral:FL 323:California (USA):Los Angeles:CA -325*:Texas:Split of 915 effective 04/05/2003 +325:Texas (USA):Abilene, Sweetwater, Snyder, San Angelo:TX +327*:Arkansas:Proposed Overlay of 870 330:Ohio (USA):Akron, Youngstown:OH 331*:Illinois:Overlay of 630 (Pending) 334:Alabama (USA):Auburn, Mobile, Montgomery, Selma:AL @@ -86,16 +89,18 @@ 339:Massachusetts (USA):Burlington, Reading, Waltham:MA 340:U.S. Virgin Islands (Caribbean):all locations: 341*:California:Split of 510 (Suspended) +343*:Ontario (Canada):Numbering relief for 613 (beginning 5/17/2010) 345:Cayman Islands (Caribbean):all locations: 347:New York (USA):Bronx, Brooklyn, Queens, Staten Island:NY 351:Massachusetts (USA):Acton, Lowell, North Reading:MA 352:Florida (USA):Gainesville, Ocala:FL 360:Washington (USA):Bellingham, Olympia, Vancouver:WA 361:Texas (USA):Corpus Christi:TX +364:Kentucky (USA):Fort Campbell, Henderson, Hopkinsville, Madisonville, Murray, Paducah:KT 369*:California:Split of 707 (Suspended) 380*:Ohio:Overlay of 614 (Suspended) 385*:Utah:Split of 801 effective 03/30/2005 -386:Florida +386:Florida (USA):Daytona Beach, Lake City, Live Oak, Crescent City:FL 401:Rhode Island (USA):all locations:RI 402:Nebraska (USA):Lincoln, Omaha:NE 403:Alberta (Canada):Calgary:AB @@ -118,22 +123,23 @@ 424*:California:Split of 310 (Pending) 425:Washington (USA):Everett, Kent:WA 430:Texas -432*:Texas:Split of 915 effective 04/05/2003 -434:Virginia +432*:Texas (USA):Big Spring, Midland, Odessa:TX +434:Virginia (USA):Lynchburg, Danville, Farmville, South Hill, Charlottesville:VA 435:Utah (USA):Cedar City, St. George:UT 438*:Quebec:Overlay of 514 effective 09/24/2005 440:Ohio (USA):Ashtabula, Lorain, Westlake:OH 441:Bermuda (Caribbean):all locations: -442*:California:Split of 760 (Suspended) +442:California:Overlaid on 760 443:Maryland (USA):Baltimore, Towson:MD -445*:Pennsylvania:Overlay of 215 (Pending) +447:Illinois 450:Quebec (Canada):area outside Montreal:QC 456:Inbound International +458:Oregon 464*:Illinois:Overlay of 708 (Pending) 469:Texas (USA):Dallas:TX -470*:Georgia:Overlay of 678 (Pending) +470*:Georgia:Overlay of 404/678 and 770/678 (Pending) 473:Grenada (Caribbean):all locations: -475*:Connecticut:Overlay of 203 (Pending)
CVS commit: src/sys/arch/xen/include
Module Name:src Committed By: dyoung Date: Tue Feb 16 00:47:46 UTC 2010 Modified Files: src/sys/arch/xen/include: pci_machdep.h Log Message: Declare pci_mode_set(). To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/xen/include/pci_machdep.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/xen/include/pci_machdep.h diff -u src/sys/arch/xen/include/pci_machdep.h:1.14 src/sys/arch/xen/include/pci_machdep.h:1.15 --- src/sys/arch/xen/include/pci_machdep.h:1.14 Mon Feb 15 23:55:24 2010 +++ src/sys/arch/xen/include/pci_machdep.h Tue Feb 16 00:47:46 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.h,v 1.14 2010/02/15 23:55:24 dyoung Exp $ */ +/* $NetBSD: pci_machdep.h,v 1.15 2010/02/16 00:47:46 dyoung Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -121,6 +121,7 @@ */ #define X86_PCI_INTERRUPT_LINE_NO_CONNECTION 0xff +void pci_mode_set(int); int pci_mode_detect(void); int pci_bus_flags(void);
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: jym Date: Tue Feb 16 00:48:17 UTC 2010 Modified Files: src/sys/arch/x86/x86: pmap.c Log Message: - re-factor code in pmap_map_ptes() slightly, and make it PAE-ready for native i386 by using PDP_SIZE - introduce pmap_unmap_apdp(), used to clear the APDP entries in PD, and replace the relevant code parts with this function. Comes from Jeremy Morse's patch for i386 PAE support. Adjustments by me. To generate a diff of this commit: cvs rdiff -u -r1.103 -r1.104 src/sys/arch/x86/x86/pmap.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/x86/x86/pmap.c diff -u src/sys/arch/x86/x86/pmap.c:1.103 src/sys/arch/x86/x86/pmap.c:1.104 --- src/sys/arch/x86/x86/pmap.c:1.103 Fri Feb 12 01:55:45 2010 +++ src/sys/arch/x86/x86/pmap.c Tue Feb 16 00:48:17 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.103 2010/02/12 01:55:45 jym Exp $ */ +/* $NetBSD: pmap.c,v 1.104 2010/02/16 00:48:17 jym Exp $ */ /* * Copyright (c) 2007 Manuel Bouyer. @@ -149,7 +149,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.103 2010/02/12 01:55:45 jym Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.104 2010/02/16 00:48:17 jym Exp $); #include opt_user_ldt.h #include opt_lockdebug.h @@ -590,6 +590,7 @@ struct pv_entry **); static void pmap_unmap_ptes(struct pmap *, struct pmap *); +static void pmap_unmap_apdp(void); static bool pmap_get_physpage(vaddr_t, int, paddr_t *); static int pmap_pdes_invalid(vaddr_t, pd_entry_t * const *, pd_entry_t *); @@ -746,6 +747,22 @@ } /* + * Unmap the content of APDP PDEs + */ +static void +pmap_unmap_apdp(void) { + int i; + + for (i = 0; i PDP_SIZE; i++) { + pmap_pte_set(APDP_PDE+i, 0); +#if defined (XEN) defined (PAE) + /* clear shadow entries too */ + pmap_pte_set(APDP_PDE_SHADOW+i, 0); +#endif + } +} + +/* * Add a reference to the specified pmap. */ @@ -833,9 +850,9 @@ /* need to load a new alternate pt space into curpmap? */ COUNT(apdp_pde_map); opde = *APDP_PDE; -#ifdef XEN if (!pmap_valid_entry(opde) || pmap_pte2pa(opde) != pmap_pdirpa(pmap, 0)) { +#ifdef XEN int i; s = splvm(); /* Make recursive entry usable in user PGD */ @@ -858,17 +875,18 @@ if (pmap_valid_entry(opde)) pmap_apte_flush(ourpmap); splx(s); - } #else /* XEN */ - npde = pmap_pa2pte(pmap_pdirpa(pmap, 0)) | PG_RW | PG_V; - if (!pmap_valid_entry(opde) || - pmap_pte2pa(opde) != pmap_pdirpa(pmap, 0)) { - pmap_pte_set(APDP_PDE, npde); + int i; + for (i = 0; i PDP_SIZE; i++) { + npde = pmap_pa2pte( + pmap_pdirpa(pmap, i * NPDPG)) | PG_RW | PG_V; + pmap_pte_set(APDP_PDE+i, npde); + } pmap_pte_flush(); if (pmap_valid_entry(opde)) pmap_apte_flush(ourpmap); - } #endif /* XEN */ + } *pmap2 = ourpmap; *ptepp = APTE_BASE; *pdeppp = alternate_pdes; @@ -913,7 +931,7 @@ KASSERT(curcpu()-ci_pmap == pmap2); #endif #if defined(MULTIPROCESSOR) - pmap_pte_set(APDP_PDE, 0); + pmap_unmap_apdp(); pmap_pte_flush(); pmap_apte_flush(pmap2); #endif @@ -2301,13 +2319,7 @@ */ if (xpmap_ptom_masked(pmap_pdirpa(pmap, 0)) == (*APDP_PDE PG_FRAME)) { kpreempt_disable(); - for (i = 0; i PDP_SIZE; i++) { - pmap_pte_set(APDP_PDE[i], 0); -#ifdef PAE - /* clear shadow entry too */ - pmap_pte_set(APDP_PDE_SHADOW[i], 0); -#endif - } + pmap_unmap_apdp(); pmap_pte_flush(); pmap_apte_flush(pmap_kernel()); kpreempt_enable(); @@ -2752,14 +2764,7 @@ * been freed */ if (*APDP_PDE) { - int i; - for (i = 0; i PDP_SIZE; i++) { - pmap_pte_set(APDP_PDE[i], 0); -#ifdef PAE - /* clear shadow entry too */ - pmap_pte_set(APDP_PDE_SHADOW[i], 0); -#endif - } + pmap_unmap_apdp(); } /* lldt() does pmap_pte_flush() */ #else /* XEN */
CVS commit: src/distrib/sets/lists/man
Module Name:src Committed By: pgoyette Date: Tue Feb 16 01:18:03 UTC 2010 Modified Files: src/distrib/sets/lists/man: mi Log Message: Move acpismbus into proper place, alphabetically. To generate a diff of this commit: cvs rdiff -u -r1.1190 -r1.1191 src/distrib/sets/lists/man/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/man/mi diff -u src/distrib/sets/lists/man/mi:1.1190 src/distrib/sets/lists/man/mi:1.1191 --- src/distrib/sets/lists/man/mi:1.1190 Tue Feb 9 03:19:50 2010 +++ src/distrib/sets/lists/man/mi Tue Feb 16 01:18:02 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1190 2010/02/09 03:19:50 cnst Exp $ +# $NetBSD: mi,v 1.1191 2010/02/16 01:18:02 pgoyette Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -620,8 +620,8 @@ ./usr/share/man/cat4/acpibut.0 man-sys-catman .cat ./usr/share/man/cat4/acpidalb.0 man-sys-catman .cat ./usr/share/man/cat4/acpiec.0 man-sys-catman .cat -./usr/share/man/cat4/acpismbus.0 man-sys-catman .cat ./usr/share/man/cat4/acpilid.0 man-sys-catman .cat +./usr/share/man/cat4/acpismbus.0 man-sys-catman .cat ./usr/share/man/cat4/acpitz.0 man-sys-catman .cat ./usr/share/man/cat4/adb.0 man-sys-catman .cat ./usr/share/man/cat4/adbbt.0 man-sys-catman .cat @@ -3302,8 +3302,8 @@ ./usr/share/man/html4/acpibut.html man-sys-htmlman html ./usr/share/man/html4/acpidalb.html man-sys-htmlman html ./usr/share/man/html4/acpiec.html man-sys-htmlman html -./usr/share/man/html4/acpismbus.html man-sys-htmlman html ./usr/share/man/html4/acpilid.html man-sys-htmlman html +./usr/share/man/html4/acpismbus.html man-sys-htmlman html ./usr/share/man/html4/acpitz.html man-sys-htmlman html ./usr/share/man/html4/adb.html man-sys-htmlman html ./usr/share/man/html4/adbbt.html man-sys-htmlman html @@ -5684,8 +5684,8 @@ ./usr/share/man/man4/acpibut.4 man-sys-man .man ./usr/share/man/man4/acpidalb.4 man-sys-man .man ./usr/share/man/man4/acpiec.4 man-sys-man .man -./usr/share/man/man4/acpismbus.4 man-sys-man .man ./usr/share/man/man4/acpilid.4 man-sys-man .man +./usr/share/man/man4/acpismbus.4 man-sys-man .man ./usr/share/man/man4/acpitz.4 man-sys-man .man ./usr/share/man/man4/adb.4 man-sys-man .man ./usr/share/man/man4/adbbt.4 man-sys-man .man
CVS commit: src/etc/rc.d
Module Name:src Committed By: mrg Date: Tue Feb 16 02:46:02 UTC 2010 Modified Files: src/etc/rc.d: fsck_root Log Message: only fsck / if we find it in /etc/fstab. diskless systems don't need a / entry. XXX: still get an error from mount / in etc/rc.d/root itself. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/etc/rc.d/fsck_root Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/rc.d/fsck_root diff -u src/etc/rc.d/fsck_root:1.3 src/etc/rc.d/fsck_root:1.4 --- src/etc/rc.d/fsck_root:1.3 Fri Jul 10 20:02:21 2009 +++ src/etc/rc.d/fsck_root Tue Feb 16 02:46:02 2010 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: fsck_root,v 1.3 2009/07/10 20:02:21 christos Exp $ +# $NetBSD: fsck_root,v 1.4 2010/02/16 02:46:02 mrg Exp $ # # PROVIDE: fsck_root @@ -38,13 +38,14 @@ return ;; esac + + echo Starting root file system check: + fsck $fsck_flags / + handle_fsck_error $? + return ;; esac - done ${fstab_file} - - echo Starting root file system check: - fsck $fsck_flags / - handle_fsck_error $? + done ${fstab_file} } load_rc_config $name
CVS commit: src/sys/kern
Module Name:src Committed By: dholland Date: Tue Feb 16 05:47:52 UTC 2010 Modified Files: src/sys/kern: kern_module_vfs.c Log Message: Don't inspect vn_stat() results until after checking that it succeeded. If anyone's been seeing random File too large results from module loading, this should fix it. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/kern/kern_module_vfs.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/kern/kern_module_vfs.c diff -u src/sys/kern/kern_module_vfs.c:1.2 src/sys/kern/kern_module_vfs.c:1.3 --- src/sys/kern/kern_module_vfs.c:1.2 Tue Jan 19 22:17:44 2010 +++ src/sys/kern/kern_module_vfs.c Tue Feb 16 05:47:52 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_module_vfs.c,v 1.2 2010/01/19 22:17:44 pooka Exp $ */ +/* $NetBSD: kern_module_vfs.c,v 1.3 2010/02/16 05:47:52 dholland Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_module_vfs.c,v 1.2 2010/01/19 22:17:44 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_module_vfs.c,v 1.3 2010/02/16 05:47:52 dholland Exp $); #define _MODULE_INTERNAL #include sys/param.h @@ -153,10 +153,11 @@ } error = vn_stat(nd.ni_vp, sb); + if (error != 0) { + goto out1; + } if (sb.st_size = (plistsize - 1)) { /* leave space for term \0 */ error = EFBIG; - } - if (error != 0) { goto out1; }