CVS commit: xsrc/external/mit/pixman/include
Module Name:xsrc Committed By: mrg Date: Sun Aug 2 01:35:17 UTC 2009 Modified Files: xsrc/external/mit/pixman/include: config.h Log Message: update this for 0.15.16. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/pixman/include/config.h 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/pixman/include/config.h diff -u xsrc/external/mit/pixman/include/config.h:1.3 xsrc/external/mit/pixman/include/config.h:1.4 --- xsrc/external/mit/pixman/include/config.h:1.3 Thu Jul 9 06:45:53 2009 +++ xsrc/external/mit/pixman/include/config.h Sun Aug 2 01:35:17 2009 @@ -51,13 +51,13 @@ #define PACKAGE_NAME "pixman" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "pixman 0.15.14" +#define PACKAGE_STRING "pixman 0.15.16" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "pixman" /* Define to the version of this package. */ -#define PACKAGE_VERSION "0.15.14" +#define PACKAGE_VERSION "0.15.16" /* enable TIMER_BEGIN/TIMER_END macros */ #define PIXMAN_TIMERS 1 @@ -86,7 +86,7 @@ /* #undef USE_VMX */ /* Version number of package */ -#define VERSION "0.15.14" +#define VERSION "0.15.16" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */
CVS commit: src/share/man/man4
Module Name:src Committed By: nonaka Date: Sun Aug 2 00:20:39 UTC 2009 Modified Files: src/share/man/man4: sdmmc.4 Log Message: pxamci is pxa2x0 specific. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/sdmmc.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/sdmmc.4 diff -u src/share/man/man4/sdmmc.4:1.2 src/share/man/man4/sdmmc.4:1.3 --- src/share/man/man4/sdmmc.4:1.2 Sun Aug 2 00:19:29 2009 +++ src/share/man/man4/sdmmc.4 Sun Aug 2 00:20:39 2009 @@ -1,4 +1,4 @@ -.\" $NetBSD: sdmmc.4,v 1.2 2009/08/02 00:19:29 nonaka Exp $ +.\" $NetBSD: sdmmc.4,v 1.3 2009/08/02 00:20:39 nonaka Exp $ .\" $OpenBSD: sdmmc.4,v 1.8 2009/03/25 19:33:06 mk Exp $ .\" .\" Theo de Raadt, 2006. Public Domain. @@ -10,8 +10,8 @@ .Nm sdmmc .Nd SD bus .Sh SYNOPSIS -.Cd "# zaurus specific" -.Cd "sdmmc* at pxammc?" +.Cd "# pxa2x0 specific" +.Cd "sdmmc* at pxamci?" .Cd "# all architectures" .Cd "sdmmc* at sdhc?" .Cd "ld* at sdmmc?"
CVS commit: src/share/man/man4
Module Name:src Committed By: nonaka Date: Sun Aug 2 00:19:29 UTC 2009 Modified Files: src/share/man/man4: sbt.4 sdhc.4 sdmmc.4 Log Message: use NetBSD e-mail address. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/sbt.4 src/share/man/man4/sdhc.4 \ src/share/man/man4/sdmmc.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/sbt.4 diff -u src/share/man/man4/sbt.4:1.1 src/share/man/man4/sbt.4:1.2 --- src/share/man/man4/sbt.4:1.1 Tue Apr 21 21:42:53 2009 +++ src/share/man/man4/sbt.4 Sun Aug 2 00:19:29 2009 @@ -1,4 +1,4 @@ -.\" $NetBSD: sbt.4,v 1.1 2009/04/21 21:42:53 pgoyette Exp $ +.\" $NetBSD: sbt.4,v 1.2 2009/08/02 00:19:29 nonaka Exp $ .\" $OpenBSD: sbt.4,v 1.1 2007/06/19 11:33:40 uwe Exp $ .\" .\" Uwe Stuehler, 2007. Public Domain. @@ -38,4 +38,4 @@ .Nx by .An NONAKA Kimihiro -.Aq nona...@gmail.com . +.Aq non...@netbsd.org . Index: src/share/man/man4/sdhc.4 diff -u src/share/man/man4/sdhc.4:1.1 src/share/man/man4/sdhc.4:1.2 --- src/share/man/man4/sdhc.4:1.1 Tue Apr 21 21:42:53 2009 +++ src/share/man/man4/sdhc.4 Sun Aug 2 00:19:29 2009 @@ -1,4 +1,4 @@ -.\" $NetBSD: sdhc.4,v 1.1 2009/04/21 21:42:53 pgoyette Exp $ +.\" $NetBSD: sdhc.4,v 1.2 2009/08/02 00:19:29 nonaka Exp $ .\" $OpenBSD: sdhc.4,v 1.4 2009/02/14 18:47:45 deraadt Exp $ .\" .\" Theo de Raadt, 2006. Public Domain. @@ -37,4 +37,4 @@ .Nx by .An NONAKA Kimihiro -.Aq nona...@gmail.com . +.Aq non...@netbsd.org . Index: src/share/man/man4/sdmmc.4 diff -u src/share/man/man4/sdmmc.4:1.1 src/share/man/man4/sdmmc.4:1.2 --- src/share/man/man4/sdmmc.4:1.1 Tue Apr 21 21:42:53 2009 +++ src/share/man/man4/sdmmc.4 Sun Aug 2 00:19:29 2009 @@ -1,4 +1,4 @@ -.\" $NetBSD: sdmmc.4,v 1.1 2009/04/21 21:42:53 pgoyette Exp $ +.\" $NetBSD: sdmmc.4,v 1.2 2009/08/02 00:19:29 nonaka Exp $ .\" $OpenBSD: sdmmc.4,v 1.8 2009/03/25 19:33:06 mk Exp $ .\" .\" Theo de Raadt, 2006. Public Domain. @@ -46,7 +46,7 @@ .Nx by .An NONAKA Kimihiro -.Aq nona...@gmail.com +.Aq non...@netbsd.org and .An KIYOHARA Takashi .Aq kiyoh...@kk.iij4u.or.jp .
CVS commit: src/sys/arch
Module Name:src Committed By: nonaka Date: Sun Aug 2 00:06:44 UTC 2009 Modified Files: src/sys/arch/landisk/dev: obio.c src/sys/arch/landisk/include: bus.h src/sys/arch/landisk/landisk: shpcic_machdep.c src/sys/arch/sh3/dev: shpcic.c shpcicvar.h Log Message: fix build failure. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/landisk/dev/obio.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/landisk/include/bus.h cvs rdiff -u -r1.1 -r1.2 src/sys/arch/landisk/landisk/shpcic_machdep.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/sh3/dev/shpcic.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sh3/dev/shpcicvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/landisk/dev/obio.c diff -u src/sys/arch/landisk/dev/obio.c:1.6 src/sys/arch/landisk/dev/obio.c:1.7 --- src/sys/arch/landisk/dev/obio.c:1.6 Mon Apr 28 20:23:26 2008 +++ src/sys/arch/landisk/dev/obio.c Sun Aug 2 00:06:44 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: obio.c,v 1.6 2008/04/28 20:23:26 martin Exp $ */ +/* $NetBSD: obio.c,v 1.7 2009/08/02 00:06:44 nonaka Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.6 2008/04/28 20:23:26 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.7 2009/08/02 00:06:44 nonaka Exp $"); #include "btn_obio.h" #include "pwrsw_obio.h" @@ -243,6 +243,8 @@ bus_size_t size, bus_size_t alignment, bus_size_t boundary, int flags, bus_addr_t *bpap, bus_space_handle_t *bshp); void obio_iomem_free(void *v, bus_space_handle_t bsh, bus_size_t size); +paddr_t obio_iomem_mmap(void *v, bus_addr_t addr, off_t off, int prot, +int flags); static int obio_iomem_add_mapping(bus_addr_t, bus_size_t, int, bus_space_handle_t *); @@ -384,6 +386,13 @@ obio_iomem_unmap(v, bsh, size); } +paddr_t +obio_iomem_mmap(void *v, bus_addr_t addr, off_t off, int prot, int flags) +{ + + return (paddr_t)-1; +} + /* * on-board I/O bus space read/write */ @@ -450,6 +459,8 @@ .bs_alloc = obio_iomem_alloc, .bs_free = obio_iomem_free, + .bs_mmap = obio_iomem_mmap, + .bs_r_1 = obio_iomem_read_1, .bs_r_2 = obio_iomem_read_2, .bs_r_4 = obio_iomem_read_4, Index: src/sys/arch/landisk/include/bus.h diff -u src/sys/arch/landisk/include/bus.h:1.4 src/sys/arch/landisk/include/bus.h:1.5 --- src/sys/arch/landisk/include/bus.h:1.4 Mon Apr 28 20:23:26 2008 +++ src/sys/arch/landisk/include/bus.h Sun Aug 2 00:06:44 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.4 2008/04/28 20:23:26 martin Exp $ */ +/* $NetBSD: bus.h,v 1.5 2009/08/02 00:06:44 nonaka Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -130,6 +130,9 @@ /* get kernel virtual address */ void * (*bs_vaddr)(void *, bus_space_handle_t); + /* mmap bus space for user */ + paddr_t (*bs_mmap)(void *, bus_addr_t, off_t, int, int); + /* read (single) */ uint8_t (*bs_r_1)(void *, bus_space_handle_t, bus_size_t); @@ -292,6 +295,12 @@ (*(t)->bs_vaddr)((t)->bs_cookie, (h)) /* + * MMap bus space for a user application. + */ +#define bus_space_mmap(t, a, o, p, f) \ + (*(t)->bs_mmap)((t)->bs_cookie, (a), (o), (p), (f)) + +/* * Bus barrier operations. The SH3 does not currently require * barriers, but we must provide the flags to MI code. */ Index: src/sys/arch/landisk/landisk/shpcic_machdep.c diff -u src/sys/arch/landisk/landisk/shpcic_machdep.c:1.1 src/sys/arch/landisk/landisk/shpcic_machdep.c:1.2 --- src/sys/arch/landisk/landisk/shpcic_machdep.c:1.1 Fri Sep 1 21:26:18 2006 +++ src/sys/arch/landisk/landisk/shpcic_machdep.c Sun Aug 2 00:06:44 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: shpcic_machdep.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */ +/* $NetBSD: shpcic_machdep.c,v 1.2 2009/08/02 00:06:44 nonaka Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: shpcic_machdep.c,v 1.1 2006/09/01 21:26:18 uwe Exp $"); +__KERNEL_RCSID(0, "$NetBSD: shpcic_machdep.c,v 1.2 2009/08/02 00:06:44 nonaka Exp $"); #include #include @@ -189,6 +189,8 @@ .bs_alloc = shpcic_iomem_alloc, .bs_free = shpcic_iomem_free, + .bs_mmap = shpcic_iomem_mmap, + .bs_r_1 = shpcic_io_read_1, .bs_r_2 = shpcic_io_read_2, .bs_r_4 = shpcic_io_read_4, @@ -237,6 +239,8 @@ .bs_alloc = shpcic_iomem_alloc, .bs_free = shpcic_iomem_free, + .bs_mmap = shpcic_iomem_mmap, + .bs_r_1 = shpcic_mem_read_1, .bs_r_2 = shpcic_mem_read_2, .bs_r_4 = shpcic_mem_read_4, Index: src/sys/arch/sh3/dev/shpcic.c diff -u src/sys/arch/sh3/dev/shpcic.c:1.12 src/sys/arch/sh3/dev/shpcic.c:1.13 --- src/sys/arch/sh3/dev/shpcic.c:1.12 Thu Mar 27 02:05:43 2008 +++ src/sys/arch/sh3/dev/shpcic.c Sun Aug 2 00:06:44 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: shpcic.c,v 1.12 2008/03/27 02:05:43 uwe Exp $ */ +/* $NetBSD: shpcic.c,v 1.13 2009/08/02 00:06:44 nona
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Sat Aug 1 23:07:05 UTC 2009 Modified Files: src/sys/kern: tty.c Log Message: Don't return EWOULDBLOCK on an O_NONBLOCK tty file descriptor that has vmin > 0 and vtime > 0. It should be allowed to go to sleep for the sleep interval indicated in vtime. Reported by der Mouse a long while ago, and this is what other unixes do. To generate a diff of this commit: cvs rdiff -u -r1.231 -r1.232 src/sys/kern/tty.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/tty.c diff -u src/sys/kern/tty.c:1.231 src/sys/kern/tty.c:1.232 --- src/sys/kern/tty.c:1.231 Sat Apr 25 11:06:32 2009 +++ src/sys/kern/tty.c Sat Aug 1 19:07:05 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: tty.c,v 1.231 2009/04/25 15:06:32 rmind Exp $ */ +/* $NetBSD: tty.c,v 1.232 2009/08/01 23:07:05 christos Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.231 2009/04/25 15:06:32 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.232 2009/08/01 23:07:05 christos Exp $"); #include #include @@ -1795,9 +1795,11 @@ mutex_spin_exit(&tty_lock); return (0); /* EOF */ } - if (flag & IO_NDELAY) { - mutex_spin_exit(&tty_lock); - return (EWOULDBLOCK); + if (!has_stime || slp <= 0) { + if (flag & IO_NDELAY) { +mutex_spin_exit(&tty_lock); +return (EWOULDBLOCK); + } } error = ttysleep(tp, &tp->t_rawcv, true, slp); mutex_spin_exit(&tty_lock);
CVS commit: src/sys/arch/mips/conf
Module Name:src Committed By: matt Date: Sat Aug 1 22:59:52 UTC 2009 Modified Files: src/sys/arch/mips/conf: files.mips Log Message: Add MIPS64_LOONGSON2F since it needs some special help in various places. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/sys/arch/mips/conf/files.mips 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/files.mips diff -u src/sys/arch/mips/conf/files.mips:1.59 src/sys/arch/mips/conf/files.mips:1.60 --- src/sys/arch/mips/conf/files.mips:1.59 Wed Nov 19 18:35:59 2008 +++ src/sys/arch/mips/conf/files.mips Sat Aug 1 22:59:52 2009 @@ -1,8 +1,9 @@ -# $NetBSD: files.mips,v 1.59 2008/11/19 18:35:59 ad Exp $ +# $NetBSD: files.mips,v 1.60 2009/08/01 22:59:52 matt Exp $ # defflag opt_cputype.h NOFPU MIPS64_SB1 +MIPS64_LOONGSON2F # and the rest... # MIPS1 MIPS2 MIPS3 MIPS4 MIPS5 # MIPS32 MIPS64
CVS commit: src/sys/arch/mips/conf
Module Name:src Committed By: matt Date: Sat Aug 1 22:58:36 UTC 2009 Added Files: src/sys/arch/mips/conf: files.bonito Log Message: Extract bonito support from sys/arch/algor/conf/files.algor so it can be used by multiple ports. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/mips/conf/files.bonito Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/mips/conf/files.bonito diff -u /dev/null src/sys/arch/mips/conf/files.bonito:1.1 --- /dev/null Sat Aug 1 22:58:36 2009 +++ src/sys/arch/mips/conf/files.bonito Sat Aug 1 22:58:36 2009 @@ -0,0 +1,8 @@ +# $NetBSD: files.bonito,v 1.1 2009/08/01 22:58:36 matt Exp $ + +device bonito: pcibus +file arch/mips/bonito/bonito_pci.c bonito +file arch/mips/bonito/bonito_iobc.c bonito + +attach bonito at mainbus with bonito_mainbus +#file arch/algor/dev/bonito_mainbus.c bonito_mainbus
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: matt Date: Sat Aug 1 22:50:41 UTC 2009 Modified Files: src/sys/arch/mips/include: cpuregs.h Log Message: Add Loongson2 chip ids To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/sys/arch/mips/include/cpuregs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/include/cpuregs.h diff -u src/sys/arch/mips/include/cpuregs.h:1.74 src/sys/arch/mips/include/cpuregs.h:1.75 --- src/sys/arch/mips/include/cpuregs.h:1.74 Tue Feb 19 11:26:40 2008 +++ src/sys/arch/mips/include/cpuregs.h Sat Aug 1 22:50:41 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuregs.h,v 1.74 2008/02/19 11:26:40 simonb Exp $ */ +/* $NetBSD: cpuregs.h,v 1.75 2009/08/01 22:50:41 matt Exp $ */ /* * Copyright (c) 1992, 1993 @@ -725,6 +725,7 @@ #define MIPS_TX7900 0x38 /* Toshiba TX79 ISA III+*/ #define MIPS_R5400 0x54 /* NEC VR5400 ISA IV */ #define MIPS_R5500 0x55 /* NEC VR5500 ISA IV */ +#define MIPS_LOONGSON2 0x63 /* ICT Loongson-2 ISA IV */ /* * CPU revision IDs for some prehistoric processors. @@ -751,6 +752,10 @@ /* For MIPS_TX4900 */ #define MIPS_REV_TX4927 0x22 +/* For MIPS_LOONGSON2 */ +#define MIPS_REV_LOONGSON2E 0x02 +#define MIPS_REV_LOONGSON2F 0x03 + /* * CPU processor revision IDs for company ID == 1 (MIPS) */
CVS commit: src/sys/dev/pci
Module Name:src Committed By: matt Date: Sat Aug 1 21:34:21 UTC 2009 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add Silicon Motion SM502 To generate a diff of this commit: cvs rdiff -u -r1.994 -r1.995 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.994 src/sys/dev/pci/pcidevs:1.995 --- src/sys/dev/pci/pcidevs:1.994 Tue Jul 7 09:45:45 2009 +++ src/sys/dev/pci/pcidevs Sat Aug 1 21:34:21 2009 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.994 2009/07/07 09:45:45 cegger Exp $ +$NetBSD: pcidevs,v 1.995 2009/08/01 21:34:21 matt Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -3794,6 +3794,7 @@ product SIS 7018 0x7018 7018 Sound /* Silicon Motion products */ +product SILMOTION SM502 0x0501 Voyager GX product SILMOTION SM710 0x0710 LynxEM product SILMOTION SM712 0x0712 LynxEM+ product SILMOTION SM720 0x0720 Lynx3DM
CVS commit: src/sys
Module Name:src Committed By: bad Date: Sat Aug 1 21:17:12 UTC 2009 Modified Files: src/sys/kern: vfs_syscalls.c src/sys/sys: vfs_syscalls.h Log Message: As discussed on tech-kern: Factor out common code of chroot-like syscalls into change_root() and export that function for use in other parts of the kernel. Rename change_dir() to chdir_lookup() as the latter describes better what the function does. While there, move the namei_data initialisation into chdir_lookup(), too. And export chdir_lookup(). To generate a diff of this commit: cvs rdiff -u -r1.396 -r1.397 src/sys/kern/vfs_syscalls.c cvs rdiff -u -r1.11 -r1.12 src/sys/sys/vfs_syscalls.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/vfs_syscalls.c diff -u src/sys/kern/vfs_syscalls.c:1.396 src/sys/kern/vfs_syscalls.c:1.397 --- src/sys/kern/vfs_syscalls.c:1.396 Thu Jul 2 12:53:47 2009 +++ src/sys/kern/vfs_syscalls.c Sat Aug 1 21:17:11 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_syscalls.c,v 1.396 2009/07/02 12:53:47 pooka Exp $ */ +/* $NetBSD: vfs_syscalls.c,v 1.397 2009/08/01 21:17:11 bad Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.396 2009/07/02 12:53:47 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.397 2009/08/01 21:17:11 bad Exp $"); #ifdef _KERNEL_OPT #include "opt_fileassoc.h" @@ -110,7 +110,6 @@ MALLOC_DEFINE(M_MOUNT, "mount", "vfs mount struct"); -static int change_dir(struct nameidata *, struct lwp *); static int change_flags(struct vnode *, u_long, struct lwp *); static int change_mode(struct vnode *, int, struct lwp *l); static int change_owner(struct vnode *, uid_t, gid_t, struct lwp *, int); @@ -1126,7 +1125,6 @@ sys_fchroot(struct lwp *l, const struct sys_fchroot_args *uap, register_t *retval) { struct proc *p = l->l_proc; - struct cwdinfo *cwdi; struct vnode *vp; file_t *fp; int error, fd = SCARG(uap, fd); @@ -1135,7 +1133,7 @@ KAUTH_REQ_SYSTEM_CHROOT_FCHROOT, NULL, NULL, NULL)) != 0) return error; /* fd_getvnode() will use the descriptor for us */ - if ((error = fd_getvnode(SCARG(uap, fd), &fp)) != 0) + if ((error = fd_getvnode(fd, &fp)) != 0) return error; vp = fp->f_data; vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); @@ -1148,27 +1146,7 @@ goto out; VREF(vp); - /* - * Prevent escaping from chroot by putting the root under - * the working directory. Silently chdir to / if we aren't - * already there. - */ - cwdi = p->p_cwdi; - rw_enter(&cwdi->cwdi_lock, RW_WRITER); - if (!vn_isunder(cwdi->cwdi_cdir, vp, l)) { - /* - * XXX would be more failsafe to change directory to a - * deadfs node here instead - */ - vrele(cwdi->cwdi_cdir); - VREF(vp); - cwdi->cwdi_cdir = vp; - } - - if (cwdi->cwdi_rdir != NULL) - vrele(cwdi->cwdi_rdir); - cwdi->cwdi_rdir = vp; - rw_exit(&cwdi->cwdi_lock); + change_root(p->p_cwdi, vp, l); out: fd_putfile(fd); @@ -1188,16 +1166,15 @@ struct proc *p = l->l_proc; struct cwdinfo *cwdi; int error; - struct nameidata nd; + struct vnode *vp; - NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | TRYEMULROOT, UIO_USERSPACE, - SCARG(uap, path)); - if ((error = change_dir(&nd, l)) != 0) + if ((error = chdir_lookup(SCARG(uap, path), UIO_USERSPACE, + &vp, l)) != 0) return (error); cwdi = p->p_cwdi; rw_enter(&cwdi->cwdi_lock, RW_WRITER); vrele(cwdi->cwdi_cdir); - cwdi->cwdi_cdir = nd.ni_vp; + cwdi->cwdi_cdir = vp; rw_exit(&cwdi->cwdi_lock); return (0); } @@ -1213,24 +1190,31 @@ syscallarg(const char *) path; } */ struct proc *p = l->l_proc; - struct cwdinfo *cwdi; - struct vnode *vp; int error; - struct nameidata nd; + struct vnode *vp; if ((error = kauth_authorize_system(l->l_cred, KAUTH_SYSTEM_CHROOT, KAUTH_REQ_SYSTEM_CHROOT_CHROOT, NULL, NULL, NULL)) != 0) return (error); - NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | TRYEMULROOT, UIO_USERSPACE, - SCARG(uap, path)); - if ((error = change_dir(&nd, l)) != 0) + if ((error = chdir_lookup(SCARG(uap, path), UIO_USERSPACE, + &vp, l)) != 0) return (error); - cwdi = p->p_cwdi; + change_root(p->p_cwdi, vp, l); + + return (0); +} + +/* + * Common routine for chroot and fchroot. + */ +void +change_root(struct cwdinfo *cwdi, struct vnode *vp, struct lwp *l) +{ + rw_enter(&cwdi->cwdi_lock, RW_WRITER); if (cwdi->cwdi_rdir != NULL) vrele(cwdi->cwdi_rdir); - vp = nd.ni_vp; cwdi->cwdi_rdir = vp; /* @@ -1248,31 +1232,31 @@ cwdi->cwdi_cdir = vp; } rw_exit(&cwdi->cwdi_lock); - - return (0); } /* * Common routine for chroot and chdir. */ -static int -change_dir(struct nameidata *ndp, struct lwp *l) +int +chdir_lookup(const char *path, int where, struct vnode **vpp, struct lwp *l) { - struct vnode *vp; + struct nameidata nd; int error; - if ((error = namei(ndp)) != 0) + NDINIT(&nd, LOOKUP, F
CVS commit: src/common/lib/libc/arch/x86_64/string
Module Name:src Committed By: dsl Date: Sat Aug 1 20:47:02 UTC 2009 Modified Files: src/common/lib/libc/arch/x86_64/string: memchr.S Log Message: In the misaligned case, xor the read word with the target pattern before making the unwanted bytes non-zero. Means that memchr(buf, 0xff) is no longer a special case. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/x86_64/string/memchr.S 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/arch/x86_64/string/memchr.S diff -u src/common/lib/libc/arch/x86_64/string/memchr.S:1.4 src/common/lib/libc/arch/x86_64/string/memchr.S:1.5 --- src/common/lib/libc/arch/x86_64/string/memchr.S:1.4 Mon Jul 20 15:21:00 2009 +++ src/common/lib/libc/arch/x86_64/string/memchr.S Sat Aug 1 20:47:02 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: memchr.S,v 1.4 2009/07/20 15:21:00 christos Exp $ */ +/* $NetBSD: memchr.S,v 1.5 2009/08/01 20:47:02 dsl Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include #if defined(LIBC_SCCS) - RCSID("$NetBSD: memchr.S,v 1.4 2009/07/20 15:21:00 christos Exp $") + RCSID("$NetBSD: memchr.S,v 1.5 2009/08/01 20:47:02 dsl Exp $") #endif /* @@ -63,9 +63,9 @@ jae 30f /* jump if so */ movq (%rdi),%rax /* value to check */ -2: addq $8,%rdi xorq %rsi,%rax /* now looking for zeros */ +2: mov %rax,%rcx subq %r8,%rax /* x - 0x01 */ not %rcx @@ -82,32 +82,25 @@ rep ret /* amd - no ret after jmp */ -/* Input misaligned, read aligned and kill low bits */ -/* (Getting a -1 is surprisingly hard work!) */ +/* Input misaligned, read aligned and make low bytes invalid */ 20: - xor %eax,%eax /* zeros all 64 bits */ mov %dil,%cl /* misalignment amount 1..7 (+high bits )*/ + and $~7,%dil /* %rdi now start of word */ test %rdx,%rdx /* zero length, don't read */ jz 30f - and $~7,%dil /* %rdi now start of word */ - lea -1(%rax),%r11 /* all 0xff */ - and $7,%cl /* 1..7 */ - + neg %cl /* 7..1 (+high bits) */ mov (%rdi),%rax /* word containing first byte */ - shl $3,%cl /* 8..56 */ - cmp %r11,%rsi /* searching for 0xff */ - jz 25f - - /* Searching for other than 0xff, set low bytes */ - shl %cl,%r11 /* 0xff in high (wanted) bytes */ - not %r11 /* 0xff in low (unwanted) bytes */ - or %r11,%rax /* low bytes now set */ - jmp 2b + addq $8,%rdi + and $7,%cl /* 7..1 */ -25: /* Searching for 0xff, clear low bytes */ - shl %cl,%r11 /* 0xff in high (wanted) bytes */ - and %r11,%rax /* low bytes now zero */ + mov %r8,%r11 /* any value with bits in each byte */ + shl $3,%cl /* 56..8 */ + xorq %rsi,%rax /* now looking for zeros */ + + /* Set low bytes non-zero */ + shr %cl,%r11 /* non-zero in unwanted bytes */ + or %r11,%rax /* low bytes now set */ jmp 2b /* Not found */
CVS commit: src/common/lib/libc/arch/x86_64/string
Module Name:src Committed By: dsl Date: Sat Aug 1 20:35:46 UTC 2009 Modified Files: src/common/lib/libc/arch/x86_64/string: bzero.S memset.S Log Message: Remove some long dependant instruction sequences (ie allow parallel code). Since 'rep stos' will have a long setup time, avoid doing it more than once. For misaligned (start address or length) write an unaligned word at both ends of the buffer then aligned 'rep stosd' the middle. Use the same code for bzero(). bzero.S is left being compiled for a while (empty) - to avoid issues with duplicate symbols in libc.a after update builds. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/x86_64/string/bzero.S \ src/common/lib/libc/arch/x86_64/string/memset.S 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/arch/x86_64/string/bzero.S diff -u src/common/lib/libc/arch/x86_64/string/bzero.S:1.2 src/common/lib/libc/arch/x86_64/string/bzero.S:1.3 --- src/common/lib/libc/arch/x86_64/string/bzero.S:1.2 Mon Nov 12 18:41:59 2007 +++ src/common/lib/libc/arch/x86_64/string/bzero.S Sat Aug 1 20:35:45 2009 @@ -1,43 +1,8 @@ /* - * Written by J.T. Conklin . - * Public domain. - * Adapted for NetBSD/x86_64 by Frank van der Linden + * Code for bzero() is in memset.S + * + * This file is left in place so that libc.a doesn't get a duplicate + * symbol error on update builds. + * + * If you are reading this in 2010, delete the file! */ - -#include - -#if defined(LIBC_SCCS) - RCSID("$NetBSD: bzero.S,v 1.2 2007/11/12 18:41:59 ad Exp $") -#endif - -ENTRY(bzero) - movq %rsi,%rdx - - xorq %rax,%rax /* set fill data to 0 */ - - /* - * if the string is too short, it's really not worth the overhead - * of aligning to word boundries, etc. So we jump to a plain - * unaligned set. - */ - cmpq $16,%rdx - jb L1 - - movq %rdi,%rcx /* compute misalignment */ - negq %rcx - andq $7,%rcx - subq %rcx,%rdx - rep/* zero until word aligned */ - stosb - - movq %rdx,%rcx /* zero by words */ - shrq $3,%rcx - andq $7,%rdx - rep - stosq - -L1: movq %rdx,%rcx /* zero remainder by bytes */ - rep - stosb - - ret Index: src/common/lib/libc/arch/x86_64/string/memset.S diff -u src/common/lib/libc/arch/x86_64/string/memset.S:1.2 src/common/lib/libc/arch/x86_64/string/memset.S:1.3 --- src/common/lib/libc/arch/x86_64/string/memset.S:1.2 Mon Nov 12 18:41:59 2007 +++ src/common/lib/libc/arch/x86_64/string/memset.S Sat Aug 1 20:35:45 2009 @@ -1,57 +1,91 @@ -/* - * Written by J.T. Conklin . - * Public domain. - * Adapted for NetBSD/x86_64 by Frank van der Linden +/* $NetBSD: memset.S,v 1.3 2009/08/01 20:35:45 dsl Exp $ */ + +/*- + * Copyright (c) 2009 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by David Laight. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ #include #if defined(LIBC_SCCS) - RCSID("$NetBSD: memset.S,v 1.2 2007/11/12 18:41:59 ad Exp $") + RCSID("$NetBSD: memset.S,v 1.3 2009/08/01 20:35:45 dsl Exp $") +#endif + +#ifndef _KERNEL +/* bzero, %rdi is buffer, %rsi length */ + +ENTRY(bzero) + mov %rsi,%rdx /* length */ + xor %eax,%eax /* value to write */ + jmp 1f #endif +/* memset, %rdi is buffer, %rsi char to fill, %rdx length */ + ENTRY(memset) - movq %rsi,%rax - andq $0xff,%rax - movq %rdx,%rcx - movq %rdi,%r11 - - /* - * if the string is too short, it's really not worth the overhead - * of aligning to word boundries, etc. So we jump to a plain - * unaligned set. - */ - cmpq $0x0f,%rcx - jle L1 - - movb %al,%ah /* copy char to all bytes in word
CVS commit: src/sys/uvm
Module Name:src Committed By: yamt Date: Sat Aug 1 16:35:51 UTC 2009 Modified Files: src/sys/uvm: uvm_map.c uvm_map.h Log Message: - uvm_map_extract: update map->size correctly for !UVM_EXTRACT_CONTIG. - uvm_map_extract: panic on zero-sized entries. - make uvm_map_replace static. To generate a diff of this commit: cvs rdiff -u -r1.274 -r1.275 src/sys/uvm/uvm_map.c cvs rdiff -u -r1.63 -r1.64 src/sys/uvm/uvm_map.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/uvm/uvm_map.c diff -u src/sys/uvm/uvm_map.c:1.274 src/sys/uvm/uvm_map.c:1.275 --- src/sys/uvm/uvm_map.c:1.274 Sat Aug 1 15:36:07 2009 +++ src/sys/uvm/uvm_map.c Sat Aug 1 16:35:51 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_map.c,v 1.274 2009/08/01 15:36:07 yamt Exp $ */ +/* $NetBSD: uvm_map.c,v 1.275 2009/08/01 16:35:51 yamt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -71,7 +71,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.274 2009/08/01 15:36:07 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.275 2009/08/01 16:35:51 yamt Exp $"); #include "opt_ddb.h" #include "opt_uvmhist.h" @@ -2557,9 +2557,10 @@ * => note newents is allowed to be NULL */ -int +static int uvm_map_replace(struct vm_map *map, vaddr_t start, vaddr_t end, -struct vm_map_entry *newents, int nnewents, struct vm_map_entry **oldentryp) +struct vm_map_entry *newents, int nnewents, vsize_t nsize, +struct vm_map_entry **oldentryp) { struct vm_map_entry *oldent, *last; @@ -2594,13 +2595,15 @@ { struct vm_map_entry *tmpent = newents; int nent = 0; + vsize_t sz = 0; vaddr_t cur = start; while (tmpent) { nent++; + sz += tmpent->end - tmpent->start; if (tmpent->start < cur) panic("uvm_map_replace1"); - if (tmpent->start > tmpent->end || tmpent->end > end) { + if (tmpent->start >= tmpent->end || tmpent->end > end) { printf("tmpent->start=0x%lx, tmpent->end=0x%lx, end=0x%lx\n", tmpent->start, tmpent->end, end); panic("uvm_map_replace2"); @@ -2617,6 +2620,8 @@ } if (nent != nnewents) panic("uvm_map_replace5"); + if (sz != nsize) + panic("uvm_map_replace6"); } #endif @@ -2659,6 +2664,7 @@ clear_hints(map, oldent); uvm_map_entry_unlink(map, oldent); } + map->size -= end - start - nsize; uvm_map_check(map, "map_replace leave"); @@ -2698,6 +2704,7 @@ struct vm_map_entry *resentry = NULL; /* a dummy reservation entry */ vsize_t elen; int nchain, error, copy_ok; + vsize_t nsize; UVMHIST_FUNC("uvm_map_extract"); UVMHIST_CALLED(maphist); UVMHIST_LOG(maphist,"(srcmap=0x%x,start=0x%x, len=0x%x", srcmap, start, @@ -2738,6 +2745,7 @@ newend = dstaddr + len; chain = endchain = NULL; nchain = 0; + nsize = 0; vm_map_lock(srcmap); if (uvm_map_lookup_entry(srcmap, start, &entry)) { @@ -2857,6 +2865,7 @@ /* now link it on the chain */ nchain++; + nsize += newentry->end - newentry->start; if (endchain == NULL) { chain = endchain = newentry; } else { @@ -2892,7 +2901,7 @@ if (srcmap == dstmap || vm_map_lock_try(dstmap) == true) { copy_ok = 1; if (!uvm_map_replace(dstmap, dstaddr, dstaddr+len, chain, - nchain, &resentry)) { + nchain, nsize, &resentry)) { if (srcmap != dstmap) vm_map_unlock(dstmap); error = EIO; @@ -2979,7 +2988,7 @@ if (copy_ok == 0) { vm_map_lock(dstmap); error = uvm_map_replace(dstmap, dstaddr, dstaddr+len, chain, - nchain, &resentry); + nchain, nsize, &resentry); vm_map_unlock(dstmap); if (error == false) { Index: src/sys/uvm/uvm_map.h diff -u src/sys/uvm/uvm_map.h:1.63 src/sys/uvm/uvm_map.h:1.64 --- src/sys/uvm/uvm_map.h:1.63 Wed Jun 10 01:55:33 2009 +++ src/sys/uvm/uvm_map.h Sat Aug 1 16:35:51 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_map.h,v 1.63 2009/06/10 01:55:33 yamt Exp $ */ +/* $NetBSD: uvm_map.h,v 1.64 2009/08/01 16:35:51 yamt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -316,8 +316,6 @@ bool uvm_map_lookup_entry(struct vm_map *, vaddr_t, struct vm_map_entry **); void uvm_map_reference(struct vm_map *); -int uvm_map_replace(struct vm_map *, vaddr_t, vaddr_t, - struct vm_map_entry *, int, struct vm_map_entry **); int uvm_map_reserve(struct vm_map *, vsize_t, vaddr_t, vsize_t, vaddr_t *, uvm_flag_t); void uvm_map_setup(struct vm_map *, vaddr_t, vaddr_t, int);
CVS commit: src/share/man/man4
Module Name:src Committed By: mbalmer Date: Sat Aug 1 15:52:55 UTC 2009 Modified Files: src/share/man/man4: gpio.4 Log Message: Sprinkle a few .Pps. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/share/man/man4/gpio.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/gpio.4 diff -u src/share/man/man4/gpio.4:1.11 src/share/man/man4/gpio.4:1.12 --- src/share/man/man4/gpio.4:1.11 Sat Aug 1 13:17:30 2009 +++ src/share/man/man4/gpio.4 Sat Aug 1 15:52:55 2009 @@ -1,4 +1,4 @@ -.\" $NetBSD: gpio.4,v 1.11 2009/08/01 13:17:30 mbalmer Exp $ +.\" $NetBSD: gpio.4,v 1.12 2009/08/01 15:52:55 mbalmer Exp $ .\" $OpenBSD: gpio.4,v 1.5 2004/11/23 09:39:29 reyk Exp $ .\" .\" Copyright (c) 2004 Alexander Yurchenko @@ -172,6 +172,7 @@ .It Dv GPIOUNSET (struct gpio_set) Unset the specified pin, i.e. clear its name and make it unaccessible at securelevels greater than 0. +.Pp .It Dv GPIOATTACH (struct gpio_attach) Attach the device described in the .Fa gpio_attach @@ -183,6 +184,7 @@ u_int32_t ga_mask; /* binary mask */ }; .Ed +.Pp .It Dv GPIODETACH (struct gpio_attach) Detach a device from this gpio device that was previously attached using the .Dv GPIOATTACH
CVS commit: src
Module Name:src Committed By: mbalmer Date: Sat Aug 1 15:43:01 UTC 2009 Modified Files: src/distrib/sets/lists/man: mi src/share/man/man4: Makefile Added Files: src/share/man/man4: gpiosim.4 Log Message: Add a manual page for the gpiosim(4) pseudo-device. To generate a diff of this commit: cvs rdiff -u -r1.1149 -r1.1150 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.493 -r1.494 src/share/man/man4/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man4/gpiosim.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1149 src/distrib/sets/lists/man/mi:1.1150 --- src/distrib/sets/lists/man/mi:1.1149 Mon Jul 27 12:34:12 2009 +++ src/distrib/sets/lists/man/mi Sat Aug 1 15:43:01 2009 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1149 2009/07/27 12:34:12 kiyohara Exp $ +# $NetBSD: mi,v 1.1150 2009/08/01 15:43:01 mbalmer Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -939,6 +939,7 @@ ./usr/share/man/cat4/gpib.0 man-sys-catman .cat ./usr/share/man/cat4/gpio.0 man-sys-catman .cat ./usr/share/man/cat4/gpioow.0 man-sys-catman .cat +./usr/share/man/cat4/gpiosim.0 man-sys-catman .cat ./usr/share/man/cat4/gre.0 man-sys-catman .cat ./usr/share/man/cat4/gsip.0 man-sys-catman .cat ./usr/share/man/cat4/gus.0 man-sys-catman .cat @@ -3545,6 +3546,7 @@ ./usr/share/man/html4/gpib.html man-sys-htmlman html ./usr/share/man/html4/gpio.html man-sys-htmlman html ./usr/share/man/html4/gpioow.html man-sys-htmlman html +./usr/share/man/html4/gpiosim.html man-sys-htmlman html ./usr/share/man/html4/gre.html man-sys-htmlman html ./usr/share/man/html4/gsip.html man-sys-htmlman html ./usr/share/man/html4/gus.html man-sys-htmlman html @@ -5931,6 +5933,7 @@ ./usr/share/man/man4/gpib.4 man-sys-man .man ./usr/share/man/man4/gpio.4 man-sys-man .man ./usr/share/man/man4/gpioow.4 man-sys-man .man +./usr/share/man/man4/gpiosim.4 man-sys-man .man ./usr/share/man/man4/gre.4 man-sys-man .man ./usr/share/man/man4/gsip.4 man-sys-man .man ./usr/share/man/man4/gus.4 man-sys-man .man Index: src/share/man/man4/Makefile diff -u src/share/man/man4/Makefile:1.493 src/share/man/man4/Makefile:1.494 --- src/share/man/man4/Makefile:1.493 Mon Jul 27 12:34:13 2009 +++ src/share/man/man4/Makefile Sat Aug 1 15:43:01 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.493 2009/07/27 12:34:13 kiyohara Exp $ +# $NetBSD: Makefile,v 1.494 2009/08/01 15:43:01 mbalmer Exp $ # @(#)Makefile 8.1 (Berkeley) 6/18/93 MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 acpidalb.4 \ @@ -25,7 +25,7 @@ esa.4 esiop.4 esm.4 eso.4 etherip.4 exphy.4 \ fast_ipsec.4 fd.4 finsio.4 fpa.4 fms.4 fss.4 fxp.4 \ gcscaudio.4 gem.4 genfb.4 gentbi.4 geodeide.4 \ - glxtphy.4 gpib.4 gpio.4 gre.4 gphyter.4 gsip.4 hifn.4 hme.4 \ + glxtphy.4 gpib.4 gpio.4 gpiosim.4 gre.4 gphyter.4 gsip.4 hifn.4 hme.4 \ hpqlb.4 hptide.4 \ ichlpcib.4 ichsmb.4 icmp.4 icp.4 icsphy.4 iee.4 ieee80211.4 \ ifmedia.4 igsfb.4 iha.4 iic.4 inet.4 ikphy.4 inphy.4 intersil7170.4 \ Added files: Index: src/share/man/man4/gpiosim.4 diff -u /dev/null src/share/man/man4/gpiosim.4:1.1 --- /dev/null Sat Aug 1 15:43:01 2009 +++ src/share/man/man4/gpiosim.4 Sat Aug 1 15:43:01 2009 @@ -0,0 +1,48 @@ +.\" $NetBSD: gpiosim.4,v 1.1 2009/08/01 15:43:01 mbalmer Exp $ +.\" +.\" Copyright (c) 2009 Marc Balmer +.\" All rights reserved. +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd August 1, 2009 +.Dt GPIOSIM 4 +.Os +.Sh NAME +.Nm gpiosim +.Nd General Purpose Input/Output Simulator +.Sh SYNOPSIS +.Cd "pseudo-device gpiosim" +.Sh DESCRIPTION +The +.Nm +pseudo-device simulates a 32-bit wide +.Xr gpio 4 +device. +The state of the simulated device can be manipulated through the +.Xr sysctl 8 +interface. +For this purpose, access the "hw.gpiosim.value" +.Xr sysctl 8 +variable, where "" denotes the number of the +.Nm +instance. +.Sh SEE ALSO +.Xr gpio 4 , +.Xr sysctl 8 +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Marc Balmer Aq m...@msys.ch .
CVS commit: src/sys/uvm
Module Name:src Committed By: yamt Date: Sat Aug 1 15:36:07 UTC 2009 Modified Files: src/sys/uvm: uvm_map.c Log Message: don't call uvm_map_check with map unlocked. To generate a diff of this commit: cvs rdiff -u -r1.273 -r1.274 src/sys/uvm/uvm_map.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_map.c diff -u src/sys/uvm/uvm_map.c:1.273 src/sys/uvm/uvm_map.c:1.274 --- src/sys/uvm/uvm_map.c:1.273 Sat Aug 1 15:32:02 2009 +++ src/sys/uvm/uvm_map.c Sat Aug 1 15:36:07 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_map.c,v 1.273 2009/08/01 15:32:02 yamt Exp $ */ +/* $NetBSD: uvm_map.c,v 1.274 2009/08/01 15:36:07 yamt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -71,7 +71,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.273 2009/08/01 15:32:02 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.274 2009/08/01 15:36:07 yamt Exp $"); #include "opt_ddb.h" #include "opt_uvmhist.h" @@ -2704,9 +2704,6 @@ len,0); UVMHIST_LOG(maphist," ...,dstmap=0x%x, flags=0x%x)", dstmap,flags,0,0); - uvm_map_check(srcmap, "map_extract src enter"); - uvm_map_check(dstmap, "map_extract dst enter"); - /* * step 0: sanity check: start must be on a page boundary, length * must be page sized. can't ask for CONTIG/QREF if you asked for @@ -2994,9 +2991,6 @@ if (resentry != NULL) uvm_mapent_free(resentry); - uvm_map_check(srcmap, "map_extract src leave"); - uvm_map_check(dstmap, "map_extract dst leave"); - return (0); /* @@ -3012,9 +3006,6 @@ if (resentry != NULL) uvm_mapent_free(resentry); - uvm_map_check(srcmap, "map_extract src err leave"); - uvm_map_check(dstmap, "map_extract dst err leave"); - if ((flags & UVM_EXTRACT_RESERVED) == 0) { uvm_unmap(dstmap, dstaddr, dstaddr+len); /* ??? */ }
CVS commit: src/sys/uvm
Module Name:src Committed By: yamt Date: Sat Aug 1 15:32:02 UTC 2009 Modified Files: src/sys/uvm: uvm_map.c Log Message: _uvm_tree_sanity: fix an assertion. To generate a diff of this commit: cvs rdiff -u -r1.272 -r1.273 src/sys/uvm/uvm_map.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_map.c diff -u src/sys/uvm/uvm_map.c:1.272 src/sys/uvm/uvm_map.c:1.273 --- src/sys/uvm/uvm_map.c:1.272 Sat Aug 1 15:30:33 2009 +++ src/sys/uvm/uvm_map.c Sat Aug 1 15:32:02 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_map.c,v 1.272 2009/08/01 15:30:33 yamt Exp $ */ +/* $NetBSD: uvm_map.c,v 1.273 2009/08/01 15:32:02 yamt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -71,7 +71,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.272 2009/08/01 15:30:33 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.273 2009/08/01 15:32:02 yamt Exp $"); #include "opt_ddb.h" #include "opt_uvmhist.h" @@ -551,7 +551,10 @@ * If any entries are out of order, tmp->gap will be unsigned * and will likely exceed the size of the map. */ - KASSERT(tmp->gap < map->size); + if (tmp->gap >= vm_map_max(map) - vm_map_min(map)) { + printf("too large gap %zu\n", (size_t)tmp->gap); + goto error; + } n++; }
CVS commit: src/sys/uvm
Module Name:src Committed By: yamt Date: Sat Aug 1 15:30:33 UTC 2009 Modified Files: src/sys/uvm: uvm_map.c Log Message: _uvm_map_sanity: fix a race which causes "stale hint". To generate a diff of this commit: cvs rdiff -u -r1.271 -r1.272 src/sys/uvm/uvm_map.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_map.c diff -u src/sys/uvm/uvm_map.c:1.271 src/sys/uvm/uvm_map.c:1.272 --- src/sys/uvm/uvm_map.c:1.271 Wed Jun 10 01:55:33 2009 +++ src/sys/uvm/uvm_map.c Sat Aug 1 15:30:33 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_map.c,v 1.271 2009/06/10 01:55:33 yamt Exp $ */ +/* $NetBSD: uvm_map.c,v 1.272 2009/08/01 15:30:33 yamt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -71,7 +71,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.271 2009/06/10 01:55:33 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.272 2009/08/01 15:30:33 yamt Exp $"); #include "opt_ddb.h" #include "opt_uvmhist.h" @@ -502,6 +502,7 @@ bool first_free_found = false; bool hint_found = false; const struct vm_map_entry *e; + struct vm_map_entry *hint = map->hint; e = &map->header; for (;;) { @@ -512,7 +513,7 @@ map->first_free, e); return -1; } - if (map->hint == e) { + if (hint == e) { hint_found = true; }
CVS commit: src/share/man/man4
Module Name:src Committed By: mbalmer Date: Sat Aug 1 13:17:30 UTC 2009 Modified Files: src/share/man/man4: gpio.4 Log Message: Sort SYNOPSIS, add gpio* at gpiosim?. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/share/man/man4/gpio.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/gpio.4 diff -u src/share/man/man4/gpio.4:1.10 src/share/man/man4/gpio.4:1.11 --- src/share/man/man4/gpio.4:1.10 Sat Jul 25 21:16:35 2009 +++ src/share/man/man4/gpio.4 Sat Aug 1 13:17:30 2009 @@ -1,4 +1,4 @@ -.\" $NetBSD: gpio.4,v 1.10 2009/07/25 21:16:35 wiz Exp $ +.\" $NetBSD: gpio.4,v 1.11 2009/08/01 13:17:30 mbalmer Exp $ .\" $OpenBSD: gpio.4,v 1.5 2004/11/23 09:39:29 reyk Exp $ .\" .\" Copyright (c) 2004 Alexander Yurchenko @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd July 19, 2009 +.Dd August 1, 2009 .Dt GPIO 4 .Os .Sh NAME @@ -23,11 +23,12 @@ .Nd General Purpose Input/Output .Sh SYNOPSIS .Cd "gpio* at elansc?" +.Cd "gpio* at epgpio?" .Cd "gpio* at gcscpcib?" +.Cd "gpio* at gpiosim?" .Cd "gpio* at gscpcib?" .Cd "gpio* at nsclpcsio?" .Cd "gpio* at ppbus?" -.Cd "gpio* at epgpio?" .Pp .In sys/types.h .In sys/gpio.h
CVS commit: src/share/man/man5
Module Name:src Committed By: mbalmer Date: Sat Aug 1 13:14:40 UTC 2009 Modified Files: src/share/man/man5: gpio.conf.5 Log Message: Simplify example. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man5/gpio.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/share/man/man5/gpio.conf.5 diff -u src/share/man/man5/gpio.conf.5:1.1 src/share/man/man5/gpio.conf.5:1.2 --- src/share/man/man5/gpio.conf.5:1.1 Sat Jul 25 16:20:11 2009 +++ src/share/man/man5/gpio.conf.5 Sat Aug 1 13:14:40 2009 @@ -1,4 +1,4 @@ -.\"$NetBSD: gpio.conf.5,v 1.1 2009/07/25 16:20:11 mbalmer Exp $ +.\"$NetBSD: gpio.conf.5,v 1.2 2009/08/01 13:14:40 mbalmer Exp $ .\" .\" Copyright (c) 2009 Marc Balmer .\" All rights reserved. @@ -23,7 +23,7 @@ .\" INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 16, 2009 +.Dd August 1, 2009 .Dt GPIO.CONF 5 .Os .Sh NAME @@ -62,7 +62,7 @@ is set as output and named "error_led". .Bd -literal -offset indent # Program pin 1 of /dev/gpio0 as output and name it "error_led" -/dev/gpio0 1 set out error_led +gpio0 1 set out error_led .Ed .Sh SEE ALSO .Xr gpioctl 8 ,
CVS commit: src/sys/arch/arm/sa11x0
Module Name:src Committed By: kiyohara Date: Sat Aug 1 10:33:58 UTC 2009 Modified Files: src/sys/arch/arm/sa11x0: sa11x0_ost.c Log Message: Support run-time configuration for PXA25x and PXA27x. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/sa11x0/sa11x0_ost.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/sa11x0/sa11x0_ost.c diff -u src/sys/arch/arm/sa11x0/sa11x0_ost.c:1.26 src/sys/arch/arm/sa11x0/sa11x0_ost.c:1.27 --- src/sys/arch/arm/sa11x0/sa11x0_ost.c:1.26 Fri May 29 14:15:44 2009 +++ src/sys/arch/arm/sa11x0/sa11x0_ost.c Sat Aug 1 10:33:58 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: sa11x0_ost.c,v 1.26 2009/05/29 14:15:44 rjs Exp $ */ +/* $NetBSD: sa11x0_ost.c,v 1.27 2009/08/01 10:33:58 kiyohara Exp $ */ /* * Copyright (c) 1997 Mark Brinicombe. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sa11x0_ost.c,v 1.26 2009/05/29 14:15:44 rjs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sa11x0_ost.c,v 1.27 2009/08/01 10:33:58 kiyohara Exp $"); #include #include @@ -80,7 +80,9 @@ static struct saost_softc *saost_sc = NULL; #if defined(CPU_XSCALE_PXA270) && defined(CPU_XSCALE_PXA250) -#error ost needs to dynamically configure the frequency +#include +static uint32_t freq; +#define TIMER_FREQUENCY freq #elif defined(CPU_XSCALE_PXA270) #define TIMER_FREQUENCY 325 /* PXA270 uses 3.25MHz */ #else @@ -223,6 +225,9 @@ stathz = STATHZ; profhz = stathz; +#if defined(CPU_XSCALE_PXA270) && defined(CPU_XSCALE_PXA250) + TIMER_FREQUENCY = (CPU_IS_PXA250) ? 3686400 : 325; +#endif sc->sc_statclock_step = TIMER_FREQUENCY / stathz; aprint_normal("clock: hz=%d stathz=%d\n", hz, stathz); @@ -258,12 +263,17 @@ { static struct timecounter saost_tc = { .tc_get_timecount = saost_tc_get_timecount, - .tc_frequency = TIMER_FREQUENCY, .tc_counter_mask = ~0, .tc_name = "saost_count", +#if !(defined(CPU_XSCALE_PXA270) && defined(CPU_XSCALE_PXA250)) + .tc_frequency = TIMER_FREQUENCY, +#endif .tc_quality = 100, }; +#if defined(CPU_XSCALE_PXA270) && defined(CPU_XSCALE_PXA250) + saost_tc.tc_frequency = TIMER_FREQUENCY, +#endif tc_init(&saost_tc); }
CVS commit: src/sys/ufs/ufs
Module Name:src Committed By: bouyer Date: Sat Aug 1 09:08:53 UTC 2009 Modified Files: src/sys/ufs/ufs: ufs_quota.c Log Message: Add missing mutex_destroy() before pool_cache_put(). Prevents a "Mutex error: lockdebug_alloc: already initialized" panic. To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sys/ufs/ufs/ufs_quota.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/ufs/ufs/ufs_quota.c diff -u src/sys/ufs/ufs/ufs_quota.c:1.62 src/sys/ufs/ufs/ufs_quota.c:1.63 --- src/sys/ufs/ufs/ufs_quota.c:1.62 Thu May 7 19:26:09 2009 +++ src/sys/ufs/ufs/ufs_quota.c Sat Aug 1 09:08:53 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_quota.c,v 1.62 2009/05/07 19:26:09 elad Exp $ */ +/* $NetBSD: ufs_quota.c,v 1.63 2009/08/01 09:08:53 bouyer Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993, 1995 @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ufs_quota.c,v 1.62 2009/05/07 19:26:09 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ufs_quota.c,v 1.63 2009/08/01 09:08:53 bouyer Exp $"); #include #include @@ -889,6 +889,7 @@ KASSERT(dq->dq_cnt > 0); dqref(dq); mutex_exit(&dqlock); + mutex_destroy(&dq->dq_interlock); pool_cache_put(dquot_cache, ndq); *dqp = dq; return 0;
CVS commit: src/sys/arch/pmax/tc
Module Name:src Committed By: tsutsui Date: Sat Aug 1 08:20:36 UTC 2009 Modified Files: src/sys/arch/pmax/tc: asc_ioasic.c Log Message: Micro optimization around ncr53c9x register accesses. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/pmax/tc/asc_ioasic.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/pmax/tc/asc_ioasic.c diff -u src/sys/arch/pmax/tc/asc_ioasic.c:1.20 src/sys/arch/pmax/tc/asc_ioasic.c:1.21 --- src/sys/arch/pmax/tc/asc_ioasic.c:1.20 Mon Apr 28 20:23:31 2008 +++ src/sys/arch/pmax/tc/asc_ioasic.c Sat Aug 1 08:20:36 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: asc_ioasic.c,v 1.20 2008/04/28 20:23:31 martin Exp $ */ +/* $NetBSD: asc_ioasic.c,v 1.21 2009/08/01 08:20:36 tsutsui Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: asc_ioasic.c,v 1.20 2008/04/28 20:23:31 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: asc_ioasic.c,v 1.21 2009/08/01 08:20:36 tsutsui Exp $"); #include #include @@ -70,6 +70,13 @@ #define ASC_MAPLOADED 0x0004 }; +#define ASC_READ_REG(asc, reg) \ + bus_space_read_4((asc)->sc_bst, (asc)->sc_scsi_bsh, \ + (reg) * sizeof(uint32_t)) +#define ASC_WRITE_REG(asc, reg, val) \ + bus_space_write_4((asc)->sc_bst, (asc)->sc_scsi_bsh, \ + (reg) * sizeof(uint32_t), (val)) + static int asc_ioasic_match(device_t, cfdata_t, void *); static void asc_ioasic_attach(device_t, device_t, void *); @@ -333,8 +340,8 @@ if (asc->sc_dmasize == 0) { /* A "Transfer Pad" operation completed */ - tcl = NCR_READ_REG(sc, NCR_TCL); - tcm = NCR_READ_REG(sc, NCR_TCM); + tcl = ASC_READ_REG(asc, NCR_TCL); + tcm = ASC_READ_REG(asc, NCR_TCM); NCR_DMA(("ioasic_intr: discarded %d bytes (tcl=%d, tcm=%d)\n", tcl | (tcm << 8), tcl, tcm)); return 0; @@ -342,13 +349,13 @@ resid = 0; if ((asc->sc_flags & ASC_ISPULLUP) == 0 && - (resid = (NCR_READ_REG(sc, NCR_FFLAG) & NCRFIFO_FF)) != 0) { + (resid = (ASC_READ_REG(asc, NCR_FFLAG) & NCRFIFO_FF)) != 0) { NCR_DMA(("ioasic_intr: empty FIFO of %d ", resid)); DELAY(1); } - resid += (tcl = NCR_READ_REG(sc, NCR_TCL)); - resid += (tcm = NCR_READ_REG(sc, NCR_TCM)) << 8; + resid += (tcl = ASC_READ_REG(asc, NCR_TCL)); + resid += (tcm = ASC_READ_REG(asc, NCR_TCM)) << 8; trans = asc->sc_dmasize - resid; if (trans < 0) { /* transferred < 0 ? */ @@ -416,8 +423,7 @@ struct asc_softc *asc = (struct asc_softc *)sc; uint32_t v; - v = bus_space_read_4(asc->sc_bst, asc->sc_scsi_bsh, - reg * sizeof(uint32_t)); + v = ASC_READ_REG(asc, reg); return v & 0xff; } @@ -427,15 +433,15 @@ { struct asc_softc *asc = (struct asc_softc *)sc; - bus_space_write_4(asc->sc_bst, asc->sc_scsi_bsh, - reg * sizeof(uint32_t), val); + ASC_WRITE_REG(asc, reg, val); } static int asc_dma_isintr(struct ncr53c9x_softc *sc) { + struct asc_softc *asc = (struct asc_softc *)sc; - return (NCR_READ_REG(sc, NCR_STAT) & NCRSTAT_INT) != 0; + return (ASC_READ_REG(asc, NCR_STAT) & NCRSTAT_INT) != 0; } static int