CVS commit: src/sys/arch/x68k/dev
Module Name:src Committed By: isaki Date: Sun Aug 8 09:30:29 UTC 2010 Modified Files: src/sys/arch/x68k/dev: bmd.c Log Message: Probe not only ctrl address but also bank window address. This prevents the wrong matching when other boards like Neptune-X exist. Reported by Yasushi Oshima. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/x68k/dev/bmd.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/x68k/dev/bmd.c diff -u src/sys/arch/x68k/dev/bmd.c:1.16 src/sys/arch/x68k/dev/bmd.c:1.17 --- src/sys/arch/x68k/dev/bmd.c:1.16 Thu Dec 18 05:56:42 2008 +++ src/sys/arch/x68k/dev/bmd.c Sun Aug 8 09:30:29 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: bmd.c,v 1.16 2008/12/18 05:56:42 isaki Exp $ */ +/* $NetBSD: bmd.c,v 1.17 2010/08/08 09:30:29 isaki Exp $ */ /* * Copyright (c) 2002 Tetsuya Isaki. All rights reserved. @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: bmd.c,v 1.16 2008/12/18 05:56:42 isaki Exp $); +__KERNEL_RCSID(0, $NetBSD: bmd.c,v 1.17 2010/08/08 09:30:29 isaki Exp $); #include sys/param.h #include sys/systm.h @@ -124,6 +124,8 @@ struct intio_attach_args *ia = aux; bus_space_tag_t iot = ia-ia_bst; bus_space_handle_t ioh; + int window; + int r; if (ia-ia_addr == INTIOCF_ADDR_DEFAULT) ia-ia_addr = BMD_ADDR1; @@ -132,6 +134,7 @@ if (ia-ia_addr != BMD_ADDR1 ia-ia_addr != BMD_ADDR2) return (0); + /* Check CTRL addr */ if (badaddr((void *)IIOV(ia-ia_addr))) return (0); @@ -139,8 +142,17 @@ if (bus_space_map(iot, ia-ia_addr, ia-ia_size, 0, ioh)) return (0); + /* Check window addr */ + r = bus_space_read_1(iot, ioh, BMD_CTRL); bus_space_unmap(iot, ioh, ia-ia_size); + if ((r BMD_CTRL_WINDOW)) + window = 0xef; + else + window = 0xee; + if (badaddr((void *)IIOV(window))) + return (0); + return (1); }
CVS commit: src/sys/arch/arm/xscale
Module Name:src Committed By: kiyohara Date: Sun Aug 8 09:33:36 UTC 2010 Modified Files: src/sys/arch/arm/xscale: pxa2x0_lcd.c Log Message: Must disable LCD Controller in pxa2x0_lcd_attach_sub(), if already enabled. We wait to become disable LCD in pxa2x0_lcd_initialize(). To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/arm/xscale/pxa2x0_lcd.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/xscale/pxa2x0_lcd.c diff -u src/sys/arch/arm/xscale/pxa2x0_lcd.c:1.28 src/sys/arch/arm/xscale/pxa2x0_lcd.c:1.29 --- src/sys/arch/arm/xscale/pxa2x0_lcd.c:1.28 Sat Mar 13 11:15:52 2010 +++ src/sys/arch/arm/xscale/pxa2x0_lcd.c Sun Aug 8 09:33:35 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pxa2x0_lcd.c,v 1.28 2010/03/13 11:15:52 bsh Exp $ */ +/* $NetBSD: pxa2x0_lcd.c,v 1.29 2010/08/08 09:33:35 kiyohara Exp $ */ /* * Copyright (c) 2002 Genetec Corporation. All rights reserved. @@ -38,7 +38,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pxa2x0_lcd.c,v 1.28 2010/03/13 11:15:52 bsh Exp $); +__KERNEL_RCSID(0, $NetBSD: pxa2x0_lcd.c,v 1.29 2010/08/08 09:33:35 kiyohara Exp $); #include sys/param.h #include sys/systm.h @@ -249,6 +249,9 @@ return; } + /* Must disable LCD Controller here, if already enabled. */ + bus_space_write_4(iot, ioh, LCDC_LCCR0, 0); + pxa2x0_lcd_initialize(sc, geom); #if NWSDISPLAY 0
CVS commit: src/sys/arch/sandpoint/stand/netboot
Module Name:src Committed By: phx Date: Sun Aug 8 11:54:46 UTC 2010 Modified Files: src/sys/arch/sandpoint/stand/netboot: dsk.c main.c siisata.c Log Message: Minor source cleanup. Suggested by Kiyohara. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/sandpoint/stand/netboot/dsk.c cvs rdiff -u -r1.34 -r1.35 src/sys/arch/sandpoint/stand/netboot/main.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/sandpoint/stand/netboot/siisata.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/sandpoint/stand/netboot/dsk.c diff -u src/sys/arch/sandpoint/stand/netboot/dsk.c:1.3 src/sys/arch/sandpoint/stand/netboot/dsk.c:1.4 --- src/sys/arch/sandpoint/stand/netboot/dsk.c:1.3 Fri Jul 23 20:01:27 2010 +++ src/sys/arch/sandpoint/stand/netboot/dsk.c Sun Aug 8 11:54:45 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: dsk.c,v 1.3 2010/07/23 20:01:27 phx Exp $ */ +/* $NetBSD: dsk.c,v 1.4 2010/08/08 11:54:45 phx Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -365,6 +365,7 @@ const char *err; int error; +return EIO; /*@@@*/ l = d-dvops; n = d-unittag; p = (uint16_t *)buf; Index: src/sys/arch/sandpoint/stand/netboot/main.c diff -u src/sys/arch/sandpoint/stand/netboot/main.c:1.34 src/sys/arch/sandpoint/stand/netboot/main.c:1.35 --- src/sys/arch/sandpoint/stand/netboot/main.c:1.34 Sat Jun 26 21:45:49 2010 +++ src/sys/arch/sandpoint/stand/netboot/main.c Sun Aug 8 11:54:45 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.34 2010/06/26 21:45:49 phx Exp $ */ +/* $NetBSD: main.c,v 1.35 2010/08/08 11:54:45 phx Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -151,7 +151,7 @@ if (i = sizeof(bootargs) / sizeof(bootargs[0])) break; /* break on first unknown string */ } - if (n == argc) + if (n = argc) bname = BNAME_DEFAULT; else { bname = argv[n]; Index: src/sys/arch/sandpoint/stand/netboot/siisata.c diff -u src/sys/arch/sandpoint/stand/netboot/siisata.c:1.11 src/sys/arch/sandpoint/stand/netboot/siisata.c:1.12 --- src/sys/arch/sandpoint/stand/netboot/siisata.c:1.11 Fri Jul 23 20:04:52 2010 +++ src/sys/arch/sandpoint/stand/netboot/siisata.c Sun Aug 8 11:54:46 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: siisata.c,v 1.11 2010/07/23 20:04:52 phx Exp $ */ +/* $NetBSD: siisata.c,v 1.12 2010/08/08 11:54:46 phx Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -58,9 +58,10 @@ void * siisata_init(unsigned tag, void *data) { - unsigned val; + unsigned val, cls; int nchan, n; struct dkdev_ata *l; + static int ba5bccregs[] = { 0x40, 0x44, 0x240, 0x244 }; l = alloc(sizeof(struct dkdev_ata)); memset(l, 0, sizeof(struct dkdev_ata)); @@ -77,17 +78,24 @@ val = pcicfgread(tag, PCI_ID_REG); if ((PCI_PRODUCT(val) 0xf) == 0x2) { /* 3112/3512 */ + /* reset BA5 indirect access enable */ + val = pcicfgread(tag, 0x40); + pcicfgwrite(tag, 0x40, val ~02); + /* reset everything, enable BA5 access */ + pcicfgwrite(tag, 0x88, 0x100f3); + delay(50 * 1000); + pcicfgwrite(tag, 0x88, 0x1); + delay(50 * 1000); l-chan[0].cmd = l-bar[0]; l-chan[0].ctl = l-chan[0].alt = l-bar[1] | 02; l-chan[0].dma = l-bar[4] + 0x0; l-chan[1].cmd = l-bar[2]; l-chan[1].ctl = l-chan[1].alt = l-bar[3] | 02; l-chan[1].dma = l-bar[4] + 0x8; - /* assume BA5 access is possible */ nchan = 2; } else { - /* 3114 */ + /* 3114 - assume BA5 access is possible */ l-chan[0].cmd = l-bar[5] + 0x080; l-chan[0].ctl = l-chan[0].alt = (l-bar[5] + 0x088) | 02; l-chan[1].cmd = l-bar[5] + 0x0c0; @@ -98,10 +106,40 @@ l-chan[3].ctl = l-chan[3].alt = (l-bar[5] + 0x2c8) | 02; nchan = 4; } + + /* fixup cache line */ + cls = (pcicfgread(tag, 0xc) 0xff) 2; + if (cls 224) { + cls = (pcicfgread(tag, 0xc) 0xff) | (2242); + pcicfgwrite(tag, 0xc, cls); + cls = 224; + } else if (cls 32) + cls = 32; + cls = (cls + 31) / 32; + for (n = 0; n nchan; n++) { + val = in32rb(l-bar[5] + ba5bccregs[n]); + if ((val 0x7) cls) + out32rb(l-bar[5] + ba5bccregs[n], (val 0x07) | cls); + } + + /* detect presence */ for (n = 0; n nchan; n++) { l-presense[n] = satapresense(l, n); if (l-presense[n]) printf(port %d device present\n, n); } + + out32rb(l-bar[5] + 0xb4, 01); + out32rb(l-bar[5] + 0xf4, 01); + out32rb(l-bar[5] + 0xa4, 0x328a); + out32rb(l-bar[5] + 0xe4, 0x328a); + + for (val=0; val0x100; val+=4) { + if ((val 0xf) == 0) + printf(0x%02x:,val); + printf( 0x%08x,pcicfgread(tag,val)); + if ((val 0xf) == 0xc) + printf(\n); + } return l; }
CVS commit: src/sys/arch/sandpoint/stand/netboot
Module Name:src Committed By: phx Date: Sun Aug 8 11:58:26 UTC 2010 Modified Files: src/sys/arch/sandpoint/stand/netboot: dsk.c siisata.c Log Message: Erroneously committed test code. Reverted to previous revision. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/sandpoint/stand/netboot/dsk.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/sandpoint/stand/netboot/siisata.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/sandpoint/stand/netboot/dsk.c diff -u src/sys/arch/sandpoint/stand/netboot/dsk.c:1.4 src/sys/arch/sandpoint/stand/netboot/dsk.c:1.5 --- src/sys/arch/sandpoint/stand/netboot/dsk.c:1.4 Sun Aug 8 11:54:45 2010 +++ src/sys/arch/sandpoint/stand/netboot/dsk.c Sun Aug 8 11:58:26 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: dsk.c,v 1.4 2010/08/08 11:54:45 phx Exp $ */ +/* $NetBSD: dsk.c,v 1.5 2010/08/08 11:58:26 phx Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -365,7 +365,6 @@ const char *err; int error; -return EIO; /*@@@*/ l = d-dvops; n = d-unittag; p = (uint16_t *)buf; Index: src/sys/arch/sandpoint/stand/netboot/siisata.c diff -u src/sys/arch/sandpoint/stand/netboot/siisata.c:1.12 src/sys/arch/sandpoint/stand/netboot/siisata.c:1.13 --- src/sys/arch/sandpoint/stand/netboot/siisata.c:1.12 Sun Aug 8 11:54:46 2010 +++ src/sys/arch/sandpoint/stand/netboot/siisata.c Sun Aug 8 11:58:26 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: siisata.c,v 1.12 2010/08/08 11:54:46 phx Exp $ */ +/* $NetBSD: siisata.c,v 1.13 2010/08/08 11:58:26 phx Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -58,10 +58,9 @@ void * siisata_init(unsigned tag, void *data) { - unsigned val, cls; + unsigned val; int nchan, n; struct dkdev_ata *l; - static int ba5bccregs[] = { 0x40, 0x44, 0x240, 0x244 }; l = alloc(sizeof(struct dkdev_ata)); memset(l, 0, sizeof(struct dkdev_ata)); @@ -78,24 +77,17 @@ val = pcicfgread(tag, PCI_ID_REG); if ((PCI_PRODUCT(val) 0xf) == 0x2) { /* 3112/3512 */ - /* reset BA5 indirect access enable */ - val = pcicfgread(tag, 0x40); - pcicfgwrite(tag, 0x40, val ~02); - /* reset everything, enable BA5 access */ - pcicfgwrite(tag, 0x88, 0x100f3); - delay(50 * 1000); - pcicfgwrite(tag, 0x88, 0x1); - delay(50 * 1000); l-chan[0].cmd = l-bar[0]; l-chan[0].ctl = l-chan[0].alt = l-bar[1] | 02; l-chan[0].dma = l-bar[4] + 0x0; l-chan[1].cmd = l-bar[2]; l-chan[1].ctl = l-chan[1].alt = l-bar[3] | 02; l-chan[1].dma = l-bar[4] + 0x8; + /* assume BA5 access is possible */ nchan = 2; } else { - /* 3114 - assume BA5 access is possible */ + /* 3114 */ l-chan[0].cmd = l-bar[5] + 0x080; l-chan[0].ctl = l-chan[0].alt = (l-bar[5] + 0x088) | 02; l-chan[1].cmd = l-bar[5] + 0x0c0; @@ -106,40 +98,10 @@ l-chan[3].ctl = l-chan[3].alt = (l-bar[5] + 0x2c8) | 02; nchan = 4; } - - /* fixup cache line */ - cls = (pcicfgread(tag, 0xc) 0xff) 2; - if (cls 224) { - cls = (pcicfgread(tag, 0xc) 0xff) | (2242); - pcicfgwrite(tag, 0xc, cls); - cls = 224; - } else if (cls 32) - cls = 32; - cls = (cls + 31) / 32; - for (n = 0; n nchan; n++) { - val = in32rb(l-bar[5] + ba5bccregs[n]); - if ((val 0x7) cls) - out32rb(l-bar[5] + ba5bccregs[n], (val 0x07) | cls); - } - - /* detect presence */ for (n = 0; n nchan; n++) { l-presense[n] = satapresense(l, n); if (l-presense[n]) printf(port %d device present\n, n); } - - out32rb(l-bar[5] + 0xb4, 01); - out32rb(l-bar[5] + 0xf4, 01); - out32rb(l-bar[5] + 0xa4, 0x328a); - out32rb(l-bar[5] + 0xe4, 0x328a); - - for (val=0; val0x100; val+=4) { - if ((val 0xf) == 0) - printf(0x%02x:,val); - printf( 0x%08x,pcicfgread(tag,val)); - if ((val 0xf) == 0xc) - printf(\n); - } return l; }
CVS commit: src/doc
Module Name:src Committed By: wiz Date: Sun Aug 8 13:42:44 UTC 2010 Modified Files: src/doc: 3RDPARTY Log Message: gcc-4.5.1 out. To generate a diff of this commit: cvs rdiff -u -r1.774 -r1.775 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.774 src/doc/3RDPARTY:1.775 --- src/doc/3RDPARTY:1.774 Fri Aug 6 19:39:26 2010 +++ src/doc/3RDPARTY Sun Aug 8 13:42:44 2010 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.774 2010/08/06 19:39:26 jruoho Exp $ +# $NetBSD: 3RDPARTY,v 1.775 2010/08/08 13:42:44 wiz Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -332,7 +332,7 @@ Package: gcc Version: 4.1.3-20080831 -Current Vers: 4.5.0 +Current Vers: 4.5.1 Maintainer: FSF Archive Site: ftp://ftp.gnu.org/gnu/gcc/ Home Page: http://www.gnu.org/software/gcc/
CVS commit: src/share/man/man9
Module Name:src Committed By: pgoyette Date: Sun Aug 8 14:26:23 UTC 2010 Modified Files: src/share/man/man9: module.9 Log Message: Filling in a few more gaps. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/share/man/man9/module.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/module.9 diff -u src/share/man/man9/module.9:1.8 src/share/man/man9/module.9:1.9 --- src/share/man/man9/module.9:1.8 Sat Aug 7 22:21:30 2010 +++ src/share/man/man9/module.9 Sun Aug 8 14:26:22 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: module.9,v 1.8 2010/08/07 22:21:30 pgoyette Exp $ +.\ $NetBSD: module.9,v 1.9 2010/08/08 14:26:22 pgoyette Exp $ .\ .\ Copyright (c) 2010 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 August 7, 2010 +.Dd August 8, 2010 .Dt MODULE 9 .Os .Sh NAME @@ -131,7 +131,7 @@ .Dv MODULE_CMD_INIT command, the .Fa data -argument is used to pass the module's +argument is used to pass a pointer to the module's .Xr prop_dictionary 3 . For the .Dv MODULE_CMD_STAT @@ -141,7 +141,9 @@ .Pp The __link_set mechanism is used to enable the .Nm -subsystem to locate the structure. +subsystem to locate the +.Vt modinfo_t +structure. .It Fn module_load name flags props class Load a module, link it into the running kernel, and call the module's .Fn modcmd @@ -173,11 +175,11 @@ argument can include: .Bl -tag -width MODCTL_LOAD_FORCE -offset indent .It Dv MODCTL_NO_PROP -.\ -.\ XXX: Document this. -.\ +When loading a module from the file-system, do not attempt to locate a +corresponding prop_dictionary file. .It Dv MODCTL_LOAD_FORCE -Force loading of disabled built-in modules. +Force loading of disabled built-in modules and modules built for a +different version of the operating system. .El .Pp The @@ -186,21 +188,33 @@ module's .Fn modcmd routine. +If a module is being loaded from the file-system, and the +.Dv MODCTL_NO_PROP +flag is not set, the system searches for a file with the same name as the +module file, but with the suffix .prop. +If this file is found, the prop_dictionary it contains is loaded and +passed to the module's +.Fn modcmd +routine. .Pp The .Fa class argument can be any of: .Pp -.\ -.\ XXX: Document these. -.\ -.Bl -tag -width MODCTL_LOAD_FORCE -offset indent -compact +.Bl -tag -width MODULE_CLASS_SECMODEL -offset indent -compact .It Dv MODULE_CLASS_ANY -.It Dv MODULE_CLASS_MISC -.It Dv MODULE_CLASS_VFS .It Dv MODULE_CLASS_DRIVER +Device driver .It Dv MODULE_CLASS_EXEC -.It Dv MODULE_CLASS_SECMODEL +Executable image handler +.It Dv MODULE_CLASS_MISC +Miscellaneous module +.It Dv MODULE_CLASS_SECMODEL +Security model (see +.Xr secmodel 9 +for more details) +.It Dv MODULE_CLASS_VFS +Virtual file system .El .Pp If the class is not @@ -208,6 +222,9 @@ the class of the module being loaded must match the requested .Fa class . +Except when verifying a module's class when it is being loaded, module +classes are transparent to the module subsystem. +They are provided only for the benefit of the subsystem's clients. .Pp The .Fn module_load
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Sun Aug 8 15:23:28 UTC 2010 Modified Files: src/share/man/man9: module.9 Log Message: Remove trailing whitespace, and mark up file name suffix. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/share/man/man9/module.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/module.9 diff -u src/share/man/man9/module.9:1.9 src/share/man/man9/module.9:1.10 --- src/share/man/man9/module.9:1.9 Sun Aug 8 14:26:22 2010 +++ src/share/man/man9/module.9 Sun Aug 8 15:23:28 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: module.9,v 1.9 2010/08/08 14:26:22 pgoyette Exp $ +.\ $NetBSD: module.9,v 1.10 2010/08/08 15:23:28 wiz Exp $ .\ .\ Copyright (c) 2010 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -191,7 +191,8 @@ If a module is being loaded from the file-system, and the .Dv MODCTL_NO_PROP flag is not set, the system searches for a file with the same name as the -module file, but with the suffix .prop. +module file, but with the suffix +.Dq Pa .prop . If this file is found, the prop_dictionary it contains is loaded and passed to the module's .Fn modcmd @@ -209,7 +210,7 @@ Executable image handler .It Dv MODULE_CLASS_MISC Miscellaneous module -.It Dv MODULE_CLASS_SECMODEL +.It Dv MODULE_CLASS_SECMODEL Security model (see .Xr secmodel 9 for more details)
CVS commit: src/sys/arch/sh3/dev
Module Name:src Committed By: chs Date: Sun Aug 8 16:23:40 UTC 2010 Modified Files: src/sys/arch/sh3/dev: adc.c Log Message: make this compile with DIAGNOSTIC. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/sh3/dev/adc.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/sh3/dev/adc.c diff -u src/sys/arch/sh3/dev/adc.c:1.12 src/sys/arch/sh3/dev/adc.c:1.13 --- src/sys/arch/sh3/dev/adc.c:1.12 Thu Apr 30 05:20:30 2009 +++ src/sys/arch/sh3/dev/adc.c Sun Aug 8 16:23:40 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: adc.c,v 1.12 2009/04/30 05:20:30 nonaka Exp $ */ +/* $NetBSD: adc.c,v 1.13 2010/08/08 16:23:40 chs Exp $ */ /* * Copyright (c) 2003 Valeriy E. Ushakov @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: adc.c,v 1.12 2009/04/30 05:20:30 nonaka Exp $); +__KERNEL_RCSID(0, $NetBSD: adc.c,v 1.13 2010/08/08 16:23:40 chs Exp $); #include sys/param.h #include sys/kernel.h @@ -141,11 +141,11 @@ csr = ADC_(CSR); if ((csr SH7709_ADCSR_ADST) != 0) { /* another conversion is in progress?! */ - snprintb(bits, sizeof(buts), SH7709_ADCSR_BITS, csr); + snprintb(bits, sizeof(bits), SH7709_ADCSR_BITS, csr); printf(adc_sample_channel(%d): CSR=%s, chan, bits); cr = ADC_(CR); cr = ~0x07; /* three lower bits always read as 1s */ - snprintb(bits, sizeof(buts), SH7709_ADCR_BITS, cr); + snprintb(bits, sizeof(bits), SH7709_ADCR_BITS, cr); printf(, CR=%s\n, bits); return (-1); }
CVS commit: src/sys/arch/hpcsh/conf
Module Name:src Committed By: chs Date: Sun Aug 8 16:25:49 UTC 2010 Modified Files: src/sys/arch/hpcsh/conf: DEBUG Log Message: remove dup options KTRACE. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hpcsh/conf/DEBUG 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/hpcsh/conf/DEBUG diff -u src/sys/arch/hpcsh/conf/DEBUG:1.4 src/sys/arch/hpcsh/conf/DEBUG:1.5 --- src/sys/arch/hpcsh/conf/DEBUG:1.4 Sun Dec 11 12:17:36 2005 +++ src/sys/arch/hpcsh/conf/DEBUG Sun Aug 8 16:25:49 2010 @@ -1,7 +1,7 @@ # # kernel config file for debugging. # -# $NetBSD: DEBUG,v 1.4 2005/12/11 12:17:36 christos Exp $ +# $NetBSD: DEBUG,v 1.5 2010/08/08 16:25:49 chs Exp $ # include arch/hpcsh/conf/GENERIC @@ -21,5 +21,4 @@ #options KSTACK_DEBUG options DIAGNOSTIC # extra kernel debugging checks options DEBUG # extra kernel debugging support -options KTRACE # system call tracing support options PCMCIAVERBOSE # verbose PCMCIA configuration messages
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: gsutre Date: Sun Aug 8 16:26:47 UTC 2010 Modified Files: src/sys/dev/acpi: acpi_pci.c Log Message: acpi_pcidev_scan: discard invalid PCI addresses. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/dev/acpi/acpi_pci.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/dev/acpi/acpi_pci.c diff -u src/sys/dev/acpi/acpi_pci.c:1.12 src/sys/dev/acpi/acpi_pci.c:1.13 --- src/sys/dev/acpi/acpi_pci.c:1.12 Wed Jun 9 04:20:10 2010 +++ src/sys/dev/acpi/acpi_pci.c Sun Aug 8 16:26:47 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_pci.c,v 1.12 2010/06/09 04:20:10 mrg Exp $ */ +/* $NetBSD: acpi_pci.c,v 1.13 2010/08/08 16:26:47 gsutre Exp $ */ /* * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_pci.c,v 1.12 2010/06/09 04:20:10 mrg Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_pci.c,v 1.13 2010/08/08 16:26:47 gsutre Exp $); #include sys/param.h #include sys/device.h @@ -163,11 +163,11 @@ ACPI_INTEGER val; ACPI_STATUS rv; + ad-ad_pciinfo = NULL; + if (ad-ad_devinfo-Type != ACPI_TYPE_DEVICE || - !(ad-ad_devinfo-Valid ACPI_VALID_ADR)) { - ad-ad_pciinfo = NULL; + !(ad-ad_devinfo-Valid ACPI_VALID_ADR)) goto rec; - } if (ad-ad_devinfo-Flags ACPI_PCI_ROOT_BRIDGE) { @@ -200,6 +200,14 @@ ap-ap_device = ACPI_HILODWORD(ad-ad_devinfo-Address); ap-ap_function = ACPI_LOLODWORD(ad-ad_devinfo-Address); + if (ap-ap_bus 255 || ap-ap_device 31 || + ap-ap_function 7) { + aprint_error_dev(ad-ad_root, + invalid PCI address for %s\n, ad-ad_name); + kmem_free(ap, sizeof(*ap)); + goto rec; + } + ap-ap_bridge = true; ap-ap_downbus = ap-ap_bus; @@ -228,6 +236,13 @@ ap-ap_device = ACPI_HILODWORD(ad-ad_devinfo-Address); ap-ap_function = ACPI_LOLODWORD(ad-ad_devinfo-Address); + if (ap-ap_device 31 || ap-ap_function 7) { + aprint_error_dev(ad-ad_root, + invalid PCI address for %s\n, ad-ad_name); + kmem_free(ap, sizeof(*ap)); + goto rec; + } + /* * Check whether this device is a PCI-to-PCI * bridge and get its secondary bus number. @@ -256,8 +271,8 @@ * acpi_pcidev_ppb_downbus: * * Retrieve the secondary bus number of the PCI-to-PCI bridge having the - * given PCI id. If successful, return AE_OK and fill *busp. Otherwise, - * return an exception code and leave *busp unchanged. + * given PCI id. If successful, return AE_OK and fill *downbus. + * Otherwise, return an exception code and leave *downbus unchanged. * * XXX Need to deal with PCI segment groups (see also acpica/OsdHardware.c). */
CVS commit: src/sys/arch/hpc/include
Module Name:src Committed By: chs Date: Sun Aug 8 16:27:30 UTC 2010 Modified Files: src/sys/arch/hpc/include: debug.h Log Message: fix build problem. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hpc/include/debug.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/hpc/include/debug.h diff -u src/sys/arch/hpc/include/debug.h:1.9 src/sys/arch/hpc/include/debug.h:1.10 --- src/sys/arch/hpc/include/debug.h:1.9 Mon Apr 28 20:23:20 2008 +++ src/sys/arch/hpc/include/debug.h Sun Aug 8 16:27:30 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: debug.h,v 1.9 2008/04/28 20:23:20 martin Exp $ */ +/* $NetBSD: debug.h,v 1.10 2010/08/08 16:27:30 chs Exp $ */ /*- * Copyright (c) 1999-2002 The NetBSD Foundation, Inc. @@ -114,8 +114,8 @@ void dbg_banner_line(void); #define dbg_banner_function() \ { \ - const char funcname[] = __func__;\ - dbg_banner_title(funcname, sizeof funcname); \ + const char *funcname = __func__;\ + dbg_banner_title(funcname, strlen (funcname)); \ } /* HPC_DEBUG_LCD */
CVS commit: src/sys/arch/hpcsh/dev
Module Name:src Committed By: chs Date: Sun Aug 8 16:51:34 UTC 2010 Modified Files: src/sys/arch/hpcsh/dev: psh3tp.c Log Message: make this compile with DIAGNOSTIC and PSH3TP_DEBUG. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/hpcsh/dev/psh3tp.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/hpcsh/dev/psh3tp.c diff -u src/sys/arch/hpcsh/dev/psh3tp.c:1.14 src/sys/arch/hpcsh/dev/psh3tp.c:1.15 --- src/sys/arch/hpcsh/dev/psh3tp.c:1.14 Sat Jul 24 15:33:12 2010 +++ src/sys/arch/hpcsh/dev/psh3tp.c Sun Aug 8 16:51:34 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: psh3tp.c,v 1.14 2010/07/24 15:33:12 tsutsui Exp $ */ +/* $NetBSD: psh3tp.c,v 1.15 2010/08/08 16:51:34 chs Exp $ */ /* * Copyright (c) 2005 KIYOHARA Takashi * All rights reserved. @@ -213,7 +213,7 @@ psh3tp_enable(struct psh3tp_softc *sc __unused) { - DPRINTFN(2, (%s: enable\n, sc-sc_dev.dv_xname)); + DPRINTFN(2, (%s: enable\n, device_xname(sc-sc_dev))); intc_intr_enable(SH7709_INTEVT2_IRQ2); } @@ -226,7 +226,7 @@ psh3tp_disable(struct psh3tp_softc *sc) { - DPRINTFN(2, (%s: disable\n, sc-sc_dev.dv_xname)); + DPRINTFN(2, (%s: disable\n, device_xname(sc-sc_dev))); intc_intr_disable(SH7709_INTEVT2_IRQ2); callout_stop(sc-sc_touch_ch); } @@ -257,7 +257,7 @@ { struct psh3tp_softc *sc = (struct psh3tp_softc *)cookie; - DPRINTFN(1, (%s: wsmouse enable\n, sc-sc_dev.dv_xname)); + DPRINTFN(1, (%s: wsmouse enable\n, device_xname(sc-sc_dev))); return psh3tp_set_enable(sc, 1, PSH3TP_WSMOUSE_ENABLED); } @@ -267,7 +267,7 @@ { struct psh3tp_softc *sc = (struct psh3tp_softc *)cookie; - DPRINTFN(1, (%s: wsmouse disable\n, sc-sc_dev.dv_xname)); + DPRINTFN(1, (%s: wsmouse disable\n, device_xname(sc-sc_dev))); psh3tp_set_enable(sc, 0, PSH3TP_WSMOUSE_ENABLED); } @@ -284,13 +284,13 @@ irr0 = _reg_read_1(SH7709_IRR0); if ((irr0 IRR0_IRQ2) == 0) { #ifdef DIAGNOSTIC - printf(%s: irr0 %02x?\n, sc-sc_dev.dv_xname, irr0); + printf(%s: irr0 %02x?\n, device_xname(sc-sc_dev), irr0); #endif return 0; } if (!sc-sc_enabled) { - DPRINTFN(1, (%s: intr: !sc_enabled\n, sc-sc_dev.dv_xname)); + DPRINTFN(1, (%s: intr: !sc_enabled\n, device_xname(sc-sc_dev))); intc_intr_disable(SH7709_INTEVT2_IRQ2); goto served; } @@ -318,7 +318,8 @@ } if (--tremor_timeout == 0) { - DPRINTF((%s: tremor timeout!\n, sc-sc_dev.dv_xname)); + DPRINTF((%s: tremor timeout!\n, + device_xname(sc-sc_dev))); goto served; } } while (steady TREMOR_THRESHOLD); @@ -334,7 +335,7 @@ callout_reset(sc-sc_touch_ch, hz/32, psh3tp_start_polling, sc); } else - DPRINTFN(1, (%s: tremor\n, sc-sc_dev.dv_xname)); + DPRINTFN(1, (%s: tremor\n, device_xname(sc-sc_dev))); served: /* clear the interrupt */ _reg_write_1(SH7709_IRR0, irr0 ~IRR0_IRQ2); @@ -357,14 +358,14 @@ phdr = _reg_read_1(SH7709_PHDR); if ((phdr PHDR_TP_PEN_UP) == PHDR_TP_PEN_UP) { DPRINTFN(2, (%s: start: pen is not down\n, - sc-sc_dev.dv_xname)); + device_xname(sc-sc_dev))); psh3tp_stop_polling(sc); return; } psh3tp_get_raw_xy(rawx, rawy); DPRINTFN(2, (%s: start: %4d %4d - , - sc-sc_dev.dv_xname, rawx, rawy)); + device_xname(sc-sc_dev), rawx, rawy)); if (sc-sc_enabled PSH3TP_WSMOUSE_ENABLED) { DPRINTFN(2, (mouse\n)); @@ -388,7 +389,7 @@ { uint8_t irr0; - DPRINTFN(2, (%s: stop\n, sc-sc_dev.dv_xname)); + DPRINTFN(2, (%s: stop\n, device_xname(sc-sc_dev))); /* clear pending interrupt signal before re-enabling the interrupt */ irr0 = _reg_read_1(SH7709_IRR0); @@ -414,7 +415,7 @@ if (!sc-sc_enabled) { DPRINTFN(1, (%s: wsmouse callout: !sc_enabled\n, - sc-sc_dev.dv_xname)); + device_xname(sc-sc_dev))); splx(s); return; } @@ -444,7 +445,7 @@ tpcalib_trans(sc-sc_tpcalib, rawx, rawy, x, y); DPRINTFN(3, (%s: %4d %4d - %3d %3d\n, - sc-sc_dev.dv_xname, rawx, rawy, x, y)); + device_xname(sc-sc_dev), rawx, rawy, x, y)); wsmouse_input(sc-sc_wsmousedev, 1, /* button */
CVS commit: src/sys
Module Name:src Committed By: jruoho Date: Sun Aug 8 16:58:42 UTC 2010 Modified Files: src/sys/arch/x86/acpi: acpi_cpu_md.c src/sys/arch/x86/include: cpuvar.h src/sys/arch/x86/x86: est.c src/sys/dev/acpi: TODO acpi_cpu.c acpi_cpu.h acpi_cpu_cstate.c src/sys/modules/acpicpu: Makefile Added Files: src/sys/dev/acpi: acpi_cpu_pstate.c Log Message: Merge P-state support for acpicpu(4). Remarks: 1.All processors (x86 or not) for which the vendor has implemented ACPI I/O access routines are supported. Native instructions are currently supported only for Intel's Enhanced Speedstep. Code for PowerNow! (AMD) will be merged later. Native support for VIA's PowerSaver will be investigated. 2.Backwards compatibility with existing userland code is maintained. Comparable to the case with cpu_idle(9), the ACPI CPU driver installs alternative functions for the existing sysctl(8) controls. The native behavior (if any) is restored upon detachment. 3.The dynamic nature of ACPI-provided P-states needs more investigation. The maximum frequency induced (but not forced) by the firmware may change dynamically. Currently, the sysctl(8) controls error out with a value larger than the dynamic maximum. The code itself does not however yet react to the notifications from the firmware by changing the frequencies in-place. Presumably the system administrator should be able to choose whether to use dynamic or static frequencies. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/x86/acpi/acpi_cpu_md.c cvs rdiff -u -r1.34 -r1.35 src/sys/arch/x86/include/cpuvar.h cvs rdiff -u -r1.15 -r1.16 src/sys/arch/x86/x86/est.c cvs rdiff -u -r1.11 -r1.12 src/sys/dev/acpi/TODO src/sys/dev/acpi/acpi_cpu.c cvs rdiff -u -r1.8 -r1.9 src/sys/dev/acpi/acpi_cpu.h cvs rdiff -u -r1.14 -r1.15 src/sys/dev/acpi/acpi_cpu_cstate.c cvs rdiff -u -r0 -r1.1 src/sys/dev/acpi/acpi_cpu_pstate.c cvs rdiff -u -r1.1 -r1.2 src/sys/modules/acpicpu/Makefile 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/acpi/acpi_cpu_md.c diff -u src/sys/arch/x86/acpi/acpi_cpu_md.c:1.4 src/sys/arch/x86/acpi/acpi_cpu_md.c:1.5 --- src/sys/arch/x86/acpi/acpi_cpu_md.c:1.4 Wed Aug 4 16:16:55 2010 +++ src/sys/arch/x86/acpi/acpi_cpu_md.c Sun Aug 8 16:58:41 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_md.c,v 1.4 2010/08/04 16:16:55 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_md.c,v 1.5 2010/08/08 16:58:41 jruoho Exp $ */ /*- * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi @@ -27,25 +27,33 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu_md.c,v 1.4 2010/08/04 16:16:55 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu_md.c,v 1.5 2010/08/08 16:58:41 jruoho Exp $); #include sys/param.h #include sys/bus.h #include sys/kcore.h +#include sys/sysctl.h #include sys/xcall.h #include x86/cpu.h +#include x86/cpufunc.h +#include x86/cputypes.h #include x86/cpuvar.h +#include x86/cpu_msr.h #include x86/machdep.h -#include x86/cputypes.h #include dev/acpi/acpica.h #include dev/acpi/acpi_cpu.h -static char native_idle_text[16]; -void (*native_idle)(void) = NULL; +static char native_idle_text[16]; +void (*native_idle)(void) = NULL; -extern uint32_t cpus_running; +static int acpicpu_md_pstate_sysctl_get(SYSCTLFN_PROTO); +static int acpicpu_md_pstate_sysctl_set(SYSCTLFN_PROTO); +static int acpicpu_md_pstate_sysctl_all(SYSCTLFN_PROTO); + +extern uint32_t cpus_running; +extern struct acpicpu_softc **acpicpu_sc; uint32_t acpicpu_md_cap(void) @@ -68,6 +76,12 @@ if ((ci-ci_feat_val[1] CPUID2_MONITOR) != 0) val |= ACPICPU_PDC_C_C1_FFH | ACPICPU_PDC_C_C2C3_FFH; + /* + * Set native P-states if EST is available. + */ +if ((ci-ci_feat_val[1] CPUID2_EST) != 0) + val |= ACPICPU_PDC_P_FFH; + return val; } @@ -81,13 +95,17 @@ val |= ACPICPU_FLAG_C_BM; if ((ci-ci_feat_val[1] CPUID2_MONITOR) != 0) - val |= ACPICPU_FLAG_C_MWAIT; + val |= ACPICPU_FLAG_C_FFH; switch (cpu_vendor) { case CPUVENDOR_INTEL: + val |= ACPICPU_FLAG_C_BM | ACPICPU_FLAG_C_ARB; + if ((ci-ci_feat_val[1] CPUID2_EST) != 0) + val |= ACPICPU_FLAG_P_FFH; + /* * Bus master arbitration is not * needed on some recent Intel CPUs. @@ -124,8 +142,6 @@ { const size_t size = sizeof(native_idle_text); - KASSERT(native_idle == NULL); - x86_disable_intr(); x86_cpu_idle_get(native_idle, native_idle_text, size); x86_enable_intr(); @@ -137,9 +153,6 @@ acpicpu_md_idle_start(void) { - KASSERT(native_idle != NULL); - KASSERT(native_idle_text[0] != '\0'); - x86_disable_intr(); x86_cpu_idle_set(acpicpu_cstate_idle, acpi); x86_enable_intr(); @@ -152,9 +165,6 @@ { uint64_t xc; - KASSERT(native_idle != NULL);
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Sun Aug 8 17:05:50 UTC 2010 Modified Files: src/sys/dev/acpi: acpi_cpu_pstate.c Log Message: Remove bogus check and allow all CPUs to use I/O-based P-states. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/acpi/acpi_cpu_pstate.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/dev/acpi/acpi_cpu_pstate.c diff -u src/sys/dev/acpi/acpi_cpu_pstate.c:1.1 src/sys/dev/acpi/acpi_cpu_pstate.c:1.2 --- src/sys/dev/acpi/acpi_cpu_pstate.c:1.1 Sun Aug 8 16:58:42 2010 +++ src/sys/dev/acpi/acpi_cpu_pstate.c Sun Aug 8 17:05:50 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_pstate.c,v 1.1 2010/08/08 16:58:42 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_pstate.c,v 1.2 2010/08/08 17:05:50 jruoho Exp $ */ /*- * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu_pstate.c,v 1.1 2010/08/08 16:58:42 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu_pstate.c,v 1.2 2010/08/08 17:05:50 jruoho Exp $); #include sys/param.h #include sys/kmem.h @@ -55,12 +55,6 @@ struct acpicpu_softc *sc = device_private(self); ACPI_STATUS rv; - /* - * XXX: Only Intel is currently supported. - */ - if (sc-sc_cap == 0) - return; - rv = acpicpu_pstate_pss(sc); if (ACPI_FAILURE(rv))
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Sun Aug 8 17:21:14 UTC 2010 Modified Files: src/sys/dev/acpi: files.acpi Log Message: Add P-states. (I blame the ease of using modules.) To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/dev/acpi/files.acpi 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/acpi/files.acpi diff -u src/sys/dev/acpi/files.acpi:1.77 src/sys/dev/acpi/files.acpi:1.78 --- src/sys/dev/acpi/files.acpi:1.77 Sat Aug 7 09:41:19 2010 +++ src/sys/dev/acpi/files.acpi Sun Aug 8 17:21:14 2010 @@ -1,4 +1,4 @@ -# $NetBSD: files.acpi,v 1.77 2010/08/07 09:41:19 jruoho Exp $ +# $NetBSD: files.acpi,v 1.78 2010/08/08 17:21:14 jruoho Exp $ include dev/acpi/acpica/files.acpica @@ -62,6 +62,7 @@ attach acpicpu at acpinodebus file dev/acpi/acpi_cpu.c acpicpu file dev/acpi/acpi_cpu_cstate.c acpicpu +file dev/acpi/acpi_cpu_pstate.c acpicpu # ACPI Thermal Zone device acpitz: sysmon_envsys
CVS commit: src/sys/arch
Module Name:src Committed By: chs Date: Sun Aug 8 18:13:54 UTC 2010 Modified Files: src/sys/arch/amd64/amd64: netbsd32_machdep.c src/sys/arch/i386/i386: trap.c Log Message: Fix several panics that can be caused by applications using bad segment register values with setcontext() or sigreturn(). To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sys/arch/amd64/amd64/netbsd32_machdep.c cvs rdiff -u -r1.258 -r1.259 src/sys/arch/i386/i386/trap.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/netbsd32_machdep.c diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.64 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.65 --- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.64 Wed Jul 7 01:14:52 2010 +++ src/sys/arch/amd64/amd64/netbsd32_machdep.c Sun Aug 8 18:13:54 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_machdep.c,v 1.64 2010/07/07 01:14:52 chs Exp $ */ +/* $NetBSD: netbsd32_machdep.c,v 1.65 2010/08/08 18:13:54 chs Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: netbsd32_machdep.c,v 1.64 2010/07/07 01:14:52 chs Exp $); +__KERNEL_RCSID(0, $NetBSD: netbsd32_machdep.c,v 1.65 2010/08/08 18:13:54 chs Exp $); #ifdef _KERNEL_OPT #include opt_compat_netbsd.h @@ -961,7 +961,8 @@ tf = l-l_md.md_regs; pcb = lwp_getpcb(curlwp); - if (((scp-sc_eflags ^ tf-tf_rflags) PSL_USERSTATIC) != 0) + if (((scp-sc_eflags ^ tf-tf_rflags) PSL_USERSTATIC) != 0 || + scp-sc_cs != GSEL(GUCODE32_SEL, SEL_UPL)) return EINVAL; if (scp-sc_fs != 0 !VALID_USER_DSEL32(scp-sc_fs) !(scp-sc_fs == GSEL(GUFS_SEL, SEL_UPL) pcb-pcb_fs != 0)) @@ -989,7 +990,8 @@ tf = l-l_md.md_regs; pcb = lwp_getpcb(l); - if (((gr[_REG32_EFL] ^ tf-tf_rflags) PSL_USERSTATIC) != 0) + if (((gr[_REG32_EFL] ^ tf-tf_rflags) PSL_USERSTATIC) != 0 || + gr[_REG32_CS] != GSEL(GUCODE32_SEL, SEL_UPL)) return EINVAL; if (gr[_REG32_FS] != 0 !VALID_USER_DSEL32(gr[_REG32_FS]) !(gr[_REG32_FS] == GSEL(GUFS_SEL, SEL_UPL) pcb-pcb_fs != 0)) Index: src/sys/arch/i386/i386/trap.c diff -u src/sys/arch/i386/i386/trap.c:1.258 src/sys/arch/i386/i386/trap.c:1.259 --- src/sys/arch/i386/i386/trap.c:1.258 Sun Jul 25 19:19:06 2010 +++ src/sys/arch/i386/i386/trap.c Sun Aug 8 18:13:54 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.258 2010/07/25 19:19:06 christos Exp $ */ +/* $NetBSD: trap.c,v 1.259 2010/08/08 18:13:54 chs Exp $ */ /*- * Copyright (c) 1998, 2000, 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.258 2010/07/25 19:19:06 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.259 2010/08/08 18:13:54 chs Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -442,6 +442,7 @@ * returning from a trap, syscall, or interrupt. */ +kernelfault: KSI_INIT_TRAP(ksi); ksi.ksi_signo = SIGSEGV; ksi.ksi_code = SEGV_ACCERR; @@ -759,7 +760,7 @@ goto copyfault; printf(uvm_fault(%p, %#lx, %d) - %#x\n, map, va, ftype, error); - goto we_re_toast; + goto kernelfault; } if (error == ENOMEM) { ksi.ksi_signo = SIGKILL;
CVS commit: src/sys/miscfs/genfs
Module Name:src Committed By: chs Date: Sun Aug 8 18:17:12 UTC 2010 Modified Files: src/sys/miscfs/genfs: genfs_io.c Log Message: in genfs_getpages(), mark the vnode dirty (ie. add to syncer worklist and set VI_WRMAPDIRTY) after we have busied the pages rather than before. this prevents other threads calling genfs_do_putpages() from marking the vnode clean again while we're in the process of creating new writable mappings, since such threads will wait for the page(s) to become unbusy before proceeding. fixes the problem recently reported by hannken@ on tech-kern. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/miscfs/genfs/genfs_io.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/miscfs/genfs/genfs_io.c diff -u src/sys/miscfs/genfs/genfs_io.c:1.37 src/sys/miscfs/genfs/genfs_io.c:1.38 --- src/sys/miscfs/genfs/genfs_io.c:1.37 Thu Jul 29 10:54:50 2010 +++ src/sys/miscfs/genfs/genfs_io.c Sun Aug 8 18:17:11 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: genfs_io.c,v 1.37 2010/07/29 10:54:50 hannken Exp $ */ +/* $NetBSD: genfs_io.c,v 1.38 2010/08/08 18:17:11 chs Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: genfs_io.c,v 1.37 2010/07/29 10:54:50 hannken Exp $); +__KERNEL_RCSID(0, $NetBSD: genfs_io.c,v 1.38 2010/08/08 18:17:11 chs Exp $); #include sys/param.h #include sys/systm.h @@ -62,11 +62,12 @@ static int genfs_do_io(struct vnode *, off_t, vaddr_t, size_t, int, enum uio_rw, void (*)(struct buf *)); -static inline void genfs_rel_pages(struct vm_page **, int); +static void genfs_rel_pages(struct vm_page **, int); +static void genfs_markdirty(struct vnode *); int genfs_maxdio = MAXPHYS; -static inline void +static void genfs_rel_pages(struct vm_page **pgs, int npages) { int i; @@ -85,6 +86,21 @@ mutex_exit(uvm_pageqlock); } +static void +genfs_markdirty(struct vnode *vp) +{ + struct genfs_node * const gp = VTOG(vp); + + KASSERT(mutex_owned(vp-v_interlock)); + gp-g_dirtygen++; + if ((vp-v_iflag VI_ONWORKLST) == 0) { + vn_syncer_add_to_worklist(vp, filedelay); + } + if ((vp-v_iflag (VI_WRMAP|VI_WRMAPDIRTY)) == VI_WRMAP) { + vp-v_iflag |= VI_WRMAPDIRTY; + } +} + /* * generic VM getpages routine. * Return PG_BUSY pages for the given range, @@ -186,16 +202,6 @@ } } - if (memwrite) { - gp-g_dirtygen++; - if ((vp-v_iflag VI_ONWORKLST) == 0) { - vn_syncer_add_to_worklist(vp, filedelay); - } - if ((vp-v_iflag (VI_WRMAP|VI_WRMAPDIRTY)) == VI_WRMAP) { - vp-v_iflag |= VI_WRMAPDIRTY; - } - } - /* * For PGO_LOCKED requests, just return whatever's in memory. */ @@ -236,6 +242,9 @@ genfs_node_unlock(vp); } error = (ap-a_m[ap-a_centeridx] == NULL ? EBUSY : 0); + if (error == 0 memwrite) { + genfs_markdirty(vp); + } goto out_err; } mutex_exit(uobj-vmobjlock); @@ -696,6 +705,9 @@ } } mutex_exit(uvm_pageqlock); + if (memwrite) { + genfs_markdirty(vp); + } mutex_exit(uobj-vmobjlock); if (ap-a_m != NULL) { memcpy(ap-a_m, pgs[ridx], @@ -708,7 +720,7 @@ out_err: if (has_trans) fstrans_done(vp-v_mount); - return (error); + return error; } /* @@ -1467,18 +1479,19 @@ orignpages = *ap-a_count; pgs = ap-a_m; - if (memwrite (vp-v_iflag VI_ONWORKLST) == 0) { - vn_syncer_add_to_worklist(vp, filedelay); - } if (ap-a_flags PGO_LOCKED) { uvn_findpages(uobj, origoffset, ap-a_count, ap-a_m, UFP_NOWAIT|UFP_NOALLOC| (memwrite ? UFP_NORDONLY : 0)); - return (ap-a_m[ap-a_centeridx] == NULL ? EBUSY : 0); + error = ap-a_m[ap-a_centeridx] == NULL ? EBUSY : 0; + if (error == 0 memwrite) { + genfs_markdirty(vp); + } + return error; } if (origoffset + (ap-a_centeridx PAGE_SHIFT) = vp-v_size) { mutex_exit(uobj-vmobjlock); - return (EINVAL); + return EINVAL; } if ((ap-a_flags PGO_SYNCIO) == 0) { mutex_exit(uobj-vmobjlock); @@ -1527,8 +1540,11 @@ uvm_page_unbusy(pgs, npages); } mutex_exit(uvm_pageqlock); + if (error == 0 memwrite) { + genfs_markdirty(vp); + } mutex_exit(uobj-vmobjlock); - return (error); + return error; } int
CVS commit: src/sys/arch/ia64/ia64
Module Name:src Committed By: chs Date: Sun Aug 8 18:18:58 UTC 2010 Modified Files: src/sys/arch/ia64/ia64: support.S Log Message: fix copy{in,out}{,str}() to return the error returned by uvm_fault(). part of PR 41813 that I missed earlier. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/ia64/support.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/ia64/ia64/support.S diff -u src/sys/arch/ia64/ia64/support.S:1.5 src/sys/arch/ia64/ia64/support.S:1.6 --- src/sys/arch/ia64/ia64/support.S:1.5 Fri Nov 27 03:23:10 2009 +++ src/sys/arch/ia64/ia64/support.S Sun Aug 8 18:18:58 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: support.S,v 1.5 2009/11/27 03:23:10 rmind Exp $ */ +/* $NetBSD: support.S,v 1.6 2010/08/08 18:18:58 chs Exp $ */ /*- * Copyright (c) 1998 Doug Rabson @@ -57,7 +57,6 @@ #include machine/asm.h #include machine/ia64_cpu.h -#include machine/vmparam.h #include assym.h @@ -708,7 +707,7 @@ ;; cmp.geu p6,p0=in0,loc2 // is in user space. ;; -(p6) br.cond.spnt.few copyerr // if it's not, error out. +(p6) br.cond.spnt.few copyefault // if it's not, error out. movl r14=copyerr // set up fault handler. add r15=PC_CURLWP,r13 // find curthread ;; @@ -747,7 +746,7 @@ ;; cmp.geu p6,p0=in1,loc2 // is in user space. ;; -(p6) br.cond.spnt.few copyerr // if it's not, error out. +(p6) br.cond.spnt.few copyefault // if it's not, error out. movl r14=copyerr // set up fault handler. add r15=PC_CURLWP,r13 // find curthread ;; @@ -898,7 +897,7 @@ ;; cmp.geu p6,p0=in0,loc2 // is in user space. ;; -(p6) br.cond.spnt.few copyerr // if it's not, error out. +(p6) br.cond.spnt.few copyefault // if it's not, error out. movl r14=copyerr // set up fault handler. add r15=PC_CURLWP,r13 // find curthread ;; @@ -936,7 +935,7 @@ ;; cmp.geu p6,p0=in1,loc2 // is in user space. ;; -(p6) br.cond.spnt.few copyerr // if it's not, error out. +(p6) br.cond.spnt.few copyefault // if it's not, error out. movl r14=copyerr // set up fault handler. add r15=PC_CURLWP,r13 // find curthread ;; @@ -969,10 +968,21 @@ add r14=PCB_ONFAULT,r14 ;; // curthread-td_pcb-pcb_onfault st8 [r14]=r0 // reset fault handler - mov ret0=EFAULT // return EFAULT br.ret.sptk.few rp END(copyerr) +ENTRY(copyefault, 0) + add r14=PC_CURLWP,r13 ;; // find curthread + ld8 r14=[r14] ;; + add r14=L_PCB,r14 ;; // curthread-td_addr + ld8 r14=[r14] ;; + add r14=PCB_ONFAULT,r14 ;; // curthread-td_pcb-pcb_onfault + st8 [r14]=r0 // reset fault handler + + mov ret0=EFAULT // return EFAULT + br.ret.sptk.few rp +END(copyefault) + #if defined(GPROF) /* * Important registers:
CVS commit: src/sys/arch/vax/conf
Module Name:src Committed By: chs Date: Sun Aug 8 18:19:26 UTC 2010 Modified Files: src/sys/arch/vax/conf: GENERIC Log Message: enable DDB_HISTORY_SIZE since DDB is enabled. To generate a diff of this commit: cvs rdiff -u -r1.174 -r1.175 src/sys/arch/vax/conf/GENERIC 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/vax/conf/GENERIC diff -u src/sys/arch/vax/conf/GENERIC:1.174 src/sys/arch/vax/conf/GENERIC:1.175 --- src/sys/arch/vax/conf/GENERIC:1.174 Thu Jul 1 19:50:11 2010 +++ src/sys/arch/vax/conf/GENERIC Sun Aug 8 18:19:26 2010 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.174 2010/07/01 19:50:11 ragge Exp $ +# $NetBSD: GENERIC,v 1.175 2010/08/08 18:19:26 chs Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GENERIC-$Revision: 1.174 $ +#ident GENERIC-$Revision: 1.175 $ # Here are all different supported CPU types listed. #options VAX8800 # VAX 8500, 8530, 8550, 8700, 8800 @@ -49,7 +49,7 @@ # Kernel compiled-in symbolic debugger system call tracer makeoptions DEBUG=-g options DDB -#options DDB_HISTORY_SIZE=100 # enable history editing in DDB +options DDB_HISTORY_SIZE=512 # enable history editing in DDB options KTRACE #options DIAGNOSTIC #options DEBUG
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: chs Date: Sun Aug 8 18:19:56 UTC 2010 Modified Files: src/sys/arch/sparc64/sparc64: trap.c Log Message: remove some unreachable debug code. To generate a diff of this commit: cvs rdiff -u -r1.161 -r1.162 src/sys/arch/sparc64/sparc64/trap.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/sparc64/sparc64/trap.c diff -u src/sys/arch/sparc64/sparc64/trap.c:1.161 src/sys/arch/sparc64/sparc64/trap.c:1.162 --- src/sys/arch/sparc64/sparc64/trap.c:1.161 Sat Mar 20 23:31:30 2010 +++ src/sys/arch/sparc64/sparc64/trap.c Sun Aug 8 18:19:56 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.161 2010/03/20 23:31:30 chs Exp $ */ +/* $NetBSD: trap.c,v 1.162 2010/08/08 18:19:56 chs Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved. @@ -50,7 +50,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.161 2010/03/20 23:31:30 chs Exp $); +__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.162 2010/08/08 18:19:56 chs Exp $); #include opt_ddb.h #include opt_multiprocessor.h @@ -1000,9 +1000,6 @@ vaddr_t onfault; u_quad_t sticks; ksiginfo_t ksi; -#ifdef DEBUG - static int lastdouble; -#endif #ifdef DEBUG if (tf-tf_pc == tf-tf_npc) { @@ -1052,22 +1049,6 @@ /* Find the faulting va to give to uvm_fault */ va = trunc_page(addr); -#ifdef DEBUG - if (lastdouble) { - printf(cpu%d: stacked data fault @ %lx (pc %lx);, - cpu_number(), addr, pc); - lastdouble = 0; - if (curproc == NULL) - printf(NULL proc\n); - else - printf(pid %d(%s); sigmask %x, sigcatch %x\n, - l-l_proc-p_pid, l-l_proc-p_comm, -/* XXX */ - l-l_sigmask.__bits[0], - l-l_proc-p_sigctx.ps_sigcatch.__bits[0]); - } -#endif - /* * Now munch on protections. * @@ -1263,9 +1244,6 @@ vaddr_t onfault; u_quad_t sticks; ksiginfo_t ksi; -#ifdef DEBUG - static int lastdouble; -#endif #ifdef DEBUG if (tf-tf_pc == tf-tf_npc) { @@ -1322,22 +1300,6 @@ goto out; /* No fault. Why were we called? */ } -#ifdef DEBUG - if (lastdouble) { - printf(stacked data error @ %lx (pc %lx); sfsr %lx, - sfva, pc, sfsr); - lastdouble = 0; - if (curproc == NULL) - printf(NULL proc\n); - else - printf(pid %d(%s); sigmask %x, sigcatch %x\n, - curproc-p_pid, curproc-p_comm, -/* XXX */ - curlwp-l_sigmask.__bits[0], - curproc-p_sigctx.ps_sigcatch.__bits[0]); - } -#endif - if (tstate TSTATE_PRIV) { onfault = (vaddr_t)pcb-pcb_onfault; if (!onfault) { @@ -1539,9 +1501,6 @@ vm_prot_t access_type; u_quad_t sticks; ksiginfo_t ksi; -#ifdef DEBUG - static int lastdouble; -#endif char buf[768]; #ifdef DEBUG @@ -1608,19 +1567,6 @@ va = trunc_page(pc); -#ifdef DEBUG - if (lastdouble) { - printf(stacked text error @ pc %lx; sfsr %lx, pc, sfsr); - lastdouble = 0; - if (curproc == NULL) - printf(NULL proc\n); - else - printf(pid %d(%s); sigmask %x, sigcatch %x\n, - curproc-p_pid, curproc-p_comm, - curlwp-l_sigmask.__bits[0], - curproc-p_sigctx.ps_sigcatch.__bits[0]); - } -#endif /* Now munch on protections... */ access_type = VM_PROT_EXECUTE;
CVS commit: src/sys/arch/sparc/sparc
Module Name:src Committed By: chs Date: Sun Aug 8 18:21:50 UTC 2010 Modified Files: src/sys/arch/sparc/sparc: locore.s Log Message: update a comment. To generate a diff of this commit: cvs rdiff -u -r1.256 -r1.257 src/sys/arch/sparc/sparc/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/sparc/sparc/locore.s diff -u src/sys/arch/sparc/sparc/locore.s:1.256 src/sys/arch/sparc/sparc/locore.s:1.257 --- src/sys/arch/sparc/sparc/locore.s:1.256 Sun Mar 7 00:42:08 2010 +++ src/sys/arch/sparc/sparc/locore.s Sun Aug 8 18:21:50 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.256 2010/03/07 00:42:08 mrg Exp $ */ +/* $NetBSD: locore.s,v 1.257 2010/08/08 18:21:50 chs Exp $ */ /* * Copyright (c) 1996 Paul Kranenburg @@ -4797,7 +4797,8 @@ jmp %g7 + 8 clr %o0 ! return 0 -! Copyin or copyout fault. Clear cpcb-pcb_onfault and return EFAULT. +! Copyin or copyout fault. Clear cpcb-pcb_onfault. +! The return value was already put in %o0 by the fault handler. ! Note that although we were in bcopy, there is no state to clean up; ! the only special thing is that we have to return to [g7 + 8] rather than ! [o7 + 8].
CVS commit: src/sys/dev/ofw
Module Name:src Committed By: chs Date: Sun Aug 8 18:22:39 UTC 2010 Modified Files: src/sys/dev/ofw: ofnet.c Log Message: remove an unused variable. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/dev/ofw/ofnet.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/dev/ofw/ofnet.c diff -u src/sys/dev/ofw/ofnet.c:1.50 src/sys/dev/ofw/ofnet.c:1.51 --- src/sys/dev/ofw/ofnet.c:1.50 Mon Apr 5 07:20:24 2010 +++ src/sys/dev/ofw/ofnet.c Sun Aug 8 18:22:39 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: ofnet.c,v 1.50 2010/04/05 07:20:24 joerg Exp $ */ +/* $NetBSD: ofnet.c,v 1.51 2010/08/08 18:22:39 chs Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ofnet.c,v 1.50 2010/04/05 07:20:24 joerg Exp $); +__KERNEL_RCSID(0, $NetBSD: ofnet.c,v 1.51 2010/08/08 18:22:39 chs Exp $); #include ofnet.h #include opt_inet.h @@ -418,8 +418,6 @@ static void ipkdbofstart(struct ipkdb_if *kip) { - int unit = kip-unit - 1; - if (ipkdb_of) ipkdbattach(kip, ipkdb_of-sc_ethercom); }
CVS commit: src/sys/dev/isa
Module Name:src Committed By: chs Date: Sun Aug 8 18:24:35 UTC 2010 Modified Files: src/sys/dev/isa: fd.c Log Message: move a debug printf to FD_DEBUG. To generate a diff of this commit: cvs rdiff -u -r1.96 -r1.97 src/sys/dev/isa/fd.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/dev/isa/fd.c diff -u src/sys/dev/isa/fd.c:1.96 src/sys/dev/isa/fd.c:1.97 --- src/sys/dev/isa/fd.c:1.96 Tue Mar 16 12:53:17 2010 +++ src/sys/dev/isa/fd.c Sun Aug 8 18:24:34 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.96 2010/03/16 12:53:17 he Exp $ */ +/* $NetBSD: fd.c,v 1.97 2010/08/08 18:24:34 chs Exp $ */ /*- * Copyright (c) 1998, 2003, 2008 The NetBSD Foundation, Inc. @@ -81,7 +81,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.96 2010/03/16 12:53:17 he Exp $); +__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.97 2010/08/08 18:24:34 chs Exp $); #include rnd.h #include opt_ddb.h @@ -1625,7 +1625,7 @@ bp-b_bcount = sizeof(struct fd_idfield_data) * finfo-fd_formb_nsecs; bp-b_data = (void *)finfo; -#ifdef DEBUG +#ifdef FD_DEBUG printf(fdformat: blkno % PRIx64 count %x\n, bp-b_blkno, bp-b_bcount); #endif
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Sun Aug 8 18:25:06 UTC 2010 Modified Files: src/sys/dev/acpi: acpi_cpu_cstate.c acpi_cpu_pstate.c Log Message: Improve error and debug messages. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/dev/acpi/acpi_cpu_cstate.c cvs rdiff -u -r1.3 -r1.4 src/sys/dev/acpi/acpi_cpu_pstate.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/dev/acpi/acpi_cpu_cstate.c diff -u src/sys/dev/acpi/acpi_cpu_cstate.c:1.15 src/sys/dev/acpi/acpi_cpu_cstate.c:1.16 --- src/sys/dev/acpi/acpi_cpu_cstate.c:1.15 Sun Aug 8 16:58:42 2010 +++ src/sys/dev/acpi/acpi_cpu_cstate.c Sun Aug 8 18:25:06 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_cstate.c,v 1.15 2010/08/08 16:58:42 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_cstate.c,v 1.16 2010/08/08 18:25:06 jruoho Exp $ */ /*- * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu_cstate.c,v 1.15 2010/08/08 16:58:42 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu_cstate.c,v 1.16 2010/08/08 18:25:06 jruoho Exp $); #include sys/param.h #include sys/cpu.h @@ -134,7 +134,7 @@ panic(NOTREACHED); } - aprint_verbose_dev(sc-sc_dev, C%d: %5s, + aprint_debug_dev(sc-sc_dev, C%d: %5s, lat %3u us, pow %5u mW, addr 0x%06x, flags 0x%02x\n, i, str, cs-cs_latency, cs-cs_power, (uint32_t)cs-cs_addr, cs-cs_flags); @@ -286,10 +286,6 @@ if (buf.Pointer != NULL) ACPI_FREE(buf.Pointer); - if (ACPI_FAILURE(rv)) - aprint_error_dev(sc-sc_dev, failed to evaluate - _CST: %s\n, AcpiFormatException(rv)); - return rv; } @@ -423,7 +419,7 @@ default: if ((sc-sc_flags ACPICPU_FLAG_C_FFH) == 0) { -rv = AE_AML_BAD_RESOURCE_VALUE; +rv = AE_SUPPORT; goto out; } } @@ -460,8 +456,8 @@ out: if (ACPI_FAILURE(rv)) - aprint_verbose_dev(sc-sc_dev, - invalid _CST: %s\n, AcpiFormatException(rv)); + aprint_debug_dev(sc-sc_dev, invalid + _CST: %s\n, AcpiFormatException(rv)); return rv; } Index: src/sys/dev/acpi/acpi_cpu_pstate.c diff -u src/sys/dev/acpi/acpi_cpu_pstate.c:1.3 src/sys/dev/acpi/acpi_cpu_pstate.c:1.4 --- src/sys/dev/acpi/acpi_cpu_pstate.c:1.3 Sun Aug 8 18:10:34 2010 +++ src/sys/dev/acpi/acpi_cpu_pstate.c Sun Aug 8 18:25:06 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_pstate.c,v 1.3 2010/08/08 18:10:34 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_pstate.c,v 1.4 2010/08/08 18:25:06 jruoho Exp $ */ /*- * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu_pstate.c,v 1.3 2010/08/08 18:10:34 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu_pstate.c,v 1.4 2010/08/08 18:25:06 jruoho Exp $); #include sys/param.h #include sys/kmem.h @@ -385,7 +385,7 @@ width = reg[i]-reg_bitwidth; if (width != 8 width != 16 width != 32) { -rv = AE_SUPPORT; +rv = AE_AML_BAD_RESOURCE_VALUE; goto out; } @@ -394,7 +394,7 @@ case ACPI_ADR_SPACE_FIXED_HARDWARE: if ((sc-sc_flags ACPICPU_FLAG_P_FFH) == 0) { -rv = AE_AML_BAD_RESOURCE_VALUE; +rv = AE_SUPPORT; goto out; }
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: chs Date: Sun Aug 8 18:25:14 UTC 2010 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: only print the boot-time message if we're being verbose. To generate a diff of this commit: cvs rdiff -u -r1.273 -r1.274 src/sys/dev/raidframe/rf_netbsdkintf.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/dev/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.273 src/sys/dev/raidframe/rf_netbsdkintf.c:1.274 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.273 Sun Mar 14 21:11:41 2010 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Sun Aug 8 18:25:14 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.273 2010/03/14 21:11:41 jld Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.274 2010/08/08 18:25:14 chs Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc. * All rights reserved. @@ -139,7 +139,7 @@ ***/ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.273 2010/03/14 21:11:41 jld Exp $); +__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.274 2010/08/08 18:25:14 chs Exp $); #ifdef _KERNEL_OPT #include opt_compat_netbsd.h @@ -385,7 +385,7 @@ raidPtrs[i] = NULL; rc = rf_BootRaidframe(); if (rc == 0) - aprint_normal(Kernelized RAIDframe activated\n); + aprint_verbose(Kernelized RAIDframe activated\n); else panic(Serious error booting RAID!!);
CVS commit: src/sys/arch/amd64/conf
Module Name:src Committed By: chs Date: Sun Aug 8 18:28:00 UTC 2010 Modified Files: src/sys/arch/amd64/conf: GENERIC Log Message: add more (commented-out) spdmem instances for HP xw-series workstations. To generate a diff of this commit: cvs rdiff -u -r1.283 -r1.284 src/sys/arch/amd64/conf/GENERIC 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/GENERIC diff -u src/sys/arch/amd64/conf/GENERIC:1.283 src/sys/arch/amd64/conf/GENERIC:1.284 --- src/sys/arch/amd64/conf/GENERIC:1.283 Fri Jul 23 00:43:20 2010 +++ src/sys/arch/amd64/conf/GENERIC Sun Aug 8 18:28:00 2010 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.283 2010/07/23 00:43:20 jakllsch Exp $ +# $NetBSD: GENERIC,v 1.284 2010/08/08 18:28:00 chs Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GENERIC-$Revision: 1.283 $ +#ident GENERIC-$Revision: 1.284 $ maxusers 64 # estimated number of users @@ -484,6 +484,10 @@ #spdmem* at iic? addr 0x51 #spdmem* at iic? addr 0x52 #spdmem* at iic? addr 0x53 +#spdmem* at iic? addr 0x54 +#spdmem* at iic? addr 0x55 +#spdmem* at iic? addr 0x56 +#spdmem* at iic? addr 0x57 # I2O devices iop* at pci? dev ? function ? # I/O processor
CVS commit: src/usr.bin/kdump
Module Name:src Committed By: chs Date: Sun Aug 8 18:31:50 UTC 2010 Modified Files: src/usr.bin/kdump: kdump.c Log Message: fix emul state tracking for exit vs exit_group on linux. To generate a diff of this commit: cvs rdiff -u -r1.104 -r1.105 src/usr.bin/kdump/kdump.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/kdump/kdump.c diff -u src/usr.bin/kdump/kdump.c:1.104 src/usr.bin/kdump/kdump.c:1.105 --- src/usr.bin/kdump/kdump.c:1.104 Mon Apr 13 14:39:23 2009 +++ src/usr.bin/kdump/kdump.c Sun Aug 8 18:31:50 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kdump.c,v 1.104 2009/04/13 14:39:23 christos Exp $ */ +/* $NetBSD: kdump.c,v 1.105 2010/08/08 18:31:50 chs Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)kdump.c 8.4 (Berkeley) 4/28/95; #else -__RCSID($NetBSD: kdump.c,v 1.104 2009/04/13 14:39:23 christos Exp $); +__RCSID($NetBSD: kdump.c,v 1.105 2010/08/08 18:31:50 chs Exp $); #endif #endif /* not lint */ @@ -532,7 +532,10 @@ if (plain) { ; - } else if (strcmp(sys_name, exit) == 0) { + } else if (strcmp(sys_name, exit_group) == 0 || + (strcmp(emul-name, linux) != 0 + strcmp(emul-name, linux32) != 0 + strcmp(sys_name, exit) == 0)) { ectx_delete(); } else if (strcmp(sys_name, ioctl) == 0 argcount = 2) {
CVS commit: src/sys/lib/libsa
Module Name:src Committed By: chs Date: Sun Aug 8 18:38:31 UTC 2010 Modified Files: src/sys/lib/libsa: dev_net.c Log Message: print the correct error code if nfs_mount() fails. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/lib/libsa/dev_net.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/lib/libsa/dev_net.c diff -u src/sys/lib/libsa/dev_net.c:1.24 src/sys/lib/libsa/dev_net.c:1.25 --- src/sys/lib/libsa/dev_net.c:1.24 Sat Jan 17 14:00:36 2009 +++ src/sys/lib/libsa/dev_net.c Sun Aug 8 18:38:31 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: dev_net.c,v 1.24 2009/01/17 14:00:36 tsutsui Exp $ */ +/* $NetBSD: dev_net.c,v 1.25 2010/08/08 18:38:31 chs Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -118,7 +118,7 @@ /* Get the NFS file handle (mountd). */ error = nfs_mount(netdev_sock, rootip, rootpath); if (error) { -printf(NFS mount error=%d\n, error); +printf(NFS mount error=%d\n, errno); rootip.s_addr = 0; fail: netif_close(netdev_sock);
CVS commit: src/sys/arch
Module Name:src Committed By: chs Date: Sun Aug 8 18:44:16 UTC 2010 Modified Files: src/sys/arch/sparc/include: fsr.h src/sys/arch/sparc64/include: fsr.h Log Message: merge sparc and sparc64 fsr.h into one file. add the missing FSR_TT_* definitions. fix FSR_FTT_MASK. fix the V9 FCC fields. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/sparc/include/fsr.h cvs rdiff -u -r1.3 -r1.4 src/sys/arch/sparc64/include/fsr.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/sparc/include/fsr.h diff -u src/sys/arch/sparc/include/fsr.h:1.4 src/sys/arch/sparc/include/fsr.h:1.5 --- src/sys/arch/sparc/include/fsr.h:1.4 Sun Dec 11 12:19:05 2005 +++ src/sys/arch/sparc/include/fsr.h Sun Aug 8 18:44:15 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: fsr.h,v 1.4 2005/12/11 12:19:05 christos Exp $ */ +/* $NetBSD: fsr.h,v 1.5 2010/08/08 18:44:15 chs Exp $ */ /* * Copyright (c) 1992, 1993 @@ -40,8 +40,8 @@ * @(#)fsr.h 8.1 (Berkeley) 6/11/93 */ -#ifndef _MACHINE_FSR_H_ -#define _MACHINE_FSR_H_ +#ifndef _SPARC_FSR_H_ +#define _SPARC_FSR_H_ /* * Bits in FSR. @@ -81,8 +81,10 @@ #define FSR_TT_UNIMP 3 /* unimplemented operation */ #define FSR_TT_SEQ 4 /* sequence error */ #define FSR_TT_HWERR 5 /* hardware error (unrecoverable) */ +#define FSR_TT_INVR 6 /* invalid fp register */ +#define FSR_TT_RESV 7 /* reserved */ #define FSR_FTT_SHIFT 14 -#define FSR_FTT_MASK 0x03 +#define FSR_FTT_MASK 0x07 #define FSR_QNE 0x2000 /* queue not empty */ #define FSR_PR 0x1000 /* partial result */ @@ -109,4 +111,29 @@ #define FSR_DZ 0x02 /* division by zero */ #define FSR_NX 0x01 /* inexact result */ -#endif /* _MACHINE_FSR_H_ */ +#ifdef __sparc_v9__ + +/* + * The rest of these are only for sparcv9. + */ + +/* These are the 3 new v9 fcc's */ +#define FSR_FCC3 0x0030ULL /* FP condition codes */ +#define FSR_FCC3_SHIFT 36 + +#define FSR_FCC2 0x000cULL /* FP condition codes */ +#define FSR_FCC2_SHIFT 34 + +#define FSR_FCC1 0x0003ULL /* FP condition codes */ +#define FSR_FCC1_SHIFT 32 + +/* + * Bits in FPRS. + */ +#define FPRS_FEF 0x04 /* Enable FP -- must be set to enable FP regs */ +#define FPRS_DU 0x02 /* Dirty upper -- upper fp regs are dirty */ +#define FPRS_DL 0x01 /* Dirty lower -- lower fp regs are dirty */ + +#endif /* __sparc_v9__ */ + +#endif /* _SPARC_FSR_H_ */ Index: src/sys/arch/sparc64/include/fsr.h diff -u src/sys/arch/sparc64/include/fsr.h:1.3 src/sys/arch/sparc64/include/fsr.h:1.4 --- src/sys/arch/sparc64/include/fsr.h:1.3 Sun Dec 11 12:19:10 2005 +++ src/sys/arch/sparc64/include/fsr.h Sun Aug 8 18:44:16 2010 @@ -1,131 +1,3 @@ -/* $NetBSD: fsr.h,v 1.3 2005/12/11 12:19:10 christos Exp $ */ +/* $NetBSD: fsr.h,v 1.4 2010/08/08 18:44:16 chs Exp $ */ -/* - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Lawrence Berkeley Laboratory. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - *notice, this list of conditions and the following disclaimer in the - *documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - *may be used to endorse or promote products derived from this software - *without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)fsr.h 8.1 (Berkeley) 6/11/93 - */ -
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Sun Aug 8 18:47:54 UTC 2010 Modified Files: src/sys/dev/acpi: acpi_cpu.c acpi_cpu.h Log Message: jmcneill@: do not touch the bus_space(9) handle. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/dev/acpi/acpi_cpu.c cvs rdiff -u -r1.9 -r1.10 src/sys/dev/acpi/acpi_cpu.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/acpi/acpi_cpu.c diff -u src/sys/dev/acpi/acpi_cpu.c:1.12 src/sys/dev/acpi/acpi_cpu.c:1.13 --- src/sys/dev/acpi/acpi_cpu.c:1.12 Sun Aug 8 16:58:42 2010 +++ src/sys/dev/acpi/acpi_cpu.c Sun Aug 8 18:47:54 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu.c,v 1.12 2010/08/08 16:58:42 jruoho Exp $ */ +/* $NetBSD: acpi_cpu.c,v 1.13 2010/08/08 18:47:54 jruoho Exp $ */ /*- * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu.c,v 1.12 2010/08/08 16:58:42 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu.c,v 1.13 2010/08/08 18:47:54 jruoho Exp $); #include sys/param.h #include sys/cpu.h @@ -116,6 +116,7 @@ sc-sc_dev = self; sc-sc_cold = false; + sc-sc_mapped = false; sc-sc_iot = aa-aa_iot; sc-sc_node = aa-aa_node; sc-sc_cpuid = acpicpu_id(sc-sc_object.ao_procid); @@ -150,8 +151,8 @@ rv = bus_space_map(sc-sc_iot, sc-sc_object.ao_pblkaddr, sc-sc_object.ao_pblklen, 0, sc-sc_ioh); - if (rv != 0) - sc-sc_ioh = 0; + if (rv == 0) + sc-sc_mapped = true; } acpicpu_cstate_attach(self); @@ -194,7 +195,7 @@ if (rv != 0) return rv; - if (sc-sc_ioh != 0) + if (sc-sc_mapped != false) bus_space_unmap(sc-sc_iot, sc-sc_ioh, addr); mutex_destroy(sc-sc_mtx); Index: src/sys/dev/acpi/acpi_cpu.h diff -u src/sys/dev/acpi/acpi_cpu.h:1.9 src/sys/dev/acpi/acpi_cpu.h:1.10 --- src/sys/dev/acpi/acpi_cpu.h:1.9 Sun Aug 8 16:58:42 2010 +++ src/sys/dev/acpi/acpi_cpu.h Sun Aug 8 18:47:54 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu.h,v 1.9 2010/08/08 16:58:42 jruoho Exp $ */ +/* $NetBSD: acpi_cpu.h,v 1.10 2010/08/08 18:47:54 jruoho Exp $ */ /*- * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi @@ -168,6 +168,7 @@ uint32_t sc_flags; cpuid_t sc_cpuid; bool sc_cold; + bool sc_mapped; }; void acpicpu_cstate_attach(device_t);
CVS commit: src/sys/arch/i386/conf
Module Name:src Committed By: chs Date: Sun Aug 8 20:04:25 UTC 2010 Modified Files: src/sys/arch/i386/conf: GENERIC Log Message: add more (commented-out) spdmem instances for HP xw-series workstations. To generate a diff of this commit: cvs rdiff -u -r1.989 -r1.990 src/sys/arch/i386/conf/GENERIC 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/conf/GENERIC diff -u src/sys/arch/i386/conf/GENERIC:1.989 src/sys/arch/i386/conf/GENERIC:1.990 --- src/sys/arch/i386/conf/GENERIC:1.989 Sat Jul 24 00:45:54 2010 +++ src/sys/arch/i386/conf/GENERIC Sun Aug 8 20:04:24 2010 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.989 2010/07/24 00:45:54 jym Exp $ +# $NetBSD: GENERIC,v 1.990 2010/08/08 20:04:24 chs Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GENERIC-$Revision: 1.989 $ +#ident GENERIC-$Revision: 1.990 $ maxusers 64 # estimated number of users @@ -699,6 +699,10 @@ #spdmem* at iic? addr 0x51 #spdmem* at iic? addr 0x52 #spdmem* at iic? addr 0x53 +#spdmem* at iic? addr 0x54 +#spdmem* at iic? addr 0x55 +#spdmem* at iic? addr 0x56 +#spdmem* at iic? addr 0x57 # I2O devices iop* at pci? dev ? function ? # I/O processor
CVS commit: src/sys/arch/i386/conf
Module Name:src Committed By: chs Date: Sun Aug 8 20:04:54 UTC 2010 Modified Files: src/sys/arch/i386/conf: ALL Log Message: add more spdmem instances for HP xw-series workstations. add se (scsi ethernet). To generate a diff of this commit: cvs rdiff -u -r1.264 -r1.265 src/sys/arch/i386/conf/ALL 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/conf/ALL diff -u src/sys/arch/i386/conf/ALL:1.264 src/sys/arch/i386/conf/ALL:1.265 --- src/sys/arch/i386/conf/ALL:1.264 Sat Aug 7 09:55:59 2010 +++ src/sys/arch/i386/conf/ALL Sun Aug 8 20:04:54 2010 @@ -1,4 +1,4 @@ -# $NetBSD: ALL,v 1.264 2010/08/07 09:55:59 jruoho Exp $ +# $NetBSD: ALL,v 1.265 2010/08/08 20:04:54 chs Exp $ # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp # # ALL machine description file @@ -17,7 +17,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident ALL-$Revision: 1.264 $ +#ident ALL-$Revision: 1.265 $ maxusers 64 # estimated number of users @@ -740,6 +740,10 @@ spdmem* at iic? addr 0x51 spdmem* at iic? addr 0x52 spdmem* at iic? addr 0x53 +spdmem* at iic? addr 0x54 +spdmem* at iic? addr 0x55 +spdmem* at iic? addr 0x56 +spdmem* at iic? addr 0x57 sdtemp* at iic? addr 0x18 # I2O devices @@ -840,6 +844,7 @@ ch* at scsibus? target ? lun ? # SCSI autochangers ses* at scsibus? target ? lun ? # SCSI Enclosure Services devices ss* at scsibus? target ? lun ? # SCSI scanners +se* at scsibus? target ? lun ? # SCSI ethernet adapters uk* at scsibus? target ? lun ? # SCSI unknown # SCSI NIC
CVS commit: src/sys/arch/x86
Module Name:src Committed By: jruoho Date: Mon Aug 9 04:18:49 UTC 2010 Modified Files: src/sys/arch/x86/acpi: acpi_cpu_md.c src/sys/arch/x86/include: cpuvar.h src/sys/arch/x86/x86: cpu.c est.c Log Message: Move the sysctl function pointers used by acpicpu(4) to x86/cpu.c. Rename these so that the same pointers may be used in other parts. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/acpi/acpi_cpu_md.c cvs rdiff -u -r1.35 -r1.36 src/sys/arch/x86/include/cpuvar.h cvs rdiff -u -r1.74 -r1.75 src/sys/arch/x86/x86/cpu.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/x86/x86/est.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/acpi/acpi_cpu_md.c diff -u src/sys/arch/x86/acpi/acpi_cpu_md.c:1.5 src/sys/arch/x86/acpi/acpi_cpu_md.c:1.6 --- src/sys/arch/x86/acpi/acpi_cpu_md.c:1.5 Sun Aug 8 16:58:41 2010 +++ src/sys/arch/x86/acpi/acpi_cpu_md.c Mon Aug 9 04:18:48 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_md.c,v 1.5 2010/08/08 16:58:41 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_md.c,v 1.6 2010/08/09 04:18:48 jruoho Exp $ */ /*- * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu_md.c,v 1.5 2010/08/08 16:58:41 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu_md.c,v 1.6 2010/08/09 04:18:48 jruoho Exp $); #include sys/param.h #include sys/bus.h @@ -216,17 +216,9 @@ acpicpu_md_pstate_start(void) { - switch (cpu_vendor) { - - case CPUVENDOR_INTEL: - est_sysctl_get = acpicpu_md_pstate_sysctl_get; - est_sysctl_set = acpicpu_md_pstate_sysctl_set; - est_sysctl_all = acpicpu_md_pstate_sysctl_all; - break; - - default: - return ENODEV; - } + cpu_freq_sysctl_get = acpicpu_md_pstate_sysctl_get; + cpu_freq_sysctl_set = acpicpu_md_pstate_sysctl_set; + cpu_freq_sysctl_all = acpicpu_md_pstate_sysctl_all; return 0; } @@ -235,17 +227,9 @@ acpicpu_md_pstate_stop(void) { - switch (cpu_vendor) { - - case CPUVENDOR_INTEL: - est_sysctl_get = NULL; - est_sysctl_set = NULL; - est_sysctl_all = NULL; - break; - - default: - return ENODEV; - } + cpu_freq_sysctl_get = NULL; + cpu_freq_sysctl_set = NULL; + cpu_freq_sysctl_all = NULL; return 0; } Index: src/sys/arch/x86/include/cpuvar.h diff -u src/sys/arch/x86/include/cpuvar.h:1.35 src/sys/arch/x86/include/cpuvar.h:1.36 --- src/sys/arch/x86/include/cpuvar.h:1.35 Sun Aug 8 16:58:42 2010 +++ src/sys/arch/x86/include/cpuvar.h Mon Aug 9 04:18:48 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuvar.h,v 1.35 2010/08/08 16:58:42 jruoho Exp $ */ +/* $NetBSD: cpuvar.h,v 1.36 2010/08/09 04:18:48 jruoho Exp $ */ /*- * Copyright (c) 2000, 2007 The NetBSD Foundation, Inc. @@ -142,9 +142,9 @@ int p4_get_bus_clock(struct cpu_info *); #endif -extern int (*est_sysctl_get)(SYSCTLFN_PROTO); -extern int (*est_sysctl_set)(SYSCTLFN_PROTO); -extern int (*est_sysctl_all)(SYSCTLFN_PROTO); +extern int (*cpu_freq_sysctl_get)(SYSCTLFN_PROTO); +extern int (*cpu_freq_sysctl_set)(SYSCTLFN_PROTO); +extern int (*cpu_freq_sysctl_all)(SYSCTLFN_PROTO); void cpu_get_tsc_freq(struct cpu_info *); void pat_init(struct cpu_info *); Index: src/sys/arch/x86/x86/cpu.c diff -u src/sys/arch/x86/x86/cpu.c:1.74 src/sys/arch/x86/x86/cpu.c:1.75 --- src/sys/arch/x86/x86/cpu.c:1.74 Wed Aug 4 10:02:12 2010 +++ src/sys/arch/x86/x86/cpu.c Mon Aug 9 04:18:48 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.74 2010/08/04 10:02:12 jruoho Exp $ */ +/* $NetBSD: cpu.c,v 1.75 2010/08/09 04:18:48 jruoho Exp $ */ /*- * Copyright (c) 2000, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.74 2010/08/04 10:02:12 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.75 2010/08/09 04:18:48 jruoho Exp $); #include opt_ddb.h #include opt_mpbios.h /* for MPDEBUG */ @@ -185,6 +185,10 @@ static vaddr_t cmos_data_mapping; struct cpu_info *cpu_starting; +int (*cpu_freq_sysctl_get)(SYSCTLFN_PROTO) = NULL; +int (*cpu_freq_sysctl_set)(SYSCTLFN_PROTO) = NULL; +int (*cpu_freq_sysctl_all)(SYSCTLFN_PROTO) = NULL; + void cpu_hatch(void *); static void cpu_boot_secondary(struct cpu_info *ci); static void cpu_start_secondary(struct cpu_info *ci); Index: src/sys/arch/x86/x86/est.c diff -u src/sys/arch/x86/x86/est.c:1.16 src/sys/arch/x86/x86/est.c:1.17 --- src/sys/arch/x86/x86/est.c:1.16 Sun Aug 8 16:58:42 2010 +++ src/sys/arch/x86/x86/est.c Mon Aug 9 04:18:49 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: est.c,v 1.16 2010/08/08 16:58:42 jruoho Exp $ */ +/* $NetBSD: est.c,v 1.17 2010/08/09 04:18:49 jruoho Exp $ */ /* * Copyright (c) 2003 Michael Eriksson. * All rights reserved. @@ -81,7 +81,7 @@ /* #define EST_DEBUG */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: est.c,v 1.16 2010/08/08 16:58:42 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: est.c,v 1.17 2010/08/09
CVS commit: src/sys
Module Name:src Committed By: jruoho Date: Mon Aug 9 04:27:07 UTC 2010 Modified Files: src/sys/arch/x86/acpi: acpi_cpu_md.c src/sys/dev/acpi: acpi_cpu_pstate.c Log Message: When retrieving the current frequency, scan all available P-states. Only use the dynamic maximum when setting a frequency. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x86/acpi/acpi_cpu_md.c cvs rdiff -u -r1.4 -r1.5 src/sys/dev/acpi/acpi_cpu_pstate.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/acpi/acpi_cpu_md.c diff -u src/sys/arch/x86/acpi/acpi_cpu_md.c:1.6 src/sys/arch/x86/acpi/acpi_cpu_md.c:1.7 --- src/sys/arch/x86/acpi/acpi_cpu_md.c:1.6 Mon Aug 9 04:18:48 2010 +++ src/sys/arch/x86/acpi/acpi_cpu_md.c Mon Aug 9 04:27:07 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_md.c,v 1.6 2010/08/09 04:18:48 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_md.c,v 1.7 2010/08/09 04:27:07 jruoho Exp $ */ /*- * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu_md.c,v 1.6 2010/08/09 04:18:48 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu_md.c,v 1.7 2010/08/09 04:27:07 jruoho Exp $); #include sys/param.h #include sys/bus.h @@ -365,7 +365,7 @@ mutex_enter(sc-sc_mtx); - for (i = sc-sc_pstate_max; i sc-sc_pstate_count; i++) { + for (i = 0; i sc-sc_pstate_count; i++) { ps = sc-sc_pstate[i]; Index: src/sys/dev/acpi/acpi_cpu_pstate.c diff -u src/sys/dev/acpi/acpi_cpu_pstate.c:1.4 src/sys/dev/acpi/acpi_cpu_pstate.c:1.5 --- src/sys/dev/acpi/acpi_cpu_pstate.c:1.4 Sun Aug 8 18:25:06 2010 +++ src/sys/dev/acpi/acpi_cpu_pstate.c Mon Aug 9 04:27:07 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_pstate.c,v 1.4 2010/08/08 18:25:06 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_pstate.c,v 1.5 2010/08/09 04:27:07 jruoho Exp $ */ /*- * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu_pstate.c,v 1.4 2010/08/08 18:25:06 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu_pstate.c,v 1.5 2010/08/09 04:27:07 jruoho Exp $); #include sys/param.h #include sys/kmem.h @@ -525,7 +525,7 @@ mutex_enter(sc-sc_mtx); - for (i = sc-sc_pstate_max; i sc-sc_pstate_count; i++) { + for (i = 0; i sc-sc_pstate_count; i++) { if (sc-sc_pstate[i].ps_freq == 0) continue;