CVS commit: src/sys/arch/zaurus/conf
Module Name:src Committed By: nonaka Date: Sat Nov 28 08:16:00 UTC 2009 Modified Files: src/sys/arch/zaurus/conf: GENERIC Log Message: pxartc(4) must set the device address. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/zaurus/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/zaurus/conf/GENERIC diff -u src/sys/arch/zaurus/conf/GENERIC:1.25 src/sys/arch/zaurus/conf/GENERIC:1.26 --- src/sys/arch/zaurus/conf/GENERIC:1.25 Sun Aug 9 06:12:34 2009 +++ src/sys/arch/zaurus/conf/GENERIC Sat Nov 28 08:16:00 2009 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.25 2009/08/09 06:12:34 kiyohara Exp $ +# $NetBSD: GENERIC,v 1.26 2009/11/28 08:16:00 nonaka Exp $ # # GENERIC machine description file # @@ -171,9 +171,9 @@ # integrated peripherals pxaip0 at mainbus? -pxaintc0 at pxaip? # interrupt controller -pxagpio0 at pxaip? # GPIO -pxartc0 at pxaip? # RTC +pxaintc0 at pxaip? # interrupt controller +pxagpio0 at pxaip? # GPIO +pxartc0 at pxaip? addr 0x4090 # RTC # DMAC support pxadmac0 at pxaip? addr 0x4000 intr 25
CVS commit: src/sys/dev/ic
Module Name:src Committed By: kiyohara Date: Sat Nov 28 08:44:00 UTC 2009 Modified Files: src/sys/dev/ic: lan9118.c lan9118var.h Log Message: Support mii_tick(). Thanks tsu...@. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/lan9118.c cvs rdiff -u -r1.1 -r1.2 src/sys/dev/ic/lan9118var.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/lan9118.c diff -u src/sys/dev/ic/lan9118.c:1.2 src/sys/dev/ic/lan9118.c:1.3 --- src/sys/dev/ic/lan9118.c:1.2 Mon Nov 23 09:41:53 2009 +++ src/sys/dev/ic/lan9118.c Sat Nov 28 08:44:00 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: lan9118.c,v 1.2 2009/11/23 09:41:53 kiyohara Exp $ */ +/* $NetBSD: lan9118.c,v 1.3 2009/11/28 08:44:00 kiyohara Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi * All rights reserved. @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: lan9118.c,v 1.2 2009/11/23 09:41:53 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: lan9118.c,v 1.3 2009/11/28 08:44:00 kiyohara Exp $); /* * The LAN9118 Family @@ -49,6 +49,7 @@ #include rnd.h #include sys/param.h +#include sys/callout.h #include sys/device.h #include sys/errno.h #include sys/bus.h @@ -107,6 +108,8 @@ static void lan9118_rxintr(struct lan9118_softc *); static void lan9118_txintr(struct lan9118_softc *); +static void lan9118_tick(void *); + /* This values refer from Linux's smc911x.c */ static uint32_t afc_cfg[] = { /* 0 */ 0x, @@ -281,6 +284,8 @@ if_attach(ifp); ether_ifattach(ifp, sc-sc_enaddr); + callout_init(sc-sc_tick, 0); + #if NRND 0 rnd_attach_source(sc-rnd_source, device_xname(sc-sc_dev), RND_TYPE_NET, 0); @@ -595,6 +600,8 @@ ifp-if_flags |= IFF_RUNNING; ifp-if_flags = ~IFF_OACTIVE; + callout_reset(sc-sc_tick, hz, lan9118_tick, sc); + splx(s); return 0; @@ -631,6 +638,8 @@ /* Clear RX Status/Data FIFOs */ bus_space_write_4(sc-sc_iot, sc-sc_ioh, LAN9118_RX_CFG, LAN9118_RX_CFG_RX_DUMP); + + callout_stop(sc-sc_tick); } static void @@ -1104,3 +1113,15 @@ */ ifp-if_flags = ~IFF_OACTIVE; } + +void +lan9118_tick(void *v) +{ + struct lan9118_softc *sc = v; + int s; + + s = splnet(); + mii_tick(sc-sc_mii); + callout_schedule(sc-sc_tick, hz); + splx(s); +} Index: src/sys/dev/ic/lan9118var.h diff -u src/sys/dev/ic/lan9118var.h:1.1 src/sys/dev/ic/lan9118var.h:1.2 --- src/sys/dev/ic/lan9118var.h:1.1 Sun Aug 9 06:40:10 2009 +++ src/sys/dev/ic/lan9118var.h Sat Nov 28 08:44:00 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: lan9118var.h,v 1.1 2009/08/09 06:40:10 kiyohara Exp $ */ +/* $NetBSD: lan9118var.h,v 1.2 2009/11/28 08:44:00 kiyohara Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi * All rights reserved. @@ -69,6 +69,7 @@ uint32_t sc_afc_cfg; /* AFC_CFG configuration */ int sc_use_extphy; + struct callout sc_tick; int sc_flags; #define LAN9118_FLAGS_SWAP 0x0001
CVS commit: src/sys/net
Module Name:src Committed By: mbalmer Date: Sat Nov 28 09:20:37 UTC 2009 Modified Files: src/sys/net: if_ethersubr.c Log Message: Fix function name that was changed by mistake in the previous whitespace commit. To generate a diff of this commit: cvs rdiff -u -r1.174 -r1.175 src/sys/net/if_ethersubr.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/net/if_ethersubr.c diff -u src/sys/net/if_ethersubr.c:1.174 src/sys/net/if_ethersubr.c:1.175 --- src/sys/net/if_ethersubr.c:1.174 Sat Nov 28 02:58:21 2009 +++ src/sys/net/if_ethersubr.c Sat Nov 28 09:20:37 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ethersubr.c,v 1.174 2009/11/28 02:58:21 isaki Exp $ */ +/* $NetBSD: if_ethersubr.c,v 1.175 2009/11/28 09:20:37 mbalmer Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_ethersubr.c,v 1.174 2009/11/28 02:58:21 isaki Exp $); +__KERNEL_RCSID(0, $NetBSD: if_ethersubr.c,v 1.175 2009/11/28 09:20:37 mbalmer Exp $); #include opt_inet.h #include opt_atalk.h @@ -904,7 +904,7 @@ break; case ETHERTYPE_AARP: /* probably this should be done with a NETISR as well */ - arpinput(ifp, m); /* XXX */ + aarpinput(ifp, m); /* XXX */ return; #endif /* NETATALK */ default:
CVS commit: src/sys/dev/sdmmc
Module Name:src Committed By: nonaka Date: Sat Nov 28 10:00:24 UTC 2009 Modified Files: src/sys/dev/sdmmc: ld_sdmmc.c sdmmc_mem.c sdmmcvar.h Log Message: Always sector size is treated as 512 bytes. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/sdmmc/ld_sdmmc.c cvs rdiff -u -r1.2 -r1.3 src/sys/dev/sdmmc/sdmmc_mem.c cvs rdiff -u -r1.1 -r1.2 src/sys/dev/sdmmc/sdmmcvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/sdmmc/ld_sdmmc.c diff -u src/sys/dev/sdmmc/ld_sdmmc.c:1.3 src/sys/dev/sdmmc/ld_sdmmc.c:1.4 --- src/sys/dev/sdmmc/ld_sdmmc.c:1.3 Fri May 29 22:27:40 2009 +++ src/sys/dev/sdmmc/ld_sdmmc.c Sat Nov 28 10:00:24 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ld_sdmmc.c,v 1.3 2009/05/29 22:27:40 nonaka Exp $ */ +/* $NetBSD: ld_sdmmc.c,v 1.4 2009/11/28 10:00:24 nonaka Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ld_sdmmc.c,v 1.3 2009/05/29 22:27:40 nonaka Exp $); +__KERNEL_RCSID(0, $NetBSD: ld_sdmmc.c,v 1.4 2009/11/28 10:00:24 nonaka Exp $); #include rnd.h @@ -125,7 +125,7 @@ ld-sc_flags = LDF_ENABLED; ld-sc_secperunit = sc-sc_sf-csd.capacity; - ld-sc_secsize = sc-sc_sf-csd.sector_size; + ld-sc_secsize = SDMMC_SECTOR_SIZE; ld-sc_maxxfer = MAXPHYS; ld-sc_maxqueuecnt = 1; ld-sc_dump = ld_sdmmc_dump; Index: src/sys/dev/sdmmc/sdmmc_mem.c diff -u src/sys/dev/sdmmc/sdmmc_mem.c:1.2 src/sys/dev/sdmmc/sdmmc_mem.c:1.3 --- src/sys/dev/sdmmc/sdmmc_mem.c:1.2 Sun May 24 12:59:54 2009 +++ src/sys/dev/sdmmc/sdmmc_mem.c Sat Nov 28 10:00:24 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: sdmmc_mem.c,v 1.2 2009/05/24 12:59:54 nonaka Exp $ */ +/* $NetBSD: sdmmc_mem.c,v 1.3 2009/11/28 10:00:24 nonaka Exp $ */ /* $OpenBSD: sdmmc_mem.c,v 1.10 2009/01/09 10:55:22 jsg Exp $ */ /* @@ -46,7 +46,7 @@ /* Routines for SD/MMC memory cards. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sdmmc_mem.c,v 1.2 2009/05/24 12:59:54 nonaka Exp $); +__KERNEL_RCSID(0, $NetBSD: sdmmc_mem.c,v 1.3 2009/11/28 10:00:24 nonaka Exp $); #include sys/param.h #include sys/kernel.h @@ -343,11 +343,8 @@ m = MMC_CSD_TRAN_SPEED_MANT(resp); csd-tran_speed = speed_exponent[e] * speed_mantissa[m] / 10; } - csd-sector_size = MIN((1 csd-read_bl_len), - sdmmc_chip_host_maxblklen(sc-sc_sct, sc-sc_sch)); - if (csd-sector_size (1 csd-read_bl_len)) - csd-capacity *= (1 csd-read_bl_len) / csd-sector_size; - csd-sector_size_sb = ffs(csd-sector_size) - 1; + if ((1 csd-read_bl_len) SDMMC_SECTOR_SIZE) + csd-capacity *= (1 csd-read_bl_len) / SDMMC_SECTOR_SIZE; if (sc-sc_busclk csd-tran_speed) sc-sc_busclk = csd-tran_speed; @@ -420,7 +417,6 @@ printf(write_cl_len = %d\n, csd-write_bl_len); printf(r2w_factor = %d\n, csd-r2w_factor); printf(tran_speed = %d\n, csd-tran_speed); - printf(sector_size = %d\n, csd-sector_size); } #endif @@ -526,13 +522,13 @@ memset(cmd, 0, sizeof(cmd)); cmd.c_opcode = MMC_SET_BLOCKLEN; - cmd.c_arg = sf-csd.sector_size; + cmd.c_arg = SDMMC_SECTOR_SIZE; cmd.c_flags = SCF_CMD_AC | SCF_RSP_R1; error = sdmmc_mmc_command(sc, cmd); DPRINTF((%s: sdmmc_mem_set_blocklen: read_bl_len=%d sector_size=%d\n, - SDMMCDEVNAME(sc), 1 sf-csd.read_bl_len, sf-csd.sector_size)); + SDMMCDEVNAME(sc), 1 sf-csd.read_bl_len, SDMMC_SECTOR_SIZE)); return error; } @@ -552,12 +548,12 @@ memset(cmd, 0, sizeof(cmd)); cmd.c_data = data; cmd.c_datalen = datalen; - cmd.c_blklen = sf-csd.sector_size; + cmd.c_blklen = SDMMC_SECTOR_SIZE; cmd.c_opcode = (cmd.c_datalen / cmd.c_blklen) 1 ? MMC_READ_BLOCK_MULTIPLE : MMC_READ_BLOCK_SINGLE; cmd.c_arg = blkno; if (!ISSET(sf-flags, SFF_SDHC)) - cmd.c_arg = sf-csd.sector_size_sb; + cmd.c_arg = SDMMC_SECTOR_SIZE_SB; cmd.c_flags = SCF_CMD_ADTC | SCF_CMD_READ | SCF_RSP_R1; if (ISSET(sc-sc_caps, SMC_CAPS_DMA)) cmd.c_dmamap = sc-sc_dmap; @@ -646,12 +642,12 @@ memset(cmd, 0, sizeof(cmd)); cmd.c_data = data; cmd.c_datalen = datalen; - cmd.c_blklen = sf-csd.sector_size; + cmd.c_blklen = SDMMC_SECTOR_SIZE; cmd.c_opcode = (cmd.c_datalen / cmd.c_blklen) 1 ? MMC_WRITE_BLOCK_MULTIPLE : MMC_WRITE_BLOCK_SINGLE; cmd.c_arg = blkno; if (!ISSET(sf-flags, SFF_SDHC)) - cmd.c_arg = sf-csd.sector_size_sb; + cmd.c_arg = SDMMC_SECTOR_SIZE_SB; cmd.c_flags = SCF_CMD_ADTC | SCF_RSP_R1; if (ISSET(sc-sc_caps, SMC_CAPS_DMA)) cmd.c_dmamap = sc-sc_dmap; Index: src/sys/dev/sdmmc/sdmmcvar.h diff -u src/sys/dev/sdmmc/sdmmcvar.h:1.1 src/sys/dev/sdmmc/sdmmcvar.h:1.2 --- src/sys/dev/sdmmc/sdmmcvar.h:1.1 Tue Apr 21 03:00:31 2009 +++ src/sys/dev/sdmmc/sdmmcvar.h Sat Nov 28 10:00:24 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: sdmmcvar.h,v 1.1 2009/04/21 03:00:31 nonaka Exp $ */ +/* $NetBSD: sdmmcvar.h,v 1.2 2009/11/28 10:00:24 nonaka Exp $ */ /* $OpenBSD: sdmmcvar.h,v 1.13 2009/01/09 10:55:22 jsg Exp $ */ /* @@ -28,12 +28,13 @@
CVS commit: src/sys/kern
Module Name:src Committed By: bouyer Date: Sat Nov 28 10:10:18 UTC 2009 Modified Files: src/sys/kern: vfs_subr.c Log Message: Previous did cause a deadlock with layered FS: the vrele thread can sleep on the vnode lock, while vget is sleeping on the VI_INACTNOW flag (or the vget caller is looping on vget returning failure because of the VI_INACTNOW flag). With layered FSes, the upper and lower vnodes share the same lock, so the vget() caller above can be already holding the vnode lock. Fix by dropping VI_INACTNOW before sleeping on the vnode lock in vrelel(), and check the ref count again once we have the lock. If the vnode has more than one reference, donc VOP_INACTIVE it. Fix PR kern/42318 and PR kern/42377 patch tested by Hisashi T Fujinaka, Joachim König, Stephen Borrill and Matthias Scheler. To generate a diff of this commit: cvs rdiff -u -r1.391 -r1.392 src/sys/kern/vfs_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/vfs_subr.c diff -u src/sys/kern/vfs_subr.c:1.391 src/sys/kern/vfs_subr.c:1.392 --- src/sys/kern/vfs_subr.c:1.391 Fri Nov 27 16:43:51 2009 +++ src/sys/kern/vfs_subr.c Sat Nov 28 10:10:17 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_subr.c,v 1.391 2009/11/27 16:43:51 pooka Exp $ */ +/* $NetBSD: vfs_subr.c,v 1.392 2009/11/28 10:10:17 bouyer Exp $ */ /*- * Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc. @@ -91,7 +91,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vfs_subr.c,v 1.391 2009/11/27 16:43:51 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: vfs_subr.c,v 1.392 2009/11/28 10:10:17 bouyer Exp $); #include opt_ddb.h #include opt_compat_netbsd.h @@ -1429,14 +1429,30 @@ /* The pagedaemon can't wait around; defer. */ defer = true; } else if (curlwp == vrele_lwp) { - /* We have to try harder. */ - vp-v_iflag = ~VI_INACTREDO; + /* + * We have to try harder. But we can't sleep + * with VI_INACTNOW as vget() may be waiting on it. + */ + vp-v_iflag = ~(VI_INACTREDO|VI_INACTNOW); + cv_broadcast(vp-v_cv); error = vn_lock(vp, LK_EXCLUSIVE | LK_INTERLOCK | LK_RETRY); if (error != 0) { /* XXX */ vpanic(vp, vrele: unable to lock %p); } + mutex_enter(vp-v_interlock); + /* + * if we did get another reference while + * sleeping, don't try to inactivate it yet. + */ + if (__predict_false(vtryrele(vp))) { +VOP_UNLOCK(vp, 0); +mutex_exit(vp-v_interlock); +return; + } + vp-v_iflag |= VI_INACTNOW; + mutex_exit(vp-v_interlock); defer = false; } else if ((vp-v_iflag VI_LAYER) != 0) { /*
CVS commit: src/sbin/disklabel
Module Name:src Committed By: tsutsui Date: Sat Nov 28 11:26:36 UTC 2009 Modified Files: src/sbin/disklabel: Makefile Log Message: Make dreamcast, evbsh3, and mmeye use -DUSE_MBR. All of these ports use src/sys/arch/sh3/sh3/disksubr.c which is MBR aware. To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sbin/disklabel/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/disklabel/Makefile diff -u src/sbin/disklabel/Makefile:1.62 src/sbin/disklabel/Makefile:1.63 --- src/sbin/disklabel/Makefile:1.62 Sat Feb 14 13:52:51 2009 +++ src/sbin/disklabel/Makefile Sat Nov 28 11:26:36 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.62 2009/02/14 13:52:51 abs Exp $ +# $NetBSD: Makefile,v 1.63 2009/11/28 11:26:36 tsutsui Exp $ # @(#)Makefile 8.2 (Berkeley) 3/17/94 PROG= disklabel @@ -22,7 +22,9 @@ || ${MACHINE} == arc \ || ${MACHINE} == cats \ || ${MACHINE} == cobalt \ + || ${MACHINE} == dreamcast \ || ${MACHINE} == evbarm \ + || ${MACHINE} == evbsh3 \ || ${MACHINE} == hpcarm \ || ${MACHINE} == hpcmips \ || ${MACHINE} == hpcsh \ @@ -30,6 +32,7 @@ || ${MACHINE} == iyonix \ || ${MACHINE} == landisk \ || ${MACHINE} == macppc \ + || ${MACHINE} == mmeye \ || ${MACHINE} == netwinder \ || ${MACHINE} == playstation2 \ || ${MACHINE} == prep \
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: scw Date: Sat Nov 28 11:44:45 UTC 2009 Modified Files: src/sys/arch/arm/arm32: pmap.c Log Message: Apply some band-aid to pmap_activate() for PR kern/41058: There's a corner case here which can leave turds in the cache as reported in kern/41058. They're probably left over during tear-down and switching away from an exiting process. Until the root cause is identified and fixed, zap the cache when switching pmaps. This will result in a few unnecessary cache flushes, but that's better than silently corrupting data. Also remove an extraneous return statement in pmap_page_protect() which crept in during the matt-armv6 merge. To generate a diff of this commit: cvs rdiff -u -r1.202 -r1.203 src/sys/arch/arm/arm32/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm32/pmap.c diff -u src/sys/arch/arm/arm32/pmap.c:1.202 src/sys/arch/arm/arm32/pmap.c:1.203 --- src/sys/arch/arm/arm32/pmap.c:1.202 Sat Nov 21 20:32:18 2009 +++ src/sys/arch/arm/arm32/pmap.c Sat Nov 28 11:44:45 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.202 2009/11/21 20:32:18 rmind Exp $ */ +/* $NetBSD: pmap.c,v 1.203 2009/11/28 11:44:45 scw Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -211,7 +211,7 @@ #include machine/param.h #include arm/arm32/katelib.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.202 2009/11/21 20:32:18 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.203 2009/11/28 11:44:45 scw Exp $); #ifdef PMAP_DEBUG @@ -3703,7 +3703,6 @@ pg, VM_PAGE_TO_PHYS(pg), prot)); switch(prot) { - return; case VM_PROT_READ|VM_PROT_WRITE: #if defined(PMAP_CHECK_VIPT) defined(PMAP_APX) pmap_clearbit(pg, PVF_EXEC); @@ -4124,6 +4123,15 @@ * entire cache. */ rpm = pmap_recent_user; + +/* + * XXXSCW: There's a corner case here which can leave turds in the cache as + * reported in kern/41058. They're probably left over during tear-down and + * switching away from an exiting process. Until the root cause is identified + * and fixed, zap the cache when switching pmaps. This will result in a few + * unnecessary cache flushes, but that's better than silently corrupting data. + */ +#if 0 if (npm != pmap_kernel() rpm npm != rpm rpm-pm_cstate.cs_cache) { rpm-pm_cstate.cs_cache = 0; @@ -4131,6 +4139,16 @@ cpu_idcache_wbinv_all(); #endif } +#else + if (rpm) { + rpm-pm_cstate.cs_cache = 0; + if (npm == pmap_kernel()) + pmap_recent_user = NULL; +#ifdef PMAP_CACHE_VIVT + cpu_idcache_wbinv_all(); +#endif + } +#endif /* No interrupts while we frob the TTB/DACR */ oldirqstate = disable_interrupts(IF32_bits);
CVS commit: src
Module Name:src Committed By: mbalmer Date: Sat Nov 28 12:10:25 UTC 2009 Modified Files: src/distrib/sets/lists/xserver: md.alpha md.amd64 md.i386 md.macppc md.netwinder md.sgimips md.sparc64 src/external/mit/xorg/server/drivers: Makefile src/share/mk: bsd.own.mk Added Files: src/external/mit/xorg/server/drivers/xf86-input-ws: Makefile Log Message: Link the xf86-input-ws X.Org input driver to the build and add it to the lists that also have the wsmouse driver. xf86-input-ws adds support for touchpanels in X11 that report absolute position data through wscons(4), e.g. the extended ums(4) driver. xf86-input-ws was written by Matthieu Herrb for OpenBSD. Please remember to also update xsrc before the next system build. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/distrib/sets/lists/xserver/md.alpha cvs rdiff -u -r1.54 -r1.55 src/distrib/sets/lists/xserver/md.amd64 cvs rdiff -u -r1.71 -r1.72 src/distrib/sets/lists/xserver/md.i386 cvs rdiff -u -r1.52 -r1.53 src/distrib/sets/lists/xserver/md.macppc cvs rdiff -u -r1.20 -r1.21 src/distrib/sets/lists/xserver/md.netwinder cvs rdiff -u -r1.35 -r1.36 src/distrib/sets/lists/xserver/md.sgimips cvs rdiff -u -r1.40 -r1.41 src/distrib/sets/lists/xserver/md.sparc64 cvs rdiff -u -r1.33 -r1.34 src/external/mit/xorg/server/drivers/Makefile cvs rdiff -u -r0 -r1.1 \ src/external/mit/xorg/server/drivers/xf86-input-ws/Makefile cvs rdiff -u -r1.595 -r1.596 src/share/mk/bsd.own.mk 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/xserver/md.alpha diff -u src/distrib/sets/lists/xserver/md.alpha:1.25 src/distrib/sets/lists/xserver/md.alpha:1.26 --- src/distrib/sets/lists/xserver/md.alpha:1.25 Sun Aug 30 21:27:35 2009 +++ src/distrib/sets/lists/xserver/md.alpha Sat Nov 28 12:10:25 2009 @@ -1,4 +1,4 @@ -# $NetBSD: md.alpha,v 1.25 2009/08/30 21:27:35 mrg Exp $ +# $NetBSD: md.alpha,v 1.26 2009/11/28 12:10:25 mbalmer Exp $ ./usr/X11R6/bin/X -unknown- x11 ./usr/X11R6/bin/XalphaNetBSD-unknown- x11 ./usr/X11R6/bin/XdecNetBSD-unknown- x11 @@ -97,6 +97,8 @@ ./usr/X11R7/lib/modules/drivers/vga_drv.so.4 -unknown- obsolete ./usr/X11R7/lib/modules/drivers/void_drv.so -unknown- xorg ./usr/X11R7/lib/modules/drivers/void_drv.so.1 -unknown- xorg +./usr/X11R7/lib/modules/drivers/ws_drv.so -unknown- xorg +./usr/X11R7/lib/modules/drivers/ws_drv.so.1 -unknown- xorg ./usr/X11R7/lib/modules/drivers/wsfb_drv.so -unknown- xorg ./usr/X11R7/lib/modules/drivers/wsfb_drv.so.0 -unknown- xorg ./usr/X11R7/lib/modules/extensions/libGLcore.a -unknown- obsolete @@ -266,6 +268,7 @@ ./usr/X11R7/man/cat4/tseng.0-unknown- .cat,xorg ./usr/X11R7/man/cat4/vga.0-unknown- .cat,xorg ./usr/X11R7/man/cat4/void.0-unknown- .cat,xorg +./usr/X11R7/man/cat4/ws.0-unknown- .cat,xorg ./usr/X11R7/man/cat4/wsfb.0-unknown- .cat,xorg ./usr/X11R7/man/cat5/xorg.conf.0 -unknown- .cat,xorg ./usr/X11R7/man/html1/Xorg.html-unknown- html,xorg @@ -322,6 +325,7 @@ ./usr/X11R7/man/html4/tseng.html -unknown- html,xorg ./usr/X11R7/man/html4/vga.html-unknown- html,xorg ./usr/X11R7/man/html4/void.html-unknown- html,xorg +./usr/X11R7/man/html4/ws.html-unknown- html,xorg ./usr/X11R7/man/html4/wsfb.html-unknown- html,xorg ./usr/X11R7/man/html5/xorg.conf.html -unknown- html,xorg ./usr/X11R7/man/man1/Xorg.1-unknown- .man,xorg @@ -378,5 +382,6 @@ ./usr/X11R7/man/man4/tseng.4-unknown- .man,xorg ./usr/X11R7/man/man4/vga.4-unknown- .man,xorg ./usr/X11R7/man/man4/void.4-unknown- .man,xorg +./usr/X11R7/man/man4/ws.4-unknown- .man,xorg ./usr/X11R7/man/man4/wsfb.4-unknown- .man,xorg ./usr/X11R7/man/man5/xorg.conf.5 -unknown- .man,xorg Index: src/distrib/sets/lists/xserver/md.amd64 diff -u src/distrib/sets/lists/xserver/md.amd64:1.54 src/distrib/sets/lists/xserver/md.amd64:1.55 --- src/distrib/sets/lists/xserver/md.amd64:1.54 Sun Aug 30 21:27:35 2009 +++ src/distrib/sets/lists/xserver/md.amd64 Sat Nov 28 12:10:25 2009 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.54 2009/08/30 21:27:35 mrg Exp $ +# $NetBSD: md.amd64,v 1.55 2009/11/28 12:10:25 mbalmer Exp $ ./usr/X11R6/bin/X -unknown- x11 ./usr/X11R6/bin/XFree86 -unknown- x11 ./usr/X11R6/bin/gtf -unknown- x11 @@ -476,6 +476,8 @@ ./usr/X11R7/lib/modules/drivers/vmware_drv.so.10 -unknown- xorg ./usr/X11R7/lib/modules/drivers/void_drv.so -unknown- xorg ./usr/X11R7/lib/modules/drivers/void_drv.so.1 -unknown- xorg +./usr/X11R7/lib/modules/drivers/ws_drv.so -unknown- xorg +./usr/X11R7/lib/modules/drivers/ws_drv.so.1 -unknown- xorg ./usr/X11R7/lib/modules/drivers/wsfb_drv.so -unknown- xorg ./usr/X11R7/lib/modules/drivers/wsfb_drv.so.0 -unknown- xorg ./usr/X11R7/lib/modules/extensions/libGLcore.a -unknown- obsolete @@ -631,6 +633,7 @@ ./usr/X11R7/man/cat4/vmmouse.0-unknown- .cat,xorg
CVS commit: src/doc
Module Name:src Committed By: mbalmer Date: Sat Nov 28 12:13:04 UTC 2009 Modified Files: src/doc: CHANGES Log Message: Mention xf86-input-ws To generate a diff of this commit: cvs rdiff -u -r1.1321 -r1.1322 src/doc/CHANGES 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 diff -u src/doc/CHANGES:1.1321 src/doc/CHANGES:1.1322 --- src/doc/CHANGES:1.1321 Fri Nov 27 08:35:05 2009 +++ src/doc/CHANGES Sat Nov 28 12:13:04 2009 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1321 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1322 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -486,3 +486,6 @@ the use of the kernel linker in a rump kernel. [pooka 20091126] ums(4): Added touchpanel support. [mbalmer 20091127] + ws(4): Added the xf86-input-ws input driver for touchpanels that + report absolute position data through wscons(4), e.g. those + support by ums(4). [mbalmer 20091128]
CVS commit: src/sbin/disklabel
Module Name:src Committed By: tsutsui Date: Sat Nov 28 12:14:53 UTC 2009 Modified Files: src/sbin/disklabel: Makefile main.c Log Message: Don't use #ifdef __${MACHINE_ARCH}__ to enable machine dependent features. Instead, use proper macro defined in Makefile per ${MACHINE_ARCH}. __${MACHINE_ARCH}__ doesn't represent an architecture of tool's target but an architecture of binaries being compiled, so required features are not prolery enabled or unintentionally enabled on certain host and target combinations during src/tools build. To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sbin/disklabel/Makefile cvs rdiff -u -r1.20 -r1.21 src/sbin/disklabel/main.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/disklabel/Makefile diff -u src/sbin/disklabel/Makefile:1.63 src/sbin/disklabel/Makefile:1.64 --- src/sbin/disklabel/Makefile:1.63 Sat Nov 28 11:26:36 2009 +++ src/sbin/disklabel/Makefile Sat Nov 28 12:14:53 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.63 2009/11/28 11:26:36 tsutsui Exp $ +# $NetBSD: Makefile,v 1.64 2009/11/28 12:14:53 tsutsui Exp $ # @(#)Makefile 8.2 (Berkeley) 3/17/94 PROG= disklabel @@ -50,4 +50,14 @@ CPPFLAGS+= -DUSE_ACORN .endif +.if (${MACHINE_ARCH} == alpha) +# alpha requires boot block checksum +CPPFLAGS+= -DALPHA_BOOTBLOCK_CKSUM +.endif + +.if (${MACHINE_ARCH} == vax) +# vax requires labels in alternative sectors on SMD disk +CPPFLAGS+= -DVAX_ALTLABELS +.endif + .include bsd.prog.mk Index: src/sbin/disklabel/main.c diff -u src/sbin/disklabel/main.c:1.20 src/sbin/disklabel/main.c:1.21 --- src/sbin/disklabel/main.c:1.20 Mon May 4 18:09:04 2009 +++ src/sbin/disklabel/main.c Sat Nov 28 12:14:53 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.20 2009/05/04 18:09:04 mhitch Exp $ */ +/* $NetBSD: main.c,v 1.21 2009/11/28 12:14:53 tsutsui Exp $ */ /* * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -76,7 +76,7 @@ static char sccsid[] = @(#)disklabel.c 8.4 (Berkeley) 5/4/95; /* from static char sccsid[] = @(#)disklabel.c 1.2 (Symmetric) 11/28/85; */ #else -__RCSID($NetBSD: main.c,v 1.20 2009/05/04 18:09:04 mhitch Exp $); +__RCSID($NetBSD: main.c,v 1.21 2009/11/28 12:14:53 tsutsui Exp $); #endif #endif /* not lint */ @@ -535,7 +535,7 @@ } } -#ifdef __vax__ +#ifdef VAX_ALTLABELS if (lab.d_type == DTYPE_SMD lab.d_flags D_BADSECT lab.d_secsize == 512) { /* Write the label to the odd sectors of the last track! */ @@ -554,7 +554,7 @@ warn(alternate label %d write, i/2); } } -#endif /* __vax__ */ +#endif /* VAX_ALTLABELS */ return 0; } @@ -978,10 +978,10 @@ if (bootarea_len = 0) errx(1, attempting to write after failed read); -#ifdef __alpha__ +#ifdef ALPHA_BOOTBLOCK_CKSUM /* * The Alpha requires that the boot block be checksummed. - * The NetBSD/alpha disklabel.h provides a macro to do it. + * sys/bootblock.h provides a macro to do it. */ if (sector == 0) { struct alpha_boot_block *bb; @@ -990,7 +990,7 @@ bb-bb_cksum = 0; ALPHA_BOOT_BLOCK_CKSUM(bb, bb-bb_cksum); } -#endif /* __alpha__ */ +#endif /* ALPHA_BOOTBLOCK_CKSUM */ wlen = pwrite(f, bootarea, bootarea_len, sector * (off_t)DEV_BSIZE); if (wlen == bootarea_len)
CVS commit: src/sys/dev/ic
Module Name:src Committed By: kiyohara Date: Sat Nov 28 12:16:57 UTC 2009 Modified Files: src/sys/dev/ic: lan9118.c Log Message: Check mbuf size and buffers. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/ic/lan9118.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/lan9118.c diff -u src/sys/dev/ic/lan9118.c:1.3 src/sys/dev/ic/lan9118.c:1.4 --- src/sys/dev/ic/lan9118.c:1.3 Sat Nov 28 08:44:00 2009 +++ src/sys/dev/ic/lan9118.c Sat Nov 28 12:16:57 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: lan9118.c,v 1.3 2009/11/28 08:44:00 kiyohara Exp $ */ +/* $NetBSD: lan9118.c,v 1.4 2009/11/28 12:16:57 kiyohara Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi * All rights reserved. @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: lan9118.c,v 1.3 2009/11/28 08:44:00 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: lan9118.c,v 1.4 2009/11/28 12:16:57 kiyohara Exp $); /* * The LAN9118 Family @@ -360,6 +360,7 @@ unsigned tdfree, totlen, dso; uint32_t txa, txb; uint8_t *p; + int n; DPRINTFN(3, (%s\n, __func__)); @@ -389,6 +390,33 @@ * WE ARE NOW COMMITTED TO TRANSMITTING THE PACKET. */ + /* + * Check mbuf chain -- middle buffers must be = 4 bytes + * and maximum # of buffers is 86. + */ + m = m0; + n = 0; + while (m) { + if (m-m_len 4 || ++n 86) { +/* Copy mbuf chain. */ +MGETHDR(m, M_DONTWAIT, MT_DATA); +if (m == NULL) + goto discard; /* discard packet */ +MCLGET(m, M_DONTWAIT); +if ((m-m_flags M_EXT) == 0) { + m_freem(m); + goto discard; /* discard packet */ +} +m_copydata(m0, 0, m0-m_pkthdr.len, +mtod(m, void *)); +m-m_pkthdr.len = m-m_len = m0-m_pkthdr.len; +m_freem(m0); +m0 = m; +break; + } + m = m-m_next; + } + m = m0; totlen = m-m_pkthdr.len; p = mtod(m, uint8_t *); @@ -404,11 +432,6 @@ LAN9118_TXDFIFOP, txa); bus_space_write_4(sc-sc_iot, sc-sc_ioh, LAN9118_TXDFIFOP, txb); - /* - * : - * We are assuming that the size of mbus always align - * in 4 bytes. - */ bus_space_write_multi_4(sc-sc_iot, sc-sc_ioh, LAN9118_TXDFIFOP, (uint32_t *)(p - dso), (m-m_len + dso + 3) 2); @@ -428,6 +451,8 @@ bus_space_write_multi_4(sc-sc_iot, sc-sc_ioh, LAN9118_TXDFIFOP, (uint32_t *)(p - dso), (m-m_len + dso + 3) 2); + +discard: #if NBPFILTER 0 /* * Pass the packet to any BPF listeners.
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Sat Nov 28 13:53:29 UTC 2009 Modified Files: src/sys/arch/hppa/hppa: pmap.c Log Message: Flush only as much as is required. Pointed out by rmind. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/sys/arch/hppa/hppa/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/pmap.c diff -u src/sys/arch/hppa/hppa/pmap.c:1.59 src/sys/arch/hppa/hppa/pmap.c:1.60 --- src/sys/arch/hppa/hppa/pmap.c:1.59 Fri Nov 27 03:23:09 2009 +++ src/sys/arch/hppa/hppa/pmap.c Sat Nov 28 13:53:28 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.59 2009/11/27 03:23:09 rmind Exp $ */ +/* $NetBSD: pmap.c,v 1.60 2009/11/28 13:53:28 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.59 2009/11/27 03:23:09 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.60 2009/11/28 13:53:28 skrll Exp $); #include sys/param.h #include sys/systm.h @@ -1681,7 +1681,7 @@ /* space is cached for the copy{in,out}'s pleasure */ pcb-pcb_space = space; - fdcache(HPPA_SID_KERNEL, (vaddr_t)pcb, PAGE_SIZE); + fdcache(HPPA_SID_KERNEL, (vaddr_t)pcb, sizeof(struct pcb)); if (p == curproc) mtctl(pmap-pm_pid, CR_PIDR2);
CVS commit: xsrc/external/mit/xf86-input-elographics/dist
Module Name:xsrc Committed By: mbalmer Date: Sat Nov 28 15:14:54 UTC 2009 Update of /cvsroot/xsrc/external/mit/xf86-input-elographics/dist In directory ivanova.netbsd.org:/tmp/cvs-serv1998 Log Message: Initial import of xf86-input-elographics-1.2.3. From X.Org via OpenBSD. Status: Vendor Tag: mbalmer Release Tags: xf86-input-elographics-1-2-3 N xsrc/external/mit/xf86-input-elographics/dist/COPYING N xsrc/external/mit/xf86-input-elographics/dist/ChangeLog N xsrc/external/mit/xf86-input-elographics/dist/Makefile.am N xsrc/external/mit/xf86-input-elographics/dist/Makefile.bsd-wrapper N xsrc/external/mit/xf86-input-elographics/dist/Makefile.in N xsrc/external/mit/xf86-input-elographics/dist/aclocal.m4 N xsrc/external/mit/xf86-input-elographics/dist/config.guess N xsrc/external/mit/xf86-input-elographics/dist/config.h.in N xsrc/external/mit/xf86-input-elographics/dist/config.sub N xsrc/external/mit/xf86-input-elographics/dist/configure N xsrc/external/mit/xf86-input-elographics/dist/configure.ac N xsrc/external/mit/xf86-input-elographics/dist/depcomp N xsrc/external/mit/xf86-input-elographics/dist/install-sh N xsrc/external/mit/xf86-input-elographics/dist/ltmain.sh N xsrc/external/mit/xf86-input-elographics/dist/missing N xsrc/external/mit/xf86-input-elographics/dist/man/Makefile.am N xsrc/external/mit/xf86-input-elographics/dist/man/Makefile.in N xsrc/external/mit/xf86-input-elographics/dist/man/elographics.man N xsrc/external/mit/xf86-input-elographics/dist/src/Makefile.am N xsrc/external/mit/xf86-input-elographics/dist/src/Makefile.in N xsrc/external/mit/xf86-input-elographics/dist/src/xf86Elo.c No conflicts created by this import
CVS commit: xsrc/external/mit/xf86-input-elographics/include
Module Name:xsrc Committed By: mbalmer Date: Sat Nov 28 15:17:38 UTC 2009 Added Files: xsrc/external/mit/xf86-input-elographics/include: config.h Log Message: elographics configuration To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 \ xsrc/external/mit/xf86-input-elographics/include/config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: xsrc/external/mit/xf86-input-elographics/include/config.h diff -u /dev/null xsrc/external/mit/xf86-input-elographics/include/config.h:1.1 --- /dev/null Sat Nov 28 15:17:38 2009 +++ xsrc/external/mit/xf86-input-elographics/include/config.h Sat Nov 28 15:17:38 2009 @@ -0,0 +1,67 @@ +/* config.h. Generated by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +#include xorg-server.h + +/* Define to 1 if you have the dlfcn.h header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the inttypes.h header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the memory.h header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the stdint.h header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the stdlib.h header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the strings.h header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the string.h header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the sys/stat.h header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the sys/types.h header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the unistd.h header file. */ +#define HAVE_UNISTD_H 1 + +/* Name of package */ +#define PACKAGE xf86-input-elographics + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT https://bugs.freedesktop.org/enter_bug.cgi?product=xorg; + +/* Define to the full name of this package. */ +#define PACKAGE_NAME xf86-input-elographics + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING xf86-input-elographics 1.2.3 + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME xf86-input-elographics + +/* Define to the version of this package. */ +#define PACKAGE_VERSION 1.2.3 + +/* Major version of this package */ +#define PACKAGE_VERSION_MAJOR 1 + +/* Minor version of this package */ +#define PACKAGE_VERSION_MINOR 2 + +/* Patch version of this package */ +#define PACKAGE_VERSION_PATCHLEVEL 3 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Version number of package */ +#define VERSION 1.2.3
CVS commit: [netbsd-5] src/sys/arch/i386/stand/lib
Module Name:src Committed By: bouyer Date: Sat Nov 28 15:40:47 UTC 2009 Modified Files: src/sys/arch/i386/stand/lib [netbsd-5]: pcio.c Log Message: Pull up following revision(s) (requested by mbalmer in ticket #1143): sys/arch/i386/stand/lib/pcio.c: revision 1.26 Have the boot countdown on i386 display starting in N seconds. instead of starting in N and eliminate a use of sprintf. Note that on some rare machines it can be that the BIOS does not provide the delay function. On such machines the countdown will almost immediately count down to zero display starting in 0 seconds.; apparently the net4801 is such a machine. Feedback, ideas, and inspiration from tron, ok tron/tonnerre To generate a diff of this commit: cvs rdiff -u -r1.23.8.1 -r1.23.8.2 src/sys/arch/i386/stand/lib/pcio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/stand/lib/pcio.c diff -u src/sys/arch/i386/stand/lib/pcio.c:1.23.8.1 src/sys/arch/i386/stand/lib/pcio.c:1.23.8.2 --- src/sys/arch/i386/stand/lib/pcio.c:1.23.8.1 Sat Sep 26 18:25:46 2009 +++ src/sys/arch/i386/stand/lib/pcio.c Sat Nov 28 15:40:47 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pcio.c,v 1.23.8.1 2009/09/26 18:25:46 snj Exp $ */ +/* $NetBSD: pcio.c,v 1.23.8.2 2009/11/28 15:40:47 bouyer Exp $ */ /* * Copyright (c) 1996, 1997 @@ -331,15 +331,19 @@ for (;;) { if (tell (i % POLL_FREQ) == 0) { - char numbuf[20]; - int len, j; + char numbuf[32]; + int len; - sprintf(numbuf, %d , i/POLL_FREQ); - len = strlen(numbuf); - for (j = 0; j len; j++) -numbuf[len + j] = '\b'; - numbuf[len + j] = '\0'; - printf(numbuf); + len = snprintf(numbuf, sizeof(numbuf), %d seconds. , + i/POLL_FREQ); + if (len 0 len sizeof(numbuf)) { +char *p = numbuf; + +printf(%s, numbuf); +while (*p) + *p++ = '\b'; +printf(%s, numbuf); + } } if (iskey(1)) { /* flush input buffer */ @@ -357,7 +361,7 @@ out: if (tell) - printf(0 \n); + printf(0 seconds. \n); return c; }
CVS commit: [netbsd-5] src/dist/nvi/common
Module Name:src Committed By: bouyer Date: Sat Nov 28 15:42:29 UTC 2009 Modified Files: src/dist/nvi/common [netbsd-5]: exf.c Log Message: Pull up following revision(s) (requested by tnozaki in ticket #1145): dist/nvi/common/exf.c: revision 1.4 fix format string bug, filename may contain % character, don't use it as format string. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2.6.2 -r1.1.1.2.6.3 src/dist/nvi/common/exf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/nvi/common/exf.c diff -u src/dist/nvi/common/exf.c:1.1.1.2.6.2 src/dist/nvi/common/exf.c:1.1.1.2.6.3 --- src/dist/nvi/common/exf.c:1.1.1.2.6.2 Tue Jan 20 02:51:13 2009 +++ src/dist/nvi/common/exf.c Sat Nov 28 15:42:29 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: exf.c,v 1.1.1.2.6.2 2009/01/20 02:51:13 snj Exp $ */ +/* $NetBSD: exf.c,v 1.1.1.2.6.3 2009/11/28 15:42:29 bouyer Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -945,7 +945,7 @@ * Note that this code is harmless if you're using libc 4.6.x. */ if (LF_ISSET(FS_APPEND) lseek(fd, (off_t)0, SEEK_END) 0) { - msgq(sp, M_SYSERR, name); + msgq(sp, M_SYSERR, %s, name); return (1); } #endif @@ -1064,7 +1064,7 @@ *--s = '.'; } } - msgq(sp, M_INFO, s); + msgq(sp, M_INFO, %s, s); if (nf) FREE_SPACE(sp, p, 0); return (0);
CVS commit: [netbsd-5] src/sys/compat
Module Name:src Committed By: bouyer Date: Sat Nov 28 15:45:02 UTC 2009 Modified Files: src/sys/compat/linux/common [netbsd-5]: linux_socket.c linux_sockio.h src/sys/compat/linux32/common [netbsd-5]: linux32_socket.c linux32_sockio.h Log Message: Pull up following revision(s) (requested by joerg in ticket #1147): sys/compat/linux32/common/linux32_socket.c: revision 1.11, 1.12 sys/compat/linux/common/linux_socket.c: revision 1.105, 1.106 sys/compat/linux/common/linux_sockio.h: revision 1.17 sys/compat/linux32/common/linux32_sockio.h: revision 1.3 Provide SIOCGIFNAME. Return the result of copyout. Reminded by Niolas Joly. To generate a diff of this commit: cvs rdiff -u -r1.98.4.1 -r1.98.4.2 src/sys/compat/linux/common/linux_socket.c cvs rdiff -u -r1.16 -r1.16.6.1 src/sys/compat/linux/common/linux_sockio.h cvs rdiff -u -r1.9 -r1.9.4.1 src/sys/compat/linux32/common/linux32_socket.c cvs rdiff -u -r1.2 -r1.2.6.1 src/sys/compat/linux32/common/linux32_sockio.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/compat/linux/common/linux_socket.c diff -u src/sys/compat/linux/common/linux_socket.c:1.98.4.1 src/sys/compat/linux/common/linux_socket.c:1.98.4.2 --- src/sys/compat/linux/common/linux_socket.c:1.98.4.1 Wed Jun 17 20:15:53 2009 +++ src/sys/compat/linux/common/linux_socket.c Sat Nov 28 15:45:02 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_socket.c,v 1.98.4.1 2009/06/17 20:15:53 bouyer Exp $ */ +/* $NetBSD: linux_socket.c,v 1.98.4.2 2009/11/28 15:45:02 bouyer Exp $ */ /*- * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: linux_socket.c,v 1.98.4.1 2009/06/17 20:15:53 bouyer Exp $); +__KERNEL_RCSID(0, $NetBSD: linux_socket.c,v 1.98.4.2 2009/11/28 15:45:02 bouyer Exp $); #if defined(_KERNEL_OPT) #include opt_inet.h @@ -116,6 +116,7 @@ int linux_to_bsd_ip_sockopt(int); int linux_to_bsd_tcp_sockopt(int); int linux_to_bsd_udp_sockopt(int); +int linux_getifname(struct lwp *, register_t *, void *); int linux_getifconf(struct lwp *, register_t *, void *); int linux_getifhwaddr(struct lwp *, register_t *, u_int, void *); static int linux_get_sa(struct lwp *, int, struct mbuf **, @@ -969,6 +970,29 @@ } int +linux_getifname(struct lwp *l, register_t *retval, void *data) +{ + struct ifnet *ifp; + struct linux_ifreq ifr; + int error; + + error = copyin(data, ifr, sizeof(ifr)); + if (error) + return error; + + if (ifr.ifr_ifru.ifru_ifindex = if_indexlim) + return ENODEV; + + ifp = ifindex2ifnet[ifr.ifr_ifru.ifru_ifindex]; + if (ifp == NULL) + return ENODEV; + + strncpy(ifr.ifr_name, ifp-if_xname, sizeof(ifr.ifr_name)); + + return copyout(ifr, data, sizeof(ifr)); +} + +int linux_getifconf(struct lwp *l, register_t *retval, void *data) { struct linux_ifreq ifr, *ifrp; @@ -1189,6 +1213,10 @@ retval[0] = 0; switch (com) { + case LINUX_SIOCGIFNAME: + error = linux_getifname(l, retval, SCARG(uap, data)); + dosys = 0; + break; case LINUX_SIOCGIFCONF: error = linux_getifconf(l, retval, SCARG(uap, data)); dosys = 0; Index: src/sys/compat/linux/common/linux_sockio.h diff -u src/sys/compat/linux/common/linux_sockio.h:1.16 src/sys/compat/linux/common/linux_sockio.h:1.16.6.1 --- src/sys/compat/linux/common/linux_sockio.h:1.16 Thu Jul 3 14:07:09 2008 +++ src/sys/compat/linux/common/linux_sockio.h Sat Nov 28 15:45:02 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_sockio.h,v 1.16 2008/07/03 14:07:09 njoly Exp $ */ +/* $NetBSD: linux_sockio.h,v 1.16.6.1 2009/11/28 15:45:02 bouyer Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -32,6 +32,7 @@ #ifndef _LINUX_SOCKIO_H #define _LINUX_SOCKIO_H +#define LINUX_SIOCGIFNAME _LINUX_IO(0x89, 0x10) #define LINUX_SIOCGIFCONF _LINUX_IO(0x89, 0x12) #define LINUX_SIOCGIFFLAGS _LINUX_IO(0x89, 0x13) #define LINUX_SIOCSIFFLAGS _LINUX_IO(0x89, 0x14) @@ -66,6 +67,7 @@ struct osockaddr ifru_addr; struct osockaddr ifru_hwaddr; struct linux_ifmap ifru_map; + int ifru_ifindex; } ifr_ifru; #define ifr_name ifr_ifrn.ifrn_name /* interface name */ #define ifr_addr ifr_ifru.ifru_addr /* address */ Index: src/sys/compat/linux32/common/linux32_socket.c diff -u src/sys/compat/linux32/common/linux32_socket.c:1.9 src/sys/compat/linux32/common/linux32_socket.c:1.9.4.1 --- src/sys/compat/linux32/common/linux32_socket.c:1.9 Wed Jul 23 12:32:09 2008 +++ src/sys/compat/linux32/common/linux32_socket.c Sat Nov 28 15:45:02 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_socket.c,v 1.9 2008/07/23 12:32:09 njoly Exp $ */ +/* $NetBSD: linux32_socket.c,v 1.9.4.1 2009/11/28 15:45:02 bouyer Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -33,7 +33,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: linux32_socket.c,v 1.9 2008/07/23 12:32:09 njoly
CVS commit: [netbsd-5] src/sys/net
Module Name:src Committed By: bouyer Date: Sat Nov 28 15:47:05 UTC 2009 Modified Files: src/sys/net [netbsd-5]: if.c Log Message: Pull up following revision(s) (requested by joerg in ticket #1148): sys/net/if.c: revision 1.241 Simplify ifreq_setaddr: - Drop the INET6 block. The commands are never given to this function and truncating the sockaddr is arguably not the desired result anyway. - Clear the address before copying. This fixes SIOCGIFNETMASK and possible other ioctls for users that don't check sa_len. This includes COMPAT_43 and Linux emulation. OK dyoung@ To generate a diff of this commit: cvs rdiff -u -r1.230.4.1 -r1.230.4.2 src/sys/net/if.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/net/if.c diff -u src/sys/net/if.c:1.230.4.1 src/sys/net/if.c:1.230.4.2 --- src/sys/net/if.c:1.230.4.1 Tue Feb 24 02:26:42 2009 +++ src/sys/net/if.c Sat Nov 28 15:47:05 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.230.4.1 2009/02/24 02:26:42 snj Exp $ */ +/* $NetBSD: if.c,v 1.230.4.2 2009/11/28 15:47:05 bouyer Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc. @@ -90,7 +90,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if.c,v 1.230.4.1 2009/02/24 02:26:42 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: if.c,v 1.230.4.2 2009/11/28 15:47:05 bouyer Exp $); #include opt_inet.h @@ -1816,20 +1816,14 @@ { uint8_t len; u_long ncmd; - const uint8_t osockspace = sizeof(ifr-ifr_addr); - const uint8_t sockspace = sizeof(ifr-ifr_ifru.ifru_space); -#ifdef INET6 - if (cmd == SIOCGIFPSRCADDR_IN6 || cmd == SIOCGIFPDSTADDR_IN6) - len = MIN(sizeof(struct sockaddr_in6), sa-sa_len); - else -#endif /* INET6 */ if ((ncmd = compat_cvtcmd(cmd)) != cmd) - len = MIN(osockspace, sa-sa_len); + len = sizeof(ifr-ifr_addr); else - len = MIN(sockspace, sa-sa_len); + len = sizeof(ifr-ifr_ifru.ifru_space); if (len sa-sa_len) return EFBIG; + memset(ifr-ifr_addr, 0, len); sockaddr_copy(ifr-ifr_addr, len, sa); return 0; }
CVS commit: [netbsd-5] src
Module Name:src Committed By: bouyer Date: Sat Nov 28 15:55:14 UTC 2009 Modified Files: src/share/man/man4/man4.sparc64 [netbsd-5]: lom.4 src/sys/arch/sparc64/dev [netbsd-5]: lom.c Log Message: Pull up following revision(s) (requested by nakayama in ticket #1151): share/man/man4/man4.sparc64/lom.4: revision 1.3 sys/arch/sparc64/dev/lom.c: revision 1.2, 1.3 Merge changes between revision 1.16 and 1.19 of OpenBSD with shutdownhook_establish(9) to pmf(9) conversion: - LOMlite seems to get wedged from time to time; add some code to unwedge it. - Make sure we don't insert and entry into the list of pending commends twice. - Establish a shutdown hook to disable the watchdog timer to prevent watchdog triggers after the kernel has been halted. - Handle LOMlite2 in an interrupt-driven way; avoids using delay(9) once the machine is up and running. Add support for monitoring Fault LED and Alarms status. To generate a diff of this commit: cvs rdiff -u -r1.2.2.2 -r1.2.2.3 src/share/man/man4/man4.sparc64/lom.4 cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/arch/sparc64/dev/lom.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/man4.sparc64/lom.4 diff -u src/share/man/man4/man4.sparc64/lom.4:1.2.2.2 src/share/man/man4/man4.sparc64/lom.4:1.2.2.3 --- src/share/man/man4/man4.sparc64/lom.4:1.2.2.2 Fri Oct 16 11:56:10 2009 +++ src/share/man/man4/man4.sparc64/lom.4 Sat Nov 28 15:55:14 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: lom.4,v 1.2.2.2 2009/10/16 11:56:10 sborrill Exp $ +.\ $NetBSD: lom.4,v 1.2.2.3 2009/11/28 15:55:14 bouyer Exp $ .\ $OpenBSD: lom.4,v 1.4 2009/09/23 22:08:07 kettenis Exp $ .\ .\ Copyright (c) 2009 Mark Kettenis kette...@openbsd.org @@ -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 October 2, 2009 +.Dd November 28, 2009 .Dt LOM 4 sparc64 .Os .Sh NAME @@ -29,8 +29,8 @@ driver provides support for the LOMlite lights out management module found on Sun Netra t1 systems and the LOMlite2 module found on Sun Fire V100/V120 and Sun Netra T1/X1 systems. -Temperature readings, PSU status and fan status provided by the LOM -are made available through the +Fault LED and alarms status, temperature readings, PSU status and +fan status provided by the LOM are made available through the .Xr envstat 8 interface. The integrated watchdog timer can be configured through the Index: src/sys/arch/sparc64/dev/lom.c diff -u src/sys/arch/sparc64/dev/lom.c:1.1.2.2 src/sys/arch/sparc64/dev/lom.c:1.1.2.3 --- src/sys/arch/sparc64/dev/lom.c:1.1.2.2 Fri Oct 16 11:56:11 2009 +++ src/sys/arch/sparc64/dev/lom.c Sat Nov 28 15:55:14 2009 @@ -1,5 +1,5 @@ -/* $NetBSD: lom.c,v 1.1.2.2 2009/10/16 11:56:11 sborrill Exp $ */ -/* $OpenBSD: lom.c,v 1.15 2009/09/27 18:08:42 kettenis Exp $ */ +/* $NetBSD: lom.c,v 1.1.2.3 2009/11/28 15:55:14 bouyer Exp $ */ +/* $OpenBSD: lom.c,v 1.19 2009/11/10 22:26:48 kettenis Exp $ */ /* * Copyright (c) 2009 Mark Kettenis * @@ -17,7 +17,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: lom.c,v 1.1.2.2 2009/10/16 11:56:11 sborrill Exp $); +__KERNEL_RCSID(0, $NetBSD: lom.c,v 1.1.2.3 2009/11/28 15:55:14 bouyer Exp $); #include sys/param.h #include sys/device.h @@ -83,6 +83,10 @@ #define LOM_IDX_LED1 0x25 #define LOM_IDX_ALARM 0x30 +#define LOM_ALARM_1 0x01 +#define LOM_ALARM_2 0x02 +#define LOM_ALARM_3 0x04 +#define LOM_ALARM_FAULT 0xf0 #define LOM_IDX_WDOG_CTL 0x31 #define LOM_WDOG_ENABLE 0x01 #define LOM_WDOG_RESET 0x02 @@ -131,6 +135,7 @@ #define LOM_IDX5_FAN_NAME_START 0x40 #define LOM_IDX5_FAN_NAME_END 0xff +#define LOM_MAX_ALARM 4 #define LOM_MAX_FAN 4 #define LOM_MAX_PSU 3 #define LOM_MAX_TEMP 8 @@ -153,10 +158,12 @@ int sc_space; struct sysmon_envsys *sc_sme; + envsys_data_t sc_alarm[LOM_MAX_ALARM]; envsys_data_t sc_fan[LOM_MAX_FAN]; envsys_data_t sc_psu[LOM_MAX_PSU]; envsys_data_t sc_temp[LOM_MAX_TEMP]; + int sc_num_alarm; int sc_num_fan; int sc_num_psu; int sc_num_temp; @@ -190,17 +197,20 @@ static int lom_read(struct lom_softc *, uint8_t, uint8_t *); static int lom_write(struct lom_softc *, uint8_t, uint8_t); static void lom_queue_cmd(struct lom_softc *, struct lom_cmd *); +static void lom_dequeue_cmd(struct lom_softc *, struct lom_cmd *); static int lom1_read(struct lom_softc *, uint8_t, uint8_t *); static int lom1_write(struct lom_softc *, uint8_t, uint8_t); static int lom1_read_polled(struct lom_softc *, uint8_t, uint8_t *); static int lom1_write_polled(struct lom_softc *, uint8_t, uint8_t); static void lom1_queue_cmd(struct lom_softc *, struct lom_cmd *); -static void lom1_dequeue_cmd(struct lom_softc *, struct lom_cmd *); static void lom1_process_queue(void *); static void lom1_process_queue_locked(struct lom_softc *);
CVS commit: [netbsd-5] src/sys/fs/puffs
Module Name:src Committed By: bouyer Date: Sat Nov 28 15:56:08 UTC 2009 Modified Files: src/sys/fs/puffs [netbsd-5]: puffs_vnops.c Log Message: Pull up following revision(s) (requested by pooka in ticket #1153): sys/fs/puffs/puffs_vnops.c: revision 1.139 Send VOP_ABORTOP() as a FAF -- we don't care about the return value. To generate a diff of this commit: cvs rdiff -u -r1.129.4.3 -r1.129.4.4 src/sys/fs/puffs/puffs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/fs/puffs/puffs_vnops.c diff -u src/sys/fs/puffs/puffs_vnops.c:1.129.4.3 src/sys/fs/puffs/puffs_vnops.c:1.129.4.4 --- src/sys/fs/puffs/puffs_vnops.c:1.129.4.3 Sun Oct 18 12:46:07 2009 +++ src/sys/fs/puffs/puffs_vnops.c Sat Nov 28 15:56:08 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_vnops.c,v 1.129.4.3 2009/10/18 12:46:07 sborrill Exp $ */ +/* $NetBSD: puffs_vnops.c,v 1.129.4.4 2009/11/28 15:56:08 bouyer Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.129.4.3 2009/10/18 12:46:07 sborrill Exp $); +__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.129.4.4 2009/11/28 15:56:08 bouyer Exp $); #include sys/param.h #include sys/fstrans.h @@ -2126,16 +2126,16 @@ struct vnode *dvp = ap-a_dvp; struct puffs_mount *pmp = MPTOPUFFSMP(dvp-v_mount); struct componentname *cnp = ap-a_cnp; - int error; if (EXISTSOP(pmp, ABORTOP)) { PUFFS_MSG_ALLOC(vn, abortop); puffs_makecn(abortop_msg-pvnr_cn, abortop_msg-pvnr_cn_cred, cnp, PUFFS_USE_FULLPNBUF(pmp)); + puffs_msg_setfaf(park_abortop); puffs_msg_setinfo(park_abortop, PUFFSOP_VN, PUFFS_VN_ABORTOP, VPTOPNC(dvp)); - PUFFS_MSG_ENQUEUEWAIT(pmp, park_abortop, error); + puffs_msg_enqueue(pmp, park_abortop); PUFFS_MSG_RELEASE(abortop); }
CVS commit: [netbsd-5] src/sys/fs/puffs
Module Name:src Committed By: bouyer Date: Sat Nov 28 16:00:17 UTC 2009 Modified Files: src/sys/fs/puffs [netbsd-5]: puffs_vnops.c Log Message: Pull up following revision(s) (requested by pooka in ticket #1154): sys/fs/puffs/puffs_vnops.c: revision 1.140 Send VOP_ABORTOP() in case attempting cross-dev rename, part of PR kern/42210. Also, fix a memory management error in said case. To generate a diff of this commit: cvs rdiff -u -r1.129.4.4 -r1.129.4.5 src/sys/fs/puffs/puffs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/fs/puffs/puffs_vnops.c diff -u src/sys/fs/puffs/puffs_vnops.c:1.129.4.4 src/sys/fs/puffs/puffs_vnops.c:1.129.4.5 --- src/sys/fs/puffs/puffs_vnops.c:1.129.4.4 Sat Nov 28 15:56:08 2009 +++ src/sys/fs/puffs/puffs_vnops.c Sat Nov 28 16:00:16 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_vnops.c,v 1.129.4.4 2009/11/28 15:56:08 bouyer Exp $ */ +/* $NetBSD: puffs_vnops.c,v 1.129.4.5 2009/11/28 16:00:16 bouyer Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.129.4.4 2009/11/28 15:56:08 bouyer Exp $); +__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.129.4.5 2009/11/28 16:00:16 bouyer Exp $); #include sys/param.h #include sys/fstrans.h @@ -1711,19 +1711,23 @@ struct componentname *a_tcnp; } */ *ap = v; PUFFS_MSG_VARS(vn, rename); - struct vnode *fdvp = ap-a_fdvp; + struct vnode *fdvp = ap-a_fdvp, *fvp = ap-a_fvp; + struct vnode *tdvp = ap-a_tdvp, *tvp = ap-a_tvp; struct puffs_node *fpn = ap-a_fvp-v_data; struct puffs_mount *pmp = MPTOPUFFSMP(fdvp-v_mount); int error; + bool doabort = true; - if (ap-a_fvp-v_mount != ap-a_tdvp-v_mount) + if ((fvp-v_mount != tdvp-v_mount) || + (tvp (fvp-v_mount != tvp-v_mount))) { ERROUT(EXDEV); + } PUFFS_MSG_ALLOC(vn, rename); - rename_msg-pvnr_cookie_src = VPTOPNC(ap-a_fvp); - rename_msg-pvnr_cookie_targdir = VPTOPNC(ap-a_tdvp); - if (ap-a_tvp) - rename_msg-pvnr_cookie_targ = VPTOPNC(ap-a_tvp); + rename_msg-pvnr_cookie_src = VPTOPNC(fvp); + rename_msg-pvnr_cookie_targdir = VPTOPNC(tdvp); + if (tvp) + rename_msg-pvnr_cookie_targ = VPTOPNC(tvp); else rename_msg-pvnr_cookie_targ = NULL; puffs_makecn(rename_msg-pvnr_cn_src, rename_msg-pvnr_cn_src_cred, @@ -1734,6 +1738,8 @@ PUFFS_VN_RENAME, VPTOPNC(fdvp)); PUFFS_MSG_ENQUEUEWAIT2(pmp, park_rename, fdvp-v_data, NULL, error); + doabort = false; + PUFFS_MSG_RELEASE(rename); error = checkerr(pmp, error, __func__); /* @@ -1744,16 +1750,19 @@ puffs_updatenode(fpn, PUFFS_UPDATECTIME, 0); out: - PUFFS_MSG_RELEASE(rename); - if (ap-a_tvp != NULL) - vput(ap-a_tvp); - if (ap-a_tdvp == ap-a_tvp) - vrele(ap-a_tdvp); + if (doabort) + VOP_ABORTOP(tdvp, ap-a_tcnp); + if (tvp != NULL) + vput(tvp); + if (tdvp == tvp) + vrele(tdvp); else - vput(ap-a_tdvp); + vput(tdvp); - vrele(ap-a_fdvp); - vrele(ap-a_fvp); + if (doabort) + VOP_ABORTOP(fdvp, ap-a_fcnp); + vrele(fdvp); + vrele(fvp); return error; }
CVS commit: [netbsd-5] src/lib/libpuffs
Module Name:src Committed By: bouyer Date: Sat Nov 28 16:01:03 UTC 2009 Modified Files: src/lib/libpuffs [netbsd-5]: creds.c Log Message: Pull up following revision(s) (requested by pooka in ticket #1155): lib/libpuffs/creds.c: revision 1.15 In getgroups(), copy only up to the number of supplementary groups that actually exist. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.14.12.1 src/lib/libpuffs/creds.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libpuffs/creds.c diff -u src/lib/libpuffs/creds.c:1.14 src/lib/libpuffs/creds.c:1.14.12.1 --- src/lib/libpuffs/creds.c:1.14 Sat Dec 8 19:57:02 2007 +++ src/lib/libpuffs/creds.c Sat Nov 28 16:01:03 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: creds.c,v 1.14 2007/12/08 19:57:02 pooka Exp $ */ +/* $NetBSD: creds.c,v 1.14.12.1 2009/11/28 16:01:03 bouyer Exp $ */ /* * Copyright (c) 2006 Antti Kantee. All Rights Reserved. @@ -29,7 +29,7 @@ #include sys/cdefs.h #if !defined(lint) -__RCSID($NetBSD: creds.c,v 1.14 2007/12/08 19:57:02 pooka Exp $); +__RCSID($NetBSD: creds.c,v 1.14.12.1 2009/11/28 16:01:03 bouyer Exp $); #endif /* !lint */ /* @@ -85,10 +85,11 @@ if (!UUCCRED(pkcr)) { errno = EOPNOTSUPP; + *ngids = 0; return -1; } - ncopy = MIN(*ngids, NGROUPS); + ncopy = MIN(*ngids, pkcr-pkcr_uuc.cr_ngroups); (void)memcpy(rgids, pkcr-pkcr_uuc.cr_groups, sizeof(gid_t) * ncopy); *ngids = (short)ncopy;
CVS commit: [netbsd-5] src/sbin/savecore
Module Name:src Committed By: bouyer Date: Sat Nov 28 16:02:17 UTC 2009 Modified Files: src/sbin/savecore [netbsd-5]: savecore.c Log Message: Pull up following revision(s) (requested by dogcow in ticket #1157): sbin/savecore/savecore.c: revision 1.81 Instead of exiting with an obscure error message if -N /kernelname isn't specified, blithely assume the kernel will consume around 20 megs. To generate a diff of this commit: cvs rdiff -u -r1.76.2.1 -r1.76.2.2 src/sbin/savecore/savecore.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/savecore/savecore.c diff -u src/sbin/savecore/savecore.c:1.76.2.1 src/sbin/savecore/savecore.c:1.76.2.2 --- src/sbin/savecore/savecore.c:1.76.2.1 Tue Mar 24 20:46:43 2009 +++ src/sbin/savecore/savecore.c Sat Nov 28 16:02:17 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: savecore.c,v 1.76.2.1 2009/03/24 20:46:43 snj Exp $ */ +/* $NetBSD: savecore.c,v 1.76.2.2 2009/11/28 16:02:17 bouyer Exp $ */ /*- * Copyright (c) 1986, 1992, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)savecore.c 8.5 (Berkeley) 4/28/95; #else -__RCSID($NetBSD: savecore.c,v 1.76.2.1 2009/03/24 20:46:43 snj Exp $); +__RCSID($NetBSD: savecore.c,v 1.76.2.2 2009/11/28 16:02:17 bouyer Exp $); #endif #endif /* not lint */ @@ -910,11 +910,9 @@ struct statvfs fsbuf; char mbuf[100], path[MAXPATHLEN]; - if (stat(kernel, st) 0) { - syslog(LOG_ERR, %s: %m, kernel); - exit(1); - } - kernelsize = st.st_blocks * S_BLKSIZE; + /* XXX assume a reasonable default, unless we find a kernel. */ + kernelsize = 20 * 1024 * 1024; + if (!stat(kernel, st)) kernelsize = st.st_blocks * S_BLKSIZE; if (statvfs(dirname, fsbuf) 0) { syslog(LOG_ERR, %s: %m, dirname); exit(1);
CVS commit: [netbsd-5] src/dist/nvi/ex
Module Name:src Committed By: bouyer Date: Sat Nov 28 16:03:26 UTC 2009 Modified Files: src/dist/nvi/ex [netbsd-5]: ex_cscope.c ex_tag.c Log Message: Pull up following revision(s) (requested by tnozaki in ticket #1159): dist/nvi/ex/ex_cscope.c: revision 1.5 dist/nvi/ex/ex_tag.c: revision 1.7 don't use pathname directly as msgq()'s first argument of format string. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2.6.2 -r1.1.1.2.6.3 src/dist/nvi/ex/ex_cscope.c cvs rdiff -u -r1.3.2.2 -r1.3.2.3 src/dist/nvi/ex/ex_tag.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/nvi/ex/ex_cscope.c diff -u src/dist/nvi/ex/ex_cscope.c:1.1.1.2.6.2 src/dist/nvi/ex/ex_cscope.c:1.1.1.2.6.3 --- src/dist/nvi/ex/ex_cscope.c:1.1.1.2.6.2 Tue Jan 20 02:47:43 2009 +++ src/dist/nvi/ex/ex_cscope.c Sat Nov 28 16:03:26 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ex_cscope.c,v 1.1.1.2.6.2 2009/01/20 02:47:43 snj Exp $ */ +/* $NetBSD: ex_cscope.c,v 1.1.1.2.6.3 2009/11/28 16:03:26 bouyer Exp $ */ /*- * Copyright (c) 1994, 1996 @@ -242,14 +242,14 @@ * name regardless so that we can use it as a base for searches. */ if (stat(np, sb)) { - msgq(sp, M_SYSERR, np); + msgq(sp, M_SYSERR, %s, np); return (1); } if (S_ISDIR(sb.st_mode)) { (void)snprintf(path, sizeof(path), %s/%s, np, CSCOPE_DBFILE); if (stat(path, sb)) { - msgq(sp, M_SYSERR, path); + msgq(sp, M_SYSERR, %s, path); return (1); } dbname = CSCOPE_DBFILE; Index: src/dist/nvi/ex/ex_tag.c diff -u src/dist/nvi/ex/ex_tag.c:1.3.2.2 src/dist/nvi/ex/ex_tag.c:1.3.2.3 --- src/dist/nvi/ex/ex_tag.c:1.3.2.2 Tue Jan 20 02:47:43 2009 +++ src/dist/nvi/ex/ex_tag.c Sat Nov 28 16:03:26 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ex_tag.c,v 1.3.2.2 2009/01/20 02:47:43 snj Exp $ */ +/* $NetBSD: ex_tag.c,v 1.3.2.3 2009/11/28 16:03:26 bouyer Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -244,7 +244,7 @@ if (tqp-current-msg) { INT2CHAR(sp, tqp-current-msg, tqp-current-mlen + 1, np, nlen); - msgq(sp, M_INFO, np); + msgq(sp, M_INFO, %s, np); } return (0); } @@ -820,7 +820,7 @@ if (tqp-current-msg) { INT2CHAR(sp, tqp-current-msg, tqp-current-mlen + 1, np, nlen); - msgq(sp, M_INFO, np); + msgq(sp, M_INFO, %s, np); } /*
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: bouyer Date: Sat Nov 28 16:04:18 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Tickets 1143 1145 1147 1148 1151 1153 1154 1155 1157 1159 To generate a diff of this commit: cvs rdiff -u -r1.1.2.146 -r1.1.2.147 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.146 src/doc/CHANGES-5.1:1.1.2.147 --- src/doc/CHANGES-5.1:1.1.2.146 Fri Nov 27 09:50:03 2009 +++ src/doc/CHANGES-5.1 Sat Nov 28 16:04:18 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.146 2009/11/27 09:50:03 sborrill Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.147 2009/11/28 16:04:18 bouyer Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -14895,3 +14895,80 @@ for now. [mbalmer, ticket #1164] +sys/arch/i386/stand/lib/pcio.c 1.26 + + Have the boot countdown on i386 display starting in N seconds. + instead of starting in N and eliminate a use of sprintf. + [mbalmer, ticket #1143] + +dist/nvi/common/exf.c1.4 + + fix format string bug, filename may contain % character, don't use it + as format string. + [tnozaki, ticket #1145] + +sys/compat/linux/common/linux_socket.c 1.105, 1.106 +sys/compat/linux/common/linux_sockio.h 1.17 +sys/compat/linux32/common/linux32_socket.c 1.11, 1.12 +sys/compat/linux32/common/linux32_sockio.h 1.3 + + Provide SIOCGIFNAME. + [joerg, ticket #1147] + +sys/net/if.c 1.241 + + Simplify ifreq_setaddr: + - Drop the INET6 block. The commands are never given to this function + and truncating the sockaddr is arguably not the desired result anyway. + - Clear the address before copying. This fixes SIOCGIFNETMASK and + possible other ioctls for users that don't check sa_len. This + includes COMPAT_43 and Linux emulation. + + [joerg, ticket #1148] + +share/man/man4/man4.sparc64/lom.4 1.3 +sys/arch/sparc64/dev/lom.c 1.2, 1.3 + + Merge changes between revision 1.16 and 1.19 of OpenBSD with + shutdownhook_establish(9) to pmf(9) conversion: + - LOMlite seems to get wedged from time to time; add some code to + unwedge it. + - Make sure we don't insert and entry into the list of pending + commends twice. + - Establish a shutdown hook to disable the watchdog timer to prevent + watchdog triggers after the kernel has been halted. + - Handle LOMlite2 in an interrupt-driven way; avoids using delay(9) + once the machine is up and running. + + Add support for monitoring Fault LED and Alarms status. + [nakayama, ticket #1151] + +sys/fs/puffs/puffs_vnops.c 1.139 + + Send VOP_ABORTOP() as a FAF -- we don't care about the return value. + [pooka, ticket #1153] + +sys/fs/puffs/puffs_vnops.c 1.140 + + Send VOP_ABORTOP() in case attempting cross-dev rename, part of + PR kern/42210. Also, fix a memory management error in said case. + [pooka, ticket #1154] + +lib/libpuffs/creds.c1.15 + + In getgroups(), copy only up to the number of supplementary groups + that actually exist. + [pooka, ticket #1155] + +sbin/savecore/savecore.c 1.81 + + Instead of exiting with an obscure error message if -N /kernelname isn't + specified, blithely assume the kernel will consume around 20 megs. + [dogcow, ticket #1157] + +dist/nvi/ex/ex_cscope.c1.5 +dist/nvi/ex/ex_tag.c1.7 + + don't use pathname directly as msgq()'s first argument of format string. + [tnozaki, ticket #1159] +
CVS commit: src/sbin/fdisk
Module Name:src Committed By: tsutsui Date: Sat Nov 28 16:45:20 UTC 2009 Modified Files: src/sbin/fdisk: fdisk.8 Log Message: Clarify description of -f and -u options. (-u means updating partition data, not interactive mode) To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sbin/fdisk/fdisk.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fdisk/fdisk.8 diff -u src/sbin/fdisk/fdisk.8:1.63 src/sbin/fdisk/fdisk.8:1.64 --- src/sbin/fdisk/fdisk.8:1.63 Wed Oct 14 22:00:55 2009 +++ src/sbin/fdisk/fdisk.8 Sat Nov 28 16:45:20 2009 @@ -1,6 +1,6 @@ -.\ $NetBSD: fdisk.8,v 1.63 2009/10/14 22:00:55 joerg Exp $ +.\ $NetBSD: fdisk.8,v 1.64 2009/11/28 16:45:20 tsutsui Exp $ .\ -.Dd August 10, 2009 +.Dd November 28, 2009 .Dt FDISK 8 .Os .Sh NAME @@ -155,13 +155,13 @@ .Pp .Bl -tag -width Ds .It Fl 0 -Update partition slot 0. +Specify partition slot 0 to be printed or updated. .It Fl 1 -Update partition slot 1. +Specify partition slot 1 to be printed or updated. .It Fl 2 -Update partition slot 2. +Specify partition slot 2 to be printed or updated. .It Fl 3 -Update partition slot 3. +Specify partition slot 3 to be printed or updated. .It Fl a Change the active partition. In interactive mode this question will be asked after the partitions @@ -200,10 +200,11 @@ on an i386 machine, and leave the bootcode empty for other machines. .It Fl E Ar number -Update extended partition -.Ar number . -If the specified extended partition doesn't exist an additional extended -partition will be created. +Specify extended partition +.Ar number +to be printed or updated. +If the specified extended partition doesn't exist on updating partition data +an additional extended partition will be created. .It Fl f Run .Nm @@ -224,16 +225,9 @@ .Ar head , and .Ar sector -fields. +fields +.Pq only Ar start No and Ar size No can be specified by Fl s No option . They will be automatically computed using the BIOS geometry. -.Pp -If -.Fl u -and -.Fl s -are specified then the details of the specified partition will be changed. -Any other partitions which overlap the requested part of the disk will be -silently deleted. .It Fl F Indicate that .Ar device @@ -274,14 +268,7 @@ and optionally .Ar bootmenu . This flag requires the use of a partition selection flag -.Po -.Fl 0 , -.Fl 1 , -.Fl 2 , -.Fl 3 , -or -.Fl E Ar number -.Pc +.Pq Fl 0 , 1 , 2 , 3 , No or Fl E Ar number . .It Fl S When used with no other flags print a series of .Pa /bin/sh @@ -300,7 +287,15 @@ instead of the disklabel on .Ar device . .It Fl u -Display the partitions and interactively ask which one you want to edit. +Update partition data, including +.Em id , start , No and Em size . +Unless +.Fl f +option +.Pq non-interactive mode +is specified, +.Nm +will display the partitions and interactively ask which one you want to edit. .Nm will step through each field showing the old value and asking for a new one. The @@ -316,8 +311,25 @@ .Em $ in which case the partition will extend to the end of the available free space. .Pp +In a non-interactive mode +.Pq specified by Fl f No option , +partition data should be specified by +.Fl s +option. +A partition selection option +.Pq Fl 0 , 1 , 2 , 3 , No or Fl E Ar number +should also be specified to select a partition slot to be updated. +.Pp .Nm will not allow you to create partitions which overlap. +If +.Fl u +and +.Fl s +are specified in a non-interactive mode +then the details of the specified partition will be changed. +Any other partitions which overlap the requested part of the disk will be +silently deleted. .Pp If .Em bootmenu
CVS commit: src
Module Name:src Committed By: mbalmer Date: Sat Nov 28 16:48:25 UTC 2009 Modified Files: src/distrib/sets/lists/xserver: md.i386 src/external/mit/xorg/server/drivers: Makefile src/share/mk: bsd.own.mk Log Message: Add the xf86-input-elographics driver to i386 builds. To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 src/distrib/sets/lists/xserver/md.i386 cvs rdiff -u -r1.34 -r1.35 src/external/mit/xorg/server/drivers/Makefile cvs rdiff -u -r1.596 -r1.597 src/share/mk/bsd.own.mk 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/xserver/md.i386 diff -u src/distrib/sets/lists/xserver/md.i386:1.72 src/distrib/sets/lists/xserver/md.i386:1.73 --- src/distrib/sets/lists/xserver/md.i386:1.72 Sat Nov 28 12:10:25 2009 +++ src/distrib/sets/lists/xserver/md.i386 Sat Nov 28 16:48:25 2009 @@ -1,4 +1,4 @@ -# $NetBSD: md.i386,v 1.72 2009/11/28 12:10:25 mbalmer Exp $ +# $NetBSD: md.i386,v 1.73 2009/11/28 16:48:25 mbalmer Exp $ ./usr/X11R6/bin/X -unknown- x11 ./usr/X11R6/bin/XFree86 -unknown- x11 ./usr/X11R6/bin/gtf -unknown- x11 @@ -481,6 +481,8 @@ ./usr/X11R7/lib/modules/drivers/cirrus_laguna_drv.so.1 -obsolete- obsolete ./usr/X11R7/lib/modules/drivers/cyrix_drv.so -unknown- obsolete ./usr/X11R7/lib/modules/drivers/cyrix_drv.so.1 -unknown- obsolete +./usr/X11R7/lib/modules/drivers/elographics_drv.so -unknown- xorg +./usr/X11R7/lib/modules/drivers/elographics_drv.so.1 -unknown- xorg ./usr/X11R7/lib/modules/drivers/glint_drv.so -unknown- xorg ./usr/X11R7/lib/modules/drivers/glint_drv.so.1 -unknown- xorg ./usr/X11R7/lib/modules/drivers/i128_drv.so -unknown- xorg @@ -702,6 +704,7 @@ ./usr/X11R7/man/cat4/chips.0-unknown- .cat,xorg ./usr/X11R7/man/cat4/cirrus.0-unknown- .cat,xorg ./usr/X11R7/man/cat4/cyrix.0-unknown- obsolete +./usr/X11R7/man/cat4/elographics.0 -unknown- .cat,xorg ./usr/X11R7/man/cat4/exa.0-unknown- .cat,xorg ./usr/X11R7/man/cat4/glint.0-unknown- .cat,xorg ./usr/X11R7/man/cat4/i128.0-unknown- .cat,xorg @@ -745,6 +748,7 @@ ./usr/X11R7/man/html4/chips.html -unknown- html,xorg ./usr/X11R7/man/html4/cirrus.html -unknown- html,xorg ./usr/X11R7/man/html4/cyrix.html -unknown- obsolete +./usr/X11R7/man/html4/elographics.html -unknown- html,xorg ./usr/X11R7/man/html4/exa.html-unknown- html,xorg ./usr/X11R7/man/html4/glint.html -unknown- html,xorg ./usr/X11R7/man/html4/i128.html-unknown- html,xorg @@ -788,6 +792,7 @@ ./usr/X11R7/man/man4/chips.4-unknown- .man,xorg ./usr/X11R7/man/man4/cirrus.4-unknown- .man,xorg ./usr/X11R7/man/man4/cyrix.4-unknown- obsolete +./usr/X11R7/man/man4/elographics.4 -unknown- .man,xorg ./usr/X11R7/man/man4/exa.4-unknown- .man,xorg ./usr/X11R7/man/man4/glint.4-unknown- .man,xorg ./usr/X11R7/man/man4/i128.4-unknown- .man,xorg Index: src/external/mit/xorg/server/drivers/Makefile diff -u src/external/mit/xorg/server/drivers/Makefile:1.34 src/external/mit/xorg/server/drivers/Makefile:1.35 --- src/external/mit/xorg/server/drivers/Makefile:1.34 Sat Nov 28 12:10:24 2009 +++ src/external/mit/xorg/server/drivers/Makefile Sat Nov 28 16:48:25 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.34 2009/11/28 12:10:24 mbalmer Exp $ +# $NetBSD: Makefile,v 1.35 2009/11/28 16:48:25 mbalmer Exp $ SUBDIR= \ xf86-input-keyboard \ @@ -6,6 +6,11 @@ xf86-input-void \ xf86-input-ws +.if ${MACHINE_ARCH} == i386 +SUBDIR+= \ + xf86-input-elographics +.endif + .if ${MACHINE_ARCH} == i386 || \ ${MACHINE_ARCH} == x86_64 SUBDIR+= \ Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.596 src/share/mk/bsd.own.mk:1.597 --- src/share/mk/bsd.own.mk:1.596 Sat Nov 28 12:10:24 2009 +++ src/share/mk/bsd.own.mk Sat Nov 28 16:48:25 2009 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.596 2009/11/28 12:10:24 mbalmer Exp $ +# $NetBSD: bsd.own.mk,v 1.597 2009/11/28 16:48:25 mbalmer Exp $ .if !defined(_BSD_OWN_MK_) _BSD_OWN_MK_=1 @@ -910,7 +910,7 @@ .endfor .for _i in \ - keyboard mouse vmmouse void ws + elographics keyboard mouse vmmouse void ws X11SRCDIR.xf86-input-${_i}?= ${X11SRCDIRMIT}/xf86-input-${_i}/dist .endfor
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: cegger Date: Sat Nov 28 17:02:15 UTC 2009 Modified Files: src/sys/dev/acpi: acpivar.h Log Message: u_int32_t - uint32_t struct device * - device_t To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/dev/acpi/acpivar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpivar.h diff -u src/sys/dev/acpi/acpivar.h:1.36 src/sys/dev/acpi/acpivar.h:1.37 --- src/sys/dev/acpi/acpivar.h:1.36 Tue May 12 09:50:28 2009 +++ src/sys/dev/acpi/acpivar.h Sat Nov 28 17:02:14 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: acpivar.h,v 1.36 2009/05/12 09:50:28 cegger Exp $ */ +/* $NetBSD: acpivar.h,v 1.37 2009/11/28 17:02:14 cegger Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -78,11 +78,11 @@ struct acpi_devnode { TAILQ_ENTRY(acpi_devnode) ad_list; ACPI_HANDLE ad_handle; /* our ACPI handle */ - u_int32_t ad_level; /* ACPI level */ - u_int32_t ad_type; /* ACPI object type */ + uint32_t ad_level; /* ACPI level */ + uint32_t ad_type; /* ACPI object type */ ACPI_DEVICE_INFO *ad_devinfo; /* our ACPI device info */ struct acpi_scope *ad_scope; /* backpointer to scope */ - struct device *ad_device; /* pointer to configured device */ + device_t ad_device; /* pointer to configured device */ char ad_name[5]; /* Human-readable device name */ };
CVS commit: src/sbin/fdisk
Module Name:src Committed By: tsutsui Date: Sat Nov 28 17:25:46 UTC 2009 Modified Files: src/sbin/fdisk: fdisk.8 Log Message: Update -u usage to follow changes in fdisk.c rev 1.125: Allow MB, GB and CYL (not just M, G and C) and lower case. Don't output a splurious 'd' before cyl. Fixes PR/37414. XXX NNcy is also allowed? To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sbin/fdisk/fdisk.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fdisk/fdisk.8 diff -u src/sbin/fdisk/fdisk.8:1.64 src/sbin/fdisk/fdisk.8:1.65 --- src/sbin/fdisk/fdisk.8:1.64 Sat Nov 28 16:45:20 2009 +++ src/sbin/fdisk/fdisk.8 Sat Nov 28 17:25:45 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: fdisk.8,v 1.64 2009/11/28 16:45:20 tsutsui Exp $ +.\ $NetBSD: fdisk.8,v 1.65 2009/11/28 17:25:45 tsutsui Exp $ .\ .Dd November 28, 2009 .Dt FDISK 8 @@ -302,8 +302,10 @@ .Em start and .Em size -can be specified in blocks (nn), cylinders (nnc), megabytes (nnm), -or gigabytes (nng), values in megabytes and gigabytes +can be specified in blocks (NN), +cylinders (NNc or NNcyl), +megabytes (NNm or NNMB), +or gigabytes (NNg or NNGB), values in megabytes and gigabytes will be rounded to the nearest cylinder boundary. The .Em size
CVS commit: src/external/mit/xorg/server/drivers/xf86-input-elographics
Module Name:src Committed By: mbalmer Date: Sat Nov 28 17:27:30 UTC 2009 Added Files: src/external/mit/xorg/server/drivers/xf86-input-elographics: Makefile Log Message: Forgotten commit. Noticed by snj, thanks! To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 \ src/external/mit/xorg/server/drivers/xf86-input-elographics/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/external/mit/xorg/server/drivers/xf86-input-elographics/Makefile diff -u /dev/null src/external/mit/xorg/server/drivers/xf86-input-elographics/Makefile:1.1 --- /dev/null Sat Nov 28 17:27:30 2009 +++ src/external/mit/xorg/server/drivers/xf86-input-elographics/Makefile Sat Nov 28 17:27:30 2009 @@ -0,0 +1,14 @@ +# $NetBSD: Makefile,v 1.1 2009/11/28 17:27:30 mbalmer Exp $ + +DRIVER= xf86-input-elographics +DRIVER_NAME= elographics_drv + +SRCS= xf86Elo.c +MAN= elographics.4 + +CPPFLAGS+= -DHAVE_CONFIG_H \ + -I${X11SRCDIR.${DRIVER}}/../include \ + +COPTS.xf86Elo.c= -Wno-error # XXX deprecated + +.include ../Makefile.xf86-driver
CVS commit: [netbsd-5] src/sys/kern
Module Name:src Committed By: sborrill Date: Sat Nov 28 18:59:11 UTC 2009 Modified Files: src/sys/kern [netbsd-5]: vfs_subr.c Log Message: Pull up the following revisions(s) (requested by bouyer in ticket #1171): sys/kern/vfs_subr.c:revision 1.392 Previous caused a deadlock with layered FS: the vrele thread can sleep on the vnode lock, while vget is sleeping on the VI_INACTNOW flag (or the vget caller is looping on vget returning failure because of the VI_INACTNOW flag). With layered FSes, the upper and lower vnodes share the same lock, so the vget() caller above can be already holding the vnode lock. Fix by dropping VI_INACTNOW before sleeping on the vnode lock in vrelel(), and check the ref count again once we have the lock. If the vnode has more than one reference, don't VOP_INACTIVE it. Fix PR kern/42318 and PR kern/42377 To generate a diff of this commit: cvs rdiff -u -r1.357.4.7 -r1.357.4.8 src/sys/kern/vfs_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/vfs_subr.c diff -u src/sys/kern/vfs_subr.c:1.357.4.7 src/sys/kern/vfs_subr.c:1.357.4.8 --- src/sys/kern/vfs_subr.c:1.357.4.7 Sat Nov 21 20:07:49 2009 +++ src/sys/kern/vfs_subr.c Sat Nov 28 18:59:11 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_subr.c,v 1.357.4.7 2009/11/21 20:07:49 snj Exp $ */ +/* $NetBSD: vfs_subr.c,v 1.357.4.8 2009/11/28 18:59:11 sborrill Exp $ */ /*- * Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc. @@ -91,7 +91,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vfs_subr.c,v 1.357.4.7 2009/11/21 20:07:49 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: vfs_subr.c,v 1.357.4.8 2009/11/28 18:59:11 sborrill Exp $); #include opt_ddb.h #include opt_compat_netbsd.h @@ -1411,14 +1411,30 @@ /* The pagedaemon can't wait around; defer. */ defer = true; } else if (curlwp == vrele_lwp) { - /* We have to try harder. */ - vp-v_iflag = ~VI_INACTREDO; + /* + * We have to try harder. But we can't sleep + * with VI_INACTNOW as vget() may be waiting on it. + */ + vp-v_iflag = ~(VI_INACTREDO|VI_INACTNOW); + cv_broadcast(vp-v_cv); error = vn_lock(vp, LK_EXCLUSIVE | LK_INTERLOCK | LK_RETRY); if (error != 0) { /* XXX */ vpanic(vp, vrele: unable to lock %p); } + mutex_enter(vp-v_interlock); + /* + * if we did get another reference while + * sleeping, don't try to inactivate it yet. + */ + if (__predict_false(vtryrele(vp))) { +VOP_UNLOCK(vp, 0); +mutex_exit(vp-v_interlock); +return; + } + vp-v_iflag |= VI_INACTNOW; + mutex_exit(vp-v_interlock); defer = false; } else if ((vp-v_iflag VI_LAYER) != 0) { /*
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: sborrill Date: Sat Nov 28 19:00:03 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Ticket 1171 To generate a diff of this commit: cvs rdiff -u -r1.1.2.147 -r1.1.2.148 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.147 src/doc/CHANGES-5.1:1.1.2.148 --- src/doc/CHANGES-5.1:1.1.2.147 Sat Nov 28 16:04:18 2009 +++ src/doc/CHANGES-5.1 Sat Nov 28 19:00:03 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.147 2009/11/28 16:04:18 bouyer Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.148 2009/11/28 19:00:03 sborrill Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -14972,3 +14972,17 @@ don't use pathname directly as msgq()'s first argument of format string. [tnozaki, ticket #1159] +sys/kern/vfs_subr.c1.392 + + Previous caused a deadlock with layered FS: the vrele thread can + sleep on the vnode lock, while vget is sleeping on the + VI_INACTNOW flag (or the vget caller is looping on vget returning + failure because of the VI_INACTNOW flag). With layered FSes, + the upper and lower vnodes share the same lock, so the vget() + caller above can be already holding the vnode lock. + Fix by dropping VI_INACTNOW before sleeping on the vnode lock in + vrelel(), and check the ref count again once we have the lock. + If the vnode has more than one reference, don't VOP_INACTIVE it. + Fix PR kern/42318 and PR kern/42377 + [bouyer, ticket #1171] +
CVS commit: src/sys/compat/irix
Module Name:src Committed By: dsl Date: Sat Nov 28 20:09:56 UTC 2009 Modified Files: src/sys/compat/irix: irix_sysmp.c Log Message: Set irm-bufmem = uvmexp.filepages; as suggested in PR/30408 To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/compat/irix/irix_sysmp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/irix/irix_sysmp.c diff -u src/sys/compat/irix/irix_sysmp.c:1.21 src/sys/compat/irix/irix_sysmp.c:1.22 --- src/sys/compat/irix/irix_sysmp.c:1.21 Mon Apr 28 20:23:42 2008 +++ src/sys/compat/irix/irix_sysmp.c Sat Nov 28 20:09:56 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: irix_sysmp.c,v 1.21 2008/04/28 20:23:42 martin Exp $ */ +/* $NetBSD: irix_sysmp.c,v 1.22 2009/11/28 20:09:56 dsl Exp $ */ /*- * Copyright (c) 2001-2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: irix_sysmp.c,v 1.21 2008/04/28 20:23:42 martin Exp $); +__KERNEL_RCSID(0, $NetBSD: irix_sysmp.c,v 1.22 2009/11/28 20:09:56 dsl Exp $); #include sys/errno.h #include sys/param.h @@ -152,7 +152,6 @@ static int irix_sysmp_saget(int cmd, char *buf, size_t len) { - extern u_int bufpages; void *kbuf; int error = 0; @@ -169,7 +168,7 @@ irm-availsmem = uvmexp.free + active + inactive + uvmexp.wired + (uvmexp.swpages - uvmexp.swpgonly); irm-availrmem = uvmexp.free + active + inactive + uvmexp.wired; - irm-bufmem = bufpages; + irm-bufmem = uvmexp.filepages; irm-physmem = uvmexp.npages; irm-dchunkpages = 0; /* unsupported */ irm-pmapmem = 0; /* unsupported */
CVS commit: src/usr.bin/genassym
Module Name:src Committed By: dsl Date: Sat Nov 28 20:30:02 UTC 2009 Modified Files: src/usr.bin/genassym: genassym.sh Log Message: Use shell builtin getopts instead of getopt(1). Fixes PR/30425 To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.bin/genassym/genassym.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/genassym/genassym.sh diff -u src/usr.bin/genassym/genassym.sh:1.5 src/usr.bin/genassym/genassym.sh:1.6 --- src/usr.bin/genassym/genassym.sh:1.5 Sun Oct 18 18:14:00 2009 +++ src/usr.bin/genassym/genassym.sh Sat Nov 28 20:30:01 2009 @@ -1,5 +1,5 @@ #!/bin/sh - -# $NetBSD: genassym.sh,v 1.5 2009/10/18 18:14:00 snj Exp $ +# $NetBSD: genassym.sh,v 1.6 2009/11/28 20:30:01 dsl Exp $ # # Copyright (c) 1997 Matthias Pfaller. # All rights reserved. @@ -37,25 +37,22 @@ echo usage: ${progname} [-c | -f] -- compiler command 2 } -args=`getopt cf $*` -if [ $? != 0 ]; then - usage; - exit 1; -fi -set -- $args - -for i; do +while getopts cf i +do case $i in - -c) + c) ccode=1 - shift;; - -f) + ;; + f) fcode=1 - shift;; - --) - shift; break;; + ;; esac done +shift $(($OPTIND - 1)) +if [ $# -eq 0 ]; then + usage + exit 1 +fi # Deal with any leading environment settings..
CVS commit: src/usr.bin/getopt
Module Name:src Committed By: dsl Date: Sat Nov 28 20:36:45 UTC 2009 Modified Files: src/usr.bin/getopt: getopt.1 Log Message: Add a note telling people to use the shell getopts builtin. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.bin/getopt/getopt.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/getopt/getopt.1 diff -u src/usr.bin/getopt/getopt.1:1.17 src/usr.bin/getopt/getopt.1:1.18 --- src/usr.bin/getopt/getopt.1:1.17 Wed Mar 11 13:53:30 2009 +++ src/usr.bin/getopt/getopt.1 Sat Nov 28 20:36:45 2009 @@ -1,5 +1,5 @@ -.\ $NetBSD: getopt.1,v 1.17 2009/03/11 13:53:30 joerg Exp $ -.Dd November 9, 2000 +.\ $NetBSD: getopt.1,v 1.18 2009/11/28 20:36:45 dsl Exp $ +.Dd November 28, 2009 .Dt GETOPT 1 .Os .Sh NAME @@ -34,6 +34,11 @@ .Dq \- and in its own shell argument; each option argument is also in its own shell argument. +.Pp +.Nm +should not be used in new scripts, use the shell builtin +.Nm getopts +instead. .Sh EXAMPLES The following code fragment shows how one might process the arguments for a command that can take the options
CVS commit: src/sys/arch/sparc64/include
Module Name:src Committed By: mrg Date: Sat Nov 28 21:07:02 UTC 2009 Modified Files: src/sys/arch/sparc64/include: ctlreg.h Log Message: add some ultrasparcIII defines, from openbsd. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/arch/sparc64/include/ctlreg.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/sparc64/include/ctlreg.h diff -u src/sys/arch/sparc64/include/ctlreg.h:1.45 src/sys/arch/sparc64/include/ctlreg.h:1.46 --- src/sys/arch/sparc64/include/ctlreg.h:1.45 Sat May 16 19:15:34 2009 +++ src/sys/arch/sparc64/include/ctlreg.h Sat Nov 28 21:07:02 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ctlreg.h,v 1.45 2009/05/16 19:15:34 nakayama Exp $ */ +/* $NetBSD: ctlreg.h,v 1.46 2009/11/28 21:07:02 mrg Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath @@ -63,6 +63,10 @@ #define ASI_FLUSH_D_CTX_PRIMARY 0x3a /* [4u] flush D-cache context using primary context */ #define ASI_FLUSH_D_CTX_SECONDARY 0x3b /* [4u] flush D-cache context using secondary context */ +#define ASI_DCACHE_INVALIDATE 0x42 /* [III] invalidate D-cache */ +#define ASI_DCACHE_UTAG 0x43 /* [III] diagnostic access to D-cache micro tag */ +#define ASI_DCACHE_SNOOP_TAG 0x44 /* [III] diagnostic access to D-cache snoop tag RAM */ + #define ASI_LSU_CONTROL_REGISTER 0x45 /* [4u] load/store unit control register */ #define ASI_DCACHE_DATA 0x46 /* [4u] diagnostic access to D-cache data RAM */ @@ -244,6 +248,7 @@ /* * The following are the control registers * They work on both MMUs unless noted. + * III = cheetah only * * Register contents are defined later on individual registers. */ @@ -257,6 +262,9 @@ #define TLB_TAG_ACCESS 0x30 #define VIRTUAL_WATCHPOINT 0x38 #define PHYSICAL_WATCHPOINT 0x40 +#define TSB_PEXT 0x48 /* III primary ext */ +#define TSB_SEXT 0x50 /* III 2ndary ext -- DMMU only */ +#define TSB_NEXT 0x58 /* III nucleus ext */ /* Tag Target bits */ #define TAG_TARGET_VA_MASK 0x03LL
CVS commit: src/sys/arch/sparc64/dev
Module Name:src Committed By: mrg Date: Sat Nov 28 21:32:46 UTC 2009 Modified Files: src/sys/arch/sparc64/dev: pci_machdep.c Log Message: give more debug output about mapping interrupts. To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/arch/sparc64/dev/pci_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc64/dev/pci_machdep.c diff -u src/sys/arch/sparc64/dev/pci_machdep.c:1.63 src/sys/arch/sparc64/dev/pci_machdep.c:1.64 --- src/sys/arch/sparc64/dev/pci_machdep.c:1.63 Fri Nov 27 22:31:29 2009 +++ src/sys/arch/sparc64/dev/pci_machdep.c Sat Nov 28 21:32:46 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.c,v 1.63 2009/11/27 22:31:29 mrg Exp $ */ +/* $NetBSD: pci_machdep.c,v 1.64 2009/11/28 21:32:46 mrg Exp $ */ /* * Copyright (c) 1999, 2000 Matthew R. Green @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pci_machdep.c,v 1.63 2009/11/27 22:31:29 mrg Exp $); +__KERNEL_RCSID(0, $NetBSD: pci_machdep.c,v 1.64 2009/11/28 21:32:46 mrg Exp $); #include sys/types.h #include sys/param.h @@ -402,12 +402,14 @@ KASSERT(pa-pa_pc-spc_find_ino); pa-pa_pc-spc_find_ino(pa, interrupts); } + DPRINTF(SPDB_INTMAP, (OF_mapintr() gave %x\n, interrupts)); /* Try to find an IPL for this type of device. */ prom_getpropstringA(node, device_type, devtype, sizeof(devtype)); for (len = 0; intrmap[len].in_class != NULL; len++) if (strcmp(intrmap[len].in_class, devtype) == 0) { interrupts |= INTLEVENCODE(intrmap[len].in_lev); + DPRINTF(SPDB_INTMAP, (reset to %x\n, interrupts)); break; }
CVS commit: src/sys/arch/sun2/sun2
Module Name:src Committed By: he Date: Sat Nov 28 21:37:28 UTC 2009 Modified Files: src/sys/arch/sun2/sun2: locore2.c Log Message: Cast a vaddr_t (integral type) to void* before passing to memset. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/sun2/sun2/locore2.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/sun2/sun2/locore2.c diff -u src/sys/arch/sun2/sun2/locore2.c:1.23 src/sys/arch/sun2/sun2/locore2.c:1.24 --- src/sys/arch/sun2/sun2/locore2.c:1.23 Fri Nov 27 03:23:14 2009 +++ src/sys/arch/sun2/sun2/locore2.c Sat Nov 28 21:37:28 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: locore2.c,v 1.23 2009/11/27 03:23:14 rmind Exp $ */ +/* $NetBSD: locore2.c,v 1.24 2009/11/28 21:37:28 he Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: locore2.c,v 1.23 2009/11/27 03:23:14 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: locore2.c,v 1.24 2009/11/28 21:37:28 he Exp $); #include opt_ddb.h #include opt_modular.h @@ -187,7 +187,7 @@ * (The fault handler may reference lwp0 stuff.) */ uvm_lwp_setuarea(lwp0, nextva); - memset(nextva, 0, USPACE); + memset((void *)nextva, 0, USPACE); nextva += USPACE;
CVS commit: [netbsd-4] src/doc
Module Name:src Committed By: sborrill Date: Sat Nov 28 21:38:26 UTC 2009 Modified Files: src/doc [netbsd-4]: CHANGES-4.1 Log Message: Ticket 1367 To generate a diff of this commit: cvs rdiff -u -r1.1.2.183 -r1.1.2.184 src/doc/CHANGES-4.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-4.1 diff -u src/doc/CHANGES-4.1:1.1.2.183 src/doc/CHANGES-4.1:1.1.2.184 --- src/doc/CHANGES-4.1:1.1.2.183 Sat Nov 14 10:40:43 2009 +++ src/doc/CHANGES-4.1 Sat Nov 28 21:38:26 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-4.1,v 1.1.2.183 2009/11/14 10:40:43 sborrill Exp $ +# $NetBSD: CHANGES-4.1,v 1.1.2.184 2009/11/28 21:38:26 sborrill Exp $ A complete list of changes from the NetBSD 4.0 release to the NetBSD 4.1 release: @@ -3901,3 +3901,9 @@ the IPv6 header would get corrupted by ip_output. [joerg, ticket #1366] +usr.bin/comm/comm.c1.18 + + Don't include newlines when comparing to prevent errors when + lines have characters that sort lower such as tabs. + [darcy, ticket #1367] +
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: mrg Date: Sat Nov 28 21:38:56 UTC 2009 Modified Files: src/sys/arch/sparc64/sparc64: locore.s Log Message: implement enough code to get SB2000/SB2500 booting to multiuser. does not last long if you use it, but an idle machine has stayed up 10 hours. - for the !SPITFIRE case, use ASI_DCACHE_INVALIDATE instead of ASI_DCACHE_TAG when clearing tlb entries. from openbsd. - convert some comment ! Not yet into WRITEME, so that attempting to build a USIII MULTIPROCESSOR kernel fails to build until the code is written. - add some more WRITEME's for the above. - implement a !SPITFIRE version of sp_tlb_flush_all(). since there are no spare regs, for now just always increase %tl around this call. (we could maybe store a token in %o3 along with the saved %pstate info.) To generate a diff of this commit: cvs rdiff -u -r1.294 -r1.295 src/sys/arch/sparc64/sparc64/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc64/sparc64/locore.s diff -u src/sys/arch/sparc64/sparc64/locore.s:1.294 src/sys/arch/sparc64/sparc64/locore.s:1.295 --- src/sys/arch/sparc64/sparc64/locore.s:1.294 Thu Nov 26 00:19:22 2009 +++ src/sys/arch/sparc64/sparc64/locore.s Sat Nov 28 21:38:55 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.294 2009/11/26 00:19:22 matt Exp $ */ +/* $NetBSD: locore.s,v 1.295 2009/11/28 21:38:55 mrg Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath @@ -55,7 +55,9 @@ * @(#)locore.s 8.4 (Berkeley) 12/10/93 */ +#ifndef SCHIZO_BUS_SPACE_BROKEN /* Need phys access for USIII so far */ #define SPITFIRE /* We don't support Cheetah (USIII) yet */ +#endif #undef PARANOID /* Extremely expensive consistency checks */ #undef NO_VCACHE /* Map w/D$ disabled */ #undef TRAPSTATS /* Count traps */ @@ -2529,7 +2531,11 @@ 1: #if 1 /* Now we need to blast away the D$ to make sure we're in sync */ +#ifdef SPITFIRE stxa %g0, [%g7] ASI_DCACHE_TAG +#else + stxa %g0, [%g7] ASI_DCACHE_INVALIDATE +#endif brnz,pt %g7, 1b dec 8, %g7 #endif @@ -3811,7 +3817,7 @@ membar #Sync IPIEVC_INC(IPI_EVCNT_TLB_PTE,%g2,%g3) #else - ! Not yet + WRITEME #endif ba,a ret_from_intr_vector @@ -3845,7 +3851,7 @@ membar #Sync IPIEVC_INC(IPI_EVCNT_TLB_CTX,%g2,%g3) #else - ! Not yet + WRITEME #endif ba,a ret_from_intr_vector @@ -5491,6 +5497,9 @@ nop #endif #else +#ifdef MULTIPROCESSOR + WRITEME +#endif !! !! Cheetahs do not support flushing the IMMU from secondary context !! @@ -5519,7 +5528,7 @@ nop 1: retl - wrpr %g0, 0, %tl! Return to kernel mode. + wrpr %g0, %o3, %tl! Return to kernel mode. #endif /* @@ -5585,6 +5594,9 @@ nop #endif #else +#ifdef MULTIPROCESSOR + WRITEME +#endif rdpr %tl, %o3 mov CTX_PRIMARY, %o2 brnz %o3, 1f @@ -5607,7 +5619,7 @@ nop 1: retl - wrpr %g0, 0, %tl ! Return to kernel mode. + wrpr %g0, %o3, %tl ! Return to kernel mode. #endif /* @@ -5631,8 +5643,9 @@ ! %o1 = ctx value ! %o2 = TLB tag value ! %o3 = saved %pstate - ! %o4 = saved secondary ctx + ! %o4 = saved primary ctx ! %o5 = CTX_MASK + ! %xx = saved %tl 0: ldxa [%o0] ASI_DMMU_TLB_TAG, %o2 ! fetch the TLB tag @@ -5682,7 +5695,82 @@ retl wrpr %o3, %pstate #else - WRITEME + ! XXX bump up %tl around this call always + rdpr %tl, %o4 + inc %o4 + wrpr %o4, 0, %tl + + rdpr %pstate, %o3 + andn %o3, PSTATE_IE, %o4 ! disable interrupts + wrpr %o4, 0, %pstate + set (63 * 8), %o0! last TLB entry + set CTX_PRIMARY, %o4 + ldxa [%o4] ASI_DMMU, %o4 ! save secondary context + set CTX_MASK, %o5 + membar #Sync + + ! %o0 = loop counter + ! %o1 = ctx value + ! %o2 = TLB tag value + ! %o3 = saved %pstate + ! %o4 = saved primary ctx + ! %o5 = CTX_MASK + ! %xx = saved %tl + +0: + ldxa [%o0] ASI_DMMU_TLB_TAG, %o2 ! fetch the TLB tag + andcc %o2, %o5, %o1! context 0? + bz,pt %xcc, 1f! if so, skip + mov CTX_PRIMARY, %o2 + + stxa %o1, [%o2] ASI_DMMU ! set the context + set DEMAP_CTX_PRIMARY, %o2 + membar #Sync + stxa %o2, [%o2] ASI_DMMU_DEMAP ! do the demap + membar #Sync + +1: + dec 8, %o0 + brgz,pt %o0, 0b ! loop over all entries + nop + +/* + * now do the IMMU + */ + + set (63 * 8), %o0! last TLB entry + +0: + ldxa [%o0] ASI_IMMU_TLB_TAG, %o2 ! fetch the TLB tag + andcc %o2, %o5, %o1! context 0? + bz,pt %xcc, 1f! if so, skip + mov CTX_PRIMARY, %o2 + + stxa %o1, [%o2] ASI_DMMU ! set the context + set DEMAP_CTX_PRIMARY, %o2 + membar #Sync + stxa %o2, [%o2] ASI_IMMU_DEMAP ! do the demap + membar #Sync + +1: + dec 8, %o0 + brgz,pt %o0, 0b ! loop over all entries + nop + + set CTX_PRIMARY, %o2 + stxa %o4, [%o2] ASI_DMMU ! restore secondary ctx + sethi %hi(KERNBASE), %o4 + membar #Sync + flush %o4 + + ! XXX bump up %tl around this call always + rdpr %tl, %o4 + dec %o4 + wrpr %o4, 0, %tl + + retl + wrpr %o3, %pstate + #endif /* @@ -5706,7 +5794,11
CVS commit: src/sys/arch/sparc64/conf
Module Name:src Committed By: mrg Date: Sat Nov 28 21:39:42 UTC 2009 Added Files: src/sys/arch/sparc64/conf: SCHIZO Log Message: add the kernel config i've been mostly using for USIII/schizo support To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/sparc64/conf/SCHIZO 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/sparc64/conf/SCHIZO diff -u /dev/null src/sys/arch/sparc64/conf/SCHIZO:1.1 --- /dev/null Sat Nov 28 21:39:42 2009 +++ src/sys/arch/sparc64/conf/SCHIZO Sat Nov 28 21:39:42 2009 @@ -0,0 +1,28 @@ +# $NetBSD: SCHIZO,v 1.1 2009/11/28 21:39:42 mrg Exp $ +# +# GENERIC with schizo support enabled, with the annoying schizo interupt +# option +# + +#include arch/sparc64/conf/GENERIC.MP +include arch/sparc64/conf/GENERIC + +#ident SCHIZO.$Revision: 1.1 $ + +options SCHIZO_BUS_SPACE_BROKEN +#options SYSCALL_DEBUG + +makeoptions DEBUG=-g +options DEBUG +options DIAGNOSTIC +options DB_MAX_WIDTH=160 +options DDB_ONPANIC=2 # print stack trace + +schizo* at mainbus? +pci* at schizo? + +no machfb +no esiop +no siop + +bge* at pci? dev ? function ?
CVS commit: src/sys/compat
Module Name:src Committed By: dsl Date: Sat Nov 28 22:11:42 UTC 2009 Modified Files: src/sys/compat/linux/common: linux_socket.c linux_socket.h linux_sockio.h src/sys/compat/sys: sockio.h Log Message: Add LINUX_SIOCGIFMTU and LINUX_IP_HDRINCL support. Fixes part of PR/31358 The other parts are rather too intrusive to be fixed as in the PR. To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.107 src/sys/compat/linux/common/linux_socket.c cvs rdiff -u -r1.18 -r1.19 src/sys/compat/linux/common/linux_socket.h cvs rdiff -u -r1.17 -r1.18 src/sys/compat/linux/common/linux_sockio.h cvs rdiff -u -r1.7 -r1.8 src/sys/compat/sys/sockio.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/compat/linux/common/linux_socket.c diff -u src/sys/compat/linux/common/linux_socket.c:1.106 src/sys/compat/linux/common/linux_socket.c:1.107 --- src/sys/compat/linux/common/linux_socket.c:1.106 Fri Nov 13 22:39:35 2009 +++ src/sys/compat/linux/common/linux_socket.c Sat Nov 28 22:11:42 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_socket.c,v 1.106 2009/11/13 22:39:35 joerg Exp $ */ +/* $NetBSD: linux_socket.c,v 1.107 2009/11/28 22:11:42 dsl Exp $ */ /*- * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: linux_socket.c,v 1.106 2009/11/13 22:39:35 joerg Exp $); +__KERNEL_RCSID(0, $NetBSD: linux_socket.c,v 1.107 2009/11/28 22:11:42 dsl Exp $); #if defined(_KERNEL_OPT) #include opt_inet.h @@ -849,6 +849,8 @@ return IP_TOS; case LINUX_IP_TTL: return IP_TTL; + case LINUX_IP_HDRINCL: + return IP_HDRINCL; case LINUX_IP_MULTICAST_TTL: return IP_MULTICAST_TTL; case LINUX_IP_MULTICAST_LOOP: @@ -1275,6 +1277,9 @@ case LINUX_SIOCGIFNETMASK: SCARG(ia, com) = OOSIOCGIFNETMASK; break; + case LINUX_SIOCGIFMTU: + SCARG(ia, com) = OSIOCGIFMTU; + break; case LINUX_SIOCADDMULTI: SCARG(ia, com) = OSIOCADDMULTI; break; Index: src/sys/compat/linux/common/linux_socket.h diff -u src/sys/compat/linux/common/linux_socket.h:1.18 src/sys/compat/linux/common/linux_socket.h:1.19 --- src/sys/compat/linux/common/linux_socket.h:1.18 Wed Jun 17 14:18:51 2009 +++ src/sys/compat/linux/common/linux_socket.h Sat Nov 28 22:11:42 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_socket.h,v 1.18 2009/06/17 14:18:51 njoly Exp $ */ +/* $NetBSD: linux_socket.h,v 1.19 2009/11/28 22:11:42 dsl Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -103,6 +103,7 @@ #define LINUX_IP_TOS 1 #define LINUX_IP_TTL 2 +#define LINUX_IP_HDRINCL 3 #define LINUX_IP_MULTICAST_IF 32 #define LINUX_IP_MULTICAST_TTL 33 #define LINUX_IP_MULTICAST_LOOP 34 Index: src/sys/compat/linux/common/linux_sockio.h diff -u src/sys/compat/linux/common/linux_sockio.h:1.17 src/sys/compat/linux/common/linux_sockio.h:1.18 --- src/sys/compat/linux/common/linux_sockio.h:1.17 Fri Nov 13 21:45:03 2009 +++ src/sys/compat/linux/common/linux_sockio.h Sat Nov 28 22:11:42 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_sockio.h,v 1.17 2009/11/13 21:45:03 joerg Exp $ */ +/* $NetBSD: linux_sockio.h,v 1.18 2009/11/28 22:11:42 dsl Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -41,6 +41,7 @@ #define LINUX_SIOCGIFDSTADDR _LINUX_IO(0x89, 0x17) #define LINUX_SIOCGIFBRDADDR _LINUX_IO(0x89, 0x19) #define LINUX_SIOCGIFNETMASK _LINUX_IO(0x89, 0x1b) +#define LINUX_SIOCGIFMTU _LINUX_IO(0x89, 0x21) #define LINUX_SIOCADDMULTI _LINUX_IO(0x89, 0x31) #define LINUX_SIOCDELMULTI _LINUX_IO(0x89, 0x32) #define LINUX_SIOCGIFHWADDR _LINUX_IO(0x89, 0x27) Index: src/sys/compat/sys/sockio.h diff -u src/sys/compat/sys/sockio.h:1.7 src/sys/compat/sys/sockio.h:1.8 --- src/sys/compat/sys/sockio.h:1.7 Fri Feb 13 22:41:04 2009 +++ src/sys/compat/sys/sockio.h Sat Nov 28 22:11:42 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: sockio.h,v 1.7 2009/02/13 22:41:04 apb Exp $ */ +/* $NetBSD: sockio.h,v 1.8 2009/11/28 22:11:42 dsl Exp $ */ /*- * Copyright (c) 1982, 1986, 1990, 1993, 1994 @@ -136,6 +136,7 @@ #define OSIOCADDMULTI _IOW('i', 49, struct oifreq) /* add m'cast addr */ #define OSIOCDELMULTI _IOW('i', 50, struct oifreq) /* del m'cast addr */ #define OSIOCSIFMEDIA _IOWR('i', 53, struct oifreq) /* set net media */ +#define OSIOCGIFMTU _IOWR('i', 126, struct oifreq) /* get ifnet mtu */ #define OSIOCGIFDATA _IOWR('i', 128, struct oifdatareq) /* get if_data */ #define OSIOCZIFDATA _IOWR('i', 129, struct oifdatareq) /* get if_data then zero ctrs*/
CVS commit: src/distrib/utils/x_ifconfig
Module Name:src Committed By: he Date: Sat Nov 28 22:13:34 UTC 2009 Modified Files: src/distrib/utils/x_ifconfig: Makefile Log Message: Use ${.CURDIR} when referring to a relative source directory. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/distrib/utils/x_ifconfig/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/x_ifconfig/Makefile diff -u src/distrib/utils/x_ifconfig/Makefile:1.28 src/distrib/utils/x_ifconfig/Makefile:1.29 --- src/distrib/utils/x_ifconfig/Makefile:1.28 Fri Jul 25 15:11:48 2008 +++ src/distrib/utils/x_ifconfig/Makefile Sat Nov 28 22:13:34 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.28 2008/07/25 15:11:48 skrll Exp $ +# $NetBSD: Makefile,v 1.29 2009/11/28 22:13:34 he Exp $ # Build a smaller ifconfig (i.e. for boot media) .include bsd.own.mk @@ -13,7 +13,7 @@ SRCS+= af_inet6.c .endif -.include ../../../sbin/ifconfig/Makefile.inc +.include ${.CURDIR}/../../../sbin/ifconfig/Makefile.inc .include bsd.prog.mk
CVS commit: src/tests/rump/rumpkern
Module Name:src Committed By: he Date: Sat Nov 28 22:20:38 UTC 2009 Modified Files: src/tests/rump/rumpkern: Makefile Log Message: It seems that LDADD.file gets added to the linker invocation after the LDADD variable expansion. To support static linking, ensure that the common libraries gets tacked on at the end as well (order matters for static linking), by using a convenience variable and add it to the end of LDADD.t_modlinkset, as well as when doing the general LDADD+= setting. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/rump/rumpkern/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/rump/rumpkern/Makefile diff -u src/tests/rump/rumpkern/Makefile:1.4 src/tests/rump/rumpkern/Makefile:1.5 --- src/tests/rump/rumpkern/Makefile:1.4 Fri Nov 6 15:26:54 2009 +++ src/tests/rump/rumpkern/Makefile Sat Nov 28 22:20:38 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2009/11/06 15:26:54 pooka Exp $ +# $NetBSD: Makefile,v 1.5 2009/11/28 22:20:38 he Exp $ .include bsd.own.mk @@ -7,8 +7,9 @@ TESTS_C= t_modcmd TESTS_C+= t_modlinkset -LDADD.t_modlinkset+= -lukfs -lrumpfs_cd9660 -lrumpfs_msdos -LDADD+= -lrumpvfs -lrump -lrumpuser -lpthread +ADD_TO_LD= -lrumpvfs -lrump -lrumpuser -lpthread +LDADD.t_modlinkset+= -lukfs -lrumpfs_cd9660 -lrumpfs_msdos ${ADD_TO_LD} +LDADD+= ${ADD_TO_LD} WARNS= 4
CVS commit: src/sys/kern
Module Name:src Committed By: dsl Date: Sat Nov 28 22:38:07 UTC 2009 Modified Files: src/sys/kern: subr_disk.c Log Message: When truncating a request in bounds_check_with_mediasize() multiply by the provided sector size instead of 512. Fixes last bit of PR/31565 To generate a diff of this commit: cvs rdiff -u -r1.98 -r1.99 src/sys/kern/subr_disk.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/subr_disk.c diff -u src/sys/kern/subr_disk.c:1.98 src/sys/kern/subr_disk.c:1.99 --- src/sys/kern/subr_disk.c:1.98 Fri Nov 27 11:23:50 2009 +++ src/sys/kern/subr_disk.c Sat Nov 28 22:38:07 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_disk.c,v 1.98 2009/11/27 11:23:50 tsutsui Exp $ */ +/* $NetBSD: subr_disk.c,v 1.99 2009/11/28 22:38:07 dsl Exp $ */ /*- * Copyright (c) 1996, 1997, 1999, 2000, 2009 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: subr_disk.c,v 1.98 2009/11/27 11:23:50 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: subr_disk.c,v 1.99 2009/11/28 22:38:07 dsl Exp $); #include sys/param.h #include sys/kernel.h @@ -315,8 +315,8 @@ /* * Bounds checking against the media size, used for the raw partition. - * The sector size passed in should currently always be DEV_BSIZE, - * and the media size the size of the device in DEV_BSIZE sectors. + * secsize, mediasize and b_blkno must all be the same units. + * Possibly this has to be DEV_BSIZE (512). */ int bounds_check_with_mediasize(struct buf *bp, int secsize, uint64_t mediasize) @@ -338,7 +338,7 @@ return 0; } /* Otherwise, truncate request. */ - bp-b_bcount = sz DEV_BSHIFT; + bp-b_bcount = sz * secsize; } return 1;
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: nakayama Date: Sun Nov 29 03:31:33 UTC 2009 Modified Files: src/sys/arch/sparc64/sparc64: locore.s Log Message: - calculate end PA correctly. - wrap more spitfire specific (flushing I$) code. - fix inverted #if condition for flushing I$ (and restore ASI_ICACHE_TAG). To generate a diff of this commit: cvs rdiff -u -r1.295 -r1.296 src/sys/arch/sparc64/sparc64/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc64/sparc64/locore.s diff -u src/sys/arch/sparc64/sparc64/locore.s:1.295 src/sys/arch/sparc64/sparc64/locore.s:1.296 --- src/sys/arch/sparc64/sparc64/locore.s:1.295 Sat Nov 28 21:38:55 2009 +++ src/sys/arch/sparc64/sparc64/locore.s Sun Nov 29 03:31:33 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.295 2009/11/28 21:38:55 mrg Exp $ */ +/* $NetBSD: locore.s,v 1.296 2009/11/29 03:31:33 nakayama Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath @@ -5948,6 +5948,7 @@ tnz 1 ! Error! #endif add %o0, %o1, %o1 ! End PA + dec %o1 !! !! Both D$ and I$ tags match pa bits 40-13, but @@ -5973,7 +5974,9 @@ and %o3, %o2, %o3 ! Mask out trash cmp %o0, %o3 blt,pt %xcc, 2f ! Too low +#ifdef SPITFIRE sllx %g1, 40-35, %g1 ! Shift I$ tag into place +#endif cmp %o1, %o3 bgt,pt %xcc, 2f ! Too high nop @@ -5985,13 +5988,14 @@ stxa %g0, [%o4] ASI_DCACHE_INVALIDATE ! Just right #endif 2: -#ifndef SPITFIRE +#ifdef SPITFIRE + and %g1, %o2, %g1 ! Mask out trash cmp %o0, %g1 blt,pt %xcc, 3f cmp %o1, %g1 - bgt,pt %icc, 3f + bgt,pt %xcc, 3f nop - stxa %g0, [%o4] ASI_DCACHE_INVALIDATE + stxa %g0, [%o4] ASI_ICACHE_TAG 3: #endif membar #StoreLoad
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: rmind Date: Sun Nov 29 04:11:51 UTC 2009 Modified Files: src/sys/arch/mips/mips: vm_machdep.c Log Message: cpu_lwp_fork (MIPS): replace l_addr with uvm_lwp_getuarea(), clean up a little. To generate a diff of this commit: cvs rdiff -u -r1.127 -r1.128 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/mips/vm_machdep.c diff -u src/sys/arch/mips/mips/vm_machdep.c:1.127 src/sys/arch/mips/mips/vm_machdep.c:1.128 --- src/sys/arch/mips/mips/vm_machdep.c:1.127 Sat Nov 21 17:40:28 2009 +++ src/sys/arch/mips/mips/vm_machdep.c Sun Nov 29 04:11:51 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.127 2009/11/21 17:40:28 rmind Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.128 2009/11/29 04:11:51 rmind Exp $ */ /* * Copyright (c) 1992, 1993 @@ -77,7 +77,7 @@ */ #include sys/cdefs.h /* RCS ID Copyright macro defns */ -__KERNEL_RCSID(0, $NetBSD: vm_machdep.c,v 1.127 2009/11/21 17:40:28 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: vm_machdep.c,v 1.128 2009/11/29 04:11:51 rmind Exp $); #include opt_ddb.h @@ -104,22 +104,15 @@ paddr_t kvtophys(vaddr_t); /* XXX */ /* - * Finish a fork operation, with process p2 nearly set up. - * Copy and update the pcb and trap frame, making the child ready to run. + * cpu_lwp_fork: finish a new LWP (l2) operation. * - * Rig the child's kernel stack so that it will start out in - * lwp_trampoline() and call child_return() with p2 as an - * argument. This causes the newly-created child process to go - * directly to user level with an apparent return value of 0 from - * fork(), while the parent process returns normally. - * - * p1 is the process being forked; if p1 == proc0, we are creating - * a kernel thread, and the return path and argument are specified with - * `func' and `arg'. + * First LWP (l1) is the process being forked. If it is lwp0, then we + * are creating a kthread, where return path and argument are specified + * with `func' and `arg'. * * If an alternate user-level stack is requested (with non-zero values - * in both the stack and stacksize args), set up the user stack pointer - * accordingly. + * in both the stack and stacksize arguments), then set up the user stack + * pointer accordingly. */ void cpu_lwp_fork(struct lwp *l1, struct lwp *l2, void *stack, size_t stacksize, @@ -127,6 +120,9 @@ { struct pcb *pcb1, *pcb2; struct frame *f; + vaddr_t uv; + + KASSERT(l1 == curlwp || l1 == lwp0); pcb1 = lwp_getpcb(l1); pcb2 = lwp_getpcb(l2); @@ -135,28 +131,22 @@ l2-l_md.md_ss_instr = 0; l2-l_md.md_astpending = 0; -#ifdef DIAGNOSTIC - /* - * If l1 != curlwp l1 == lwp0, we're creating a kernel thread. - */ - if (l1 != curlwp l1 != lwp0) - panic(cpu_lwp_fork: curlwp); -#endif + /* If parent LWP was using FPU, then save the FPU h/w state. */ if ((l1-l_md.md_flags MDP_FPUSED) l1 == fpcurlwp) savefpregs(l1); + /* Copy the PCB from parent. */ + memcpy(pcb2, pcb1, sizeof(struct pcb)); + /* - * Copy pcb from proc p1 to p2. - * Copy p1 trapframe atop on p2 stack space, so return to user mode + * Copy the trapframe from parent, so that return to userspace * will be to right address, with correct registers. */ - memcpy(pcb2, pcb1, sizeof(struct pcb)); - f = (struct frame *)((char *)l2-l_addr + USPACE) - 1; + uv = uvm_lwp_getuarea(l2); + f = (struct frame *)(uv + USPACE) - 1; memcpy(f, l1-l_md.md_regs, sizeof(struct frame)); - /* - * If specified, give the child a different stack. - */ + /* If specified, set a different user stack for a child. */ if (stack != NULL) f-f_regs[_R_SP] = (uintptr_t)stack + stacksize; @@ -164,49 +154,49 @@ l2-l_md.md_flags = l1-l_md.md_flags MDP_FPUSED; #if USPACE PAGE_SIZE { - size_t i; const int x = (MIPS_HAS_R4K_MMU) ? - (MIPS3_PG_G | MIPS3_PG_RO | MIPS3_PG_WIRED) : - MIPS1_PG_G; - pt_entry_t *pte = kvtopte(l2-l_addr); + (MIPS3_PG_G | MIPS3_PG_RO | MIPS3_PG_WIRED) : MIPS1_PG_G; + pt_entry_t *pte = kvtopte(uv); + size_t i; + for (i = 0; i UPAGES; i++) l2-l_md.md_upte[i] = pte[i].pt_entry ~ x; } #endif - - pcb2-pcb_context[0] = (intptr_t)func; /* S0 */ - pcb2-pcb_context[1] = (intptr_t)arg; /* S1 */ + /* + * Rig kernel stack so that it would start out in lwp_trampoline() + * and call child_return() with l2 as an argument. This causes the + * newly-created child process to go directly to user level with a + * parent return value of 0 from fork(), while the parent process + * returns normally. + */ + pcb2-pcb_context[0] = (intptr_t)func; /* S0 */ + pcb2-pcb_context[1] = (intptr_t)arg; /* S1 */ pcb2-pcb_context[MIPS_CURLWP_CARD - 16] = (intptr_t)l2;/* S? */ - pcb2-pcb_context[8] = (intptr_t)f; /* SP */ - pcb2-pcb_context[10] = (intptr_t)lwp_trampoline;/* RA */ + pcb2-pcb_context[8] = (intptr_t)f; /* SP */ + pcb2-pcb_context[10] =
CVS commit: src/sbin/fdisk
Module Name:src Committed By: tsutsui Date: Sun Nov 29 04:19:55 UTC 2009 Modified Files: src/sbin/fdisk: fdisk.8 Log Message: Add a bunch of useful typical examples. Also use appropriate markup there. To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sbin/fdisk/fdisk.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fdisk/fdisk.8 diff -u src/sbin/fdisk/fdisk.8:1.65 src/sbin/fdisk/fdisk.8:1.66 --- src/sbin/fdisk/fdisk.8:1.65 Sat Nov 28 17:25:45 2009 +++ src/sbin/fdisk/fdisk.8 Sun Nov 29 04:19:55 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: fdisk.8,v 1.65 2009/11/28 17:25:45 tsutsui Exp $ +.\ $NetBSD: fdisk.8,v 1.66 2009/11/29 04:19:55 tsutsui Exp $ .\ .Dd November 28, 2009 .Dt FDISK 8 @@ -568,10 +568,49 @@ Default location of i386 bootselect for extended partitions .El .Sh EXAMPLES -Install MBR bootcode /usr/mdec/mbr_bootsel into /dev/rwd0d: -.Bd -literal -offset indent -fdisk -c /usr/mdec/mbr_bootsel /dev/rwd0d -.Ed +Update MBR partition data of +.Pa /dev/rwd0d +in interactive mode: +.Pp +.Dl Ic fdisk -u /dev/rwd0d +.Pp +Change active MBR partition of +.Pa /dev/rwd0d +in interactive mode: +.Pp +.Dl Ic fdisk -a /dev/rwd0d +.Pp +Install MBR bootcode +.Pa /usr/mdec/mbr_bootsel +into +.Pa /dev/rwd0d : +.Pp +.Dl Ic fdisk -c /usr/mdec/mbr_bootsel /dev/rwd0d +.Pp +Set MBR partition data for slot 0 of +.Pa /dev/rwd0d +specifying values without prompt: +.Pp +.Dl Ic fdisk -f -u -0 -s 169/63/2097089 /dev/rwd0d +.Pp +Make partition slot 0 of +.Pa /dev/rwd0d +active without prompt: +.Pp +.Dl Ic fdisk -f -a -0 /dev/rwd0d +.Pp +Initialize and create MBR partition data using bootcode +.Pa destdir/usr/mdec/mbr +without prompt against 1GB disk image file +.Pa diskimg : +.Pp +.Dl Ic fdisk -f -i -b 130/255/63 -c destdir/usr/mdec/mbr -F diskimg +.Pp +Create MBR partition data for slot 0 which has an active NetBSD partition +using whole disk without prompt against 1GB disk image file +.Pa diskimg : +.Pp +.Dl Ic fdisk -f -a -u -0 -s 169/63/2097089 -F diskimg .Sh SEE ALSO .Xr disktab 5 , .Xr boot 8 ,
CVS commit: src/sys/dev/ic
Module Name:src Committed By: kiyohara Date: Sun Nov 29 05:07:50 UTC 2009 Modified Files: src/sys/dev/ic: lan9118.c Log Message: Fix register access to MII in lan9118_mii_readreg()/lan9118_mii_writereg(). To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ic/lan9118.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/lan9118.c diff -u src/sys/dev/ic/lan9118.c:1.5 src/sys/dev/ic/lan9118.c:1.6 --- src/sys/dev/ic/lan9118.c:1.5 Sat Nov 28 13:20:41 2009 +++ src/sys/dev/ic/lan9118.c Sun Nov 29 05:07:49 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: lan9118.c,v 1.5 2009/11/28 13:20:41 kiyohara Exp $ */ +/* $NetBSD: lan9118.c,v 1.6 2009/11/29 05:07:49 kiyohara Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi * All rights reserved. @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: lan9118.c,v 1.5 2009/11/28 13:20:41 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: lan9118.c,v 1.6 2009/11/29 05:07:49 kiyohara Exp $); /* * The LAN9118 Family @@ -854,7 +854,7 @@ while (lan9118_mac_readreg(sc, LAN9118_MII_ACC) LAN9118_MII_ACC_MIIBZY); - acc = LAN9118_MII_ACC_MIIRINDA(phy) | LAN9118_MII_ACC_PHYA(reg); + acc = LAN9118_MII_ACC_PHYA(phy) | LAN9118_MII_ACC_MIIRINDA(reg); lan9118_mac_writereg(sc, LAN9118_MII_ACC, acc); while (lan9118_mac_readreg(sc, LAN9118_MII_ACC) LAN9118_MII_ACC_MIIBZY); @@ -868,9 +868,10 @@ while (lan9118_mac_readreg(sc, LAN9118_MII_ACC) LAN9118_MII_ACC_MIIBZY); - acc = LAN9118_MII_ACC_MIIRINDA(phy) | LAN9118_MII_ACC_PHYA(reg) | + acc = LAN9118_MII_ACC_PHYA(phy) | LAN9118_MII_ACC_MIIRINDA(reg) | LAN9118_MII_ACC_MIIWNR; lan9118_mac_writereg(sc, LAN9118_MII_DATA, val); + lan9118_mac_writereg(sc, LAN9118_MII_ACC, acc); while (lan9118_mac_readreg(sc, LAN9118_MII_ACC) LAN9118_MII_ACC_MIIBZY); }