CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: sborrill Date: Sat Oct 10 19:54:29 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Ticket 1079 To generate a diff of this commit: cvs rdiff -u -r1.1.2.95 -r1.1.2.96 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.95 src/doc/CHANGES-5.1:1.1.2.96 --- src/doc/CHANGES-5.1:1.1.2.95 Sat Oct 10 18:17:29 2009 +++ src/doc/CHANGES-5.1 Sat Oct 10 19:54:28 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.95 2009/10/10 18:17:29 sborrill Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.96 2009/10/10 19:54:28 sborrill Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -14054,3 +14054,37 @@ Check validity of parent and so fix potential segfault. [cegger, ticket #1078] +distrib/sets/lists/base/mi patch +etc/mtree/NetBSD.distpatch +distrib/sets/lists/xcomp/mi 1.100 +external/mit/xorg/lib/dri/dri.mk 1.8 +external/mit/xorg/lib/dri/libmesa/Makefile 1.4 +external/mit/xorg/lib/libGL/Makefile 1.10 +external/mit/xorg/lib/libdrm/Makefile 1.5 +external/mit/xorg/lib/libdrm/drm/Makefile 1.3 +external/mit/xorg/lib/libdrm_intel/Makefile 1.3 +external/mit/xorg/server/drivers/Makefile.xf86-driver 1.16 +external/mit/xorg/server/drivers/xf86-video-glint/Makefile 1.7 +external/mit/xorg/server/drivers/xf86-video-intel/Makefile 1.7 +external/mit/xorg/server/drivers/xf86-video-intel/ch7017/Makefile 1.2 +external/mit/xorg/server/drivers/xf86-video-intel/ch7xxx/Makefile 1.2 +external/mit/xorg/server/drivers/xf86-video-intel/ivch/Makefile 1.2 +external/mit/xorg/server/drivers/xf86-video-intel/sil164/Makefile 1.2 +external/mit/xorg/server/drivers/xf86-video-intel/tfp410/Makefile 1.2 +external/mit/xorg/server/drivers/xf86-video-mga/Makefile 1.7 +external/mit/xorg/server/drivers/xf86-video-radeon/Makefile 1.5 +external/mit/xorg/server/drivers/xf86-video-savage/Makefile 1.7 +external/mit/xorg/server/drivers/xf86-video-sis/Makefile 1.7 +external/mit/xorg/server/drivers/xf86-video-tdfx/Makefile 1.6 +external/mit/xorg/server/drivers/xf86-video-via/Makefile 1.5 +external/mit/xorg/server/xorg-server/GL/glx/Makefile.glx 1.5 +external/mit/xorg/server/xorg-server/glx/Makefile.glx 1.4 +external/mit/xorg/server/xorg-server/hw/xfree86/dri/Makefile 1.7 +external/mit/xorg/server/xorg-server/hw/xfree86/dri2/Makefile 1.4 + + Move libdrm headers up one level (out of the X11 directory) + to match the rest of the world and fix the inconsistency with + libdrm.pc. + Fixes PR xsrc/42126. + [snj, ticket #1079] +
CVS commit: [netbsd-5] src/distrib/utils/sysinst
Module Name:src Committed By: sborrill Date: Sat Oct 10 20:22:34 UTC 2009 Modified Files: src/distrib/utils/sysinst [netbsd-5]: util.c Log Message: Pull up the following revisions(s) (requested by snj in ticket #1082): distrib/utils/sysinst/util.c: revision 1.161 Don't extract xetc to /, but rather in /.sysinst (like etc) so we don't blow away existing config files. Wait until all sets have been unpacked to run postinstall. Previously we ran it after extracting etc, which meant that /var/db/obsolete/ was not fully populated. To generate a diff of this commit: cvs rdiff -u -r1.151.14.3 -r1.151.14.4 src/distrib/utils/sysinst/util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/sysinst/util.c diff -u src/distrib/utils/sysinst/util.c:1.151.14.3 src/distrib/utils/sysinst/util.c:1.151.14.4 --- src/distrib/utils/sysinst/util.c:1.151.14.3 Fri Oct 9 08:09:24 2009 +++ src/distrib/utils/sysinst/util.c Sat Oct 10 20:22:34 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: util.c,v 1.151.14.3 2009/10/09 08:09:24 sborrill Exp $ */ +/* $NetBSD: util.c,v 1.151.14.4 2009/10/10 20:22:34 sborrill Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -669,7 +669,7 @@ tarstats.nfound++; /* cd to the target root. */ - if (update dist-set == SET_ETC) { + if (update (dist-set == SET_ETC || dist-set == SET_X11_ETC)) { make_target_dir(/.sysinst); target_chdir_or_die(/.sysinst); } else @@ -710,23 +710,6 @@ /* Plausibly we should unlink an empty xfer_dir as well */ } - if (update dist-set == SET_ETC) { - int oldsendmail; - oldsendmail = run_program(RUN_DISPLAY | RUN_CHROOT | - RUN_ERROR_OK | RUN_PROGRESS, - /usr/sbin/postinstall -s /.sysinst -d / check mailerconf); - if (oldsendmail == 1) { - msg_display(MSG_oldsendmail); - process_menu(MENU_yesno, NULL); - if (yesno) { -run_program(RUN_DISPLAY | RUN_CHROOT, - /usr/sbin/postinstall -s /.sysinst -d / fix mailerconf); - } - } - run_program(RUN_DISPLAY | RUN_CHROOT, - /usr/sbin/postinstall -s /.sysinst -d / fix); - } - set_status[dist-set] |= SET_INSTALLED; tarstats.nsuccess++; return SET_OK; @@ -847,6 +830,28 @@ msg_clear(); } + /* + * postinstall needs to be run after extracting all sets, because + * otherwise /var/db/obsolete will only have current information + * from the base, comp, and etc sets. + */ + if (update (set_status[SET_ETC] SET_INSTALLED)) { + int oldsendmail; + oldsendmail = run_program(RUN_DISPLAY | RUN_CHROOT | + RUN_ERROR_OK | RUN_PROGRESS, + /usr/sbin/postinstall -s /.sysinst -d / check mailerconf); + if (oldsendmail == 1) { + msg_display(MSG_oldsendmail); + process_menu(MENU_yesno, NULL); + if (yesno) { +run_program(RUN_DISPLAY | RUN_CHROOT, + /usr/sbin/postinstall -s /.sysinst -d / fix mailerconf); + } + } + run_program(RUN_DISPLAY | RUN_CHROOT, + /usr/sbin/postinstall -s /.sysinst -d / fix); + } + /* Configure the system */ if (set_status[SET_BASE] SET_INSTALLED) run_makedev();
CVS commit: [netbsd-5] src
Module Name:src Committed By: sborrill Date: Sat Oct 10 20:34:45 UTC 2009 Modified Files: src/share/man/man4 [netbsd-5]: uftdi.4 src/sys/dev/usb [netbsd-5]: uftdi.c usbdevs Log Message: Pull up the following revisions(s) (requested by snj in ticket #1083): sys/dev/usb/uftdi.c:revision 1.41-1.42 share/man/man4/uftdi.4: revision 1.15 sys/dev/usb/usbdevs:revision 1.527 Add support for multiple channel cards, specifically quad channel FT4232H. Plus fix minor format nit and legacy title comment removal. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.12.4.1 src/share/man/man4/uftdi.4 cvs rdiff -u -r1.39 -r1.39.4.1 src/sys/dev/usb/uftdi.c cvs rdiff -u -r1.519.4.1 -r1.519.4.2 src/sys/dev/usb/usbdevs 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/man4/uftdi.4 diff -u src/share/man/man4/uftdi.4:1.12 src/share/man/man4/uftdi.4:1.12.4.1 --- src/share/man/man4/uftdi.4:1.12 Wed Apr 30 13:10:54 2008 +++ src/share/man/man4/uftdi.4 Sat Oct 10 20:34:45 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: uftdi.4,v 1.12 2008/04/30 13:10:54 martin Exp $ +.\ $NetBSD: uftdi.4,v 1.12.4.1 2009/10/10 20:34:45 sborrill Exp $ .\ .\ Copyright (c) 2000 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -74,8 +74,9 @@ .Sh DESCRIPTION The .Nm -driver provides support for various serial adapters based on the FTDI -FT8U100AX and FT8U232AM chips. +driver provides support for various serial adapters based on the FTDI USB +UART IC family. Supported chip models are FT8U100AX, FT8U232AM, FT232BM, +FT232R, dual channel FT2232D, dual channel FT2232H, and quad channel FT4232H. .Pp The device is accessed through the .Xr ucom 4 Index: src/sys/dev/usb/uftdi.c diff -u src/sys/dev/usb/uftdi.c:1.39 src/sys/dev/usb/uftdi.c:1.39.4.1 --- src/sys/dev/usb/uftdi.c:1.39 Sat Sep 6 21:42:05 2008 +++ src/sys/dev/usb/uftdi.c Sat Oct 10 20:34:45 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: uftdi.c,v 1.39 2008/09/06 21:42:05 rmind Exp $ */ +/* $NetBSD: uftdi.c,v 1.39.4.1 2009/10/10 20:34:45 sborrill Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -29,12 +29,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* - * FTDI FT8U100AX serial adapter driver - */ - #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uftdi.c,v 1.39 2008/09/06 21:42:05 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: uftdi.c,v 1.39.4.1 2009/10/10 20:34:45 sborrill Exp $); #include sys/param.h #include sys/systm.h @@ -64,7 +60,7 @@ #define UFTDI_CONFIG_INDEX 0 #define UFTDI_IFACE_INDEX 0 -#define UFTDI_MAX_PORTS 2 +#define UFTDI_MAX_PORTS 4 /* * These are the maximum number of bytes transferred per frame. @@ -81,6 +77,7 @@ enum uftdi_type sc_type; u_int sc_hdrlen; u_int sc_numports; + u_int sc_chiptype; u_char sc_msr; u_char sc_lsr; @@ -90,6 +87,7 @@ u_char sc_dying; u_int last_lcr; + }; Static void uftdi_get_status(void *, int portno, u_char *lsr, u_char *msr); @@ -121,6 +119,7 @@ { USB_VENDOR_FALCOM, USB_PRODUCT_FALCOM_TWIST }, { USB_VENDOR_FALCOM, USB_PRODUCT_FALCOM_SAMBA }, { USB_VENDOR_FTDI, USB_PRODUCT_FTDI_SERIAL_2232C }, + { USB_VENDOR_FTDI, USB_PRODUCT_FTDI_SERIAL_4232H }, { USB_VENDOR_FTDI, USB_PRODUCT_FTDI_SERIAL_8U100AX }, { USB_VENDOR_FTDI, USB_PRODUCT_FTDI_SERIAL_8U232AM }, { USB_VENDOR_FTDI, USB_PRODUCT_FTDI_MHAM_KW }, @@ -178,6 +177,7 @@ USB_ATTACH_START(uftdi, sc, uaa); usbd_device_handle dev = uaa-device; usbd_interface_handle iface; + usb_device_descriptor_t *ddesc; usb_interface_descriptor_t *id; usb_endpoint_descriptor_t *ed; char *devinfop; @@ -204,24 +204,29 @@ sc-sc_dev = self; sc-sc_udev = dev; sc-sc_numports = 1; - switch( uaa-vendor ) { - case USB_VENDOR_FTDI: - switch (uaa-product) { - case USB_PRODUCT_FTDI_SERIAL_8U100AX: - sc-sc_type = UFTDI_TYPE_SIO; - sc-sc_hdrlen = 1; - break; - case USB_PRODUCT_FTDI_SERIAL_2232C: - sc-sc_numports = 2; - /* FALLTHROUGH */ - default: /* Most uftdi devices are 8U232AM */ - sc-sc_type = UFTDI_TYPE_8U232AM; - sc-sc_hdrlen = 0; - } + sc-sc_type = UFTDI_TYPE_8U232AM; /* most devices are post-8U232AM */ + sc-sc_hdrlen = 0; + if (uaa-vendor == USB_VENDOR_FTDI + uaa-product == USB_PRODUCT_FTDI_SERIAL_8U100AX) { + sc-sc_type = UFTDI_TYPE_SIO; + sc-sc_hdrlen = 1; + } + + ddesc = usbd_get_device_descriptor(dev); + sc-sc_chiptype = UGETW(ddesc-bcdDevice); + switch (sc-sc_chiptype) { + case 0x500: /* 2232D */ + case 0x700: /* 2232H */ + sc-sc_numports = 2; + break; + case 0x800: /* 4232H */ + sc-sc_numports = 4; + break; + case 0x200: /* 232/245AM */ + case 0x400: /* 232/245BL */ + case 0x600: /* 232/245R */ + default: break; - default: /* Most uftdi devices are 8U232AM */ - sc-sc_type = UFTDI_TYPE_8U232AM; - sc-sc_hdrlen = 0; } for (idx = UFTDI_IFACE_INDEX; idx sc-sc_numports; idx++) { @@ -285,8 +290,8 @@ uca.info = NULL;
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: sborrill Date: Sat Oct 10 20:35:55 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Ticket 1083 To generate a diff of this commit: cvs rdiff -u -r1.1.2.97 -r1.1.2.98 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.97 src/doc/CHANGES-5.1:1.1.2.98 --- src/doc/CHANGES-5.1:1.1.2.97 Sat Oct 10 20:23:09 2009 +++ src/doc/CHANGES-5.1 Sat Oct 10 20:35:55 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.97 2009/10/10 20:23:09 sborrill Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.98 2009/10/10 20:35:55 sborrill Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -14096,3 +14096,12 @@ not fully populated. [snj, ticket #1082] +sys/dev/usb/uftdi.c 1.41-42 +share/man/man4/uftdi.4 1.15 +sys/dev/usb/usbdevs 1.527 + + Add support for multiple channel cards, specifically quad + channel FT4232H. Plus fix minor format nit and legacy title + comment removal. + [snj, ticket #1083] +
CVS commit: [netbsd-5] src/lib/libc/arch/m68k/sys
Module Name:src Committed By: sborrill Date: Sat Oct 10 21:02:46 UTC 2009 Modified Files: src/lib/libc/arch/m68k/sys [netbsd-5]: cerror.S Log Message: Pull up the following revisions(s) (requested by phx in ticket #1085): lib/libc/arch/m68k/sys/cerror.S:revision 1.15 Ensure functions like mmap(2), mremap(2), shmat(2) or sbrk(2) return -1 in case of an error. A side benefit of this is to fix a segfault caused by jemalloc when mmap() failed. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.14.38.1 src/lib/libc/arch/m68k/sys/cerror.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/m68k/sys/cerror.S diff -u src/lib/libc/arch/m68k/sys/cerror.S:1.14 src/lib/libc/arch/m68k/sys/cerror.S:1.14.38.1 --- src/lib/libc/arch/m68k/sys/cerror.S:1.14 Thu Aug 7 16:42:14 2003 +++ src/lib/libc/arch/m68k/sys/cerror.S Sat Oct 10 21:02:46 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: cerror.S,v 1.14 2003/08/07 16:42:14 agc Exp $ */ +/* $NetBSD: cerror.S,v 1.14.38.1 2009/10/10 21:02:46 sborrill Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -39,7 +39,7 @@ #if 0 RCSID(from: @(#)cerror.s 5.1 (Berkeley) 5/12/90) #else - RCSID($NetBSD: cerror.S,v 1.14 2003/08/07 16:42:14 agc Exp $) + RCSID($NetBSD: cerror.S,v 1.14.38.1 2009/10/10 21:02:46 sborrill Exp $) #endif #endif /* LIBC_SCCS and not lint */ @@ -80,4 +80,7 @@ #endif /* _REENTRANT */ movl #-1,%d0 movl #-1,%d1 +#ifdef __SVR4_ABI__ + movl %d0,%a0 +#endif rts
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: sborrill Date: Sat Oct 10 21:09:08 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Ticket 1085 (+ a few whitespace fixes) To generate a diff of this commit: cvs rdiff -u -r1.1.2.98 -r1.1.2.99 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.98 src/doc/CHANGES-5.1:1.1.2.99 --- src/doc/CHANGES-5.1:1.1.2.98 Sat Oct 10 20:35:55 2009 +++ src/doc/CHANGES-5.1 Sat Oct 10 21:09:08 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.98 2009/10/10 20:35:55 sborrill Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.99 2009/10/10 21:09:08 sborrill Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -14089,6 +14089,7 @@ [snj, ticket #1079] distrib/utils/sysinst/util.c 1.161 + Don't extract xetc to /, but rather in /.sysinst (like etc) so we don't blow away existing config files. Wait until all sets have been unpacked to run postinstall. Previously we ran it @@ -14096,12 +14097,19 @@ not fully populated. [snj, ticket #1082] -sys/dev/usb/uftdi.c 1.41-42 -share/man/man4/uftdi.4 1.15 -sys/dev/usb/usbdevs 1.527 +sys/dev/usb/uftdi.c1.41-42 +share/man/man4/uftdi.41.15 +sys/dev/usb/usbdevs1.527 Add support for multiple channel cards, specifically quad channel FT4232H. Plus fix minor format nit and legacy title comment removal. [snj, ticket #1083] +lib/libc/arch/m68k/sys/cerror.S 1.15 + + Ensure functions like mmap(2), mremap(2), shmat(2) or sbrk(2) + return -1 in case of an error. A side benefit of this is to + fix a segfault caused by jemalloc when mmap() failed. + [phx, ticket #1085] +
CVS commit: [netbsd-5] src/distrib/utils/sysinst
Module Name:src Committed By: sborrill Date: Fri Oct 9 08:09:24 UTC 2009 Modified Files: src/distrib/utils/sysinst [netbsd-5]: util.c Log Message: Pull up the following revisions(s) (requested by snj in ticket #1081): distrib/utils/sysinst/util.c: revision 1.160 /usr/X11R7/lib/X11/xkb/symbols/pc went from a directory to a file, so on upgrades we need to remove it before extracting the xbase set. To generate a diff of this commit: cvs rdiff -u -r1.151.14.2 -r1.151.14.3 src/distrib/utils/sysinst/util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/sysinst/util.c diff -u src/distrib/utils/sysinst/util.c:1.151.14.2 src/distrib/utils/sysinst/util.c:1.151.14.3 --- src/distrib/utils/sysinst/util.c:1.151.14.2 Wed Feb 18 01:17:23 2009 +++ src/distrib/utils/sysinst/util.c Fri Oct 9 08:09:24 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: util.c,v 1.151.14.2 2009/02/18 01:17:23 snj Exp $ */ +/* $NetBSD: util.c,v 1.151.14.3 2009/10/09 08:09:24 sborrill Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -675,6 +675,14 @@ } else target_chdir_or_die(/); + /* + * /usr/X11R7/lib/X11/xkb/symbols/pc was a directory in 5.0 + * but is a file in 5.1 and beyond, so on upgrades we need to + * delete it before extracting the xbase set. + */ + if (update dist-set == SET_X11_BASE) + run_program(0, rm -rf usr/X11R7/lib/X11/xkb/symbols/pc); + /* now extract set files into ./. */ if (verbose == 0) rval = run_program(RUN_DISPLAY | RUN_PROGRESS,
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: sborrill Date: Fri Oct 9 08:09:49 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Ticket 1081 To generate a diff of this commit: cvs rdiff -u -r1.1.2.93 -r1.1.2.94 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.93 src/doc/CHANGES-5.1:1.1.2.94 --- src/doc/CHANGES-5.1:1.1.2.93 Thu Oct 8 10:02:55 2009 +++ src/doc/CHANGES-5.1 Fri Oct 9 08:09:48 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.93 2009/10/08 10:02:55 sborrill Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.94 2009/10/09 08:09:48 sborrill Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -14036,9 +14036,16 @@ wb(4): Add a driver for Winbond W83L518D SD/MMC readers. [jmcneill, ticket #1045] -usr.sbin/postinstall/postinstall1.98 +usr.sbin/postinstall/postinstall 1.98 Make the makedev step fail if either MAKEDEV or MAKEDEV.local need to be updated. [taca, ticket #1077] +distrib/utils/sysinst/util.c 1.160 + + usr/X11R7/lib/X11/xkb/symbols/pc went from a directory to a + file, so on upgrades we need to remove it before extracting + the xbase set. + [snj, ticket #1081] +
CVS commit: [netbsd-5] src/usr.bin/man
Module Name:src Committed By: sborrill Date: Thu Oct 8 08:15:24 UTC 2009 Modified Files: src/usr.bin/man [netbsd-5]: man.1 man.c Log Message: Pull up the following revisions(s) (requested by cegger in ticket #1076): usr.bin/man/man.1: revision 1.21 usr.bin/man/man.c: revision 1.39 Allow man(1) to accept a pathname to a man file (e.g. man ./man.1) To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.20.28.1 src/usr.bin/man/man.1 cvs rdiff -u -r1.37 -r1.37.4.1 src/usr.bin/man/man.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/man/man.1 diff -u src/usr.bin/man/man.1:1.20 src/usr.bin/man/man.1:1.20.28.1 --- src/usr.bin/man/man.1:1.20 Thu Apr 13 21:10:44 2006 +++ src/usr.bin/man/man.1 Thu Oct 8 08:15:24 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: man.1,v 1.20 2006/04/13 21:10:44 wiz Exp $ +.\ $NetBSD: man.1,v 1.20.28.1 2009/10/08 08:15:24 sborrill Exp $ .\ .\ Copyright (c) 1989, 1990, 1993 .\ The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\ .\ @(#)man.1 8.2 (Berkeley) 1/2/94 .\ -.Dd April 10, 2006 +.Dd October 6, 2009 .Dt MAN 1 .Os .Sh NAME @@ -168,6 +168,17 @@ argument will be used as if specified by the .Ql Fl s option. +.Pp +If +.Ar name +is given with a full or relative path then +.Nm +interprets it as a file specification, so that you can do +.Nm +.Cm ./foo.5 +or even +.Nm +.Cm /cd/foo/bar.1.gz . .Sh ENVIRONMENT .Bl -tag -width MANPATHX .It Ev MACHINE Index: src/usr.bin/man/man.c diff -u src/usr.bin/man/man.c:1.37 src/usr.bin/man/man.c:1.37.4.1 --- src/usr.bin/man/man.c:1.37 Mon Jul 21 14:19:24 2008 +++ src/usr.bin/man/man.c Thu Oct 8 08:15:24 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: man.c,v 1.37 2008/07/21 14:19:24 lukem Exp $ */ +/* $NetBSD: man.c,v 1.37.4.1 2009/10/08 08:15:24 sborrill Exp $ */ /* * Copyright (c) 1987, 1993, 1994, 1995 @@ -40,7 +40,7 @@ #if 0 static char sccsid[] = @(#)man.c 8.17 (Berkeley) 1/31/95; #else -__RCSID($NetBSD: man.c,v 1.37 2008/07/21 14:19:24 lukem Exp $); +__RCSID($NetBSD: man.c,v 1.37.4.1 2009/10/08 08:15:24 sborrill Exp $); #endif #endif /* not lint */ @@ -473,6 +473,39 @@ exit(cleanup()); } +static int +manual_find_buildkeyword(char *escpage, const char *fmt, + struct manstate *mp, glob_t *pg, size_t cnt) +{ + ENTRY *suffix; + int found; + char *p, buf[MAXPATHLEN]; + + found = 0; + /* Try the _build key words next. */ + TAILQ_FOREACH(suffix, mp-buildlist-entrylist, q) { + for (p = suffix-s; + *p != '\0' !isspace((unsigned char)*p); + ++p) + continue; + if (*p == '\0') + continue; + + *p = '\0'; + (void)snprintf(buf, sizeof(buf), fmt, escpage, suffix-s); + if (!fnmatch(buf, pg-gl_pathv[cnt], 0)) { + if (!mp-where) +build_page(p + 1, pg-gl_pathv[cnt], mp); + *p = ' '; + found = 1; + break; + } + *p = ' '; + } + + return found; +} + /* * manual -- * Search the manuals for the pages. @@ -511,6 +544,63 @@ *eptr = '\0'; + /* + * If 'page' is given with a full or relative path + * then interpret it as a file specification. + */ + if ((page[0] == '/') || (page[0] == '.')) { + /* check if file actually exists */ + (void)strlcpy(buf, escpage, sizeof(buf)); + error = glob(buf, GLOB_APPEND | GLOB_BRACE | GLOB_NOSORT, NULL, pg); + if (error != 0) { + if (error == GLOB_NOMATCH) { +goto notfound; + } else { +errx(EXIT_FAILURE, glob failed); + } + } + + if (pg-gl_matchc == 0) + goto notfound; + + /* clip suffix for the suffix check below */ + p = strrchr(escpage, '.'); + if (p p[0] == '.' isdigit((unsigned char)p[1])) + p[0] = '\0'; + + found = 0; + for (cnt = pg-gl_pathc - pg-gl_matchc; + cnt pg-gl_pathc; ++cnt) + { + found = manual_find_buildkeyword(escpage, %s%s, +mp, pg, cnt); + if (found) { +anyfound = 1; +if (!mp-all) { + /* Delete any other matches. */ + while (++cnt pg-gl_pathc) + pg-gl_pathv[cnt] = ; + break; +} +continue; + } + + /* It's not a man page, forget about it. */ + pg-gl_pathv[cnt] = ; + } + + notfound: + if (!anyfound) { + if (addentry(mp-missinglist, page, 0) 0) { +warn(malloc); +(void)cleanup(); +exit(EXIT_FAILURE); + } + } + free(escpage); + return anyfound; + } + /* For each man directory in mymanpath ... */ TAILQ_FOREACH(mdir, mp-mymanpath-entrylist, q) { @@ -577,28 +667,8 @@ goto next; /* Try the _build key words next. */ - found = 0; - TAILQ_FOREACH(suffix, mp-buildlist-entrylist, q) { -for (p = suffix-s; -*p != '\0' !isspace((unsigned char)*p); -++p) - continue; -if (*p == '\0') - continue; -*p = '\0'; -(void)snprintf(buf, - sizeof(buf), */%s%s, escpage, - suffix-s); -if (!fnmatch(buf, pg-gl_pathv[cnt], 0)) { - if (!mp-where) - build_page(p + 1, - pg-gl_pathv[cnt], mp); -
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: sborrill Date: Thu Oct 8 08:15:57 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Ticket 1076 To generate a diff of this commit: cvs rdiff -u -r1.1.2.90 -r1.1.2.91 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.90 src/doc/CHANGES-5.1:1.1.2.91 --- src/doc/CHANGES-5.1:1.1.2.90 Wed Oct 7 19:09:57 2009 +++ src/doc/CHANGES-5.1 Thu Oct 8 08:15:57 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.90 2009/10/07 19:09:57 sborrill Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.91 2009/10/08 08:15:57 sborrill Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -14006,8 +14006,14 @@ Add sdmmc framework [jmcneill, ticket #1044] -lib/libc/locale/generic_lc_all.c1.3 +lib/libc/locale/generic_lc_all.c 1.3 Fix lib/42124: setlocale(3) never returns NULL with nonexistent locale. [tnozaki, ticket #1069] +usr.bin/man/man.11.21 +usr.bin/man/man.c1.39 + + Allow man(1) to accept a pathname to a man file (e.g. man ./man.1) + [cegger, ticket #1076] +
CVS commit: [netbsd-5] src
Module Name:src Committed By: sborrill Date: Thu Oct 8 09:47:09 UTC 2009 Modified Files: src/distrib/sets/lists/man [netbsd-5]: mi src/share/man/man4 [netbsd-5]: Makefile ld.4 src/sys/arch/amd64/conf [netbsd-5]: GENERIC src/sys/arch/i386/conf [netbsd-5]: ALL GENERIC src/sys/conf [netbsd-5]: files src/sys/dev/acpi [netbsd-5]: files.acpi Added Files: src/share/man/man4 [netbsd-5]: wb.4 src/sys/dev/acpi [netbsd-5]: wb_acpi.c src/sys/dev/ic [netbsd-5]: w83l518d.c w83l518d_sdmmc.c w83l518d_sdmmc.h w83l518dreg.h w83l518dvar.h Log Message: Pull up the following revisions(s) (requested by jmcneill in ticket #1045): distrib/sets/lists/man/mi: revision 1.1160 share/man/man4/Makefile:revision 1.499 share/man/man4/wb.4:revision 1.1-1.2 share/man/man4/ld.4:revision 1.17 sys/arch/i386/conf/ALL: revision 1.215-1.216 + patch sys/arch/i386/conf/GENERIC: revision 1.946-1.947 + patch sys/arch/amd64/conf/GENERIC:revision 1.254-1.256 + patch sys/conf/files: revision 1.958 sys/dev/acpi/files.acpi:revision 1.59 sys/dev/acpi/wb_acpi.c: revision 1.1 sys/dev/ic/w83l518d.c: revision 1.1 sys/dev/ic/w83l518d_sdmmc.c:revision 1.1 sys/dev/ic/w83l518d_sdmmc.h:revision 1.1 sys/dev/ic/w83l518dreg.h: revision 1.1 sys/dev/ic/w83l518dvar.h.c: revision 1.1 wb(4): Add a driver for Winbond W83L518D SD/MMC readers. To generate a diff of this commit: cvs rdiff -u -r1.1109.2.9 -r1.1109.2.10 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.482.2.6 -r1.482.2.7 src/share/man/man4/Makefile cvs rdiff -u -r1.16 -r1.16.4.1 src/share/man/man4/ld.4 cvs rdiff -u -r0 -r1.2.2.2 src/share/man/man4/wb.4 cvs rdiff -u -r1.231.4.5 -r1.231.4.6 src/sys/arch/amd64/conf/GENERIC cvs rdiff -u -r1.183.4.5 -r1.183.4.6 src/sys/arch/i386/conf/ALL cvs rdiff -u -r1.915.2.8 -r1.915.2.9 src/sys/arch/i386/conf/GENERIC cvs rdiff -u -r1.924.4.5 -r1.924.4.6 src/sys/conf/files cvs rdiff -u -r1.52.8.2 -r1.52.8.3 src/sys/dev/acpi/files.acpi cvs rdiff -u -r0 -r1.1.2.2 src/sys/dev/acpi/wb_acpi.c cvs rdiff -u -r0 -r1.1.2.2 src/sys/dev/ic/w83l518d.c \ src/sys/dev/ic/w83l518d_sdmmc.c src/sys/dev/ic/w83l518d_sdmmc.h \ src/sys/dev/ic/w83l518dreg.h src/sys/dev/ic/w83l518dvar.h 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.1109.2.9 src/distrib/sets/lists/man/mi:1.1109.2.10 --- src/distrib/sets/lists/man/mi:1.1109.2.9 Wed Oct 7 15:41:14 2009 +++ src/distrib/sets/lists/man/mi Thu Oct 8 09:47:08 2009 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1109.2.9 2009/10/07 15:41:14 sborrill Exp $ +# $NetBSD: mi,v 1.1109.2.10 2009/10/08 09:47:08 sborrill Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -1646,6 +1646,7 @@ ./usr/share/man/cat4/vnd.0 man-sys-catman .cat ./usr/share/man/cat4/vr.0 man-sys-catman .cat ./usr/share/man/cat4/wapbl.0 man-sys-catman .cat +./usr/share/man/cat4/wb.0 man-sys-catman .cat ./usr/share/man/cat4/wd.0 man-sys-catman .cat ./usr/share/man/cat4/wdc.0 man-sys-catman .cat ./usr/share/man/cat4/wds.0 man-sys-catman .cat @@ -4107,6 +4108,7 @@ ./usr/share/man/html4/vnd.html man-sys-htmlman html ./usr/share/man/html4/vr.html man-sys-htmlman html ./usr/share/man/html4/wapbl.html man-sys-htmlman html +./usr/share/man/html4/wb.html man-sys-htmlman html ./usr/share/man/html4/wd.html man-sys-htmlman html ./usr/share/man/html4/wdc.html man-sys-htmlman html ./usr/share/man/html4/wds.html man-sys-htmlman html @@ -6506,6 +6508,7 @@ ./usr/share/man/man4/vnd.4 man-sys-man .man ./usr/share/man/man4/vr.4 man-sys-man .man ./usr/share/man/man4/wapbl.4 man-sys-man .man +./usr/share/man/man4/wb.4 man-sys-man .man ./usr/share/man/man4/wd.4 man-sys-man .man ./usr/share/man/man4/wdc.4 man-sys-man .man ./usr/share/man/man4/wds.4 man-sys-man .man Index: src/share/man/man4/Makefile diff -u src/share/man/man4/Makefile:1.482.2.6 src/share/man/man4/Makefile:1.482.2.7 --- src/share/man/man4/Makefile:1.482.2.6 Wed Oct 7 15:41:13 2009 +++ src/share/man/man4/Makefile Thu Oct 8 09:47:08 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.482.2.6 2009/10/07 15:41:13 sborrill Exp $ +# $NetBSD: Makefile,v 1.482.2.7 2009/10/08 09:47:08 sborrill Exp $ # @(#)Makefile 8.1 (Berkeley) 6/18/93 MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 acpidalb.4 \ @@ -58,7 +58,7 @@ ubsec.4 udp.4 uep.4 ug.4 uha.4 uk.4 ukphy.4 unix.4 userconf.4 \ veriexec.4 vga.4 vge.4 viaide.4 video.4 vlan.4 vmmon.4 vmnet.4 \ vnd.4 vr.4 \ - wapbl.4 wd.4 wdc.4 wi.4 wm.4 wpi.4 wscons.4 wsdisplay.4 wsfont.4 \ + wapbl.4 wb.4 wd.4 wdc.4 wi.4 wm.4
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: sborrill Date: Thu Oct 8 09:48:44 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Ticket 1045 To generate a diff of this commit: cvs rdiff -u -r1.1.2.91 -r1.1.2.92 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.91 src/doc/CHANGES-5.1:1.1.2.92 --- src/doc/CHANGES-5.1:1.1.2.91 Thu Oct 8 08:15:57 2009 +++ src/doc/CHANGES-5.1 Thu Oct 8 09:48:44 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.91 2009/10/08 08:15:57 sborrill Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.92 2009/10/08 09:48:44 sborrill Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -14017,3 +14017,22 @@ Allow man(1) to accept a pathname to a man file (e.g. man ./man.1) [cegger, ticket #1076] +distrib/sets/lists/man/mi 1.1160 +share/man/man4/Makefile 1.499 +share/man/man4/wb.41.1-1.2 +share/man/man4/ld.41.17 +sys/arch/i386/conf/ALL1.215-1.216 + patch +sys/arch/i386/conf/GENERIC 1.946-1.947 + patch +sys/arch/amd64/conf/GENERIC 1.254-1.256 + patch +sys/conf/files 1.958 +sys/dev/acpi/files.acpi 1.59 +sys/dev/acpi/wb_acpi.c1.1 +sys/dev/ic/w83l518d.c1.1 +sys/dev/ic/w83l518d_sdmmc.c 1.1 +sys/dev/ic/w83l518d_sdmmc.h 1.1 +sys/dev/ic/w83l518dreg.h 1.1 +sys/dev/ic/w83l518dvar.h.c 1.1 + + wb(4): Add a driver for Winbond W83L518D SD/MMC readers. + [jmcneill, ticket #1045] +
CVS commit: [netbsd-5] src/usr.sbin/postinstall
Module Name:src Committed By: sborrill Date: Thu Oct 8 10:00:10 UTC 2009 Modified Files: src/usr.sbin/postinstall [netbsd-5]: postinstall Log Message: Pull up the following revisions(s) (requested by taca in ticket #1077): usr.sbin/postinstall/postinstall: revision 1.98 Make the makedev step fail if either MAKEDEV or MAKEDEV.local need to be updated. To generate a diff of this commit: cvs rdiff -u -r1.76.2.21 -r1.76.2.22 src/usr.sbin/postinstall/postinstall 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/postinstall/postinstall diff -u src/usr.sbin/postinstall/postinstall:1.76.2.21 src/usr.sbin/postinstall/postinstall:1.76.2.22 --- src/usr.sbin/postinstall/postinstall:1.76.2.21 Thu Sep 17 04:24:43 2009 +++ src/usr.sbin/postinstall/postinstall Thu Oct 8 10:00:10 2009 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall,v 1.76.2.21 2009/09/17 04:24:43 snj Exp $ +# $NetBSD: postinstall,v 1.76.2.22 2009/10/08 10:00:10 sborrill Exp $ # # Copyright (c) 2002-2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -845,6 +845,7 @@ do_makedev() { [ -n $1 ] || err 3 USAGE: do_makedev fix|check + failed=0 if [ -f ${SRC_DIR}/etc/MAKEDEV.tmpl ]; then # generate MAKEDEV from source if source is available @@ -860,11 +861,16 @@ || return 1 # ${dir} is set by find_file_in_dirlist() compare_dir $1 ${dir} ${DEST_DIR}/dev 555 MAKEDEV + failed=$(( ${failed} + $? )) + find_file_in_dirlist MAKEDEV.local MAKEDEV.local \ ${SRC_DIR}/etc ${SRC_DIR}/dev \ || return 1 # ${dir} is set by find_file_in_dirlist() compare_dir $1 ${dir} ${DEST_DIR}/dev 555 MAKEDEV.local + failed=$(( ${failed} + $? )) + + return ${failed} } #
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: sborrill Date: Thu Oct 8 10:02:55 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Ticket 1077 To generate a diff of this commit: cvs rdiff -u -r1.1.2.92 -r1.1.2.93 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.92 src/doc/CHANGES-5.1:1.1.2.93 --- src/doc/CHANGES-5.1:1.1.2.92 Thu Oct 8 09:48:44 2009 +++ src/doc/CHANGES-5.1 Thu Oct 8 10:02:55 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.92 2009/10/08 09:48:44 sborrill Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.93 2009/10/08 10:02:55 sborrill Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -14036,3 +14036,9 @@ wb(4): Add a driver for Winbond W83L518D SD/MMC readers. [jmcneill, ticket #1045] +usr.sbin/postinstall/postinstall1.98 + + Make the makedev step fail if either MAKEDEV or MAKEDEV.local + need to be updated. + [taca, ticket #1077] +
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: sborrill Date: Wed Oct 7 15:44:41 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Ticket 1044 To generate a diff of this commit: cvs rdiff -u -r1.1.2.88 -r1.1.2.89 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.88 src/doc/CHANGES-5.1:1.1.2.89 --- src/doc/CHANGES-5.1:1.1.2.88 Tue Oct 6 23:58:58 2009 +++ src/doc/CHANGES-5.1 Wed Oct 7 15:44:41 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.88 2009/10/06 23:58:58 snj Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.89 2009/10/07 15:44:41 sborrill Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -13978,3 +13978,31 @@ function pointer to the routine to be used for open(). [pooka, ticket #1047] +distrib/sets/lists/man/mi patch +share/man/man4/Makefilepatch +share/man/man4/sdmmc.41.1-1.4 +sys/arch/amd64/conf/files.amd64 1.67 +sys/arch/i386/conf/files.i386 1.349 +sys/conf/files 1.945 +sys/dev/sdmmc/Makefile.sdmmcdevs 1.1 +sys/dev/sdmmc/devlist2h.awk 1.1 +sys/dev/sdmmc/files.sdmmc 1.1-1.2 +sys/dev/sdmmc/ld_sdmmc.c 1.1-1.3 +sys/dev/sdmmc/sbt.c1.1-1.2 +sys/dev/sdmmc/sdhc.c1.1-1.3 +sys/dev/sdmmc/sdhcreg.h1.1 +sys/dev/sdmmc/sdhcvar.h1.1 +sys/dev/sdmmc/sdmmc.c1.1 +sys/dev/sdmmc/sdmmc_cis.c 1.1 +sys/dev/sdmmc/sdmmc_io.c 1.1 +sys/dev/sdmmc/sdmmc_ioreg.h 1.1 +sys/dev/sdmmc/sdmmc_mem.c 1.1-1.2 +sys/dev/sdmmc/sdmmcchip.h 1.1 +sys/dev/sdmmc/sdmmcdevs1.1 +sys/dev/sdmmc/sdmmcdevs.h 1.1-1.2 +sys/dev/sdmmc/sdmmcreg.h 1.1-1.3 +sys/dev/sdmmc/sdmmcvar.h 1.1 + + Add sdmmc framework + [jmcneill, ticket #1044] +
CVS commit: [netbsd-5] src/lib/libc/locale
Module Name:src Committed By: sborrill Date: Wed Oct 7 19:09:24 UTC 2009 Modified Files: src/lib/libc/locale [netbsd-5]: generic_lc_all.c Log Message: Pull up the following revisions(s) (requested by tnozaki in ticket #1069): lib/libc/locale/generic_lc_all.c: revision 1.3 Fix lib/42124: setlocale(3) never returns NULL with nonexistent locale. To generate a diff of this commit: cvs rdiff -u -r1.2.2.2 -r1.2.2.3 src/lib/libc/locale/generic_lc_all.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/locale/generic_lc_all.c diff -u src/lib/libc/locale/generic_lc_all.c:1.2.2.2 src/lib/libc/locale/generic_lc_all.c:1.2.2.3 --- src/lib/libc/locale/generic_lc_all.c:1.2.2.2 Thu Jan 15 03:24:07 2009 +++ src/lib/libc/locale/generic_lc_all.c Wed Oct 7 19:09:24 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: generic_lc_all.c,v 1.2.2.2 2009/01/15 03:24:07 snj Exp $ */ +/* $NetBSD: generic_lc_all.c,v 1.2.2.3 2009/10/07 19:09:24 sborrill Exp $ */ /*- * Copyright (c)2008 Citrus Project, @@ -28,7 +28,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: generic_lc_all.c,v 1.2.2.2 2009/01/15 03:24:07 snj Exp $); +__RCSID($NetBSD: generic_lc_all.c,v 1.2.2.3 2009/10/07 19:09:24 sborrill Exp $); #endif /* LIBC_SCCS and not lint */ #include sys/types.h @@ -56,10 +56,11 @@ _locale_category_t *l; char head[_LOCALENAME_LEN_MAX * (_LC_LAST - 1)], *tail; const char *tokens[_LC_LAST], *s, *t; - int i, j; + int load_locale_success, i, j; l = _find_category(1); _DIAGASSERT(l != NULL); + load_locale_success = 0; if (name != NULL) { strlcpy(head[0], name, sizeof(head)); tokens[1] = head[0]; @@ -78,10 +79,11 @@ } tokens[_LC_LAST - 1] = (const char *)tail; tail = strchr(tokens[i], '/'); - if (tail == NULL) + if (tail != NULL) return NULL; } - (*l-setlocale)(tokens[1], locale); + if ((*l-setlocale)(tokens[1], locale) != NULL) + load_locale_success = 1; } s = (*l-setlocale)(NULL, locale); _DIAGASSERT(s != NULL); @@ -89,8 +91,10 @@ for (i = 2, j = 0; i _LC_LAST; ++i) { l = _find_category(i); _DIAGASSERT(l != NULL); - if (name != NULL) - (*l-setlocale)(tokens[1], locale); + if (name != NULL) { + if ((*l-setlocale)(tokens[i], locale) != NULL) +load_locale_success = 1; + } t = (*l-setlocale)(NULL, locale); _DIAGASSERT(t != NULL); if (j == 0) { @@ -106,6 +110,8 @@ strlcat(locale-query[0], /, sizeof(locale-query)); strlcat(locale-query[0], t, sizeof(locale-query)); } + if (name != NULL !load_locale_success) + return NULL; return (const char *)locale-query[0]; }
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: sborrill Date: Wed Oct 7 19:09:57 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Ticket 1069 To generate a diff of this commit: cvs rdiff -u -r1.1.2.89 -r1.1.2.90 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.89 src/doc/CHANGES-5.1:1.1.2.90 --- src/doc/CHANGES-5.1:1.1.2.89 Wed Oct 7 15:44:41 2009 +++ src/doc/CHANGES-5.1 Wed Oct 7 19:09:57 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.89 2009/10/07 15:44:41 sborrill Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.90 2009/10/07 19:09:57 sborrill Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -14006,3 +14006,8 @@ Add sdmmc framework [jmcneill, ticket #1044] +lib/libc/locale/generic_lc_all.c1.3 + + Fix lib/42124: setlocale(3) never returns NULL with nonexistent locale. + [tnozaki, ticket #1069] +
CVS commit: [netbsd-5] src/distrib/sets/lists/base
Module Name:src Committed By: snj Date: Tue Oct 6 23:57:56 UTC 2009 Modified Files: src/distrib/sets/lists/base [netbsd-5]: mi Log Message: Apply patch (requested by mrg in ticket #1062): Fix build for non-xorg ports. To generate a diff of this commit: cvs rdiff -u -r1.780.2.11 -r1.780.2.12 src/distrib/sets/lists/base/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/base/mi diff -u src/distrib/sets/lists/base/mi:1.780.2.11 src/distrib/sets/lists/base/mi:1.780.2.12 --- src/distrib/sets/lists/base/mi:1.780.2.11 Tue Sep 29 23:30:04 2009 +++ src/distrib/sets/lists/base/mi Tue Oct 6 23:57:56 2009 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.780.2.11 2009/09/29 23:30:04 snj Exp $ +# $NetBSD: mi,v 1.780.2.12 2009/10/06 23:57:56 snj Exp $ # # Note: Don't delete entries from here - mark them as obsolete instead, # unless otherwise stated below. @@ -590,7 +590,7 @@ ./usr/X11R7/lib/X11/xedit/lisp/progmodes base-x11-root ./usr/X11R7/lib/X11/xkbbase-x11-root ./usr/X11R7/lib/X11/xkb/compat base-x11-root -./usr/X11R7/lib/X11/xkb/compiled base-x11-root +./usr/X11R7/lib/X11/xkb/compiled base-x11-root xorg ./usr/X11R7/lib/X11/xkb/geometry base-x11-root ./usr/X11R7/lib/X11/xkb/geometry/digital -obsolete- obsolete ./usr/X11R7/lib/X11/xkb/geometry/digital_vndr base-x11-root
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: snj Date: Tue Oct 6 23:58:59 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Add another changed file to ticket 1062. To generate a diff of this commit: cvs rdiff -u -r1.1.2.87 -r1.1.2.88 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.87 src/doc/CHANGES-5.1:1.1.2.88 --- src/doc/CHANGES-5.1:1.1.2.87 Mon Oct 5 11:58:28 2009 +++ src/doc/CHANGES-5.1 Tue Oct 6 23:58:58 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.87 2009/10/05 11:58:28 sborrill Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.88 2009/10/06 23:58:58 snj Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -13907,6 +13907,7 @@ the default density is detected correctly. [tsutsui, ticket #1058] +distrib/sets/lists/base/mi patch etc/mtree/NetBSD.distpatch external/mit/xorg/bin/xkbcomp/Makefile 1.5 external/mit/xorg/bin/xkbcomp/Makefile.common 1.2
CVS commit: [netbsd-5] src/sys/dev/acpi
Module Name:src Committed By: sborrill Date: Mon Oct 5 10:11:34 UTC 2009 Modified Files: src/sys/dev/acpi [netbsd-5]: acpi_bat.c Log Message: Pull up revision 1.74 (requested by jmcneill in ticket #1067) If the driver thinks a battery is not present, poll for present status. Workaround for firmware that doesn't report battery present status immediately at boot and doesn't issue a subsequent notify when the information becomes available. To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.69.8.1 src/sys/dev/acpi/acpi_bat.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_bat.c diff -u src/sys/dev/acpi/acpi_bat.c:1.69 src/sys/dev/acpi/acpi_bat.c:1.69.8.1 --- src/sys/dev/acpi/acpi_bat.c:1.69 Tue Jun 3 15:02:31 2008 +++ src/sys/dev/acpi/acpi_bat.c Mon Oct 5 10:11:34 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_bat.c,v 1.69 2008/06/03 15:02:31 jmcneill Exp $ */ +/* $NetBSD: acpi_bat.c,v 1.69.8.1 2009/10/05 10:11:34 sborrill Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -79,7 +79,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_bat.c,v 1.69 2008/06/03 15:02:31 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_bat.c,v 1.69.8.1 2009/10/05 10:11:34 sborrill Exp $); #include sys/param.h #include sys/systm.h @@ -782,6 +782,9 @@ ACPI_STATUS rv; struct timeval tv, tmp; + if (!ABAT_ISSET(sc, ABAT_F_PRESENT)) + acpibat_battery_present(dv); + if (ABAT_ISSET(sc, ABAT_F_PRESENT)) { tmp.tv_sec = 5; tmp.tv_usec = 0;
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: sborrill Date: Mon Oct 5 10:13:06 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Ticket 1067 To generate a diff of this commit: cvs rdiff -u -r1.1.2.81 -r1.1.2.82 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.81 src/doc/CHANGES-5.1:1.1.2.82 --- src/doc/CHANGES-5.1:1.1.2.81 Sun Oct 4 11:49:23 2009 +++ src/doc/CHANGES-5.1 Mon Oct 5 10:13:06 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.81 2009/10/04 11:49:23 bouyer Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.82 2009/10/05 10:13:06 sborrill Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -13935,3 +13935,11 @@ Only generate SHA512 and MD5 checksums for releases. [snj, ticket #1066] +sys/dev/acpi/acpi_bat.c1.74 + + If the driver thinks a battery is not present, poll for present + status.Workaround for firmware that doesn't report battery present + status immediately at boot and doesn't issue a subsequent notify + when the information becomes available. + [jmcneill, ticket #1067] +
CVS commit: [netbsd-5] src/sys/arch/x86
Module Name:src Committed By: sborrill Date: Mon Oct 5 10:34:07 UTC 2009 Modified Files: src/sys/arch/x86/include [netbsd-5]: cpuvar.h src/sys/arch/x86/x86 [netbsd-5]: est.c intel_busclock.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #1059): sys/arch/x86/include/cpuvar.h: 1.30 sys/arch/x86/x86/est.c: 1.12 sys/arch/x86/x86/intel_busclock.c: 1.8 Use the TSC and current multiplier to calculate bus clock on VIA C7 Esther. Probably needed for all C7 and Nano processors, but to be safe only use this alternate method on Esther for now. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.27.8.1 src/sys/arch/x86/include/cpuvar.h cvs rdiff -u -r1.9 -r1.9.10.1 src/sys/arch/x86/x86/est.c cvs rdiff -u -r1.5.10.1 -r1.5.10.2 src/sys/arch/x86/x86/intel_busclock.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/include/cpuvar.h diff -u src/sys/arch/x86/include/cpuvar.h:1.27 src/sys/arch/x86/include/cpuvar.h:1.27.8.1 --- src/sys/arch/x86/include/cpuvar.h:1.27 Tue May 13 22:39:17 2008 +++ src/sys/arch/x86/include/cpuvar.h Mon Oct 5 10:34:07 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuvar.h,v 1.27 2008/05/13 22:39:17 ad Exp $ */ +/* $NetBSD: cpuvar.h,v 1.27.8.1 2009/10/05 10:34:07 sborrill Exp $ */ /*- * Copyright (c) 2000, 2007 The NetBSD Foundation, Inc. @@ -127,6 +127,7 @@ #ifdef ENHANCED_SPEEDSTEP void est_init(int); int via_get_bus_clock(struct cpu_info *); +int viac7_get_bus_clock(struct cpu_info *); int p3_get_bus_clock(struct cpu_info *); int p4_get_bus_clock(struct cpu_info *); #endif Index: src/sys/arch/x86/x86/est.c diff -u src/sys/arch/x86/x86/est.c:1.9 src/sys/arch/x86/x86/est.c:1.9.10.1 --- src/sys/arch/x86/x86/est.c:1.9 Mon Apr 28 20:23:40 2008 +++ src/sys/arch/x86/x86/est.c Mon Oct 5 10:34:07 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: est.c,v 1.9 2008/04/28 20:23:40 martin Exp $ */ +/* $NetBSD: est.c,v 1.9.10.1 2009/10/05 10:34:07 sborrill 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.9 2008/04/28 20:23:40 martin Exp $); +__KERNEL_RCSID(0, $NetBSD: est.c,v 1.9.10.1 2009/10/05 10:34:07 sborrill Exp $); #include sys/param.h #include sys/systm.h @@ -1088,9 +1088,17 @@ if (CPUID2FAMILY(curcpu()-ci_signature) == 15) bus_clock = p4_get_bus_clock(curcpu()); else if (CPUID2FAMILY(curcpu()-ci_signature) == 6) { - if (vendor == CPUVENDOR_IDT) - bus_clock = via_get_bus_clock(curcpu()); - else + if (vendor == CPUVENDOR_IDT) { + switch (CPUID2MODEL(curcpu()-ci_signature)) { + case 0xa: /* C7 Esther */ + case 0xd: /* C7 Esther */ +bus_clock = viac7_get_bus_clock(curcpu()); +break; + default: +bus_clock = via_get_bus_clock(curcpu()); +break; + } + } else bus_clock = p3_get_bus_clock(curcpu()); } Index: src/sys/arch/x86/x86/intel_busclock.c diff -u src/sys/arch/x86/x86/intel_busclock.c:1.5.10.1 src/sys/arch/x86/x86/intel_busclock.c:1.5.10.2 --- src/sys/arch/x86/x86/intel_busclock.c:1.5.10.1 Fri Nov 14 02:49:37 2008 +++ src/sys/arch/x86/x86/intel_busclock.c Mon Oct 5 10:34:07 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_busclock.c,v 1.5.10.1 2008/11/14 02:49:37 snj Exp $ */ +/* $NetBSD: intel_busclock.c,v 1.5.10.2 2009/10/05 10:34:07 sborrill Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intel_busclock.c,v 1.5.10.1 2008/11/14 02:49:37 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: intel_busclock.c,v 1.5.10.2 2009/10/05 10:34:07 sborrill Exp $); #include sys/param.h #include sys/systm.h @@ -72,6 +72,21 @@ } int +viac7_get_bus_clock(struct cpu_info *ci) +{ + uint64_t msr; + int mult; + + msr = rdmsr(MSR_PERF_STATUS); + mult = (msr 8) 0xff; + if (mult == 0) + return 0; + + return ((ci-ci_data.cpu_cc_freq + 1000) / 1000 * 1000) / + mult / 1; +} + +int p3_get_bus_clock(struct cpu_info *ci) { uint64_t msr;
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: sborrill Date: Mon Oct 5 10:34:33 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Ticket 1059 To generate a diff of this commit: cvs rdiff -u -r1.1.2.82 -r1.1.2.83 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.82 src/doc/CHANGES-5.1:1.1.2.83 --- src/doc/CHANGES-5.1:1.1.2.82 Mon Oct 5 10:13:06 2009 +++ src/doc/CHANGES-5.1 Mon Oct 5 10:34:33 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.82 2009/10/05 10:13:06 sborrill Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.83 2009/10/05 10:34:33 sborrill Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -13943,3 +13943,12 @@ when the information becomes available. [jmcneill, ticket #1067] +sys/arch/x86/include/cpuvar.h 1.30 +sys/arch/x86/x86/est.c1.12 +sys/arch/x86/x86/intel_busclock.c 1.8 + + Use the TSC and current multiplier to calculate bus clock on VIA + C7 Esther. Probably needed for all C7 and Nano processors, but + to be safe only use this alternate method on Esther for now. + [jmcneill, ticket #1059] +
CVS commit: [netbsd-5] src/dist/libpcap
Module Name:src Committed By: sborrill Date: Mon Oct 5 11:16:12 UTC 2009 Modified Files: src/dist/libpcap [netbsd-5]: inet.c Log Message: Pull up the following revision(s) (requested by bouyer in ticket #1039): dist/libpcap/inet.c:revision 1.3 Fix pcap_lookupnet(): reset ifr before SIOCGIFNETMASK. Without it we get back a bogus netmask. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.26.1 src/dist/libpcap/inet.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/libpcap/inet.c diff -u src/dist/libpcap/inet.c:1.2 src/dist/libpcap/inet.c:1.2.26.1 --- src/dist/libpcap/inet.c:1.2 Mon Feb 27 15:53:24 2006 +++ src/dist/libpcap/inet.c Mon Oct 5 11:16:11 2009 @@ -34,7 +34,7 @@ #ifndef lint static const char rcsid[] _U_ = -@(#) $Header: /cvsroot/src/dist/libpcap/inet.c,v 1.2 2006/02/27 15:53:24 drochner Exp $ (LBL); +@(#) $Header: /cvsroot/src/dist/libpcap/inet.c,v 1.2.26.1 2009/10/05 11:16:11 sborrill Exp $ (LBL); #endif #ifdef HAVE_CONFIG_H @@ -573,6 +573,12 @@ } sin4 = (struct sockaddr_in *)ifr.ifr_addr; *netp = sin4-sin_addr.s_addr; + memset(ifr, 0, sizeof(ifr)); +#ifdef linux + /* XXX Work around Linux kernel bug */ + ifr.ifr_addr.sa_family = AF_INET; +#endif + (void)strncpy(ifr.ifr_name, device, sizeof(ifr.ifr_name)); if (ioctl(fd, SIOCGIFNETMASK, (char *)ifr) 0) { (void)snprintf(errbuf, PCAP_ERRBUF_SIZE, SIOCGIFNETMASK: %s: %s, device, pcap_strerror(errno));
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: sborrill Date: Mon Oct 5 11:16:38 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Ticket 1039 To generate a diff of this commit: cvs rdiff -u -r1.1.2.83 -r1.1.2.84 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.83 src/doc/CHANGES-5.1:1.1.2.84 --- src/doc/CHANGES-5.1:1.1.2.83 Mon Oct 5 10:34:33 2009 +++ src/doc/CHANGES-5.1 Mon Oct 5 11:16:38 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.83 2009/10/05 10:34:33 sborrill Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.84 2009/10/05 11:16:38 sborrill Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -13952,3 +13952,9 @@ to be safe only use this alternate method on Esther for now. [jmcneill, ticket #1059] +dist/libpcap/inet.c1.3 + + Fix pcap_lookupnet(): reset ifr before SIOCGIFNETMASK. Without it + we get back a bogus netmask. + [bouyer, ticket #1039] +
CVS commit: [netbsd-5] src/sys/arch
Module Name:src Committed By: sborrill Date: Mon Oct 5 11:37:14 UTC 2009 Modified Files: src/sys/arch/i386/conf [netbsd-5]: ALL GENERIC src/sys/arch/x86/conf [netbsd-5]: files.x86 src/sys/arch/x86/include [netbsd-5]: cpuvar.h src/sys/arch/x86/x86 [netbsd-5]: identcpu.c Added Files: src/sys/arch/x86/x86 [netbsd-5]: viac7temp.c Log Message: Pull up the following revisions(s) (requested by jmcneill in ticket #1061): sys/arch/x86/conf/files.x86:revision 1.53 sys/arch/x86/include/cpuvar.h: revision 1.31 sys/arch/x86/x86/identcpu.c:revision 1.17 sys/arch/x86/x86/viac7temp.c: revision 1.1 sys/arch/i386/conf/ALL: revision 1.218 sys/arch/i386/conf/GENERIC: revision 1.949 Add support for VIA C7 temperature sensors (options VIA_C7TEMP) and enable in i386 GENERIC kernel. To generate a diff of this commit: cvs rdiff -u -r1.183.4.4 -r1.183.4.5 src/sys/arch/i386/conf/ALL cvs rdiff -u -r1.915.2.7 -r1.915.2.8 src/sys/arch/i386/conf/GENERIC cvs rdiff -u -r1.44.4.1 -r1.44.4.2 src/sys/arch/x86/conf/files.x86 cvs rdiff -u -r1.27.8.1 -r1.27.8.2 src/sys/arch/x86/include/cpuvar.h cvs rdiff -u -r1.10.4.3 -r1.10.4.4 src/sys/arch/x86/x86/identcpu.c cvs rdiff -u -r0 -r1.1.2.2 src/sys/arch/x86/x86/viac7temp.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/conf/ALL diff -u src/sys/arch/i386/conf/ALL:1.183.4.4 src/sys/arch/i386/conf/ALL:1.183.4.5 --- src/sys/arch/i386/conf/ALL:1.183.4.4 Sat Sep 26 19:52:09 2009 +++ src/sys/arch/i386/conf/ALL Mon Oct 5 11:37:13 2009 @@ -1,4 +1,4 @@ -# $NetBSD: ALL,v 1.183.4.4 2009/09/26 19:52:09 snj Exp $ +# $NetBSD: ALL,v 1.183.4.5 2009/10/05 11:37:13 sborrill 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.183.4.4 $ +#ident ALL-$Revision: 1.183.4.5 $ maxusers 32 # estimated number of users @@ -629,6 +629,9 @@ # Intel Core's on-die Thermal sensor options INTEL_CORETEMP +# VIA C7 Temperature sensor +options VIA_C7TEMP + # Intel ICH SMBus controller ichsmb* at pci? dev ? function ? iic* at ichsmb? Index: src/sys/arch/i386/conf/GENERIC diff -u src/sys/arch/i386/conf/GENERIC:1.915.2.7 src/sys/arch/i386/conf/GENERIC:1.915.2.8 --- src/sys/arch/i386/conf/GENERIC:1.915.2.7 Sat Sep 26 19:52:09 2009 +++ src/sys/arch/i386/conf/GENERIC Mon Oct 5 11:37:13 2009 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.915.2.7 2009/09/26 19:52:09 snj Exp $ +# $NetBSD: GENERIC,v 1.915.2.8 2009/10/05 11:37:13 sborrill Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GENERIC-$Revision: 1.915.2.7 $ +#ident GENERIC-$Revision: 1.915.2.8 $ maxusers 64 # estimated number of users @@ -622,6 +622,9 @@ # Intel Core's on-die Thermal sensor options INTEL_CORETEMP +# VIA C7 Temperature sensor +options VIA_C7TEMP + # Intel ICH SMBus controller ichsmb* at pci? dev ? function ? iic* at ichsmb? Index: src/sys/arch/x86/conf/files.x86 diff -u src/sys/arch/x86/conf/files.x86:1.44.4.1 src/sys/arch/x86/conf/files.x86:1.44.4.2 --- src/sys/arch/x86/conf/files.x86:1.44.4.1 Tue Jun 16 02:19:44 2009 +++ src/sys/arch/x86/conf/files.x86 Mon Oct 5 11:37:14 2009 @@ -1,4 +1,4 @@ -# $NetBSD: files.x86,v 1.44.4.1 2009/06/16 02:19:44 snj Exp $ +# $NetBSD: files.x86,v 1.44.4.2 2009/10/05 11:37:14 sborrill Exp $ # options for MP configuration through the MP spec defflag opt_mpbios.h MPBIOS MPVERBOSE MPDEBUG MPBIOS_SCANPCI @@ -23,6 +23,9 @@ # AMD Powernow/Cool`n'Quiet Technology defflag opt_powernow_k8.h POWERNOW_K8 +# VIA C7 Temperature sensor +defflag opt_via_c7temp.h VIA_C7TEMP: sysmon_envsys + # VIA PadLock support defflag opt_viapadlock.h VIA_PADLOCK: opencrypto file arch/x86/x86/via_padlock.c via_padlock @@ -93,6 +96,9 @@ # Intel On-Die Temperature sensor file arch/x86/x86/coretemp.c intel_coretemp +# VIA C7 Temperature sensor +file arch/x86/x86/viac7temp.c via_c7temp + # IPMI device device ipmi: sysmon_envsys, sysmon_wdog attach ipmi at ipmibus Index: src/sys/arch/x86/include/cpuvar.h diff -u src/sys/arch/x86/include/cpuvar.h:1.27.8.1 src/sys/arch/x86/include/cpuvar.h:1.27.8.2 --- src/sys/arch/x86/include/cpuvar.h:1.27.8.1 Mon Oct 5 10:34:07 2009 +++ src/sys/arch/x86/include/cpuvar.h Mon Oct 5 11:37:14 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuvar.h,v 1.27.8.1 2009/10/05 10:34:07 sborrill Exp $ */ +/* $NetBSD: cpuvar.h,v 1.27.8.2 2009/10/05 11:37:14 sborrill Exp $ */ /*- * Copyright (c) 2000, 2007 The NetBSD Foundation, Inc. @@ -91,6 +91,7 @@ #include opt_enhanced_speedstep.h #include opt_intel_coretemp.h #include opt_intel_odcm.h +#include opt_via_c7temp.h #endif #ifdef MULTIPROCESSOR @@ -116,6 +117,10
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: sborrill Date: Mon Oct 5 11:38:36 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Ticket 1061 To generate a diff of this commit: cvs rdiff -u -r1.1.2.84 -r1.1.2.85 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.84 src/doc/CHANGES-5.1:1.1.2.85 --- src/doc/CHANGES-5.1:1.1.2.84 Mon Oct 5 11:16:38 2009 +++ src/doc/CHANGES-5.1 Mon Oct 5 11:38:36 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.84 2009/10/05 11:16:38 sborrill Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.85 2009/10/05 11:38:36 sborrill Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -13958,3 +13958,14 @@ we get back a bogus netmask. [bouyer, ticket #1039] +sys/arch/x86/conf/files.x861.53 +sys/arch/x86/include/cpuvar.h1.31 +sys/arch/x86/x86/identcpu.c1.17 +sys/arch/x86/x86/viac7temp.c1.1 +sys/arch/i386/conf/ALL 1.218 +sys/arch/i386/conf/GENERIC1.949 + + Add support for VIA C7 temperature sensors (options VIA_C7TEMP) + and enable in i386 GENERIC kernel. + [jmcneill, ticket #1061] +
CVS commit: [netbsd-5] src
Module Name:src Committed By: sborrill Date: Mon Oct 5 11:46:22 UTC 2009 Modified Files: src/include [netbsd-5]: util.h src/lib/libutil [netbsd-5]: opendisk.c Log Message: Pull up the following revisions(s) (requested by pooka in ticket #1047): include/util.h: revision 1.52 lib/libutil/opendisk.c: revision 1.11 Add opendisk1(), which functions like opendisk(), but takes a function pointer to the routine to be used for open(). To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.49.12.1 src/include/util.h cvs rdiff -u -r1.10 -r1.10.6.1 src/lib/libutil/opendisk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/util.h diff -u src/include/util.h:1.49 src/include/util.h:1.49.12.1 --- src/include/util.h:1.49 Fri Dec 14 16:36:19 2007 +++ src/include/util.h Mon Oct 5 11:46:21 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: util.h,v 1.49 2007/12/14 16:36:19 christos Exp $ */ +/* $NetBSD: util.h,v 1.49.12.1 2009/10/05 11:46:21 sborrill Exp $ */ /*- * Copyright (c) 1995 @@ -80,6 +80,8 @@ void logwtmp(const char *, const char *, const char *); void logwtmpx(const char *, const char *, const char *, int, int); int opendisk(const char *, int, char *, size_t, int); +int opendisk1(const char *, int, char *, size_t, int, + int (*)(const char *, int, mode_t)); int openpty(int *, int *, char *, struct termios *, struct winsize *); time_t parsedate(const char *, const time_t *, const int *); Index: src/lib/libutil/opendisk.c diff -u src/lib/libutil/opendisk.c:1.10 src/lib/libutil/opendisk.c:1.10.6.1 --- src/lib/libutil/opendisk.c:1.10 Mon Apr 28 20:23:03 2008 +++ src/lib/libutil/opendisk.c Mon Oct 5 11:46:21 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: opendisk.c,v 1.10 2008/04/28 20:23:03 martin Exp $ */ +/* $NetBSD: opendisk.c,v 1.10.6.1 2009/10/05 11:46:21 sborrill Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: opendisk.c,v 1.10 2008/04/28 20:23:03 martin Exp $); +__RCSID($NetBSD: opendisk.c,v 1.10.6.1 2009/10/05 11:46:21 sborrill Exp $); #endif #include sys/param.h @@ -44,8 +44,9 @@ #include stdio.h #include string.h -int -opendisk(const char *path, int flags, char *buf, size_t buflen, int iscooked) +static int +__opendisk(const char *path, int flags, char *buf, size_t buflen, int iscooked, + int (*ofn)(const char *, int, mode_t)) { int f, rawpart; @@ -64,12 +65,12 @@ if (rawpart 0) return (-1); /* sysctl(3) in getrawpartition sets errno */ - f = open(buf, flags); + f = ofn(buf, flags, 0); if (f != -1 || errno != ENOENT) return (f); snprintf(buf, buflen, %s%c, path, 'a' + rawpart); - f = open(buf, flags); + f = ofn(buf, flags, 0); if (f != -1 || errno != ENOENT) return (f); @@ -77,12 +78,27 @@ return (-1); snprintf(buf, buflen, %s%s%s, _PATH_DEV, iscooked ? : r, path); - f = open(buf, flags); + f = ofn(buf, flags, 0); if (f != -1 || errno != ENOENT) return (f); snprintf(buf, buflen, %s%s%s%c, _PATH_DEV, iscooked ? : r, path, 'a' + rawpart); - f = open(buf, flags); + f = ofn(buf, flags, 0); return (f); } + +int +opendisk(const char *path, int flags, char *buf, size_t buflen, int iscooked) +{ + + return __opendisk(path, flags, buf, buflen, iscooked, (void *)open); +} + +int +opendisk1(const char *path, int flags, char *buf, size_t buflen, int iscooked, + int (*ofn)(const char *, int, mode_t)) +{ + + return __opendisk(path, flags, buf, buflen, iscooked, ofn); +}
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: sborrill Date: Mon Oct 5 11:47:05 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Ticket 1047 (plus whitespace fix for previous commit). To generate a diff of this commit: cvs rdiff -u -r1.1.2.85 -r1.1.2.86 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.85 src/doc/CHANGES-5.1:1.1.2.86 --- src/doc/CHANGES-5.1:1.1.2.85 Mon Oct 5 11:38:36 2009 +++ src/doc/CHANGES-5.1 Mon Oct 5 11:47:05 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.85 2009/10/05 11:38:36 sborrill Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.86 2009/10/05 11:47:05 sborrill Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -13958,14 +13958,21 @@ we get back a bogus netmask. [bouyer, ticket #1039] -sys/arch/x86/conf/files.x861.53 -sys/arch/x86/include/cpuvar.h1.31 -sys/arch/x86/x86/identcpu.c1.17 -sys/arch/x86/x86/viac7temp.c1.1 -sys/arch/i386/conf/ALL 1.218 -sys/arch/i386/conf/GENERIC1.949 +sys/arch/x86/conf/files.x86 1.53 +sys/arch/x86/include/cpuvar.h 1.31 +sys/arch/x86/x86/identcpu.c 1.17 +sys/arch/x86/x86/viac7temp.c 1.1 +sys/arch/i386/conf/ALL1.218 +sys/arch/i386/conf/GENERIC 1.949 Add support for VIA C7 temperature sensors (options VIA_C7TEMP) and enable in i386 GENERIC kernel. [jmcneill, ticket #1061] +include/util.h 1.52 +lib/libutil/opendisk.c1.11 + + Add opendisk1(), which functions like opendisk(), but takes a + function pointer to the routine to be used for open(). + [pooka, ticket #1047] +
CVS commit: [netbsd-5] src/sys/arch/xen/conf
Module Name:src Committed By: sborrill Date: Mon Oct 5 11:57:41 UTC 2009 Modified Files: src/sys/arch/xen/conf [netbsd-5]: files.compat Log Message: Pull up the following revisions(s) (requested by jmcneill in ticket #1061): sys/arch/xen/conf/files.compat: revision 1.22 Extra file required in addition to original request. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.18.20.1 src/sys/arch/xen/conf/files.compat 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/conf/files.compat diff -u src/sys/arch/xen/conf/files.compat:1.18 src/sys/arch/xen/conf/files.compat:1.18.20.1 --- src/sys/arch/xen/conf/files.compat:1.18 Wed Jan 23 19:46:45 2008 +++ src/sys/arch/xen/conf/files.compat Mon Oct 5 11:57:41 2009 @@ -1,4 +1,4 @@ -# $NetBSD: files.compat,v 1.18 2008/01/23 19:46:45 bouyer Exp $ +# $NetBSD: files.compat,v 1.18.20.1 2009/10/05 11:57:41 sborrill Exp $ # NetBSD: files.x86,v 1.10 2003/10/08 17:30:00 bouyer Exp # options for MP configuration through the MP spec @@ -67,6 +67,9 @@ defflag opt_powernow_k7.h XXXPOWERNOW_K7 +# VIA C7 Temperature sensor +defflag opt_via_c7temp.h XXXVIA_CORETEMP + # Multiboot support defflag opt_multiboot.h XXXMULTIBOOT
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: sborrill Date: Mon Oct 5 11:58:28 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Extra file required for ticket 1061 To generate a diff of this commit: cvs rdiff -u -r1.1.2.86 -r1.1.2.87 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.86 src/doc/CHANGES-5.1:1.1.2.87 --- src/doc/CHANGES-5.1:1.1.2.86 Mon Oct 5 11:47:05 2009 +++ src/doc/CHANGES-5.1 Mon Oct 5 11:58:28 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.86 2009/10/05 11:47:05 sborrill Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.87 2009/10/05 11:58:28 sborrill Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -13964,6 +13964,7 @@ sys/arch/x86/x86/viac7temp.c 1.1 sys/arch/i386/conf/ALL1.218 sys/arch/i386/conf/GENERIC 1.949 +sys/arch/xen/conf/files.compat 1.22 Add support for VIA C7 temperature sensors (options VIA_C7TEMP) and enable in i386 GENERIC kernel.
CVS commit: [netbsd-5] src
Module Name:src Committed By: bouyer Date: Sun Oct 4 11:48:39 UTC 2009 Modified Files: src/distrib/cdrom [netbsd-5]: hide-hfs.lst src/distrib/mac68k/stand [netbsd-5]: Makefile src/distrib/notes/common [netbsd-5]: main src/distrib/sets [netbsd-5]: Makefile makesrctars makesums src/share/man/man7 [netbsd-5]: release.7 Log Message: Pull up following revision(s) (requested by snj in ticket #1066): distrib/notes/common/main: revision 1.451 share/man/man7/release.7: revision 1.31 via patch distrib/mac68k/stand/Makefile: revision 1.6 distrib/sets/makesums: revision 1.16 distrib/sets/Makefile: revision 1.70 distrib/sets/makesrctars: revision 1.37 distrib/cdrom/hide-hfs.lst: revision 1.5 Sync release(7) with reality. Only generate SHA512 and MD5 checksums for releases. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.42.1 src/distrib/cdrom/hide-hfs.lst cvs rdiff -u -r1.5 -r1.5.2.1 src/distrib/mac68k/stand/Makefile cvs rdiff -u -r1.425.2.5 -r1.425.2.6 src/distrib/notes/common/main cvs rdiff -u -r1.63.2.1 -r1.63.2.2 src/distrib/sets/Makefile cvs rdiff -u -r1.34 -r1.34.6.1 src/distrib/sets/makesrctars cvs rdiff -u -r1.15 -r1.15.28.1 src/distrib/sets/makesums cvs rdiff -u -r1.25 -r1.25.4.1 src/share/man/man7/release.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/cdrom/hide-hfs.lst diff -u src/distrib/cdrom/hide-hfs.lst:1.4 src/distrib/cdrom/hide-hfs.lst:1.4.42.1 --- src/distrib/cdrom/hide-hfs.lst:1.4 Thu Nov 30 05:14:01 2000 +++ src/distrib/cdrom/hide-hfs.lst Sun Oct 4 11:48:39 2009 @@ -1,7 +1,5 @@ -BSDSUM -CKSUM MD5 -SYSVSUM +SHA512 TRANS.TBL INSTALL.more ./boot Index: src/distrib/mac68k/stand/Makefile diff -u src/distrib/mac68k/stand/Makefile:1.5 src/distrib/mac68k/stand/Makefile:1.5.2.1 --- src/distrib/mac68k/stand/Makefile:1.5 Mon Jun 23 02:16:53 2008 +++ src/distrib/mac68k/stand/Makefile Sun Oct 4 11:48:39 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2008/06/23 02:16:53 matt Exp $ +# $NetBSD: Makefile,v 1.5.2.1 2009/10/04 11:48:39 bouyer Exp $ # .include bsd.own.mk @@ -18,7 +18,7 @@ ${RELEASE_INSTALL} ${DISTRIBDIR}/mac68k/stand/extensions.map \ ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc rm -f \ - ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/{BSDSUM,CKSUM,MD5,SYSVSUM} + ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/{MD5,SHA512} for i in BSD_Mac68k_Booter.bin Mkfs.sea.hqx Booter-HTML-manual-12.tar \ Mkfs_1.47.sea.bin Mkfs_1.47.sea.hqx Booter2.0.0.sea \ BooterManual.stxt.bin NetBSD_ROM.sit.hqx Installer.sea.hqx \ @@ -31,31 +31,22 @@ do \ ${RELEASE_INSTALL} $$i ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc ; \ (cd ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc ; \ - ${TOOL_CKSUM} -o1 `basename $$i` BSDSUM) ; \ - (cd ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc ; \ - ${TOOL_CKSUM} `basename $$i` CKSUM) ; \ - (cd ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc ; \ ${TOOL_CKSUM} -a MD5 `basename $$i` MD5) ; \ (cd ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc ; \ - ${TOOL_CKSUM} -o2 `basename $$i` SYSVSUM) ; \ + ${TOOL_CKSUM} -a SHA512 `basename $$i` SHA512) ; \ done ${INSTALL} -d ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src rm -f \ - ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src/{BSDSUM,CKSUM,MD5} - rm -f ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src/SYSVSUM + ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src/{MD5,SHA512} for i in Booter2.0.0-src.sea Mkfs_1.47src.sea.hqx \ Installer_1.1g.src.sea.hqx Installer_1.1h.src.sea.hqx ; \ do \ ${RELEASE_INSTALL} $$i \ ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src ; \ (cd ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src ; \ - ${TOOL_CKSUM} -o1 `basename $$i` BSDSUM) ; \ - (cd ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src ; \ - ${TOOL_CKSUM} `basename $$i` CKSUM) ; \ - (cd ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src ; \ ${TOOL_CKSUM} -a MD5 `basename $$i` MD5) ; \ (cd ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src ; \ - ${TOOL_CKSUM} -o2 `basename $$i` SYSVSUM) ; \ + ${TOOL_CKSUM} -a SHA512 `basename $$i` SHA512) ; \ done .include bsd.files.mk Index: src/distrib/notes/common/main diff -u src/distrib/notes/common/main:1.425.2.5 src/distrib/notes/common/main:1.425.2.6 --- src/distrib/notes/common/main:1.425.2.5 Sun Apr 26 01:35:25 2009 +++ src/distrib/notes/common/main Sun Oct 4 11:48:39 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: main,v 1.425.2.5 2009/04/26 01:35:25 snj Exp $ +.\ $NetBSD: main,v 1.425.2.6 2009/10/04 11:48:39 bouyer Exp $ .\ .\ Copyright (c) 1999-2008 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -2229,46 +2229,21
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: bouyer Date: Sun Oct 4 11:49:23 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Ticket 1066 To generate a diff of this commit: cvs rdiff -u -r1.1.2.80 -r1.1.2.81 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.80 src/doc/CHANGES-5.1:1.1.2.81 --- src/doc/CHANGES-5.1:1.1.2.80 Sun Oct 4 00:54:16 2009 +++ src/doc/CHANGES-5.1 Sun Oct 4 11:49:23 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.80 2009/10/04 00:54:16 snj Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.81 2009/10/04 11:49:23 bouyer Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -13923,3 +13923,15 @@ Fix build after ticket 952. [mrg, ticket #1063] +distrib/cdrom/hide-hfs.lst 1.5 +distrib/mac68k/stand/Makefile 1.6 +distrib/notes/common/main 1.451 +distrib/sets/Makefile1.70 +distrib/sets/makesrctars 1.37 +distrib/sets/makesums1.16 +share/man/man7/release.7 1.31 via patch + + Sync release(7) with reality. + Only generate SHA512 and MD5 checksums for releases. + [snj, ticket #1066] +
CVS commit: [netbsd-5] src
Module Name:src Committed By: snj Date: Sat Oct 3 21:28:00 UTC 2009 Modified Files: src/bin/pax [netbsd-5]: Makefile ar_io.c src/tools/compat [netbsd-5]: configure configure.ac Log Message: Pull up following revision(s) (requested by apb in ticket #1020): bin/pax/Makefile: revision 1.38 bin/pax/ar_io.c: revision 1.49 tools/compat/configure: revision 1.69 tools/compat/configure.ac: revision 1.69 do not require sys/mtio.h for a tools build of pax To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.37.8.1 src/bin/pax/Makefile cvs rdiff -u -r1.48 -r1.48.18.1 src/bin/pax/ar_io.c cvs rdiff -u -r1.67.2.1 -r1.67.2.2 src/tools/compat/configure \ src/tools/compat/configure.ac Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/pax/Makefile diff -u src/bin/pax/Makefile:1.37 src/bin/pax/Makefile:1.37.8.1 --- src/bin/pax/Makefile:1.37 Sun Feb 24 20:42:46 2008 +++ src/bin/pax/Makefile Sat Oct 3 21:27:59 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.37 2008/02/24 20:42:46 joerg Exp $ +# $NetBSD: Makefile,v 1.37.8.1 2009/10/03 21:27:59 snj Exp $ # @(#)Makefile 8.1 (Berkeley) 5/31/93 .include bsd.own.mk @@ -25,12 +25,13 @@ MAN= pax.1 tar.1 cpio.1 -# XXX: Interix does not have it; we need a conditional for it. -CPPFLAGS+= -DHAVE_MTIO_H - .if defined(HOSTPROG) CPPFLAGS+= -DHOSTPROG .else # { ! HOSTPROG + +# XXX: Interix does not have it; we need a conditional for it. +CPPFLAGS+= -DHAVE_SYS_MTIO_H + LINKS+= ${BINDIR}/pax ${BINDIR}/tar SYMLINKS+=${BINDIR}/tar /usr/bin/tar Index: src/bin/pax/ar_io.c diff -u src/bin/pax/ar_io.c:1.48 src/bin/pax/ar_io.c:1.48.18.1 --- src/bin/pax/ar_io.c:1.48 Mon Apr 23 18:40:22 2007 +++ src/bin/pax/ar_io.c Sat Oct 3 21:27:59 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ar_io.c,v 1.48 2007/04/23 18:40:22 christos Exp $ */ +/* $netbsd: ar_io.c,v 1.48 2007/04/23 18:40:22 christos Exp $ */ /*- * Copyright (c) 1992 Keith Muller. @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = @(#)ar_io.c 8.2 (Berkeley) 4/18/94; #else -__RCSID($NetBSD: ar_io.c,v 1.48 2007/04/23 18:40:22 christos Exp $); +__RCSID($NetBSD: ar_io.c,v 1.48.18.1 2009/10/03 21:27:59 snj Exp $); #endif #endif /* not lint */ @@ -51,7 +51,7 @@ #include sys/time.h #include sys/stat.h #include sys/ioctl.h -#ifdef HAVE_MTIO_H +#ifdef HAVE_SYS_MTIO_H #include sys/mtio.h #endif #include sys/wait.h @@ -99,7 +99,7 @@ time_t starttime; /* time the run started */ int force_one_volume; /* 1 if we ignore volume changes */ -#ifdef HAVE_MTIO_H +#ifdef HAVE_SYS_MTIO_H static int get_phys(void); #endif extern sigset_t s_mask; @@ -129,7 +129,7 @@ int ar_open(const char *name) { -#ifdef HAVE_MTIO_H +#ifdef HAVE_SYS_MTIO_H struct mtget mb; #endif @@ -220,7 +220,7 @@ } if (S_ISCHR(arsb.st_mode)) { -#ifdef HAVE_MTIO_H +#ifdef HAVE_SYS_MTIO_H artyp = ioctl(arfd, MTIOCGET, mb) ? ISCHR : ISTAPE; #else tty_warn(1, System does not have tape support); @@ -941,7 +941,7 @@ long fsbz; off_t cpos; off_t mpos; -#ifdef HAVE_MTIO_H +#ifdef HAVE_SYS_MTIO_H struct mtop mb; #endif @@ -965,7 +965,7 @@ case ISRMT: #endif /* SUPPORT_RMT */ case ISTAPE: -#ifdef HAVE_MTIO_H +#ifdef HAVE_SYS_MTIO_H /* * if the last i/o was a successful data transfer, we assume * the fault is just a bad record on the tape that we are now @@ -1109,7 +1109,7 @@ ar_rev(off_t sksz) { off_t cpos; -#ifdef HAVE_MTIO_H +#ifdef HAVE_SYS_MTIO_H int phyblk; struct mtop mb; #endif @@ -1180,7 +1180,7 @@ #ifdef SUPPORT_RMT case ISRMT: #endif /* SUPPORT_RMT */ -#ifdef HAVE_MTIO_H +#ifdef HAVE_SYS_MTIO_H /* * Calculate and move the proper number of PHYSICAL tape * blocks. If the sksz is not an even multiple of the physical @@ -1242,7 +1242,7 @@ return 0; } -#ifdef HAVE_MTIO_H +#ifdef HAVE_SYS_MTIO_H /* * get_phys() * Determine the physical block size on a tape drive. We need the physical Index: src/tools/compat/configure diff -u src/tools/compat/configure:1.67.2.1 src/tools/compat/configure:1.67.2.2 --- src/tools/compat/configure:1.67.2.1 Thu Jan 15 04:30:19 2009 +++ src/tools/compat/configure Sat Oct 3 21:28:00 2009 @@ -2328,7 +2328,7 @@ # These are not necessarily required by the code, but they are not # currently conditionalized. -for ac_header in sys/ioctl.h sys/mman.h sys/mtio.h sys/param.h \ +for ac_header in sys/ioctl.h sys/mman.h sys/param.h \ sys/socket.h sys/stat.h sys/time.h sys/types.h sys/utsname.h \ sys/wait.h assert.h ctype.h errno.h fcntl.h grp.h limits.h locale.h \ netdb.h pwd.h signal.h stdarg.h stdio.h stdlib.h string.h \ @@ -2551,7 +2551,7 @@ fi -for ac_header in sys/sysmacros.h sys/syslimits.h \ +for ac_header in sys/mtio.h sys/sysmacros.h sys/syslimits.h \ getopt.h features.h malloc.h sys/poll.h stddef.h do as_ac_Header=`echo ac_cv_header_$ac_header | $as_tr_sh` Index:
CVS commit: [netbsd-5] src/sys/dev/pci
Module Name:src Committed By: snj Date: Sat Oct 3 21:53:01 UTC 2009 Modified Files: src/sys/dev/pci [netbsd-5]: if_vr.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #1022): sys/dev/pci/if_vr.c: revision 1.98 Replace shutdownhook_establish(9) with pmf_device_register1(9). Tested VIA VT86C100A (which is probed as VT3043). To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.95.4.1 src/sys/dev/pci/if_vr.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/pci/if_vr.c diff -u src/sys/dev/pci/if_vr.c:1.95 src/sys/dev/pci/if_vr.c:1.95.4.1 --- src/sys/dev/pci/if_vr.c:1.95 Wed Jul 9 16:14:57 2008 +++ src/sys/dev/pci/if_vr.c Sat Oct 3 21:53:01 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vr.c,v 1.95 2008/07/09 16:14:57 joerg Exp $ */ +/* $NetBSD: if_vr.c,v 1.95.4.1 2009/10/03 21:53:01 snj Exp $ */ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -97,7 +97,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_vr.c,v 1.95 2008/07/09 16:14:57 joerg Exp $); +__KERNEL_RCSID(0, $NetBSD: if_vr.c,v 1.95.4.1 2009/10/03 21:53:01 snj Exp $); #include rnd.h @@ -207,7 +207,6 @@ struct vr_softc { device_t vr_dev; void *vr_ih; /* interrupt cookie */ - void *vr_ats; /* shutdown hook */ bus_space_tag_t vr_bst; /* bus space tag */ bus_space_handle_t vr_bsh; /* bus space handle */ bus_dma_tag_t vr_dmat; /* bus DMA tag */ @@ -1398,7 +1397,7 @@ static int vr_probe(device_t, struct cfdata *, void *); static void vr_attach(device_t, device_t, void *); -static void vr_shutdown(void *); +static bool vr_shutdown(device_t, int); CFATTACH_DECL_NEW(vr, sizeof (struct vr_softc), vr_probe, vr_attach, NULL, NULL); @@ -1431,12 +1430,14 @@ * Stop all chip I/O so that the kernel's probe routines don't * get confused by errant DMAs when rebooting. */ -static void -vr_shutdown(void *arg) +static bool +vr_shutdown(device_t self, int howto) { - struct vr_softc *sc = (struct vr_softc *)arg; + struct vr_softc *sc = device_private(self); vr_stop(sc-vr_ec.ec_if, 1); + + return true; } /* @@ -1712,9 +1713,11 @@ RND_TYPE_NET, 0); #endif - sc-vr_ats = shutdownhook_establish(vr_shutdown, sc); - if (sc-vr_ats == NULL) - aprint_error_dev(self, warning: couldn't establish shutdown hook\n); + if (pmf_device_register1(self, NULL, NULL, vr_shutdown)) + pmf_class_network_register(self, ifp); + else + aprint_error_dev(self, couldn't establish power handler\n); + return; fail_5:
CVS commit: [netbsd-5] src/sys/dev/pci
Module Name:src Committed By: snj Date: Sat Oct 3 21:53:36 UTC 2009 Modified Files: src/sys/dev/pci [netbsd-5]: if_vr.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #1022): sys/dev/pci/if_vr.c: revision 1.99 add suspend/resume support To generate a diff of this commit: cvs rdiff -u -r1.95.4.1 -r1.95.4.2 src/sys/dev/pci/if_vr.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/pci/if_vr.c diff -u src/sys/dev/pci/if_vr.c:1.95.4.1 src/sys/dev/pci/if_vr.c:1.95.4.2 --- src/sys/dev/pci/if_vr.c:1.95.4.1 Sat Oct 3 21:53:01 2009 +++ src/sys/dev/pci/if_vr.c Sat Oct 3 21:53:36 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vr.c,v 1.95.4.1 2009/10/03 21:53:01 snj Exp $ */ +/* $NetBSD: if_vr.c,v 1.95.4.2 2009/10/03 21:53:36 snj Exp $ */ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -97,7 +97,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_vr.c,v 1.95.4.1 2009/10/03 21:53:01 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: if_vr.c,v 1.95.4.2 2009/10/03 21:53:36 snj Exp $); #include rnd.h @@ -216,6 +216,7 @@ uint8_t vr_enaddr[ETHER_ADDR_LEN]; struct mii_data vr_mii; /* MII/media info */ + pcireg_t vr_id; /* vendor/product ID */ uint8_t vr_revid; /* Rhine chip revision */ callout_t vr_tick_ch; /* tick callout */ @@ -324,6 +325,7 @@ static void vr_reset(struct vr_softc *); static int vr_restore_state(pci_chipset_tag_t, pcitag_t, device_t, pcireg_t); +static bool vr_resume(device_t PMF_FN_PROTO); int vr_copy_small = 0; @@ -1462,6 +1464,7 @@ sc-vr_dev = self; sc-vr_pc = pa-pa_pc; sc-vr_tag = pa-pa_tag; + sc-vr_id = pa-pa_id; callout_init(sc-vr_tick_ch, 0); vrt = vr_lookup(pa); @@ -1713,7 +1716,7 @@ RND_TYPE_NET, 0); #endif - if (pmf_device_register1(self, NULL, NULL, vr_shutdown)) + if (pmf_device_register1(self, NULL, vr_resume, vr_shutdown)) pmf_class_network_register(self, ifp); else aprint_error_dev(self, couldn't establish power handler\n); @@ -1762,3 +1765,14 @@ PCI_CONF_WRITE(PCI_INTERRUPT_REG, sc-vr_save_irq); return 0; } + +static bool +vr_resume(device_t self PMF_FN_ARGS) +{ + struct vr_softc *sc = device_private(self); + + if (PCI_PRODUCT(sc-vr_id) != PCI_PRODUCT_VIATECH_VT3043) + VR_CLRBIT(sc, VR_STICKHW, (VR_STICKHW_DS0|VR_STICKHW_DS1)); + + return true; +}
CVS commit: [netbsd-5] src
Module Name:src Committed By: snj Date: Sat Oct 3 22:49:43 UTC 2009 Modified Files: src/sbin/fsck_ffs [netbsd-5]: extern.h setup.c wapbl.c src/sbin/tunefs [netbsd-5]: tunefs.c src/sys/ufs/ffs [netbsd-5]: ffs_vfsops.c ffs_wapbl.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1036): sbin/fsck_ffs/extern.h: revision 1.25 via patch sbin/fsck_ffs/setup.c: revision 1.88 via patch sbin/fsck_ffs/wapbl.c: revision 1.4 via patch sbin/tunefs/tunefs.c: revision 1.41 via patch sys/ufs/ffs/ffs_vfsops.c: revision 1.252 via patch sys/ufs/ffs/ffs_wapbl.c: revision 1.13 via patch Allow tunefs to clear any type of WAPBL log, not only in-filesystem ones. Discussed in http://mail-index.netbsd.org/tech-kern/2009/08/17/msg005896.html and followups. -- Do some basic checks of the WAPBL journal, to abort the boot before the kernel refuse to mount a filesystem read-write (booting a system multiuser with critical filesystems read-only is bad): Add a check_wapbl() which will check some WAPBL values in the superblock, and try to read the journal via wapbl_replay_start() if there is one. pfatal() if one of these fail (abort boot if in preen mode, as CONTINUE otherwise). In non-preen mode the bogus journal will be cleared. check_wapbl() is always called if the superblock supports WAPBL. Even if FS_DOWAPBL is not there, there could be flags asking the kernel to clear or create a log with bogus values which would cause the kernel refuse to mount the filesystem. Discussed in http://mail-index.netbsd.org/tech-kern/2009/08/17/msg005896.html and followups. -- If the WAPBL journal can't be read (ffs_wapbl_replay_start() fails), mount the filesystem anyway if MNT_FORCE is present. This allows to still boot single-user a system with a corrupted WAPBL on /, and so get a chance to run fsck to fix it. http://mail-index.netbsd.org/tech-kern/2009/08/17/msg005896.html and followups. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.24.2.1 src/sbin/fsck_ffs/extern.h cvs rdiff -u -r1.84 -r1.84.2.1 src/sbin/fsck_ffs/setup.c cvs rdiff -u -r1.2 -r1.2.6.1 src/sbin/fsck_ffs/wapbl.c cvs rdiff -u -r1.37.2.1 -r1.37.2.2 src/sbin/tunefs/tunefs.c cvs rdiff -u -r1.239.2.3 -r1.239.2.4 src/sys/ufs/ffs/ffs_vfsops.c cvs rdiff -u -r1.6 -r1.6.8.1 src/sys/ufs/ffs/ffs_wapbl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fsck_ffs/extern.h diff -u src/sbin/fsck_ffs/extern.h:1.24 src/sbin/fsck_ffs/extern.h:1.24.2.1 --- src/sbin/fsck_ffs/extern.h:1.24 Sat Aug 30 10:46:16 2008 +++ src/sbin/fsck_ffs/extern.h Sat Oct 3 22:49:42 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.24 2008/08/30 10:46:16 bouyer Exp $ */ +/* $NetBSD: extern.h,v 1.24.2.1 2009/10/03 22:49:42 snj Exp $ */ /* * Copyright (c) 1994 James A. Jegers @@ -82,6 +82,7 @@ int setup(const char *, const char *); void voidquit(int); +int check_wapbl(void); void replay_wapbl(void); void cleanup_wapbl(void); int read_wapbl(char *, long, daddr_t); Index: src/sbin/fsck_ffs/setup.c diff -u src/sbin/fsck_ffs/setup.c:1.84 src/sbin/fsck_ffs/setup.c:1.84.2.1 --- src/sbin/fsck_ffs/setup.c:1.84 Sat Aug 30 10:46:16 2008 +++ src/sbin/fsck_ffs/setup.c Sat Oct 3 22:49:42 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: setup.c,v 1.84 2008/08/30 10:46:16 bouyer Exp $ */ +/* $NetBSD: setup.c,v 1.84.2.1 2009/10/03 22:49:42 snj Exp $ */ /* * Copyright (c) 1980, 1986, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)setup.c 8.10 (Berkeley) 5/9/95; #else -__RCSID($NetBSD: setup.c,v 1.84 2008/08/30 10:46:16 bouyer Exp $); +__RCSID($NetBSD: setup.c,v 1.84.2.1 2009/10/03 22:49:42 snj Exp $); #endif #endif /* not lint */ @@ -173,24 +173,35 @@ doskipclean = 0; pwarn(USING ALTERNATE SUPERBLOCK AT %d\n, bflag); } - if (sblock-fs_flags FS_DOWAPBL) { - if (preen) { + /* ffs_superblock_layout() == 2 */ + if (sblock-fs_magic != FS_UFS1_MAGIC || + (sblock-fs_old_flags FS_FLAGS_UPDATED) != 0) { + /* can have WAPBL */ + if (check_wapbl() != 0) { + doskipclean = 0; + } + if (sblock-fs_flags FS_DOWAPBL) { + if (preen) { +if (!quiet) + pwarn(file system is journaled; + not checking\n); +return (-1); + } if (!quiet) -pwarn(file system is journaled; not checking\n); - return (-1); +pwarn(** File system is journaled; +replaying journal\n); + replay_wapbl(); + doskipclean = 0; + sblock-fs_flags = ~FS_DOWAPBL; + sbdirty(); + /* Although we may have updated the superblock from + * the journal, we are still going to do a full check, + * so we don't bother to re-read the superblock from + * the journal. + * XXX, instead we could re-read the superblock and + * then not force doskipclean = 0 + */ } - if (!quiet) - pwarn(** File system is journaled; replaying journal\n); - replay_wapbl(); - doskipclean = 0; -
CVS commit: [netbsd-5] src/sys/fs/smbfs
Module Name:src Committed By: snj Date: Sat Oct 3 23:05:25 UTC 2009 Modified Files: src/sys/fs/smbfs [netbsd-5]: smbfs_node.c smbfs_vfsops.c Log Message: Pull up following revision(s) (requested by njoly in ticket #1041): sys/fs/smbfs/smbfs_node.c: revision 1.41 via patch sys/fs/smbfs/smbfs_vfsops.c: revision 1.88 via patch Fix some panics while trying to umount a smbfs share. Be sure that no other active vnodes remains, before trying to release the root one. Likewise, do not destroy the smbmount specific structure if the umount will fail (busy conditions). No objection from po...@. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.39.6.1 src/sys/fs/smbfs/smbfs_node.c cvs rdiff -u -r1.85 -r1.85.4.1 src/sys/fs/smbfs/smbfs_vfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/fs/smbfs/smbfs_node.c diff -u src/sys/fs/smbfs/smbfs_node.c:1.39 src/sys/fs/smbfs/smbfs_node.c:1.39.6.1 --- src/sys/fs/smbfs/smbfs_node.c:1.39 Tue Jun 24 17:04:11 2008 +++ src/sys/fs/smbfs/smbfs_node.c Sat Oct 3 23:05:25 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: smbfs_node.c,v 1.39 2008/06/24 17:04:11 cegger Exp $ */ +/* $NetBSD: smbfs_node.c,v 1.39.6.1 2009/10/03 23:05:25 snj Exp $ */ /* * Copyright (c) 2000-2001 Boris Popov @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: smbfs_node.c,v 1.39 2008/06/24 17:04:11 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: smbfs_node.c,v 1.39.6.1 2009/10/03 23:05:25 snj Exp $); #include sys/param.h #include sys/systm.h @@ -244,8 +244,6 @@ SMBVDEBUG(%.*s,%d\n, (int) np-n_nmlen, np-n_name, vp-v_usecount); - KASSERT((np-n_flag NOPEN) == 0); - mutex_enter(smp-sm_hashlock); dvp = (np-n_parent (np-n_flag NREFPARENT)) ? Index: src/sys/fs/smbfs/smbfs_vfsops.c diff -u src/sys/fs/smbfs/smbfs_vfsops.c:1.85 src/sys/fs/smbfs/smbfs_vfsops.c:1.85.4.1 --- src/sys/fs/smbfs/smbfs_vfsops.c:1.85 Sun Sep 7 13:13:04 2008 +++ src/sys/fs/smbfs/smbfs_vfsops.c Sat Oct 3 23:05:25 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: smbfs_vfsops.c,v 1.85 2008/09/07 13:13:04 tron Exp $ */ +/* $NetBSD: smbfs_vfsops.c,v 1.85.4.1 2009/10/03 23:05:25 snj Exp $ */ /* * Copyright (c) 2000-2001, Boris Popov @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: smbfs_vfsops.c,v 1.85 2008/09/07 13:13:04 tron Exp $); +__KERNEL_RCSID(0, $NetBSD: smbfs_vfsops.c,v 1.85.4.1 2009/10/03 23:05:25 snj Exp $); #ifdef _KERNEL_OPT #include opt_quota.h @@ -236,6 +236,7 @@ struct lwp *l = curlwp; struct smbmount *smp = VFSTOSMBFS(mp); struct smb_cred scred; + struct vnode *smbfs_rootvp = SMBTOV(smp-sm_root); int error, flags; SMBVDEBUG(smbfs_unmount: flags=%04x\n, mntflags); @@ -244,11 +245,8 @@ flags |= FORCECLOSE; #ifdef QUOTA #endif - /* Drop the extra reference to root vnode. */ - if (smp-sm_root) { - vrele(SMBTOV(smp-sm_root)); - smp-sm_root = NULL; - } + if (smbfs_rootvp-v_usecount 1 (mntflags MNT_FORCE) == 0) + return EBUSY; /* Flush all vnodes. * Keep trying to flush the vnode list for the mount while @@ -259,8 +257,12 @@ * sufficient in this case. */ do { smp-sm_didrele = 0; - error = vflush(mp, NULLVP, flags); + error = vflush(mp, smbfs_rootvp, flags); } while (error == EBUSY smp-sm_didrele != 0); + if (error) + return error; + + vgone(smbfs_rootvp); smb_makescred(scred, l, l-l_cred); smb_share_lock(smp-sm_share); @@ -270,7 +272,7 @@ hashdone(smp-sm_hash, HASH_LIST, smp-sm_hashlen); mutex_destroy(smp-sm_hashlock); FREE(smp, M_SMBFSDATA); - return error; + return 0; } /*
CVS commit: [netbsd-5] src/sys/fs/puffs
Module Name:src Committed By: snj Date: Sat Oct 3 23:11:27 UTC 2009 Modified Files: src/sys/fs/puffs [netbsd-5]: puffs_node.c puffs_vnops.c Log Message: Pull up following revision(s) (requested by pooka in ticket #1042): sys/fs/puffs/puffs_node.c: revision 1.14 sys/fs/puffs/puffs_vnops.c: revision 1.134 * fix a race i introduced almost two years ago in rev 1.116: operations creating a node cannot be considered outgoing operations, since after return from userspace they modify file system state by creating a new node. if we do not protect the file system by holding the directory lock, a lookup operation might race us into the kernel and create the node earlier. * remove pnode from hashlish before sending the reclaim faf off to userspace. also, hold pmp_lock while frobbing the list. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.13.10.1 src/sys/fs/puffs/puffs_node.c cvs rdiff -u -r1.129.4.1 -r1.129.4.2 src/sys/fs/puffs/puffs_vnops.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/fs/puffs/puffs_node.c diff -u src/sys/fs/puffs/puffs_node.c:1.13 src/sys/fs/puffs/puffs_node.c:1.13.10.1 --- src/sys/fs/puffs/puffs_node.c:1.13 Tue May 6 12:33:16 2008 +++ src/sys/fs/puffs/puffs_node.c Sat Oct 3 23:11:27 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_node.c,v 1.13 2008/05/06 12:33:16 ad Exp $ */ +/* $NetBSD: puffs_node.c,v 1.13.10.1 2009/10/03 23:11:27 snj Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: puffs_node.c,v 1.13 2008/05/06 12:33:16 ad Exp $); +__KERNEL_RCSID(0, $NetBSD: puffs_node.c,v 1.13.10.1 2009/10/03 23:11:27 snj Exp $); #include sys/param.h #include sys/hash.h @@ -223,7 +223,7 @@ if (pnc-pnc_cookie == ck) { mutex_exit(pmp-pmp_lock); puffs_senderr(pmp, PUFFS_ERR_MAKENODE, EEXIST, - cookie exists, ck); + newcookie exists, ck); return EPROTO; } } @@ -260,7 +260,6 @@ panic(puffs_putvnode: %p not a puffs vnode, vp); #endif - LIST_REMOVE(pnode, pn_hashent); genfs_node_destroy(vp); puffs_releasenode(pnode); vp-v_data = NULL; @@ -336,6 +335,9 @@ */ mutex_enter(pmp-pmp_lock); if (pmp-pmp_root) { + struct puffs_node *pnode = vp-v_data; + + LIST_REMOVE(pnode, pn_hashent); mutex_exit(pmp-pmp_lock); puffs_putvnode(vp); goto retry; Index: src/sys/fs/puffs/puffs_vnops.c diff -u src/sys/fs/puffs/puffs_vnops.c:1.129.4.1 src/sys/fs/puffs/puffs_vnops.c:1.129.4.2 --- src/sys/fs/puffs/puffs_vnops.c:1.129.4.1 Sat Sep 26 18:53:48 2009 +++ src/sys/fs/puffs/puffs_vnops.c Sat Oct 3 23:11:27 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_vnops.c,v 1.129.4.1 2009/09/26 18:53:48 snj Exp $ */ +/* $NetBSD: puffs_vnops.c,v 1.129.4.2 2009/10/03 23:11:27 snj Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.129.4.1 2009/09/26 18:53:48 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.129.4.2 2009/10/03 23:11:27 snj Exp $); #include sys/param.h #include sys/fstrans.h @@ -644,16 +644,7 @@ create_msg-pvnr_va = *ap-a_vap; puffs_msg_setinfo(park_create, PUFFSOP_VN, PUFFS_VN_CREATE, VPTOPNC(dvp)); - - /* - * Do the dance: - * + insert into queue (interlock) - * + unlock vnode - * + wait for response - */ - puffs_msg_enqueue(pmp, park_create); - REFPN_AND_UNLOCKVP(dvp, dpn); - error = puffs_msg_wait2(pmp, park_create, dpn, NULL); + PUFFS_MSG_ENQUEUEWAIT2(pmp, park_create, dvp-v_data, NULL, error); error = checkerr(pmp, error, __func__); if (error) @@ -666,10 +657,10 @@ create_msg-pvnr_newnode, cnp); out: + vput(dvp); if (error || (cnp-cn_flags SAVESTART) == 0) PNBUF_PUT(cnp-cn_pnbuf); - RELEPN_AND_VP(dvp, dpn); DPRINTF((puffs_create: return %d\n, error)); PUFFS_MSG_RELEASE(create); return error; @@ -700,9 +691,7 @@ puffs_msg_setinfo(park_mknod, PUFFSOP_VN, PUFFS_VN_MKNOD, VPTOPNC(dvp)); - puffs_msg_enqueue(pmp, park_mknod); - REFPN_AND_UNLOCKVP(dvp, dpn); - error = puffs_msg_wait2(pmp, park_mknod, dpn, NULL); + PUFFS_MSG_ENQUEUEWAIT2(pmp, park_mknod, dvp-v_data, NULL, error); error = checkerr(pmp, error, __func__); if (error) @@ -716,10 +705,10 @@ mknod_msg-pvnr_newnode, cnp); out: + vput(dvp); PUFFS_MSG_RELEASE(mknod); if (error || (cnp-cn_flags SAVESTART) == 0) PNBUF_PUT(cnp-cn_pnbuf); - RELEPN_AND_VP(dvp, dpn); return error; } @@ -1073,6 +1062,8 @@ } */ *ap = v; struct vnode *vp = ap-a_vp; struct puffs_mount *pmp = MPTOPUFFSMP(vp-v_mount); + struct puffs_node *pnode = vp-v_data; + bool notifyserver = true; /* * first things first: check if someone is trying to reclaim the @@ -1085,14 +1076,23 @@ KASSERT(pmp-pmp_root != NULL); pmp-pmp_root = NULL;
CVS commit: [netbsd-5] src/bin/kill
Module Name:src Committed By: snj Date: Sat Oct 3 23:20:05 UTC 2009 Modified Files: src/bin/kill [netbsd-5]: kill.c Log Message: Pull up following revision(s) (requested by spz in ticket #1043): bin/kill/kill.c: revision 1.26 Make sure that numerical signals and pids are in range for their types. Fixes PR bin/42143 To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.25.4.1 src/bin/kill/kill.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/kill/kill.c diff -u src/bin/kill/kill.c:1.25 src/bin/kill/kill.c:1.25.4.1 --- src/bin/kill/kill.c:1.25 Sun Jul 20 00:52:40 2008 +++ src/bin/kill/kill.c Sat Oct 3 23:20:05 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: kill.c,v 1.25 2008/07/20 00:52:40 lukem Exp $ */ +/* $NetBSD: kill.c,v 1.25.4.1 2009/10/03 23:20:05 snj Exp $ */ /* * Copyright (c) 1988, 1993, 1994 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)kill.c 8.4 (Berkeley) 4/28/95; #else -__RCSID($NetBSD: kill.c,v 1.25 2008/07/20 00:52:40 lukem Exp $); +__RCSID($NetBSD: kill.c,v 1.25.4.1 2009/10/03 23:20:05 snj Exp $); #endif #endif /* not lint */ @@ -49,6 +49,8 @@ #include signal.h #include stdio.h #include stdlib.h +#include limits.h +#include inttypes.h #include string.h #include termios.h #include unistd.h @@ -69,7 +71,8 @@ int main(int argc, char *argv[]) { - int errors, numsig, pid; + int errors; + intmax_t numsig, pid; char *ep; setprogname(argv[0]); @@ -87,17 +90,19 @@ if (argc == 1) { if (isdigit((unsigned char)**argv) == 0) usage(); - numsig = strtol(*argv, ep, 10); - if (*ep != '\0') { + numsig = strtoimax(*argv, ep, 10); + /* check for correctly parsed number */ + if (*ep != '\0' || numsig == INTMAX_MIN || numsig == INTMAX_MAX) { errx(EXIT_FAILURE, illegal signal number: %s, *argv); /* NOTREACHED */ } if (numsig = 128) numsig -= 128; + /* and whether it fits into signals range */ if (numsig = 0 || numsig = NSIG) nosig(*argv); - printf(%s\n, sys_signame[numsig]); + printf(%s\n, sys_signame[(int) numsig]); exit(0); } printsignals(stdout); @@ -122,12 +127,14 @@ if ((numsig = signame_to_signum(sn)) 0) nosig(sn); } else if (isdigit((unsigned char)*sn)) { - numsig = strtol(sn, ep, 10); - if (*ep) { + numsig = strtoimax(sn, ep, 10); + /* check for correctly parsed number */ + if (*ep || numsig == INTMAX_MIN || numsig == INTMAX_MAX ) { errx(EXIT_FAILURE, illegal signal number: %s, sn); /* NOTREACHED */ } + /* and whether it fits into signals range */ if (numsig 0 || numsig = NSIG) nosig(sn); } else @@ -151,14 +158,17 @@ } else #endif { - pid = strtol(*argv, ep, 10); - if (!**argv || *ep) { + pid = strtoimax(*argv, ep, 10); + /* make sure the pid is a number and fits into pid_t */ + if (!**argv || *ep || pid == INTMAX_MIN || +pid == INTMAX_MAX || pid != (pid_t) pid) { + warnx(illegal process id: %s, *argv); errors = 1; continue; } } - if (kill(pid, numsig) == -1) { + if (kill((pid_t) pid, (int) numsig) == -1) { warn(%s, *argv); errors = 1; } @@ -166,7 +176,7 @@ /* Wakeup the process if it was suspended, so it can exit without an explicit 'fg'. */ if (numsig == SIGTERM || numsig == SIGHUP) - kill(pid, SIGCONT); + kill((pid_t) pid, SIGCONT); #endif }
CVS commit: [netbsd-5] src/distrib/utils/sysinst
Module Name:src Committed By: snj Date: Sat Oct 3 23:22:23 UTC 2009 Modified Files: src/distrib/utils/sysinst [netbsd-5]: disks.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #1046): distrib/utils/sysinst/disks.c: revision 1.107 In get_descr(), initialize dd_descr to an empty string before probing ATA and SCSI identification. Fixes issues with xbd and raid. To generate a diff of this commit: cvs rdiff -u -r1.100.2.4 -r1.100.2.5 src/distrib/utils/sysinst/disks.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/sysinst/disks.c diff -u src/distrib/utils/sysinst/disks.c:1.100.2.4 src/distrib/utils/sysinst/disks.c:1.100.2.5 --- src/distrib/utils/sysinst/disks.c:1.100.2.4 Sat Sep 5 12:57:00 2009 +++ src/distrib/utils/sysinst/disks.c Sat Oct 3 23:22:23 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.100.2.4 2009/09/05 12:57:00 bouyer Exp $ */ +/* $NetBSD: disks.c,v 1.100.2.5 2009/10/03 23:22:23 snj Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -288,6 +288,8 @@ if (fd 0) goto done; + dd-dd_descr[0] = '\0'; + /* try ATA */ if (get_descr_ata(dd, fd)) goto done;
CVS commit: [netbsd-5] src/sys/arch/amd64/amd64
Module Name:src Committed By: snj Date: Sat Oct 3 23:34:48 UTC 2009 Modified Files: src/sys/arch/amd64/amd64 [netbsd-5]: netbsd32_machdep.c Log Message: Pull up following revision(s) (requested by mlelstv in ticket #1048): sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.59 Ensure FP state is reset, if FP is used in a signal handler. Fixes PR kern/39299 for 32bit code. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.55.4.1 src/sys/arch/amd64/amd64/netbsd32_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/netbsd32_machdep.c diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.55 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.55.4.1 --- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.55 Wed Oct 15 06:51:17 2008 +++ src/sys/arch/amd64/amd64/netbsd32_machdep.c Sat Oct 3 23:34:48 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_machdep.c,v 1.55 2008/10/15 06:51:17 wrstuden Exp $ */ +/* $NetBSD: netbsd32_machdep.c,v 1.55.4.1 2009/10/03 23:34:48 snj Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: netbsd32_machdep.c,v 1.55 2008/10/15 06:51:17 wrstuden Exp $); +__KERNEL_RCSID(0, $NetBSD: netbsd32_machdep.c,v 1.55.4.1 2009/10/03 23:34:48 snj Exp $); #include opt_compat_netbsd.h #include opt_coredump.h @@ -266,6 +266,9 @@ tf-tf_fs = GSEL(GUDATA32_SEL, SEL_UPL); tf-tf_gs = GSEL(GUDATA32_SEL, SEL_UPL); + /* Ensure FP state is reset, if FP is used. */ + l-l_md.md_flags = ~MDP_USEDFPU; + tf-tf_rip = (uint64_t)catcher; tf-tf_cs = GSEL(GUCODE32_SEL, SEL_UPL); tf-tf_rflags = ~PSL_CLEARSIG; @@ -357,6 +360,9 @@ tf-tf_rsp = (uint64_t)fp; tf-tf_ss = GSEL(GUDATA32_SEL, SEL_UPL); + /* Ensure FP state is reset, if FP is used. */ + l-l_md.md_flags = ~MDP_USEDFPU; + /* Remember that we're now on the signal stack. */ if (onstack) l-l_sigstk.ss_flags |= SS_ONSTACK;
CVS commit: [netbsd-5] src/sys/arch/cobalt/dev
Module Name:src Committed By: snj Date: Sat Oct 3 23:44:07 UTC 2009 Modified Files: src/sys/arch/cobalt/dev [netbsd-5]: panel.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1053): sys/arch/cobalt/dev/panel.c: revision 1.19 Adjust attach message for failure path (found on gxemul). To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.18.8.1 src/sys/arch/cobalt/dev/panel.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/cobalt/dev/panel.c diff -u src/sys/arch/cobalt/dev/panel.c:1.18 src/sys/arch/cobalt/dev/panel.c:1.18.8.1 --- src/sys/arch/cobalt/dev/panel.c:1.18 Fri May 9 10:59:55 2008 +++ src/sys/arch/cobalt/dev/panel.c Sat Oct 3 23:44:07 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: panel.c,v 1.18 2008/05/09 10:59:55 tsutsui Exp $ */ +/* $NetBSD: panel.c,v 1.18.8.1 2009/10/03 23:44:07 snj Exp $ */ /* * Copyright (c) 2002 Dennis I. Chernoivanov @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: panel.c,v 1.18 2008/05/09 10:59:55 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: panel.c,v 1.18.8.1 2009/10/03 23:44:07 snj Exp $); #include sys/param.h #include sys/systm.h @@ -139,6 +139,8 @@ bus_space_subregion(sc-sc_lcd.sc_iot, sc-sc_lcd.sc_ioir, DATA_OFFSET, 1, sc-sc_lcd.sc_iodr); + printf(\n); + sc-sc_lcd.sc_dev_ok = 1; sc-sc_lcd.sc_cols = PANEL_COLS; sc-sc_lcd.sc_vcols = PANEL_VCOLS; @@ -169,8 +171,6 @@ callout_init(sc-sc_callout, 0); selinit(sc-sc_selq); - - printf(\n); } static void
CVS commit: [netbsd-5] src/sys/arch
Module Name:src Committed By: snj Date: Sat Oct 3 23:49:50 UTC 2009 Modified Files: src/sys/arch/amd64/amd64 [netbsd-5]: machdep.c src/sys/arch/i386/i386 [netbsd-5]: machdep.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1054): sys/arch/amd64/amd64/machdep.c: revision 1.124 sys/arch/i386/i386/machdep.c: revision 1.660 Prepare for PCI frontend support in Xen3 domUs: call x86_bus_space_init() and x86_bus_space_mallocok() if we have ISA or PCI devices configured; not only for non-Xen or dom0 Xen On Xen, always call PHYSDEVOP_SET_IOPL on context switch on amd64, also call PHYSDEVOP_SET_IOPL from x86_64_proc0_tss_ldt_init() To generate a diff of this commit: cvs rdiff -u -r1.102.4.10 -r1.102.4.11 src/sys/arch/amd64/amd64/machdep.c cvs rdiff -u -r1.644.4.10 -r1.644.4.11 src/sys/arch/i386/i386/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/machdep.c diff -u src/sys/arch/amd64/amd64/machdep.c:1.102.4.10 src/sys/arch/amd64/amd64/machdep.c:1.102.4.11 --- src/sys/arch/amd64/amd64/machdep.c:1.102.4.10 Sat Apr 4 17:39:09 2009 +++ src/sys/arch/amd64/amd64/machdep.c Sat Oct 3 23:49:50 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.102.4.10 2009/04/04 17:39:09 snj Exp $ */ +/* $NetBSD: machdep.c,v 1.102.4.11 2009/10/03 23:49:50 snj Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008 @@ -112,7 +112,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.102.4.10 2009/04/04 17:39:09 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.102.4.11 2009/10/03 23:49:50 snj Exp $); /* #define XENDEBUG_LOW */ @@ -131,6 +131,8 @@ #ifndef XEN #include opt_physmem.h #endif +#include isa.h +#include pci.h #include sys/param.h #include sys/systm.h @@ -365,7 +367,7 @@ format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free)); printf(avail memory = %s\n, pbuf); -#if !defined(XEN) || defined(DOM0OPS) +#if NISA 0 || NPCI 0 /* Safe for i/o port / memory space allocation to use malloc now. */ x86_bus_space_mallocok(); #endif @@ -391,12 +393,10 @@ struct cpu_info *ci; ci = curcpu(); HYPERVISOR_stack_switch(GSEL(GDATA_SEL, SEL_KPL), new-pcb_rsp0); - if (xendomain_is_privileged()) { - struct physdev_op physop; - physop.cmd = PHYSDEVOP_SET_IOPL; - physop.u.set_iopl.iopl = new-pcb_iopl; - HYPERVISOR_physdev_op(physop); - } + struct physdev_op physop; + physop.cmd = PHYSDEVOP_SET_IOPL; + physop.u.set_iopl.iopl = new-pcb_iopl; + HYPERVISOR_physdev_op(physop); if (new-pcb_fpcpu != ci) { HYPERVISOR_fpu_taskswitch(1); } @@ -429,10 +429,16 @@ #if !defined(XEN) lldt(pcb-pcb_ldt_sel); #else + { + struct physdev_op physop; xen_set_ldt((vaddr_t) ldtstore, LDT_SIZE 3); /* Reset TS bit and set kernel stack for interrupt handlers */ HYPERVISOR_fpu_taskswitch(1); HYPERVISOR_stack_switch(GSEL(GDATA_SEL, SEL_KPL), pcb-pcb_rsp0); + physop.cmd = PHYSDEVOP_SET_IOPL; + physop.u.set_iopl.iopl = pcb-pcb_iopl; + HYPERVISOR_physdev_op(physop); + } #endif /* XEN */ } @@ -1399,7 +1405,7 @@ __PRINTK((pcb_cr3 0x%lx\n, xen_start_info.pt_base - KERNBASE)); #endif -#if !defined(XEN) || defined(DOM0OPS) +#if NISA 0 || NPCI 0 x86_bus_space_init(); #endif Index: src/sys/arch/i386/i386/machdep.c diff -u src/sys/arch/i386/i386/machdep.c:1.644.4.10 src/sys/arch/i386/i386/machdep.c:1.644.4.11 --- src/sys/arch/i386/i386/machdep.c:1.644.4.10 Sat Apr 4 17:39:09 2009 +++ src/sys/arch/i386/i386/machdep.c Sat Oct 3 23:49:50 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.644.4.10 2009/04/04 17:39:09 snj Exp $ */ +/* $NetBSD: machdep.c,v 1.644.4.11 2009/10/03 23:49:50 snj Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009 @@ -67,7 +67,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.644.4.10 2009/04/04 17:39:09 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.644.4.11 2009/10/03 23:49:50 snj Exp $); #include opt_beep.h #include opt_compat_ibcs2.h @@ -513,7 +513,7 @@ printf(avail memory = %s\n, pbuf); /* Safe for i/o port / memory space allocation to use malloc now. */ -#if !defined(XEN) || defined(DOM0OPS) +#if NISA 0 || NPCI 0 x86_bus_space_mallocok(); #endif @@ -580,21 +580,20 @@ HYPERVISOR_stack_switch(GSEL(GDATA_SEL, SEL_KPL), pcb-pcb_esp0); - if (xendomain_is_privileged()) { - int iopl = pcb-pcb_iopl; #ifdef XEN3 - struct physdev_op physop; - physop.cmd = PHYSDEVOP_SET_IOPL; - physop.u.set_iopl.iopl = iopl; - HYPERVISOR_physdev_op(physop); + struct physdev_op physop; + physop.cmd = PHYSDEVOP_SET_IOPL; + physop.u.set_iopl.iopl = pcb-pcb_iopl; + HYPERVISOR_physdev_op(physop); #else + if (xendomain_is_privileged()) { dom0_op_t op; op.cmd = DOM0_IOPL; op.u.iopl.domain = DOMID_SELF; - op.u.iopl.iopl = iopl; + op.u.iopl.iopl = pcb-pcb_iopl;
CVS commit: [netbsd-5] src/sys/arch
Module Name:src Committed By: snj Date: Sat Oct 3 23:55:43 UTC 2009 Modified Files: src/sys/arch/amd64/conf [netbsd-5]: XEN3_DOMU src/sys/arch/i386/conf [netbsd-5]: XEN3_DOMU Log Message: Pull up following revision(s) (requested by bouyer in ticket #1054): sys/arch/amd64/conf/XEN3_DOMU: revision 1.16 sys/arch/i386/conf/XEN3_DOMU: revision 1.12 Add commented out PCI pass-through support: To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.13.4.1 src/sys/arch/amd64/conf/XEN3_DOMU cvs rdiff -u -r1.10 -r1.10.66.1 src/sys/arch/i386/conf/XEN3_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_DOMU diff -u src/sys/arch/amd64/conf/XEN3_DOMU:1.13 src/sys/arch/amd64/conf/XEN3_DOMU:1.13.4.1 --- src/sys/arch/amd64/conf/XEN3_DOMU:1.13 Sun Aug 10 08:53:29 2008 +++ src/sys/arch/amd64/conf/XEN3_DOMU Sat Oct 3 23:55:43 2009 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOMU,v 1.13 2008/08/10 08:53:29 cegger Exp $ +# $NetBSD: XEN3_DOMU,v 1.13.4.1 2009/10/03 23:55:43 snj Exp $ include arch/amd64/conf/std.xen @@ -158,6 +158,11 @@ xencons* at hypervisor? # Xen virtual console +# PCI pass-through support: +#xpci* at xenbus ? #Xen3 PCI front end driver +#pci* at xpci ? +# you then need to add your PCI devices drivers below. + cinclude arch/amd64/conf/GENERIC.local # Pseudo-Devices Index: src/sys/arch/i386/conf/XEN3_DOMU diff -u src/sys/arch/i386/conf/XEN3_DOMU:1.10 src/sys/arch/i386/conf/XEN3_DOMU:1.10.66.1 --- src/sys/arch/i386/conf/XEN3_DOMU:1.10 Sat Nov 11 20:00:39 2006 +++ src/sys/arch/i386/conf/XEN3_DOMU Sat Oct 3 23:55:43 2009 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOMU,v 1.10 2006/11/11 20:00:39 bouyer Exp $ +# $NetBSD: XEN3_DOMU,v 1.10.66.1 2009/10/03 23:55:43 snj Exp $ include arch/i386/conf/XEN2_DOMU @@ -14,3 +14,8 @@ xenbus* at hypervisor? # Xen virtual bus xennet* at xenbus? # Xen virtual network interface xbd* at xenbus? # Xen virtual block device + +# PCI pass-through support: +#xpci* at xenbus ? #Xen3 PCI front end driver +#pci* at xpci ? +# you then need to add your PCI devices drivers below.
CVS commit: [netbsd-5] src/sys/arch/xen/xen
Module Name:src Committed By: snj Date: Sat Oct 3 23:56:43 UTC 2009 Modified Files: src/sys/arch/xen/xen [netbsd-5]: pciback.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1054): sys/arch/xen/xen/pciback.c: revision 1.2 - xentools also use pci vendor/product id and subsystem id; export them via the kernfs file - EVTCHNOP_bind_pirq wants the legacy IRQ number; so always set the legacy IRQ number in the PCI_INTERRUPT_REG. To generate a diff of this commit: cvs rdiff -u -r1.4.6.2 -r1.4.6.3 src/sys/arch/xen/xen/pciback.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/xen/pciback.c diff -u src/sys/arch/xen/xen/pciback.c:1.4.6.2 src/sys/arch/xen/xen/pciback.c:1.4.6.3 --- src/sys/arch/xen/xen/pciback.c:1.4.6.2 Sat Oct 3 23:54:05 2009 +++ src/sys/arch/xen/xen/pciback.c Sat Oct 3 23:56:43 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pciback.c,v 1.4.6.2 2009/10/03 23:54:05 snj Exp $ */ +/* $NetBSD: pciback.c,v 1.4.6.3 2009/10/03 23:56:43 snj Exp $ */ /* * Copyright (c) 2009 Manuel Bouyer. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pciback.c,v 1.4.6.2 2009/10/03 23:54:05 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: pciback.c,v 1.4.6.3 2009/10/03 23:56:43 snj Exp $); #include opt_xen.h #include rnd.h @@ -105,6 +105,8 @@ } sc_bars[PCI_NBARS]; pci_intr_handle_t sc_intrhandle; int sc_irq; + pcireg_t sc_id; + pcireg_t sc_subid; char sc_kernfsname[16]; }; @@ -187,7 +189,7 @@ SLIST_ENTRY(pb_xenbus_instance) pbx_next; /* list of backend instances*/ struct xenbus_device *pbx_xbusd; domid_t pbx_domid; - struct pciback_pci_devlist pbx_pb_pci_dev; /* list of exported PCi devices */ + struct pciback_pci_devlist pbx_pb_pci_dev; /* list of exported PCI devices */ /* communication with the domU */ unsigned int pbx_evtchn; /* our even channel */ struct xen_pci_sharedinfo *pbx_sh_info; @@ -237,6 +239,9 @@ sc-sc_pb-pb_pc = pa-pa_pc; sc-sc_pb-pb_tag = pa-pa_tag; + sc-sc_id = pci_conf_read(pa-pa_pc, pa-pa_tag, PCI_ID_REG); + sc-sc_subid = pci_conf_read(pa-pa_pc, pa-pa_tag, PCI_SUBSYS_ID_REG); + for (i = 0; i PCI_NBARS;) { sc-sc_bars[i].b_type = pci_mapreg_type(pa-pa_pc, pa-pa_tag, PCI_MAPREG_START + i * 4); @@ -267,11 +272,7 @@ aprint_normal_dev(self, interrupting at %s\n, intrstr ? intrstr : unknown interrupt); } - if (sc-sc_intrhandle.pirq APIC_INT_VIA_APIC) { - sc-sc_irq = APIC_IRQ_PIN(sc-sc_intrhandle.pirq); - } else { - sc-sc_irq = APIC_IRQ_LEGACY_IRQ(sc-sc_intrhandle.pirq); - } + sc-sc_irq = APIC_IRQ_LEGACY_IRQ(sc-sc_intrhandle.pirq); /* XXX should be done elsewhere ? */ reg = pci_conf_read(pa-pa_pc, pa-pa_tag, PCI_INTERRUPT_REG); reg = ~ (PCI_INTERRUPT_LINE_MASK PCI_INTERRUPT_LINE_SHIFT); @@ -314,6 +315,12 @@ off = uio-uio_offset; len = 0; + len += snprintf(buf[len], PCIBACK_KERNFS_SIZE - len, + vendor: 0x%04x\nproduct: 0x%04x\n, + PCI_VENDOR(sc-sc_id), PCI_PRODUCT(sc-sc_id)); + len += snprintf(buf[len], PCIBACK_KERNFS_SIZE - len, + subsys_vendor: 0x%04x\nsubsys_product: 0x%04x\n, + PCI_VENDOR(sc-sc_subid), PCI_PRODUCT(sc-sc_subid)); for(i = 0; i PCI_NBARS; i++) { if (sc-sc_bars[i].b_valid) { len += snprintf(buf[len], PCIBACK_KERNFS_SIZE - len, @@ -776,6 +783,7 @@ op-err = XEN_PCI_ERR_invalid_offset; break; } + break; default: aprint_error(pciback: unknown cmd %d\n, op-cmd); op-err = XEN_PCI_ERR_not_implemented;
CVS commit: [netbsd-5] src/sys/arch
Module Name:src Committed By: snj Date: Sat Oct 3 23:57:54 UTC 2009 Modified Files: src/sys/arch/amd64/conf [netbsd-5]: XEN3_DOM0 src/sys/arch/i386/conf [netbsd-5]: XEN3_DOM0 Log Message: Pull up following revision(s) (requested by bouyer in ticket #1054): sys/arch/amd64/conf/XEN3_DOM0: revision 1.37 sys/arch/i386/conf/XEN3_DOM0: revision 1.12 Add pciback device to XEN3 dom0 kernels To generate a diff of this commit: cvs rdiff -u -r1.33.4.2 -r1.33.4.3 src/sys/arch/amd64/conf/XEN3_DOM0 cvs rdiff -u -r1.10 -r1.10.8.1 src/sys/arch/i386/conf/XEN3_DOM0 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.2 src/sys/arch/amd64/conf/XEN3_DOM0:1.33.4.3 --- src/sys/arch/amd64/conf/XEN3_DOM0:1.33.4.2 Sat Sep 26 19:52:09 2009 +++ src/sys/arch/amd64/conf/XEN3_DOM0 Sat Oct 3 23:57:54 2009 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOM0,v 1.33.4.2 2009/09/26 19:52:09 snj Exp $ +# $NetBSD: XEN3_DOM0,v 1.33.4.3 2009/10/03 23:57:54 snj Exp $ include arch/amd64/conf/std.xen @@ -228,6 +228,14 @@ ppb* at pci? dev ? function ? # PCI-PCI bridges pci* at ppb? bus ? +# pci backend devices, used for PCI pass-through. To export a PCI device +# to a domU, the device has to be attached to the pciback driver in the dom0. +# you can force a device to attach to the pciback driver in dom0 passing +# pciback.hide=(bus:dev.fun)(bus:dev.func) to the dom0 kernel boot parameters. +# bus and dev are 2-digits hex number, func is a single-digit number: +# pciback.hide=(00:1a.0)(00:1a.1)(00:1a.7) +pciback* at pci?#pci backend device + # PCI bridges ichlpcib* at pci? dev ? function ? # Intel ICH PCI-ISA w/ timecounter, # watchdog and SpeedStep support Index: src/sys/arch/i386/conf/XEN3_DOM0 diff -u src/sys/arch/i386/conf/XEN3_DOM0:1.10 src/sys/arch/i386/conf/XEN3_DOM0:1.10.8.1 --- src/sys/arch/i386/conf/XEN3_DOM0:1.10 Sun May 18 22:05:59 2008 +++ src/sys/arch/i386/conf/XEN3_DOM0 Sat Oct 3 23:57:54 2009 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOM0,v 1.10 2008/05/18 22:05:59 cegger Exp $ +# $NetBSD: XEN3_DOM0,v 1.10.8.1 2009/10/03 23:57:54 snj Exp $ # # XEN3_0: Xen 3.0 domain0 kernel @@ -14,6 +14,14 @@ ppb* at pci? dev ? function ? # PCI-PCI bridges pci* at ppb? bus ? +# pci backend devices, used for PCI pass-through. To export a PCI device +# to a domU, the device has to be attached to the pciback driver in the dom0. +# you can force a device to attach to the pciback driver in dom0 passing +# pciback.hide=(bus:dev.fun)(bus:dev.func) to the dom0 kernel boot parameters. +# bus and dev are 2-digits hex number, func is a single-digit number: +# pciback.hide=(00:1a.0)(00:1a.1)(00:1a.7) +pciback* at pci?#pci backend device + acpi0 at hypervisor? options MPBIOS options MPDEBUG
CVS commit: [netbsd-5] src/sys/arch/xen/xen
Module Name:src Committed By: snj Date: Sat Oct 3 23:58:47 UTC 2009 Modified Files: src/sys/arch/xen/xen [netbsd-5]: pciback.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1054): sys/arch/xen/xen/pciback.c: revision 1.3 Unbind the event channel after mapping the interrupt. Otherwise domain0 will share the interrupt with the domU and xen will wait for domain0 to ack the interrupt too. Now devices that don't share an interrupt with a device in domain0 works too. Make sure the same PCI bus isn't published multiple times. To generate a diff of this commit: cvs rdiff -u -r1.4.6.3 -r1.4.6.4 src/sys/arch/xen/xen/pciback.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/xen/pciback.c diff -u src/sys/arch/xen/xen/pciback.c:1.4.6.3 src/sys/arch/xen/xen/pciback.c:1.4.6.4 --- src/sys/arch/xen/xen/pciback.c:1.4.6.3 Sat Oct 3 23:56:43 2009 +++ src/sys/arch/xen/xen/pciback.c Sat Oct 3 23:58:47 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pciback.c,v 1.4.6.3 2009/10/03 23:56:43 snj Exp $ */ +/* $NetBSD: pciback.c,v 1.4.6.4 2009/10/03 23:58:47 snj Exp $ */ /* * Copyright (c) 2009 Manuel Bouyer. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pciback.c,v 1.4.6.3 2009/10/03 23:56:43 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: pciback.c,v 1.4.6.4 2009/10/03 23:58:47 snj Exp $); #include opt_xen.h #include rnd.h @@ -272,6 +272,7 @@ aprint_normal_dev(self, interrupting at %s\n, intrstr ? intrstr : unknown interrupt); } + unbind_pirq_from_evtch(APIC_IRQ_LEGACY_IRQ(sc-sc_intrhandle.pirq)); sc-sc_irq = APIC_IRQ_LEGACY_IRQ(sc-sc_intrhandle.pirq); /* XXX should be done elsewhere ? */ reg = pci_conf_read(pa-pa_pc, pa-pa_tag, PCI_INTERRUPT_REG); @@ -700,6 +701,7 @@ err); } num_roots++; + bus[pbd-pb_bus]++; } } err = xenbus_printf(NULL, pbxi-pbx_xbusd-xbusd_path, root_num,
CVS commit: [netbsd-5] src/sys/arch/xen/xen
Module Name:src Committed By: snj Date: Sat Oct 3 23:59:33 UTC 2009 Modified Files: src/sys/arch/xen/xen [netbsd-5]: pciback.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1054): sys/arch/xen/xen/pciback.c: revision 1.4 Move a message to debug To generate a diff of this commit: cvs rdiff -u -r1.4.6.4 -r1.4.6.5 src/sys/arch/xen/xen/pciback.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/xen/pciback.c diff -u src/sys/arch/xen/xen/pciback.c:1.4.6.4 src/sys/arch/xen/xen/pciback.c:1.4.6.5 --- src/sys/arch/xen/xen/pciback.c:1.4.6.4 Sat Oct 3 23:58:47 2009 +++ src/sys/arch/xen/xen/pciback.c Sat Oct 3 23:59:32 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pciback.c,v 1.4.6.4 2009/10/03 23:58:47 snj Exp $ */ +/* $NetBSD: pciback.c,v 1.4.6.5 2009/10/03 23:59:32 snj Exp $ */ /* * Copyright (c) 2009 Manuel Bouyer. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pciback.c,v 1.4.6.4 2009/10/03 23:58:47 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: pciback.c,v 1.4.6.5 2009/10/03 23:59:32 snj Exp $); #include opt_xen.h #include rnd.h @@ -739,7 +739,7 @@ break; } if (pbd == NULL) { - aprint_error(pciback: %02x:%02x.%x not found\n, + aprint_debug(pciback: %02x:%02x.%x not found\n, bus, dev, func); op-err = XEN_PCI_ERR_dev_not_found; goto end;
CVS commit: [netbsd-5] src/sys/arch/xen/xen
Module Name:src Committed By: snj Date: Sun Oct 4 00:00:14 UTC 2009 Modified Files: src/sys/arch/xen/xen [netbsd-5]: xpci_xenbus.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1054): sys/arch/xen/xen/xpci_xenbus.c: revision 1.2 Don't emulate a cold boot here, this breaks drivers using config_interrupt(). To generate a diff of this commit: cvs rdiff -u -r1.2.6.2 -r1.2.6.3 src/sys/arch/xen/xen/xpci_xenbus.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/xen/xpci_xenbus.c diff -u src/sys/arch/xen/xen/xpci_xenbus.c:1.2.6.2 src/sys/arch/xen/xen/xpci_xenbus.c:1.2.6.3 --- src/sys/arch/xen/xen/xpci_xenbus.c:1.2.6.2 Sat Oct 3 23:54:05 2009 +++ src/sys/arch/xen/xen/xpci_xenbus.c Sun Oct 4 00:00:14 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: xpci_xenbus.c,v 1.2.6.2 2009/10/03 23:54:05 snj Exp $ */ +/* $NetBSD: xpci_xenbus.c,v 1.2.6.3 2009/10/04 00:00:14 snj Exp $ */ /* * Copyright (c) 2009 Manuel Bouyer. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: xpci_xenbus.c,v 1.2.6.2 2009/10/03 23:54:05 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: xpci_xenbus.c,v 1.2.6.3 2009/10/04 00:00:14 snj Exp $); #include opt_xen.h #include rnd.h @@ -336,7 +336,7 @@ char node[10]; u_long busn; int i; - int s, oldcold; + int s; err = xenbus_read_ul(NULL, sc-sc_xbusd-xbusd_otherend, root_num, num_roots, 10); @@ -372,10 +372,7 @@ %s is not a number\n, bus); else { s = splhigh(); -oldcold = cold; -cold = 1; xpci_attach_pcibus(0, busn); -cold = oldcold; splx(s); } }
CVS commit: [netbsd-5] src/sys/dev/usb
Module Name:src Committed By: snj Date: Sun Oct 4 00:01:16 UTC 2009 Modified Files: src/sys/dev/usb [netbsd-5]: uhci.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1054): sys/dev/usb/uhci.c: revision 1.225 Make it safe to call uhci_init() from a kernel thread with interrupts enabled: - don't enable interrupts before calling uhci_run() - check if the controller's interrupt is enabled in uhci_intr() The issue is that uhci_run() may tsleep(), uhci_intr1() may be called before uhci_run() is complete and disable it because it found it halted. Now a uhci controller can be successfully exported to a NetBSD Xen domU :) To generate a diff of this commit: cvs rdiff -u -r1.223 -r1.223.6.1 src/sys/dev/usb/uhci.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/usb/uhci.c diff -u src/sys/dev/usb/uhci.c:1.223 src/sys/dev/usb/uhci.c:1.223.6.1 --- src/sys/dev/usb/uhci.c:1.223 Sat Jun 28 17:42:53 2008 +++ src/sys/dev/usb/uhci.c Sun Oct 4 00:01:16 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: uhci.c,v 1.223 2008/06/28 17:42:53 bouyer Exp $ */ +/* $NetBSD: uhci.c,v 1.223.6.1 2009/10/04 00:01:16 snj Exp $ */ /* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */ /* @@ -42,7 +42,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uhci.c,v 1.223 2008/06/28 17:42:53 bouyer Exp $); +__KERNEL_RCSID(0, $NetBSD: uhci.c,v 1.223.6.1 2009/10/04 00:01:16 snj Exp $); #include sys/param.h #include sys/systm.h @@ -563,10 +563,11 @@ UHCICMD(sc, UHCI_CMD_MAXP); /* Assume 64 byte packets at frame end */ DPRINTFN(1,(uhci_init: enabling\n)); + + err = uhci_run(sc, 1); /* and here we go... */ UWRITE2(sc, UHCI_INTR, UHCI_INTR_TOCRCIE | UHCI_INTR_RIE | UHCI_INTR_IOCE | UHCI_INTR_SPIE); /* enable interrupts */ - - return (uhci_run(sc, 1)); /* and here we go... */ + return err; } #if defined(__NetBSD__) || defined(__OpenBSD__) @@ -1309,7 +1310,7 @@ if (sc-sc_dying || !device_has_power(sc-sc_dev)) return (0); - if (sc-sc_bus.use_polling) { + if (sc-sc_bus.use_polling || UREAD2(sc, UHCI_INTR) == 0) { #ifdef DIAGNOSTIC DPRINTFN(16, (uhci_intr: ignored interrupt while polling\n)); #endif
CVS commit: [netbsd-5] src/sys/arch/xen
Module Name:src Committed By: snj Date: Sun Oct 4 00:03:20 UTC 2009 Modified Files: src/sys/arch/xen/x86 [netbsd-5]: intr.c src/sys/arch/xen/xen [netbsd-5]: isa_machdep.c pci_intr_machdep.c pciide_machdep.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1054): sys/arch/xen/x86/intr.c: revision 1.22 sys/arch/xen/xen/isa_machdep.c: revision 1.14 sys/arch/xen/xen/pci_intr_machdep.c: revision 1.9 sys/arch/xen/xen/pciide_machdep.c: revision 1.12 When ioapic is used, for ISA interrupts, reuse the legacy ISA interrupt number instead of allocating a new one. Force allocating a new interrupt number for PCI devices, as the number stored in the PCI interrupt register may be wrong. This should help using a pciide controller in compat mode or ISA devices in a non-0 domain. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.21.4.1 src/sys/arch/xen/x86/intr.c cvs rdiff -u -r1.12 -r1.12.6.1 src/sys/arch/xen/xen/isa_machdep.c cvs rdiff -u -r1.7.6.1 -r1.7.6.2 src/sys/arch/xen/xen/pci_intr_machdep.c cvs rdiff -u -r1.11 -r1.11.6.1 src/sys/arch/xen/xen/pciide_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/xen/x86/intr.c diff -u src/sys/arch/xen/x86/intr.c:1.21 src/sys/arch/xen/x86/intr.c:1.21.4.1 --- src/sys/arch/xen/x86/intr.c:1.21 Fri Sep 5 13:37:24 2008 +++ src/sys/arch/xen/x86/intr.c Sun Oct 4 00:03:19 2009 @@ -103,7 +103,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.21 2008/09/05 13:37:24 tron Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.21.4.1 2009/10/04 00:03:19 snj Exp $); #include opt_multiprocessor.h #include opt_xen.h @@ -268,12 +268,14 @@ irq = vect2irq[ioapic-sc_pins[pin].ip_vector]; if (ioapic-sc_pins[pin].ip_vector == 0 || irq == 0) { /* allocate IRQ */ - irq = xen_next_irq--; + irq = APIC_IRQ_LEGACY_IRQ(*pirq); + if (irq = 0 || irq 15) +irq = xen_next_irq--; /* allocate vector and route interrupt */ op.cmd = PHYSDEVOP_ASSIGN_VECTOR; op.u.irq_op.irq = irq; if (HYPERVISOR_physdev_op(op) 0) -panic(PHYSDEVOP_ASSIGN_VECTOR); +panic(PHYSDEVOP_ASSIGN_VECTOR irq %d, irq); irq2vect[irq] = op.u.irq_op.vector; vect2irq[op.u.irq_op.vector] = irq; pic-pic_addroute(pic, phycpu_info_primary, pin, Index: src/sys/arch/xen/xen/isa_machdep.c diff -u src/sys/arch/xen/xen/isa_machdep.c:1.12 src/sys/arch/xen/xen/isa_machdep.c:1.12.6.1 --- src/sys/arch/xen/xen/isa_machdep.c:1.12 Thu Jul 3 15:44:19 2008 +++ src/sys/arch/xen/xen/isa_machdep.c Sun Oct 4 00:03:20 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: isa_machdep.c,v 1.12 2008/07/03 15:44:19 drochner Exp $ */ +/* $NetBSD: isa_machdep.c,v 1.12.6.1 2009/10/04 00:03:20 snj Exp $ */ /* NetBSD isa_machdep.c,v 1.11 2004/06/20 18:04:08 thorpej Exp */ /*- @@ -66,7 +66,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: isa_machdep.c,v 1.12 2008/07/03 15:44:19 drochner Exp $); +__KERNEL_RCSID(0, $NetBSD: isa_machdep.c,v 1.12.6.1 2009/10/04 00:03:20 snj Exp $); #include sys/param.h #include sys/systm.h @@ -159,7 +159,7 @@ struct ioapic_softc *pic = NULL; #endif - ih.pirq = irq; + ih.pirq = 0; #if NIOAPIC 0 if (mp_busses != NULL) { @@ -178,6 +178,7 @@ printf(isa_intr_establish: no MP mapping found\n); } #endif + ih.pirq |= (irq 0xff); evtch = xen_intr_map(ih.pirq, type); if (evtch == -1) Index: src/sys/arch/xen/xen/pci_intr_machdep.c diff -u src/sys/arch/xen/xen/pci_intr_machdep.c:1.7.6.1 src/sys/arch/xen/xen/pci_intr_machdep.c:1.7.6.2 --- src/sys/arch/xen/xen/pci_intr_machdep.c:1.7.6.1 Sat Oct 3 23:54:05 2009 +++ src/sys/arch/xen/xen/pci_intr_machdep.c Sun Oct 4 00:03:20 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_intr_machdep.c,v 1.7.6.1 2009/10/03 23:54:05 snj Exp $ */ +/* $NetBSD: pci_intr_machdep.c,v 1.7.6.2 2009/10/04 00:03:20 snj Exp $ */ /* * Copyright (c) 2005 Manuel Bouyer. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pci_intr_machdep.c,v 1.7.6.1 2009/10/03 23:54:05 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: pci_intr_machdep.c,v 1.7.6.2 2009/10/04 00:03:20 snj Exp $); #include sys/types.h #include sys/param.h @@ -109,8 +109,8 @@ pci_decompose_tag(pc, pa-pa_tag, bus, dev, func); if (mp_busses != NULL) { if (intr_find_mpmapping(bus, (dev2)|(rawpin-1), ihp) == 0) { - if ((ihp-pirq 0xff) == 0) -ihp-pirq |= line; + /* make sure a new IRQ will be allocated */ + ihp-pirq = ~0xff; goto end; } /* Index: src/sys/arch/xen/xen/pciide_machdep.c diff -u src/sys/arch/xen/xen/pciide_machdep.c:1.11 src/sys/arch/xen/xen/pciide_machdep.c:1.11.6.1 --- src/sys/arch/xen/xen/pciide_machdep.c:1.11 Thu Jul 3 15:44:19 2008 +++ src/sys/arch/xen/xen/pciide_machdep.c Sun Oct 4 00:03:20 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pciide_machdep.c,v 1.11 2008/07/03 15:44:19 drochner Exp
CVS commit: [netbsd-5] src/sys/arch/xen/xen
Module Name:src Committed By: snj Date: Sun Oct 4 00:04:08 UTC 2009 Modified Files: src/sys/arch/xen/xen [netbsd-5]: pci_intr_machdep.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1054): sys/arch/xen/xen/pci_intr_machdep.c: revision 1.10 Keep the BIOS-configured interrupt number if intr_find_mpmapping() doesn't return a APIC_INT_VIA_APIC pirq. Problem debugged and patch tested by jym@ To generate a diff of this commit: cvs rdiff -u -r1.7.6.2 -r1.7.6.3 src/sys/arch/xen/xen/pci_intr_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/xen/xen/pci_intr_machdep.c diff -u src/sys/arch/xen/xen/pci_intr_machdep.c:1.7.6.2 src/sys/arch/xen/xen/pci_intr_machdep.c:1.7.6.3 --- src/sys/arch/xen/xen/pci_intr_machdep.c:1.7.6.2 Sun Oct 4 00:03:20 2009 +++ src/sys/arch/xen/xen/pci_intr_machdep.c Sun Oct 4 00:04:08 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_intr_machdep.c,v 1.7.6.2 2009/10/04 00:03:20 snj Exp $ */ +/* $NetBSD: pci_intr_machdep.c,v 1.7.6.3 2009/10/04 00:04:08 snj Exp $ */ /* * Copyright (c) 2005 Manuel Bouyer. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pci_intr_machdep.c,v 1.7.6.2 2009/10/04 00:03:20 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: pci_intr_machdep.c,v 1.7.6.3 2009/10/04 00:04:08 snj Exp $); #include sys/types.h #include sys/param.h @@ -109,8 +109,12 @@ pci_decompose_tag(pc, pa-pa_tag, bus, dev, func); if (mp_busses != NULL) { if (intr_find_mpmapping(bus, (dev2)|(rawpin-1), ihp) == 0) { - /* make sure a new IRQ will be allocated */ - ihp-pirq = ~0xff; + if (ihp-pirq APIC_INT_VIA_APIC) { +/* make sure a new IRQ will be allocated */ +ihp-pirq = ~0xff; + } else { +ihp-pirq |= line; + } goto end; } /*
CVS commit: [netbsd-5] src/usr.sbin/mdsetimage
Module Name:src Committed By: snj Date: Sun Oct 4 00:20:59 UTC 2009 Modified Files: src/usr.sbin/mdsetimage [netbsd-5]: exec_aout.c exec_coff.c exec_ecoff.c exec_elf32.c mdsetimage.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1056): usr.sbin/mdsetimage/exec_aout.c: revision 1.7 usr.sbin/mdsetimage/exec_coff.c: revision 1.6 usr.sbin/mdsetimage/exec_ecoff.c: revision 1.6 usr.sbin/mdsetimage/exec_elf32.c: revision 1.10 usr.sbin/mdsetimage/mdsetimage.c: revision 1.19 WARNS'fy sources which are left for reference. src/usr.sbin/mdsetimage has been superseded by src/gnu/usr.sbin/mdsetimage for toolchain to handle cross build binaries, but these old sources for local executable binaries still can be used for tools to patch binaries, like binpatch utility in sys/arch/amiga/stand and sys/arch/atari/stand. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.6.40.1 src/usr.sbin/mdsetimage/exec_aout.c cvs rdiff -u -r1.5 -r1.5.40.1 src/usr.sbin/mdsetimage/exec_coff.c \ src/usr.sbin/mdsetimage/exec_ecoff.c cvs rdiff -u -r1.9 -r1.9.40.1 src/usr.sbin/mdsetimage/exec_elf32.c cvs rdiff -u -r1.18 -r1.18.4.1 src/usr.sbin/mdsetimage/mdsetimage.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/mdsetimage/exec_aout.c diff -u src/usr.sbin/mdsetimage/exec_aout.c:1.6 src/usr.sbin/mdsetimage/exec_aout.c:1.6.40.1 --- src/usr.sbin/mdsetimage/exec_aout.c:1.6 Mon Oct 1 23:32:34 2001 +++ src/usr.sbin/mdsetimage/exec_aout.c Sun Oct 4 00:20:59 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_aout.c,v 1.6 2001/10/01 23:32:34 cgd Exp $ */ +/* $NetBSD: exec_aout.c,v 1.6.40.1 2009/10/04 00:20:59 snj Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou @@ -31,7 +31,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: exec_aout.c,v 1.6 2001/10/01 23:32:34 cgd Exp $); +__RCSID($NetBSD: exec_aout.c,v 1.6.40.1 2009/10/04 00:20:59 snj Exp $); #endif /* not lint */ #include sys/types.h @@ -53,14 +53,14 @@ const char *mappedfile; size_t mappedsize; { - struct exec *execp; + const struct exec *execp; int rv; rv = 0; if (check(0, sizeof *execp)) BAD; - execp = (struct exec *)mappedfile[0]; + execp = (const struct exec *)mappedfile[0]; if (N_BADMAG(*execp)) BAD; @@ -75,11 +75,11 @@ size_t mappedsize, *fileoffp; u_long vmaddr; { - struct exec *execp; + const struct exec *execp; int rv; rv = 0; - execp = (struct exec *)mappedfile[0]; + execp = (const struct exec *)mappedfile[0]; if (N_TXTADDR(*execp) + (execp-a_entry (N_PAGSIZ(*execp)-1)) != execp-a_entry) Index: src/usr.sbin/mdsetimage/exec_coff.c diff -u src/usr.sbin/mdsetimage/exec_coff.c:1.5 src/usr.sbin/mdsetimage/exec_coff.c:1.5.40.1 --- src/usr.sbin/mdsetimage/exec_coff.c:1.5 Mon Oct 1 23:32:34 2001 +++ src/usr.sbin/mdsetimage/exec_coff.c Sun Oct 4 00:20:59 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_coff.c,v 1.5 2001/10/01 23:32:34 cgd Exp $ */ +/* $NetBSD: exec_coff.c,v 1.5.40.1 2009/10/04 00:20:59 snj Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou @@ -31,7 +31,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: exec_coff.c,v 1.5 2001/10/01 23:32:34 cgd Exp $); +__RCSID($NetBSD: exec_coff.c,v 1.5.40.1 2009/10/04 00:20:59 snj Exp $); #endif /* not lint */ #include sys/param.h @@ -53,14 +53,14 @@ const char *mappedfile; size_t mappedsize; { - struct coff_exechdr *exechdrp; + const struct coff_exechdr *exechdrp; int rv; rv = 0; if (check(0, sizeof *exechdrp)) BAD; - exechdrp = (struct coff_exechdr *)mappedfile[0]; + exechdrp = (const struct coff_exechdr *)mappedfile[0]; if (COFF_BADMAG((exechdrp-f))) BAD; @@ -75,11 +75,11 @@ size_t mappedsize, *fileoffp; u_long vmaddr; { - struct coff_exechdr *exechdrp; + const struct coff_exechdr *exechdrp; int rv; rv = 0; - exechdrp = (struct coff_exechdr *)mappedfile[0]; + exechdrp = (const struct coff_exechdr *)mappedfile[0]; #define COFF_TXTOFF_XXX(fp, ap) \ (COFF_ROUND(COFF_HDR_SIZE + (fp)-f_nscns * \ @@ -89,12 +89,12 @@ #define COFF_DATOFF_XXX(fp, ap) \ (COFF_TXTOFF_XXX(fp, ap) + (ap)-a_tsize) - if (exechdrp-a.a_tstart = vmaddr - vmaddr (exechdrp-a.a_tstart + exechdrp-a.a_tsize)) + if ((u_long)exechdrp-a.a_tstart = vmaddr + vmaddr (u_long)(exechdrp-a.a_tstart + exechdrp-a.a_tsize)) *fileoffp = vmaddr - exechdrp-a.a_tstart + COFF_TXTOFF(exechdrp-f, (exechdrp-a)); - else if (exechdrp-a.a_dstart = vmaddr -vmaddr (exechdrp-a.a_dstart + exechdrp-a.a_dsize)) + else if ((u_long)exechdrp-a.a_dstart = vmaddr +vmaddr (u_long)(exechdrp-a.a_dstart + exechdrp-a.a_dsize)) *fileoffp = vmaddr - exechdrp-a.a_dstart + COFF_DATOFF_XXX(exechdrp-f, (exechdrp-a)); else Index: src/usr.sbin/mdsetimage/exec_ecoff.c diff -u
CVS commit: [netbsd-5] src/usr.sbin/mdsetimage
Module Name:src Committed By: snj Date: Sun Oct 4 00:22:12 UTC 2009 Modified Files: src/usr.sbin/mdsetimage [netbsd-5]: exec_elf32.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1056): usr.sbin/mdsetimage/exec_elf32.c: revision 1.11 - use program header rather than section header to find file offset for vmaddr - make sure that passed vmaddr is in TEXT or DATA section To generate a diff of this commit: cvs rdiff -u -r1.9.40.1 -r1.9.40.2 src/usr.sbin/mdsetimage/exec_elf32.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/mdsetimage/exec_elf32.c diff -u src/usr.sbin/mdsetimage/exec_elf32.c:1.9.40.1 src/usr.sbin/mdsetimage/exec_elf32.c:1.9.40.2 --- src/usr.sbin/mdsetimage/exec_elf32.c:1.9.40.1 Sun Oct 4 00:20:59 2009 +++ src/usr.sbin/mdsetimage/exec_elf32.c Sun Oct 4 00:22:12 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_elf32.c,v 1.9.40.1 2009/10/04 00:20:59 snj Exp $ */ +/* $NetBSD: exec_elf32.c,v 1.9.40.2 2009/10/04 00:22:12 snj Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou @@ -31,7 +31,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: exec_elf32.c,v 1.9.40.1 2009/10/04 00:20:59 snj Exp $); +__RCSID($NetBSD: exec_elf32.c,v 1.9.40.2 2009/10/04 00:22:12 snj Exp $); #endif /* not lint */ #ifndef ELFSIZE @@ -89,37 +89,40 @@ u_long vmaddr; { const Elf_Ehdr *ehdrp; - const Elf_Shdr *shdrp; - Elf_Off shdr_off; - Elf_Word shdr_size; + const Elf_Phdr *phdrp; + Elf_Off phdr_off; + Elf_Word phdr_size; #if (ELFSIZE == 32) - Elf32_Half nshdr, i; + Elf32_Half nphdr, i; #elif (ELFSIZE == 64) - Elf64_Half nshdr, i; + Elf64_Half nphdr, i; #endif int rv; rv = 0; ehdrp = (const Elf_Ehdr *)mappedfile[0]; - nshdr = ehdrp-e_shnum; - shdr_off = ehdrp-e_shoff; - shdr_size = ehdrp-e_shentsize * nshdr; + nphdr = ehdrp-e_phnum; + phdr_off = ehdrp-e_phoff; + phdr_size = sizeof(Elf_Phdr) * nphdr; - if (check(0, shdr_size + shdr_off) || - (sizeof *shdrp != ehdrp-e_shentsize)) + if (check(0, phdr_off + phdr_size)) BAD; - shdrp = (const Elf_Shdr *)mappedfile[shdr_off]; + phdrp = (const Elf_Phdr *)mappedfile[phdr_off]; - for (i = 0; i nshdr; i++) { - if (shdrp[i].sh_addr = vmaddr - vmaddr (shdrp[i].sh_addr + shdrp[i].sh_size)) { +#define IS_TEXT(p) (p.p_flags PF_X) +#define IS_DATA(p) (p.p_flags PF_W) + + for (i = 0; i nphdr; i++) { + if ((IS_TEXT(phdrp[i]) || IS_DATA(phdrp[i])) + phdrp[i].p_vaddr = vmaddr + vmaddr phdrp[i].p_vaddr + phdrp[i].p_filesz) { *fileoffp = vmaddr - - shdrp[i].sh_addr + shdrp[i].sh_offset; + phdrp[i].p_vaddr + phdrp[i].p_offset; break; } } - if (i == nshdr) + if (i == nphdr) BAD; out:
CVS commit: [netbsd-5] src
Module Name:src Committed By: snj Date: Sun Oct 4 00:26:57 UTC 2009 Modified Files: src/share/man/man8/man8.atari [netbsd-5]: binpatch.8 src/sys/arch/atari/stand/binpatch [netbsd-5]: Makefile binpatch.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1056): share/man/man8/man8.atari/binpatch.8: revision 1.6 sys/arch/atari/stand/binpatch/Makefile: revision 1.6 sys/arch/atari/stand/binpatch/binpatch.c: revision 1.5, 1.6 Rewrite binpatch(8) utility to add support for ELF binaries, using implementation of old src/usr.sbin/mdsetimage sources which supports misc executable formats without LGPL'ed libbfd. No particular comments on port-at...@. XXX1: amiga also has the similar utility in amiga/stand/binpatch but it has slightly different options. XXX2: Is it worth to put this utility into MI src/usr.sbin to patch rtc_offset etc. in GENERIC kernel binaries in distribution? To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.42.1 src/share/man/man8/man8.atari/binpatch.8 cvs rdiff -u -r1.5 -r1.5.132.1 src/sys/arch/atari/stand/binpatch/Makefile cvs rdiff -u -r1.4 -r1.4.72.1 src/sys/arch/atari/stand/binpatch/binpatch.c 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/man8/man8.atari/binpatch.8 diff -u src/share/man/man8/man8.atari/binpatch.8:1.5 src/share/man/man8/man8.atari/binpatch.8:1.5.42.1 --- src/share/man/man8/man8.atari/binpatch.8:1.5 Wed Dec 26 01:26:44 2001 +++ src/share/man/man8/man8.atari/binpatch.8 Sun Oct 4 00:26:57 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: binpatch.8,v 1.5 2001/12/26 01:26:44 wiz Exp $ +.\ $NetBSD: binpatch.8,v 1.5.42.1 2009/10/04 00:26:57 snj Exp $ .\ .\ Copyright (c) 1994 Christian E. Hopps .\ All rights reserved. @@ -28,22 +28,24 @@ .\ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\ -.Dd February 2, 1994 +.Dd August 20, 2009 .Dt BINPATCH 8 atari .Os .Sh NAME .Nm binpatch -.Nd examine and or modify initialized data in a binary file +.Nd examine and or modify initialized data in an executable binary .Sh SYNOPSIS .Nm binpatch -.Op Fl b | Fl w | Fl l +.Op Fl b | Fl w | Fl l | Fl d .Op Fl o Ar offset +.Op Fl T Ar saddr .Fl s Ar symname .Op Fl r Ar value .Ar binfile .Nm binpatch -.Op Fl b | Fl w | Fl l +.Op Fl b | Fl w | Fl l | Fl d .Op Fl o Ar offset +.Op Fl T Ar saddr .Fl a Ar addr .Op Fl r Ar value .Ar binfile @@ -52,20 +54,39 @@ is used to modify or examine the data associated with a symbol in a binary file .Ar binfile . +.Pp The flags .Fl b , -.Fl w +.Fl w , +.Fl l , and +.Fl d +specify the size of the data to be modified or examined. +.Fl b +is for 8bit +.Pq Li int8_t , +.Fl w +is for 16bit +.Pq Li int16_t , .Fl l -specify the size of the data to be modified or examined -(byte, word and long respectively.) The +is for 32bit +.Pq Li int32_t , +and +.Fl d +is for 64bit +.Pq Li int64_t +variables. +.Pp +The .Ar binfile is scanned in search of the symbol .Ar symname (specified with the .Fl s flag.) -If the symbol is found the current data and address are printed. Next if the +If the symbol is found the current data and address are printed. +.Pp +Next if the .Fl r flag has been given, the current data is replaced with that of .Ar value . @@ -79,11 +100,17 @@ .Pp The .Fl o -flag specifies an offset in byte, word or long +flag specifies an offset in +.Li int8_t , +.Li int16_t , +.Li int32_t , +and +.Li int64_t .Fl ( b , .Fl w , +.Fl l , or -.Fl l ) +.Fl d ) units from the given locator .Fl ( s or @@ -91,3 +118,28 @@ for .Nm to perform its described actions. +This might be useful to patch a member of array or structure. +.Pp +The +.Fl T +flag is used to specify the starting address of a.out binary text segment. +Ignored for other binary executable formats. +.Sh SEE ALSO +.Xr gdb 1 , +.Xr mdsetimage 8 +.Sh BUGS +The +.Nm +command doesn't check if size of specified symbol is same with the +specified size by +.Fl b , +.Fl w , +.Fl l , +or +.Fl d +flag. +.Pp +The +.Nm +command doesn't check if specified address or symbol is a patchable variable +and it might corrupts the specified executable binary. Index: src/sys/arch/atari/stand/binpatch/Makefile diff -u src/sys/arch/atari/stand/binpatch/Makefile:1.5 src/sys/arch/atari/stand/binpatch/Makefile:1.5.132.1 --- src/sys/arch/atari/stand/binpatch/Makefile:1.5 Wed Dec 12 01:49:38 2001 +++ src/sys/arch/atari/stand/binpatch/Makefile Sun Oct 4 00:26:57 2009 @@ -1,9 +1,50 @@ -# $NetBSD: Makefile,v 1.5 2001/12/12 01:49:38 tv Exp $ +# $NetBSD: Makefile,v 1.5.132.1 2009/10/04 00:26:57 snj Exp $ -PROG=binpatch -NOMAN= # defined +BINDIR?= /sbin +WARNS?= 4 -BINDIR=/sbin -LDFLAGS+=-static +PROG= binpatch +SRCS= binpatch.c +SRCS+= exec_aout.c exec_ecoff.c exec_elf32.c exec_elf64.c exec_coff.c + +#MAN= binpatch.8 #
CVS commit: [netbsd-5] src/share/man/man8/man8.atari
Module Name:src Committed By: snj Date: Sun Oct 4 00:28:07 UTC 2009 Modified Files: src/share/man/man8/man8.atari [netbsd-5]: binpatch.8 Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1056): share/man/man8/man8.atari/binpatch.8: revision 1.7 Fix typo and improve English. To generate a diff of this commit: cvs rdiff -u -r1.5.42.1 -r1.5.42.2 src/share/man/man8/man8.atari/binpatch.8 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/man8/man8.atari/binpatch.8 diff -u src/share/man/man8/man8.atari/binpatch.8:1.5.42.1 src/share/man/man8/man8.atari/binpatch.8:1.5.42.2 --- src/share/man/man8/man8.atari/binpatch.8:1.5.42.1 Sun Oct 4 00:26:57 2009 +++ src/share/man/man8/man8.atari/binpatch.8 Sun Oct 4 00:28:07 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: binpatch.8,v 1.5.42.1 2009/10/04 00:26:57 snj Exp $ +.\ $NetBSD: binpatch.8,v 1.5.42.2 2009/10/04 00:28:07 snj Exp $ .\ .\ Copyright (c) 1994 Christian E. Hopps .\ All rights reserved. @@ -130,7 +130,7 @@ .Sh BUGS The .Nm -command doesn't check if size of specified symbol is same with the +command doesn't check if size of specified symbol is the same as the specified size by .Fl b , .Fl w , @@ -142,4 +142,4 @@ The .Nm command doesn't check if specified address or symbol is a patchable variable -and it might corrupts the specified executable binary. +and it might corrupt the specified executable binary.
CVS commit: [netbsd-5] src/share/man/man8/man8.atari
Module Name:src Committed By: snj Date: Sun Oct 4 00:29:18 UTC 2009 Modified Files: src/share/man/man8/man8.atari [netbsd-5]: binpatch.8 Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1056): share/man/man8/man8.atari/binpatch.8: revision 1.8 Fix typo. To generate a diff of this commit: cvs rdiff -u -r1.5.42.2 -r1.5.42.3 src/share/man/man8/man8.atari/binpatch.8 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/man8/man8.atari/binpatch.8 diff -u src/share/man/man8/man8.atari/binpatch.8:1.5.42.2 src/share/man/man8/man8.atari/binpatch.8:1.5.42.3 --- src/share/man/man8/man8.atari/binpatch.8:1.5.42.2 Sun Oct 4 00:28:07 2009 +++ src/share/man/man8/man8.atari/binpatch.8 Sun Oct 4 00:29:17 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: binpatch.8,v 1.5.42.2 2009/10/04 00:28:07 snj Exp $ +.\ $NetBSD: binpatch.8,v 1.5.42.3 2009/10/04 00:29:17 snj Exp $ .\ .\ Copyright (c) 1994 Christian E. Hopps .\ All rights reserved. @@ -83,7 +83,7 @@ .Ar symname (specified with the .Fl s -flag.) +flag). If the symbol is found the current data and address are printed. .Pp Next if the
CVS commit: [netbsd-5] src/sys/arch/atari/dev
Module Name:src Committed By: snj Date: Sun Oct 4 00:31:52 UTC 2009 Modified Files: src/sys/arch/atari/dev [netbsd-5]: clock.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1057): sys/arch/atari/dev/clock.c: revision 1.47 Add a workaround for annoying WARNING: negative runtime; monotonic clock has gone backwards message. Partially taken from hp300. To generate a diff of this commit: cvs rdiff -u -r1.41.6.1 -r1.41.6.2 src/sys/arch/atari/dev/clock.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/atari/dev/clock.c diff -u src/sys/arch/atari/dev/clock.c:1.41.6.1 src/sys/arch/atari/dev/clock.c:1.41.6.2 --- src/sys/arch/atari/dev/clock.c:1.41.6.1 Thu Nov 6 00:15:55 2008 +++ src/sys/arch/atari/dev/clock.c Sun Oct 4 00:31:52 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: clock.c,v 1.41.6.1 2008/11/06 00:15:55 snj Exp $ */ +/* $NetBSD: clock.c,v 1.41.6.2 2009/10/04 00:31:52 snj Exp $ */ /* * Copyright (c) 1982, 1990 The Regents of the University of California. @@ -77,7 +77,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: clock.c,v 1.41.6.1 2008/11/06 00:15:55 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: clock.c,v 1.41.6.2 2009/10/04 00:31:52 snj Exp $); #include sys/param.h #include sys/kernel.h @@ -319,21 +319,29 @@ static u_int clk_getcounter(struct timecounter *tc) { - u_int delta; - u_char ipra, tadr; - int s, cur_hardclock; + uint32_t delta, count, cur_hardclock; + uint8_t ipra, tadr; + int s; + static uint32_t lastcount; s = splhigh(); + cur_hardclock = hardclock_ticks; ipra = MFP-mf_ipra; tadr = MFP-mf_tadr; delta = divisor - tadr; if (ipra IA_TIMA) delta += divisor; - cur_hardclock = hardclock_ticks; splx(s); - return (divisor - tadr) + divisor * cur_hardclock; + count = (divisor * cur_hardclock) + delta; + if ((int32_t)(count - lastcount) 0) { + /* XXX wrapped; maybe hardclock() is blocked more than 2/HZ */ + count = lastcount + 1; + } + lastcount = count; + + return count; } #define TIMB_FREQ 614400
CVS commit: [netbsd-5] src/external/mit/xorg/bin/xkbcomp
Module Name:src Committed By: snj Date: Sun Oct 4 00:41:52 UTC 2009 Modified Files: src/external/mit/xorg/bin/xkbcomp [netbsd-5]: Makefile Makefile.common Log Message: Pull up following revision(s) (requested by mrg in ticket #1062): external/mit/xorg/bin/xkbcomp/Makefile: revision 1.5 external/mit/xorg/bin/xkbcomp/Makefile.common: revision 1.2 properly fix the xkbcomp output, and make compiled a symlink. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.8.2 -r1.1.1.1.8.3 \ src/external/mit/xorg/bin/xkbcomp/Makefile cvs rdiff -u -r1.1.2.2 -r1.1.2.3 \ src/external/mit/xorg/bin/xkbcomp/Makefile.common Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/bin/xkbcomp/Makefile diff -u src/external/mit/xorg/bin/xkbcomp/Makefile:1.1.1.1.8.2 src/external/mit/xorg/bin/xkbcomp/Makefile:1.1.1.1.8.3 --- src/external/mit/xorg/bin/xkbcomp/Makefile:1.1.1.1.8.2 Mon Sep 28 01:57:05 2009 +++ src/external/mit/xorg/bin/xkbcomp/Makefile Sun Oct 4 00:41:52 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1.1.1.8.2 2009/09/28 01:57:05 snj Exp $ +# $NetBSD: Makefile,v 1.1.1.1.8.3 2009/10/04 00:41:52 snj Exp $ .include bsd.own.mk .include Makefile.common @@ -17,7 +17,8 @@ FILESDIR=${X11LIBDIR}/xkb FILES= README README.config README.enhancing -SYMLINKS+=${BINDIR}/xkbcomp ${X11LIBDIR}/xkb/xkbcomp +SYMLINKS+= ${BINDIR}/xkbcomp ${X11LIBDIR}/xkb/xkbcomp +SYMLINKS+= ${XKBCOMPDIR} ${X11LIBDIR}/xkb/compiled LDADD+= -lxkbfile -lXext -lX11 DPADD+= ${LIBXKBFILE} ${LIBXEXT} ${LIBX11} Index: src/external/mit/xorg/bin/xkbcomp/Makefile.common diff -u src/external/mit/xorg/bin/xkbcomp/Makefile.common:1.1.2.2 src/external/mit/xorg/bin/xkbcomp/Makefile.common:1.1.2.3 --- src/external/mit/xorg/bin/xkbcomp/Makefile.common:1.1.2.2 Mon Sep 28 01:57:05 2009 +++ src/external/mit/xorg/bin/xkbcomp/Makefile.common Sun Oct 4 00:41:52 2009 @@ -1,3 +1,3 @@ -# $NetBSD: Makefile.common,v 1.1.2.2 2009/09/28 01:57:05 snj Exp $ +# $NetBSD: Makefile.common,v 1.1.2.3 2009/10/04 00:41:52 snj Exp $ -XKBCOMPDIR= /var/db/xkb +XKBCOMPDIR= ${X11LIBDIR}/xkb
CVS commit: [netbsd-5] src/etc/mtree
Module Name:src Committed By: snj Date: Sun Oct 4 00:42:21 UTC 2009 Modified Files: src/etc/mtree [netbsd-5]: NetBSD.dist Log Message: Apply patch (requested by mrg in ticket #1062): Don't create xkb/compiled as a directory any more. To generate a diff of this commit: cvs rdiff -u -r1.385.2.3 -r1.385.2.4 src/etc/mtree/NetBSD.dist Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/mtree/NetBSD.dist diff -u src/etc/mtree/NetBSD.dist:1.385.2.3 src/etc/mtree/NetBSD.dist:1.385.2.4 --- src/etc/mtree/NetBSD.dist:1.385.2.3 Tue Sep 29 23:30:04 2009 +++ src/etc/mtree/NetBSD.dist Sun Oct 4 00:42:21 2009 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist,v 1.385.2.3 2009/09/29 23:30:04 snj Exp $ +# $NetBSD: NetBSD.dist,v 1.385.2.4 2009/10/04 00:42:21 snj Exp $ # @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93 # Do not customize this file as it may be overwritten on upgrades. @@ -363,7 +363,6 @@ ./usr/X11R7/lib/X11/xedit/lisp/progmodes ./usr/X11R7/lib/X11/xkb ./usr/X11R7/lib/X11/xkb/compat -./usr/X11R7/lib/X11/xkb/compiled ./usr/X11R7/lib/X11/xkb/geometry ./usr/X11R7/lib/X11/xkb/geometry/digital_vndr ./usr/X11R7/lib/X11/xkb/geometry/sgi_vndr
CVS commit: [netbsd-5] src/sys/arch
Module Name:src Committed By: snj Date: Sun Oct 4 00:45:35 UTC 2009 Modified Files: src/sys/arch/landisk/dev [netbsd-5]: obio.c src/sys/arch/landisk/include [netbsd-5]: bus.h src/sys/arch/landisk/landisk [netbsd-5]: shpcic_machdep.c src/sys/arch/sh3/dev [netbsd-5]: shpcic.c shpcicvar.h Log Message: Pull up following revision(s) (requested by mrg in ticket #1063): sys/arch/landisk/dev/obio.c: revision 1.7 sys/arch/landisk/include/bus.h: revision 1.5 sys/arch/landisk/landisk/shpcic_machdep.c: revision 1.2 sys/arch/sh3/dev/shpcic.c: revision 1.13 sys/arch/sh3/dev/shpcicvar.h: revision 1.7 fix build failure. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.6.10.1 src/sys/arch/landisk/dev/obio.c cvs rdiff -u -r1.4 -r1.4.10.1 src/sys/arch/landisk/include/bus.h cvs rdiff -u -r1.1 -r1.1.76.1 src/sys/arch/landisk/landisk/shpcic_machdep.c cvs rdiff -u -r1.12 -r1.12.14.1 src/sys/arch/sh3/dev/shpcic.c cvs rdiff -u -r1.6 -r1.6.88.1 src/sys/arch/sh3/dev/shpcicvar.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/landisk/dev/obio.c diff -u src/sys/arch/landisk/dev/obio.c:1.6 src/sys/arch/landisk/dev/obio.c:1.6.10.1 --- src/sys/arch/landisk/dev/obio.c:1.6 Mon Apr 28 20:23:26 2008 +++ src/sys/arch/landisk/dev/obio.c Sun Oct 4 00:45:35 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: obio.c,v 1.6 2008/04/28 20:23:26 martin Exp $ */ +/* $NetBSD: obio.c,v 1.6.10.1 2009/10/04 00:45:35 snj Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: obio.c,v 1.6 2008/04/28 20:23:26 martin Exp $); +__KERNEL_RCSID(0, $NetBSD: obio.c,v 1.6.10.1 2009/10/04 00:45:35 snj Exp $); #include btn_obio.h #include pwrsw_obio.h @@ -243,6 +243,8 @@ bus_size_t size, bus_size_t alignment, bus_size_t boundary, int flags, bus_addr_t *bpap, bus_space_handle_t *bshp); void obio_iomem_free(void *v, bus_space_handle_t bsh, bus_size_t size); +paddr_t obio_iomem_mmap(void *v, bus_addr_t addr, off_t off, int prot, +int flags); static int obio_iomem_add_mapping(bus_addr_t, bus_size_t, int, bus_space_handle_t *); @@ -384,6 +386,13 @@ obio_iomem_unmap(v, bsh, size); } +paddr_t +obio_iomem_mmap(void *v, bus_addr_t addr, off_t off, int prot, int flags) +{ + + return (paddr_t)-1; +} + /* * on-board I/O bus space read/write */ @@ -450,6 +459,8 @@ .bs_alloc = obio_iomem_alloc, .bs_free = obio_iomem_free, + .bs_mmap = obio_iomem_mmap, + .bs_r_1 = obio_iomem_read_1, .bs_r_2 = obio_iomem_read_2, .bs_r_4 = obio_iomem_read_4, Index: src/sys/arch/landisk/include/bus.h diff -u src/sys/arch/landisk/include/bus.h:1.4 src/sys/arch/landisk/include/bus.h:1.4.10.1 --- src/sys/arch/landisk/include/bus.h:1.4 Mon Apr 28 20:23:26 2008 +++ src/sys/arch/landisk/include/bus.h Sun Oct 4 00:45:35 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.4 2008/04/28 20:23:26 martin Exp $ */ +/* $NetBSD: bus.h,v 1.4.10.1 2009/10/04 00:45:35 snj Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -130,6 +130,9 @@ /* get kernel virtual address */ void * (*bs_vaddr)(void *, bus_space_handle_t); + /* mmap bus space for user */ + paddr_t (*bs_mmap)(void *, bus_addr_t, off_t, int, int); + /* read (single) */ uint8_t (*bs_r_1)(void *, bus_space_handle_t, bus_size_t); @@ -292,6 +295,12 @@ (*(t)-bs_vaddr)((t)-bs_cookie, (h)) /* + * MMap bus space for a user application. + */ +#define bus_space_mmap(t, a, o, p, f) \ + (*(t)-bs_mmap)((t)-bs_cookie, (a), (o), (p), (f)) + +/* * Bus barrier operations. The SH3 does not currently require * barriers, but we must provide the flags to MI code. */ Index: src/sys/arch/landisk/landisk/shpcic_machdep.c diff -u src/sys/arch/landisk/landisk/shpcic_machdep.c:1.1 src/sys/arch/landisk/landisk/shpcic_machdep.c:1.1.76.1 --- src/sys/arch/landisk/landisk/shpcic_machdep.c:1.1 Fri Sep 1 21:26:18 2006 +++ src/sys/arch/landisk/landisk/shpcic_machdep.c Sun Oct 4 00:45:35 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: shpcic_machdep.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */ +/* $NetBSD: shpcic_machdep.c,v 1.1.76.1 2009/10/04 00:45:35 snj Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: shpcic_machdep.c,v 1.1 2006/09/01 21:26:18 uwe Exp $); +__KERNEL_RCSID(0, $NetBSD: shpcic_machdep.c,v 1.1.76.1 2009/10/04 00:45:35 snj Exp $); #include sys/types.h #include sys/param.h @@ -189,6 +189,8 @@ .bs_alloc = shpcic_iomem_alloc, .bs_free = shpcic_iomem_free, + .bs_mmap = shpcic_iomem_mmap, + .bs_r_1 = shpcic_io_read_1, .bs_r_2 = shpcic_io_read_2, .bs_r_4 = shpcic_io_read_4, @@ -237,6 +239,8 @@ .bs_alloc = shpcic_iomem_alloc, .bs_free = shpcic_iomem_free, + .bs_mmap = shpcic_iomem_mmap, + .bs_r_1
CVS commit: [netbsd-5] src/sys/dev
Module Name:src Committed By: snj Date: Tue Sep 29 22:46:56 UTC 2009 Modified Files: src/sys/dev [netbsd-5]: audio.c Log Message: Pull up following revision(s) (requested by sborrill in ticket #1016): sys/dev/audio.c: revision 1.246 OSS audio allows mixer operations on the dsp device. NetBSD would return EINVAL in these circumstances. This can break audio in apps running under Linux emulation (e.g. Citrix ICA client will mute all audio when volume control used). Therefore, pass unrecognised ioctls attempted on dsp devices to mixer_ioctl. To generate a diff of this commit: cvs rdiff -u -r1.243 -r1.243.6.1 src/sys/dev/audio.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/audio.c diff -u src/sys/dev/audio.c:1.243 src/sys/dev/audio.c:1.243.6.1 --- src/sys/dev/audio.c:1.243 Tue Jun 10 22:53:08 2008 +++ src/sys/dev/audio.c Tue Sep 29 22:46:56 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.243 2008/06/10 22:53:08 cegger Exp $ */ +/* $NetBSD: audio.c,v 1.243.6.1 2009/09/29 22:46:56 snj Exp $ */ /* * Copyright (c) 1991-1993 Regents of the University of California. @@ -61,7 +61,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: audio.c,v 1.243 2008/06/10 22:53:08 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: audio.c,v 1.243.6.1 2009/09/29 22:46:56 snj Exp $); #include audio.h #if NAUDIO 0 @@ -1149,6 +1149,12 @@ case AUDIOCTL_DEVICE: device_active(sc-dev, DVA_SYSTEM); error = audio_ioctl(sc, cmd, addr, flag, l); + /* + * OSS audio allows mixer operations on sound devices + * so pass through if command isn't a valid audio operation + */ + if (error == EINVAL) + error = mixer_ioctl(sc, cmd, addr, flag, l); break; case MIXER_DEVICE: error = mixer_ioctl(sc, cmd, addr, flag, l);
CVS commit: [netbsd-5] src/sys/dev
Module Name:src Committed By: snj Date: Tue Sep 29 22:50:11 UTC 2009 Modified Files: src/sys/dev [netbsd-5]: audio.c Log Message: Pull up following revision(s) (requested by sborrill in ticket #1016): sys/dev/audio.c: revision 1.247 Revert previous and instead select whether to call mixer_ioctl() or audio_ioctl() based on whether the command smells like a mixer ioctl or not. To generate a diff of this commit: cvs rdiff -u -r1.243.6.1 -r1.243.6.2 src/sys/dev/audio.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/audio.c diff -u src/sys/dev/audio.c:1.243.6.1 src/sys/dev/audio.c:1.243.6.2 --- src/sys/dev/audio.c:1.243.6.1 Tue Sep 29 22:46:56 2009 +++ src/sys/dev/audio.c Tue Sep 29 22:50:11 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.243.6.1 2009/09/29 22:46:56 snj Exp $ */ +/* $NetBSD: audio.c,v 1.243.6.2 2009/09/29 22:50:11 snj Exp $ */ /* * Copyright (c) 1991-1993 Regents of the University of California. @@ -61,7 +61,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: audio.c,v 1.243.6.1 2009/09/29 22:46:56 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: audio.c,v 1.243.6.2 2009/09/29 22:50:11 snj Exp $); #include audio.h #if NAUDIO 0 @@ -1148,13 +1148,10 @@ case AUDIO_DEVICE: case AUDIOCTL_DEVICE: device_active(sc-dev, DVA_SYSTEM); - error = audio_ioctl(sc, cmd, addr, flag, l); - /* - * OSS audio allows mixer operations on sound devices - * so pass through if command isn't a valid audio operation - */ - if (error == EINVAL) + if (IOCGROUP(cmd) == IOCGROUP(AUDIO_MIXER_READ)) error = mixer_ioctl(sc, cmd, addr, flag, l); + else + error = audio_ioctl(sc, cmd, addr, flag, l); break; case MIXER_DEVICE: error = mixer_ioctl(sc, cmd, addr, flag, l);
CVS commit: [netbsd-5] src/sys/arch/hp700
Module Name:src Committed By: snj Date: Tue Sep 29 22:56:48 UTC 2009 Modified Files: src/sys/arch/hp700/dev [netbsd-5]: dino.c src/sys/arch/hp700/hp700 [netbsd-5]: mainbus.c src/sys/arch/hp700/include [netbsd-5]: bus.h Log Message: Pull up following revision(s) (requested by skrll in ticket #1035): sys/arch/hp700/dev/dino.c: revision 1.14 via patch sys/arch/hp700/hp700/mainbus.c: revision 1.53 sys/arch/hp700/include/bus.h: revision 1.14 Provide bus_space_mmap. Still needs implementing. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.6.4.1 src/sys/arch/hp700/dev/dino.c cvs rdiff -u -r1.45 -r1.45.6.1 src/sys/arch/hp700/hp700/mainbus.c cvs rdiff -u -r1.12 -r1.12.54.1 src/sys/arch/hp700/include/bus.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/hp700/dev/dino.c diff -u src/sys/arch/hp700/dev/dino.c:1.6 src/sys/arch/hp700/dev/dino.c:1.6.4.1 --- src/sys/arch/hp700/dev/dino.c:1.6 Thu Aug 28 08:25:46 2008 +++ src/sys/arch/hp700/dev/dino.c Tue Sep 29 22:56:48 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: dino.c,v 1.6 2008/08/28 08:25:46 skrll Exp $ */ +/* $NetBSD: dino.c,v 1.6.4.1 2009/09/29 22:56:48 snj Exp $ */ /* $OpenBSD: dino.c,v 1.5 2004/02/13 20:39:31 mickey Exp $ */ @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: dino.c,v 1.6 2008/08/28 08:25:46 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: dino.c,v 1.6.4.1 2009/09/29 22:56:48 snj Exp $); /* #include cardbus.h */ @@ -160,6 +160,8 @@ void dino_free(void *, bus_space_handle_t, bus_size_t); void dino_barrier(void *, bus_space_handle_t, bus_size_t, bus_size_t, int); void *dino_vaddr(void *, bus_space_handle_t); +paddr_t dino_mmap(void *, bus_addr_t, off_t, int, int); + u_int8_t dino_r1(void *, bus_space_handle_t, bus_size_t); u_int16_t dino_r2(void *, bus_space_handle_t, bus_size_t); u_int32_t dino_r4(void *, bus_space_handle_t, bus_size_t); @@ -568,6 +570,12 @@ return bus_space_vaddr(sc-sc_bt, h); } +paddr_t +dino_mmap(void *v, bus_addr_t addr, off_t off, int prot, int flags) +{ + return -1; +} + u_int8_t dino_r1(void *v, bus_space_handle_t h, bus_size_t o) { @@ -1399,7 +1407,7 @@ NULL, NULL, dino_unmap, dino_subregion, NULL, dino_free, - dino_barrier, dino_vaddr, + dino_barrier, dino_vaddr, dino_mmap, dino_r1,dino_r2,dino_r4,dino_r8, dino_w1,dino_w2,dino_w4,dino_w8, dino_rm_1, dino_rm_2, dino_rm_4, dino_rm_8, Index: src/sys/arch/hp700/hp700/mainbus.c diff -u src/sys/arch/hp700/hp700/mainbus.c:1.45 src/sys/arch/hp700/hp700/mainbus.c:1.45.6.1 --- src/sys/arch/hp700/hp700/mainbus.c:1.45 Fri Jun 13 09:41:44 2008 +++ src/sys/arch/hp700/hp700/mainbus.c Tue Sep 29 22:56:48 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.45 2008/06/13 09:41:44 cegger Exp $ */ +/* $NetBSD: mainbus.c,v 1.45.6.1 2009/09/29 22:56:48 snj Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.45 2008/06/13 09:41:44 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.45.6.1 2009/09/29 22:56:48 snj Exp $); #include locators.h #include opt_power_switch.h @@ -156,6 +156,7 @@ int mbus_subregion(void *, bus_space_handle_t, bus_size_t, bus_size_t, bus_space_handle_t *); void mbus_barrier(void *, bus_space_handle_t, bus_size_t, bus_size_t, int); void *mbus_vaddr(void *, bus_space_handle_t); +paddr_t mbus_mmap(void *, bus_addr_t, off_t, int, int); int mbus_dmamap_create(void *, bus_size_t, int, bus_size_t, bus_size_t, int, bus_dmamap_t *); void mbus_dmamap_destroy(void *, bus_dmamap_t); @@ -456,6 +457,13 @@ return (void*)h; } +paddr_t +mbus_mmap(void *v, bus_addr_t addr, off_t off, int prot, int flags) +{ + + return -1; +} + u_int8_t mbus_r1(void *v, bus_space_handle_t h, bus_size_t o) { @@ -810,7 +818,7 @@ NULL, mbus_map, mbus_unmap, mbus_subregion, mbus_alloc, mbus_free, - mbus_barrier, mbus_vaddr, + mbus_barrier, mbus_vaddr, mbus_mmap, mbus_r1,mbus_r2, mbus_r4, mbus_r8, mbus_w1,mbus_w2, mbus_w4, mbus_w8, mbus_rm_1, mbus_rm_2, mbus_rm_4, mbus_rm_8, Index: src/sys/arch/hp700/include/bus.h diff -u src/sys/arch/hp700/include/bus.h:1.12 src/sys/arch/hp700/include/bus.h:1.12.54.1 --- src/sys/arch/hp700/include/bus.h:1.12 Sun Mar 4 05:59:51 2007 +++ src/sys/arch/hp700/include/bus.h Tue Sep 29 22:56:48 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.12 2007/03/04 05:59:51 christos Exp $ */ +/* $NetBSD: bus.h,v 1.12.54.1 2009/09/29 22:56:48 snj Exp $ */ /* $OpenBSD: bus.h,v 1.13 2001/07/30 14:15:59 art Exp $ */ @@ -64,6 +64,7 @@ void (*hbt_barrier)(void *v, bus_space_handle_t h, bus_size_t o, bus_size_t l, int op); void *(*hbt_vaddr)(void *, bus_space_handle_t); + paddr_t (*hbt_mmap)(void *, bus_addr_t, off_t, int, int); u_int8_t (*hbt_r1)(void *, bus_space_handle_t,
CVS commit: [netbsd-5] src
Module Name:src Committed By: snj Date: Tue Sep 29 23:30:05 UTC 2009 Modified Files: src/distrib/sets/lists/base [netbsd-5]: mi src/etc/mtree [netbsd-5]: NetBSD.dist src/share/locale [netbsd-5]: Makefile.locale src/share/locale/ctype [netbsd-5]: Makefile src/share/locale/messages [netbsd-5]: Makefile src/share/locale/monetary [netbsd-5]: Makefile src/share/locale/numeric [netbsd-5]: Makefile src/share/locale/time [netbsd-5]: Makefile Log Message: Pull up following revision(s) (requested by bouyer in ticket #1037): distrib/sets/lists/base/mi: revision 1.811 etc/mtree/NetBSD.dist: revision 1.403 share/locale/Makefile.locale: revision 1.2 share/locale/ctype/Makefile: revision 1.29 share/locale/messages/Makefile: revision 1.6 share/locale/monetary/Makefile: revision 1.6 share/locale/numeric/Makefile: revision 1.5 share/locale/time/Makefile: revision 1.6 Add support for fr_*.UTF-8 locale. Setting LANG to fr_*.UTF-8 won't get the message catalog right (they're encoded in iso-8859-1), but other locale functions should work right. Proposed on tech-userlevel on 20 May 2009. To generate a diff of this commit: cvs rdiff -u -r1.780.2.10 -r1.780.2.11 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.385.2.2 -r1.385.2.3 src/etc/mtree/NetBSD.dist cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/share/locale/Makefile.locale cvs rdiff -u -r1.27.2.1 -r1.27.2.2 src/share/locale/ctype/Makefile cvs rdiff -u -r1.4.4.1 -r1.4.4.2 src/share/locale/messages/Makefile cvs rdiff -u -r1.4.4.1 -r1.4.4.2 src/share/locale/monetary/Makefile cvs rdiff -u -r1.3.4.1 -r1.3.4.2 src/share/locale/numeric/Makefile cvs rdiff -u -r1.4.4.1 -r1.4.4.2 src/share/locale/time/Makefile 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/base/mi diff -u src/distrib/sets/lists/base/mi:1.780.2.10 src/distrib/sets/lists/base/mi:1.780.2.11 --- src/distrib/sets/lists/base/mi:1.780.2.10 Thu Sep 17 04:24:26 2009 +++ src/distrib/sets/lists/base/mi Tue Sep 29 23:30:04 2009 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.780.2.10 2009/09/17 04:24:26 snj Exp $ +# $NetBSD: mi,v 1.780.2.11 2009/09/29 23:30:04 snj Exp $ # # Note: Don't delete entries from here - mark them as obsolete instead, # unless otherwise stated below. @@ -2889,6 +2889,13 @@ ./usr/share/locale/fr_BE.ISO8859-15/LC_MONETARY base-locale-fr nls ./usr/share/locale/fr_BE.ISO8859-15/LC_NUMERIC base-locale-fr nls ./usr/share/locale/fr_BE.ISO8859-15/LC_TIME base-locale-fr nls +./usr/share/locale/fr_BE.UTF-8 base-locale-fr +./usr/share/locale/fr_BE.UTF-8/LC_CTYPE base-locale-fr nls +./usr/share/locale/fr_BE.UTF-8/LC_MESSAGES base-locale-fr +./usr/share/locale/fr_BE.UTF-8/LC_MESSAGES/SYS_LC_MESSAGES base-locale-fr nls +./usr/share/locale/fr_BE.UTF-8/LC_MONETARY base-locale-fr nls +./usr/share/locale/fr_BE.UTF-8/LC_NUMERIC base-locale-fr nls +./usr/share/locale/fr_BE.UTF-8/LC_TIME base-locale-fr nls ./usr/share/locale/fr_CA.ISO8859-1 base-locale-fr ./usr/share/locale/fr_CA.ISO8859-1/LC_CTYPE base-locale-fr nls ./usr/share/locale/fr_CA.ISO8859-1/LC_MESSAGES base-locale-fr @@ -2903,6 +2910,13 @@ ./usr/share/locale/fr_CA.ISO8859-15/LC_MONETARY base-locale-fr nls ./usr/share/locale/fr_CA.ISO8859-15/LC_NUMERIC base-locale-fr nls ./usr/share/locale/fr_CA.ISO8859-15/LC_TIME base-locale-fr nls +./usr/share/locale/fr_CA.UTF-8 base-locale-fr +./usr/share/locale/fr_CA.UTF-8/LC_CTYPE base-locale-fr nls +./usr/share/locale/fr_CA.UTF-8/LC_MESSAGES base-locale-fr +./usr/share/locale/fr_CA.UTF-8/LC_MESSAGES/SYS_LC_MESSAGES base-locale-fr nls +./usr/share/locale/fr_CA.UTF-8/LC_MONETARY base-locale-fr nls +./usr/share/locale/fr_CA.UTF-8/LC_NUMERIC base-locale-fr nls +./usr/share/locale/fr_CA.UTF-8/LC_TIME base-locale-fr nls ./usr/share/locale/fr_CH.ISO8859-1 base-locale-fr ./usr/share/locale/fr_CH.ISO8859-1/LC_CTYPE base-locale-fr nls ./usr/share/locale/fr_CH.ISO8859-1/LC_MESSAGES base-locale-fr @@ -2917,6 +2931,13 @@ ./usr/share/locale/fr_CH.ISO8859-15/LC_MONETARY base-locale-fr nls ./usr/share/locale/fr_CH.ISO8859-15/LC_NUMERIC base-locale-fr nls ./usr/share/locale/fr_CH.ISO8859-15/LC_TIME base-locale-fr nls +./usr/share/locale/fr_CH.UTF-8 base-locale-fr +./usr/share/locale/fr_CH.UTF-8/LC_CTYPE base-locale-fr nls +./usr/share/locale/fr_CH.UTF-8/LC_MESSAGES base-locale-fr +./usr/share/locale/fr_CH.UTF-8/LC_MESSAGES/SYS_LC_MESSAGES base-locale-fr nls +./usr/share/locale/fr_CH.UTF-8/LC_MONETARY base-locale-fr nls +./usr/share/locale/fr_CH.UTF-8/LC_NUMERIC base-locale-fr nls +./usr/share/locale/fr_CH.UTF-8/LC_TIME base-locale-fr nls ./usr/share/locale/fr_FR.ISO8859-1 base-locale-fr ./usr/share/locale/fr_FR.ISO8859-1/LC_CTYPE base-locale-fr nls ./usr/share/locale/fr_FR.ISO8859-1/LC_MESSAGES base-locale-fr @@ -2931,6 +2952,13 @@
CVS commit: [netbsd-5] src/sys/arch/x86
Module Name:src Committed By: snj Date: Tue Sep 29 23:53:14 UTC 2009 Modified Files: src/sys/arch/x86/include [netbsd-5]: bus.h isa_machdep.h src/sys/arch/x86/x86 [netbsd-5]: bus_space.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1040): sys/arch/x86/include/bus.h: revision 1.18 sys/arch/x86/include/isa_machdep.h: revision 1.7 sys/arch/x86/x86/bus_space.c: revision 1.21 Apply patch proposed on port-amd64/port-i386, allowing to use a 64bit bus_addr_t on i386PAE kernels: change bus_addr_t to be a paddr_t (so its size follows paddr_t depending on options PAE) remplace bus_addr_t with vaddr_t where the value is used as a virtual address. Difference with the proposed patch: cast to uintmax_t and use %jx in printf() as suggested by Joerg. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.16.10.1 src/sys/arch/x86/include/bus.h cvs rdiff -u -r1.6 -r1.6.6.1 src/sys/arch/x86/include/isa_machdep.h cvs rdiff -u -r1.20.4.1 -r1.20.4.2 src/sys/arch/x86/x86/bus_space.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/include/bus.h diff -u src/sys/arch/x86/include/bus.h:1.16 src/sys/arch/x86/include/bus.h:1.16.10.1 --- src/sys/arch/x86/include/bus.h:1.16 Mon Apr 28 20:23:40 2008 +++ src/sys/arch/x86/include/bus.h Tue Sep 29 23:53:14 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.16 2008/04/28 20:23:40 martin Exp $ */ +/* $NetBSD: bus.h,v 1.16.10.1 2009/09/29 23:53:14 snj Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -77,11 +77,11 @@ /* * Bus address and size types */ -typedef u_long bus_addr_t; -typedef u_long bus_size_t; +typedef paddr_t bus_addr_t; +typedef paddr_t bus_size_t; typedef int bus_space_tag_t; -typedef u_long bus_space_handle_t; +typedef vaddr_t bus_space_handle_t; int _x86_memio_map(bus_space_tag_t t, bus_addr_t addr, bus_size_t size, int flags, bus_space_handle_t *bshp); Index: src/sys/arch/x86/include/isa_machdep.h diff -u src/sys/arch/x86/include/isa_machdep.h:1.6 src/sys/arch/x86/include/isa_machdep.h:1.6.6.1 --- src/sys/arch/x86/include/isa_machdep.h:1.6 Fri Jun 27 11:03:13 2008 +++ src/sys/arch/x86/include/isa_machdep.h Tue Sep 29 23:53:14 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: isa_machdep.h,v 1.6 2008/06/27 11:03:13 cegger Exp $ */ +/* $NetBSD: isa_machdep.h,v 1.6.6.1 2009/09/29 23:53:14 snj Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -202,19 +202,19 @@ * function definitions, invoked through the softc. */ -extern u_long atdevbase; /* kernel virtual address of hole */ +extern vaddr_t atdevbase; /* kernel virtual address of hole */ /* * Given a kernel virtual address for some location * in the hole I/O space, return a physical address. */ -#define ISA_PHYSADDR(v) ((void *) ((u_long)(v) - atdevbase + IOM_BEGIN)) +#define ISA_PHYSADDR(v) ((bus_addr_t)(v) - atdevbase + IOM_BEGIN) /* * Given a physical address in the hole, * return a kernel virtual address. */ -#define ISA_HOLE_VADDR(p) ((void *) ((u_long)(p) - IOM_BEGIN + atdevbase)) +#define ISA_HOLE_VADDR(p) ((void *) ((vaddr_t)(p) - IOM_BEGIN + atdevbase)) /* Index: src/sys/arch/x86/x86/bus_space.c diff -u src/sys/arch/x86/x86/bus_space.c:1.20.4.1 src/sys/arch/x86/x86/bus_space.c:1.20.4.2 --- src/sys/arch/x86/x86/bus_space.c:1.20.4.1 Wed Sep 16 03:45:45 2009 +++ src/sys/arch/x86/x86/bus_space.c Tue Sep 29 23:53:14 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_space.c,v 1.20.4.1 2009/09/16 03:45:45 snj Exp $ */ +/* $NetBSD: bus_space.c,v 1.20.4.2 2009/09/29 23:53:14 snj Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: bus_space.c,v 1.20.4.1 2009/09/16 03:45:45 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: bus_space.c,v 1.20.4.2 2009/09/29 23:53:14 snj Exp $); #include sys/param.h #include sys/systm.h @@ -199,8 +199,8 @@ if (error) { if (extent_free(ex, bpa, size, EX_NOWAIT | (ioport_malloc_safe ? EX_MALLOCOK : 0))) { - printf(x86_memio_map: pa 0x%lx, size 0x%lx\n, - bpa, size); + printf(x86_memio_map: pa 0x%jx, size 0x%jx\n, + (uintmax_t)bpa, (uintmax_t)size); printf(x86_memio_map: can't free region\n); } } @@ -286,8 +286,8 @@ if (error) { if (extent_free(iomem_ex, bpa, size, EX_NOWAIT | (ioport_malloc_safe ? EX_MALLOCOK : 0))) { - printf(x86_memio_alloc: pa 0x%lx, size 0x%lx\n, - bpa, size); + printf(x86_memio_alloc: pa 0x%jx, size 0x%jx\n, + (uintmax_t)bpa, (uintmax_t)size); printf(x86_memio_alloc: can't free region\n); } } @@ -464,8 +464,9 @@ ok: if (extent_free(ex, bpa, size, EX_NOWAIT | (ioport_malloc_safe ? EX_MALLOCOK : 0))) { - printf(x86_memio_unmap: %s 0x%lx, size 0x%lx\n, - (t == X86_BUS_SPACE_IO) ? port : pa, bpa,
CVS commit: [netbsd-5] src/sys/arch/x86/include
Module Name:src Committed By: snj Date: Tue Sep 29 23:54:36 UTC 2009 Modified Files: src/sys/arch/x86/include [netbsd-5]: bus.h Log Message: Pull up following revision(s) (requested by bouyer in ticket #1040): sys/arch/x86/include/bus.h: revision 1.19 Change bus_size_t from paddr_t to size_t. It doens't make sense to have a 64bit bus_size_t on i386 as the address space is 32bits anyway. With a 64bit bus_size_t we need a different bus_space.S for PAE and non-PAE. To generate a diff of this commit: cvs rdiff -u -r1.16.10.1 -r1.16.10.2 src/sys/arch/x86/include/bus.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/x86/include/bus.h diff -u src/sys/arch/x86/include/bus.h:1.16.10.1 src/sys/arch/x86/include/bus.h:1.16.10.2 --- src/sys/arch/x86/include/bus.h:1.16.10.1 Tue Sep 29 23:53:14 2009 +++ src/sys/arch/x86/include/bus.h Tue Sep 29 23:54:36 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.16.10.1 2009/09/29 23:53:14 snj Exp $ */ +/* $NetBSD: bus.h,v 1.16.10.2 2009/09/29 23:54:36 snj Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -78,7 +78,7 @@ * Bus address and size types */ typedef paddr_t bus_addr_t; -typedef paddr_t bus_size_t; +typedef size_t bus_size_t; typedef int bus_space_tag_t; typedef vaddr_t bus_space_handle_t;
CVS commit: [netbsd-5] src/sys/dev/pci
Module Name:src Committed By: snj Date: Tue Sep 29 23:57:41 UTC 2009 Modified Files: src/sys/dev/pci [netbsd-5]: if_iwi.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1040): sys/dev/pci/if_iwi.c: revision 1.79 make iwi_alloc_tx_ring() prototype match function declaration (shows up when bus_addr_t != bus_size_t). Fix cast for 64bit paddr_t on i386. To generate a diff of this commit: cvs rdiff -u -r1.74.2.3 -r1.74.2.4 src/sys/dev/pci/if_iwi.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/pci/if_iwi.c diff -u src/sys/dev/pci/if_iwi.c:1.74.2.3 src/sys/dev/pci/if_iwi.c:1.74.2.4 --- src/sys/dev/pci/if_iwi.c:1.74.2.3 Wed Jan 14 17:57:39 2009 +++ src/sys/dev/pci/if_iwi.c Tue Sep 29 23:57:41 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_iwi.c,v 1.74.2.3 2009/01/14 17:57:39 snj Exp $ */ +/* $NetBSD: if_iwi.c,v 1.74.2.4 2009/09/29 23:57:41 snj Exp $ */ /*- * Copyright (c) 2004, 2005 @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_iwi.c,v 1.74.2.3 2009/01/14 17:57:39 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: if_iwi.c,v 1.74.2.4 2009/09/29 23:57:41 snj Exp $); /*- * Intel(R) PRO/Wireless 2200BG/2225BG/2915ABG driver @@ -102,7 +102,7 @@ static void iwi_reset_cmd_ring(struct iwi_softc *, struct iwi_cmd_ring *); static void iwi_free_cmd_ring(struct iwi_softc *, struct iwi_cmd_ring *); static int iwi_alloc_tx_ring(struct iwi_softc *, struct iwi_tx_ring *, -int, bus_addr_t, bus_size_t); +int, bus_size_t, bus_size_t); static void iwi_reset_tx_ring(struct iwi_softc *, struct iwi_tx_ring *); static void iwi_free_tx_ring(struct iwi_softc *, struct iwi_tx_ring *); static struct mbuf * @@ -2018,7 +2018,7 @@ int ntries, nsegs, error; int sn; - nsegs = atop((char*)fw+size-1) - atop((char *)fw) + 1; + nsegs = atop((vaddr_t)fw+size-1) - atop((vaddr_t)fw) + 1; /* Create a DMA map for the firmware image */ error = bus_dmamap_create(sc-sc_dmat, size, nsegs, size, 0,
CVS commit: [netbsd-5] src/sys/dev/isa
Module Name:src Committed By: snj Date: Tue Sep 29 23:59:45 UTC 2009 Modified Files: src/sys/dev/isa [netbsd-5]: if_tr_isa.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1040): sys/dev/isa/if_tr_isa.c: revision 1.19 Fix printf format after bus_size_t change To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.18.10.1 src/sys/dev/isa/if_tr_isa.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/if_tr_isa.c diff -u src/sys/dev/isa/if_tr_isa.c:1.18 src/sys/dev/isa/if_tr_isa.c:1.18.10.1 --- src/sys/dev/isa/if_tr_isa.c:1.18 Mon Apr 28 20:23:52 2008 +++ src/sys/dev/isa/if_tr_isa.c Tue Sep 29 23:59:45 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_tr_isa.c,v 1.18 2008/04/28 20:23:52 martin Exp $ */ +/* $NetBSD: if_tr_isa.c,v 1.18.10.1 2009/09/29 23:59:45 snj Exp $ */ /* XXXJRT changes isa_attach_args too early!! */ @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_tr_isa.c,v 1.18 2008/04/28 20:23:52 martin Exp $); +__KERNEL_RCSID(0, $NetBSD: if_tr_isa.c,v 1.18.10.1 2009/09/29 23:59:45 snj Exp $); #undef TRISADEBUG @@ -107,7 +107,7 @@ mmio = ((s 0xfc) 11) + TR_MMIO_OFFSET; if (bus_space_map(ia-ia_memt, mmio, TR_MMIO_SIZE, 0, mmioh)) { printf(tr_isa_map_io: can't map MMIO region 0x%05lx/%d\n, - mmio, TR_MMIO_SIZE); + (u_long)mmio, TR_MMIO_SIZE); bus_space_unmap(ia-ia_iot, *pioh, ia-ia_io[0].ir_size); return 1; }
CVS commit: [netbsd-5] src/etc/etc.i386
Module Name:src Committed By: snj Date: Wed Sep 30 00:05:07 UTC 2009 Modified Files: src/etc/etc.i386 [netbsd-5]: Makefile.inc Log Message: Pull up following revision(s) (requested by bouyer in ticket #1040): etc/etc.i386/Makefile.inc: revision 1.60 Add XEN3PAE_DOM0 to the list of kernels to build for a release. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.59.2.1 src/etc/etc.i386/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/etc.i386/Makefile.inc diff -u src/etc/etc.i386/Makefile.inc:1.59 src/etc/etc.i386/Makefile.inc:1.59.2.1 --- src/etc/etc.i386/Makefile.inc:1.59 Sun May 11 12:31:45 2008 +++ src/etc/etc.i386/Makefile.inc Wed Sep 30 00:05:07 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.59 2008/05/11 12:31:45 chris Exp $ +# $NetBSD: Makefile.inc,v 1.59.2.1 2009/09/30 00:05:07 snj Exp $ # # etc.i386/Makefile.inc -- i386-specific etc Makefile targets # @@ -11,6 +11,7 @@ KERNEL_SETS+= XEN2_DOMU KERNEL_SETS+= XEN3_DOM0 KERNEL_SETS+= XEN3_DOMU +KERNEL_SETS+= XEN3PAE_DOM0 KERNEL_SETS+= XEN3PAE_DOMU # KERNEL_SETS+= GENERIC_TINY # KERNEL_SETS+= GENERIC_PS2TINY
CVS commit: [netbsd-5] src/sys/arch/x86/x86
Module Name:src Committed By: snj Date: Wed Sep 30 00:06:07 UTC 2009 Modified Files: src/sys/arch/x86/x86 [netbsd-5]: bus_space.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1040): sys/arch/x86/x86/bus_space.c: revision 1.22 physical addresses may not fit in u_long, use paddr_t To generate a diff of this commit: cvs rdiff -u -r1.20.4.2 -r1.20.4.3 src/sys/arch/x86/x86/bus_space.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/bus_space.c diff -u src/sys/arch/x86/x86/bus_space.c:1.20.4.2 src/sys/arch/x86/x86/bus_space.c:1.20.4.3 --- src/sys/arch/x86/x86/bus_space.c:1.20.4.2 Tue Sep 29 23:53:14 2009 +++ src/sys/arch/x86/x86/bus_space.c Wed Sep 30 00:06:07 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_space.c,v 1.20.4.2 2009/09/29 23:53:14 snj Exp $ */ +/* $NetBSD: bus_space.c,v 1.20.4.3 2009/09/30 00:06:07 snj Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: bus_space.c,v 1.20.4.2 2009/09/29 23:53:14 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: bus_space.c,v 1.20.4.3 2009/09/30 00:06:07 snj Exp $); #include sys/param.h #include sys/systm.h @@ -301,7 +301,7 @@ x86_mem_add_mapping(bus_addr_t bpa, bus_size_t size, int cacheable, bus_space_handle_t *bshp) { - u_long pa, endpa; + paddr_t pa, endpa; vaddr_t va, sva; pt_entry_t *pte, xpte;
CVS commit: [netbsd-5] src/sys/arch
Module Name:src Committed By: snj Date: Wed Sep 30 00:08:03 UTC 2009 Modified Files: src/sys/arch/i386/i386 [netbsd-5]: db_memrw.c src/sys/arch/i386/include [netbsd-5]: param.h src/sys/arch/xen/include [netbsd-5]: xenpmap.h src/sys/arch/xen/xen [netbsd-5]: xenevt.c Added Files: src/sys/arch/i386/conf [netbsd-5]: XEN3PAE_DOM0 Log Message: Pull up following revision(s) (requested by bouyer in ticket #1040): sys/arch/i386/include/param.h: revision 1.71 sys/arch/i386/i386/db_memrw.c: revision 1.25 sys/arch/xen/include/xenpmap.h: revision 1.22 sys/arch/xen/xen/xenevt.c: revision 1.31 More i386PAE fixes: - x86_round_page, x86_trunc_page, x86_btop and x86_ptob macros are used with physical addresses; cast to paddr_t instead of u_long. Issue pointed out by jym@ - machine_to_phys_mapping[] is a long. This is fine as it holds page frame numbers (and this fits in a 32bit int as physical addresses are only 36bits), but cast to paddr_t before PAGE_SHIFT - xen_start_info.store_mfn is a long; cast it to paddr_t before PAGE_SHIFT. should fix issue pointed out by cegger@ To generate a diff of this commit: cvs rdiff -u -r0 -r1.1.8.2 src/sys/arch/i386/conf/XEN3PAE_DOM0 cvs rdiff -u -r1.24 -r1.24.10.1 src/sys/arch/i386/i386/db_memrw.c cvs rdiff -u -r1.67.30.3 -r1.67.30.4 src/sys/arch/i386/include/param.h cvs rdiff -u -r1.21 -r1.21.4.1 src/sys/arch/xen/include/xenpmap.h cvs rdiff -u -r1.29.4.1 -r1.29.4.2 src/sys/arch/xen/xen/xenevt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/i386/db_memrw.c diff -u src/sys/arch/i386/i386/db_memrw.c:1.24 src/sys/arch/i386/i386/db_memrw.c:1.24.10.1 --- src/sys/arch/i386/i386/db_memrw.c:1.24 Mon Apr 28 20:23:24 2008 +++ src/sys/arch/i386/i386/db_memrw.c Wed Sep 30 00:08:03 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: db_memrw.c,v 1.24 2008/04/28 20:23:24 martin Exp $ */ +/* $NetBSD: db_memrw.c,v 1.24.10.1 2009/09/30 00:08:03 snj Exp $ */ /*- * Copyright (c) 1996, 2000 The NetBSD Foundation, Inc. @@ -49,7 +49,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: db_memrw.c,v 1.24 2008/04/28 20:23:24 martin Exp $); +__KERNEL_RCSID(0, $NetBSD: db_memrw.c,v 1.24.10.1 2009/09/30 00:08:03 snj Exp $); #include opt_xen.h @@ -125,7 +125,7 @@ if (oldpte PG_PS) pgva = (vaddr_t)dst PG_LGFRAME; else - pgva = x86_trunc_page(dst); + pgva = x86_trunc_page((vaddr_t)dst); /* * Compute number of bytes that can be written Index: src/sys/arch/i386/include/param.h diff -u src/sys/arch/i386/include/param.h:1.67.30.3 src/sys/arch/i386/include/param.h:1.67.30.4 --- src/sys/arch/i386/include/param.h:1.67.30.3 Mon Feb 16 03:06:21 2009 +++ src/sys/arch/i386/include/param.h Wed Sep 30 00:08:03 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.67.30.3 2009/02/16 03:06:21 snj Exp $ */ +/* $NetBSD: param.h,v 1.67.30.4 2009/09/30 00:08:03 snj Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -161,9 +161,9 @@ #define x86_trunc_pdr(x) ((unsigned long)(x) ~(NBPD_L2 - 1)) #define x86_btod(x) ((unsigned long)(x) L2_SHIFT) #define x86_dtob(x) ((unsigned long)(x) L2_SHIFT) -#define x86_round_page(x) unsigned long)(x)) + PGOFSET) ~PGOFSET) -#define x86_trunc_page(x) ((unsigned long)(x) ~PGOFSET) -#define x86_btop(x) ((unsigned long)(x) PGSHIFT) -#define x86_ptob(x) ((unsigned long)(x) PGSHIFT) +#define x86_round_page(x) paddr_t)(x)) + PGOFSET) ~PGOFSET) +#define x86_trunc_page(x) ((paddr_t)(x) ~PGOFSET) +#define x86_btop(x) ((paddr_t)(x) PGSHIFT) +#define x86_ptob(x) ((paddr_t)(x) PGSHIFT) #endif /* _I386_PARAM_H_ */ Index: src/sys/arch/xen/include/xenpmap.h diff -u src/sys/arch/xen/include/xenpmap.h:1.21 src/sys/arch/xen/include/xenpmap.h:1.21.4.1 --- src/sys/arch/xen/include/xenpmap.h:1.21 Fri Oct 24 22:06:06 2008 +++ src/sys/arch/xen/include/xenpmap.h Wed Sep 30 00:08:03 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: xenpmap.h,v 1.21 2008/10/24 22:06:06 jym Exp $ */ +/* $NetBSD: xenpmap.h,v 1.21.4.1 2009/09/30 00:08:03 snj Exp $ */ /* * @@ -71,15 +71,17 @@ static __inline paddr_t xpmap_mtop(paddr_t mpa) { - return ((machine_to_phys_mapping[mpa PAGE_SHIFT] PAGE_SHIFT) + - XPMAP_OFFSET) | (mpa ~PG_FRAME); + return ( + ((paddr_t)machine_to_phys_mapping[mpa PAGE_SHIFT] PAGE_SHIFT) + + XPMAP_OFFSET) | (mpa ~PG_FRAME); } static __inline paddr_t xpmap_mtop_masked(paddr_t mpa) { - return ((machine_to_phys_mapping[mpa PAGE_SHIFT] PAGE_SHIFT) + - XPMAP_OFFSET); + return ( + ((paddr_t)machine_to_phys_mapping[mpa PAGE_SHIFT] PAGE_SHIFT) + + XPMAP_OFFSET); } static __inline paddr_t Index: src/sys/arch/xen/xen/xenevt.c diff -u src/sys/arch/xen/xen/xenevt.c:1.29.4.1 src/sys/arch/xen/xen/xenevt.c:1.29.4.2 --- src/sys/arch/xen/xen/xenevt.c:1.29.4.1 Sat Apr 4 23:36:27 2009 +++
CVS commit: [netbsd-5] src/sys/dev/isa
Module Name:src Committed By: snj Date: Wed Sep 30 00:01:19 UTC 2009 Modified Files: src/sys/dev/isa [netbsd-5]: if_lc_isa.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1040): sys/dev/isa/if_lc_isa.c: revision 1.30 sys/dev/pci/pccbb.c: revision 1.183 Fix bus_addr_t/bus_size_t confusion To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.29.14.1 src/sys/dev/isa/if_lc_isa.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/if_lc_isa.c diff -u src/sys/dev/isa/if_lc_isa.c:1.29 src/sys/dev/isa/if_lc_isa.c:1.29.14.1 --- src/sys/dev/isa/if_lc_isa.c:1.29 Tue Apr 8 20:08:50 2008 +++ src/sys/dev/isa/if_lc_isa.c Wed Sep 30 00:01:19 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_lc_isa.c,v 1.29 2008/04/08 20:08:50 cegger Exp $ */ +/* $NetBSD: if_lc_isa.c,v 1.29.14.1 2009/09/30 00:01:19 snj Exp $ */ /*- * Copyright (c) 1994, 1995, 1997 Matt Thomas m...@3am-software.com @@ -33,7 +33,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_lc_isa.c,v 1.29 2008/04/08 20:08:50 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: if_lc_isa.c,v 1.29.14.1 2009/09/30 00:01:19 snj Exp $); #include sys/param.h #include sys/systm.h @@ -76,7 +76,7 @@ int attach; { bus_addr_t maddr; - bus_addr_t msiz; + bus_size_t msiz; int rv = 0, irq; if (ia-ia_nio 1)
CVS commit: [netbsd-5] src/sys/dev/pci
Module Name:src Committed By: snj Date: Wed Sep 30 00:00:50 UTC 2009 Modified Files: src/sys/dev/pci [netbsd-5]: pccbb.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1040): sys/dev/isa/if_lc_isa.c: revision 1.30 sys/dev/pci/pccbb.c: revision 1.183 Fix bus_addr_t/bus_size_t confusion To generate a diff of this commit: cvs rdiff -u -r1.180 -r1.180.4.1 src/sys/dev/pci/pccbb.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/pci/pccbb.c diff -u src/sys/dev/pci/pccbb.c:1.180 src/sys/dev/pci/pccbb.c:1.180.4.1 --- src/sys/dev/pci/pccbb.c:1.180 Sat Oct 25 18:46:38 2008 +++ src/sys/dev/pci/pccbb.c Wed Sep 30 00:00:49 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pccbb.c,v 1.180 2008/10/25 18:46:38 christos Exp $ */ +/* $NetBSD: pccbb.c,v 1.180.4.1 2009/09/30 00:00:49 snj Exp $ */ /* * Copyright (c) 1998, 1999 and 2000 @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pccbb.c,v 1.180 2008/10/25 18:46:38 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: pccbb.c,v 1.180.4.1 2009/09/30 00:00:49 snj Exp $); /* #define CBB_DEBUG @@ -150,7 +150,7 @@ STATIC void pccbb_pcmcia_mem_free(pcmcia_chipset_handle_t, struct pcmcia_mem_handle *); STATIC int pccbb_pcmcia_mem_map(pcmcia_chipset_handle_t, int, bus_addr_t, -bus_size_t, struct pcmcia_mem_handle *, bus_addr_t *, int *); +bus_size_t, struct pcmcia_mem_handle *, bus_size_t *, int *); STATIC void pccbb_pcmcia_mem_unmap(pcmcia_chipset_handle_t, int); STATIC int pccbb_pcmcia_io_alloc(pcmcia_chipset_handle_t, bus_addr_t, bus_size_t, bus_size_t, struct pcmcia_io_handle *); @@ -2683,7 +2683,7 @@ STATIC int pccbb_pcmcia_mem_map(pcmcia_chipset_handle_t pch, int kind, bus_addr_t card_addr, bus_size_t size, struct pcmcia_mem_handle *pcmhp, -bus_addr_t *offsetp, int *windowp) +bus_size_t *offsetp, int *windowp) { struct pccbb_softc *sc = (struct pccbb_softc *)pch; struct pcic_handle *ph = sc-sc_pcmcia_h;
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: snj Date: Wed Sep 30 00:30:35 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Tickets 1016, 1035, 1037, and 1040. To generate a diff of this commit: cvs rdiff -u -r1.1.2.78 -r1.1.2.79 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.78 src/doc/CHANGES-5.1:1.1.2.79 --- src/doc/CHANGES-5.1:1.1.2.78 Mon Sep 28 18:45:31 2009 +++ src/doc/CHANGES-5.1 Wed Sep 30 00:30:34 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.78 2009/09/28 18:45:31 snj Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.79 2009/09/30 00:30:34 snj Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -13693,3 +13693,53 @@ Update xterm to 248. [mrg, ticket #1034] +sys/dev/audio.c 1.246, 1.247 + + OSS audio allows mixer operations on the dsp device. NetBSD would + return EINVAL in these circumstances. This can break audio in apps + running under Linux emulation. Select whether to call + mixer_ioctl() or audio_ioctl() based on whether the command smells + like a mixer ioctl or not. + [sborrill, ticket #1016] + +sys/arch/hp700/dev/dino.c 1.14 via patch +sys/arch/hp700/hp700/mainbus.c 1.53 +sys/arch/hp700/include/bus.h 1.14 + + Provide bus_space_mmap. Still needs implementing. + [skrll, ticket #1035] + +distrib/sets/lists/base/mi 1.811 +etc/mtree/NetBSD.dist1.403 +share/locale/Makefile.locale 1.2 +share/locale/ctype/Makefile 1.29 +share/locale/messages/Makefile 1.6 +share/locale/monetary/Makefile 1.6 +share/locale/numeric/Makefile 1.5 +share/locale/time/Makefile 1.6 + + Add support for fr_*.UTF-8 locale. Setting LANG to fr_*.UTF-8 + won't get the message catalog right (they're encoded in + iso-8859-1), but other locale functions should work right. + [bouyer, ticket #1037] + +etc/etc.i386/Makefile.in 1.60 +sys/dev/isa/if_lc_isa.c1.30 +sys/dev/isa/if_tr_isa.c1.19 +sys/dev/pci/if_dge.c1.23 +sys/dev/pci/if_iwi.c1.79 +sys/dev/pci/pccbb.c1.183 +sys/arch/i386/conf/XEN3PAE_DOM0 1.1 +sys/arch/i386/i386/db_memrw.c 1.25 +sys/arch/i386/include/param.h 1.71 +sys/arch/xen/include/xenpmap.h 1.22 +sys/arch/xen/xen/xenevt.c 1.31 +sys/arch/x86/include/bus.h 1.18, 1.19 +sys/arch/x86/include/isa_machdep.h 1.7 +sys/arch/x86/x86/bus_space.c 1.21, 1.22 +sys/arch/x86/x86/ioapic.c 1.39 +sys/arch/x86/x86/mpbios.c 1.53 + + Add i386PAE support to Xen3 dom0. + [bouyer, ticket #1040] +
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: snj Date: Mon Sep 28 18:45:31 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Fix typo in ticket 1027 entry: domU - dom0. To generate a diff of this commit: cvs rdiff -u -r1.1.2.77 -r1.1.2.78 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.77 src/doc/CHANGES-5.1:1.1.2.78 --- src/doc/CHANGES-5.1:1.1.2.77 Mon Sep 28 02:17:23 2009 +++ src/doc/CHANGES-5.1 Mon Sep 28 18:45:31 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.77 2009/09/28 02:17:23 snj Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.78 2009/09/28 18:45:31 snj Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -13583,7 +13583,7 @@ Write a feature-rx-notify to the xenstore, which is used by recent linux dom0 kernels. This reduces packet loss when using a NetBSD domU on such linux dom0. - This entry is ignored by NetBSD and older linux domUs. + This entry is ignored by NetBSD and older linux dom0s. [bouyer, ticket #1027] sys/kern/kern_turnstile.c 1.25 via patch
CVS commit: [netbsd-5] src/sys
Module Name:src Committed By: snj Date: Mon Sep 28 00:13:02 UTC 2009 Modified Files: src/sys/conf [netbsd-5]: files src/sys/dev/ata [netbsd-5]: files.ata Added Files: src/sys/dev/ata [netbsd-5]: satafis_subr.c satafisreg.h satafisvar.h Log Message: Pull up following revision(s) (requested by jakllsch in ticket #1023): sys/conf/files: revision 1.947 sys/dev/ata/files.ata: revision 1.21 sys/dev/ata/satafis_subr.c: revision 1.1 sys/dev/ata/satafisreg.h: revision 1.1 sys/dev/ata/satafisvar.h: revision 1.1 ahcisata(4) and siisata(4) use similar SATA FIS functions, share them. To generate a diff of this commit: cvs rdiff -u -r1.924.4.2 -r1.924.4.3 src/sys/conf/files cvs rdiff -u -r1.20 -r1.20.4.1 src/sys/dev/ata/files.ata cvs rdiff -u -r0 -r1.3.2.2 src/sys/dev/ata/satafis_subr.c cvs rdiff -u -r0 -r1.1.4.2 src/sys/dev/ata/satafisreg.h cvs rdiff -u -r0 -r1.2.2.2 src/sys/dev/ata/satafisvar.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/conf/files diff -u src/sys/conf/files:1.924.4.2 src/sys/conf/files:1.924.4.3 --- src/sys/conf/files:1.924.4.2 Fri Aug 7 06:43:27 2009 +++ src/sys/conf/files Mon Sep 28 00:13:02 2009 @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.924.4.2 2009/08/07 06:43:27 snj Exp $ +# $NetBSD: files,v 1.924.4.3 2009/09/28 00:13:02 snj Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 @@ -269,6 +269,7 @@ define videobus { } define ata {[channel = -1]} define sata +define sata_fis define scsi_core define scsi {[channel = -1]}: scsi_core define ata_hl {[drive = -1]} Index: src/sys/dev/ata/files.ata diff -u src/sys/dev/ata/files.ata:1.20 src/sys/dev/ata/files.ata:1.20.4.1 --- src/sys/dev/ata/files.ata:1.20 Tue Sep 16 11:45:30 2008 +++ src/sys/dev/ata/files.ata Mon Sep 28 00:13:02 2009 @@ -1,4 +1,4 @@ -# $NetBSD: files.ata,v 1.20 2008/09/16 11:45:30 tron Exp $ +# $NetBSD: files.ata,v 1.20.4.1 2009/09/28 00:13:02 snj Exp $ # # Config file and device description for machine-independent devices # which attach to ATA busses. Included by ports that need it. Ports @@ -31,3 +31,6 @@ # Common SATA subroutines file dev/ata/sata_subr.c sata needs-flag + +# Common SATA FIS subroutines +file dev/ata/satafis_subr.c sata_fis Added files: Index: src/sys/dev/ata/satafis_subr.c diff -u /dev/null src/sys/dev/ata/satafis_subr.c:1.3.2.2 --- /dev/null Mon Sep 28 00:13:02 2009 +++ src/sys/dev/ata/satafis_subr.c Mon Sep 28 00:13:02 2009 @@ -0,0 +1,151 @@ +/* $NetBSD: satafis_subr.c,v 1.3.2.2 2009/09/28 00:13:02 snj Exp $ */ + +/*- + * Copyright (c) 2009 Jonathan A. Kollasch. + * All rights reserved. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + */ + +/* + * Copyright (c) 2006 Manuel Bouyer. + * + * 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. All advertising materials mentioning features or use of this software + *must display the following acknowledgement: + * This product includes software developed by Manuel Bouyer. + * 4. The name of the author may not be used to endorse or promote products + *derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
CVS commit: [netbsd-5] src/sys/dev
Module Name:src Committed By: snj Date: Mon Sep 28 00:17:28 UTC 2009 Modified Files: src/sys/dev/ic [netbsd-5]: siisata.c siisatareg.h siisatavar.h src/sys/dev/pci [netbsd-5]: files.pci siisata_pci.c Log Message: Pull up following revision(s) (requested by jakllsch in ticket #1023): sys/dev/ic/siisata.c: revision 1.3 sys/dev/ic/siisatareg.h: revision 1.3 sys/dev/ic/siisatavar.h: revision 1.3 sys/dev/pci/files.pci: revision 1.315 sys/dev/pci/siisata_pci.c: revision 1.3 A few changes for siisata(4): - Support detachment. From KIYOHARA Takashi. - Add PCI detachment functionality (albeit not very interesting when the bus can not yet be rescanned). - Rework interrupt handlers to reduce near-duplicate code. Borrowed from ahcisata(4). - Attempt to make polled I/O work. Untested. - Fix formatting of some messages. - For always-polled commands, disable interrupt at slot level rather than port level. - Instead of busy-waiting indefinitely for completion of some commands move on after 31 seconds. Use cv_timedwait(9) instead of DELAY(9). - Use abstracted SATA FIS code. - Enable use of disks that don't respond with the standard signature. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.4.1 src/sys/dev/ic/siisata.c \ src/sys/dev/ic/siisatareg.h src/sys/dev/ic/siisatavar.h cvs rdiff -u -r1.308.2.3 -r1.308.2.4 src/sys/dev/pci/files.pci cvs rdiff -u -r1.1.14.1 -r1.1.14.2 src/sys/dev/pci/siisata_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/ic/siisata.c diff -u src/sys/dev/ic/siisata.c:1.2 src/sys/dev/ic/siisata.c:1.2.4.1 --- src/sys/dev/ic/siisata.c:1.2 Sun Sep 14 21:53:49 2008 +++ src/sys/dev/ic/siisata.c Mon Sep 28 00:17:28 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: siisata.c,v 1.2 2008/09/14 21:53:49 jakllsch Exp $ */ +/* $NetBSD: siisata.c,v 1.2.4.1 2009/09/28 00:17:28 snj Exp $ */ /* from ahcisata_core.c */ @@ -100,11 +100,14 @@ #include uvm/uvm_extern.h -#include dev/ic/wdcreg.h #include dev/ata/atareg.h #include dev/ata/satavar.h #include dev/ata/satareg.h +#include dev/ata/satafisvar.h #include dev/ic/siisatavar.h +#include dev/ic/wdcreg.h + +#include dev/scsipi/scsi_all.h /* for SCSI status */ #include atapibus.h @@ -119,8 +122,7 @@ #define ATA_DELAY 1 /* 10s for a drive I/O */ static void siisata_attach_port(struct siisata_softc *, int); -static void siisata_intr_port(struct siisata_softc *, -struct siisata_channel *); +static void siisata_intr_port(struct siisata_channel *); void siisata_probe_drive(struct ata_channel *); void siisata_setup_channel(struct ata_channel *); @@ -159,7 +161,6 @@ int siisata_atapi_complete(struct ata_channel *, struct ata_xfer *, int); void siisata_atapi_kill_xfer(struct ata_channel *, struct ata_xfer *, int); void siisata_atapi_done(struct ata_channel *, struct ata_xfer *, int); -void siisata_atapi_reset(struct ata_channel *, struct ata_xfer *); void siisata_atapi_scsipi_request(struct scsipi_channel *, scsipi_adapter_req_t, void *); void siisata_atapi_kill_pending(struct scsipi_periph *); @@ -266,11 +267,10 @@ if (chp-ch_queue == NULL) { aprint_error_dev(sc-sc_atac.atac_dev, port %d: can't allocate memory - for command queue, chp-ch_channel); + for command queue\n, chp-ch_channel); return; } - dmasize = SIISATA_CMD_SIZE * SIISATA_MAX_SLOTS; SIISATA_DEBUG_PRINT((%s: %s: dmasize: %d\n, SIISATANAME(sc), @@ -366,6 +366,48 @@ return; } +int +siisata_detach(struct siisata_softc *sc, int flags) +{ + struct atac_softc *atac = sc-sc_atac; + struct scsipi_adapter *adapt = atac-atac_atapi_adapter._generic; + struct siisata_channel *schp; + struct ata_channel *chp; + bus_dmamap_t dmam; + int i, j, error; + + for (i = 0; i sc-sc_atac.atac_nchannels; i++) { + schp = sc-sc_channels[i]; + chp = sc-sc_chanarray[i]; + + if (chp-atabus == NULL) + continue; + if ((error = config_detach(chp-atabus, flags)) != 0) + return error; + + for (j = 0; j SIISATA_MAX_SLOTS; j++) + bus_dmamap_destroy(sc-sc_dmat, schp-sch_datad[j]); + + dmam = schp-sch_prbd; + bus_dmamap_unload(sc-sc_dmat, dmam); + bus_dmamap_destroy(sc-sc_dmat, dmam); + bus_dmamem_unmap(sc-sc_dmat, schp-sch_prb[0], + dmam-dm_mapsize); + bus_dmamem_free(sc-sc_dmat, dmam-dm_segs, dmam-dm_nsegs); + + free(chp-ch_queue, M_DEVBUF); + chp-atabus = NULL; + } + + if (adapt-adapt_refcnt != 0) + return EBUSY; + + /* leave the chip in reset */ + GRWRITE(sc, GR_GC, GR_GC_GLBLRST); + + return 0; +} + void siisata_resume(struct siisata_softc *sc) { @@ -392,27 +434,69 @@ r = 1; for (i = 0; i sc-sc_atac.atac_nchannels; i++) if (is GR_GIS_PXIS(i)) -siisata_intr_port(sc, sc-sc_channels[i]); +siisata_intr_port(sc-sc_channels[i]); } return r; } static void -siisata_intr_port(struct siisata_softc *sc, struct
CVS commit: [netbsd-5] src/sys/dev/ic
Module Name:src Committed By: snj Date: Mon Sep 28 00:18:39 UTC 2009 Modified Files: src/sys/dev/ic [netbsd-5]: siisata.c Log Message: Pull up following revision(s) (requested by jakllsch in ticket #1023): sys/dev/ic/siisata.c: revision 1.4 make this build w/o SIISATA_DEBUG To generate a diff of this commit: cvs rdiff -u -r1.2.4.1 -r1.2.4.2 src/sys/dev/ic/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/dev/ic/siisata.c diff -u src/sys/dev/ic/siisata.c:1.2.4.1 src/sys/dev/ic/siisata.c:1.2.4.2 --- src/sys/dev/ic/siisata.c:1.2.4.1 Mon Sep 28 00:17:28 2009 +++ src/sys/dev/ic/siisata.c Mon Sep 28 00:18:39 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: siisata.c,v 1.2.4.1 2009/09/28 00:17:28 snj Exp $ */ +/* $NetBSD: siisata.c,v 1.2.4.2 2009/09/28 00:18:39 snj Exp $ */ /* from ahcisata_core.c */ @@ -876,8 +876,10 @@ int siisata_cmd_complete(struct ata_channel *chp, struct ata_xfer *xfer, int slot) { - struct siisata_softc *sc = (struct siisata_softc *)chp-ch_atac; struct ata_command *ata_c = xfer-c_cmd; +#ifdef SIISATA_DEBUG + struct siisata_softc *sc = (struct siisata_softc *)chp-ch_atac; +#endif SIISATA_DEBUG_PRINT( (%s: %s\n, SIISATANAME(sc), __func__), DEBUG_FUNCS);
CVS commit: [netbsd-5] src/sys/dev/ic
Module Name:src Committed By: snj Date: Mon Sep 28 00:19:37 UTC 2009 Modified Files: src/sys/dev/ic [netbsd-5]: siisata.c Log Message: Pull up following revision(s) (requested by jakllsch in ticket #1023): sys/dev/ic/siisata.c: revision 1.5 Use PRO_PS and PRO_PCS correctly. From Wolfgang Stukenbrock as part of kern/41579. While here, remove a line of whitespace, and add an else case to the ATAPI command length toggle. To generate a diff of this commit: cvs rdiff -u -r1.2.4.2 -r1.2.4.3 src/sys/dev/ic/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/dev/ic/siisata.c diff -u src/sys/dev/ic/siisata.c:1.2.4.2 src/sys/dev/ic/siisata.c:1.2.4.3 --- src/sys/dev/ic/siisata.c:1.2.4.2 Mon Sep 28 00:18:39 2009 +++ src/sys/dev/ic/siisata.c Mon Sep 28 00:19:37 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: siisata.c,v 1.2.4.2 2009/09/28 00:18:39 snj Exp $ */ +/* $NetBSD: siisata.c,v 1.2.4.3 2009/09/28 00:19:37 snj Exp $ */ /* from ahcisata_core.c */ @@ -524,7 +524,7 @@ wait = wait ? wait : 1; /* wait for ready */ - while (!(PRREAD(sc, PRX(chp-ch_channel, PRO_PCS)) PR_PS_PORT_READY)) + while (!(PRREAD(sc, PRX(chp-ch_channel, PRO_PS)) PR_PS_PORT_READY)) DELAY(10); prb = schp-sch_prb[slot]; @@ -593,7 +593,7 @@ /* XXX and then ? */ } /* wait for ready */ - while (!(PRREAD(sc, PRX(chp-ch_channel, PRO_PCS)) PR_PS_PORT_READY)) + while (!(PRREAD(sc, PRX(chp-ch_channel, PRO_PS)) PR_PS_PORT_READY)) DELAY(10); PRWRITE(sc, PRX(chp-ch_channel, PRO_SERROR), PRREAD(sc, PRX(chp-ch_channel, PRO_SERROR))); @@ -656,7 +656,7 @@ schp-sch_sstatus)) { case SStatus_DET_DEV: /* wait for ready */ - while (!(PRREAD(sc, PRX(chp-ch_channel, PRO_PCS)) + while (!(PRREAD(sc, PRX(chp-ch_channel, PRO_PS)) PR_PS_PORT_READY)) DELAY(10); @@ -890,7 +890,6 @@ else callout_stop(chp-ch_callout); - if (chp-ch_drive[xfer-c_drive].drive_flags DRIVE_WAITDRAIN) { siisata_cmd_kill_xfer(chp, xfer, KILL_GONE); chp-ch_drive[xfer-c_drive].drive_flags = ~DRIVE_WAITDRAIN; @@ -1254,9 +1253,8 @@ { struct siisata_softc *sc = (struct siisata_softc *)chp-ch_atac; - PRWRITE(sc, PRX(chp-ch_channel, PRO_PCS), - PRREAD(sc, PRX(chp-ch_channel, PRO_PCS)) | PR_PC_PORT_INITIALIZE); - while (!(PRREAD(sc, PRX(chp-ch_channel, PRO_PCS)) PR_PS_PORT_READY)) + PRWRITE(sc, PRX(chp-ch_channel, PRO_PCS), PR_PC_PORT_INITIALIZE); + while (!(PRREAD(sc, PRX(chp-ch_channel, PRO_PS)) PR_PS_PORT_READY)) DELAY(10); } @@ -1265,9 +1263,8 @@ { struct siisata_softc *sc = (struct siisata_softc *)chp-ch_atac; - PRWRITE(sc, PRX(chp-ch_channel, PRO_PCS), - PRREAD(sc, PRX(chp-ch_channel, PRO_PCS)) | PR_PC_DEVICE_RESET); - while (!(PRREAD(sc, PRX(chp-ch_channel, PRO_PCS)) PR_PS_PORT_READY)) + PRWRITE(sc, PRX(chp-ch_channel, PRO_PCS), PR_PC_DEVICE_RESET); + while (!(PRREAD(sc, PRX(chp-ch_channel, PRO_PS)) PR_PS_PORT_READY)) DELAY(10); } @@ -1441,9 +1438,12 @@ /* configure port for packet length */ PRWRITE(siic, PRX(chp-ch_channel, PRO_PCS), - PRREAD(siic, PRX(chp-ch_channel, PRO_PCS)) | + PR_PC_PACKET_LENGTH); + } else { + PRWRITE(siic, PRX(chp-ch_channel, PRO_PCC), PR_PC_PACKET_LENGTH); } + /* XXX This is gross. */ periph-periph_cap |= (id-atap_config ATAPI_CFG_DRQ_MASK);
CVS commit: [netbsd-5] src/sys/dev/ic
Module Name:src Committed By: snj Date: Mon Sep 28 00:21:13 UTC 2009 Modified Files: src/sys/dev/ic [netbsd-5]: siisata.c Log Message: Pull up following revision(s) (requested by jakllsch in ticket #1023): sys/dev/ic/siisata.c: revision 1.6 Correct various siisata bugs, some old, some new. - Move clearing of interrupts to before atastart() is called in the xfer interrupt handler. Should fix kern/41579. - Using cv_timedwait(9) is not possible in code that can be called from interrupt context, fall back to DELAY(9). - Correctly poll Port Slot Status register for soft reset PRBs. - Only use the Recive Transfer Count register on reads, when it is valid. - Activate PRBs in a way that takes the whole physical address into account, even when the PRB is beyond 4GiB. - consistently use DELAY(9) - Use DELAY() constants in completion polling loops that are consistent with the loop count limit. (i.e. timeout in 10 rather than 100 seconds) To generate a diff of this commit: cvs rdiff -u -r1.2.4.3 -r1.2.4.4 src/sys/dev/ic/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/dev/ic/siisata.c diff -u src/sys/dev/ic/siisata.c:1.2.4.3 src/sys/dev/ic/siisata.c:1.2.4.4 --- src/sys/dev/ic/siisata.c:1.2.4.3 Mon Sep 28 00:19:37 2009 +++ src/sys/dev/ic/siisata.c Mon Sep 28 00:21:13 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: siisata.c,v 1.2.4.3 2009/09/28 00:19:37 snj Exp $ */ +/* $NetBSD: siisata.c,v 1.2.4.4 2009/09/28 00:21:13 snj Exp $ */ /* from ahcisata_core.c */ @@ -494,13 +494,13 @@ } } + /* clear some (ok, all) ints */ + PRWRITE(sc, PRX(chp-ch_channel, PRO_PIS), 0x); + KASSERT(xfer != NULL); KASSERT(xfer-c_intr != NULL); xfer-c_intr(chp, xfer, slot); - /* clear some (ok, all) ints */ - PRWRITE(sc, PRX(chp-ch_channel, PRO_PIS), 0x); - return; } @@ -511,17 +511,8 @@ struct siisata_softc *sc = (struct siisata_softc *)chp-ch_atac; struct siisata_channel *schp = (struct siisata_channel *)chp; struct siisata_prb *prb; - kmutex_t mtx; - kcondvar_t cv; int slot = SIISATA_NON_NCQ_SLOT; int i; - int wait; - - mutex_init(mtx, MUTEX_DEFAULT, IPL_NONE); - cv_init(cv, siipd); - - wait = mstohz(10); - wait = wait ? wait : 1; /* wait for ready */ while (!(PRREAD(sc, PRX(chp-ch_channel, PRO_PS)) PR_PS_PORT_READY)) @@ -534,18 +525,18 @@ siisata_activate_prb(schp, slot); - for(i = 0; i (31000/(1000/(wait*hz))); i++) { + for(i = 0; i 31000; i++) { if (PRREAD(sc, PRX(chp-ch_channel, PRO_PSS)) PR_PXSS(slot)) - break; + DELAY(1000); else - cv_timedwait(cv, mtx, wait); + break; } siisata_deactivate_prb(schp, slot); - log(LOG_DEBUG, %s: ch_status %x ch_error %x\n, - __func__, chp-ch_status, chp-ch_error); + log(LOG_DEBUG, %s: port %d: ch_status %x ch_error %x\n, + __func__, chp-ch_channel, chp-ch_status, chp-ch_error); #if 1 /* attempt to downgrade signaling in event of CRC error */ @@ -571,9 +562,6 @@ chp-ch_error = 0; #endif - cv_destroy(cv); - mutex_destroy(mtx); - return; } @@ -633,9 +621,6 @@ uint32_t sig; int slot = SIISATA_NON_NCQ_SLOT; struct siisata_prb *prb; - kmutex_t mtx; - kcondvar_t cv; - int wait; SIISATA_DEBUG_PRINT((%s: %s: port %d start\n, SIISATANAME(sc), __func__, chp-ch_channel), DEBUG_FUNCS); @@ -646,12 +631,6 @@ chp-ch_drive[i].drive = i; } - mutex_init(mtx, MUTEX_DEFAULT, IPL_NONE); - cv_init(cv, siipd); - - wait = mstohz(10); - wait = wait ? wait : 1; - switch (sata_reset_interface(chp, sc-sc_prt, schp-sch_scontrol, schp-sch_sstatus)) { case SStatus_DET_DEV: @@ -667,12 +646,12 @@ siisata_activate_prb(schp, slot); - for(i = 0; i (31000/(1000/(wait*hz))); i++) { + for(i = 0; i 31000; i++) { if (PRREAD(sc, PRX(chp-ch_channel, PRO_PSS)) PR_PXSS(slot)) -break; +DELAY(1000); else -cv_timedwait(cv, mtx, wait); +break; } siisata_deactivate_prb(schp, slot); @@ -714,9 +693,6 @@ break; } - cv_destroy(cv); - mutex_destroy(mtx); - SIISATA_DEBUG_PRINT((%s: %s: port %d done\n, SIISATANAME(sc), __func__, chp-ch_channel), DEBUG_PROBE); return; @@ -836,7 +812,7 @@ if (ata_c-flags AT_DONE) break; siisata_intr_port(schp); - DELAY(1); + DELAY(1000); } if ((ata_c-flags AT_DONE) == 0) { @@ -1038,7 +1014,7 @@ if (ata_bio-flags ATA_ITSDONE) break; siisata_intr_port(schp); - DELAY(1); + DELAY(1000); } GRWRITE(sc, GR_GC, GRREAD(sc, GR_GC) | GR_GC_PXIE(chp-ch_channel)); @@ -1123,9 +1099,13 @@ SIISATA_DEBUG_PRINT((%s: %s bcount: %ld, SIISATANAME(sc), __func__, ata_bio-bcount), DEBUG_XFERS); - if ((ata_bio-flags ATA_READ) || (ata_bio-error == NOERROR)) - ata_bio-bcount -= PRREAD(sc, - PRSX(chp-ch_channel, slot, PRSO_RTC)); + if (ata_bio-error == NOERROR) { + if (ata_bio-flags ATA_READ) + ata_bio-bcount -= + PRREAD(sc,
CVS commit: [netbsd-5] src/sys/dev
Module Name:src Committed By: snj Date: Mon Sep 28 00:22:36 UTC 2009 Modified Files: src/sys/dev/ic [netbsd-5]: siisatavar.h src/sys/dev/pci [netbsd-5]: siisata_pci.c Log Message: Pull up following revision(s) (requested by jakllsch in ticket #1023): sys/dev/ic/siisatavar.h: revision 1.4 sys/dev/pci/siisata_pci.c: revision 1.4 Remove unused elements from siisata_softc. Clean up siisata pci attachment. noteable changes: - Use aprint_*_dev where appropriate. - Condense board match table and use C99 initializers. - Use aprint_verbose for extra info. Also, add 2009 to my copyright, as well as remove my local CVS tags. To generate a diff of this commit: cvs rdiff -u -r1.2.4.1 -r1.2.4.2 src/sys/dev/ic/siisatavar.h cvs rdiff -u -r1.1.14.2 -r1.1.14.3 src/sys/dev/pci/siisata_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/ic/siisatavar.h diff -u src/sys/dev/ic/siisatavar.h:1.2.4.1 src/sys/dev/ic/siisatavar.h:1.2.4.2 --- src/sys/dev/ic/siisatavar.h:1.2.4.1 Mon Sep 28 00:17:28 2009 +++ src/sys/dev/ic/siisatavar.h Mon Sep 28 00:22:36 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: siisatavar.h,v 1.2.4.1 2009/09/28 00:17:28 snj Exp $ */ +/* $NetBSD: siisatavar.h,v 1.2.4.2 2009/09/28 00:22:36 snj Exp $ */ /* from ahcisatavar.h */ @@ -33,7 +33,7 @@ */ /*- - * Copyright (c) 2007, 2008 Jonathan A. Kollasch. + * Copyright (c) 2007, 2008, 2009 Jonathan A. Kollasch. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -105,9 +105,6 @@ uint32_t sch_active_slots; } sc_channels[SIISATA_MAX_PORTS]; - - int sc_have_dma64; /* 64-bit DMA available */ - int sc_chip; /* chip number */ }; #define SIISATANAME(sc) (device_xname((sc)-sc_atac.atac_dev)) Index: src/sys/dev/pci/siisata_pci.c diff -u src/sys/dev/pci/siisata_pci.c:1.1.14.2 src/sys/dev/pci/siisata_pci.c:1.1.14.3 --- src/sys/dev/pci/siisata_pci.c:1.1.14.2 Mon Sep 28 00:17:28 2009 +++ src/sys/dev/pci/siisata_pci.c Mon Sep 28 00:22:36 2009 @@ -1,5 +1,4 @@ -/* $NetBSD: siisata_pci.c,v 1.1.14.2 2009/09/28 00:17:28 snj Exp $ */ -/* Id: siisata_pci.c,v 1.11 2008/05/21 16:20:11 jakllsch Exp */ +/* $NetBSD: siisata_pci.c,v 1.1.14.3 2009/09/28 00:22:36 snj Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -32,7 +31,7 @@ */ /*- - * Copyright (c) 2007, 2008 Jonathan A. Kollasch. + * Copyright (c) 2007, 2008, 2009 Jonathan A. Kollasch. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -84,44 +83,49 @@ static int siisata_pci_detach(device_t, int); static bool siisata_pci_resume(device_t PMF_FN_PROTO); -static const struct siisata_pci_product { - pci_vendor_id_t spp_vendor; - pci_product_id_t spp_product; - int spp_ports; - int spp_chip; +struct siisata_pci_board { + pci_vendor_id_t spb_vend; + pci_product_id_t spb_prod; + uint16_t spb_port; + uint16_t spb_chip; +}; -} siisata_pci_products[] = { - { - PCI_VENDOR_CMDTECH, PCI_PRODUCT_CMDTECH_3124, - 4, 3124 - }, +static const struct siisata_pci_board siisata_pci_boards[] = { { - PCI_VENDOR_CMDTECH, PCI_PRODUCT_CMDTECH_3132, - 2, 3132 + .spb_vend = PCI_VENDOR_CMDTECH, + .spb_prod = PCI_PRODUCT_CMDTECH_3124, + .spb_port = 4, + .spb_chip = 3124, }, { - PCI_VENDOR_CMDTECH, PCI_PRODUCT_CMDTECH_3531, - 1, 3531 + .spb_vend = PCI_VENDOR_CMDTECH, + .spb_prod = PCI_PRODUCT_CMDTECH_3132, + .spb_port = 2, + .spb_chip = 3132, }, { - 0, 0, - 0, 0 + .spb_vend = PCI_VENDOR_CMDTECH, + .spb_prod = PCI_PRODUCT_CMDTECH_3531, + .spb_port = 1, + .spb_chip = 3531, }, }; CFATTACH_DECL_NEW(siisata_pci, sizeof(struct siisata_pci_softc), siisata_pci_match, siisata_pci_attach, siisata_pci_detach, NULL); -static const struct siisata_pci_product * +static const struct siisata_pci_board * siisata_pci_lookup(const struct pci_attach_args * pa) { - const struct siisata_pci_product *spp; + int i; - for (spp = siisata_pci_products; spp-spp_ports 0; spp++) { - if (PCI_VENDOR(pa-pa_id) == spp-spp_vendor - PCI_PRODUCT(pa-pa_id) == spp-spp_product) - return spp; + for (i = 0; i __arraycount(siisata_pci_boards); i++) { + if (siisata_pci_boards[i].spb_vend != PCI_VENDOR(pa-pa_id)) + continue; + if (siisata_pci_boards[i].spb_prod == PCI_PRODUCT(pa-pa_id)) + return siisata_pci_boards[i]; } + return NULL; } @@ -145,7 +149,7 @@ char devinfo[256]; const char *intrstr; pcireg_t csr, memtype; - const struct siisata_pci_product *spp; + const struct siisata_pci_board *spbp; pci_intr_handle_t intrhandle; bus_space_tag_t memt; bus_space_handle_t memh; @@ -162,12 +166,8 @@ aprint_naive(: SATA-II HBA\n); aprint_normal(: %s\n, devinfo); - /* map bar0 */ -#if 1 + /* map BAR 0, global registers */ memtype = pci_mapreg_type(pa-pa_pc, pa-pa_tag, SIISATA_PCI_BAR0); -#else - memtype = PCI_MAPREG_TYPE_MEM
CVS commit: [netbsd-5] src/sys
Module Name:src Committed By: snj Date: Mon Sep 28 00:27:13 UTC 2009 Modified Files: src/sys/conf [netbsd-5]: files src/sys/dev/pci [netbsd-5]: files.pci Log Message: Pull up following revision(s) (requested by jakllsch in ticket #1023): sys/conf/files: revision 1.956 via patch sys/dev/pci/files.pci: revision 1.321 As, siisata attaches not just at pci, but for a while now, also at cardbus, move siisata core driver config to the propper config file. To generate a diff of this commit: cvs rdiff -u -r1.924.4.3 -r1.924.4.4 src/sys/conf/files cvs rdiff -u -r1.308.2.4 -r1.308.2.5 src/sys/dev/pci/files.pci Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/files diff -u src/sys/conf/files:1.924.4.3 src/sys/conf/files:1.924.4.4 --- src/sys/conf/files:1.924.4.3 Mon Sep 28 00:13:02 2009 +++ src/sys/conf/files Mon Sep 28 00:27:13 2009 @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.924.4.3 2009/09/28 00:13:02 snj Exp $ +# $NetBSD: files,v 1.924.4.4 2009/09/28 00:27:13 snj Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 @@ -932,6 +932,11 @@ file dev/ic/ahcisata_core.c ahcisata_core device ahcisata: ata, ata_dma, ata_udma, sata, ahcisata_core +# Silicon Image SteelVine SATA-II controllers +define siisata +file dev/ic/siisata.c siisata +device siisata: ata, ata_dma, ata_udma, sata, sata_fis, siisata + # DECchip 21x4x Ethernet controller family, and assorted clones. # device tlp: arp, ether, ifnet, mii, mii_bitbang Index: src/sys/dev/pci/files.pci diff -u src/sys/dev/pci/files.pci:1.308.2.4 src/sys/dev/pci/files.pci:1.308.2.5 --- src/sys/dev/pci/files.pci:1.308.2.4 Mon Sep 28 00:17:28 2009 +++ src/sys/dev/pci/files.pci Mon Sep 28 00:27:13 2009 @@ -1,4 +1,4 @@ -# $NetBSD: files.pci,v 1.308.2.4 2009/09/28 00:17:28 snj Exp $ +# $NetBSD: files.pci,v 1.308.2.5 2009/09/28 00:27:13 snj Exp $ # # Config file and device description for machine-independent PCI code. # Included by ports that need it. Requires that the SCSI files be @@ -953,11 +953,8 @@ file dev/pci/if_lii.c lii # Silicon Image SteelVine SATA-II controllers -define siisata -file dev/ic/siisata.c atapibus atabus siisata -device siisata: ata, ata_dma, ata_udma, sata, sata_fis, siisata -attach siisata at pci with siisata_pci -file dev/pci/siisata_pci.c siisata_pci +attach siisata at pci with siisata_pci +file dev/pci/siisata_pci.c siisata_pci # Acer Labs M7101 power management controller device alipm: i2cbus
CVS commit: [netbsd-5] src/sys/dev/pci/hdaudio
Module Name:src Committed By: snj Date: Mon Sep 28 00:40:21 UTC 2009 Modified Files: src/sys/dev/pci/hdaudio [netbsd-5]: hdaudio_afg.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #1024): sys/dev/pci/hdaudio/hdaudio_afg.c: revision 1.15 ensure that hp sensing is stopped on suspend, and restarted on resume if required. To generate a diff of this commit: cvs rdiff -u -r1.14.2.2 -r1.14.2.3 src/sys/dev/pci/hdaudio/hdaudio_afg.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/pci/hdaudio/hdaudio_afg.c diff -u src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.14.2.2 src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.14.2.3 --- src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.14.2.2 Sat Sep 26 19:52:10 2009 +++ src/sys/dev/pci/hdaudio/hdaudio_afg.c Mon Sep 28 00:40:21 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: hdaudio_afg.c,v 1.14.2.2 2009/09/26 19:52:10 snj Exp $ */ +/* $NetBSD: hdaudio_afg.c,v 1.14.2.3 2009/09/28 00:40:21 snj Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd supp...@precedence.co.uk @@ -60,7 +60,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: hdaudio_afg.c,v 1.14.2.2 2009/09/26 19:52:10 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: hdaudio_afg.c,v 1.14.2.3 2009/09/28 00:40:21 snj Exp $); #include sys/types.h #include sys/param.h @@ -106,7 +106,7 @@ #define HDAUDIO_UNSOLTAG_EVENT_HP 0x00 -#define HDAUDIO_HP_SENSE_PERIOD (hz / 2) +#define HDAUDIO_HP_SENSE_PERIOD hz static const char *hdaudio_afg_mixer_names[] = HDAUDIO_DEVICE_NAMES; @@ -290,6 +290,7 @@ audio_params_t sc_pparam, sc_rparam; struct callout sc_jack_callout; + boolsc_jack_polling; struct { uint32_t afg_cap; @@ -308,6 +309,7 @@ static void hdaudio_afg_attach(device_t, device_t, void *); static int hdaudio_afg_detach(device_t, int); static void hdaudio_afg_childdet(device_t, device_t); +static bool hdaudio_afg_suspend(device_t PMF_FN_PROTO); static bool hdaudio_afg_resume(device_t PMF_FN_PROTO); CFATTACH_DECL2_NEW( @@ -2984,6 +2986,9 @@ uint32_t res = 0; int i, j; + if (!device_is_active(sc-sc_dev)) + goto resched; + for (i = 0; i sc-sc_nassocs; i++) for (j = 0; j HDAUDIO_MAXPINS; j++) { w = hdaudio_afg_widget_lookup(sc, as[i].as_pins[j]); @@ -3030,6 +3035,7 @@ } } +resched: callout_schedule(sc-sc_jack_callout, HDAUDIO_HP_SENSE_PERIOD); } @@ -3070,8 +3076,8 @@ unsol : poll); } if (enable) { + sc-sc_jack_polling = true; hdaudio_afg_hp_switch_handler(sc); - callout_schedule(sc-sc_jack_callout, HDAUDIO_HP_SENSE_PERIOD); } else hda_trace(sc, jack detect not enabled\n); } @@ -3093,7 +3099,7 @@ callout_setfunc(sc-sc_jack_callout, hdaudio_afg_hp_switch_handler, sc); - if (!pmf_device_register(self, NULL, hdaudio_afg_resume)) + if (!pmf_device_register(self, hdaudio_afg_suspend, hdaudio_afg_resume)) aprint_error_dev(self, couldn't establish power handler\n); sc-sc_config = prop_dictionary_get(args, pin-config); @@ -3241,6 +3247,16 @@ } static bool +hdaudio_afg_suspend(device_t self PMF_FN_ARGS) +{ + struct hdaudio_afg_softc *sc = device_private(self); + + callout_halt(sc-sc_jack_callout, NULL); + + return true; +} + +static bool hdaudio_afg_resume(device_t self PMF_FN_ARGS) { struct hdaudio_afg_softc *sc = device_private(self); @@ -3258,6 +3274,9 @@ hdaudio_afg_stream_connect(sc, AUMODE_PLAY); hdaudio_afg_stream_connect(sc, AUMODE_RECORD); + if (sc-sc_jack_polling) + hdaudio_afg_hp_switch_handler(sc); + return true; }
CVS commit: [netbsd-5] src/sys/arch/xen/xen
Module Name:src Committed By: snj Date: Mon Sep 28 00:42:34 UTC 2009 Modified Files: src/sys/arch/xen/xen [netbsd-5]: xbd_xenbus.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1025): sys/arch/xen/xen/xbd_xenbus.c: revision 1.40 Implement DIOCGDISKINFO for xbd disk driver. To generate a diff of this commit: cvs rdiff -u -r1.34.2.1 -r1.34.2.2 src/sys/arch/xen/xen/xbd_xenbus.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/xen/xbd_xenbus.c diff -u src/sys/arch/xen/xen/xbd_xenbus.c:1.34.2.1 src/sys/arch/xen/xen/xbd_xenbus.c:1.34.2.2 --- src/sys/arch/xen/xen/xbd_xenbus.c:1.34.2.1 Sun Mar 8 03:12:50 2009 +++ src/sys/arch/xen/xen/xbd_xenbus.c Mon Sep 28 00:42:34 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: xbd_xenbus.c,v 1.34.2.1 2009/03/08 03:12:50 snj Exp $ */ +/* $NetBSD: xbd_xenbus.c,v 1.34.2.2 2009/09/28 00:42:34 snj Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: xbd_xenbus.c,v 1.34.2.1 2009/03/08 03:12:50 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: xbd_xenbus.c,v 1.34.2.2 2009/09/28 00:42:34 snj Exp $); #include opt_xen.h #include rnd.h @@ -395,6 +395,8 @@ { struct xbd_xenbus_softc *sc = device_private((device_t)arg); struct dk_geom *pdg; + prop_dictionary_t disk_info, odisk_info, geom; + char buf[9]; int s; DPRINTF((%s: new backend state %d\n, device_xname(sc-sc_dev), new_state)); @@ -454,6 +456,31 @@ /* Discover wedges on this disk. */ dkwedge_discover(sc-sc_dksc.sc_dkdev); + disk_info = prop_dictionary_create(); + geom = prop_dictionary_create(); + prop_dictionary_set_uint64(geom, sectors-per-unit, + sc-sc_dksc.sc_size); + prop_dictionary_set_uint32(geom, sector-size, + pdg-pdg_secsize); + prop_dictionary_set_uint16(geom, sectors-per-track, + pdg-pdg_nsectors); + prop_dictionary_set_uint16(geom, tracks-per-cylinder, + pdg-pdg_ntracks); + prop_dictionary_set_uint64(geom, cylinders-per-unit, + pdg-pdg_ncylinders); + prop_dictionary_set(disk_info, geometry, geom); + prop_object_release(geom); + prop_dictionary_set(device_properties(sc-sc_dev), + disk-info, disk_info); + /* + * Don't release disk_info here; we keep a reference to it. + * disk_detach() will release it when we go away. + */ + odisk_info = sc-sc_dksc.sc_dkdev.dk_info; + sc-sc_dksc.sc_dkdev.dk_info = disk_info; + if (odisk_info) + prop_object_release(odisk_info); + /* the disk should be working now */ config_pending_decr(); break; @@ -669,6 +696,10 @@ dksc = sc-sc_dksc; dk = dksc-sc_dkdev; + error = disk_ioctl(sc-sc_dksc.sc_dkdev, cmd, data, flag, l); + if (error != EPASSTHROUGH) + return (error); + switch (cmd) { case DIOCSSTRATEGY: error = EOPNOTSUPP;
CVS commit: [netbsd-5] src/sys/arch/xen/xen
Module Name:src Committed By: snj Date: Mon Sep 28 01:25:22 UTC 2009 Modified Files: src/sys/arch/xen/xen [netbsd-5]: xbd_xenbus.c xbdback_xenbus.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1026): sys/arch/xen/xen/xbd_xenbus.c: revision 1.43 via patch sys/arch/xen/xen/xbdback_xenbus.c: revision 1.25 xbdback: implement and publish feature-flush-cache. xbd: if feature-flush-cache is present, use it for DIOCCACHESYNC. If not present, make DIOCCACHESYNC return EOPNOTSUPP and warn on first call. Should improve WAPBL reliability of Xen guests on a NetBSD dom0. Unfortunably not all linux guests seems to support this feature, and using feature-write-barrier would require a B_BARRIER flag in the buffer. To generate a diff of this commit: cvs rdiff -u -r1.34.2.2 -r1.34.2.3 src/sys/arch/xen/xen/xbd_xenbus.c cvs rdiff -u -r1.20 -r1.20.4.1 src/sys/arch/xen/xen/xbdback_xenbus.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/xen/xbd_xenbus.c diff -u src/sys/arch/xen/xen/xbd_xenbus.c:1.34.2.2 src/sys/arch/xen/xen/xbd_xenbus.c:1.34.2.3 --- src/sys/arch/xen/xen/xbd_xenbus.c:1.34.2.2 Mon Sep 28 00:42:34 2009 +++ src/sys/arch/xen/xen/xbd_xenbus.c Mon Sep 28 01:25:22 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: xbd_xenbus.c,v 1.34.2.2 2009/09/28 00:42:34 snj Exp $ */ +/* $NetBSD: xbd_xenbus.c,v 1.34.2.3 2009/09/28 01:25:22 snj Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: xbd_xenbus.c,v 1.34.2.2 2009/09/28 00:42:34 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: xbd_xenbus.c,v 1.34.2.3 2009/09/28 01:25:22 snj Exp $); #include opt_xen.h #include rnd.h @@ -85,11 +85,24 @@ struct xbd_req { SLIST_ENTRY(xbd_req) req_next; uint16_t req_id; /* ID passed to backend */ - grant_ref_t req_gntref[BLKIF_MAX_SEGMENTS_PER_REQUEST]; - int req_nr_segments; /* number of segments in this request */ - struct buf *req_bp; /* buffer associated with this request */ - void *req_data; /* pointer to the data buffer */ + union { + struct { + grant_ref_t req_gntref[BLKIF_MAX_SEGMENTS_PER_REQUEST]; + int req_nr_segments; /* number of segments in this request */ + struct buf *req_bp; /* buffer associated with this request */ + void *req_data; /* pointer to the data buffer */ + } req_rw; + struct { + int s_error; + volatile int s_done; + } req_sync; + } u; }; +#define req_gntref u.req_rw.req_gntref +#define req_nr_segments u.req_rw.req_nr_segments +#define req_bp u.req_rw.req_bp +#define req_data u.req_rw.req_data +#define req_sync u.req_sync struct xbd_xenbus_softc { device_t sc_dev; @@ -105,6 +118,7 @@ struct xbd_req sc_reqs[XBD_RING_SIZE]; SLIST_HEAD(,xbd_req) sc_xbdreq_head; /* list of free requests */ + bool sc_xbdreq_wait; /* special waiting on xbd_req */ int sc_backend_status; /* our status with backend */ #define BLKIF_STATE_DISCONNECTED 0 @@ -117,6 +131,7 @@ uint64_t sc_xbdsize; /* size of disk in DEV_BSIZE */ u_long sc_info; /* VDISK_* */ u_long sc_handle; /* from backend */ + int sc_cache_flush; /* backend supports BLKIF_OP_FLUSH_DISKCACHE */ #if NRND 0 rndsource_element_t sc_rnd_source; #endif @@ -494,6 +509,7 @@ { int err; unsigned long long sectors; + u_long cache_flush; err = xenbus_read_ul(NULL, sc-sc_xbusd-xbusd_path, virtual-device, sc-sc_handle, 10); @@ -517,6 +533,14 @@ if (err) panic(%s: can't read number from %s/sector-size\n, device_xname(sc-sc_dev), sc-sc_xbusd-xbusd_otherend); + err = xenbus_read_ul(NULL, sc-sc_xbusd-xbusd_otherend, + feature-flush-cache, cache_flush, 10); + if (err) + cache_flush = 0; + if (cache_flush 0) + sc-sc_cache_flush = 1; + else + sc-sc_cache_flush = 0; xenbus_switch_state(sc-sc_xbusd, NULL, XenbusStateConnected); } @@ -540,9 +564,16 @@ for (i = sc-sc_ring.rsp_cons; i != resp_prod; i++) { blkif_response_t *rep = RING_GET_RESPONSE(sc-sc_ring, i); struct xbd_req *xbdreq = sc-sc_reqs[rep-id]; - bp = xbdreq-req_bp; DPRINTF((xbd_handler(%p): b_bcount = %ld\n, - bp, (long)bp-b_bcount)); + xbdreq-req_bp, (long)bp-b_bcount)); + bp = xbdreq-req_bp; + if (rep-operation == BLKIF_OP_FLUSH_DISKCACHE) { + xbdreq-req_sync.s_error = rep-status; + xbdreq-req_sync.s_done = 1; + wakeup(xbdreq); + /* caller will free the req */ + continue; + } for (seg = xbdreq-req_nr_segments - 1; seg = 0; seg--) { if (__predict_false( xengnt_status(xbdreq-req_gntref[seg]))) { @@ -584,13 +615,15 @@ biodone(bp); SLIST_INSERT_HEAD(sc-sc_xbdreq_head, xbdreq, req_next); } +done: x86_lfence(); sc-sc_ring.rsp_cons = i; RING_FINAL_CHECK_FOR_RESPONSES(sc-sc_ring, more_to_do); if (more_to_do) goto again; -done: dk_iodone(sc-sc_di, sc-sc_dksc); + if (sc-sc_xbdreq_wait) + wakeup(sc-sc_xbdreq_wait); return
CVS commit: [netbsd-5] src/sys/arch/xen/xen
Module Name:src Committed By: snj Date: Mon Sep 28 01:31:46 UTC 2009 Modified Files: src/sys/arch/xen/xen [netbsd-5]: if_xennet_xenbus.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1027): sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.36 Patch from Brian Marcotte on port-xen@: write a feature-rx-notify to the xenstore, which is used by recent linux dom0 kernels. This reduce packet loss when using a NetBSD domU on such linux dom0. This entry is ignored by NetBSD and older linux domUs. To generate a diff of this commit: cvs rdiff -u -r1.29.2.2 -r1.29.2.3 src/sys/arch/xen/xen/if_xennet_xenbus.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/xen/if_xennet_xenbus.c diff -u src/sys/arch/xen/xen/if_xennet_xenbus.c:1.29.2.2 src/sys/arch/xen/xen/if_xennet_xenbus.c:1.29.2.3 --- src/sys/arch/xen/xen/if_xennet_xenbus.c:1.29.2.2 Wed May 13 01:05:20 2009 +++ src/sys/arch/xen/xen/if_xennet_xenbus.c Mon Sep 28 01:31:46 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_xennet_xenbus.c,v 1.29.2.2 2009/05/13 01:05:20 snj Exp $ */ +/* $NetBSD: if_xennet_xenbus.c,v 1.29.2.3 2009/09/28 01:31:46 snj Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -61,7 +61,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_xennet_xenbus.c,v 1.29.2.2 2009/05/13 01:05:20 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: if_xennet_xenbus.c,v 1.29.2.3 2009/09/28 01:31:46 snj Exp $); #include opt_xen.h #include opt_nfs_boot.h @@ -467,6 +467,12 @@ goto abort_transaction; } error = xenbus_printf(xbt, sc-sc_xbusd-xbusd_path, + feature-rx-notify, %u, 1); + if (error) { + errmsg = writing feature-rx-notify; + goto abort_transaction; + } + error = xenbus_printf(xbt, sc-sc_xbusd-xbusd_path, event-channel, %u, sc-sc_evtchn); if (error) { errmsg = writing event channel;
CVS commit: [netbsd-5] src/sys/kern
Module Name:src Committed By: snj Date: Mon Sep 28 01:38:24 UTC 2009 Modified Files: src/sys/kern [netbsd-5]: kern_turnstile.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1028): sys/kern/kern_turnstile.c: revision 1.25 via patch PR kern/41923: assertion cur != owner failed In the for(;;) loop of turnstile_block(), the lock owner can change while cur's lock is released (cur's lock is also the tschain_t's mutex). Remove the KASSERT about owner being invariant and try to deal with the fact that the owner can change instead. http://mail-index.netbsd.org/tech-kern/2009/08/24/msg005957.html and followups. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.23.4.1 src/sys/kern/kern_turnstile.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_turnstile.c diff -u src/sys/kern/kern_turnstile.c:1.23 src/sys/kern/kern_turnstile.c:1.23.4.1 --- src/sys/kern/kern_turnstile.c:1.23 Tue Aug 12 14:13:34 2008 +++ src/sys/kern/kern_turnstile.c Mon Sep 28 01:38:24 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_turnstile.c,v 1.23 2008/08/12 14:13:34 thorpej Exp $ */ +/* $NetBSD: kern_turnstile.c,v 1.23.4.1 2009/09/28 01:38:24 snj Exp $ */ /*- * Copyright (c) 2002, 2006, 2007 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_turnstile.c,v 1.23 2008/08/12 14:13:34 thorpej Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_turnstile.c,v 1.23.4.1 2009/09/28 01:38:24 snj Exp $); #include sys/param.h #include sys/lockdebug.h @@ -253,6 +253,7 @@ sq = ts-ts_sleepq[q]; ts-ts_waiters[q]++; sleepq_enter(sq, l, tc-tc_mutex); + /* now tc-tc_mutex is also cur-l_mutex and l-l_mutex */ LOCKDEBUG_BARRIER(tc-tc_mutex, 1); l-l_kpriority = true; obase = l-l_kpribase; @@ -275,6 +276,7 @@ * compiling a kernel with LOCKDEBUG to pinpoint the problem. */ prio = lwp_eprio(l); + for (;;) { bool dolock; @@ -285,9 +287,24 @@ if (owner == NULL) break; - KASSERT(l != owner); - KASSERT(cur != owner); + /* The owner may have changed as we have dropped the tc lock */ + if (cur == owner) { + /* + * we own the lock: stop here, sleepq_block() + * should wake up immediatly + */ + break; + } + if (l == owner) { + /* owner has changed, restart from curlwp */ + lwp_unlock(l); + l = cur; + lwp_lock(l); + prio = lwp_eprio(l); + continue; + } + if (l-l_mutex != owner-l_mutex) dolock = true; else @@ -295,6 +312,10 @@ if (dolock !lwp_trylock(owner)) { /* * restart from curlwp. + * Note that there may be a livelock here: + * the owner may try grabing cur's lock (which is + * the tc lock) while we're trying to grab + * the owner's lock. */ lwp_unlock(l); l = cur;
CVS commit: [netbsd-5] src/sys/arch/xen/xen
Module Name:src Committed By: snj Date: Mon Sep 28 01:46:48 UTC 2009 Modified Files: src/sys/arch/xen/xen [netbsd-5]: xennetback_xenbus.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1030): sys/arch/xen/xen/xennetback_xenbus.c: revision 1.29 via patch Announce feature-rx-copy and feature-rx-flip. Add support for request-rx-copy. Tested with a Debian lenny install. Should fix PR port-xen/40650 To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.24.4.1 src/sys/arch/xen/xen/xennetback_xenbus.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/xen/xennetback_xenbus.c diff -u src/sys/arch/xen/xen/xennetback_xenbus.c:1.24 src/sys/arch/xen/xen/xennetback_xenbus.c:1.24.4.1 --- src/sys/arch/xen/xen/xennetback_xenbus.c:1.24 Fri Oct 24 18:02:58 2008 +++ src/sys/arch/xen/xen/xennetback_xenbus.c Mon Sep 28 01:46:48 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: xennetback_xenbus.c,v 1.24 2008/10/24 18:02:58 jym Exp $ */ +/* $NetBSD: xennetback_xenbus.c,v 1.24.4.1 2009/09/28 01:46:48 snj Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -131,7 +131,8 @@ void xvifattach(int); static int xennetback_ifioctl(struct ifnet *, u_long, void *); static void xennetback_ifstart(struct ifnet *); -static void xennetback_ifsoftstart(void *); +static void xennetback_ifsoftstart_transfer(void *); +static void xennetback_ifsoftstart_copy(void *); static void xennetback_ifwatchdog(struct ifnet *); static int xennetback_ifinit(struct ifnet *); static void xennetback_ifstop(struct ifnet *, int); @@ -182,7 +183,8 @@ /* arrays used in xennetback_ifstart(), too large to allocate on stack */ static mmu_update_t xstart_mmu[NB_XMIT_PAGES_BATCH]; static multicall_entry_t xstart_mcl[NB_XMIT_PAGES_BATCH + 1]; -static gnttab_transfer_t xstart_gop[NB_XMIT_PAGES_BATCH]; +static gnttab_transfer_t xstart_gop_transfer[NB_XMIT_PAGES_BATCH]; +static gnttab_copy_t xstart_gop_copy[NB_XMIT_PAGES_BATCH]; struct mbuf *mbufs_sent[NB_XMIT_PAGES_BATCH]; struct _pages_pool_free { vaddr_t va; @@ -244,6 +246,7 @@ extern int ifqmaxlen; /* XXX */ char *val, *e, *p; int i, err; + struct xenbus_transaction *xbt; if ((err = xenbus_read_ul(NULL, xbusd-xbusd_path, frontend-id, domid, 10)) != 0) { @@ -274,13 +277,6 @@ xbusd-xbusd_u.b.b_detach = xennetback_xenbus_destroy; xneti-xni_xbusd = xbusd; - xneti-xni_softintr = softint_establish(SOFTINT_NET, - xennetback_ifsoftstart, xneti); - if (xneti-xni_softintr == NULL) { - err = ENOMEM; - goto fail; - } - ifp = xneti-xni_if; ifp-if_softc = xneti; @@ -328,6 +324,33 @@ xbusd-xbusd_otherend_changed = xennetback_frontend_changed; + do { + xbt = xenbus_transaction_start(); + if (xbt == NULL) { + printf(xbdback %s: can't start transaction\n, + xbusd-xbusd_path); + goto fail; + } + err = xenbus_printf(xbt, xbusd-xbusd_path, + feature-rx-copy, %d, 1); + if (err) { + printf(xbdback: failed to write %s/feature-rx-copy: + %d\n, xbusd-xbusd_path, err); + goto abort_xbt; + } + err = xenbus_printf(xbt, xbusd-xbusd_path, + feature-rx-flip, %d, 1); + if (err) { + printf(xbdback: failed to write %s/feature-rx-flip: + %d\n, xbusd-xbusd_path, err); + goto abort_xbt; + } + } while ((err = xenbus_transaction_end(xbt, 0)) == EAGAIN); + if (err) { + printf(xbdback %s: can't end transaction: %d\n, + xbusd-xbusd_path, err); + } + err = xenbus_switch_state(xbusd, NULL, XenbusStateInitWait); if (err) { printf(failed to switch state on %s: %d\n, @@ -340,6 +363,8 @@ goto fail; } return 0; +abort_xbt: + xenbus_transaction_end(xbt, 1); fail: free(xneti, M_DEVBUF); return err; @@ -407,7 +432,7 @@ struct gnttab_map_grant_ref op; evtchn_op_t evop; u_long tx_ring_ref, rx_ring_ref; - u_long revtchn; + u_long revtchn, rx_copy; XENPRINTF((%s: new state %d\n, xneti-xni_if.if_xname, new_state)); switch(new_state) { @@ -438,6 +463,29 @@ xbusd-xbusd_otherend); break; } + err = xenbus_read_ul(NULL, xbusd-xbusd_otherend, + request-rx-copy, rx_copy, 10); + if (err == ENOENT) + rx_copy = 0; + else if (err) { + xenbus_dev_fatal(xbusd, err, reading %s/request-rx-copy, + xbusd-xbusd_otherend); + break; + } + + if (rx_copy) + xneti-xni_softintr = softint_establish(SOFTINT_NET, + xennetback_ifsoftstart_copy, xneti); + else + xneti-xni_softintr = softint_establish(SOFTINT_NET, + xennetback_ifsoftstart_transfer, xneti); + if (xneti-xni_softintr == NULL) { + err = ENOMEM; + xenbus_dev_fatal(xbusd, ENOMEM, + can't allocate softint, xbusd-xbusd_otherend); + break; + } + /* allocate VA space and map rings */ xneti-xni_tx_ring_va = uvm_km_alloc(kernel_map, PAGE_SIZE, 0, UVM_KMF_VAONLY); @@ -830,13 +878,13 @@ * schedule batch of packets for the domain. To achieve
CVS commit: [netbsd-5] src/sys/arch/xen/xen
Module Name:src Committed By: snj Date: Mon Sep 28 01:47:49 UTC 2009 Modified Files: src/sys/arch/xen/xen [netbsd-5]: xennetback_xenbus.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1030): sys/arch/xen/xen/xennetback_xenbus.c: revision 1.30 Don't disestablish a soft interrupt which has not been established. To generate a diff of this commit: cvs rdiff -u -r1.24.4.1 -r1.24.4.2 src/sys/arch/xen/xen/xennetback_xenbus.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/xen/xennetback_xenbus.c diff -u src/sys/arch/xen/xen/xennetback_xenbus.c:1.24.4.1 src/sys/arch/xen/xen/xennetback_xenbus.c:1.24.4.2 --- src/sys/arch/xen/xen/xennetback_xenbus.c:1.24.4.1 Mon Sep 28 01:46:48 2009 +++ src/sys/arch/xen/xen/xennetback_xenbus.c Mon Sep 28 01:47:49 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: xennetback_xenbus.c,v 1.24.4.1 2009/09/28 01:46:48 snj Exp $ */ +/* $NetBSD: xennetback_xenbus.c,v 1.24.4.2 2009/09/28 01:47:49 snj Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -385,7 +385,10 @@ aprint_verbose_ifnet(xneti-xni_if, disconnecting\n); hypervisor_mask_event(xneti-xni_evtchn); event_remove_handler(xneti-xni_evtchn, xennetback_evthandler, xneti); - softint_disestablish(xneti-xni_softintr); + if (xneti-xni_softintr) { + softint_disestablish(xneti-xni_softintr); + xneti-xni_softintr = NULL; + } SLIST_REMOVE(xnetback_instances, xneti, xnetback_instance, next);
CVS commit: [netbsd-5] src/external/mit/xorg/server/xorg-server
Module Name:src Committed By: snj Date: Mon Sep 28 01:54:16 UTC 2009 Modified Files: src/external/mit/xorg/server/xorg-server [netbsd-5]: Makefile.Xserver Log Message: Pull up following revision(s) (requested by mrg in ticket #1032): external/mit/xorg/server/xorg-server/Makefile.Xserver: revision 1.11 xorg-server servers depend upon -Wl,--export-dynamic these days. spotted by u...@. fixes at least swrast userland and Xnest. To generate a diff of this commit: cvs rdiff -u -r1.7.6.2 -r1.7.6.3 \ src/external/mit/xorg/server/xorg-server/Makefile.Xserver Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/server/xorg-server/Makefile.Xserver diff -u src/external/mit/xorg/server/xorg-server/Makefile.Xserver:1.7.6.2 src/external/mit/xorg/server/xorg-server/Makefile.Xserver:1.7.6.3 --- src/external/mit/xorg/server/xorg-server/Makefile.Xserver:1.7.6.2 Thu Sep 17 04:24:37 2009 +++ src/external/mit/xorg/server/xorg-server/Makefile.Xserver Mon Sep 28 01:54:16 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.Xserver,v 1.7.6.2 2009/09/17 04:24:37 snj Exp $ +# $NetBSD: Makefile.Xserver,v 1.7.6.3 2009/09/28 01:54:16 snj Exp $ .for _SL in \ mi \ @@ -71,6 +71,9 @@ LDADD.XORG_CORE= ${LDADD.dix} ${LDADD.config} DPADD.XORG_CORE= ${DPADD.dix} ${DPADD.config} +# X servers need all symbols exported +LDFLAGS+= -Wl,--export-dynamic + CPPFLAGS+= -I${X11SRCDIR.xorg-server}/include \ -I${X11SRCDIR.xorg-server}/Xext \ -I${DESTDIR}${X11INCDIR}/pixman-1 \
CVS commit: [netbsd-5] src/external/mit/xorg
Module Name:src Committed By: snj Date: Mon Sep 28 01:57:05 UTC 2009 Modified Files: src/external/mit/xorg/bin/xkbcomp [netbsd-5]: Makefile src/external/mit/xorg/server/xorg-server/xkb [netbsd-5]: Makefile Added Files: src/external/mit/xorg/bin/xkbcomp [netbsd-5]: Makefile.common Log Message: Pull up following revision(s) (requested by mrg in ticket #1033): external/mit/xorg/bin/xkbcomp/Makefile: revision 1.4 external/mit/xorg/bin/xkbcomp/Makefile.common: revision 1.1 external/mit/xorg/server/xorg-server/xkb/Makefile: revision 1.6 share XKBCOMPDIR between xkbcomp and xorg-server. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.8.1 -r1.1.1.1.8.2 \ src/external/mit/xorg/bin/xkbcomp/Makefile cvs rdiff -u -r0 -r1.1.2.2 src/external/mit/xorg/bin/xkbcomp/Makefile.common cvs rdiff -u -r1.3.8.2 -r1.3.8.3 \ src/external/mit/xorg/server/xorg-server/xkb/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/bin/xkbcomp/Makefile diff -u src/external/mit/xorg/bin/xkbcomp/Makefile:1.1.1.1.8.1 src/external/mit/xorg/bin/xkbcomp/Makefile:1.1.1.1.8.2 --- src/external/mit/xorg/bin/xkbcomp/Makefile:1.1.1.1.8.1 Thu Sep 17 04:24:29 2009 +++ src/external/mit/xorg/bin/xkbcomp/Makefile Mon Sep 28 01:57:05 2009 @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.1.1.1.8.1 2009/09/17 04:24:29 snj Exp $ +# $NetBSD: Makefile,v 1.1.1.1.8.2 2009/09/28 01:57:05 snj Exp $ .include bsd.own.mk +.include Makefile.common PROG= xkbcomp SRCS= xkbcomp.c xkbscan.c expr.c vmod.c indicators.c misc.c \ @@ -8,11 +9,9 @@ symbols.c geometry.c xkbpath.c listing.c \ xkbparse.y parseutils.c utils.c -XKBCOMPDIR= /var/db/xkb CPPFLAGS.xkbpath.c= -DDFLT_XKB_CONFIG_ROOT=\${XKBCOMPDIR}\ CPPFLAGS+= -I${X11SRCDIR.${PROG}} -I${X11SRCDIR.${PROG}}/../include -DHAVE_CONFIG_H -CPPFLAGS.xkbpath.c= -DDFLT_XKB_CONFIG_ROOT=\${X11LIBDIR}/xkb\ CPPFLAGS.geometry.c= -Wno-error # XXX FILESDIR=${X11LIBDIR}/xkb Index: src/external/mit/xorg/server/xorg-server/xkb/Makefile diff -u src/external/mit/xorg/server/xorg-server/xkb/Makefile:1.3.8.2 src/external/mit/xorg/server/xorg-server/xkb/Makefile:1.3.8.3 --- src/external/mit/xorg/server/xorg-server/xkb/Makefile:1.3.8.2 Thu Sep 17 04:24:42 2009 +++ src/external/mit/xorg/server/xorg-server/xkb/Makefile Mon Sep 28 01:57:05 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3.8.2 2009/09/17 04:24:42 snj Exp $ +# $NetBSD: Makefile,v 1.3.8.3 2009/09/28 01:57:05 snj Exp $ .include ../Makefile.serverlib .include ../Makefile.servermod @@ -30,12 +30,14 @@ -I${X11SRCDIR.xorg-server}/hw/xfree86/common \ -I${X11SRCDIR.xorg-server}/../include -CPPFLAGS+= -DXKB_IN_SERVER -DHAVE_XKB_CONFIG_H +# For ${XKBCOMPDIR} +.include ../../../bin/xkbcomp/Makefile.common -CPPFLAGS.xkbInit.c= -DXKB_BASE_DIRECTORY=\${X11LIBDIR}/xkb\ \ - -DXKB_BIN_DIRECTORY=\${X11BINDIR}\ \ - -DXKM_OUTPUT_DIR=\${X11LIBDIR}/xkb/compiled\ \ - -DXKB_DFLT_DISABLED=0 +CPPFLAGS+= -DXKB_IN_SERVER -DHAVE_XKB_CONFIG_H \ + -DXKB_BASE_DIRECTORY=\${X11LIBDIR}/xkb\ \ + -DXKB_BIN_DIRECTORY=\${X11BINDIR}\ \ + -DXKM_OUTPUT_DIR=\${XKBCOMPDIR}\ \ + -DXKB_DFLT_DISABLED=0 COPTS.XKBAlloc.c= -Wno-error # XXX gcc 3.3 COPTS.XKBMAlloc.c= -Wno-error # XXX gcc 3.3 Added files: Index: src/external/mit/xorg/bin/xkbcomp/Makefile.common diff -u /dev/null src/external/mit/xorg/bin/xkbcomp/Makefile.common:1.1.2.2 --- /dev/null Mon Sep 28 01:57:05 2009 +++ src/external/mit/xorg/bin/xkbcomp/Makefile.common Mon Sep 28 01:57:05 2009 @@ -0,0 +1,3 @@ +# $NetBSD: Makefile.common,v 1.1.2.2 2009/09/28 01:57:05 snj Exp $ + +XKBCOMPDIR= /var/db/xkb
CVS commit: [netbsd-5] src/external/mit/xorg/bin/xterm
Module Name:src Committed By: snj Date: Mon Sep 28 02:02:50 UTC 2009 Modified Files: src/external/mit/xorg/bin/xterm [netbsd-5]: Makefile Log Message: Pull up following revision(s) (requested by mrg in ticket #1034): external/mit/xorg/bin/xterm/Makefile: revision 1.4 Update for new xterm. To generate a diff of this commit: cvs rdiff -u -r1.2.4.1 -r1.2.4.2 src/external/mit/xorg/bin/xterm/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/bin/xterm/Makefile diff -u src/external/mit/xorg/bin/xterm/Makefile:1.2.4.1 src/external/mit/xorg/bin/xterm/Makefile:1.2.4.2 --- src/external/mit/xorg/bin/xterm/Makefile:1.2.4.1 Mon Apr 20 23:20:57 2009 +++ src/external/mit/xorg/bin/xterm/Makefile Mon Sep 28 02:02:50 2009 @@ -1,13 +1,13 @@ -# $NetBSD: Makefile,v 1.2.4.1 2009/04/20 23:20:57 snj Exp $ +# $NetBSD: Makefile,v 1.2.4.2 2009/09/28 02:02:50 snj Exp $ .include bsd.own.mk PROG= xterm SRCS= button.c charproc.c charsets.c cursor.c data.c doublechr.c \ - fontutils.c input.c menu.c misc.c print.c ptydata.c screen.c \ - scrollbar.c tabs.c util.c xstrings.c TekPrsTbl.c Tekproc.c VTPrsTbl.c \ - main.c charclass.c precompose.c wcwidth.c xutf8.c cachedGCs.c \ - xtermcap.c + fontutils.c input.c linedata.c menu.c misc.c print.c ptydata.c \ + screen.c scrollback.c scrollbar.c tabs.c util.c xstrings.c \ + TekPrsTbl.c Tekproc.c VTPrsTbl.c main.c charclass.c precompose.c \ + wcwidth.c xutf8.c cachedGCs.c xtermcap.c CPPFLAGS+= -I${X11SRCDIR.${PROG}} \ -I${DESTDIR}${X11INCDIR}/freetype2 \
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: snj Date: Mon Sep 28 02:17:23 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Tickets 1023-1034. To generate a diff of this commit: cvs rdiff -u -r1.1.2.76 -r1.1.2.77 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.76 src/doc/CHANGES-5.1:1.1.2.77 --- src/doc/CHANGES-5.1:1.1.2.76 Sat Sep 26 20:08:11 2009 +++ src/doc/CHANGES-5.1 Mon Sep 28 02:17:23 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.76 2009/09/26 20:08:11 snj Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.77 2009/09/28 02:17:23 snj Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -13538,3 +13538,158 @@ sh MAKEDEV audio [jmcneill, ticket #946] +sys/conf/files 1.947, 1.956 via patch +sys/dev/ata/files.ata1.21 +sys/dev/ata/satafis_subr.c 1.1-1.3 +sys/dev/ata/satafisreg.h 1.1 +sys/dev/ata/satafisvar.h 1.1-1.2 +sys/dev/ic/siisata.c1.3-1.7 +sys/dev/ic/siisatareg.h1.3-1.4 +sys/dev/ic/siisatavar.h1.3-1.4 +sys/dev/pci/files.pci1.315, 1.321 +sys/dev/pci/siisata_pci.c 1.3. 1.4 + + Sync siisata(4) with HEAD, fixing PR kern/41579 and a number of + other bugs. + [jakllsch, ticket #1023] + + +sys/dev/pci/hdaudio/hdaudio_afg.c 1.15 + + Ensure that hp sensing is stopped on suspend, and restarted on + resume if required. + [jmcneill, ticket #1024] + +sys/arch/xen/xen/xbd_xenbus.c 1.40 + + Implement DIOCGDISKINFO for xbd disk driver. + [bouyer, ticket #1025] + +sys/arch/xen/xen/xbd_xenbus.c 1.43 via patch +sys/arch/xen/xen/xbdback_xenbus.c 1.25 + + xbdback: implement and publish feature-flush-cache. + xbd: if feature-flush-cache is present, use it for DIOCCACHESYNC. + If not present, make DIOCCACHESYNC return EOPNOTSUPP and warn on + first call. + Should improve WAPBL reliability of Xen guests on a NetBSD dom0. + Unfortunably not all linux guests seem to support this feature, + and using feature-write-barrier would require a B_BARRIER flag in + the buffer. + [bouyer, ticket #1026] + +sys/arch/xen/xen/if_xennet_xenbus.c 1.36 + + Write a feature-rx-notify to the xenstore, which is used by + recent linux dom0 kernels. This reduces packet loss when using a + NetBSD domU on such linux dom0. + This entry is ignored by NetBSD and older linux domUs. + [bouyer, ticket #1027] + +sys/kern/kern_turnstile.c 1.25 via patch + + Fix PR kern/41923. In the for(;;) loop of turnstile_block(), the + lock owner can change while cur's lock is released (cur's lock is + also the tschain_t's mutex). Remove the KASSERT about owner + being invariant and try to deal with the fact that the owner can + change instead. + [bouyer, ticket #1028] + +sys/ufs/ufs/ufs_ihash.c1.27 + + PR kern/41147: race between nfsd and local rm. Note that the race + also exists between 2 nfs client, one of them doing the rm. In + ufs_ihashget(), vget() can return a vnode that has been vclean'ed + because vget() can sleep. After vget returns, check that vp is + still connected with ip, and that ip still points to the inode we + want. + [bouyer, ticket #1029] + +sys/arch/xen/xen/xennetback_xenbus.c 1.29 via patch, 1.30 + + Announce feature-rx-copy and feature-rx-flip. Add support for + request-rx-copy. Tested with a Debian lenny install. Should fix + PR port-xen/40650 + [bouyer, ticket #1030] + +xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Cursors.c 1.2 + + Check that dixLookupPrivate() returned non-NULL before + dereferencing it. Fixes a SEGV when starting ioquake3 on an X + server started with the -dpi 100 -depth 16 flags. + [mrg, ticket #1031] + +external/mit/xorg/server/xorg-server/Makefile.Xserver 1.11 + + xorg-server servers depend upon -Wl,--export-dynamic these days. + Fixes at least swrast userland and Xnest. + [mrg, ticket #1032] + +external/mit/xorg/bin/xkbcomp/Makefile 1.4 +external/mit/xorg/bin/xkbcomp/Makefile.common 1.1 +external/mit/xorg/server/xorg-server/xkb/Makefile 1.6 + + Share XKBCOMPDIR between xkbcomp and xorg-server. + [mrg, ticket #1033] + +external/mit/xorg/bin/xterm/Makefile 1.4 +xsrc/external/mit/xterm/dist/INSTALL patch +xsrc/external/mit/xterm/dist/Imakefile patch +xsrc/external/mit/xterm/dist/MANIFEST patch +xsrc/external/mit/xterm/dist/Makefile.in patch +xsrc/external/mit/xterm/dist/Tekproc.c patch +xsrc/external/mit/xterm/dist/XTerm-col.ad patch +xsrc/external/mit/xterm/dist/XTerm.ad patch +xsrc/external/mit/xterm/dist/aclocal.m4 patch +xsrc/external/mit/xterm/dist/button.c patch +xsrc/external/mit/xterm/dist/cachedGCs.c patch +xsrc/external/mit/xterm/dist/charproc.c patch +xsrc/external/mit/xterm/dist/charsets.c patch +xsrc/external/mit/xterm/dist/config.guess patch +xsrc/external/mit/xterm/dist/config.sub patch +xsrc/external/mit/xterm/dist/configure patch +xsrc/external/mit/xterm/dist/configure.in patch
CVS commit: [netbsd-5] src/sys/arch/sgimips/gio
Module Name:src Committed By: snj Date: Sat Sep 26 17:36:18 UTC 2009 Modified Files: src/sys/arch/sgimips/gio [netbsd-5]: newport.c Log Message: Pull up following revision(s) (requested by macallan in ticket #963): sys/arch/sgimips/gio/newport.c: revision 1.11 A bunch of bugfixes: - set blitter direction appropriately so scrolling downwards works now - remove a bunch of false +1 so we only copy/erase what we really need to - slightly change the logic for the cursor sprite offset so it works on this Indy ( I think what matters is VC2 revision 0 ) TODO: virtual consoles, fonts wider than 8 pixels To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.10.54.1 src/sys/arch/sgimips/gio/newport.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/sgimips/gio/newport.c diff -u src/sys/arch/sgimips/gio/newport.c:1.10 src/sys/arch/sgimips/gio/newport.c:1.10.54.1 --- src/sys/arch/sgimips/gio/newport.c:1.10 Sun Mar 4 06:00:39 2007 +++ src/sys/arch/sgimips/gio/newport.c Sat Sep 26 17:36:18 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: newport.c,v 1.10 2007/03/04 06:00:39 christos Exp $ */ +/* $NetBSD: newport.c,v 1.10.54.1 2009/09/26 17:36:18 snj Exp $ */ /* * Copyright (c) 2003 Ilpo Ruotsalainen @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: newport.c,v 1.10 2007/03/04 06:00:39 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: newport.c,v 1.10.54.1 2009/09/26 17:36:18 snj Exp $); #include sys/param.h #include sys/systm.h @@ -407,7 +407,22 @@ uint32_t tmp; rex3_wait_gfifo(dc); - + if (dy y1) { + /* need to copy bottom up */ + dy += (y2 - y1); + tmp = y2; + y2 = y1; + y1 = tmp; + } + + if (dx x1) { + /* need to copy right to left */ + dx += (x2 - x1); + tmp = x2; + x2 = x1; + x1 = tmp; + } + rex3_write(dc, REX3_REG_DRAWMODE0, REX3_DRAWMODE0_OPCODE_SCR2SCR | REX3_DRAWMODE0_ADRMODE_BLOCK | REX3_DRAWMODE0_DOSETUP | REX3_DRAWMODE0_STOPONX | REX3_DRAWMODE0_STOPONY); @@ -696,10 +711,10 @@ control ~VC2_CONTROL_CURSOR_ENABLE); } else { /* Work around bug in some board revisions */ - if (dc-dc_boardrev 6) - x_offset = 21; - else if (dc-dc_vc2rev == 0) + if (dc-dc_vc2rev == 0) x_offset = 29; + else if (dc-dc_boardrev 6) + x_offset = 21; else x_offset = 31; @@ -783,7 +798,7 @@ newport_copy_rectangle(dc, srccol * font-fontwidth, /* x1 */ row * font-fontheight, /* y1 */ - (srccol + ncols + 1) * font-fontwidth - 1, /* x2 */ + (srccol + ncols) * font-fontwidth - 1, /* x2 */ (row + 1) * font-fontheight - 1, /* y2 */ dstcol * font-fontheight, /* dx */ row * font-fontheight); /* dy */ @@ -799,7 +814,7 @@ newport_fill_rectangle(dc, startcol * font-fontwidth,/* x1 */ row * font-fontheight,/* y1 */ - (startcol + ncols + 1) * font-fontwidth - 1, /* x2 */ + (startcol + ncols) * font-fontwidth - 1, /* x2 */ (row + 1) * font-fontheight - 1, /* y2 */ NEWPORT_ATTR_BG(attr)); } @@ -814,7 +829,7 @@ 0, /* x1 */ srcrow * font-fontheight,/* y1 */ dc-dc_xres, /* x2 */ - (srcrow + nrows + 1) * font-fontheight - 1, /* y2 */ + (srcrow + nrows) * font-fontheight - 1, /* y2 */ 0, /* dx */ dstrow * font-fontheight);/* dy */ } @@ -829,7 +844,7 @@ 0, /* x1 */ startrow * font-fontheight, /* y1 */ dc-dc_xres, /* x2 */ - (startrow + nrows + 1) * font-fontheight - 1, /* y2 */ + (startrow + nrows) * font-fontheight - 1, /* y2 */ NEWPORT_ATTR_BG(attr)); }
CVS commit: [netbsd-5] src/sys/arch/sgimips/gio
Module Name:src Committed By: snj Date: Sat Sep 26 17:46:59 UTC 2009 Modified Files: src/sys/arch/sgimips/gio [netbsd-5]: files.gio newport.c Log Message: Pull up following revision(s) (requested by macallan in ticket #981): sys/arch/sgimips/gio/files.gio: revision 1.10 sys/arch/sgimips/gio/newport.c: revision 1.12 Become a good vcons citizen. Also, don't use the cursor sprite as text cursor - it's not worth the pain and the sprite doesn't have an invert-background plane either so the cursor wasn't transparent. Instead blit the cursor using the appropriate ROPs. This way we get rid of the cursor misplacement problem as well. While there also use device_t. TODO: arbitrary font sizes, cleanup, support for mapping all blitter registers so we can use them from X. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.9.58.1 src/sys/arch/sgimips/gio/files.gio cvs rdiff -u -r1.10.54.1 -r1.10.54.2 src/sys/arch/sgimips/gio/newport.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/sgimips/gio/files.gio diff -u src/sys/arch/sgimips/gio/files.gio:1.9 src/sys/arch/sgimips/gio/files.gio:1.9.58.1 --- src/sys/arch/sgimips/gio/files.gio:1.9 Fri Dec 29 00:42:01 2006 +++ src/sys/arch/sgimips/gio/files.gio Sat Sep 26 17:46:59 2009 @@ -1,4 +1,4 @@ -# $NetBSD: files.gio,v 1.9 2006/12/29 00:42:01 rumble Exp $ +# $NetBSD: files.gio,v 1.9.58.1 2009/09/26 17:46:59 snj Exp $ device gio {[slot = -1], [addr = -1]} attach gio at giobus @@ -12,7 +12,7 @@ include arch/sgimips/hpc/files.hpc # XL graphics -device newport: wsemuldisplaydev +device newport: wsemuldisplaydev, vcons, rasops8 attach newport at gio file arch/sgimips/gio/newport.c newport needs-flag Index: src/sys/arch/sgimips/gio/newport.c diff -u src/sys/arch/sgimips/gio/newport.c:1.10.54.1 src/sys/arch/sgimips/gio/newport.c:1.10.54.2 --- src/sys/arch/sgimips/gio/newport.c:1.10.54.1 Sat Sep 26 17:36:18 2009 +++ src/sys/arch/sgimips/gio/newport.c Sat Sep 26 17:46:59 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: newport.c,v 1.10.54.1 2009/09/26 17:36:18 snj Exp $ */ +/* $NetBSD: newport.c,v 1.10.54.2 2009/09/26 17:46:59 snj Exp $ */ /* * Copyright (c) 2003 Ilpo Ruotsalainen @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: newport.c,v 1.10.54.1 2009/09/26 17:36:18 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: newport.c,v 1.10.54.2 2009/09/26 17:46:59 snj Exp $); #include sys/param.h #include sys/systm.h @@ -42,15 +42,18 @@ #include dev/wscons/wsconsio.h #include dev/wscons/wsdisplayvar.h #include dev/wsfont/wsfont.h +#include dev/rasops/rasops.h +#include dev/wscons/wsdisplay_vconsvar.h #include sgimips/gio/giovar.h #include sgimips/gio/newportvar.h #include sgimips/gio/newportreg.h struct newport_softc { - struct device sc_dev; + device_t sc_dev; struct newport_devconfig *sc_dc; + }; struct newport_devconfig { @@ -69,13 +72,15 @@ int dc_depth; int dc_font; + struct wsscreen_descr *dc_screen; struct wsdisplay_font *dc_fontdata; + struct vcons_data dc_vd; }; -static int newport_match(struct device *, struct cfdata *, void *); -static void newport_attach(struct device *, struct device *, void *); +static int newport_match(device_t, struct cfdata *, void *); +static void newport_attach(device_t, device_t, void *); -CFATTACH_DECL(newport, sizeof(struct newport_softc), +CFATTACH_DECL_NEW(newport, sizeof(struct newport_softc), newport_match, newport_attach, NULL, NULL); /* textops */ @@ -88,17 +93,19 @@ static void newport_eraserows(void *, int, int, long); static int newport_allocattr(void *, int, int, int, long *); +static void newport_init_screen(void *, struct vcons_screen *, int, long *); + /* accessops */ static int newport_ioctl(void *, void *, u_long, void *, int, struct lwp *); static paddr_t newport_mmap(void *, void *, off_t, int); -static int newport_alloc_screen(void *, const struct wsscreen_descr *, -void **, int *, int *, long *); -static voidnewport_free_screen(void *, void *); -static int newport_show_screen(void *, void *, int, -void (*)(void *, int, int), void *); -static const struct wsdisplay_emulops newport_textops = { +static struct wsdisplay_accessops newport_accessops = { + .ioctl = newport_ioctl, + .mmap = newport_mmap, +}; + +static struct wsdisplay_emulops newport_textops = { .cursor = newport_cursor, .mapchar = newport_mapchar, .putchar = newport_putchar, @@ -109,15 +116,7 @@ .allocattr = newport_allocattr }; -static const struct wsdisplay_accessops newport_accessops = { - .ioctl = newport_ioctl, - .mmap = newport_mmap, - .alloc_screen = newport_alloc_screen, - .free_screen = newport_free_screen, - .show_screen = newport_show_screen, -}; - -static const struct wsscreen_descr newport_screen_1024x768 = { +static struct wsscreen_descr newport_screen_1024x768 = { .name = 1024x768,
CVS commit: [netbsd-5] src/sys/arch/sgimips/ioc
Module Name:src Committed By: snj Date: Sat Sep 26 17:56:38 UTC 2009 Modified Files: src/sys/arch/sgimips/ioc [netbsd-5]: ioc.c Log Message: Pull up following revision(s) (requested by macallan in ticket #975): sys/arch/sgimips/ioc/ioc.c: revision 1.8 Comment out some register initialization which the firmware should have taken care of anyway. Apparently doing this here disrupts newport's blitter operations and causes a deadlock. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.7.30.1 src/sys/arch/sgimips/ioc/ioc.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/sgimips/ioc/ioc.c diff -u src/sys/arch/sgimips/ioc/ioc.c:1.7 src/sys/arch/sgimips/ioc/ioc.c:1.7.30.1 --- src/sys/arch/sgimips/ioc/ioc.c:1.7 Wed Oct 17 19:57:05 2007 +++ src/sys/arch/sgimips/ioc/ioc.c Sat Sep 26 17:56:37 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ioc.c,v 1.7 2007/10/17 19:57:05 garbled Exp $ */ +/* $NetBSD: ioc.c,v 1.7.30.1 2009/09/26 17:56:37 snj Exp $ */ /* * Copyright (c) 2003 Christopher Sekiya @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ioc.c,v 1.7 2007/10/17 19:57:05 garbled Exp $); +__KERNEL_RCSID(0, $NetBSD: ioc.c,v 1.7.30.1 2009/09/26 17:56:37 snj Exp $); #include sys/param.h #include sys/systm.h @@ -140,10 +140,13 @@ IOC_WRITE_ENET_AUTO | IOC_WRITE_ENET_UTP | IOC_WRITE_PC_UART2 | IOC_WRITE_PC_UART1); +/* XXX: the firmware should have taken care of this already */ +#if 0 if (mach_subtype == MACH_SGI_IP22_GUINNESS) { bus_space_write_4(sc-sc_iot, sc-sc_ioh, IOC_GCSEL, 0xff); bus_space_write_4(sc-sc_iot, sc-sc_ioh, IOC_GCREG, 0xff); } +#endif #if defined(BLINK) ioc_blink(sc);
CVS commit: [netbsd-5] src/sys/arch/sgimips/hpc
Module Name:src Committed By: snj Date: Sat Sep 26 17:59:17 UTC 2009 Modified Files: src/sys/arch/sgimips/hpc [netbsd-5]: haltwo.c Log Message: Pull up following revision(s) (requested by macallan in ticket #964): sys/arch/sgimips/hpc/haltwo.c: revision 1.16 set delta value for the mixer's master channel To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.15.4.1 src/sys/arch/sgimips/hpc/haltwo.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/sgimips/hpc/haltwo.c diff -u src/sys/arch/sgimips/hpc/haltwo.c:1.15 src/sys/arch/sgimips/hpc/haltwo.c:1.15.4.1 --- src/sys/arch/sgimips/hpc/haltwo.c:1.15 Sun Aug 24 13:03:39 2008 +++ src/sys/arch/sgimips/hpc/haltwo.c Sat Sep 26 17:59:17 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: haltwo.c,v 1.15 2008/08/24 13:03:39 tsutsui Exp $ */ +/* $NetBSD: haltwo.c,v 1.15.4.1 2009/09/26 17:59:17 snj Exp $ */ /* * Copyright (c) 2003 Ilpo Ruotsalainen @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: haltwo.c,v 1.15 2008/08/24 13:03:39 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: haltwo.c,v 1.15.4.1 2009/09/26 17:59:17 snj Exp $); #include sys/param.h #include sys/systm.h @@ -609,6 +609,7 @@ dev-prev = dev-next = AUDIO_MIXER_LAST; strcpy(dev-label.name, AudioNmaster); dev-un.v.num_channels = 2; + dev-un.v.delta = 16; strcpy(dev-un.v.units.name, AudioNvolume); break;
CVS commit: [netbsd-5] src/sys/arch/sgimips/hpc
Module Name:src Committed By: snj Date: Sat Sep 26 18:03:07 UTC 2009 Modified Files: src/sys/arch/sgimips/hpc [netbsd-5]: files.hpc hpc.c Added Files: src/sys/arch/sgimips/hpc [netbsd-5]: panel.c Log Message: Pull up following revision(s) (requested by macallan in ticket #976): sys/arch/sgimips/hpc/files.hpc: revision 1.14 sys/arch/sgimips/hpc/hpc.c: revision 1.62 sys/arch/sgimips/hpc/panel.c: revision 1.1 add a driver for the Indy's front panel buttons. - power button presses are reported to sysmon - volume control buttons are reported to PMF TODO: add better key repeat code. The hardware keeps firing interrupts at us whenever a button is down and not on - say - status change. If we don't clear the interrupt we'll be fired on until someone clears it. We should probably disable the entire interrupt and occasionally poll for button release. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.12.70.1 src/sys/arch/sgimips/hpc/files.hpc cvs rdiff -u -r1.60 -r1.60.30.1 src/sys/arch/sgimips/hpc/hpc.c cvs rdiff -u -r0 -r1.1.4.2 src/sys/arch/sgimips/hpc/panel.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/sgimips/hpc/files.hpc diff -u src/sys/arch/sgimips/hpc/files.hpc:1.12 src/sys/arch/sgimips/hpc/files.hpc:1.12.70.1 --- src/sys/arch/sgimips/hpc/files.hpc:1.12 Sun Aug 27 10:05:23 2006 +++ src/sys/arch/sgimips/hpc/files.hpc Sat Sep 26 18:03:06 2009 @@ -1,4 +1,4 @@ -# $NetBSD: files.hpc,v 1.12 2006/08/27 10:05:23 bjh21 Exp $ +# $NetBSD: files.hpc,v 1.12.70.1 2009/09/26 18:03:06 snj Exp $ device sq: arp, ether, ifnet attach sq at hpc @@ -33,3 +33,6 @@ attach pi1ppc at hpc file arch/sgimips/hpc/pi1ppc.c pi1ppc +device panel : sysmon_power, sysmon_taskq +attach panel at hpc +file arch/sgimips/hpc/panel.c panel Index: src/sys/arch/sgimips/hpc/hpc.c diff -u src/sys/arch/sgimips/hpc/hpc.c:1.60 src/sys/arch/sgimips/hpc/hpc.c:1.60.30.1 --- src/sys/arch/sgimips/hpc/hpc.c:1.60 Wed Oct 17 19:57:04 2007 +++ src/sys/arch/sgimips/hpc/hpc.c Sat Sep 26 18:03:06 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: hpc.c,v 1.60 2007/10/17 19:57:04 garbled Exp $ */ +/* $NetBSD: hpc.c,v 1.60.30.1 2009/09/26 18:03:06 snj Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: hpc.c,v 1.60 2007/10/17 19:57:04 garbled Exp $); +__KERNEL_RCSID(0, $NetBSD: hpc.c,v 1.60.30.1 2009/09/26 18:03:06 snj Exp $); #include sys/param.h #include sys/systm.h @@ -214,6 +214,12 @@ -1, HPCDEV_IP22 | HPCDEV_IP24 }, + { panel, /* Indy front panel */ + HPC_BASE_ADDRESS_0, + HPC3_PBUS_CH6_DEVREGS + IOC_PANEL, 0, + 9, + HPCDEV_IP24 }, + { NULL, 0, 0, 0, Added files: Index: src/sys/arch/sgimips/hpc/panel.c diff -u /dev/null src/sys/arch/sgimips/hpc/panel.c:1.1.4.2 --- /dev/null Sat Sep 26 18:03:07 2009 +++ src/sys/arch/sgimips/hpc/panel.c Sat Sep 26 18:03:06 2009 @@ -0,0 +1,149 @@ +/* $NetBSD: panel.c,v 1.1.4.2 2009/09/26 18:03:06 snj Exp $ */ + +/*- + * Copyright (c) 2009 Michael Lorenz + * All rights reserved. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. + */ + +#include sys/cdefs.h +__KERNEL_RCSID(0, $NetBSD: panel.c,v 1.1.4.2 2009/09/26 18:03:06 snj Exp $); + +#include sys/param.h +#include sys/systm.h +#include sys/kernel.h +#include sys/device.h +#include sys/proc.h +#include sys/kthread.h + +#include sys/bus.h + +#include dev/sysmon/sysmonvar.h +#include dev/sysmon/sysmon_taskq.h + +#include machine/autoconf.h +#include machine/machtype.h + +#include sgimips/ioc/iocreg.h +#include sgimips/hpc/hpcvar.h +#include