CVS commit: src/usr.sbin/envstat
Module Name:src Committed By: wiz Date: Sat Jan 30 08:57:49 UTC 2010 Modified Files: src/usr.sbin/envstat: envstat.8 Log Message: New sentence, new line. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/usr.sbin/envstat/envstat.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/envstat/envstat.8 diff -u src/usr.sbin/envstat/envstat.8:1.52 src/usr.sbin/envstat/envstat.8:1.53 --- src/usr.sbin/envstat/envstat.8:1.52 Sat Jan 30 02:56:39 2010 +++ src/usr.sbin/envstat/envstat.8 Sat Jan 30 08:57:49 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: envstat.8,v 1.52 2010/01/30 02:56:39 pgoyette Exp $ +.\ $NetBSD: envstat.8,v 1.53 2010/01/30 08:57:49 wiz Exp $ .\ .\ Copyright (c) 2000, 2007, 2008, 2009 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -131,7 +131,8 @@ Each column is additionally separated by a single space. The default is the length of the longest sensor name. .It Fl W -This option has no effect. It is retained for historical reasons. +This option has no effect. +It is retained for historical reasons. .It Fl x Shows the property list used by the .Xr sysmon_envsys 9
CVS commit: src/sys
Module Name:src Committed By: mlelstv Date: Sat Jan 30 11:57:18 UTC 2010 Modified Files: src/sys/kern: subr_disk_open.c src/sys/sys: device.h Log Message: Add helper function that determines the size and block size of a disk device. For now we query - the disk label - the wedge info and data from disk(9) To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/kern/subr_disk_open.c cvs rdiff -u -r1.132 -r1.133 src/sys/sys/device.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_disk_open.c diff -u src/sys/kern/subr_disk_open.c:1.1 src/sys/kern/subr_disk_open.c:1.2 --- src/sys/kern/subr_disk_open.c:1.1 Sun Sep 6 16:18:56 2009 +++ src/sys/kern/subr_disk_open.c Sat Jan 30 11:57:17 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_disk_open.c,v 1.1 2009/09/06 16:18:56 pooka Exp $ */ +/* $NetBSD: subr_disk_open.c,v 1.2 2010/01/30 11:57:17 mlelstv Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: subr_disk_open.c,v 1.1 2009/09/06 16:18:56 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: subr_disk_open.c,v 1.2 2010/01/30 11:57:17 mlelstv Exp $); #include sys/param.h #include sys/conf.h @@ -80,3 +80,31 @@ return tmpvn; } + +int +getdisksize(struct vnode *vp, uint64_t *numsecp, unsigned *secsizep) +{ + struct partinfo dpart; + struct dkwedge_info dkw; + struct disk *pdk; + int error; + + error = VOP_IOCTL(vp, DIOCGPART, dpart, FREAD, NOCRED); + if (error == 0) { + *secsizep = dpart.disklab-d_secsize; + *numsecp = dpart.part-p_size; + return 0; + } + + error = VOP_IOCTL(vp, DIOCGWEDGEINFO, dkw, FREAD, NOCRED); + if (error == 0) { + pdk = disk_find(dkw.dkw_parent); + if (pdk != NULL) { + *secsizep = DEV_BSIZE pdk-dk_blkshift; + *numsecp = dkw.dkw_size; + } else + error = ENODEV; + } + + return error; +} Index: src/sys/sys/device.h diff -u src/sys/sys/device.h:1.132 src/sys/sys/device.h:1.133 --- src/sys/sys/device.h:1.132 Sun Jan 10 20:11:50 2010 +++ src/sys/sys/device.h Sat Jan 30 11:57:18 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: device.h,v 1.132 2010/01/10 20:11:50 martin Exp $ */ +/* $NetBSD: device.h,v 1.133 2010/01/30 11:57:18 mlelstv Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -426,6 +426,7 @@ extern int booted_partition; /* or the partition on that device */ struct vnode *opendisk(struct device *); +int getdisksize(struct vnode *, uint64_t *, unsigned *); int config_handle_wedges(struct device *, int); void config_init(void);
CVS commit: src/sys/miscfs/genfs
Module Name:src Committed By: uebayasi Date: Sat Jan 30 12:06:20 UTC 2010 Modified Files: src/sys/miscfs/genfs: genfs_io.c Log Message: Reduce the diff between genfs_getpages() and genfs_do_io(). These should be merged eventually. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/miscfs/genfs/genfs_io.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/miscfs/genfs/genfs_io.c diff -u src/sys/miscfs/genfs/genfs_io.c:1.35 src/sys/miscfs/genfs/genfs_io.c:1.36 --- src/sys/miscfs/genfs/genfs_io.c:1.35 Sat Jan 30 05:19:20 2010 +++ src/sys/miscfs/genfs/genfs_io.c Sat Jan 30 12:06:20 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: genfs_io.c,v 1.35 2010/01/30 05:19:20 uebayasi Exp $ */ +/* $NetBSD: genfs_io.c,v 1.36 2010/01/30 12:06:20 uebayasi Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: genfs_io.c,v 1.35 2010/01/30 05:19:20 uebayasi Exp $); +__KERNEL_RCSID(0, $NetBSD: genfs_io.c,v 1.36 2010/01/30 12:06:20 uebayasi Exp $); #include sys/param.h #include sys/systm.h @@ -490,8 +490,9 @@ error = VOP_BMAP(vp, lbn, devvp, blkno, run); if (error) { UVMHIST_LOG(ubchist, VOP_BMAP lbn 0x%x - %d\n, - lbn, error,0,0); + lbn,error,0,0); skipbytes += bytes; + bytes = 0; goto loopdone; } @@ -521,7 +522,7 @@ * mark the pages we zeroed PG_RDONLY. */ - if (blkno 0) { + if (blkno == (daddr_t)-1) { int holepages = (round_page(offset + iobytes) - trunc_page(offset)) PAGE_SHIFT; UVMHIST_LOG(ubchist, lbn 0x%x - HOLE, lbn,0,0,0); @@ -551,6 +552,8 @@ if (offset == startoffset iobytes == bytes) { bp = mbp; } else { + UVMHIST_LOG(ubchist, vp %p bp %p num now %d, + vp, bp, vp-v_numoutput, 0); bp = getiobuf(vp, true); nestiobuf_setup(mbp, bp, offset - startoffset, iobytes); } @@ -562,7 +565,7 @@ UVMHIST_LOG(ubchist, bp %p offset 0x%x bcount 0x%x blkno 0x%x, - bp, offset, iobytes, bp-b_blkno); + bp, offset, bp-b_bcount, bp-b_blkno); VOP_STRATEGY(devvp, bp); } @@ -1283,13 +1286,11 @@ genfs_do_io(struct vnode *vp, off_t off, vaddr_t kva, size_t len, int flags, enum uio_rw rw, void (*iodone)(struct buf *)) { - int s, error, run; + int s, error; int fs_bshift, dev_bshift; off_t eof, offset, startoffset; size_t bytes, iobytes, skipbytes; - daddr_t lbn, blkno; struct buf *mbp, *bp; - struct vnode *devvp; const bool async = (flags PGO_SYNCIO) == 0; const bool iowrite = rw == UIO_WRITE; const int brw = iowrite ? B_WRITE : B_READ; @@ -1343,27 +1344,56 @@ for (offset = startoffset; bytes 0; offset += iobytes, bytes -= iobytes) { + int run; + daddr_t lbn, blkno; + struct vnode *devvp; + + /* + * bmap the file to find out the blkno to read from and + * how much we can read in one i/o. if bmap returns an error, + * skip the rest of the top-level i/o. + */ + lbn = offset fs_bshift; error = VOP_BMAP(vp, lbn, devvp, blkno, run); if (error) { - UVMHIST_LOG(ubchist, VOP_BMAP() - %d, error,0,0,0); + UVMHIST_LOG(ubchist, VOP_BMAP lbn 0x%x - %d\n, + lbn,error,0,0); skipbytes += bytes; bytes = 0; - break; + goto loopdone; } + /* + * see how many pages can be read with this i/o. + * reduce the i/o size if necessary to avoid + * overwriting pages with valid data. + */ + iobytes = MINoff_t)lbn + 1 + run) fs_bshift) - offset, bytes); + + /* + * if this block isn't allocated, zero it instead of + * reading it. unless we are going to allocate blocks, + * mark the pages we zeroed PG_RDONLY. + */ + if (blkno == (daddr_t)-1) { if (!iowrite) { memset((char *)kva + (offset - startoffset), 0, - iobytes); +iobytes); } skipbytes += iobytes; continue; } - /* if it's really one i/o, don't make a second buf */ + /* + * allocate a sub-buf for this piece of the i/o + * (or just use mbp if there's only 1 piece), + * and start it going. + */ + if (offset == startoffset iobytes == bytes) { bp = mbp; } else { @@ -1377,12 +1407,15 @@ /* adjust physical blkno for partial blocks */ bp-b_blkno = blkno + ((offset - ((off_t)lbn fs_bshift)) dev_bshift); + UVMHIST_LOG(ubchist, - vp %p offset 0x%x bcount 0x%x blkno 0x%x, - vp, offset, bp-b_bcount, bp-b_blkno); + bp %p offset 0x%x bcount 0x%x blkno 0x%x, + bp, offset, bp-b_bcount, bp-b_blkno); VOP_STRATEGY(devvp, bp); } + +loopdone: if (skipbytes) { UVMHIST_LOG(ubchist, skipbytes %d, skipbytes, 0,0,0); }
CVS commit: src/sys/uvm
Module Name:src Committed By: uebayasi Date: Sat Jan 30 15:13:25 UTC 2010 Modified Files: src/sys/uvm: uvm_fault.c Log Message: Calculate the offset from vm_map_entry's start to vm_page array's start once. To generate a diff of this commit: cvs rdiff -u -r1.130 -r1.131 src/sys/uvm/uvm_fault.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/uvm/uvm_fault.c diff -u src/sys/uvm/uvm_fault.c:1.130 src/sys/uvm/uvm_fault.c:1.131 --- src/sys/uvm/uvm_fault.c:1.130 Sun Jan 24 15:03:02 2010 +++ src/sys/uvm/uvm_fault.c Sat Jan 30 15:13:25 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_fault.c,v 1.130 2010/01/24 15:03:02 uebayasi Exp $ */ +/* $NetBSD: uvm_fault.c,v 1.131 2010/01/30 15:13:25 uebayasi Exp $ */ /* * @@ -39,7 +39,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.130 2010/01/24 15:03:02 uebayasi Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.131 2010/01/30 15:13:25 uebayasi Exp $); #include opt_uvmhist.h @@ -872,6 +872,8 @@ centeridx = 0; } + /* offset from entry's start to pgs' start */ + const voff_t eoff = startva - ufi.entry-start; /* locked: maps(read) */ UVMHIST_LOG(maphist, narrow=%d, back=%d, forw=%d, startva=0x%x, @@ -886,8 +888,7 @@ if (amap) { amap_lock(amap); anons = anons_store; - amap_lookups(ufi.entry-aref, startva - ufi.entry-start, - anons, npages); + amap_lookups(ufi.entry-aref, eoff, anons, npages); } else { anons = NULL; /* to be safe */ } @@ -910,7 +911,7 @@ /* flush object? */ if (uobj) { - uoff = (startva - ufi.entry-start) + ufi.entry-offset; + uoff = ufi.entry-offset + eoff; mutex_enter(uobj-vmobjlock); (void) (uobj-pgops-pgo_put)(uobj, uoff, uoff + (nback PAGE_SHIFT), PGO_DEACTIVATE); @@ -1049,8 +1050,7 @@ uvmexp.fltlget++; gotpages = npages; - (void) uobj-pgops-pgo_get(uobj, ufi.entry-offset + -(startva - ufi.entry-start), + (void) uobj-pgops-pgo_get(uobj, ufi.entry-offset + eoff, pages, gotpages, centeridx, access_type MASK(ufi.entry), ufi.entry-advice, PGO_LOCKED);
CVS commit: src/sys/dev
Module Name:src Committed By: jakllsch Date: Sat Jan 30 16:16:35 UTC 2010 Modified Files: src/sys/dev/cardbus: siisata_cardbus.c src/sys/dev/ic: siisata.c src/sys/dev/pci: siisata_pci.c Log Message: Sprinkle __KERNEL_RCSID() into siisata(4). Slightly adjust some comment styling. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/cardbus/siisata_cardbus.c cvs rdiff -u -r1.8 -r1.9 src/sys/dev/ic/siisata.c cvs rdiff -u -r1.6 -r1.7 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/cardbus/siisata_cardbus.c diff -u src/sys/dev/cardbus/siisata_cardbus.c:1.3 src/sys/dev/cardbus/siisata_cardbus.c:1.4 --- src/sys/dev/cardbus/siisata_cardbus.c:1.3 Fri Jan 8 19:47:42 2010 +++ src/sys/dev/cardbus/siisata_cardbus.c Sat Jan 30 16:16:35 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: siisata_cardbus.c,v 1.3 2010/01/08 19:47:42 dyoung Exp $ */ +/* $NetBSD: siisata_cardbus.c,v 1.4 2010/01/30 16:16:35 jakllsch Exp $ */ /* Id: siisata_pci.c,v 1.11 2008/05/21 16:20:11 jakllsch Exp */ /* @@ -26,7 +26,7 @@ * */ -/*- +/* * Copyright (c) 2007, 2008 Jonathan A. Kollasch. * All rights reserved. * @@ -49,11 +49,10 @@ * 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: siisata_cardbus.c,v 1.4 2010/01/30 16:16:35 jakllsch Exp $); #include sys/types.h #include sys/malloc.h Index: src/sys/dev/ic/siisata.c diff -u src/sys/dev/ic/siisata.c:1.8 src/sys/dev/ic/siisata.c:1.9 --- src/sys/dev/ic/siisata.c:1.8 Mon Oct 19 18:41:13 2009 +++ src/sys/dev/ic/siisata.c Sat Jan 30 16:16:35 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: siisata.c,v 1.8 2009/10/19 18:41:13 bouyer Exp $ */ +/* $NetBSD: siisata.c,v 1.9 2010/01/30 16:16:35 jakllsch Exp $ */ /* from ahcisata_core.c */ @@ -53,7 +53,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/*- +/* * Copyright (c) 2007, 2008, 2009 Jonathan A. Kollasch. * All rights reserved. * @@ -76,9 +76,11 @@ * 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: siisata.c,v 1.9 2010/01/30 16:16:35 jakllsch Exp $); + #include sys/types.h #include sys/malloc.h #include sys/param.h Index: src/sys/dev/pci/siisata_pci.c diff -u src/sys/dev/pci/siisata_pci.c:1.6 src/sys/dev/pci/siisata_pci.c:1.7 --- src/sys/dev/pci/siisata_pci.c:1.6 Fri Jan 8 19:56:52 2010 +++ src/sys/dev/pci/siisata_pci.c Sat Jan 30 16:16:35 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: siisata_pci.c,v 1.6 2010/01/08 19:56:52 dyoung Exp $ */ +/* $NetBSD: siisata_pci.c,v 1.7 2010/01/30 16:16:35 jakllsch Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -25,7 +25,7 @@ * */ -/*- +/* * Copyright (c) 2007, 2008, 2009 Jonathan A. Kollasch. * All rights reserved. * @@ -48,11 +48,10 @@ * 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: siisata_pci.c,v 1.7 2010/01/30 16:16:35 jakllsch Exp $); #include sys/types.h #include sys/malloc.h
CVS commit: src/sys/arch/amiga/dev
Module Name:src Committed By: phx Date: Sat Jan 30 16:47:05 UTC 2010 Modified Files: src/sys/arch/amiga/dev: ite.c Log Message: Do not crash when ite wasn't configured to be console. To generate a diff of this commit: cvs rdiff -u -r1.89 -r1.90 src/sys/arch/amiga/dev/ite.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/amiga/dev/ite.c diff -u src/sys/arch/amiga/dev/ite.c:1.89 src/sys/arch/amiga/dev/ite.c:1.90 --- src/sys/arch/amiga/dev/ite.c:1.89 Mon Oct 26 19:16:54 2009 +++ src/sys/arch/amiga/dev/ite.c Sat Jan 30 16:47:05 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: ite.c,v 1.89 2009/10/26 19:16:54 cegger Exp $ */ +/* $NetBSD: ite.c,v 1.90 2010/01/30 16:47:05 phx Exp $ */ /* * Copyright (c) 1990 The Regents of the University of California. @@ -83,7 +83,7 @@ #include opt_ddb.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ite.c,v 1.89 2009/10/26 19:16:54 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: ite.c,v 1.90 2010/01/30 16:47:05 phx Exp $); #include sys/param.h #include sys/kernel.h @@ -434,6 +434,8 @@ ip-cursorx = 0; ip-cursory = 0; + if (ip-grf-g_iteinit == NULL) + return; /* grf has no console */ SUBR_INIT(ip); SUBR_CURSOR(ip, DRAW_CURSOR); if (ip-tabs == NULL)
CVS commit: src/sys/arch/amiga/dev
Module Name:src Committed By: phx Date: Sat Jan 30 16:49:14 UTC 2010 Modified Files: src/sys/arch/amiga/dev: grf_cv.c Log Message: Fixed compiler warnings when CV_INT_NUM == 2 or CV64CONSOLE is not defined. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/arch/amiga/dev/grf_cv.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/amiga/dev/grf_cv.c diff -u src/sys/arch/amiga/dev/grf_cv.c:1.48 src/sys/arch/amiga/dev/grf_cv.c:1.49 --- src/sys/arch/amiga/dev/grf_cv.c:1.48 Mon Oct 26 19:16:54 2009 +++ src/sys/arch/amiga/dev/grf_cv.c Sat Jan 30 16:49:14 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: grf_cv.c,v 1.48 2009/10/26 19:16:54 cegger Exp $ */ +/* $NetBSD: grf_cv.c,v 1.49 2010/01/30 16:49:14 phx Exp $ */ /* * Copyright (c) 1995 Michael Teske @@ -33,7 +33,7 @@ #include opt_amigacons.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: grf_cv.c,v 1.48 2009/10/26 19:16:54 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: grf_cv.c,v 1.49 2010/01/30 16:49:14 phx Exp $); #include grfcv.h #if NGRFCV 0 @@ -595,7 +595,7 @@ * Set the roxxler register to use interrupt #2, not #6. */ #if CV_INT_NUM == 2 - cv_write_port(0x8080, ba - 0x0200); + cv_write_port(0x8080, (volatile char*)ba - 0x0200); #endif /* Enable board interrupts */ @@ -910,7 +910,7 @@ case GM_GRFOFF: #ifndef CV64CONSOLE - cvscreen(1, gp-g_regkva - 0x0200); + cvscreen(1, (volatile char *)gp-g_regkva - 0x0200); #else cv_load_mon(gp, cvconsole_mode); ite_reinit(gp-g_itedev);
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Sat Jan 30 18:07:06 UTC 2010 Modified Files: src/sys/dev/acpi: acpi_acad.c Log Message: Add the _COMPONENT definition for ACPI_DEBUG. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/dev/acpi/acpi_acad.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_acad.c diff -u src/sys/dev/acpi/acpi_acad.c:1.36 src/sys/dev/acpi/acpi_acad.c:1.37 --- src/sys/dev/acpi/acpi_acad.c:1.36 Fri Jan 8 20:40:41 2010 +++ src/sys/dev/acpi/acpi_acad.c Sat Jan 30 18:07:06 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_acad.c,v 1.36 2010/01/08 20:40:41 dyoung Exp $ */ +/* $NetBSD: acpi_acad.c,v 1.37 2010/01/30 18:07:06 jruoho Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -44,7 +44,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_acad.c,v 1.36 2010/01/08 20:40:41 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_acad.c,v 1.37 2010/01/30 18:07:06 jruoho Exp $); #include sys/param.h #include sys/systm.h @@ -57,6 +57,9 @@ #include dev/sysmon/sysmonvar.h +#define _COMPONENT ACPI_ACAD_COMPONENT +ACPI_MODULE_NAME (acpi_acad) + struct acpiacad_softc { struct acpi_devnode *sc_node; /* our ACPI devnode */ int sc_flags; /* see below */
CVS commit: src/sbin/ifconfig
Module Name:src Committed By: is Date: Sat Jan 30 18:30:33 UTC 2010 Modified Files: src/sbin/ifconfig: af_atalk.c Log Message: Use getnameinfo() for printing AppleTalk addresses. While here, fix printing of broadcast for this address family (AT broadcast is fixed node 255 on the local net). To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sbin/ifconfig/af_atalk.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/ifconfig/af_atalk.c diff -u src/sbin/ifconfig/af_atalk.c:1.15 src/sbin/ifconfig/af_atalk.c:1.16 --- src/sbin/ifconfig/af_atalk.c:1.15 Fri Aug 1 22:44:17 2008 +++ src/sbin/ifconfig/af_atalk.c Sat Jan 30 18:30:33 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: af_atalk.c,v 1.15 2008/08/01 22:44:17 dyoung Exp $ */ +/* $NetBSD: af_atalk.c,v 1.16 2010/01/30 18:30:33 is Exp $ */ /* * Copyright (c) 1983, 1993 @@ -31,7 +31,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: af_atalk.c,v 1.15 2008/08/01 22:44:17 dyoung Exp $); +__RCSID($NetBSD: af_atalk.c,v 1.16 2010/01/30 18:30:33 is Exp $); #endif /* not lint */ #include sys/param.h @@ -42,6 +42,8 @@ #include netatalk/at.h +#include netdb.h + #include err.h #include errno.h #include string.h @@ -177,19 +179,20 @@ } static void -sat_print(const char *prefix, const struct sockaddr *sa) +sat_print1(const char *prefix, const struct sockaddr *sa) { - const struct sockaddr_at *sat = satocsat(sa); + char buf[40]; + int rc; - printf(%s%d.%d, prefix, ntohs(sat-sat_addr.s_net), - sat-sat_addr.s_node); + rc = getnameinfo(sa, sa-sa_len, buf, sizeof(buf), NULL, 0, 0); + + printf(%s%s, prefix, buf); } static void at_status(prop_dictionary_t env, prop_dictionary_t oenv, bool force) { struct sockaddr_at *sat; - struct netrange *nr; struct ifreq ifr; int s; const char *ifname; @@ -216,10 +219,7 @@ warn(SIOCGIFADDR); sat = (struct sockaddr_at *)ifr.ifr_addr; - nr = (struct netrange *)sat-sat_zero; - sat_print(\tatalk , ifr.ifr_addr); - printf( range %d-%d phase %d, - ntohs(nr-nr_firstnet), ntohs(nr-nr_lastnet), nr-nr_phase); + sat_print1(\tatalk , ifr.ifr_addr); if (flags IFF_POINTOPOINT) { estrlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); @@ -229,11 +229,13 @@ else warn(SIOCGIFDSTADDR); } - sat_print( -- , ifr.ifr_dstaddr); + sat_print1( -- , ifr.ifr_dstaddr); } if (flags IFF_BROADCAST) { /* note RTAX_BRD overlap with IFF_POINTOPOINT */ - sat_print( broadcast , ifr.ifr_broadaddr); + /* note Appletalk broadcast is fixed. */ + printf( broadcast %u.%u, ntohs(sat-sat_addr.s_net), + ATADDR_BCAST); } printf(\n); }
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Sat Jan 30 18:35:49 UTC 2010 Modified Files: src/sys/dev/acpi: acpi_button.c acpi_lid.c hpqlb_acpi.c spic_acpi.c thinkpad_acpi.c Log Message: Add the _COMPONENT definition for ACPI_DEBUG. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/dev/acpi/acpi_button.c cvs rdiff -u -r1.31 -r1.32 src/sys/dev/acpi/acpi_lid.c cvs rdiff -u -r1.4 -r1.5 src/sys/dev/acpi/hpqlb_acpi.c \ src/sys/dev/acpi/spic_acpi.c cvs rdiff -u -r1.23 -r1.24 src/sys/dev/acpi/thinkpad_acpi.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_button.c diff -u src/sys/dev/acpi/acpi_button.c:1.28 src/sys/dev/acpi/acpi_button.c:1.29 --- src/sys/dev/acpi/acpi_button.c:1.28 Tue Aug 25 10:34:08 2009 +++ src/sys/dev/acpi/acpi_button.c Sat Jan 30 18:35:48 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_button.c,v 1.28 2009/08/25 10:34:08 jmcneill Exp $ */ +/* $NetBSD: acpi_button.c,v 1.29 2010/01/30 18:35:48 jruoho Exp $ */ /* * Copyright 2001, 2003 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_button.c,v 1.28 2009/08/25 10:34:08 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_button.c,v 1.29 2010/01/30 18:35:48 jruoho Exp $); #include sys/param.h #include sys/systm.h @@ -52,6 +52,9 @@ #include dev/sysmon/sysmonvar.h +#define _COMPONENT ACPI_BUTTON_COMPONENT +ACPI_MODULE_NAME (acpi_button) + struct acpibut_softc { struct acpi_devnode *sc_node; /* our ACPI devnode */ struct sysmon_pswitch sc_smpsw; /* our sysmon glue */ Index: src/sys/dev/acpi/acpi_lid.c diff -u src/sys/dev/acpi/acpi_lid.c:1.31 src/sys/dev/acpi/acpi_lid.c:1.32 --- src/sys/dev/acpi/acpi_lid.c:1.31 Fri Jan 8 20:40:41 2010 +++ src/sys/dev/acpi/acpi_lid.c Sat Jan 30 18:35:48 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_lid.c,v 1.31 2010/01/08 20:40:41 dyoung Exp $ */ +/* $NetBSD: acpi_lid.c,v 1.32 2010/01/30 18:35:48 jruoho Exp $ */ /* * Copyright 2001, 2003 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_lid.c,v 1.31 2010/01/08 20:40:41 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_lid.c,v 1.32 2010/01/30 18:35:48 jruoho Exp $); #include sys/param.h #include sys/systm.h @@ -52,6 +52,9 @@ #include dev/sysmon/sysmonvar.h +#define _COMPONENT ACPI_LID_COMPONENT +ACPI_MODULE_NAME (acpi_lid) + struct acpilid_softc { struct acpi_devnode *sc_node; /* our ACPI devnode */ struct sysmon_pswitch sc_smpsw; /* our sysmon glue */ Index: src/sys/dev/acpi/hpqlb_acpi.c diff -u src/sys/dev/acpi/hpqlb_acpi.c:1.4 src/sys/dev/acpi/hpqlb_acpi.c:1.5 --- src/sys/dev/acpi/hpqlb_acpi.c:1.4 Fri Jan 8 20:40:41 2010 +++ src/sys/dev/acpi/hpqlb_acpi.c Sat Jan 30 18:35:49 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: hpqlb_acpi.c,v 1.4 2010/01/08 20:40:41 dyoung Exp $ */ +/* $NetBSD: hpqlb_acpi.c,v 1.5 2010/01/30 18:35:49 jruoho Exp $ */ /*- * Copyright (c) 2008 Christoph Egger ceg...@netbsd.org @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: hpqlb_acpi.c,v 1.4 2010/01/08 20:40:41 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: hpqlb_acpi.c,v 1.5 2010/01/30 18:35:49 jruoho Exp $); #include sys/types.h #include sys/param.h @@ -38,6 +38,7 @@ #include sys/device.h #include sys/pmf.h +#include dev/acpi/acpireg.h #include dev/acpi/acpivar.h #include machine/pio.h @@ -45,6 +46,9 @@ #include dev/wscons/wskbdvar.h #include dev/isa/isareg.h +#define _COMPONENT ACPI_RESOURCE_COMPONENT +ACPI_MODULE_NAME (hpqlb_acpi) + #ifdef HPQLB_DEBUG #define DPRINTF(x) do { printf x; } while (/* CONSTCOND */0) #else Index: src/sys/dev/acpi/spic_acpi.c diff -u src/sys/dev/acpi/spic_acpi.c:1.4 src/sys/dev/acpi/spic_acpi.c:1.5 --- src/sys/dev/acpi/spic_acpi.c:1.4 Sun Aug 9 19:36:28 2009 +++ src/sys/dev/acpi/spic_acpi.c Sat Jan 30 18:35:49 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: spic_acpi.c,v 1.4 2009/08/09 19:36:28 christos Exp $ */ +/* $NetBSD: spic_acpi.c,v 1.5 2010/01/30 18:35:49 jruoho Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: spic_acpi.c,v 1.4 2009/08/09 19:36:28 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: spic_acpi.c,v 1.5 2010/01/30 18:35:49 jruoho Exp $); #include sys/param.h #include sys/systm.h @@ -43,8 +43,12 @@ #include dev/ic/spicvar.h #include dev/acpi/acpica.h +#include dev/acpi/acpireg.h #include dev/acpi/acpivar.h +#define _COMPONENT ACPI_RESOURCE_COMPONENT +ACPI_MODULE_NAME (spic_acpi) + struct spic_acpi_softc { struct spic_softc sc_spic; /* spic device */ Index: src/sys/dev/acpi/thinkpad_acpi.c diff -u src/sys/dev/acpi/thinkpad_acpi.c:1.23 src/sys/dev/acpi/thinkpad_acpi.c:1.24 --- src/sys/dev/acpi/thinkpad_acpi.c:1.23 Mon Jan 18 17:11:00 2010 +++ src/sys/dev/acpi/thinkpad_acpi.c Sat Jan 30 18:35:49 2010 @@ -1,4 +1,4 @@ -/*
CVS commit: [netbsd-5] src/libexec/ld.elf_so
Module Name:src Committed By: snj Date: Sat Jan 30 18:53:47 UTC 2010 Modified Files: src/libexec/ld.elf_so [netbsd-5]: map_object.c rtld.h symbol.c Log Message: Pull up following revision(s) (requested by skrll in ticket #1266): libexec/ld.elf_so/map_object.c: revision 1.39 libexec/ld.elf_so/rtld.h: revision 1.83 libexec/ld.elf_so/symbol.c: revision 1.49 Reset the COMBRELOC cache Obj_Entry if it was freed. Fixes PR 41482. Done slightly differently to the patch in the PR. To generate a diff of this commit: cvs rdiff -u -r1.36.4.1 -r1.36.4.2 src/libexec/ld.elf_so/map_object.c cvs rdiff -u -r1.79.4.2 -r1.79.4.3 src/libexec/ld.elf_so/rtld.h cvs rdiff -u -r1.47.4.1 -r1.47.4.2 src/libexec/ld.elf_so/symbol.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/map_object.c diff -u src/libexec/ld.elf_so/map_object.c:1.36.4.1 src/libexec/ld.elf_so/map_object.c:1.36.4.2 --- src/libexec/ld.elf_so/map_object.c:1.36.4.1 Fri Jan 16 22:21:30 2009 +++ src/libexec/ld.elf_so/map_object.c Sat Jan 30 18:53:47 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: map_object.c,v 1.36.4.1 2009/01/16 22:21:30 bouyer Exp $ */ +/* $NetBSD: map_object.c,v 1.36.4.2 2010/01/30 18:53:47 snj Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -34,7 +34,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: map_object.c,v 1.36.4.1 2009/01/16 22:21:30 bouyer Exp $); +__RCSID($NetBSD: map_object.c,v 1.36.4.2 2010/01/30 18:53:47 snj Exp $); #endif /* not lint */ #include errno.h @@ -325,6 +325,9 @@ xfree(elm); } xfree(obj); +#ifdef COMBRELOC + _rtld_combreloc_reset(obj); +#endif } Obj_Entry * Index: src/libexec/ld.elf_so/rtld.h diff -u src/libexec/ld.elf_so/rtld.h:1.79.4.2 src/libexec/ld.elf_so/rtld.h:1.79.4.3 --- src/libexec/ld.elf_so/rtld.h:1.79.4.2 Sat Jan 23 17:34:16 2010 +++ src/libexec/ld.elf_so/rtld.h Sat Jan 30 18:53:47 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.h,v 1.79.4.2 2010/01/23 17:34:16 bouyer Exp $ */ +/* $NetBSD: rtld.h,v 1.79.4.3 2010/01/30 18:53:47 snj Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -278,6 +278,9 @@ const Obj_Entry *, const Obj_Entry **, bool); const Elf_Sym *_rtld_symlook_needed(const char *, unsigned long, const Needed_Entry *, const Obj_Entry **, bool); +#ifdef COMBRELOC +void _rtld_combreloc_reset(const Obj_Entry *); +#endif /* map_object.c */ Obj_Entry *_rtld_map_object(const char *, int, const struct stat *); Index: src/libexec/ld.elf_so/symbol.c diff -u src/libexec/ld.elf_so/symbol.c:1.47.4.1 src/libexec/ld.elf_so/symbol.c:1.47.4.2 --- src/libexec/ld.elf_so/symbol.c:1.47.4.1 Wed Oct 14 09:31:27 2009 +++ src/libexec/ld.elf_so/symbol.c Sat Jan 30 18:53:47 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: symbol.c,v 1.47.4.1 2009/10/14 09:31:27 sborrill Exp $ */ +/* $NetBSD: symbol.c,v 1.47.4.2 2010/01/30 18:53:47 snj Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -40,7 +40,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: symbol.c,v 1.47.4.1 2009/10/14 09:31:27 sborrill Exp $); +__RCSID($NetBSD: symbol.c,v 1.47.4.2 2010/01/30 18:53:47 snj Exp $); #endif /* not lint */ #include err.h @@ -236,6 +236,21 @@ return NULL; } +#ifdef COMBRELOC +static const Obj_Entry *_rtld_last_refobj; + +/* + * Called when an object is freed. Reset the cached symbol look up if + * our last referencing or definition object just got unloaded. + */ +void +_rtld_combreloc_reset(const Obj_Entry *obj) +{ + if (_rtld_last_refobj == obj) + _rtld_last_refobj = NULL; +} +#endif + /* * Given a symbol number in a referencing object, find the corresponding * definition of the symbol. Returns a pointer to the symbol, or NULL if @@ -261,11 +276,10 @@ * return the cached results. */ static unsigned long last_symnum; - static const Elf_Sym *last_def; - static const Obj_Entry *last_refobj; static const Obj_Entry *last_defobj; + static const Elf_Sym *last_def; - if (symnum == last_symnum refobj == last_refobj + if (symnum == last_symnum refobj == _rtld_last_refobj in_plt == false) { *defobj_out = last_defobj; return last_def; @@ -319,7 +333,7 @@ * non-PLT lookup. */ last_symnum = symnum; - last_refobj = refobj; + _rtld_last_refobj = refobj; last_def = def; last_defobj = defobj; }
CVS commit: [netbsd-5] src/sys/dev
Module Name:src Committed By: snj Date: Sat Jan 30 19:00:46 UTC 2010 Modified Files: src/sys/dev [netbsd-5]: cgd.c vnd.c src/sys/dev/dkwedge [netbsd-5]: dk.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1269): sys/dev/cgd.c: revision 1.69 sys/dev/vnd.c: revision 1.206 sys/dev/dkwedge/dk.c: revision 1.53 struct buf::b_iodone is not called at splbio() any more. Make sure non-MPsafe iodone callbacks raise the SPL as appropriate. Fix buffer corruption issue I noticed in dk(4), and probable similar issues in vnd(4) and cgd(4). To generate a diff of this commit: cvs rdiff -u -r1.53.4.2 -r1.53.4.3 src/sys/dev/cgd.c cvs rdiff -u -r1.187.4.3 -r1.187.4.4 src/sys/dev/vnd.c cvs rdiff -u -r1.42.6.1 -r1.42.6.2 src/sys/dev/dkwedge/dk.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/cgd.c diff -u src/sys/dev/cgd.c:1.53.4.2 src/sys/dev/cgd.c:1.53.4.3 --- src/sys/dev/cgd.c:1.53.4.2 Sat Apr 4 17:18:53 2009 +++ src/sys/dev/cgd.c Sat Jan 30 19:00:46 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cgd.c,v 1.53.4.2 2009/04/04 17:18:53 snj Exp $ */ +/* $NetBSD: cgd.c,v 1.53.4.3 2010/01/30 19:00:46 snj Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cgd.c,v 1.53.4.2 2009/04/04 17:18:53 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: cgd.c,v 1.53.4.3 2010/01/30 19:00:46 snj Exp $); #include sys/types.h #include sys/param.h @@ -344,13 +344,13 @@ return 0; } -/* expected to be called at splbio() */ static void cgdiodone(struct buf *nbp) { struct buf *obp = nbp-b_private; struct cgd_softc *cs = getcgd_softc(obp-b_dev); struct dk_softc *dksc = cs-sc_dksc; + int s; KDASSERT(cs); @@ -385,10 +385,12 @@ obp-b_resid = 0; if (obp-b_error != 0) obp-b_resid = obp-b_bcount; + s = splbio(); disk_unbusy(dksc-sc_dkdev, obp-b_bcount - obp-b_resid, (obp-b_flags B_READ)); biodone(obp); dk_iodone(di, dksc); + splx(s); } /* XXX: we should probably put these into dksubr.c, mostly */ Index: src/sys/dev/vnd.c diff -u src/sys/dev/vnd.c:1.187.4.3 src/sys/dev/vnd.c:1.187.4.4 --- src/sys/dev/vnd.c:1.187.4.3 Sat Apr 4 17:20:00 2009 +++ src/sys/dev/vnd.c Sat Jan 30 19:00:46 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: vnd.c,v 1.187.4.3 2009/04/04 17:20:00 snj Exp $ */ +/* $NetBSD: vnd.c,v 1.187.4.4 2010/01/30 19:00:46 snj Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc. @@ -130,7 +130,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vnd.c,v 1.187.4.3 2009/04/04 17:20:00 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: vnd.c,v 1.187.4.4 2010/01/30 19:00:46 snj Exp $); #if defined(_KERNEL_OPT) #include fs_nfs.h @@ -862,6 +862,7 @@ struct vndxfer *vnx = VND_BUFTOXFER(bp); struct vnd_softc *vnd = vnx-vx_vnd; struct buf *obp = bp-b_private; + int s = splbio(); KASSERT(vnx-vx_buf == bp); KASSERT(vnd-sc_active 0); @@ -877,6 +878,7 @@ if (vnd-sc_active == 0) { wakeup(vnd-sc_tab); } + splx(s); obp-b_error = bp-b_error; obp-b_resid = bp-b_resid; buf_destroy(bp); Index: src/sys/dev/dkwedge/dk.c diff -u src/sys/dev/dkwedge/dk.c:1.42.6.1 src/sys/dev/dkwedge/dk.c:1.42.6.2 --- src/sys/dev/dkwedge/dk.c:1.42.6.1 Sat Jan 9 01:25:10 2010 +++ src/sys/dev/dkwedge/dk.c Sat Jan 30 19:00:46 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: dk.c,v 1.42.6.1 2010/01/09 01:25:10 snj Exp $ */ +/* $NetBSD: dk.c,v 1.42.6.2 2010/01/30 19:00:46 snj Exp $ */ /*- * Copyright (c) 2004, 2005, 2006, 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: dk.c,v 1.42.6.1 2010/01/09 01:25:10 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: dk.c,v 1.42.6.2 2010/01/30 19:00:46 snj Exp $); #include opt_dkwedge.h @@ -1101,7 +1101,6 @@ * dkiodone: * * I/O to a wedge has completed; alert the top half. - * NOTE: Must be called at splbio()! */ static void dkiodone(struct buf *bp) @@ -1109,6 +1108,8 @@ struct buf *obp = bp-b_private; struct dkwedge_softc *sc = dkwedge_lookup(obp-b_dev); + int s = splbio(); + if (bp-b_error != 0) obp-b_error = bp-b_error; obp-b_resid = bp-b_resid; @@ -1126,6 +1127,7 @@ /* Kick the queue in case there is more work we can do. */ dkstart(sc); + splx(s); } /*
CVS commit: [netbsd-5] src/sys/dev/ata
Module Name:src Committed By: snj Date: Sat Jan 30 19:02:15 UTC 2010 Modified Files: src/sys/dev/ata [netbsd-5]: wd.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1269): sys/dev/ata/wd.c: revision 1.383 via patch struct buf::b_iodone is not called at splbio() any more. Make sure non-MPsafe iodone callbacks raise the SPL as appropriate. To generate a diff of this commit: cvs rdiff -u -r1.363.8.3 -r1.363.8.4 src/sys/dev/ata/wd.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/ata/wd.c diff -u src/sys/dev/ata/wd.c:1.363.8.3 src/sys/dev/ata/wd.c:1.363.8.4 --- src/sys/dev/ata/wd.c:1.363.8.3 Sun Jan 10 23:59:30 2010 +++ src/sys/dev/ata/wd.c Sat Jan 30 19:02:14 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: wd.c,v 1.363.8.3 2010/01/10 23:59:30 snj Exp $ */ +/* $NetBSD: wd.c,v 1.363.8.4 2010/01/30 19:02:14 snj Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -59,7 +59,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: wd.c,v 1.363.8.3 2010/01/10 23:59:30 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: wd.c,v 1.363.8.4 2010/01/30 19:02:14 snj Exp $); #include opt_ata.h @@ -613,6 +613,7 @@ struct buf *obp = bp-b_private; struct wd_softc *sc = device_lookup_private(wd_cd, DISKUNIT(obp-b_dev)); + int s; if (__predict_false(bp-b_error != 0)) { /* @@ -641,15 +642,19 @@ bp-b_data = (char *)bp-b_data + bp-b_bcount; bp-b_blkno += (bp-b_bcount / 512); bp-b_rawblkno += (bp-b_bcount / 512); + s = splbio(); __wdstart(sc, bp); + splx(s); return; done: obp-b_error = bp-b_error; obp-b_resid = bp-b_resid; + s = splbio(); putiobuf(bp); biodone(obp); sc-openings++; + splx(s); /* wddone() will call wdstart() */ }
CVS commit: [netbsd-5] xsrc/external/mit/MesaLib/dist/src/mesa/glapi
Module Name:xsrc Committed By: snj Date: Sat Jan 30 19:09:15 UTC 2010 Modified Files: xsrc/external/mit/MesaLib/dist/src/mesa/glapi [netbsd-5]: glapi.c glapi_getproc.c glthread.c Log Message: Pull up following revision(s) (requested by rafal in ticket #1270): external/mit/MesaLib/dist/src/mesa/glapi/glapi.c: revision 1.2 external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c: revision 1.2 external/mit/MesaLib/dist/src/mesa/glapi/glthread.c: revision 1.2 Decorate some GL APIs with PUBLIC so they're available to link against; otherwise e.g. the swrast DRI module can't find _glapi_check_multithread. From http://people.freedesktop.org/~krh/glapi.patch with some tweaks. ok phone@ To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c \ xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c cvs rdiff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3 \ xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c diff -u xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c:1.1.1.1.2.1 xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c:1.1.1.1.2.2 --- xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c:1.1.1.1.2.1 Thu Sep 17 03:32:30 2009 +++ xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c Sat Jan 30 19:09:15 2010 @@ -221,7 +221,7 @@ * We should call this periodically from a function such as glXMakeCurrent * in order to test if multiple threads are being used. */ -void +PUBLIC void _glapi_check_multithread(void) { #if defined(THREADS) !defined(GLX_USE_TLS) Index: xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c diff -u xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c:1.1.1.1.2.1 xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c:1.1.1.1.2.2 --- xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c:1.1.1.1.2.1 Thu Sep 17 03:32:30 2009 +++ xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c Sat Jan 30 19:09:15 2010 @@ -36,7 +36,7 @@ #include stdlib.h #include stdio.h #include glthread.h - +#include main/glheader.h /* * This file should still compile even when THREADS is not defined. @@ -71,7 +71,7 @@ */ #ifdef PTHREADS -unsigned long +PUBLIC unsigned long _glthread_GetID(void) { return (unsigned long) pthread_self(); @@ -125,7 +125,7 @@ #define USE_LOCK_FOR_KEY /* undef this to try a version without lock for the global key... */ -unsigned long +PUBLIC unsigned long _glthread_GetID(void) { abort(); /* XXX not implemented yet */ @@ -203,7 +203,7 @@ DWORD dwErr=GetLastError(); } -unsigned long +PUBLIC unsigned long _glthread_GetID(void) { return GetCurrentThreadId(); @@ -304,7 +304,7 @@ */ #ifdef BEOS_THREADS -unsigned long +PUBLIC unsigned long _glthread_GetID(void) { return (unsigned long) find_thread(NULL); @@ -346,7 +346,7 @@ * no-op functions */ -unsigned long +PUBLIC unsigned long _glthread_GetID(void) { return 0; Index: xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c diff -u xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c:1.1.1.1.2.2 xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c:1.1.1.1.2.3 --- xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c:1.1.1.1.2.2 Thu Sep 17 03:32:30 2009 +++ xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c Sat Jan 30 19:09:15 2010 @@ -563,7 +563,7 @@ * in the name of static functions, try generating a new API entrypoint on * the fly with assembly language. */ -_glapi_proc +PUBLIC _glapi_proc _glapi_get_proc_address(const char *funcName) { struct _glapi_function * entry;
CVS commit: [netbsd-5] src/sys/arch/xen/xen
Module Name:src Committed By: snj Date: Sat Jan 30 19:12:26 UTC 2010 Modified Files: src/sys/arch/xen/xen [netbsd-5]: privcmd.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1271): sys/arch/xen/xen/privcmd.c: revision 1.40 Use paddr_t to store physical address and cast mfn values to paddr_t before shift. Fix overflow issue preventing xend from working as reported by Mark Davies on port-xen@ To generate a diff of this commit: cvs rdiff -u -r1.33.4.1 -r1.33.4.2 src/sys/arch/xen/xen/privcmd.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/privcmd.c diff -u src/sys/arch/xen/xen/privcmd.c:1.33.4.1 src/sys/arch/xen/xen/privcmd.c:1.33.4.2 --- src/sys/arch/xen/xen/privcmd.c:1.33.4.1 Sun Mar 8 03:19:50 2009 +++ src/sys/arch/xen/xen/privcmd.c Sat Jan 30 19:12:26 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: privcmd.c,v 1.33.4.1 2009/03/08 03:19:50 snj Exp $ */ +/* $NetBSD: privcmd.c,v 1.33.4.2 2010/01/30 19:12:26 snj Exp $ */ /*- * Copyright (c) 2004 Christian Limpach. @@ -32,7 +32,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: privcmd.c,v 1.33.4.1 2009/03/08 03:19:50 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: privcmd.c,v 1.33.4.2 2010/01/30 19:12:26 snj Exp $); #include opt_compat_netbsd.h @@ -362,7 +362,7 @@ privcmd_mmap_t *mcmd = ap-a_data; privcmd_mmap_entry_t mentry; vaddr_t va; - u_long ma; + paddr_t ma; struct vm_map *vmm = curlwp-l_proc-p_vmspace-vm_map; for (i = 0; i mcmd-num; i++) { @@ -383,7 +383,7 @@ if (maddr == NULL) return ENOMEM; va = mentry.va ~PAGE_MASK; - ma = mentry.mfn PGSHIFT; /* XXX ??? */ + ma = ((paddr_t)mentry.mfn) PGSHIFT; /* XXX ??? */ for (j = 0; j mentry.npages; j++) { maddr[j] = ma; ma += PAGE_SIZE; @@ -400,7 +400,8 @@ int i; privcmd_mmapbatch_t* pmb = ap-a_data; vaddr_t va0, va; - u_long mfn, ma; + u_long mfn; + paddr_t ma; struct vm_map *vmm; struct vm_map_entry *entry; vm_prot_t prot; @@ -446,7 +447,7 @@ UVM_KMF_VAONLY); return error; } - ma = mfn PGSHIFT; + ma = ((paddr_t)mfn) PGSHIFT; if (pmap_enter_ma(pmap_kernel(), trymap, ma, 0, prot, PMAP_CANFAIL, pmb-dom)) { mfn |= 0xF000;
CVS commit: [netbsd-5] src/sys/arch/xen
Module Name:src Committed By: snj Date: Sat Jan 30 19:14:21 UTC 2010 Modified Files: src/sys/arch/xen/x86 [netbsd-5]: xen_bus_dma.c src/sys/arch/xen/xen [netbsd-5]: xengnt.c xennetback_xenbus.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #1271): sys/arch/xen/x86/xen_bus_dma.c: revision 1.16 sys/arch/xen/xen/xengnt.c: revision 1.17 via patch sys/arch/xen/xen/xennetback_xenbus.c: revision 1.33 fix address overflow with 32bit PAE. Reported and tested by Mark Davies on port-...@. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.11.8.1 src/sys/arch/xen/x86/xen_bus_dma.c cvs rdiff -u -r1.10 -r1.10.4.1 src/sys/arch/xen/xen/xengnt.c cvs rdiff -u -r1.24.4.2 -r1.24.4.3 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/x86/xen_bus_dma.c diff -u src/sys/arch/xen/x86/xen_bus_dma.c:1.11 src/sys/arch/xen/x86/xen_bus_dma.c:1.11.8.1 --- src/sys/arch/xen/x86/xen_bus_dma.c:1.11 Wed Jun 4 12:41:42 2008 +++ src/sys/arch/xen/x86/xen_bus_dma.c Sat Jan 30 19:14:20 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: xen_bus_dma.c,v 1.11 2008/06/04 12:41:42 ad Exp $ */ +/* $NetBSD: xen_bus_dma.c,v 1.11.8.1 2010/01/30 19:14:20 snj Exp $ */ /* NetBSD bus_dma.c,v 1.21 2005/04/16 07:53:35 yamt Exp */ /*- @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: xen_bus_dma.c,v 1.11 2008/06/04 12:41:42 ad Exp $); +__KERNEL_RCSID(0, $NetBSD: xen_bus_dma.c,v 1.11.8.1 2010/01/30 19:14:20 snj Exp $); #include sys/param.h #include sys/systm.h @@ -85,8 +85,8 @@ KASSERT(npages = npagesreq); /* get npages from UWM, and give them back to the hypervisor */ - error = uvm_pglistalloc(npages PAGE_SHIFT, 0, avail_end, 0, 0, - mlistp, npages, (flags BUS_DMA_NOWAIT) == 0); + error = uvm_pglistalloc(((psize_t)npages) PAGE_SHIFT, +0, avail_end, 0, 0, mlistp, npages, (flags BUS_DMA_NOWAIT) == 0); if (error) return (error); @@ -161,7 +161,7 @@ pa = VM_PAGE_TO_PHYS(pg); xpmap_phys_to_machine_mapping[ (pa - XPMAP_OFFSET) PAGE_SHIFT] = mfn+i; - xpq_queue_machphys_update((mfn+i) PAGE_SHIFT, pa); + xpq_queue_machphys_update(((paddr_t)(mfn+i)) PAGE_SHIFT, pa); /* while here, give extra pages back to UVM */ if (i = npagesreq) { TAILQ_REMOVE(mlistp, pg, pageq.queue); @@ -217,7 +217,7 @@ pa = VM_PAGE_TO_PHYS(pg); xpmap_phys_to_machine_mapping[ (pa - XPMAP_OFFSET) PAGE_SHIFT] = mfn; - xpq_queue_machphys_update((mfn) PAGE_SHIFT, pa); + xpq_queue_machphys_update(((paddr_t)mfn) PAGE_SHIFT, pa); TAILQ_REMOVE(mlistp, pg, pageq.queue); uvm_pagefree(pg); } Index: src/sys/arch/xen/xen/xengnt.c diff -u src/sys/arch/xen/xen/xengnt.c:1.10 src/sys/arch/xen/xen/xengnt.c:1.10.4.1 --- src/sys/arch/xen/xen/xengnt.c:1.10 Sat Oct 25 17:12:29 2008 +++ src/sys/arch/xen/xen/xengnt.c Sat Jan 30 19:14:20 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: xengnt.c,v 1.10 2008/10/25 17:12:29 jym Exp $ */ +/* $NetBSD: xengnt.c,v 1.10.4.1 2010/01/30 19:14:20 snj Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: xengnt.c,v 1.10 2008/10/25 17:12:29 jym Exp $); +__KERNEL_RCSID(0, $NetBSD: xengnt.c,v 1.10.4.1 2010/01/30 19:14:20 snj Exp $); #include sys/types.h #include sys/param.h @@ -125,14 +125,14 @@ xengnt_more_entries() { gnttab_setup_table_t setup; - unsigned long *pages; + u_long *pages; int nframes_new = gnt_nr_grant_frames + 1; int i; if (gnt_nr_grant_frames == gnt_max_grant_frames) return ENOMEM; - pages = malloc(nframes_new * sizeof(long), M_DEVBUF, M_NOWAIT); + pages = malloc(nframes_new * sizeof(u_long), M_DEVBUF, M_NOWAIT); if (pages == NULL) return ENOMEM; @@ -163,7 +163,7 @@ * the grant table frames */ pmap_kenter_ma(((vaddr_t)grant_table) + gnt_nr_grant_frames * PAGE_SIZE, - pages[gnt_nr_grant_frames] PAGE_SHIFT, VM_PROT_WRITE); + ((paddr_t)pages[gnt_nr_grant_frames]) PAGE_SHIFT, VM_PROT_WRITE); /* * add the grant entries associated to the last grant table frame Index: src/sys/arch/xen/xen/xennetback_xenbus.c diff -u src/sys/arch/xen/xen/xennetback_xenbus.c:1.24.4.2 src/sys/arch/xen/xen/xennetback_xenbus.c:1.24.4.3 --- src/sys/arch/xen/xen/xennetback_xenbus.c:1.24.4.2 Mon Sep 28 01:47:49 2009 +++ src/sys/arch/xen/xen/xennetback_xenbus.c Sat Jan 30 19:14:20 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: xennetback_xenbus.c,v 1.24.4.2 2009/09/28 01:47:49 snj Exp $ */ +/* $NetBSD: xennetback_xenbus.c,v 1.24.4.3 2010/01/30 19:14:20 snj Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -604,7 +604,7 @@ */ return -1; - *map = mcl_pages[mcl_pages_alloc] PAGE_SHIFT; + *map = ((paddr_t)mcl_pages[mcl_pages_alloc]) PAGE_SHIFT; mcl_pages_alloc--; return 0;
CVS commit: [netbsd-5] src/bin/pax
Module Name:src Committed By: snj Date: Sat Jan 30 19:17:17 UTC 2010 Modified Files: src/bin/pax [netbsd-5]: options.c Log Message: Pull up following revision(s) (requested by dholland in ticket #1272): bin/pax/options.c: revision 1.106 Don't use NOGLOB_MTCH for pax, only for tar. Fixes fix for PR 41167 and closes PR 42301. Since the 41167 fix was pulled up to -5, this needs to be too. To generate a diff of this commit: cvs rdiff -u -r1.101.12.3 -r1.101.12.4 src/bin/pax/options.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/pax/options.c diff -u src/bin/pax/options.c:1.101.12.3 src/bin/pax/options.c:1.101.12.4 --- src/bin/pax/options.c:1.101.12.3 Fri Aug 14 20:32:21 2009 +++ src/bin/pax/options.c Sat Jan 30 19:17:17 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: options.c,v 1.101.12.3 2009/08/14 20:32:21 snj Exp $ */ +/* $NetBSD: options.c,v 1.101.12.4 2010/01/30 19:17:17 snj Exp $ */ /*- * Copyright (c) 1992 Keith Muller. @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = @(#)options.c 8.2 (Berkeley) 4/18/94; #else -__RCSID($NetBSD: options.c,v 1.101.12.3 2009/08/14 20:32:21 snj Exp $); +__RCSID($NetBSD: options.c,v 1.101.12.4 2010/01/30 19:17:17 snj Exp $); #endif #endif /* not lint */ @@ -692,7 +692,7 @@ case LIST: case EXTRACT: for (; optind argc; optind++) - if (pat_add(argv[optind], NULL, NOGLOB_MTCH) 0) + if (pat_add(argv[optind], NULL, 0) 0) pax_usage(); break; case COPY:
CVS commit: [netbsd-5] src/etc
Module Name:src Committed By: snj Date: Sat Jan 30 19:21:15 UTC 2010 Modified Files: src/etc [netbsd-5]: Makefile Log Message: Pull up following revision(s) (requested by dholland in ticket #1273): etc/Makefile: revision 1.377 etc/Makefile: revision 1.378 Fix installation permissions of /var/db/locate.database as per PR misc/41544. To generate a diff of this commit: cvs rdiff -u -r1.359.2.5 -r1.359.2.6 src/etc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/Makefile diff -u src/etc/Makefile:1.359.2.5 src/etc/Makefile:1.359.2.6 --- src/etc/Makefile:1.359.2.5 Wed Oct 14 20:05:08 2009 +++ src/etc/Makefile Sat Jan 30 19:21:15 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.359.2.5 2009/10/14 20:05:08 sborrill Exp $ +# $NetBSD: Makefile,v 1.359.2.6 2010/01/30 19:21:15 snj Exp $ # from: @(#)Makefile 8.7 (Berkeley) 5/25/95 # Environment variables without default values: @@ -304,7 +304,7 @@ ${BINOWN} operator 664 /etc/dumpdates \ ${BINOWN} operator 600 /etc/skeykeys \ root wheel 600 /var/at/at.deny \ - nobody ${BINGRP} 664 /var/db/locate.database \ + root wheel 644 /var/db/locate.database \ ${BINOWN} ${BINGRP} 600 /var/log/authlog \ root wheel 600 /var/log/cron \ ${BINOWN} ${UTMPGRP} 664 /var/log/lastlog \
CVS commit: [netbsd-5] src/bin/sh
Module Name:src Committed By: snj Date: Sat Jan 30 19:24:33 UTC 2010 Modified Files: src/bin/sh [netbsd-5]: cd.c sh.1 Log Message: Pull up following revision(s) (requested by dholland in ticket #1274): bin/sh/cd.c: revision 1.40 bin/sh/sh.1: revision 1.95 Make the cd builtin accept and ignore -P, which is a kshism that has been allowed to leak into POSIX and selects the behavior cd already implements. Closes PR bin/42557 and also relevant to PR pkg/42168. I suppose this should probably be pulled up to both -4 and -5... To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.39.26.1 src/bin/sh/cd.c cvs rdiff -u -r1.87.18.1 -r1.87.18.2 src/bin/sh/sh.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/cd.c diff -u src/bin/sh/cd.c:1.39 src/bin/sh/cd.c:1.39.26.1 --- src/bin/sh/cd.c:1.39 Thu May 4 11:16:53 2006 +++ src/bin/sh/cd.c Sat Jan 30 19:24:32 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cd.c,v 1.39 2006/05/04 11:16:53 simonb Exp $ */ +/* $NetBSD: cd.c,v 1.39.26.1 2010/01/30 19:24:32 snj Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = @(#)cd.c 8.2 (Berkeley) 5/4/95; #else -__RCSID($NetBSD: cd.c,v 1.39 2006/05/04 11:16:53 simonb Exp $); +__RCSID($NetBSD: cd.c,v 1.39.26.1 2010/01/30 19:24:32 snj Exp $); #endif #endif /* not lint */ @@ -84,7 +84,8 @@ struct stat statb; int print = cdprint; /* set -cdprint to enable */ - nextopt(nullstr); + while (nextopt(P) != '\0') + ; /* * Try (quite hard) to have 'curdir' defined, nothing has set Index: src/bin/sh/sh.1 diff -u src/bin/sh/sh.1:1.87.18.1 src/bin/sh/sh.1:1.87.18.2 --- src/bin/sh/sh.1:1.87.18.1 Wed Apr 1 00:25:21 2009 +++ src/bin/sh/sh.1 Sat Jan 30 19:24:32 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: sh.1,v 1.87.18.1 2009/04/01 00:25:21 snj Exp $ +.\ $NetBSD: sh.1,v 1.87.18.2 2010/01/30 19:24:32 snj Exp $ .\ Copyright (c) 1991, 1993 .\ The Regents of the University of California. All rights reserved. .\ @@ -1225,7 +1225,7 @@ search for the command and print the absolute pathname of utilities, the name for built-ins or the expansion of aliases. .El -.It cd Op Ar directory Op Ar replace +.It cd Oo Fl P Oc Op Ar directory Op Ar replace Switch to the specified directory (default .Ev $HOME ) . If @@ -1251,6 +1251,21 @@ is the same as that of .Ev PATH . .Pp +The +.Fl P +option instructs the shell to update +.Ev PWD +with the specified directory and change to that directory. +This is the default. +.Pp +Some shells also support a +.Fl L +option, which instructs the shell to update +.Ev PWD +with incorrect information and to change the current directory +accordingly. +This is not supported. +.Pp In an interactive shell, the .Ic cd command will print out the name of the @@ -1538,11 +1553,9 @@ .Fl L , but note that the built-in .Ic cd -command doesn't currently support +command doesn't currently support the .Fl L -or -.Fl P -and will cache (almost) the absolute path. +option and will cache (almost) the absolute path. If .Ic cd is changed,
CVS commit: [netbsd-5] src/bin/sh
Module Name:src Committed By: snj Date: Sat Jan 30 19:26:39 UTC 2010 Modified Files: src/bin/sh [netbsd-5]: sh.1 Log Message: Pull up following revision(s) (requested by dholland in ticket #1274): bin/sh/sh.1: revision 1.97 via patch Bump date for cd -P support. To generate a diff of this commit: cvs rdiff -u -r1.87.18.2 -r1.87.18.3 src/bin/sh/sh.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/sh.1 diff -u src/bin/sh/sh.1:1.87.18.2 src/bin/sh/sh.1:1.87.18.3 --- src/bin/sh/sh.1:1.87.18.2 Sat Jan 30 19:24:32 2010 +++ src/bin/sh/sh.1 Sat Jan 30 19:26:39 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: sh.1,v 1.87.18.2 2010/01/30 19:24:32 snj Exp $ +.\ $NetBSD: sh.1,v 1.87.18.3 2010/01/30 19:26:39 snj Exp $ .\ Copyright (c) 1991, 1993 .\ The Regents of the University of California. All rights reserved. .\ @@ -31,7 +31,7 @@ .\ .\ @(#)sh.1 8.6 (Berkeley) 5/4/95 .\ -.Dd June 24, 2007 +.Dd January 1, 2010 .Os .Dt SH 1 .Sh NAME
CVS commit: [netbsd-5] src/common/lib/libc/hash/sha2
Module Name:src Committed By: snj Date: Sat Jan 30 19:32:29 UTC 2010 Modified Files: src/common/lib/libc/hash/sha2 [netbsd-5]: sha2.c Log Message: Pull up following revision(s) (requested by joerg in ticket #1275): common/lib/libc/hash/sha2/sha2.c: revision 1.20 Fix unaligned access as reported in PR port-sparc/42273. To generate a diff of this commit: cvs rdiff -u -r1.7.10.1 -r1.7.10.2 src/common/lib/libc/hash/sha2/sha2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/hash/sha2/sha2.c diff -u src/common/lib/libc/hash/sha2/sha2.c:1.7.10.1 src/common/lib/libc/hash/sha2/sha2.c:1.7.10.2 --- src/common/lib/libc/hash/sha2/sha2.c:1.7.10.1 Tue Jul 14 19:48:03 2009 +++ src/common/lib/libc/hash/sha2/sha2.c Sat Jan 30 19:32:29 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sha2.c,v 1.7.10.1 2009/07/14 19:48:03 snj Exp $ */ +/* $NetBSD: sha2.c,v 1.7.10.2 2010/01/30 19:32:29 snj Exp $ */ /* $KAME: sha2.c,v 1.9 2003/07/20 00:28:38 itojun Exp $ */ /* @@ -43,7 +43,7 @@ #include sys/cdefs.h #if defined(_KERNEL) || defined(_STANDALONE) -__KERNEL_RCSID(0, $NetBSD: sha2.c,v 1.7.10.1 2009/07/14 19:48:03 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: sha2.c,v 1.7.10.2 2010/01/30 19:32:29 snj Exp $); #include sys/param.h /* XXX: to pull machine/macros.h for vax memset(9) */ #include lib/libkern/libkern.h @@ -51,7 +51,7 @@ #else #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: sha2.c,v 1.7.10.1 2009/07/14 19:48:03 snj Exp $); +__RCSID($NetBSD: sha2.c,v 1.7.10.2 2010/01/30 19:32:29 snj Exp $); #endif /* LIBC_SCCS and not lint */ #include namespace.h @@ -941,7 +941,6 @@ int SHA512_Final(uint8_t digest[], SHA512_CTX *context) { - uint64_t *d = (void *)digest; size_t i; /* If no digest buffer is passed, we don't bother doing this: */ @@ -950,7 +949,7 @@ /* Save the hash data for output: */ for (i = 0; i 8; ++i) - d[i] = htobe64(context-state[i]); + be64enc(digest + 8 * i, context-state[i]); } /* Zero out state data */
CVS commit: [netbsd-5] src/common/lib/libc/hash/sha2
Module Name:src Committed By: snj Date: Sat Jan 30 19:34:44 UTC 2010 Modified Files: src/common/lib/libc/hash/sha2 [netbsd-5]: sha2.c Log Message: Pull up following revision(s) (requested by 1276): common/lib/libc/hash/sha2/sha2.c: revision 1.21 Fix unaligned access in *_Final for SHA224/SHA256/SHA384. Remaining part of PR 42273. Tested by snj. To generate a diff of this commit: cvs rdiff -u -r1.7.10.2 -r1.7.10.3 src/common/lib/libc/hash/sha2/sha2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/hash/sha2/sha2.c diff -u src/common/lib/libc/hash/sha2/sha2.c:1.7.10.2 src/common/lib/libc/hash/sha2/sha2.c:1.7.10.3 --- src/common/lib/libc/hash/sha2/sha2.c:1.7.10.2 Sat Jan 30 19:32:29 2010 +++ src/common/lib/libc/hash/sha2/sha2.c Sat Jan 30 19:34:43 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sha2.c,v 1.7.10.2 2010/01/30 19:32:29 snj Exp $ */ +/* $NetBSD: sha2.c,v 1.7.10.3 2010/01/30 19:34:43 snj Exp $ */ /* $KAME: sha2.c,v 1.9 2003/07/20 00:28:38 itojun Exp $ */ /* @@ -43,7 +43,7 @@ #include sys/cdefs.h #if defined(_KERNEL) || defined(_STANDALONE) -__KERNEL_RCSID(0, $NetBSD: sha2.c,v 1.7.10.2 2010/01/30 19:32:29 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: sha2.c,v 1.7.10.3 2010/01/30 19:34:43 snj Exp $); #include sys/param.h /* XXX: to pull machine/macros.h for vax memset(9) */ #include lib/libkern/libkern.h @@ -51,7 +51,7 @@ #else #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: sha2.c,v 1.7.10.2 2010/01/30 19:32:29 snj Exp $); +__RCSID($NetBSD: sha2.c,v 1.7.10.3 2010/01/30 19:34:43 snj Exp $); #endif /* LIBC_SCCS and not lint */ #include namespace.h @@ -553,7 +553,6 @@ static int SHA224_256_Final(uint8_t digest[], SHA256_CTX *context, size_t len) { - uint32_t *d = (void *)digest; unsigned int usedspace; size_t i; @@ -601,7 +600,7 @@ SHA256_Transform(context, (uint32_t *)(void *)context-buffer); for (i = 0; i len / 4; i++) - d[i] = htobe32(context-state[i]); + be32enc(digest + 4 * i, context-state[i]); } /* Clean up state data: */ @@ -988,7 +987,6 @@ int SHA384_Final(uint8_t digest[], SHA384_CTX *context) { - uint64_t *d = (void *)digest; size_t i; /* If no digest buffer is passed, we don't bother doing this: */ @@ -997,7 +995,7 @@ /* Save the hash data for output: */ for (i = 0; i 6; ++i) - d[i] = be64toh(context-state[i]); + be64enc(digest + 8 * i, context-state[i]); } /* Zero out state data */
CVS commit: [netbsd-5] src/sys/external/bsd/drm/dist/bsd-core
Module Name:src Committed By: snj Date: Sat Jan 30 19:41:20 UTC 2010 Modified Files: src/sys/external/bsd/drm/dist/bsd-core [netbsd-5]: drmP.h drm_bufs.c drm_memory.c Log Message: Pull up following revision(s) (requested by jmorse in ticket #1280): sys/external/bsd/drm/dist/bsd-core/drm_bufs.c: revision 1.7 sys/external/bsd/drm/dist/bsd-core/drmP.h: revision 1.16 sys/external/bsd/drm/dist/bsd-core/drm_memory.c: revision 1.7 PR/42262: Support drm drivers (intel G33/G45) submapping pci resources To generate a diff of this commit: cvs rdiff -u -r1.9.10.2 -r1.9.10.3 \ src/sys/external/bsd/drm/dist/bsd-core/drmP.h cvs rdiff -u -r1.2.10.1 -r1.2.10.2 \ src/sys/external/bsd/drm/dist/bsd-core/drm_bufs.c cvs rdiff -u -r1.3.10.1 -r1.3.10.2 \ src/sys/external/bsd/drm/dist/bsd-core/drm_memory.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/external/bsd/drm/dist/bsd-core/drmP.h diff -u src/sys/external/bsd/drm/dist/bsd-core/drmP.h:1.9.10.2 src/sys/external/bsd/drm/dist/bsd-core/drmP.h:1.9.10.3 --- src/sys/external/bsd/drm/dist/bsd-core/drmP.h:1.9.10.2 Fri Aug 14 21:40:49 2009 +++ src/sys/external/bsd/drm/dist/bsd-core/drmP.h Sat Jan 30 19:41:19 2010 @@ -650,6 +650,18 @@ typedef TAILQ_HEAD(drm_map_list, drm_local_map) drm_map_list_t; +#if defined(__NetBSD__) +typedef struct { + int mapped; + int maptype; + bus_addr_t base; + bus_size_t size; + bus_space_handle_t bsh; + int flags; + void * vaddr; +} pci_map_data_t; +#endif + typedef struct drm_local_map { unsigned long offset; /* Physical address (0 for SAREA)*/ unsigned long size; /* Physical size (bytes) */ @@ -667,7 +679,7 @@ bus_space_handle_t bsh; drm_dma_handle_t *dmah; #if defined(__NetBSD__) - int *cnt; + pci_map_data_t *fullmap; bus_size_t mapsize; #endif TAILQ_ENTRY(drm_local_map) link; @@ -784,18 +796,6 @@ /* Length for the array of resource pointers for drm_get_resource_*. */ #define DRM_MAX_PCI_RESOURCE 6 -#if defined(__NetBSD__) -typedef struct { - int mapped; - int maptype; - bus_addr_t base; - bus_size_t size; - bus_space_handle_t bsh; - int flags; - void * vaddr; -} pci_map_data_t; -#endif - /** * DRM device functions structure */ Index: src/sys/external/bsd/drm/dist/bsd-core/drm_bufs.c diff -u src/sys/external/bsd/drm/dist/bsd-core/drm_bufs.c:1.2.10.1 src/sys/external/bsd/drm/dist/bsd-core/drm_bufs.c:1.2.10.2 --- src/sys/external/bsd/drm/dist/bsd-core/drm_bufs.c:1.2.10.1 Sat Jun 20 23:36:59 2009 +++ src/sys/external/bsd/drm/dist/bsd-core/drm_bufs.c Sat Jan 30 19:41:20 2010 @@ -159,16 +159,25 @@ map-size = size; map-type = type; map-flags = flags; -#ifdef __NetBSD__ - map-cnt = NULL; +#if defined(__NetBSD__) + map-fullmap = NULL; map-mapsize = 0; #endif switch (map-type) { case _DRM_REGISTERS: map-handle = drm_ioremap(dev, map); + if (map-handle == NULL) { + DRM_ERROR(drm_addmap couldn't ioremap registers with +base %lX, size %lX\n, +(long) offset, (long) size); + DRM_LOCK(); + return EINVAL; + } + if (!(map-flags _DRM_WRITE_COMBINING)) break; + /* FALLTHROUGH */ case _DRM_FRAME_BUFFER: if (drm_mtrr_add(map-offset, map-size, DRM_MTRR_WC) == 0) Index: src/sys/external/bsd/drm/dist/bsd-core/drm_memory.c diff -u src/sys/external/bsd/drm/dist/bsd-core/drm_memory.c:1.3.10.1 src/sys/external/bsd/drm/dist/bsd-core/drm_memory.c:1.3.10.2 --- src/sys/external/bsd/drm/dist/bsd-core/drm_memory.c:1.3.10.1 Sat Jun 20 23:36:59 2009 +++ src/sys/external/bsd/drm/dist/bsd-core/drm_memory.c Sat Jan 30 19:41:20 2010 @@ -85,29 +85,55 @@ static void * drm_netbsd_ioremap(struct drm_device *dev, drm_local_map_t *map, int wc) { + bus_space_handle_t h; int i, reg, reason; for(i = 0; iDRM_MAX_PCI_RESOURCE; i++) { reg = PCI_MAPREG_START + i*4; + + /* Does the requested mapping lie within this resource? */ if ((dev-pci_map_data[i].maptype == PCI_MAPREG_TYPE_MEM || dev-pci_map_data[i].maptype == (PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_64BIT)) - dev-pci_map_data[i].base == map-offset - dev-pci_map_data[i].size = map-size) + map-offset = dev-pci_map_data[i].base + map-offset + map-size = dev-pci_map_data[i].base + + dev-pci_map_data[i].size) { map-bst = dev-pa.pa_memt; - map-cnt = (dev-pci_map_data[i].mapped); - map-mapsize = dev-pci_map_data[i].size; + map-fullmap = (dev-pci_map_data[i]); + map-mapsize = map-size; dev-pci_map_data[i].mapped++; + + /* If we've already mapped this resource in, handle + * submapping if needed, give caller a bus_space handle + * and pointer for the offest they asked for */ if (dev-pci_map_data[i].mapped 1) { -map-bsh = dev-pci_map_data[i].bsh; -return dev-pci_map_data[i].vaddr; +if ((reason =
CVS commit: [netbsd-5] src/crypto/dist/ipsec-tools/src/racoon
Module Name:src Committed By: snj Date: Sat Jan 30 19:44:31 UTC 2010 Modified Files: src/crypto/dist/ipsec-tools/src/racoon [netbsd-5]: isakmp.c racoon.conf.5 Log Message: Pull up following revision(s) (requested by hubertf in ticket #1281): crypto/dist/ipsec-tools/src/racoon/isakmp.c: revision 1.59 crypto/dist/ipsec-tools/src/racoon/racoon.conf.5: revision 1.57 From Maik Broemme: export ISAKMP SA identity as REMOTE_ID for phase1 up script (trac #313). To generate a diff of this commit: cvs rdiff -u -r1.42.4.1 -r1.42.4.2 \ src/crypto/dist/ipsec-tools/src/racoon/isakmp.c cvs rdiff -u -r1.46.4.1 -r1.46.4.2 \ src/crypto/dist/ipsec-tools/src/racoon/racoon.conf.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/dist/ipsec-tools/src/racoon/isakmp.c diff -u src/crypto/dist/ipsec-tools/src/racoon/isakmp.c:1.42.4.1 src/crypto/dist/ipsec-tools/src/racoon/isakmp.c:1.42.4.2 --- src/crypto/dist/ipsec-tools/src/racoon/isakmp.c:1.42.4.1 Sun Feb 8 18:42:16 2009 +++ src/crypto/dist/ipsec-tools/src/racoon/isakmp.c Sat Jan 30 19:44:31 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: isakmp.c,v 1.42.4.1 2009/02/08 18:42:16 snj Exp $ */ +/* $NetBSD: isakmp.c,v 1.42.4.2 2010/01/30 19:44:31 snj Exp $ */ /* Id: isakmp.c,v 1.74 2006/05/07 21:32:59 manubsd Exp */ @@ -3086,6 +3086,16 @@ } } + /* Peer identity. */ + if (iph1-id_p != NULL) { + if (script_env_append(envp, envc, REMOTE_ID, + ipsecdoi_id2str(iph1-id_p)) != 0) { + plog(LLV_ERROR, LOCATION, NULL, + Cannot set REMOTE_ID\n); + goto out; + } + } + if (privsep_script_exec(iph1-rmconf-script[script]-v, script, envp) != 0) plog(LLV_ERROR, LOCATION, NULL, Index: src/crypto/dist/ipsec-tools/src/racoon/racoon.conf.5 diff -u src/crypto/dist/ipsec-tools/src/racoon/racoon.conf.5:1.46.4.1 src/crypto/dist/ipsec-tools/src/racoon/racoon.conf.5:1.46.4.2 --- src/crypto/dist/ipsec-tools/src/racoon/racoon.conf.5:1.46.4.1 Sun Feb 8 18:42:18 2009 +++ src/crypto/dist/ipsec-tools/src/racoon/racoon.conf.5 Sat Jan 30 19:44:31 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: racoon.conf.5,v 1.46.4.1 2009/02/08 18:42:18 snj Exp $ +.\ $NetBSD: racoon.conf.5,v 1.46.4.2 2010/01/30 19:44:31 snj Exp $ .\ .\ Id: racoon.conf.5,v 1.54 2006/08/22 18:17:17 manubsd Exp .\ @@ -574,6 +574,8 @@ The remote address of the phase 1 SA. .It Ev REMOTE_PORT The remote port used for IKE for the phase 1 SA. +.It Ev REMOTE_ID +The remote identity received in IKE for the phase 1 SA. .El The following variables are only set if .Ic mode_cfg
CVS commit: [netbsd-5] src/sys/dev/pckbport
Module Name:src Committed By: snj Date: Sat Jan 30 19:49:05 UTC 2010 Modified Files: src/sys/dev/pckbport [netbsd-5]: pckbd.c pms.c Log Message: Pull up following revision(s) (requested by hubertf in ticket #1282): sys/dev/pckbport/pckbd.c: revision 1.26 sys/dev/pckbport/pms.c: revision 1.28 use aprint_error To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.25.6.1 src/sys/dev/pckbport/pckbd.c cvs rdiff -u -r1.26.14.1 -r1.26.14.2 src/sys/dev/pckbport/pms.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/pckbport/pckbd.c diff -u src/sys/dev/pckbport/pckbd.c:1.25 src/sys/dev/pckbport/pckbd.c:1.25.6.1 --- src/sys/dev/pckbport/pckbd.c:1.25 Wed Jun 11 17:35:02 2008 +++ src/sys/dev/pckbport/pckbd.c Sat Jan 30 19:49:05 2010 @@ -1,7 +1,7 @@ -/* $NetBSD: pckbd.c,v 1.25 2008/06/11 17:35:02 drochner Exp $ */ +/* $NetBSD: pckbd.c,v 1.25.6.1 2010/01/30 19:49:05 snj Exp $ */ /*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. + * Copyright (c) 1998, 2009 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -68,7 +68,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pckbd.c,v 1.25 2008/06/11 17:35:02 drochner Exp $); +__KERNEL_RCSID(0, $NetBSD: pckbd.c,v 1.25.6.1 2010/01/30 19:49:05 snj Exp $); #include sys/param.h #include sys/systm.h @@ -204,9 +204,7 @@ res = pckbport_poll_cmd(kbctag, kbcslot, cmd, 2, 0, 0, 0); if (res) { u_char cmdb[1]; -#ifdef DEBUG - printf(pckbd: error setting scanset 2\n); -#endif + aprint_debug(pckbd: error setting scanset 2\n); /* * XXX at least one keyboard is reported to lock up * if a set table is attempted, thus the reset. @@ -223,10 +221,8 @@ cmd[0] = KBC_SETTABLE; cmd[1] = 1; res = pckbport_poll_cmd(kbctag, kbcslot, cmd, 2, 0, 0, 0); -#ifdef DEBUG if (res) - printf(pckbd: error setting scanset 1\n); -#endif + aprint_debug(pckbd: error setting scanset 1\n); } return res; } @@ -275,10 +271,8 @@ cmd[0] = KBC_RESET; res = pckbport_poll_cmd(sc-id-t_kbctag, sc-id-t_kbcslot, cmd, 1, 1, resp, 1); -#ifdef DEBUG if (res) - printf(pckbdprobe: reset error %d\n, res); -#endif + aprint_debug(pckbdprobe: reset error %d\n, res); if (resp[0] != KBR_RSTDONE) printf(pckbdprobe: reset response 0x%x\n, resp[0]); @@ -317,9 +311,7 @@ cmd[0] = KBC_RESET; res = pckbport_poll_cmd(pa-pa_tag, pa-pa_slot, cmd, 1, 1, resp, 1); if (res) { -#ifdef DEBUG - printf(pckbdprobe: reset error %d\n, res); -#endif + aprint_debug(pckbdprobe: reset error %d\n, res); /* * There is probably no keyboard connected. * Let the probe succeed if the keyboard is used @@ -414,9 +406,7 @@ if (on) { if (sc-sc_enabled) { -#ifdef DIAGNOSTIC - printf(pckbd_enable: bad enable\n); -#endif + aprint_debug(pckbd_enable: bad enable\n); return EBUSY; } Index: src/sys/dev/pckbport/pms.c diff -u src/sys/dev/pckbport/pms.c:1.26.14.1 src/sys/dev/pckbport/pms.c:1.26.14.2 --- src/sys/dev/pckbport/pms.c:1.26.14.1 Sun Sep 13 22:07:47 2009 +++ src/sys/dev/pckbport/pms.c Sat Jan 30 19:49:05 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pms.c,v 1.26.14.1 2009/09/13 22:07:47 snj Exp $ */ +/* $NetBSD: pms.c,v 1.26.14.2 2010/01/30 19:49:05 snj Exp $ */ /*- * Copyright (c) 2004 Kentaro Kurahone. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pms.c,v 1.26.14.1 2009/09/13 22:07:47 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: pms.c,v 1.26.14.2 2010/01/30 19:49:05 snj Exp $); #include opt_pms.h @@ -149,9 +149,7 @@ cmd[0] = PMS_RESET; res = pckbport_poll_cmd(pa-pa_tag, pa-pa_slot, cmd, 1, 2, resp, 1); if (res) { -#ifdef DEBUG - printf(pmsprobe: reset error %d\n, res); -#endif + aprint_debug(pmsprobe: reset error %d\n, res); return 0; } if (resp[0] != PMS_RSTDONE) { @@ -161,9 +159,7 @@ /* get type number (0 = mouse) */ if (resp[1] != 0) { -#ifdef DEBUG - printf(pmsprobe: type 0x%x\n, resp[1]); -#endif + aprint_debug(pmsprobe: type 0x%x\n, resp[1]); return 0; } @@ -192,12 +188,10 @@ /* reset the device */ cmd[0] = PMS_RESET; res = pckbport_poll_cmd(pa-pa_tag, pa-pa_slot, cmd, 1, 2, resp, 1); -#ifdef DEBUG if (res || resp[0] != PMS_RSTDONE || resp[1] != 0) { - aprint_error(pmsattach: reset error\n); + aprint_debug(pmsattach: reset error\n); return; } -#endif sc-inputstate = 0; sc-buttons = 0; sc-protocol = PMS_UNKNOWN;
CVS commit: [netbsd-5] src/share/man/man4
Module Name:src Committed By: snj Date: Sat Jan 30 19:51:32 UTC 2010 Modified Files: src/share/man/man4 [netbsd-5]: crypto.4 Log Message: Pull up following revision(s) (requested by hubertf in ticket #1285): share/man/man4/crypto.4: revision 1.17 Fix typo: CIOCASSYMFEAT - CIOCASYMFEAT To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.14.4.1 src/share/man/man4/crypto.4 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/crypto.4 diff -u src/share/man/man4/crypto.4:1.14 src/share/man/man4/crypto.4:1.14.4.1 --- src/share/man/man4/crypto.4:1.14 Fri May 2 18:11:05 2008 +++ src/share/man/man4/crypto.4 Sat Jan 30 19:51:32 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: crypto.4,v 1.14 2008/05/02 18:11:05 martin Exp $ +.\ $NetBSD: crypto.4,v 1.14.4.1 2010/01/30 19:51:32 snj Exp $ .\ .\ Copyright (c) 2008 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -441,7 +441,7 @@ See below for discussion of the input and output parameter counts. .Ss Asymmetric-key commands .Bl -tag -width CIOCFKEY -.It Dv CIOCASSYMFEAT Fa int *feature_mask +.It Dv CIOCASYMFEAT Fa int *feature_mask Returns a bitmask of supported asymmetric-key operations. Each of the above-listed asymmetric operations is present if and only if the bit position numbered by the code for that operation
CVS commit: [netbsd-5] src/sys/kern
Module Name:src Committed By: snj Date: Sat Jan 30 19:53:21 UTC 2010 Modified Files: src/sys/kern [netbsd-5]: sys_aio.c Log Message: Pull up following revision(s) (requested by rmind in ticket #1286): sys/kern/sys_aio.c: revision 1.25 aio_suspend1: fix a double free bug. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.19.8.1 src/sys/kern/sys_aio.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/sys_aio.c diff -u src/sys/kern/sys_aio.c:1.19 src/sys/kern/sys_aio.c:1.19.8.1 --- src/sys/kern/sys_aio.c:1.19 Mon May 26 17:45:51 2008 +++ src/sys/kern/sys_aio.c Sat Jan 30 19:53:21 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_aio.c,v 1.19 2008/05/26 17:45:51 rmind Exp $ */ +/* $NetBSD: sys_aio.c,v 1.19.8.1 2010/01/30 19:53:21 snj Exp $ */ /* * Copyright (c) 2007, Mindaugas Rasiukevicius rmind at NetBSD org @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sys_aio.c,v 1.19 2008/05/26 17:45:51 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: sys_aio.c,v 1.19.8.1 2010/01/30 19:53:21 snj Exp $); #include opt_ddb.h @@ -801,9 +801,6 @@ mutex_enter(aio-aio_mtx); continue; } - -kmem_free(aiocbp_list, -nent * sizeof(struct aio_job)); return error; } }
CVS commit: [netbsd-5-0] src/sys/kern
Module Name:src Committed By: snj Date: Sat Jan 30 20:05:56 UTC 2010 Modified Files: src/sys/kern [netbsd-5-0]: sys_aio.c Log Message: Pull up following revision(s) (requested by rmind in ticket #1286): sys/kern/sys_aio.c: revision 1.25 aio_suspend1: fix a double free bug. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.19.10.1 src/sys/kern/sys_aio.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/sys_aio.c diff -u src/sys/kern/sys_aio.c:1.19 src/sys/kern/sys_aio.c:1.19.10.1 --- src/sys/kern/sys_aio.c:1.19 Mon May 26 17:45:51 2008 +++ src/sys/kern/sys_aio.c Sat Jan 30 20:05:56 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_aio.c,v 1.19 2008/05/26 17:45:51 rmind Exp $ */ +/* $NetBSD: sys_aio.c,v 1.19.10.1 2010/01/30 20:05:56 snj Exp $ */ /* * Copyright (c) 2007, Mindaugas Rasiukevicius rmind at NetBSD org @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sys_aio.c,v 1.19 2008/05/26 17:45:51 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: sys_aio.c,v 1.19.10.1 2010/01/30 20:05:56 snj Exp $); #include opt_ddb.h @@ -801,9 +801,6 @@ mutex_enter(aio-aio_mtx); continue; } - -kmem_free(aiocbp_list, -nent * sizeof(struct aio_job)); return error; } }
CVS commit: [netbsd-5-0] src/doc
Module Name:src Committed By: snj Date: Sat Jan 30 20:10:24 UTC 2010 Modified Files: src/doc [netbsd-5-0]: CHANGES-5.0.2 Log Message: Tickets 1269 and 1286. To generate a diff of this commit: cvs rdiff -u -r1.1.2.47 -r1.1.2.48 src/doc/CHANGES-5.0.2 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.0.2 diff -u src/doc/CHANGES-5.0.2:1.1.2.47 src/doc/CHANGES-5.0.2:1.1.2.48 --- src/doc/CHANGES-5.0.2:1.1.2.47 Wed Jan 27 21:45:44 2010 +++ src/doc/CHANGES-5.0.2 Sat Jan 30 20:10:23 2010 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.0.2,v 1.1.2.47 2010/01/27 21:45:44 sborrill Exp $ +# $NetBSD: CHANGES-5.0.2,v 1.1.2.48 2010/01/30 20:10:23 snj Exp $ A complete list of changes from the NetBSD 5.0.1 release to the NetBSD 5.0.2 release: @@ -1134,3 +1134,19 @@ mfi_ioctl() entry and release it on exit. [bouyer, #ticket 1257] +sys/dev/cgd.c 1.69 +sys/dev/ata/wd.c1.383 via patch +sys/dev/dkwedge/dk.c1.53 +sys/dev/vnd.c 1.206 + + struct buf::b_iodone is not called at splbio() any more. + Make sure non-MPsafe iodone callbacks raise the SPL as appropriate. + Fix buffer corruption issue I noticed in dk(4), and probable similar + issues in vnd(4) and cgd(4). + [bouyer, ticket #1269] + +sys/kern/sys_aio.c1.25 + + aio_suspend1: fix a double free bug. + [rmind, ticket #1286] +
CVS commit: [netbsd-5] src/dist/file/doc
Module Name:src Committed By: snj Date: Sat Jan 30 20:14:54 UTC 2010 Modified Files: src/dist/file/doc [netbsd-5]: file.1 libmagic.3 Log Message: Apply patch (requested by dholland in ticket #1287): Fix man page section numbers. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.17.4.1 src/dist/file/doc/file.1 cvs rdiff -u -r1.10 -r1.10.4.1 src/dist/file/doc/libmagic.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/file/doc/file.1 diff -u src/dist/file/doc/file.1:1.17 src/dist/file/doc/file.1:1.17.4.1 --- src/dist/file/doc/file.1:1.17 Sat Aug 30 12:16:51 2008 +++ src/dist/file/doc/file.1 Sat Jan 30 20:14:54 2010 @@ -339,7 +339,7 @@ .Fl h options. .Sh SEE ALSO -.Xr magic 4 , +.Xr magic 5 , .Xr strings 1 , .Xr od 1 , .Xr hexdump 1, Index: src/dist/file/doc/libmagic.3 diff -u src/dist/file/doc/libmagic.3:1.10 src/dist/file/doc/libmagic.3:1.10.4.1 --- src/dist/file/doc/libmagic.3:1.10 Sat Aug 30 12:16:51 2008 +++ src/dist/file/doc/libmagic.3 Sat Jan 30 20:14:54 2010 @@ -26,7 +26,7 @@ .\ SUCH DAMAGE. .\ .Dd November 15, 2006 -.Dt MAGIC 3 +.Dt LIBMAGIC 3 .Os .Sh NAME .Nm magic_open , @@ -68,7 +68,7 @@ operate on the magic database file which is described in -.Xr magic 4 . +.Xr magic 5 . .Pp The function .Fn magic_open @@ -132,7 +132,7 @@ The .Fn magic_close function closes the -.Xr magic 4 +.Xr magic 5 database and deallocates any resources used. .Pp The @@ -249,7 +249,7 @@ .El .Sh SEE ALSO .Xr file 1 , -.Xr magic 4 +.Xr magic 5 .Sh AUTHORS Måns Rullgård Initial libmagic implementation, and configuration.
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: snj Date: Sat Jan 30 20:26:51 UTC 2010 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Tickets 1266, 1269, 1270-1276, 1280-1282, 1285, and 1287. To generate a diff of this commit: cvs rdiff -u -r1.1.2.189 -r1.1.2.190 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.189 src/doc/CHANGES-5.1:1.1.2.190 --- src/doc/CHANGES-5.1:1.1.2.189 Wed Jan 27 22:29:11 2010 +++ src/doc/CHANGES-5.1 Sat Jan 30 20:26:50 2010 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.189 2010/01/27 22:29:11 sborrill Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.190 2010/01/30 20:26:50 snj Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -16444,3 +16444,107 @@ code. We need more work for 82577. [msaitoh, ticket #1277] +libexec/ld.elf_so/map_object.c 1.39 +libexec/ld.elf_so/rtld.h 1.83 +libexec/ld.elf_so/symbol.c 1.49 + + Reset the COMBRELOC cache Obj_Entry if it was freed. + Fixes PR 41482. + [skrll, ticket #1266] + +sys/dev/cgd.c 1.69 +sys/dev/ata/wd.c1.383 via patch +sys/dev/dkwedge/dk.c1.53 +sys/dev/vnd.c 1.206 + + struct buf::b_iodone is not called at splbio() any more. + Make sure non-MPsafe iodone callbacks raise the SPL as appropriate. + Fix buffer corruption issue in dk(4), and probably similar issues + in vnd(4) and cgd(4). + [bouyer, ticket #1269] + +external/mit/MesaLib/dist/src/mesa/glapi/glapi.c 1.2 +external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c 1.2 +external/mit/MesaLib/dist/src/mesa/glapi/glthread.c 1.2 + + Decorate some GL APIs with PUBLIC so they're available to link + against; otherwise, e.g., the swrast DRI module can't find + _glapi_check_multithread. + [rafal, ticket #1270] + +sys/arch/xen/xen/privcmd.c 1.40 +sys/arch/xen/x86/xen_bus_dma.c 1.16 +sys/arch/xen/xen/xengnt.c 1.17 via patch +sys/arch/xen/xen/xennetback_xenbus.c 1.33 + + Fix address overflow with 32bit PAE. + [bouyer, ticket #1271] + +bin/pax/options.c1.106 + + Don't use NOGLOB_MTCH for pax, only for tar. Fixes fix for PR 41167 + and closes PR 42301. + [dholland, ticket #1272] + +etc/Makefile 1.377, 1.378 + + Fix installation permissions of /var/db/locate.database as per + PR misc/41544. + [dholland, ticket #1273] + +bin/sh/cd.c 1.40 +bin/sh/sh.1 1.95, 1.97 via patch + + Make the cd builtin accept and ignore -P, which is a kshism that + has been allowed to leak into POSIX and selects the behavior cd + already implements. Closes PR bin/42557 and also relevant to + PR pkg/42168. + [dholland, ticket #1274] + +common/lib/libc/hash/sha2/sha2.c 1.20 + + Fix unaligned access as reported in PR port-sparc/42273. + [joerg, ticket #1275] + +common/lib/libc/hash/sha2/sha2.c 1.21 + + Fix unaligned access in *_Final for SHA224/SHA256/SHA384. + Remaining part of PR 42273. + [joerg, ticket #1276] + +sys/external/bsd/drm/dist/bsd-core/drmP.h 1.16 +sys/external/bsd/drm/dist/bsd-core/drm_bufs.c 1.7 +sys/external/bsd/drm/dist/bsd-core/drm_memory.c 1.7 + + Support drm drivers (Intel G33/G45) submapping pci resources. + Fixes PR xsrc/42262. + [jmorse, ticket #1280] + +crypto/dist/ipsec-tools/src/racoon/isakmp.c 1.59 +crypto/dist/ipsec-tools/src/racoon/racoon.conf.5 1.57 + + Export ISAKMP SA identity as REMOTE_ID for phase1 up script. + [hubertf, ticket #1281] + +sys/dev/pckbport/pckbd.c 1.26 +sys/dev/pckbport/pms.c1.28 + + Use aprint_error. + [hubertf, ticket #1282] + +share/man/man4/crypto.41.17 + + Fix typo: CIOCASSYMFEAT - CIOCASYMFEAT + [hubertf, ticket #1285] + +sys/kern/sys_aio.c1.25 + + aio_suspend1: fix a double free bug. + [rmind, ticket #1286] + +dist/file/doc/file.1patch +dist/file/doc/libmagic.3 patch + + Fix man page section numbers. + [dholland, ticket #1287] +
CVS commit: [netbsd-5-0] src/common/lib/libc/hash/sha2
Module Name:src Committed By: snj Date: Sat Jan 30 20:35:57 UTC 2010 Modified Files: src/common/lib/libc/hash/sha2 [netbsd-5-0]: sha2.c Log Message: Pull up following revision(s) (requested by joerg in ticket #1275): common/lib/libc/hash/sha2/sha2.c: revision 1.20 Fix unaligned access as reported in PR port-sparc/42273 To generate a diff of this commit: cvs rdiff -u -r1.7.14.1 -r1.7.14.2 src/common/lib/libc/hash/sha2/sha2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/hash/sha2/sha2.c diff -u src/common/lib/libc/hash/sha2/sha2.c:1.7.14.1 src/common/lib/libc/hash/sha2/sha2.c:1.7.14.2 --- src/common/lib/libc/hash/sha2/sha2.c:1.7.14.1 Tue Jul 14 19:35:22 2009 +++ src/common/lib/libc/hash/sha2/sha2.c Sat Jan 30 20:35:57 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sha2.c,v 1.7.14.1 2009/07/14 19:35:22 snj Exp $ */ +/* $NetBSD: sha2.c,v 1.7.14.2 2010/01/30 20:35:57 snj Exp $ */ /* $KAME: sha2.c,v 1.9 2003/07/20 00:28:38 itojun Exp $ */ /* @@ -43,7 +43,7 @@ #include sys/cdefs.h #if defined(_KERNEL) || defined(_STANDALONE) -__KERNEL_RCSID(0, $NetBSD: sha2.c,v 1.7.14.1 2009/07/14 19:35:22 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: sha2.c,v 1.7.14.2 2010/01/30 20:35:57 snj Exp $); #include sys/param.h /* XXX: to pull machine/macros.h for vax memset(9) */ #include lib/libkern/libkern.h @@ -51,7 +51,7 @@ #else #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: sha2.c,v 1.7.14.1 2009/07/14 19:35:22 snj Exp $); +__RCSID($NetBSD: sha2.c,v 1.7.14.2 2010/01/30 20:35:57 snj Exp $); #endif /* LIBC_SCCS and not lint */ #include namespace.h @@ -941,7 +941,6 @@ int SHA512_Final(uint8_t digest[], SHA512_CTX *context) { - uint64_t *d = (void *)digest; size_t i; /* If no digest buffer is passed, we don't bother doing this: */ @@ -950,7 +949,7 @@ /* Save the hash data for output: */ for (i = 0; i 8; ++i) - d[i] = htobe64(context-state[i]); + be64enc(digest + 8 * i, context-state[i]); } /* Zero out state data */
CVS commit: [netbsd-5-0] src/common/lib/libc/hash/sha2
Module Name:src Committed By: snj Date: Sat Jan 30 20:38:43 UTC 2010 Modified Files: src/common/lib/libc/hash/sha2 [netbsd-5-0]: sha2.c Log Message: Pull up following revision(s) (requested by joerg in ticket #1276): common/lib/libc/hash/sha2/sha2.c: revision 1.21 Fix unaligned access in *_Final for SHA224/SHA256/SHA384. Remaining part of PR 42273. Tested by snj. To generate a diff of this commit: cvs rdiff -u -r1.7.14.2 -r1.7.14.3 src/common/lib/libc/hash/sha2/sha2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/hash/sha2/sha2.c diff -u src/common/lib/libc/hash/sha2/sha2.c:1.7.14.2 src/common/lib/libc/hash/sha2/sha2.c:1.7.14.3 --- src/common/lib/libc/hash/sha2/sha2.c:1.7.14.2 Sat Jan 30 20:35:57 2010 +++ src/common/lib/libc/hash/sha2/sha2.c Sat Jan 30 20:38:43 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sha2.c,v 1.7.14.2 2010/01/30 20:35:57 snj Exp $ */ +/* $NetBSD: sha2.c,v 1.7.14.3 2010/01/30 20:38:43 snj Exp $ */ /* $KAME: sha2.c,v 1.9 2003/07/20 00:28:38 itojun Exp $ */ /* @@ -43,7 +43,7 @@ #include sys/cdefs.h #if defined(_KERNEL) || defined(_STANDALONE) -__KERNEL_RCSID(0, $NetBSD: sha2.c,v 1.7.14.2 2010/01/30 20:35:57 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: sha2.c,v 1.7.14.3 2010/01/30 20:38:43 snj Exp $); #include sys/param.h /* XXX: to pull machine/macros.h for vax memset(9) */ #include lib/libkern/libkern.h @@ -51,7 +51,7 @@ #else #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: sha2.c,v 1.7.14.2 2010/01/30 20:35:57 snj Exp $); +__RCSID($NetBSD: sha2.c,v 1.7.14.3 2010/01/30 20:38:43 snj Exp $); #endif /* LIBC_SCCS and not lint */ #include namespace.h @@ -553,7 +553,6 @@ static int SHA224_256_Final(uint8_t digest[], SHA256_CTX *context, size_t len) { - uint32_t *d = (void *)digest; unsigned int usedspace; size_t i; @@ -601,7 +600,7 @@ SHA256_Transform(context, (uint32_t *)(void *)context-buffer); for (i = 0; i len / 4; i++) - d[i] = htobe32(context-state[i]); + be32enc(digest + 4 * i, context-state[i]); } /* Clean up state data: */ @@ -988,7 +987,6 @@ int SHA384_Final(uint8_t digest[], SHA384_CTX *context) { - uint64_t *d = (void *)digest; size_t i; /* If no digest buffer is passed, we don't bother doing this: */ @@ -997,7 +995,7 @@ /* Save the hash data for output: */ for (i = 0; i 6; ++i) - d[i] = be64toh(context-state[i]); + be64enc(digest + 8 * i, context-state[i]); } /* Zero out state data */
CVS commit: [netbsd-5-0] src/doc
Module Name:src Committed By: snj Date: Sat Jan 30 20:39:46 UTC 2010 Modified Files: src/doc [netbsd-5-0]: CHANGES-5.0.2 Log Message: Tickets 1275 and 1276. To generate a diff of this commit: cvs rdiff -u -r1.1.2.48 -r1.1.2.49 src/doc/CHANGES-5.0.2 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.0.2 diff -u src/doc/CHANGES-5.0.2:1.1.2.48 src/doc/CHANGES-5.0.2:1.1.2.49 --- src/doc/CHANGES-5.0.2:1.1.2.48 Sat Jan 30 20:10:23 2010 +++ src/doc/CHANGES-5.0.2 Sat Jan 30 20:39:46 2010 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.0.2,v 1.1.2.48 2010/01/30 20:10:23 snj Exp $ +# $NetBSD: CHANGES-5.0.2,v 1.1.2.49 2010/01/30 20:39:46 snj Exp $ A complete list of changes from the NetBSD 5.0.1 release to the NetBSD 5.0.2 release: @@ -1150,3 +1150,14 @@ aio_suspend1: fix a double free bug. [rmind, ticket #1286] +common/lib/libc/hash/sha2/sha2.c 1.20 + + Fix unaligned access as reported in PR port-sparc/42273. + [joerg, ticket #1275] + +common/lib/libc/hash/sha2/sha2.c 1.21 + + Fix unaligned access in *_Final for SHA224/SHA256/SHA384. + Remaining part of PR 42273. + [joerg, ticket #1276] +
CVS commit: [netbsd-5-0] src
Module Name:src Committed By: snj Date: Sat Jan 30 20:44:51 UTC 2010 Modified Files: src/doc [netbsd-5-0]: CHANGES-5.0.2 src/sys/kern [netbsd-5-0]: sys_aio.c Log Message: Revert ticket 1286. To generate a diff of this commit: cvs rdiff -u -r1.1.2.49 -r1.1.2.50 src/doc/CHANGES-5.0.2 cvs rdiff -u -r1.19.10.1 -r1.19.10.2 src/sys/kern/sys_aio.c 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.0.2 diff -u src/doc/CHANGES-5.0.2:1.1.2.49 src/doc/CHANGES-5.0.2:1.1.2.50 --- src/doc/CHANGES-5.0.2:1.1.2.49 Sat Jan 30 20:39:46 2010 +++ src/doc/CHANGES-5.0.2 Sat Jan 30 20:44:51 2010 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.0.2,v 1.1.2.49 2010/01/30 20:39:46 snj Exp $ +# $NetBSD: CHANGES-5.0.2,v 1.1.2.50 2010/01/30 20:44:51 snj Exp $ A complete list of changes from the NetBSD 5.0.1 release to the NetBSD 5.0.2 release: @@ -1145,11 +1145,6 @@ issues in vnd(4) and cgd(4). [bouyer, ticket #1269] -sys/kern/sys_aio.c1.25 - - aio_suspend1: fix a double free bug. - [rmind, ticket #1286] - common/lib/libc/hash/sha2/sha2.c 1.20 Fix unaligned access as reported in PR port-sparc/42273. Index: src/sys/kern/sys_aio.c diff -u src/sys/kern/sys_aio.c:1.19.10.1 src/sys/kern/sys_aio.c:1.19.10.2 --- src/sys/kern/sys_aio.c:1.19.10.1 Sat Jan 30 20:05:56 2010 +++ src/sys/kern/sys_aio.c Sat Jan 30 20:44:51 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_aio.c,v 1.19.10.1 2010/01/30 20:05:56 snj Exp $ */ +/* $NetBSD: sys_aio.c,v 1.19.10.2 2010/01/30 20:44:51 snj Exp $ */ /* * Copyright (c) 2007, Mindaugas Rasiukevicius rmind at NetBSD org @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sys_aio.c,v 1.19.10.1 2010/01/30 20:05:56 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: sys_aio.c,v 1.19.10.2 2010/01/30 20:44:51 snj Exp $); #include opt_ddb.h @@ -801,6 +801,9 @@ mutex_enter(aio-aio_mtx); continue; } + +kmem_free(aiocbp_list, +nent * sizeof(struct aio_job)); return error; } }
CVS commit: [netbsd-5] src
Module Name:src Committed By: snj Date: Sat Jan 30 20:46:20 UTC 2010 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 src/sys/kern [netbsd-5]: sys_aio.c Log Message: Revert ticket 1286. To generate a diff of this commit: cvs rdiff -u -r1.1.2.190 -r1.1.2.191 src/doc/CHANGES-5.1 cvs rdiff -u -r1.19.8.1 -r1.19.8.2 src/sys/kern/sys_aio.c 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.190 src/doc/CHANGES-5.1:1.1.2.191 --- src/doc/CHANGES-5.1:1.1.2.190 Sat Jan 30 20:26:50 2010 +++ src/doc/CHANGES-5.1 Sat Jan 30 20:46:20 2010 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.190 2010/01/30 20:26:50 snj Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.191 2010/01/30 20:46:20 snj Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -16537,11 +16537,6 @@ Fix typo: CIOCASSYMFEAT - CIOCASYMFEAT [hubertf, ticket #1285] -sys/kern/sys_aio.c1.25 - - aio_suspend1: fix a double free bug. - [rmind, ticket #1286] - dist/file/doc/file.1patch dist/file/doc/libmagic.3 patch Index: src/sys/kern/sys_aio.c diff -u src/sys/kern/sys_aio.c:1.19.8.1 src/sys/kern/sys_aio.c:1.19.8.2 --- src/sys/kern/sys_aio.c:1.19.8.1 Sat Jan 30 19:53:21 2010 +++ src/sys/kern/sys_aio.c Sat Jan 30 20:46:20 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_aio.c,v 1.19.8.1 2010/01/30 19:53:21 snj Exp $ */ +/* $NetBSD: sys_aio.c,v 1.19.8.2 2010/01/30 20:46:20 snj Exp $ */ /* * Copyright (c) 2007, Mindaugas Rasiukevicius rmind at NetBSD org @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sys_aio.c,v 1.19.8.1 2010/01/30 19:53:21 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: sys_aio.c,v 1.19.8.2 2010/01/30 20:46:20 snj Exp $); #include opt_ddb.h @@ -801,6 +801,9 @@ mutex_enter(aio-aio_mtx); continue; } + +kmem_free(aiocbp_list, +nent * sizeof(struct aio_job)); return error; } }
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jakllsch Date: Sat Jan 30 20:47:57 UTC 2010 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add Qumranet vendor and Virtio device IDs. Also, sort some vendor entries. To generate a diff of this commit: cvs rdiff -u -r1.1017 -r1.1018 src/sys/dev/pci/pcidevs 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/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1017 src/sys/dev/pci/pcidevs:1.1018 --- src/sys/dev/pci/pcidevs:1.1017 Sun Jan 24 15:53:29 2010 +++ src/sys/dev/pci/pcidevs Sat Jan 30 20:47:57 2010 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1017 2010/01/24 15:53:29 msaitoh Exp $ +$NetBSD: pcidevs,v 1.1018 2010/01/30 20:47:57 jakllsch Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -536,6 +536,7 @@ vendor PICTUREEL 0x12c5 Picture Elements vendor NVIDIA_SGS 0x12d2 Nvidia SGS-Thomson Microelectronics vendor RAINBOW 0x12de Rainbow Technologies +vendor DATUM 0x12e2 Datum Inc. Bancomm-Timing Division vendor AUREAL 0x12eb Aureal Semiconductor vendor ADMTEK 0x1317 ADMtek vendor PACKETENGINES 0x1318 Packet Engines @@ -610,11 +611,11 @@ vendor BBELEC 0x1896 B B Electronics vendor RENESAS 0x1912 Renesas Technologies vendor ATTANSIC 0x1969 Attansic Technologies +vendor JMICRON 0x197b JMicron Technology vendor EVE 0x1adb EVE +vendor QUMRANET 0x1af4 Qumranet vendor SYMPHONY2 0x1c1c Symphony Labs (2nd PCI Vendor ID) vendor TEKRAM2 0x1de1 Tekram Technology (2nd PCI Vendor ID) -vendor DATUM 0x12e2 Datum Inc. Bancomm-Timing Division -vendor JMICRON 0x197b JMicron Technology vendor HINT 0x3388 HiNT vendor 3DLABS 0x3d3d 3D Labs vendor AVANCE2 0x4005 Avance Logic (2nd PCI Vendor ID) @@ -3607,6 +3608,72 @@ /* QuickLogic products */ product QUICKLOGIC PCWATCHDOG 0x5030 PC Watchdog +/* Qumranet products */ +product QUMRANET VIRTIO_1000 0x1000 Virtio +product QUMRANET VIRTIO_1001 0x1001 Virtio +product QUMRANET VIRTIO_1002 0x1002 Virtio +product QUMRANET VIRTIO_1003 0x1003 Virtio +product QUMRANET VIRTIO_1004 0x1004 Virtio +product QUMRANET VIRTIO_1005 0x1005 Virtio +product QUMRANET VIRTIO_1006 0x1006 Virtio +product QUMRANET VIRTIO_1007 0x1007 Virtio +product QUMRANET VIRTIO_1008 0x1008 Virtio +product QUMRANET VIRTIO_1009 0x1009 Virtio +product QUMRANET VIRTIO_100A 0x100a Virtio +product QUMRANET VIRTIO_100B 0x100b Virtio +product QUMRANET VIRTIO_100C 0x100c Virtio +product QUMRANET VIRTIO_100D 0x100d Virtio +product QUMRANET VIRTIO_100E 0x100e Virtio +product QUMRANET VIRTIO_100F 0x100f Virtio +product QUMRANET VIRTIO_1010 0x1010 Virtio +product QUMRANET VIRTIO_1011 0x1011 Virtio +product QUMRANET VIRTIO_1012 0x1012 Virtio +product QUMRANET VIRTIO_1013 0x1013 Virtio +product QUMRANET VIRTIO_1014 0x1014 Virtio +product QUMRANET VIRTIO_1015 0x1015 Virtio +product QUMRANET VIRTIO_1016 0x1016 Virtio +product QUMRANET VIRTIO_1017 0x1017 Virtio +product QUMRANET VIRTIO_1018 0x1018 Virtio +product QUMRANET VIRTIO_1019 0x1019 Virtio +product QUMRANET VIRTIO_101A 0x101a Virtio +product QUMRANET VIRTIO_101B 0x101b Virtio +product QUMRANET VIRTIO_101C 0x101c Virtio +product QUMRANET VIRTIO_101D 0x101d Virtio +product QUMRANET VIRTIO_101E 0x101e Virtio +product QUMRANET VIRTIO_101F 0x101f Virtio +product QUMRANET VIRTIO_1020 0x1020 Virtio +product QUMRANET VIRTIO_1021 0x1021 Virtio +product QUMRANET VIRTIO_1022 0x1022 Virtio +product QUMRANET VIRTIO_1023 0x1023 Virtio +product QUMRANET VIRTIO_1024 0x1024 Virtio +product QUMRANET VIRTIO_1025 0x1025 Virtio +product QUMRANET VIRTIO_1026 0x1026 Virtio +product QUMRANET VIRTIO_1027 0x1027 Virtio +product QUMRANET VIRTIO_1028 0x1028 Virtio +product QUMRANET VIRTIO_1029 0x1029 Virtio +product QUMRANET VIRTIO_102A 0x102a Virtio +product QUMRANET VIRTIO_102B 0x102b Virtio +product QUMRANET VIRTIO_102C 0x102c Virtio +product QUMRANET VIRTIO_102D 0x102d Virtio +product QUMRANET VIRTIO_102E 0x102e Virtio +product QUMRANET VIRTIO_102F 0x102f Virtio +product QUMRANET VIRTIO_1030 0x1030 Virtio +product QUMRANET VIRTIO_1031 0x1031 Virtio +product QUMRANET VIRTIO_1032 0x1032 Virtio +product QUMRANET VIRTIO_1033 0x1033 Virtio +product QUMRANET VIRTIO_1034 0x1034 Virtio +product QUMRANET VIRTIO_1035 0x1035 Virtio +product QUMRANET VIRTIO_1036 0x1036 Virtio +product QUMRANET VIRTIO_1037 0x1037 Virtio +product QUMRANET VIRTIO_1038 0x1038 Virtio +product QUMRANET VIRTIO_1039 0x1039 Virtio +product QUMRANET VIRTIO_103A 0x103a Virtio +product QUMRANET VIRTIO_103B 0x103b Virtio +product QUMRANET VIRTIO_103C 0x103c Virtio +product QUMRANET VIRTIO_103D 0x103d Virtio +product QUMRANET VIRTIO_103E 0x103e Virtio +product QUMRANET VIRTIO_103F 0x103f Virtio + /* Rainbow Technologies products */ product RAINBOW CS200 0x0200 CryptoSwift 200 PKI Accelerator
CVS commit: [netbsd-5] src/sys/kern
Module Name:src Committed By: snj Date: Sat Jan 30 21:19:19 UTC 2010 Modified Files: src/sys/kern [netbsd-5]: sys_aio.c Log Message: Pull up following revision(s) (requested by rmind in ticket #1288): sys/kern/sys_aio.c: revision 1.28 via patch sys_aio_suspend, sys_lio_listio: - fix the buffer sizes. - use kmem_alloc instead of kmem_zalloc for buffers which we will overwrite soon. To generate a diff of this commit: cvs rdiff -u -r1.19.8.2 -r1.19.8.3 src/sys/kern/sys_aio.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/sys_aio.c diff -u src/sys/kern/sys_aio.c:1.19.8.2 src/sys/kern/sys_aio.c:1.19.8.3 --- src/sys/kern/sys_aio.c:1.19.8.2 Sat Jan 30 20:46:20 2010 +++ src/sys/kern/sys_aio.c Sat Jan 30 21:19:19 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_aio.c,v 1.19.8.2 2010/01/30 20:46:20 snj Exp $ */ +/* $NetBSD: sys_aio.c,v 1.19.8.3 2010/01/30 21:19:19 snj Exp $ */ /* * Copyright (c) 2007, Mindaugas Rasiukevicius rmind at NetBSD org @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sys_aio.c,v 1.19.8.2 2010/01/30 20:46:20 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: sys_aio.c,v 1.19.8.3 2010/01/30 21:19:19 snj Exp $); #include opt_ddb.h @@ -761,11 +761,11 @@ timo = 0; /* Get the list from user-space */ - aiocbp_list = kmem_zalloc(nent * sizeof(struct aio_job), KM_SLEEP); + aiocbp_list = kmem_alloc(nent * sizeof(*aiocbp_list), KM_SLEEP); error = copyin(SCARG(uap, list), aiocbp_list, - nent * sizeof(struct aiocb)); + nent * sizeof(*aiocbp_list)); if (error) { - kmem_free(aiocbp_list, nent * sizeof(struct aio_job)); + kmem_free(aiocbp_list, nent * sizeof(*aiocbp_list)); return error; } @@ -803,7 +803,7 @@ } kmem_free(aiocbp_list, -nent * sizeof(struct aio_job)); +nent * sizeof(*aiocbp_list)); return error; } } @@ -818,7 +818,7 @@ } mutex_exit(aio-aio_mtx); - kmem_free(aiocbp_list, nent * sizeof(struct aio_job)); + kmem_free(aiocbp_list, nent * sizeof(*aiocbp_list)); return error; } @@ -898,9 +898,9 @@ } /* Get the list from user-space */ - aiocbp_list = kmem_zalloc(nent * sizeof(struct aio_job), KM_SLEEP); + aiocbp_list = kmem_alloc(nent * sizeof(*aiocbp_list), KM_SLEEP); error = copyin(SCARG(uap, list), aiocbp_list, - nent * sizeof(struct aiocb)); + nent * sizeof(*aiocbp_list)); if (error) { mutex_enter(aio-aio_mtx); goto err; @@ -945,7 +945,7 @@ aio_sendsig(p, lio-sig); pool_put(aio_lio_pool, lio); } - kmem_free(aiocbp_list, nent * sizeof(struct aio_job)); + kmem_free(aiocbp_list, nent * sizeof(*aiocbp_list)); return error; }
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: snj Date: Sat Jan 30 21:22:13 UTC 2010 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Ticket 1288. To generate a diff of this commit: cvs rdiff -u -r1.1.2.191 -r1.1.2.192 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.191 src/doc/CHANGES-5.1:1.1.2.192 --- src/doc/CHANGES-5.1:1.1.2.191 Sat Jan 30 20:46:20 2010 +++ src/doc/CHANGES-5.1 Sat Jan 30 21:22:13 2010 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.191 2010/01/30 20:46:20 snj Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.192 2010/01/30 21:22:13 snj Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -16543,3 +16543,11 @@ Fix man page section numbers. [dholland, ticket #1287] +sys/kern/sys_aio.c1.28 via patch + + sys_aio_suspend, sys_lio_listio: + - fix the buffer sizes. + - use kmem_alloc instead of kmem_zalloc for buffers which we will + overwrite soon. + [rmind, ticket #1288] +
CVS commit: src/sys/kern
Module Name:src Committed By: rmind Date: Sat Jan 30 21:23:46 UTC 2010 Modified Files: src/sys/kern: sys_aio.c Log Message: aio_suspend1: remove wrong comment, add one new. Tidy up a little, while here. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/kern/sys_aio.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/sys_aio.c diff -u src/sys/kern/sys_aio.c:1.30 src/sys/kern/sys_aio.c:1.31 --- src/sys/kern/sys_aio.c:1.30 Sun Nov 22 19:09:16 2009 +++ src/sys/kern/sys_aio.c Sat Jan 30 21:23:46 2010 @@ -1,7 +1,7 @@ -/* $NetBSD: sys_aio.c,v 1.30 2009/11/22 19:09:16 mbalmer Exp $ */ +/* $NetBSD: sys_aio.c,v 1.31 2010/01/30 21:23:46 rmind Exp $ */ /* - * Copyright (c) 2007, Mindaugas Rasiukevicius rmind at NetBSD org + * Copyright (c) 2007 Mindaugas Rasiukevicius rmind at NetBSD org * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sys_aio.c,v 1.30 2009/11/22 19:09:16 mbalmer Exp $); +__KERNEL_RCSID(0, $NetBSD: sys_aio.c,v 1.31 2010/01/30 21:23:46 rmind Exp $); #ifdef _KERNEL_OPT #include opt_ddb.h @@ -69,20 +69,19 @@ /* * System-wide limits and counter of AIO operations. */ -u_int aio_listio_max = AIO_LISTIO_MAX; -static u_int aio_max = AIO_MAX; -static u_int aio_jobs_count; - -static struct pool aio_job_pool; -static struct pool aio_lio_pool; -static void *aio_ehook; - -/* Prototypes */ -static void aio_worker(void *); -static void aio_process(struct aio_job *); -static void aio_sendsig(struct proc *, struct sigevent *); -static int aio_enqueue_job(int, void *, struct lio_req *); -static void aio_exit(proc_t *, void *); +u_int aio_listio_max = AIO_LISTIO_MAX; +static u_int aio_max = AIO_MAX; +static u_int aio_jobs_count; + +static struct pool aio_job_pool; +static struct pool aio_lio_pool; +static void * aio_ehook; + +static void aio_worker(void *); +static void aio_process(struct aio_job *); +static void aio_sendsig(struct proc *, struct sigevent *); +static int aio_enqueue_job(int, void *, struct lio_req *); +static void aio_exit(proc_t *, void *); static const struct syscall_package aio_syscalls[] = { { SYS_aio_cancel, 0, (sy_call_t *)sys_aio_cancel }, @@ -830,6 +829,7 @@ if (error) return error; } + list = kmem_alloc(nent * sizeof(*list), KM_SLEEP); error = copyin(SCARG(uap, list), list, nent * sizeof(*list)); if (error) @@ -862,11 +862,8 @@ } else timo = 0; - /* Get the list from user-space */ - mutex_enter(aio-aio_mtx); for (;;) { - for (i = 0; i nent; i++) { /* Skip NULL entries */ @@ -890,6 +887,7 @@ mutex_exit(aio-aio_mtx); +/* Check if the job is done. */ error = copyin(aiocbp_list[i], aiocbp, sizeof(struct aiocb)); if (error == 0 aiocbp._state != JOB_DONE) {
CVS commit: [netbsd-5-0] src/sys/kern
Module Name:src Committed By: snj Date: Sat Jan 30 21:23:52 UTC 2010 Modified Files: src/sys/kern [netbsd-5-0]: sys_aio.c Log Message: Pull up following revision(s) (requested by rmind in ticket #1288): sys/kern/sys_aio.c: revision 1.28 sys_aio_suspend, sys_lio_listio: - fix the buffer sizes. - use kmem_alloc instead of kmem_zalloc for buffers which we will overwrite soon. To generate a diff of this commit: cvs rdiff -u -r1.19.10.2 -r1.19.10.3 src/sys/kern/sys_aio.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/sys_aio.c diff -u src/sys/kern/sys_aio.c:1.19.10.2 src/sys/kern/sys_aio.c:1.19.10.3 --- src/sys/kern/sys_aio.c:1.19.10.2 Sat Jan 30 20:44:51 2010 +++ src/sys/kern/sys_aio.c Sat Jan 30 21:23:52 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_aio.c,v 1.19.10.2 2010/01/30 20:44:51 snj Exp $ */ +/* $NetBSD: sys_aio.c,v 1.19.10.3 2010/01/30 21:23:52 snj Exp $ */ /* * Copyright (c) 2007, Mindaugas Rasiukevicius rmind at NetBSD org @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sys_aio.c,v 1.19.10.2 2010/01/30 20:44:51 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: sys_aio.c,v 1.19.10.3 2010/01/30 21:23:52 snj Exp $); #include opt_ddb.h @@ -761,11 +761,11 @@ timo = 0; /* Get the list from user-space */ - aiocbp_list = kmem_zalloc(nent * sizeof(struct aio_job), KM_SLEEP); + aiocbp_list = kmem_alloc(nent * sizeof(*aiocbp_list), KM_SLEEP); error = copyin(SCARG(uap, list), aiocbp_list, - nent * sizeof(struct aiocb)); + nent * sizeof(*aiocbp_list)); if (error) { - kmem_free(aiocbp_list, nent * sizeof(struct aio_job)); + kmem_free(aiocbp_list, nent * sizeof(*aiocbp_list)); return error; } @@ -803,7 +803,7 @@ } kmem_free(aiocbp_list, -nent * sizeof(struct aio_job)); +nent * sizeof(*aiocbp_list)); return error; } } @@ -818,7 +818,7 @@ } mutex_exit(aio-aio_mtx); - kmem_free(aiocbp_list, nent * sizeof(struct aio_job)); + kmem_free(aiocbp_list, nent * sizeof(*aiocbp_list)); return error; } @@ -898,9 +898,9 @@ } /* Get the list from user-space */ - aiocbp_list = kmem_zalloc(nent * sizeof(struct aio_job), KM_SLEEP); + aiocbp_list = kmem_alloc(nent * sizeof(*aiocbp_list), KM_SLEEP); error = copyin(SCARG(uap, list), aiocbp_list, - nent * sizeof(struct aiocb)); + nent * sizeof(*aiocbp_list)); if (error) { mutex_enter(aio-aio_mtx); goto err; @@ -945,7 +945,7 @@ aio_sendsig(p, lio-sig); pool_put(aio_lio_pool, lio); } - kmem_free(aiocbp_list, nent * sizeof(struct aio_job)); + kmem_free(aiocbp_list, nent * sizeof(*aiocbp_list)); return error; }
CVS commit: [netbsd-5-0] src/doc
Module Name:src Committed By: snj Date: Sat Jan 30 21:25:14 UTC 2010 Modified Files: src/doc [netbsd-5-0]: CHANGES-5.0.2 Log Message: Ticket 1288. To generate a diff of this commit: cvs rdiff -u -r1.1.2.50 -r1.1.2.51 src/doc/CHANGES-5.0.2 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.0.2 diff -u src/doc/CHANGES-5.0.2:1.1.2.50 src/doc/CHANGES-5.0.2:1.1.2.51 --- src/doc/CHANGES-5.0.2:1.1.2.50 Sat Jan 30 20:44:51 2010 +++ src/doc/CHANGES-5.0.2 Sat Jan 30 21:25:14 2010 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.0.2,v 1.1.2.50 2010/01/30 20:44:51 snj Exp $ +# $NetBSD: CHANGES-5.0.2,v 1.1.2.51 2010/01/30 21:25:14 snj Exp $ A complete list of changes from the NetBSD 5.0.1 release to the NetBSD 5.0.2 release: @@ -1156,3 +1156,11 @@ Remaining part of PR 42273. [joerg, ticket #1276] +sys/kern/sys_aio.c1.28 via patch + + sys_aio_suspend, sys_lio_listio: + - fix the buffer sizes. + - use kmem_alloc instead of kmem_zalloc for buffers which we will + overwrite soon. + [rmind, ticket #1288] +
CVS commit: src/external/bsd/fetch/dist/libfetch
Module Name:src Committed By: joerg Date: Sat Jan 30 21:26:14 UTC 2010 Update of /cvsroot/src/external/bsd/fetch/dist/libfetch In directory ivanova.netbsd.org:/tmp/cvs-serv19449 Log Message: libfetch-2.30: - Revamped connection cache, allowing more than one active session - HTTP keep-alive support Status: Vendor Tag: PKGSRC Release Tags: libfetch-2-30 U src/external/bsd/fetch/dist/libfetch/common.c U src/external/bsd/fetch/dist/libfetch/common.h U src/external/bsd/fetch/dist/libfetch/errlist.sh U src/external/bsd/fetch/dist/libfetch/fetch.3 U src/external/bsd/fetch/dist/libfetch/fetch.c U src/external/bsd/fetch/dist/libfetch/fetch.cat3 U src/external/bsd/fetch/dist/libfetch/fetch.h U src/external/bsd/fetch/dist/libfetch/file.c U src/external/bsd/fetch/dist/libfetch/ftp.c U src/external/bsd/fetch/dist/libfetch/ftp.errors U src/external/bsd/fetch/dist/libfetch/http.c U src/external/bsd/fetch/dist/libfetch/http.errors No conflicts created by this import
CVS commit: src/external/bsd/pkg_install/dist
Module Name:src Committed By: joerg Date: Sat Jan 30 21:33:58 UTC 2010 Update of /cvsroot/src/external/bsd/pkg_install/dist In directory ivanova.netbsd.org:/tmp/cvs-serv23844 Log Message: pkg_install-20100130: - pkg_add -U to rplace an installed version - refactored man pages - PKG_DBDIR / PKG_REFCOUNT_DBDIR as pkg_install.conf options - synced license list - use connection cache from libfetch Status: Vendor Tag: PKGSRC Release Tags: pkg_install-20100130 U src/external/bsd/pkg_install/dist/add/add.h U src/external/bsd/pkg_install/dist/add/main.c U src/external/bsd/pkg_install/dist/add/perform.c U src/external/bsd/pkg_install/dist/add/pkg_add.1 U src/external/bsd/pkg_install/dist/admin/admin.h U src/external/bsd/pkg_install/dist/admin/audit-packages.sh.in U src/external/bsd/pkg_install/dist/admin/audit.c U src/external/bsd/pkg_install/dist/admin/check.c U src/external/bsd/pkg_install/dist/admin/download-vulnerability-list.sh.in U src/external/bsd/pkg_install/dist/admin/main.c U src/external/bsd/pkg_install/dist/admin/pkg_admin.1 U src/external/bsd/pkg_install/dist/bpm/bpm.1 U src/external/bsd/pkg_install/dist/bpm/bpm.sh.in U src/external/bsd/pkg_install/dist/create/build.c U src/external/bsd/pkg_install/dist/create/create.h U src/external/bsd/pkg_install/dist/create/main.c U src/external/bsd/pkg_install/dist/create/perform.c U src/external/bsd/pkg_install/dist/create/pkg_create.1 U src/external/bsd/pkg_install/dist/create/pl.c U src/external/bsd/pkg_install/dist/create/util.c N src/external/bsd/pkg_install/dist/delete/pkg_delete.1.in U src/external/bsd/pkg_install/dist/delete/pkg_delete.c U src/external/bsd/pkg_install/dist/delete/pkg_delete.1 U src/external/bsd/pkg_install/dist/info/info.h U src/external/bsd/pkg_install/dist/info/main.c U src/external/bsd/pkg_install/dist/info/perform.c U src/external/bsd/pkg_install/dist/info/pkg_info.1 U src/external/bsd/pkg_install/dist/info/show.c U src/external/bsd/pkg_install/dist/lib/automatic.c U src/external/bsd/pkg_install/dist/lib/config.h.in U src/external/bsd/pkg_install/dist/lib/conflicts.c U src/external/bsd/pkg_install/dist/lib/decompress.c U src/external/bsd/pkg_install/dist/lib/defs.h U src/external/bsd/pkg_install/dist/lib/dewey.c U src/external/bsd/pkg_install/dist/lib/dewey.h U src/external/bsd/pkg_install/dist/lib/fexec.c U src/external/bsd/pkg_install/dist/lib/file.c U src/external/bsd/pkg_install/dist/lib/global.c U src/external/bsd/pkg_install/dist/lib/gpgsig.c U src/external/bsd/pkg_install/dist/lib/iterate.c U src/external/bsd/pkg_install/dist/lib/lib.h U src/external/bsd/pkg_install/dist/lib/license.c U src/external/bsd/pkg_install/dist/lib/lpkg.c U src/external/bsd/pkg_install/dist/lib/opattern.c U src/external/bsd/pkg_install/dist/lib/parse-config.c U src/external/bsd/pkg_install/dist/lib/pkcs7.c U src/external/bsd/pkg_install/dist/lib/pkg_install.conf.5.in U src/external/bsd/pkg_install/dist/lib/pkg_io.c U src/external/bsd/pkg_install/dist/lib/pkg_signature.c U src/external/bsd/pkg_install/dist/lib/pkg_summary.5 U src/external/bsd/pkg_install/dist/lib/pkgdb.c U src/external/bsd/pkg_install/dist/lib/pkgsrc.7 U src/external/bsd/pkg_install/dist/lib/version.h U src/external/bsd/pkg_install/dist/lib/plist.c U src/external/bsd/pkg_install/dist/lib/remove.c U src/external/bsd/pkg_install/dist/lib/str.c U src/external/bsd/pkg_install/dist/lib/var.c U src/external/bsd/pkg_install/dist/lib/version.c U src/external/bsd/pkg_install/dist/lib/vulnerabilities-file.c U src/external/bsd/pkg_install/dist/lib/xwrapper.c U src/external/bsd/pkg_install/dist/x509/pkgsrc.cnf U src/external/bsd/pkg_install/dist/x509/pkgsrc.sh U src/external/bsd/pkg_install/dist/x509/signing.txt No conflicts created by this import
CVS commit: src/sys/netatalk
Module Name:src Committed By: is Date: Sat Jan 30 21:48:30 UTC 2010 Modified Files: src/sys/netatalk: at_control.c Log Message: Use the symbolic names. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/netatalk/at_control.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/netatalk/at_control.c diff -u src/sys/netatalk/at_control.c:1.32 src/sys/netatalk/at_control.c:1.33 --- src/sys/netatalk/at_control.c:1.32 Sat Apr 18 14:58:05 2009 +++ src/sys/netatalk/at_control.c Sat Jan 30 21:48:30 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: at_control.c,v 1.32 2009/04/18 14:58:05 tsutsui Exp $ */ +/* $NetBSD: at_control.c,v 1.33 2010/01/30 21:48:30 is Exp $ */ /* * Copyright (c) 1990,1994 Regents of The University of Michigan. @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: at_control.c,v 1.32 2009/04/18 14:58:05 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: at_control.c,v 1.33 2010/01/30 21:48:30 is Exp $); #include sys/param.h #include sys/systm.h @@ -609,8 +609,8 @@ aa-aa_ifa.ifa_metric = ifp-if_metric; if (ifp-if_flags IFF_BROADCAST) { - aa-aa_broadaddr.sat_addr.s_net = htons(0); - aa-aa_broadaddr.sat_addr.s_node = 0xff; + aa-aa_broadaddr.sat_addr.s_net = htons(ATADDR_ANYNET); + aa-aa_broadaddr.sat_addr.s_node = ATADDR_BCAST; aa-aa_ifa.ifa_broadaddr = (struct sockaddr *) aa-aa_broadaddr; /* add the range of routes needed */
CVS commit: src
Module Name:src Committed By: pooka Date: Sat Jan 30 21:55:31 UTC 2010 Modified Files: src/share/man/man4: swwdog.4 src/sys/dev/sysmon: files.sysmon swwdog.c Log Message: Make swwdog use no-needs-count. As the manpage says, there can be only one. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/swwdog.4 cvs rdiff -u -r1.10 -r1.11 src/sys/dev/sysmon/files.sysmon cvs rdiff -u -r1.7 -r1.8 src/sys/dev/sysmon/swwdog.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/man4/swwdog.4 diff -u src/share/man/man4/swwdog.4:1.3 src/share/man/man4/swwdog.4:1.4 --- src/share/man/man4/swwdog.4:1.3 Wed Jan 12 15:16:33 2005 +++ src/share/man/man4/swwdog.4 Sat Jan 30 21:55:28 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: swwdog.4,v 1.3 2005/01/12 15:16:33 drochner Exp $ +.\ $NetBSD: swwdog.4,v 1.4 2010/01/30 21:55:28 pooka Exp $ .\ .\ Copyright (c) 2004, 2005 Steven M. Bellovin .\ All rights reserved. @@ -31,7 +31,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd January 6, 2005 +.Dd January 30, 2010 .\ Written by Steven M. Bellovin .Dt SWWDOG 4 .Os @@ -39,7 +39,7 @@ .Nm swwdog .Nd software watchdog timer .Sh SYNOPSIS -.Cd pseudo-device swwdog Op Ar count +.Cd pseudo-device swwdog .Sh DESCRIPTION The .Nm @@ -60,10 +60,7 @@ driver was written by .An Steven M. Bellovin . .Sh BUGS -Although more than one -.Nm -timer can be configured, it's a pointless thing to do, since only -one watchdog timer can be active at any given time. +Only one watchdog timer can be active at any given time. Arguably, this is a bug in the watchdog timer framework. .Pp Kernel tickle mode is useless with Index: src/sys/dev/sysmon/files.sysmon diff -u src/sys/dev/sysmon/files.sysmon:1.10 src/sys/dev/sysmon/files.sysmon:1.11 --- src/sys/dev/sysmon/files.sysmon:1.10 Tue Sep 4 16:54:02 2007 +++ src/sys/dev/sysmon/files.sysmon Sat Jan 30 21:55:28 2010 @@ -1,4 +1,4 @@ -# $NetBSD: files.sysmon,v 1.10 2007/09/04 16:54:02 xtraeme Exp $ +# $NetBSD: files.sysmon,v 1.11 2010/01/30 21:55:28 pooka Exp $ define sysmon_taskq file dev/sysmon/sysmon_taskq.c sysmon_taskq needs-flag @@ -19,5 +19,4 @@ sysmon_power defpseudo swwdog: sysmon_wdog -filedev/sysmon/swwdog.cswwdogneeds-count - +filedev/sysmon/swwdog.cswwdog Index: src/sys/dev/sysmon/swwdog.c diff -u src/sys/dev/sysmon/swwdog.c:1.7 src/sys/dev/sysmon/swwdog.c:1.8 --- src/sys/dev/sysmon/swwdog.c:1.7 Mon Jul 9 21:01:23 2007 +++ src/sys/dev/sysmon/swwdog.c Sat Jan 30 21:55:30 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: swwdog.c,v 1.7 2007/07/09 21:01:23 ad Exp $ */ +/* $NetBSD: swwdog.c,v 1.8 2010/01/30 21:55:30 pooka Exp $ */ /* * Copyright (c) 2004, 2005 Steven M. Bellovin @@ -33,7 +33,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: swwdog.c,v 1.7 2007/07/09 21:01:23 ad Exp $); +__KERNEL_RCSID(0, $NetBSD: swwdog.c,v 1.8 2010/01/30 21:55:30 pooka Exp $); /* * @@ -49,8 +49,7 @@ #include sys/wdog.h #include dev/sysmon/sysmonvar.h -#include swwdog.h - +#define NSWWDOG 1 struct swwdog_softc { struct sysmon_wdog sc_smw; struct callout sc_c;
CVS commit: src/sys
Module Name:src Committed By: pooka Date: Sat Jan 30 23:19:55 UTC 2010 Modified Files: src/sys/conf: files src/sys/kern: kern_subr.c Log Message: Trade 200-something bytes for the death of an ifdef. To generate a diff of this commit: cvs rdiff -u -r1.971 -r1.972 src/sys/conf/files cvs rdiff -u -r1.203 -r1.204 src/sys/kern/kern_subr.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/conf/files diff -u src/sys/conf/files:1.971 src/sys/conf/files:1.972 --- src/sys/conf/files:1.971 Sun Jan 24 14:25:57 2010 +++ src/sys/conf/files Sat Jan 30 23:19:55 2010 @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.971 2010/01/24 14:25:57 pooka Exp $ +# $NetBSD: files,v 1.972 2010/01/30 23:19:55 pooka Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 version 20090313 @@ -73,7 +73,6 @@ defflag opt_malloc_debug.h MALLOC_DEBUG defflag opt_pool.h POOL_DIAGNOSTIC defparam opt_poollog.h POOL_LOGSIZE -defflag opt_powerhook.h POWERHOOK_DEBUG defflag opt_revcache.h NAMECACHE_ENTER_REVERSE Index: src/sys/kern/kern_subr.c diff -u src/sys/kern/kern_subr.c:1.203 src/sys/kern/kern_subr.c:1.204 --- src/sys/kern/kern_subr.c:1.203 Thu Nov 5 18:07:19 2009 +++ src/sys/kern/kern_subr.c Sat Jan 30 23:19:55 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_subr.c,v 1.203 2009/11/05 18:07:19 dyoung Exp $ */ +/* $NetBSD: kern_subr.c,v 1.204 2010/01/30 23:19:55 pooka Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2002, 2007, 2008 The NetBSD Foundation, Inc. @@ -79,14 +79,13 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_subr.c,v 1.203 2009/11/05 18:07:19 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_subr.c,v 1.204 2010/01/30 23:19:55 pooka Exp $); #include opt_ddb.h #include opt_md.h #include opt_syscall_debug.h #include opt_ktrace.h #include opt_ptrace.h -#include opt_powerhook.h #include opt_tftproot.h #include sys/param.h @@ -136,6 +135,7 @@ #endif dev_t dumpcdev; /* for savecore */ +int powerhook_debug = 0; static void * hook_establish(hook_list_t *list, void (*fn)(void *), void *arg) @@ -426,32 +426,28 @@ dopowerhooks(int why) { struct powerhook_desc *dp; - -#ifdef POWERHOOK_DEBUG const char *why_name; static const char * pwr_names[] = {PWR_NAMES}; why_name = why __arraycount(pwr_names) ? pwr_names[why] : ???; -#endif if (why == PWR_RESUME || why == PWR_SOFTRESUME) { CIRCLEQ_FOREACH_REVERSE(dp, powerhook_list, sfd_list) { -#ifdef POWERHOOK_DEBUG - printf(dopowerhooks %s: %s (%p)\n, why_name, dp-sfd_name, dp); -#endif + if (powerhook_debug) +printf(dopowerhooks %s: %s (%p)\n, +why_name, dp-sfd_name, dp); (*dp-sfd_fn)(why, dp-sfd_arg); } } else { CIRCLEQ_FOREACH(dp, powerhook_list, sfd_list) { -#ifdef POWERHOOK_DEBUG - printf(dopowerhooks %s: %s (%p)\n, why_name, dp-sfd_name, dp); -#endif + if (powerhook_debug) +printf(dopowerhooks %s: %s (%p)\n, +why_name, dp-sfd_name, dp); (*dp-sfd_fn)(why, dp-sfd_arg); } } -#ifdef POWERHOOK_DEBUG - printf(dopowerhooks: %s done\n, why_name); -#endif + if (powerhook_debug) + printf(dopowerhooks: %s done\n, why_name); } static int
CVS commit: [matt-nb5-mips64] src/sys/arch/mips
Module Name:src Committed By: matt Date: Sat Jan 30 23:49:31 UTC 2010 Modified Files: src/sys/arch/mips/conf [matt-nb5-mips64]: Makefile.mips src/sys/arch/mips/include [matt-nb5-mips64]: cpu.h types.h src/sys/arch/mips/mips [matt-nb5-mips64]: genassym.cf locore.S locore_mips1.S mipsX_subr.S vm_machdep.c Log Message: Change MIPS_CURLWP from s7 to t8. In a MALTA64 kernel, s6 is used 9155 times which means the compiler could really use s7 is was free to do so. The least used temporary was t8 (288 times). Once the kernel was switched to use t8 for MIPS_CURLWP, s7 was used 7524 times. Additionally a MALTA32 kernel shrunk by 6205 instructions (24820 bytes) or about 1% of its text size. [For some reason, pre-change t1 was never used and post change t2 was never used. Not sure why.] To generate a diff of this commit: cvs rdiff -u -r1.50.24.4 -r1.50.24.5 src/sys/arch/mips/conf/Makefile.mips cvs rdiff -u -r1.90.16.15 -r1.90.16.16 src/sys/arch/mips/include/cpu.h cvs rdiff -u -r1.43.36.11 -r1.43.36.12 src/sys/arch/mips/include/types.h cvs rdiff -u -r1.44.12.11 -r1.44.12.12 src/sys/arch/mips/mips/genassym.cf cvs rdiff -u -r1.167.38.6 -r1.167.38.7 src/sys/arch/mips/mips/locore.S cvs rdiff -u -r1.64.26.1.2.5 -r1.64.26.1.2.6 \ src/sys/arch/mips/mips/locore_mips1.S cvs rdiff -u -r1.26.36.1.2.20 -r1.26.36.1.2.21 \ src/sys/arch/mips/mips/mipsX_subr.S cvs rdiff -u -r1.121.6.1.2.7 -r1.121.6.1.2.8 \ src/sys/arch/mips/mips/vm_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/mips/conf/Makefile.mips diff -u src/sys/arch/mips/conf/Makefile.mips:1.50.24.4 src/sys/arch/mips/conf/Makefile.mips:1.50.24.5 --- src/sys/arch/mips/conf/Makefile.mips:1.50.24.4 Tue Jan 26 21:19:25 2010 +++ src/sys/arch/mips/conf/Makefile.mips Sat Jan 30 23:49:31 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.mips,v 1.50.24.4 2010/01/26 21:19:25 matt Exp $ +# $NetBSD: Makefile.mips,v 1.50.24.5 2010/01/30 23:49:31 matt Exp $ # Makefile for NetBSD # @@ -46,7 +46,7 @@ CPPFLAGS+= -D${MACHINE} DEFGP?= -G 0 GP?= ${DEFGP} -CFLAGS+= ${GP} -mno-abicalls -msoft-float -ffixed-23 +CFLAGS+= ${GP} -mno-abicalls -msoft-float -ffixed-24 .if defined(LP64) ${LP64} == yes .if ${MACHINE_ARCH} == mips64eb || ${MACHINE_ARCH} == mips64el CFLAGS+= -msym32 -mabi=64 Index: src/sys/arch/mips/include/cpu.h diff -u src/sys/arch/mips/include/cpu.h:1.90.16.15 src/sys/arch/mips/include/cpu.h:1.90.16.16 --- src/sys/arch/mips/include/cpu.h:1.90.16.15 Tue Jan 26 21:19:25 2010 +++ src/sys/arch/mips/include/cpu.h Sat Jan 30 23:49:31 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.90.16.15 2010/01/26 21:19:25 matt Exp $ */ +/* $NetBSD: cpu.h,v 1.90.16.16 2010/01/30 23:49:31 matt Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -210,10 +210,10 @@ #define CPU_ARCH_MIPS64 (1 6) /* Note: must be kept in sync with -ffixed-?? Makefile.mips. */ -#define MIPS_CURLWP $23 -#define MIPS_CURLWP_QUOTED $23 -#define MIPS_CURLWP_CARD 23 -#define MIPS_CURLWP_FRAME(x) FRAME_S7(x) +#define MIPS_CURLWP $24 +#define MIPS_CURLWP_QUOTED $24 +#define MIPS_CURLWP_LABEL _L_T8 +#define MIPS_CURLWP_FRAME(x) FRAME_T8(x) #ifndef _LOCORE Index: src/sys/arch/mips/include/types.h diff -u src/sys/arch/mips/include/types.h:1.43.36.11 src/sys/arch/mips/include/types.h:1.43.36.12 --- src/sys/arch/mips/include/types.h:1.43.36.11 Wed Jan 20 06:58:35 2010 +++ src/sys/arch/mips/include/types.h Sat Jan 30 23:49:31 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.43.36.11 2010/01/20 06:58:35 matt Exp $ */ +/* $NetBSD: types.h,v 1.43.36.12 2010/01/30 23:49:31 matt Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -116,11 +116,12 @@ #define _L_S5 5 #define _L_S6 6 #define _L_S7 7 -#define _L_GP 8 -#define _L_SP 9 -#define _L_S8 10 -#define _L_RA 11 -#define _L_SR 12 +#define _L_T8 8 +#define _L_GP 9 +#define _L_SP 10 +#define _L_S8 11 +#define _L_RA 12 +#define _L_SR 13 #endif typedef volatile int __cpu_simple_lock_t; Index: src/sys/arch/mips/mips/genassym.cf diff -u src/sys/arch/mips/mips/genassym.cf:1.44.12.11 src/sys/arch/mips/mips/genassym.cf:1.44.12.12 --- src/sys/arch/mips/mips/genassym.cf:1.44.12.11 Wed Jan 20 09:04:35 2010 +++ src/sys/arch/mips/mips/genassym.cf Sat Jan 30 23:49:31 2010 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.44.12.11 2010/01/20 09:04:35 matt Exp $ +# $NetBSD: genassym.cf,v 1.44.12.12 2010/01/30 23:49:31 matt Exp $ # # Copyright (c) 1992, 1993 # The Regents of the University of California. All rights reserved. @@ -306,6 +306,7 @@ define SF_REG_S5 offsetof(label_t, val[_L_S5]) define SF_REG_S6 offsetof(label_t, val[_L_S6]) define SF_REG_S7 offsetof(label_t, val[_L_S7]) +define SF_REG_T8 offsetof(label_t, val[_L_T8]) define SF_REG_GP offsetof(label_t, val[_L_GP]) define SF_REG_SP offsetof(label_t, val[_L_SP]) define SF_REG_S8 offsetof(label_t, val[_L_S8])
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Sun Jan 31 00:38:36 UTC 2010 Modified Files: src/sys/rump: Makefile.rump Log Message: Make (no pun intended) it possible to perform component symbol protection from a shell prompt with the command line: make -f /sys/rump/Makefile RUMP_SYMREN=module.kobj This is benefitial especially on i386, where rump ABI matches the kernel ABI (sans the renaming isolation). In the above example module.kobj can then be loaded in a rump kernel either statically at link-time simply by giving module.kobj as an object to the linker, or dynamically at runtime by calling rump_sys_modctl(MODCTL_LOAD). To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/rump/Makefile.rump Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/Makefile.rump diff -u src/sys/rump/Makefile.rump:1.45 src/sys/rump/Makefile.rump:1.46 --- src/sys/rump/Makefile.rump:1.45 Sat Dec 12 17:10:19 2009 +++ src/sys/rump/Makefile.rump Sun Jan 31 00:38:36 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rump,v 1.45 2009/12/12 17:10:19 pooka Exp $ +# $NetBSD: Makefile.rump,v 1.46 2010/01/31 00:38:36 pooka Exp $ # WARNS?= 3 # XXX: src/sys won't compile with -Wsign-compare yet @@ -60,23 +60,46 @@ # toolchain to toolchain. The good news, however, is that this will # be detected by a compile-time failure, so we can fairly easily manage # a quirktable here. +# +# We also allow calling ourselves externally with e.g.: +# make -f /sys/rump/Makefile.rump RUMP_SYMREN=ffs.kobj +# .if ${MACHINE_CPU} == mips _SYMQUIRK='|_gp_disp' .elif ${MACHINE_CPU} == hppa _SYMQUIRK='|\$$\$$' .endif + +rump_symren: __archivebuild +.if !defined(RUMP_SYMREN) + @echo Must supply RUMP_SYMREN for target rump_symren + @false +.endif + +# if we are called from lib build (RUMP_SYMREN is not specified), +# build the achive. otherwise just rename symbols. __archivebuild: .USE +.if defined(RUMP_SYMREN) defined(RUMPTOP) + @echo ERROR: RUMP_SYMREN can only be used standalone + @false +.endif +.if defined(RUMP_SYMREN) + ${_MKMSG} symbol rename ${RUMP_SYMREN} +.else ${_MKTARGET_BUILD} rm -f ${.TARGET} ${AR} ${_ARFL} ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}` - ${NM} -go ${.TARGET} | ${TOOL_AWK} ' \ +.endif + ${NM} -go ${RUMP_SYMREN:U${.TARGET}} | ${TOOL_AWK} ' \ $$NF!~/^(rump|RUMP|__|_GLOBAL_OFFSET_TABLE'${_SYMQUIRK}')/ \ {printf %s rumpns_%s\n, $$NF, $$NF}' \ | sort | uniq renametab.${.TARGET} ${OBJCOPY} --preserve-dates --redefine-syms \ - renametab.${.TARGET} ${.TARGET} + renametab.${.TARGET} ${RUMP_SYMREN:U${.TARGET}} rm -f renametab.${.TARGET} +.if !defined(RUMP_SYMREN) ${AR} ${_ARRANFL} ${.TARGET} - +.endif + .-include ${NETBSDSRCDIR}/sys/arch/${MACHINE_CPU}/include/Makefile.inc .-include ${NETBSDSRCDIR}/sys/arch/${MACHINE}/include/Makefile.inc
CVS commit: src/sys
Module Name:src Committed By: hubertf Date: Sun Jan 31 00:43:38 UTC 2010 Modified Files: src/sys/arch/x86/x86: pmap.c x86_autoconf.c src/sys/dev/pci: agp_via.c src/sys/kern: cnmagic.c init_main.c kern_ksyms.c src/sys/netipsec: ipsec.c key.c src/sys/netkey: key.c Log Message: Replace more printfs with aprint_normal / aprint_verbose Makes boot -z go mostly silent for me. To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 src/sys/arch/x86/x86/pmap.c cvs rdiff -u -r1.48 -r1.49 src/sys/arch/x86/x86/x86_autoconf.c cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/agp_via.c cvs rdiff -u -r1.10 -r1.11 src/sys/kern/cnmagic.c cvs rdiff -u -r1.414 -r1.415 src/sys/kern/init_main.c cvs rdiff -u -r1.52 -r1.53 src/sys/kern/kern_ksyms.c cvs rdiff -u -r1.46 -r1.47 src/sys/netipsec/ipsec.c cvs rdiff -u -r1.62 -r1.63 src/sys/netipsec/key.c cvs rdiff -u -r1.175 -r1.176 src/sys/netkey/key.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/x86/pmap.c diff -u src/sys/arch/x86/x86/pmap.c:1.99 src/sys/arch/x86/x86/pmap.c:1.100 --- src/sys/arch/x86/x86/pmap.c:1.99 Sun Jan 10 12:10:23 2010 +++ src/sys/arch/x86/x86/pmap.c Sun Jan 31 00:43:37 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.99 2010/01/10 12:10:23 jym Exp $ */ +/* $NetBSD: pmap.c,v 1.100 2010/01/31 00:43:37 hubertf Exp $ */ /* * Copyright (c) 2007 Manuel Bouyer. @@ -149,7 +149,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.99 2010/01/10 12:10:23 jym Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.100 2010/01/31 00:43:37 hubertf Exp $); #include opt_user_ldt.h #include opt_lockdebug.h @@ -1380,7 +1380,7 @@ tlbflush(); } #if defined(DEBUG) - printf(kernel text is mapped with + aprint_normal(kernel text is mapped with %lu large pages and %lu normal pages\n, (unsigned long)howmany(kva - KERNBASE, NBPD_L2), (unsigned long)howmany((vaddr_t)__data_start - kva, Index: src/sys/arch/x86/x86/x86_autoconf.c diff -u src/sys/arch/x86/x86/x86_autoconf.c:1.48 src/sys/arch/x86/x86/x86_autoconf.c:1.49 --- src/sys/arch/x86/x86/x86_autoconf.c:1.48 Fri Jan 8 19:43:26 2010 +++ src/sys/arch/x86/x86/x86_autoconf.c Sun Jan 31 00:43:37 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: x86_autoconf.c,v 1.48 2010/01/08 19:43:26 dyoung Exp $ */ +/* $NetBSD: x86_autoconf.c,v 1.49 2010/01/31 00:43:37 hubertf Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: x86_autoconf.c,v 1.48 2010/01/08 19:43:26 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: x86_autoconf.c,v 1.49 2010/01/31 00:43:37 hubertf Exp $); #include sys/param.h #include sys/systm.h @@ -554,11 +554,11 @@ if (booted_wedge) { KASSERT(booted_device != NULL); - printf(boot device: %s (%s)\n, + aprint_normal(boot device: %s (%s)\n, device_xname(booted_wedge), device_xname(booted_device)); setroot(booted_wedge, 0); } else { - printf(boot device: %s\n, + aprint_normal(boot device: %s\n, booted_device ? device_xname(booted_device) : unknown); setroot(booted_device, booted_partition); } Index: src/sys/dev/pci/agp_via.c diff -u src/sys/dev/pci/agp_via.c:1.17 src/sys/dev/pci/agp_via.c:1.18 --- src/sys/dev/pci/agp_via.c:1.17 Mon Jun 9 06:49:54 2008 +++ src/sys/dev/pci/agp_via.c Sun Jan 31 00:43:37 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: agp_via.c,v 1.17 2008/06/09 06:49:54 freza Exp $ */ +/* $NetBSD: agp_via.c,v 1.18 2010/01/31 00:43:37 hubertf Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: agp_via.c,v 1.17 2008/06/09 06:49:54 freza Exp $); +__KERNEL_RCSID(0, $NetBSD: agp_via.c,v 1.18 2010/01/31 00:43:37 hubertf Exp $); #include sys/param.h #include sys/systm.h @@ -107,14 +107,14 @@ agpsel = pci_conf_read(pa-pa_pc, pa-pa_tag, AGP_VIA_AGPSEL); if ((agpsel (1 9)) == 0) { asc-regs = via_v3_regs; - printf( (v3)); + aprint_normal( (v3)); } else { asc-regs = via_v2_regs; - printf( (v2 compat mode)); + aprint_normal( (v2 compat mode)); } } else { asc-regs = via_v2_regs; - printf( (v2)); + aprint_normal( (v2)); } if (agp_map_aperture(pa, sc, AGP_APBASE) != 0) { Index: src/sys/kern/cnmagic.c diff -u src/sys/kern/cnmagic.c:1.10 src/sys/kern/cnmagic.c:1.11 --- src/sys/kern/cnmagic.c:1.10 Mon Oct 19 18:12:37 2009 +++ src/sys/kern/cnmagic.c Sun Jan 31 00:43:37 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cnmagic.c,v 1.10 2009/10/19 18:12:37 snj Exp $ */ +/* $NetBSD: cnmagic.c,v 1.11 2010/01/31 00:43:37 hubertf Exp $ */ /* * Copyright (c) 2000 Eduardo Horvath @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cnmagic.c,v 1.10 2009/10/19 18:12:37 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: cnmagic.c,v 1.11 2010/01/31 00:43:37 hubertf Exp $); #include sys/param.h #include
CVS commit: src/sys/kern
Module Name:src Committed By: pooka Date: Sun Jan 31 00:48:08 UTC 2010 Modified Files: src/sys/kern: kern_subr.c Log Message: Use proper static initializers for *hooklist (currently they happened to work accidentally anyway since the initializer is 0). To generate a diff of this commit: cvs rdiff -u -r1.204 -r1.205 src/sys/kern/kern_subr.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_subr.c diff -u src/sys/kern/kern_subr.c:1.204 src/sys/kern/kern_subr.c:1.205 --- src/sys/kern/kern_subr.c:1.204 Sat Jan 30 23:19:55 2010 +++ src/sys/kern/kern_subr.c Sun Jan 31 00:48:07 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_subr.c,v 1.204 2010/01/30 23:19:55 pooka Exp $ */ +/* $NetBSD: kern_subr.c,v 1.205 2010/01/31 00:48:07 pooka Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2002, 2007, 2008 The NetBSD Foundation, Inc. @@ -79,7 +79,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_subr.c,v 1.204 2010/01/30 23:19:55 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_subr.c,v 1.205 2010/01/31 00:48:07 pooka Exp $); #include opt_ddb.h #include opt_md.h @@ -202,7 +202,7 @@ * it won't be run again. */ -static hook_list_t shutdownhook_list; +static hook_list_t shutdownhook_list = LIST_HEAD_INITIALIZER(shutdownhook_list); void * shutdownhook_establish(void (*fn)(void *), void *arg) @@ -249,7 +249,7 @@ * Mountroot hook types, functions, and variables. */ -static hook_list_t mountroothook_list; +static hook_list_t mountroothook_list=LIST_HEAD_INITIALIZER(mountroothook_list); void * mountroothook_establish(void (*fn)(device_t), device_t dev) @@ -282,7 +282,7 @@ } } -static hook_list_t exechook_list; +static hook_list_t exechook_list = LIST_HEAD_INITIALIZER(exechook_list); void * exechook_establish(void (*fn)(struct proc *, void *), void *arg) @@ -305,7 +305,7 @@ hook_proc_run(exechook_list, p); } -static hook_list_t exithook_list; +static hook_list_t exithook_list = LIST_HEAD_INITIALIZER(exithook_list); extern krwlock_t exec_lock; void * @@ -337,7 +337,7 @@ hook_proc_run(exithook_list, p); } -static hook_list_t forkhook_list; +static hook_list_t forkhook_list = LIST_HEAD_INITIALIZER(forkhook_list); void * forkhook_establish(void (*fn)(struct proc *, struct proc *))
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: snj Date: Sun Jan 31 00:54:22 UTC 2010 Modified Files: src/sys/rump/librump/rumpkern: locks.c Log Message: Some might argue that it is benefi_c_ial to spell words correctly. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/rump/librump/rumpkern/locks.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/rump/librump/rumpkern/locks.c diff -u src/sys/rump/librump/rumpkern/locks.c:1.37 src/sys/rump/librump/rumpkern/locks.c:1.38 --- src/sys/rump/librump/rumpkern/locks.c:1.37 Thu Dec 3 13:12:16 2009 +++ src/sys/rump/librump/rumpkern/locks.c Sun Jan 31 00:54:22 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: locks.c,v 1.37 2009/12/03 13:12:16 pooka Exp $ */ +/* $NetBSD: locks.c,v 1.38 2010/01/31 00:54:22 snj Exp $ */ /* * Copyright (c) 2007, 2008 Antti Kantee. All Rights Reserved. @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: locks.c,v 1.37 2009/12/03 13:12:16 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: locks.c,v 1.38 2010/01/31 00:54:22 snj Exp $); #include sys/param.h #include sys/kmem.h @@ -45,7 +45,7 @@ * and rumpuser routines is that while the kernel uses static * storage, rumpuser allocates the object from the heap. This * indirection is necessary because we don't know the size of - * pthread objects here. It is also benefitial, since we can + * pthread objects here. It is also beneficial, since we can * be easily compatible with the kernel ABI because all kernel * objects regardless of machine architecture are always at least * the size of a pointer. The downside, of course, is a performance
CVS commit: src/sys
Module Name:src Committed By: pooka Date: Sun Jan 31 01:38:48 UTC 2010 Modified Files: src/sys/conf: files src/sys/kern: kern_subr.c Added Files: src/sys/kern: kern_hook.c Log Message: Place *hook implementations in kern_hook.c instead of them floating around in the kern_subr.c gruel. Ar. To generate a diff of this commit: cvs rdiff -u -r1.972 -r1.973 src/sys/conf/files cvs rdiff -u -r0 -r1.1 src/sys/kern/kern_hook.c cvs rdiff -u -r1.205 -r1.206 src/sys/kern/kern_subr.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/conf/files diff -u src/sys/conf/files:1.972 src/sys/conf/files:1.973 --- src/sys/conf/files:1.972 Sat Jan 30 23:19:55 2010 +++ src/sys/conf/files Sun Jan 31 01:38:48 2010 @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.972 2010/01/30 23:19:55 pooka Exp $ +# $NetBSD: files,v 1.973 2010/01/31 01:38:48 pooka Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 version 20090313 @@ -1428,6 +1428,7 @@ file kern/kern_exit.c file kern/kern_fork.c file kern/kern_idle.c +file kern/kern_hook.c file kern/kern_kthread.c file kern/kern_ktrace.c ktrace file kern/kern_ksyms.c ksyms | ddb | modular needs-flag Index: src/sys/kern/kern_subr.c diff -u src/sys/kern/kern_subr.c:1.205 src/sys/kern/kern_subr.c:1.206 --- src/sys/kern/kern_subr.c:1.205 Sun Jan 31 00:48:07 2010 +++ src/sys/kern/kern_subr.c Sun Jan 31 01:38:48 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_subr.c,v 1.205 2010/01/31 00:48:07 pooka Exp $ */ +/* $NetBSD: kern_subr.c,v 1.206 2010/01/31 01:38:48 pooka Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2002, 2007, 2008 The NetBSD Foundation, Inc. @@ -79,7 +79,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_subr.c,v 1.205 2010/01/31 00:48:07 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_subr.c,v 1.206 2010/01/31 01:38:48 pooka Exp $); #include opt_ddb.h #include opt_md.h @@ -91,7 +91,6 @@ #include sys/param.h #include sys/systm.h #include sys/proc.h -#include sys/malloc.h #include sys/mount.h #include sys/device.h #include sys/reboot.h @@ -120,335 +119,11 @@ static device_t parsedisk(char *, int, int, dev_t *); static const char *getwedgename(const char *, int); -/* - * A generic linear hook. - */ -struct hook_desc { - LIST_ENTRY(hook_desc) hk_list; - void (*hk_fn)(void *); - void *hk_arg; -}; -typedef LIST_HEAD(, hook_desc) hook_list_t; - #ifdef TFTPROOT int tftproot_dhcpboot(device_t); #endif dev_t dumpcdev; /* for savecore */ -int powerhook_debug = 0; - -static void * -hook_establish(hook_list_t *list, void (*fn)(void *), void *arg) -{ - struct hook_desc *hd; - - hd = malloc(sizeof(*hd), M_DEVBUF, M_NOWAIT); - if (hd == NULL) - return (NULL); - - hd-hk_fn = fn; - hd-hk_arg = arg; - LIST_INSERT_HEAD(list, hd, hk_list); - - return (hd); -} - -static void -hook_disestablish(hook_list_t *list, void *vhook) -{ -#ifdef DIAGNOSTIC - struct hook_desc *hd; - - LIST_FOREACH(hd, list, hk_list) { -if (hd == vhook) - break; - } - - if (hd == NULL) - panic(hook_disestablish: hook %p not established, vhook); -#endif - LIST_REMOVE((struct hook_desc *)vhook, hk_list); - free(vhook, M_DEVBUF); -} - -static void -hook_destroy(hook_list_t *list) -{ - struct hook_desc *hd; - - while ((hd = LIST_FIRST(list)) != NULL) { - LIST_REMOVE(hd, hk_list); - free(hd, M_DEVBUF); - } -} - -static void -hook_proc_run(hook_list_t *list, struct proc *p) -{ - struct hook_desc *hd; - - LIST_FOREACH(hd, list, hk_list) - ((void (*)(struct proc *, void *))*hd-hk_fn)(p, hd-hk_arg); -} - -/* - * Shutdown hook types, functions, and variables. - * - * Should be invoked immediately before the - * system is halted or rebooted, i.e. after file systems unmounted, - * after crash dump done, etc. - * - * Each shutdown hook is removed from the list before it's run, so that - * it won't be run again. - */ - -static hook_list_t shutdownhook_list = LIST_HEAD_INITIALIZER(shutdownhook_list); - -void * -shutdownhook_establish(void (*fn)(void *), void *arg) -{ - return hook_establish(shutdownhook_list, fn, arg); -} - -void -shutdownhook_disestablish(void *vhook) -{ - hook_disestablish(shutdownhook_list, vhook); -} - -/* - * Run shutdown hooks. Should be invoked immediately before the - * system is halted or rebooted, i.e. after file systems unmounted, - * after crash dump done, etc. - * - * Each shutdown hook is removed from the list before it's run, so that - * it won't be run again. - */ -void -doshutdownhooks(void) -{ - struct hook_desc *dp; - - while ((dp = LIST_FIRST(shutdownhook_list)) != NULL) { - LIST_REMOVE(dp, hk_list); - (*dp-hk_fn)(dp-hk_arg); -#if 0 - /* - * Don't bother freeing the hook structure,, since we may - * be rebooting because of a memory corruption problem, - * and this might only make things worse. It doesn't - * matter, anyway, since the system is just about to - * reboot. - */ - free(dp, M_DEVBUF); -#endif
CVS commit: src/sys/uvm
Module Name:src Committed By: uebayasi Date: Sun Jan 31 01:40:13 UTC 2010 Modified Files: src/sys/uvm: uvm_fault.c Log Message: Correct previous; fix a miscalculation of offset-into-entry in MADV_SEQUENTIAL case. Pointed out by po...@. To generate a diff of this commit: cvs rdiff -u -r1.131 -r1.132 src/sys/uvm/uvm_fault.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/uvm/uvm_fault.c diff -u src/sys/uvm/uvm_fault.c:1.131 src/sys/uvm/uvm_fault.c:1.132 --- src/sys/uvm/uvm_fault.c:1.131 Sat Jan 30 15:13:25 2010 +++ src/sys/uvm/uvm_fault.c Sun Jan 31 01:40:12 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_fault.c,v 1.131 2010/01/30 15:13:25 uebayasi Exp $ */ +/* $NetBSD: uvm_fault.c,v 1.132 2010/01/31 01:40:12 uebayasi Exp $ */ /* * @@ -39,7 +39,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.131 2010/01/30 15:13:25 uebayasi Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.132 2010/01/31 01:40:12 uebayasi Exp $); #include opt_uvmhist.h @@ -873,7 +873,7 @@ } /* offset from entry's start to pgs' start */ - const voff_t eoff = startva - ufi.entry-start; + voff_t eoff = startva - ufi.entry-start; /* locked: maps(read) */ UVMHIST_LOG(maphist, narrow=%d, back=%d, forw=%d, startva=0x%x, @@ -923,6 +923,7 @@ startva += (nback PAGE_SHIFT); npages -= nback; nback = centeridx = 0; + eoff = startva - ufi.entry-start; } /* locked: maps(read), amap(if there) */
CVS commit: src/sys
Module Name:src Committed By: pooka Date: Sun Jan 31 02:04:43 UTC 2010 Modified Files: src/sys/kern: init_main.c kern_hook.c src/sys/sys: systm.h Log Message: Pass root device as a parameter to domountroothook(). To generate a diff of this commit: cvs rdiff -u -r1.415 -r1.416 src/sys/kern/init_main.c cvs rdiff -u -r1.1 -r1.2 src/sys/kern/kern_hook.c cvs rdiff -u -r1.238 -r1.239 src/sys/sys/systm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/init_main.c diff -u src/sys/kern/init_main.c:1.415 src/sys/kern/init_main.c:1.416 --- src/sys/kern/init_main.c:1.415 Sun Jan 31 00:43:37 2010 +++ src/sys/kern/init_main.c Sun Jan 31 02:04:43 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: init_main.c,v 1.415 2010/01/31 00:43:37 hubertf Exp $ */ +/* $NetBSD: init_main.c,v 1.416 2010/01/31 02:04:43 pooka Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -97,7 +97,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: init_main.c,v 1.415 2010/01/31 00:43:37 hubertf Exp $); +__KERNEL_RCSID(0, $NetBSD: init_main.c,v 1.416 2010/01/31 02:04:43 pooka Exp $); #include opt_ddb.h #include opt_ipsec.h @@ -349,7 +349,7 @@ bpf_setops(); /* Start module system. */ - module_init(); + module_init(true); /* * Initialize the kernel authorization subsystem and start the @@ -619,7 +619,7 @@ /* Mount the root file system. */ do { - domountroothook(); + domountroothook(root_device); if ((error = vfs_mountroot())) { printf(cannot mount root, error = %d\n, error); boothowto |= RB_ASKNAME; Index: src/sys/kern/kern_hook.c diff -u src/sys/kern/kern_hook.c:1.1 src/sys/kern/kern_hook.c:1.2 --- src/sys/kern/kern_hook.c:1.1 Sun Jan 31 01:38:48 2010 +++ src/sys/kern/kern_hook.c Sun Jan 31 02:04:43 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_hook.c,v 1.1 2010/01/31 01:38:48 pooka Exp $ */ +/* $NetBSD: kern_hook.c,v 1.2 2010/01/31 02:04:43 pooka Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2002, 2007, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_hook.c,v 1.1 2010/01/31 01:38:48 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_hook.c,v 1.2 2010/01/31 02:04:43 pooka Exp $); #include sys/param.h #include sys/malloc.h @@ -183,12 +183,12 @@ } void -domountroothook(void) +domountroothook(struct device *therootdev) { struct hook_desc *hd; LIST_FOREACH(hd, mountroothook_list, hk_list) { - if (hd-hk_arg == (void *)root_device) { + if (hd-hk_arg == therootdev) { (*hd-hk_fn)(hd-hk_arg); return; } Index: src/sys/sys/systm.h diff -u src/sys/sys/systm.h:1.238 src/sys/sys/systm.h:1.239 --- src/sys/sys/systm.h:1.238 Sun Dec 13 04:47:45 2009 +++ src/sys/sys/systm.h Sun Jan 31 02:04:43 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: systm.h,v 1.238 2009/12/13 04:47:45 matt Exp $ */ +/* $NetBSD: systm.h,v 1.239 2010/01/31 02:04:43 pooka Exp $ */ /*- * Copyright (c) 1982, 1988, 1991, 1993 @@ -360,7 +360,7 @@ void *mountroothook_establish(void (*)(struct device *), struct device *); void mountroothook_disestablish(void *); void mountroothook_destroy(void); -void domountroothook(void); +void domountroothook(struct device *); /* * Exec hooks. Subsystems may want to do cleanup when a process
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Sun Jan 31 02:08:36 UTC 2010 Modified Files: src/sys/rump/librump/rumpkern: Makefile.rumpkern emul.c Log Message: include kern_hook.c To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/rump/librump/rumpkern/Makefile.rumpkern cvs rdiff -u -r1.119 -r1.120 src/sys/rump/librump/rumpkern/emul.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/rump/librump/rumpkern/Makefile.rumpkern diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.71 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.72 --- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.71 Fri Jan 15 19:01:04 2010 +++ src/sys/rump/librump/rumpkern/Makefile.rumpkern Sun Jan 31 02:08:36 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rumpkern,v 1.71 2010/01/15 19:01:04 pooka Exp $ +# $NetBSD: Makefile.rumpkern,v 1.72 2010/01/31 02:08:36 pooka Exp $ # .include ${RUMPTOP}/Makefile.rump @@ -38,7 +38,7 @@ # # sys/kern SRCS+= init_sysctl_base.c kern_auth.c kern_descrip.c kern_event.c \ - kern_ksyms.c kern_malloc_stdtype.c kern_module.c \ + kern_hook.c kern_ksyms.c kern_malloc_stdtype.c kern_module.c \ kern_mutex_obj.c kern_rate.c kern_stub.c kern_sysctl.c \ kern_timeout.c kern_uidinfo.c param.c\ sys_descrip.c sys_generic.c sys_pipe.c sys_select.c syscalls.c Index: src/sys/rump/librump/rumpkern/emul.c diff -u src/sys/rump/librump/rumpkern/emul.c:1.119 src/sys/rump/librump/rumpkern/emul.c:1.120 --- src/sys/rump/librump/rumpkern/emul.c:1.119 Fri Jan 15 19:01:04 2010 +++ src/sys/rump/librump/rumpkern/emul.c Sun Jan 31 02:08:36 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: emul.c,v 1.119 2010/01/15 19:01:04 pooka Exp $ */ +/* $NetBSD: emul.c,v 1.120 2010/01/31 02:08:36 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.119 2010/01/15 19:01:04 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.120 2010/01/31 02:08:36 pooka Exp $); #include sys/param.h #include sys/null.h @@ -109,7 +109,9 @@ struct device *booted_wedge; int booted_partition; +/* XXX: unused */ kmutex_t tty_lock; +krwlock_t exec_lock; /* sparc doesn't sport constant page size */ #ifdef __sparc__
CVS commit: src/sys/dev/sysmon
Module Name:src Committed By: pooka Date: Sun Jan 31 02:54:56 UTC 2010 Modified Files: src/sys/dev/sysmon: swwdog.c Log Message: print newline after timer expiry message To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/dev/sysmon/swwdog.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/sysmon/swwdog.c diff -u src/sys/dev/sysmon/swwdog.c:1.8 src/sys/dev/sysmon/swwdog.c:1.9 --- src/sys/dev/sysmon/swwdog.c:1.8 Sat Jan 30 21:55:30 2010 +++ src/sys/dev/sysmon/swwdog.c Sun Jan 31 02:54:56 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: swwdog.c,v 1.8 2010/01/30 21:55:30 pooka Exp $ */ +/* $NetBSD: swwdog.c,v 1.9 2010/01/31 02:54:56 pooka Exp $ */ /* * Copyright (c) 2004, 2005 Steven M. Bellovin @@ -33,7 +33,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: swwdog.c,v 1.8 2010/01/30 21:55:30 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: swwdog.c,v 1.9 2010/01/31 02:54:56 pooka Exp $); /* * @@ -150,7 +150,7 @@ swwdog_reboot = 1; callout_schedule(sc-sc_c, 60 * hz); /* deliberate double-panic */ - printf(%s: %d second timer expired, sc-sc_name, + printf(%s: %d second timer expired\n, sc-sc_name, sc-sc_smw.smw_period); if (do_panic)
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Sun Jan 31 03:07:00 UTC 2010 Modified Files: src/sys/rump/dev: Makefile.rumpdev src/sys/rump/librump/rumpdev: rump_dev.c rump_dev_private.h Added Files: src/sys/rump/dev/lib/libsysmon: Makefile component.c shlib_version src/sys/rump/dev/lib/libsysmon/opt: sysmon_envsys.h sysmon_power.h sysmon_wdog.h Log Message: Add sysmon rump component. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/rump/dev/Makefile.rumpdev cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libsysmon/Makefile \ src/sys/rump/dev/lib/libsysmon/component.c \ src/sys/rump/dev/lib/libsysmon/shlib_version cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libsysmon/opt/sysmon_envsys.h \ src/sys/rump/dev/lib/libsysmon/opt/sysmon_power.h \ src/sys/rump/dev/lib/libsysmon/opt/sysmon_wdog.h cvs rdiff -u -r1.12 -r1.13 src/sys/rump/librump/rumpdev/rump_dev.c cvs rdiff -u -r1.8 -r1.9 src/sys/rump/librump/rumpdev/rump_dev_private.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/rump/dev/Makefile.rumpdev diff -u src/sys/rump/dev/Makefile.rumpdev:1.7 src/sys/rump/dev/Makefile.rumpdev:1.8 --- src/sys/rump/dev/Makefile.rumpdev:1.7 Tue Jan 19 22:38:21 2010 +++ src/sys/rump/dev/Makefile.rumpdev Sun Jan 31 03:06:59 2010 @@ -1,7 +1,7 @@ -# $NetBSD: Makefile.rumpdev,v 1.7 2010/01/19 22:38:21 pooka Exp $ +# $NetBSD: Makefile.rumpdev,v 1.8 2010/01/31 03:06:59 pooka Exp $ # -RUMPDEVLIST= bpf cgd disk netsmb raidframe rnd dm +RUMPDEVLIST= bpf cgd disk dm netsmb raidframe rnd sysmon .for var in ${RUMPDEVLIST} RUMPDEVLIBS+=lib${var} Index: src/sys/rump/librump/rumpdev/rump_dev.c diff -u src/sys/rump/librump/rumpdev/rump_dev.c:1.12 src/sys/rump/librump/rumpdev/rump_dev.c:1.13 --- src/sys/rump/librump/rumpdev/rump_dev.c:1.12 Tue Jan 19 22:38:21 2010 +++ src/sys/rump/librump/rumpdev/rump_dev.c Sun Jan 31 03:07:00 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_dev.c,v 1.12 2010/01/19 22:38:21 pooka Exp $ */ +/* $NetBSD: rump_dev.c,v 1.13 2010/01/31 03:07:00 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rump_dev.c,v 1.12 2010/01/19 22:38:21 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: rump_dev.c,v 1.13 2010/01/31 03:07:00 pooka Exp $); #include sys/param.h #include sys/device.h @@ -42,6 +42,7 @@ __weak_alias(rump_dev_netsmb_init,nocomponent); __weak_alias(rump_dev_rnd_init,nocomponent); __weak_alias(rump_dev_rumpusbhc_init,nocomponent); +__weak_alias(rump_dev_sysmon_init,nocomponent); __weak_alias(rump_device_configuration,nocomponent); __weak_alias(rump_wscons_configuration,nocomponent); @@ -66,6 +67,7 @@ rump_dev_netsmb_init(); rump_dev_rnd_init(); rump_dev_rumpusbhc_init(); + rump_dev_sysmon_init(); rump_pdev_finalize(); @@ -105,4 +107,3 @@ /* nada */ } #endif - Index: src/sys/rump/librump/rumpdev/rump_dev_private.h diff -u src/sys/rump/librump/rumpdev/rump_dev_private.h:1.8 src/sys/rump/librump/rumpdev/rump_dev_private.h:1.9 --- src/sys/rump/librump/rumpdev/rump_dev_private.h:1.8 Tue Jan 19 22:38:21 2010 +++ src/sys/rump/librump/rumpdev/rump_dev_private.h Sun Jan 31 03:07:00 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_dev_private.h,v 1.8 2010/01/19 22:38:21 pooka Exp $ */ +/* $NetBSD: rump_dev_private.h,v 1.9 2010/01/31 03:07:00 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -40,6 +40,7 @@ void rump_dev_netsmb_init(void); void rump_dev_rnd_init(void); void rump_dev_rumpusbhc_init(void); +void rump_dev_sysmon_init(void); void rump_device_configuration(void); void rump_wscons_configuration(void); Added files: Index: src/sys/rump/dev/lib/libsysmon/Makefile diff -u /dev/null src/sys/rump/dev/lib/libsysmon/Makefile:1.1 --- /dev/null Sun Jan 31 03:07:00 2010 +++ src/sys/rump/dev/lib/libsysmon/Makefile Sun Jan 31 03:06:59 2010 @@ -0,0 +1,18 @@ +# $NetBSD: Makefile,v 1.1 2010/01/31 03:06:59 pooka Exp $ +# + +.PATH: ${.CURDIR}/../../../../dev/sysmon + +LIB= rumpdev_sysmon + +SRCS= sysmon_taskq.c sysmon_power.c sysmon_envsys.c sysmon_envsys_events.c \ + sysmon_envsys_tables.c sysmon_envsys_util.c sysmon_wdog.c sysmon.c \ + swwdog.c + +SRCS+= component.c + +CFLAGS+= -Wno-pointer-sign +CPPFLAGS+= -I${RUMPTOP}/librump/rumpvfs -I${.CURDIR}/opt + +.include bsd.lib.mk +.include bsd.klinks.mk Index: src/sys/rump/dev/lib/libsysmon/component.c diff -u /dev/null src/sys/rump/dev/lib/libsysmon/component.c:1.1 --- /dev/null Sun Jan 31 03:07:00 2010 +++ src/sys/rump/dev/lib/libsysmon/component.c Sun Jan 31 03:06:59 2010 @@ -0,0 +1,73 @@ +/* $NetBSD: component.c,v 1.1 2010/01/31 03:06:59 pooka Exp $ */ + +/* + * Copyright (c) 2010 Antti Kantee. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: pooka Date: Sun Jan 31 03:09:27 UTC 2010 Modified Files: src/distrib/sets/lists/base: shl.elf shl.mi src/distrib/sets/lists/comp: mi shl.mi Log Message: Add rump sysmon component to devlists. To generate a diff of this commit: cvs rdiff -u -r1.197 -r1.198 src/distrib/sets/lists/base/shl.elf cvs rdiff -u -r1.516 -r1.517 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.1379 -r1.1380 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.99 -r1.100 src/distrib/sets/lists/comp/shl.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/shl.elf diff -u src/distrib/sets/lists/base/shl.elf:1.197 src/distrib/sets/lists/base/shl.elf:1.198 --- src/distrib/sets/lists/base/shl.elf:1.197 Tue Jan 19 22:46:33 2010 +++ src/distrib/sets/lists/base/shl.elf Sun Jan 31 03:09:26 2010 @@ -1,4 +1,4 @@ -# $NetBSD: shl.elf,v 1.197 2010/01/19 22:46:33 pooka Exp $ +# $NetBSD: shl.elf,v 1.198 2010/01/31 03:09:26 pooka Exp $ # # Note: Do not mark old major and major.minor shared libraries as # obsolete; just remove the entry, as third-party applications @@ -250,6 +250,8 @@ ./usr/lib/librumpdev_raidframe.so.0 base-rump-shlib ./usr/lib/librumpdev_rnd.so base-rump-shlib ./usr/lib/librumpdev_rnd.so.0 base-rump-shlib +./usr/lib/librumpdev_sysmon.so base-rump-shlib +./usr/lib/librumpdev_sysmon.so.0 base-rump-shlib ./usr/lib/librumpfs_cd9660.so base-rump-shlib ./usr/lib/librumpfs_cd9660.so.0 base-rump-shlib ./usr/lib/librumpfs_efs.so base-rump-shlib Index: src/distrib/sets/lists/base/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.516 src/distrib/sets/lists/base/shl.mi:1.517 --- src/distrib/sets/lists/base/shl.mi:1.516 Tue Jan 19 22:46:33 2010 +++ src/distrib/sets/lists/base/shl.mi Sun Jan 31 03:09:26 2010 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.516 2010/01/19 22:46:33 pooka Exp $ +# $NetBSD: shl.mi,v 1.517 2010/01/31 03:09:26 pooka Exp $ # # Note: Don't delete entries from here - mark them as obsolete instead, # unless otherwise stated below. @@ -132,6 +132,7 @@ ./usr/lib/librumpdev_netsmb.so.0.0 base-rump-shlib ./usr/lib/librumpdev_raidframe.so.0.0 base-rump-shlib ./usr/lib/librumpdev_rnd.so.0.0 base-rump-shlib +./usr/lib/librumpdev_sysmon.so.0.0 base-rump-shlib ./usr/lib/librumpfs_cd9660.so.0.0 base-rump-shlib ./usr/lib/librumpfs_efs.so.0.0 base-rump-shlib ./usr/lib/librumpfs_ext2fs.so.0.0 base-rump-shlib Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1379 src/distrib/sets/lists/comp/mi:1.1380 --- src/distrib/sets/lists/comp/mi:1.1379 Wed Jan 27 19:10:30 2010 +++ src/distrib/sets/lists/comp/mi Sun Jan 31 03:09:26 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1379 2010/01/27 19:10:30 drochner Exp $ +# $NetBSD: mi,v 1.1380 2010/01/31 03:09:26 pooka Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -2581,6 +2581,9 @@ ./usr/lib/librumpdev_rnd.a comp-c-lib ./usr/lib/librumpdev_rnd_g.a -unknown- debuglib ./usr/lib/librumpdev_rnd_p.a comp-c-proflib profile +./usr/lib/librumpdev_sysmon.a comp-c-lib +./usr/lib/librumpdev_sysmon_g.a -unknown- debuglib +./usr/lib/librumpdev_sysmon_p.a comp-c-proflib profile ./usr/lib/librumpfs_cd9660.a comp-c-lib ./usr/lib/librumpfs_cd9660_g.a -unknown- debuglib ./usr/lib/librumpfs_cd9660_p.a comp-c-proflib profile Index: src/distrib/sets/lists/comp/shl.mi diff -u src/distrib/sets/lists/comp/shl.mi:1.99 src/distrib/sets/lists/comp/shl.mi:1.100 --- src/distrib/sets/lists/comp/shl.mi:1.99 Tue Jan 19 22:46:34 2010 +++ src/distrib/sets/lists/comp/shl.mi Sun Jan 31 03:09:27 2010 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.99 2010/01/19 22:46:34 pooka Exp $ +# $NetBSD: shl.mi,v 1.100 2010/01/31 03:09:27 pooka Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -95,6 +95,7 @@ ./usr/lib/librumpdev_netsmb_pic.a comp-c-piclib ./usr/lib/librumpdev_raidframe_pic.a comp-c-piclib ./usr/lib/librumpdev_rnd_pic.a comp-c-piclib +./usr/lib/librumpdev_sysmon_pic.a comp-c-piclib ./usr/lib/librumpfs_cd9660_pic.a comp-c-piclib ./usr/lib/librumpfs_efs_pic.a comp-c-piclib ./usr/lib/librumpfs_ext2fs_pic.a comp-c-piclib
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Sun Jan 31 06:10:53 UTC 2010 Modified Files: src/sys/dev/acpi: acpi_bat.c acpi_button.c Log Message: Add detachment routines. To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/dev/acpi/acpi_bat.c cvs rdiff -u -r1.29 -r1.30 src/sys/dev/acpi/acpi_button.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.79 src/sys/dev/acpi/acpi_bat.c:1.80 --- src/sys/dev/acpi/acpi_bat.c:1.79 Wed Jan 27 22:17:28 2010 +++ src/sys/dev/acpi/acpi_bat.c Sun Jan 31 06:10:53 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_bat.c,v 1.79 2010/01/27 22:17:28 drochner Exp $ */ +/* $NetBSD: acpi_bat.c,v 1.80 2010/01/31 06:10:53 jruoho Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -75,7 +75,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_bat.c,v 1.79 2010/01/27 22:17:28 drochner Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_bat.c,v 1.80 2010/01/31 06:10:53 jruoho Exp $); #include sys/param.h #include sys/systm.h @@ -188,6 +188,7 @@ static int acpibat_match(device_t, cfdata_t, void *); static void acpibat_attach(device_t, device_t, void *); +static int acpibat_detach(device_t, int); static int acpibat_get_sta(device_t); static ACPI_OBJECT *acpibat_get_object(ACPI_HANDLE, const char *, int); static void acpibat_get_info(device_t); @@ -200,7 +201,7 @@ static bool acpibat_resume(device_t, pmf_qual_t); CFATTACH_DECL_NEW(acpibat, sizeof(struct acpibat_softc), -acpibat_match, acpibat_attach, NULL, NULL); +acpibat_match, acpibat_attach, acpibat_detach, NULL); /* * acpibat_match: @@ -235,6 +236,7 @@ sc-sc_node = aa-aa_node; sc-sc_present = 0; + sc-sc_sme = NULL; mutex_init(sc-sc_mutex, MUTEX_DEFAULT, IPL_NONE); cv_init(sc-sc_condvar, device_xname(self)); @@ -252,6 +254,34 @@ } /* + * acpibat_detach: + * + * Autoconfiguration `detach' routine. + */ +static int +acpibat_detach(device_t self, int flags) +{ + struct acpibat_softc *sc = device_private(self); + ACPI_STATUS rv; + + rv = AcpiRemoveNotifyHandler(sc-sc_node-ad_handle, + ACPI_ALL_NOTIFY, acpibat_notify_handler); + + if (ACPI_FAILURE(rv)) + return EBUSY; + + cv_destroy(sc-sc_condvar); + mutex_destroy(sc-sc_mutex); + + if (sc-sc_sme != NULL) + sysmon_envsys_unregister(sc-sc_sme); + + pmf_device_deregister(self); + + return 0; +} + +/* * acpibat_get_sta: * * Evaluate whether the battery is present or absent. @@ -694,6 +724,7 @@ fail: aprint_error_dev(dv, failed to initialize sysmon\n); sysmon_envsys_destroy(sc-sc_sme); + sc-sc_sme = NULL; } static void Index: src/sys/dev/acpi/acpi_button.c diff -u src/sys/dev/acpi/acpi_button.c:1.29 src/sys/dev/acpi/acpi_button.c:1.30 --- src/sys/dev/acpi/acpi_button.c:1.29 Sat Jan 30 18:35:48 2010 +++ src/sys/dev/acpi/acpi_button.c Sun Jan 31 06:10:53 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_button.c,v 1.29 2010/01/30 18:35:48 jruoho Exp $ */ +/* $NetBSD: acpi_button.c,v 1.30 2010/01/31 06:10:53 jruoho Exp $ */ /* * Copyright 2001, 2003 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_button.c,v 1.29 2010/01/30 18:35:48 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_button.c,v 1.30 2010/01/31 06:10:53 jruoho Exp $); #include sys/param.h #include sys/systm.h @@ -75,13 +75,13 @@ static int acpibut_match(device_t, cfdata_t, void *); static void acpibut_attach(device_t, device_t, void *); - -CFATTACH_DECL_NEW(acpibut, sizeof(struct acpibut_softc), -acpibut_match, acpibut_attach, NULL, NULL); - +static int acpibut_detach(device_t, int); static void acpibut_pressed_event(void *); static void acpibut_notify_handler(ACPI_HANDLE, UINT32, void *); +CFATTACH_DECL_NEW(acpibut, sizeof(struct acpibut_softc), +acpibut_match, acpibut_attach, acpibut_detach, NULL); + /* * acpibut_match: * @@ -158,6 +158,29 @@ } /* + * acpibut_detach: + * + * Autoconfiguration `detach' routine. + */ +static int +acpibut_detach(device_t self, int flags) +{ + struct acpibut_softc *sc = device_private(self); + ACPI_STATUS rv; + + rv = AcpiRemoveNotifyHandler(sc-sc_node-ad_handle, + ACPI_DEVICE_NOTIFY, acpibut_notify_handler); + + if (ACPI_FAILURE(rv)) + return EBUSY; + + pmf_device_deregister(self); + sysmon_pswitch_unregister(sc-sc_smpsw); + + return 0; +} + +/* * acpibut_pressed_event: * * Deal with a button being pressed.
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Sun Jan 31 06:45:10 UTC 2010 Modified Files: src/sys/dev/acpi: acpi_bat.c Log Message: Allocate the sensor structures dynamically. To generate a diff of this commit: cvs rdiff -u -r1.80 -r1.81 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.80 src/sys/dev/acpi/acpi_bat.c:1.81 --- src/sys/dev/acpi/acpi_bat.c:1.80 Sun Jan 31 06:10:53 2010 +++ src/sys/dev/acpi/acpi_bat.c Sun Jan 31 06:45:09 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_bat.c,v 1.80 2010/01/31 06:10:53 jruoho Exp $ */ +/* $NetBSD: acpi_bat.c,v 1.81 2010/01/31 06:45:09 jruoho Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -75,11 +75,12 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_bat.c,v 1.80 2010/01/31 06:10:53 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_bat.c,v 1.81 2010/01/31 06:45:09 jruoho Exp $); #include sys/param.h #include sys/systm.h #include sys/kernel.h /* for hz */ +#include sys/kmem.h #include sys/device.h #include sys/mutex.h @@ -149,7 +150,7 @@ struct acpi_devnode *sc_node; struct sysmon_envsys *sc_sme; struct timeval sc_lastupdate; - envsys_data_t sc_sensor[ACPIBAT_COUNT]; + envsys_data_t *sc_sensor; kmutex_t sc_mutex; kcondvar_t sc_condvar; int sc_present; @@ -236,7 +237,9 @@ sc-sc_node = aa-aa_node; sc-sc_present = 0; + sc-sc_sme = NULL; + sc-sc_sensor = NULL; mutex_init(sc-sc_mutex, MUTEX_DEFAULT, IPL_NONE); cv_init(sc-sc_condvar, device_xname(self)); @@ -247,10 +250,18 @@ rv = AcpiInstallNotifyHandler(sc-sc_node-ad_handle, ACPI_ALL_NOTIFY, acpibat_notify_handler, self); - if (ACPI_SUCCESS(rv)) - acpibat_init_envsys(self); - else + if (ACPI_FAILURE(rv)) { aprint_error_dev(self, couldn't install notify handler\n); + return; + } + + sc-sc_sensor = kmem_zalloc(ACPIBAT_COUNT * + sizeof(*sc-sc_sensor), KM_SLEEP); + + if (sc-sc_sensor == NULL) + return; + + acpibat_init_envsys(self); } /* @@ -276,6 +287,10 @@ if (sc-sc_sme != NULL) sysmon_envsys_unregister(sc-sc_sme); + if (sc-sc_sensor != NULL) + kmem_free(sc-sc_sensor, ACPIBAT_COUNT * + sizeof(*sc-sc_sensor)); + pmf_device_deregister(self); return 0; @@ -723,8 +738,12 @@ fail: aprint_error_dev(dv, failed to initialize sysmon\n); + sysmon_envsys_destroy(sc-sc_sme); + kmem_free(sc-sc_sensor, ACPIBAT_COUNT * sizeof(*sc-sc_sensor)); + sc-sc_sme = NULL; + sc-sc_sensor = NULL; } static void
CVS commit: src/sys/uvm
Module Name:src Committed By: uebayasi Date: Sun Jan 31 07:32:35 UTC 2010 Modified Files: src/sys/uvm: uvm_fault.c Log Message: uvm_fault_internal: Put a goto label Case1 as well as Case2. Clarify that if the faulting page is shadowed, we don't care the lower layer at all. To generate a diff of this commit: cvs rdiff -u -r1.132 -r1.133 src/sys/uvm/uvm_fault.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/uvm/uvm_fault.c diff -u src/sys/uvm/uvm_fault.c:1.132 src/sys/uvm/uvm_fault.c:1.133 --- src/sys/uvm/uvm_fault.c:1.132 Sun Jan 31 01:40:12 2010 +++ src/sys/uvm/uvm_fault.c Sun Jan 31 07:32:35 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_fault.c,v 1.132 2010/01/31 01:40:12 uebayasi Exp $ */ +/* $NetBSD: uvm_fault.c,v 1.133 2010/01/31 07:32:35 uebayasi Exp $ */ /* * @@ -39,7 +39,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.132 2010/01/31 01:40:12 uebayasi Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.133 2010/01/31 07:32:35 uebayasi Exp $); #include opt_uvmhist.h @@ -1010,6 +1010,9 @@ * XXX case. --thorpej */ + if (shadowed == true) + goto Case1; + /* * if the desired page is not shadowed by the amap and we have a * backing object, then we check to see if the backing object would @@ -1018,7 +1021,7 @@ * providing a pgo_fault routine. */ - if (uobj shadowed == false uobj-pgops-pgo_fault != NULL) { + if (uobj uobj-pgops-pgo_fault != NULL) { mutex_enter(uobj-vmobjlock); /* locked: maps(read), amap (if there), uobj */ error = uobj-pgops-pgo_fault(ufi, startva, pages, npages, @@ -1042,7 +1045,7 @@ * (PGO_LOCKED). */ - if (uobj shadowed == false) { + if (uobj) { mutex_enter(uobj-vmobjlock); /* locked (!shadowed): maps(read), amap (if there), uobj */ /* @@ -1145,16 +1148,11 @@ uobjpage = NULL; } - /* locked (shadowed): maps(read), amap */ - /* locked (!shadowed): maps(read), amap(if there), - uobj(if !null), uobjpage(if !null) */ - if (shadowed) { - KASSERT(mutex_owned(amap-am_l)); - } else { - KASSERT(amap == NULL || mutex_owned(amap-am_l)); - KASSERT(uobj == NULL || mutex_owned(uobj-vmobjlock)); - KASSERT(uobjpage == NULL || (uobjpage-flags PG_BUSY) != 0); - } + /* locked: maps(read), amap(if there), uobj(if !null), uobjpage(if !null) */ + KASSERT(!shadowed); + KASSERT(amap == NULL || mutex_owned(amap-am_l)); + KASSERT(uobj == NULL || mutex_owned(uobj-vmobjlock)); + KASSERT(uobjpage == NULL || (uobjpage-flags PG_BUSY) != 0); /* * note that at this point we are done with any front or back pages. @@ -1175,10 +1173,11 @@ * redirect case 2: if we are not shadowed, go to case 2. */ - if (shadowed == false) - goto Case2; + goto Case2; +Case1: /* locked: maps(read), amap */ + KASSERT(mutex_owned(amap-am_l)); /* * handle case 1: fault on an anon in our amap
CVS commit: src/sys/uvm
Module Name:src Committed By: uebayasi Date: Sun Jan 31 07:37:24 UTC 2010 Modified Files: src/sys/uvm: uvm_fault.c Log Message: uvm_fault_internal: Skip another long code segment (lower neighbor fault) by a goto. To generate a diff of this commit: cvs rdiff -u -r1.133 -r1.134 src/sys/uvm/uvm_fault.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/uvm/uvm_fault.c diff -u src/sys/uvm/uvm_fault.c:1.133 src/sys/uvm/uvm_fault.c:1.134 --- src/sys/uvm/uvm_fault.c:1.133 Sun Jan 31 07:32:35 2010 +++ src/sys/uvm/uvm_fault.c Sun Jan 31 07:37:24 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_fault.c,v 1.133 2010/01/31 07:32:35 uebayasi Exp $ */ +/* $NetBSD: uvm_fault.c,v 1.134 2010/01/31 07:37:24 uebayasi Exp $ */ /* * @@ -39,7 +39,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.133 2010/01/31 07:32:35 uebayasi Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.134 2010/01/31 07:37:24 uebayasi Exp $); #include opt_uvmhist.h @@ -1065,7 +1065,9 @@ uobjpage = NULL; - if (gotpages) { + if (gotpages == 0) + goto lower_fault_lookup_done; + currva = startva; for (lcv = 0; lcv npages; lcv++, currva += PAGE_SIZE) { @@ -1143,7 +1145,9 @@ UVM_PAGE_OWN(curpg, NULL); } pmap_update(ufi.orig_map-pmap); - } + +lower_fault_lookup_done: + {} } else { uobjpage = NULL; }
CVS commit: src/sys/uvm
Module Name:src Committed By: uebayasi Date: Sun Jan 31 07:46:03 UTC 2010 Modified Files: src/sys/uvm: uvm_fault.c Log Message: uvm_fault_internal: In lower fault handling case, put another goto to clarify that we don't care lower neighboring pages for the zero-fill object. To generate a diff of this commit: cvs rdiff -u -r1.134 -r1.135 src/sys/uvm/uvm_fault.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/uvm/uvm_fault.c diff -u src/sys/uvm/uvm_fault.c:1.134 src/sys/uvm/uvm_fault.c:1.135 --- src/sys/uvm/uvm_fault.c:1.134 Sun Jan 31 07:37:24 2010 +++ src/sys/uvm/uvm_fault.c Sun Jan 31 07:46:03 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_fault.c,v 1.134 2010/01/31 07:37:24 uebayasi Exp $ */ +/* $NetBSD: uvm_fault.c,v 1.135 2010/01/31 07:46:03 uebayasi Exp $ */ /* * @@ -39,7 +39,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.134 2010/01/31 07:37:24 uebayasi Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.135 2010/01/31 07:46:03 uebayasi Exp $); #include opt_uvmhist.h @@ -1045,7 +1045,12 @@ * (PGO_LOCKED). */ - if (uobj) { + if (uobj == NULL) { + /* zero fill; don't care neighbor pages */ + uobjpage = NULL; + goto lower_fault_lookup_done; + } + mutex_enter(uobj-vmobjlock); /* locked (!shadowed): maps(read), amap (if there), uobj */ /* @@ -1147,10 +1152,7 @@ pmap_update(ufi.orig_map-pmap); lower_fault_lookup_done: - {} - } else { - uobjpage = NULL; - } + {} /* locked: maps(read), amap(if there), uobj(if !null), uobjpage(if !null) */ KASSERT(!shadowed);
CVS commit: src/sys/uvm
Module Name:src Committed By: uebayasi Date: Sun Jan 31 07:47:29 UTC 2010 Modified Files: src/sys/uvm: uvm_fault.c Log Message: Indent. To generate a diff of this commit: cvs rdiff -u -r1.135 -r1.136 src/sys/uvm/uvm_fault.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/uvm/uvm_fault.c diff -u src/sys/uvm/uvm_fault.c:1.135 src/sys/uvm/uvm_fault.c:1.136 --- src/sys/uvm/uvm_fault.c:1.135 Sun Jan 31 07:46:03 2010 +++ src/sys/uvm/uvm_fault.c Sun Jan 31 07:47:29 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_fault.c,v 1.135 2010/01/31 07:46:03 uebayasi Exp $ */ +/* $NetBSD: uvm_fault.c,v 1.136 2010/01/31 07:47:29 uebayasi Exp $ */ /* * @@ -39,7 +39,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.135 2010/01/31 07:46:03 uebayasi Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_fault.c,v 1.136 2010/01/31 07:47:29 uebayasi Exp $); #include opt_uvmhist.h @@ -1051,105 +1051,105 @@ goto lower_fault_lookup_done; } - mutex_enter(uobj-vmobjlock); - /* locked (!shadowed): maps(read), amap (if there), uobj */ - /* - * the following call to pgo_get does _not_ change locking state - */ + mutex_enter(uobj-vmobjlock); + /* locked (!shadowed): maps(read), amap (if there), uobj */ + /* + * the following call to pgo_get does _not_ change locking state + */ - uvmexp.fltlget++; - gotpages = npages; - (void) uobj-pgops-pgo_get(uobj, ufi.entry-offset + eoff, -pages, gotpages, centeridx, -access_type MASK(ufi.entry), -ufi.entry-advice, PGO_LOCKED); + uvmexp.fltlget++; + gotpages = npages; + (void) uobj-pgops-pgo_get(uobj, ufi.entry-offset + eoff, + pages, gotpages, centeridx, + access_type MASK(ufi.entry), + ufi.entry-advice, PGO_LOCKED); - /* - * check for pages to map, if we got any - */ - - uobjpage = NULL; + /* + * check for pages to map, if we got any + */ - if (gotpages == 0) - goto lower_fault_lookup_done; + uobjpage = NULL; - currva = startva; - for (lcv = 0; lcv npages; - lcv++, currva += PAGE_SIZE) { -struct vm_page *curpg; -bool readonly; - -curpg = pages[lcv]; -if (curpg == NULL || curpg == PGO_DONTCARE) { - continue; -} -KASSERT(curpg-uobject == uobj); + if (gotpages == 0) + goto lower_fault_lookup_done; -/* - * if center page is resident and not - * PG_BUSY|PG_RELEASED then pgo_get - * made it PG_BUSY for us and gave - * us a handle to it. remember this - * page as uobjpage. (for later use). - */ + currva = startva; + for (lcv = 0; lcv npages; + lcv++, currva += PAGE_SIZE) { + struct vm_page *curpg; + bool readonly; -if (lcv == centeridx) { - uobjpage = curpg; - UVMHIST_LOG(maphist, got uobjpage - (0x%x) with locked get, - uobjpage, 0,0,0); - continue; -} + curpg = pages[lcv]; + if (curpg == NULL || curpg == PGO_DONTCARE) { + continue; + } + KASSERT(curpg-uobject == uobj); -/* - * calling pgo_get with PGO_LOCKED returns us - * pages which are neither busy nor released, - * so we don't need to check for this. - * we can just directly enter the pages. - */ + /* + * if center page is resident and not + * PG_BUSY|PG_RELEASED then pgo_get + * made it PG_BUSY for us and gave + * us a handle to it. remember this + * page as uobjpage. (for later use). + */ -mutex_enter(uvm_pageqlock); -uvm_pageenqueue(curpg); -mutex_exit(uvm_pageqlock); -UVMHIST_LOG(maphist, -MAPPING: n obj: pm=0x%x, va=0x%x, pg=0x%x, - ufi.orig_map-pmap, currva, curpg, 0); -uvmexp.fltnomap++; + if (lcv == centeridx) { + uobjpage = curpg; + UVMHIST_LOG(maphist, got uobjpage + (0x%x) with locked get, + uobjpage, 0,0,0); + continue; + } -/* - * Since this page isn't the page that's - * actually faulting, ignore pmap_enter() - * failures; it's not critical that we - * enter these right now. - */ -KASSERT((curpg-flags PG_PAGEOUT) == 0); -KASSERT((curpg-flags PG_RELEASED) == 0); -KASSERT(!UVM_OBJ_IS_CLEAN(curpg-uobject) || -(curpg-flags PG_CLEAN) != 0); -readonly = (curpg-flags PG_RDONLY) -|| (curpg-loan_count 0) -|| UVM_OBJ_NEEDS_WRITEFAULT(curpg-uobject); - -(void) pmap_enter(ufi.orig_map-pmap, currva, -VM_PAGE_TO_PHYS(curpg), -readonly ? -enter_prot ~VM_PROT_WRITE : -enter_prot MASK(ufi.entry), -PMAP_CANFAIL | - (wired ? PMAP_WIRED : 0)); + /* + * calling pgo_get with PGO_LOCKED returns us + * pages which are neither busy nor released, + * so we don't need to check for this. + * we can just directly enter the pages. + */ -/* - * NOTE: page can't be PG_WANTED or PG_RELEASED - * because we've held the lock the whole time - * we've had the handle. - */ -KASSERT((curpg-flags