From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 01:24:47 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7920106566C; Sun, 14 Nov 2010 01:24:47 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 1DD578FC20; Sun, 14 Nov 2010 01:24:46 +0000 (UTC) Received: from lawrence1.loshell.room52.net (ppp59-167-184-191.static.internode.on.net [59.167.184.191]) by lauren.room52.net (Postfix) with ESMTPSA id 73DA07E8A3; Sun, 14 Nov 2010 12:24:44 +1100 (EST) Message-ID: <4CDF3A58.6080505@freebsd.org> Date: Sun, 14 Nov 2010 12:24:40 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-AU; rv:1.9.2.9) Gecko/20101006 Lightning/1.0b2 Thunderbird/3.1.4 MIME-Version: 1.0 To: Mikolaj Golub References: <201011120641.oAC6fui3098584@svn.freebsd.org> <8662w17e90.fsf@kopusha.home.net> In-Reply-To: <8662w17e90.fsf@kopusha.home.net> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on lauren.room52.net Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r215166 - in head: . sys/conf sys/netinet sys/netinet/cc sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 01:24:47 -0000 On 11/13/10 20:40, Mikolaj Golub wrote: > > On Fri, 12 Nov 2010 06:41:56 +0000 (UTC) Lawrence Stewart wrote: > > LS> Author: lstewart > LS> Date: Fri Nov 12 06:41:55 2010 > LS> New Revision: 215166 > LS> URL: http://svn.freebsd.org/changeset/base/215166 > > LS> Log: > LS> This commit marks the first formal contribution of the "Five New TCP Congestion > LS> Control Algorithms for FreeBSD" FreeBSD Foundation funded project. More details > LS> about the project are available at: http://caia.swin.edu.au/freebsd/5cc/ > > It looks like the code needs improvement to work with VIMAGE :-) > > options VIMAGE > > jail -i -c vnet persist path=/ > > panic: lock "cc_list" 0xc101c418 already initialized > > #0 doadump () at pcpu.h:231 > #1 0xc04f26b9 in db_fncall (dummy1=-1064234614, dummy2=0, dummy3=-1, > dummy4=0xca54b688 "\234¶TÊ") at /usr/src/sys/ddb/db_command.c:548 > #2 0xc04f2aef in db_command (last_cmdp=0xc0e7957c, cmd_table=0x0, dopager=0) > at /usr/src/sys/ddb/db_command.c:445 > #3 0xc04f2ba4 in db_command_script (command=0xc0e7a484 "call doadump") > at /usr/src/sys/ddb/db_command.c:516 > #4 0xc04f6df0 in db_script_exec (scriptname=0xca54b794 "kdb.enter.panic", warnifnotfound=Variable "warnifnotfound" is not available.) > at /usr/src/sys/ddb/db_script.c:302 > #5 0xc04f6ed7 in db_script_kdbenter (eventname=0xc0d2410e "panic") > at /usr/src/sys/ddb/db_script.c:324 > #6 0xc04f4b28 in db_trap (type=3, code=0) at /usr/src/sys/ddb/db_main.c:228 > #7 0xc0910fbe in kdb_trap (type=3, code=0, tf=0xca54b918) at /usr/src/sys/kern/subr_kdb.c:546 > #8 0xc0c3d7c6 in trap (frame=0xca54b918) at /usr/src/sys/i386/i386/trap.c:732 > #9 0xc0c2647c in calltrap () at /usr/src/sys/i386/i386/exception.s:168 > #10 0xc091118a in kdb_enter (why=0xc0d2410e "panic", msg=0xc0d2410e "panic") at cpufunc.h:71 > #11 0xc08dcd14 in panic (fmt=0xc0d27986 "lock \"%s\" %p already initialized") > at /usr/src/sys/kern/kern_shutdown.c:574 > #12 0xc0911bd4 in lock_init (lock=0xc147b204, class=0xc0e23a00, name=0xc0d3f215 "cc_list", > type=0x0, flags=2228224) at /usr/src/sys/kern/subr_lock.c:81 > #13 0xc08daf5d in rw_init_flags (rw=0xc101c418, name=0xc0d3f215 "cc_list", opts=0) > at /usr/src/sys/kern/kern_rwlock.c:195 > #14 0xc0a0d0c2 in cc_init () at /usr/src/sys/netinet/cc/cc.c:182 > #15 0xc0a7a4fd in tcp_init () at /usr/src/sys/netinet/tcp_subr.c:281 > #16 0xc0940e59 in protosw_init (pr=0x0) at /usr/src/sys/kern/uipc_domain.c:157 > #17 0xc0940e87 in domain_init (arg=0xc0e34280) at /usr/src/sys/kern/uipc_domain.c:174 > #18 0xc0940ee1 in vnet_domain_init (arg=0xc0e34280) at /usr/src/sys/kern/uipc_domain.c:190 > #19 0xc09adb2e in vnet_sysinit () at /usr/src/sys/net/vnet.c:625 > #20 0xc09ae1ef in vnet_alloc () at /usr/src/sys/net/vnet.c:254 > #21 0xc08ba41a in kern_jail_set (td=0xc306d870, optuio=0xc2d66a80, flags=0) > at /usr/src/sys/kern/kern_jail.c:1244 > #22 0xc08bbd00 in jail_set (td=0xc306d870, uap=0xca54bcec) at /usr/src/sys/kern/kern_jail.c:489 > #23 0xc091e903 in syscallenter (td=0xc306d870, sa=0xca54bce4) > at /usr/src/sys/kern/subr_trap.c:318 > #24 0xc0c3cebf in syscall (frame=0xca54bd28) at /usr/src/sys/i386/i386/trap.c:1095 > #25 0xc0c26511 in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:266 > #26 0x00000033 in ?? () > Would you mind testing the following patch? It fixes the panic for me. http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit.patch There are other VIMAGE related problems with r215166 as well. I'll try get to them as time permits. Cheers, Lawrence From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 01:37:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 430781065778; Sun, 14 Nov 2010 01:37:09 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 311508FC08; Sun, 14 Nov 2010 01:37:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAE1b9Pk066155; Sun, 14 Nov 2010 01:37:09 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE1b9CW066153; Sun, 14 Nov 2010 01:37:09 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201011140137.oAE1b9CW066153@svn.freebsd.org> From: Warner Losh Date: Sun, 14 Nov 2010 01:37:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215274 - head/share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 01:37:09 -0000 Author: imp Date: Sun Nov 14 01:37:08 2010 New Revision: 215274 URL: http://svn.freebsd.org/changeset/base/215274 Log: This case is actually powerpc specific, and doesn't apply to powerpc64. Submitted by: nathanw@ Modified: head/share/mk/bsd.cpu.mk Modified: head/share/mk/bsd.cpu.mk ============================================================================== --- head/share/mk/bsd.cpu.mk Sun Nov 14 01:06:10 2010 (r215273) +++ head/share/mk/bsd.cpu.mk Sun Nov 14 01:37:08 2010 (r215274) @@ -114,7 +114,7 @@ _CPUCFLAGS = -march=armv5te -D__XSCALE__ . else _CPUCFLAGS = -mcpu=${CPUTYPE} . endif -. elif ${MACHINE_CPUARCH} == "powerpc" +. elif ${MACHINE_ARCH} == "powerpc" . if ${CPUTYPE} == "e500" MACHINE_CPU = booke _CPUCFLAGS = -Wa,-me500 -msoft-float From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 01:50:41 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49959106566B; Sun, 14 Nov 2010 01:50:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37D038FC12; Sun, 14 Nov 2010 01:50:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAE1ofUj066460; Sun, 14 Nov 2010 01:50:41 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE1ofJi066458; Sun, 14 Nov 2010 01:50:41 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201011140150.oAE1ofJi066458@svn.freebsd.org> From: Warner Losh Date: Sun, 14 Nov 2010 01:50:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215275 - head/gnu/lib/libgcc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 01:50:41 -0000 Author: imp Date: Sun Nov 14 01:50:40 2010 New Revision: 215275 URL: http://svn.freebsd.org/changeset/base/215275 Log: These two cases should be different... Submitted by: nathanw@ Modified: head/gnu/lib/libgcc/Makefile Modified: head/gnu/lib/libgcc/Makefile ============================================================================== --- head/gnu/lib/libgcc/Makefile Sun Nov 14 01:37:08 2010 (r215274) +++ head/gnu/lib/libgcc/Makefile Sun Nov 14 01:50:40 2010 (r215275) @@ -140,13 +140,13 @@ LIB1ASMFUNCS = __divxf3 __divdf3 __divsf LIB2ADDEH = unwind-ia64.c unwind-sjlj.c unwind-c.c .endif -.if ${TARGET_CPUARCH} == "powerpc" +.if ${TARGET_ARCH} == "powerpc" # from config/rs6000/t-ppccomm LIB2FUNCS_EXTRA = tramp.asm LIB2FUNCS_STATIC_EXTRA = eabi.asm .endif -.if ${TARGET_CPUARCH} == "powerpc64" +.if ${TARGET_ARCH} == "powerpc64" # from config/rs6000/t-ppccomm LIB2FUNCS_EXTRA = tramp.asm .endif From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 01:52:19 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE9FE106566C; Sun, 14 Nov 2010 01:52:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A0D148FC08; Sun, 14 Nov 2010 01:52:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAE1qJpa066527; Sun, 14 Nov 2010 01:52:19 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE1qJQI066522; Sun, 14 Nov 2010 01:52:19 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201011140152.oAE1qJQI066522@svn.freebsd.org> From: Warner Losh Date: Sun, 14 Nov 2010 01:52:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215276 - in head/gnu/usr.bin: binutils cc gdb gdb/libgdb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 01:52:19 -0000 Author: imp Date: Sun Nov 14 01:52:19 2010 New Revision: 215276 URL: http://svn.freebsd.org/changeset/base/215276 Log: We need to add powerpc64->powerpc translations (I knew I hated copying this code in the first place). Also MACHINE_ARCH powerpc is 32-bit, not MACHINE_CPUARCH == powerpc. Submitted by: nathanw Modified: head/gnu/usr.bin/binutils/Makefile.inc0 head/gnu/usr.bin/cc/Makefile.tgt head/gnu/usr.bin/gdb/Makefile.inc head/gnu/usr.bin/gdb/libgdb/Makefile Modified: head/gnu/usr.bin/binutils/Makefile.inc0 ============================================================================== --- head/gnu/usr.bin/binutils/Makefile.inc0 Sun Nov 14 01:50:40 2010 (r215275) +++ head/gnu/usr.bin/binutils/Makefile.inc0 Sun Nov 14 01:52:19 2010 (r215276) @@ -7,7 +7,7 @@ VERSION= "2.15 [FreeBSD] 2004-05-23" .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/} +TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif @@ -27,7 +27,7 @@ RELSRC= ${RELTOP}/../../../contrib/binut SRCDIR= ${.CURDIR}/${RELSRC} .if ${TARGET_CPUARCH} == "arm" || ${TARGET_CPUARCH} == "i386" || \ - ${TARGET_CPUARCH} == "powerpc" || \ + ${TARGET_ARCH} == "powerpc" || \ (${TARGET_CPUARCH} == "mips" && \ (!defined(TARGET_ABI) || ${TARGET_ABI} != "n64")) CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32 Modified: head/gnu/usr.bin/cc/Makefile.tgt ============================================================================== --- head/gnu/usr.bin/cc/Makefile.tgt Sun Nov 14 01:50:40 2010 (r215275) +++ head/gnu/usr.bin/cc/Makefile.tgt Sun Nov 14 01:52:19 2010 (r215276) @@ -4,7 +4,7 @@ # MACHINE_CPUARCH, but there's no easy way to export make functions... .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/} +TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif Modified: head/gnu/usr.bin/gdb/Makefile.inc ============================================================================== --- head/gnu/usr.bin/gdb/Makefile.inc Sun Nov 14 01:50:40 2010 (r215275) +++ head/gnu/usr.bin/gdb/Makefile.inc Sun Nov 14 01:52:19 2010 (r215276) @@ -20,7 +20,7 @@ OBJ_GDB= ${OBJ_ROOT}/gdb # MACHINE_CPUARCH, but there's no easy way to export make functions... .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/} +TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif Modified: head/gnu/usr.bin/gdb/libgdb/Makefile ============================================================================== --- head/gnu/usr.bin/gdb/libgdb/Makefile Sun Nov 14 01:50:40 2010 (r215275) +++ head/gnu/usr.bin/gdb/libgdb/Makefile Sun Nov 14 01:52:19 2010 (r215276) @@ -4,7 +4,7 @@ # MACHINE_CPUARCH, but there's no easy way to export make functions... .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/} +TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 05:01:41 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40943106564A; Sun, 14 Nov 2010 05:01:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F2B18FC15; Sun, 14 Nov 2010 05:01:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAE51f47070814; Sun, 14 Nov 2010 05:01:41 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE51fNc070812; Sun, 14 Nov 2010 05:01:41 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201011140501.oAE51fNc070812@svn.freebsd.org> From: Warner Losh Date: Sun, 14 Nov 2010 05:01:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215279 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 05:01:41 -0000 Author: imp Date: Sun Nov 14 05:01:40 2010 New Revision: 215279 URL: http://svn.freebsd.org/changeset/base/215279 Log: add / to the translation of TARGET_ARCH to TARGET Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sun Nov 14 02:38:29 2010 (r215278) +++ head/Makefile.inc1 Sun Nov 14 05:01:40 2010 (r215279) @@ -121,7 +121,7 @@ VERSION+= ${OSRELDATE} TARGET_ARCH= ${TARGET:S/pc98/i386/:S/sun4v/sparc64/:S/mips/mipsel/} .elif !defined(TARGET) && defined(TARGET_ARCH) && \ ${TARGET_ARCH} != ${MACHINE_ARCH} -TARGET= ${TARGET_ARCH:C/mipse[lb]/mips/:C/armeb/arm} +TARGET= ${TARGET_ARCH:C/mipse[lb]/mips/:C/armeb/arm/} .endif # Legacy names, for a transition period mips:mips -> mipsel:mips .if defined(TARGET) && defined(TARGET_ARCH) && \ From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 05:05:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55840106566B; Sun, 14 Nov 2010 05:05:42 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43D208FC18; Sun, 14 Nov 2010 05:05:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAE55gHx070919; Sun, 14 Nov 2010 05:05:42 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE55glh070917; Sun, 14 Nov 2010 05:05:42 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201011140505.oAE55glh070917@svn.freebsd.org> From: Xin LI Date: Sun, 14 Nov 2010 05:05:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215280 - head/sys/dev/arcmsr X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 05:05:42 -0000 Author: delphij Date: Sun Nov 14 05:05:41 2010 New Revision: 215280 URL: http://svn.freebsd.org/changeset/base/215280 Log: Workaround build for PAE case for now - revert the PHYS case to previous panic behavior. I have a real fix that changes the sg dma tag allocation to be limited to the under 4GB address space but would prefer to have review before committing. Modified: head/sys/dev/arcmsr/arcmsr.c Modified: head/sys/dev/arcmsr/arcmsr.c ============================================================================== --- head/sys/dev/arcmsr/arcmsr.c Sun Nov 14 05:01:40 2010 (r215279) +++ head/sys/dev/arcmsr/arcmsr.c Sun Nov 14 05:05:41 2010 (r215280) @@ -2470,11 +2470,15 @@ static void arcmsr_action(struct cam_sim splx(s); } else { /* Buffer is physical */ +#ifdef PAE + panic("arcmsr: CAM_DATA_PHYS not supported"); +#else struct bus_dma_segment seg; seg.ds_addr = (bus_addr_t)pccb->csio.data_ptr; seg.ds_len = pccb->csio.dxfer_len; arcmsr_execute_srb(srb, &seg, 1, 0); +#endif } } else { /* Scatter/gather list */ From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 06:09:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 850031065674; Sun, 14 Nov 2010 06:09:50 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 723328FC0A; Sun, 14 Nov 2010 06:09:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAE69oaZ072196; Sun, 14 Nov 2010 06:09:50 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE69oqd072190; Sun, 14 Nov 2010 06:09:50 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011140609.oAE69oqd072190@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 06:09:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215281 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 06:09:50 -0000 Author: brucec Date: Sun Nov 14 06:09:50 2010 New Revision: 215281 URL: http://svn.freebsd.org/changeset/base/215281 Log: Add some descriptions to sys/kern sysctls. PR: kern/148710 Tested by: Chip Camden MFC after: 1 week Modified: head/sys/kern/kern_proc.c head/sys/kern/kern_tc.c head/sys/kern/subr_clock.c head/sys/kern/sysv_sem.c head/sys/kern/vfs_cache.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Sun Nov 14 05:05:41 2010 (r215280) +++ head/sys/kern/kern_proc.c Sun Nov 14 06:09:50 2010 (r215281) @@ -144,7 +144,7 @@ struct mtx ppeers_lock; uma_zone_t proc_zone; int kstack_pages = KSTACK_PAGES; -SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, ""); +SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, "Kernel stack size in pages"); CTASSERT(sizeof(struct kinfo_proc) == KINFO_PROC_SIZE); #ifdef COMPAT_FREEBSD32 Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Sun Nov 14 05:05:41 2010 (r215280) +++ head/sys/kern/kern_tc.c Sun Nov 14 06:09:50 2010 (r215281) @@ -103,7 +103,7 @@ SYSCTL_NODE(_kern_timecounter, OID_AUTO, static int timestepwarnings; SYSCTL_INT(_kern_timecounter, OID_AUTO, stepwarnings, CTLFLAG_RW, - ×tepwarnings, 0, ""); + ×tepwarnings, 0, "Log time steps"); static void tc_windup(void); static void cpu_tick_calibrate(int); @@ -560,7 +560,7 @@ sysctl_kern_timecounter_hardware(SYSCTL_ } SYSCTL_PROC(_kern_timecounter, OID_AUTO, hardware, CTLTYPE_STRING | CTLFLAG_RW, - 0, 0, sysctl_kern_timecounter_hardware, "A", ""); + 0, 0, sysctl_kern_timecounter_hardware, "A", "Timecounter hardware selected"); /* Report or change the active timecounter hardware. */ @@ -583,7 +583,7 @@ sysctl_kern_timecounter_choice(SYSCTL_HA } SYSCTL_PROC(_kern_timecounter, OID_AUTO, choice, CTLTYPE_STRING | CTLFLAG_RD, - 0, 0, sysctl_kern_timecounter_choice, "A", ""); + 0, 0, sysctl_kern_timecounter_choice, "A", "Timecounter hardware detected"); /* * RFC 2783 PPS-API implementation. @@ -768,7 +768,7 @@ pps_event(struct pps_state *pps, int eve */ static int tc_tick; -SYSCTL_INT(_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, &tc_tick, 0, ""); +SYSCTL_INT(_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, &tc_tick, 0, "Approximate number of hardclock ticks in a millisecond"); void tc_ticktock(int cnt) Modified: head/sys/kern/subr_clock.c ============================================================================== --- head/sys/kern/subr_clock.c Sun Nov 14 05:05:41 2010 (r215280) +++ head/sys/kern/subr_clock.c Sun Nov 14 06:09:50 2010 (r215281) @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); #include #define ct_debug bootverbose -static int adjkerntz; /* local offset from GMT in seconds */ +static int adjkerntz; /* local offset from UTC in seconds */ static int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */ int tz_minuteswest; @@ -61,7 +61,7 @@ int tz_dsttime; * kern. */ SYSCTL_INT(_machdep, OID_AUTO, wall_cmos_clock, - CTLFLAG_RW, &wall_cmos_clock, 0, ""); + CTLFLAG_RW, &wall_cmos_clock, 0, "CMOS clock keeps wall time"); static int sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ARGS) @@ -74,7 +74,7 @@ sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ } SYSCTL_PROC(_machdep, OID_AUTO, adjkerntz, CTLTYPE_INT|CTLFLAG_RW, - &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", ""); + &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", "Local offset from UTC in seconds"); /*--------------------------------------------------------------------* * Generic routines to convert between a POSIX date Modified: head/sys/kern/sysv_sem.c ============================================================================== --- head/sys/kern/sysv_sem.c Sun Nov 14 05:05:41 2010 (r215280) +++ head/sys/kern/sysv_sem.c Sun Nov 14 06:09:50 2010 (r215281) @@ -212,7 +212,7 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, semvmx, SYSCTL_INT(_kern_ipc, OID_AUTO, semaem, CTLFLAG_RW, &seminfo.semaem, 0, "Adjust on exit max value"); SYSCTL_PROC(_kern_ipc, OID_AUTO, sema, CTLFLAG_RD, - NULL, 0, sysctl_sema, "", ""); + NULL, 0, sysctl_sema, "", "Semaphore id pool"); static struct syscall_helper_data sem_syscalls[] = { SYSCALL_INIT_HELPER(__semctl), Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Sun Nov 14 05:05:41 2010 (r215280) +++ head/sys/kern/vfs_cache.c Sun Nov 14 06:09:50 2010 (r215281) @@ -184,27 +184,27 @@ SYSCTL_INT(_debug, OID_AUTO, vfscache, C /* Export size information to userland */ SYSCTL_INT(_debug_sizeof, OID_AUTO, namecache, CTLFLAG_RD, 0, - sizeof(struct namecache), ""); + sizeof(struct namecache), "sizeof(struct namecache)"); /* * The new name cache statistics */ static SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW, 0, "Name cache statistics"); -#define STATNODE(mode, name, var) \ - SYSCTL_ULONG(_vfs_cache, OID_AUTO, name, mode, var, 0, ""); -STATNODE(CTLFLAG_RD, numneg, &numneg); -STATNODE(CTLFLAG_RD, numcache, &numcache); -static u_long numcalls; STATNODE(CTLFLAG_RD, numcalls, &numcalls); -static u_long dothits; STATNODE(CTLFLAG_RD, dothits, &dothits); -static u_long dotdothits; STATNODE(CTLFLAG_RD, dotdothits, &dotdothits); -static u_long numchecks; STATNODE(CTLFLAG_RD, numchecks, &numchecks); -static u_long nummiss; STATNODE(CTLFLAG_RD, nummiss, &nummiss); -static u_long nummisszap; STATNODE(CTLFLAG_RD, nummisszap, &nummisszap); -static u_long numposzaps; STATNODE(CTLFLAG_RD, numposzaps, &numposzaps); -static u_long numposhits; STATNODE(CTLFLAG_RD, numposhits, &numposhits); -static u_long numnegzaps; STATNODE(CTLFLAG_RD, numnegzaps, &numnegzaps); -static u_long numneghits; STATNODE(CTLFLAG_RD, numneghits, &numneghits); -static u_long numupgrades; STATNODE(CTLFLAG_RD, numupgrades, &numupgrades); +#define STATNODE(mode, name, var, descr) \ + SYSCTL_ULONG(_vfs_cache, OID_AUTO, name, mode, var, 0, descr); +STATNODE(CTLFLAG_RD, numneg, &numneg, "Number of negative cache entries"); +STATNODE(CTLFLAG_RD, numcache, &numcache, "Number of cache entries"); +static u_long numcalls; STATNODE(CTLFLAG_RD, numcalls, &numcalls, "Number of cache lookups"); +static u_long dothits; STATNODE(CTLFLAG_RD, dothits, &dothits, "Number of '.' hits"); +static u_long dotdothits; STATNODE(CTLFLAG_RD, dotdothits, &dotdothits, "Number of '..' hits"); +static u_long numchecks; STATNODE(CTLFLAG_RD, numchecks, &numchecks, "Number of checks in lookup"); +static u_long nummiss; STATNODE(CTLFLAG_RD, nummiss, &nummiss, "Number of cache misses"); +static u_long nummisszap; STATNODE(CTLFLAG_RD, nummisszap, &nummisszap, "Number of cache misses we do not want to cache"); +static u_long numposzaps; STATNODE(CTLFLAG_RD, numposzaps, &numposzaps, "Number of cache hits (positive) we do not want to cache"); +static u_long numposhits; STATNODE(CTLFLAG_RD, numposhits, &numposhits, "Number of cache hits (positive)"); +static u_long numnegzaps; STATNODE(CTLFLAG_RD, numnegzaps, &numnegzaps, "Number of cache hits (negative) we do not want to cache"); +static u_long numneghits; STATNODE(CTLFLAG_RD, numneghits, &numneghits, "Number of cache hits (negative)"); +static u_long numupgrades; STATNODE(CTLFLAG_RD, numupgrades, &numupgrades, "Number of updates of the cache after lookup (write lock + retry)"); SYSCTL_OPAQUE(_vfs_cache, OID_AUTO, nchstats, CTLFLAG_RD | CTLFLAG_MPSAFE, &nchstats, sizeof(nchstats), "LU", "VFS cache effectiveness statistics"); @@ -970,20 +970,20 @@ kern___getcwd(struct thread *td, u_char */ #undef STATNODE -#define STATNODE(name) \ +#define STATNODE(name, descr) \ static u_int name; \ - SYSCTL_UINT(_vfs_cache, OID_AUTO, name, CTLFLAG_RD, &name, 0, "") + SYSCTL_UINT(_vfs_cache, OID_AUTO, name, CTLFLAG_RD, &name, 0, descr) static int disablefullpath; SYSCTL_INT(_debug, OID_AUTO, disablefullpath, CTLFLAG_RW, &disablefullpath, 0, "Disable the vn_fullpath function"); /* These count for kern___getcwd(), too. */ -STATNODE(numfullpathcalls); -STATNODE(numfullpathfail1); -STATNODE(numfullpathfail2); -STATNODE(numfullpathfail4); -STATNODE(numfullpathfound); +STATNODE(numfullpathcalls, "Number of fullpath search calls"); +STATNODE(numfullpathfail1, "Number of fullpath search errors (ENOTDIR)"); +STATNODE(numfullpathfail2, "Number of fullpath search errors (VOP_VPTOCNP failures)"); +STATNODE(numfullpathfail4, "Number of fullpath search errors (ENOMEM)"); +STATNODE(numfullpathfound, "Number of successful fullpath calls"); /* * Retrieve the full filesystem path that correspond to a vnode from the name From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 07:38:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFDDF1065672; Sun, 14 Nov 2010 07:38:42 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CDF798FC0A; Sun, 14 Nov 2010 07:38:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAE7cgXO074212; Sun, 14 Nov 2010 07:38:42 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE7cgLK074210; Sun, 14 Nov 2010 07:38:42 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011140738.oAE7cgLK074210@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 07:38:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215282 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 07:38:43 -0000 Author: brucec Date: Sun Nov 14 07:38:42 2010 New Revision: 215282 URL: http://svn.freebsd.org/changeset/base/215282 Log: Add descriptions to some more sysctls. PR: kern/148510 MFC after: 1 week Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun Nov 14 06:09:50 2010 (r215281) +++ head/sys/kern/vfs_subr.c Sun Nov 14 07:38:42 2010 (r215282) @@ -121,7 +121,7 @@ static void destroy_vpollinfo(struct vpo */ static unsigned long numvnodes; -SYSCTL_LONG(_vfs, OID_AUTO, numvnodes, CTLFLAG_RD, &numvnodes, 0, ""); +SYSCTL_LONG(_vfs, OID_AUTO, numvnodes, CTLFLAG_RD, &numvnodes, 0, "Number of vnodes in existence"); /* * Conversion tables for conversion from vnode types to inode formats @@ -150,7 +150,7 @@ static u_long wantfreevnodes; SYSCTL_LONG(_vfs, OID_AUTO, wantfreevnodes, CTLFLAG_RW, &wantfreevnodes, 0, ""); /* Number of vnodes in the free list. */ static u_long freevnodes; -SYSCTL_LONG(_vfs, OID_AUTO, freevnodes, CTLFLAG_RD, &freevnodes, 0, ""); +SYSCTL_LONG(_vfs, OID_AUTO, freevnodes, CTLFLAG_RD, &freevnodes, 0, "Number of vnodes in the free list"); static int vlru_allow_cache_src; SYSCTL_INT(_vfs, OID_AUTO, vlru_allow_cache_src, CTLFLAG_RW, @@ -162,7 +162,7 @@ SYSCTL_INT(_vfs, OID_AUTO, vlru_allow_ca * XXX these are probably of (very) limited utility now. */ static int reassignbufcalls; -SYSCTL_INT(_vfs, OID_AUTO, reassignbufcalls, CTLFLAG_RW, &reassignbufcalls, 0, ""); +SYSCTL_INT(_vfs, OID_AUTO, reassignbufcalls, CTLFLAG_RW, &reassignbufcalls, 0, "Number of calls to reassignbuf"); /* * Cache for the mount type id assigned to NFS. This is used for @@ -237,14 +237,14 @@ static struct cv sync_wakeup; static int syncer_maxdelay = SYNCER_MAXDELAY; /* maximum delay time */ static int syncdelay = 30; /* max time to delay syncing data */ static int filedelay = 30; /* time to delay syncing files */ -SYSCTL_INT(_kern, OID_AUTO, filedelay, CTLFLAG_RW, &filedelay, 0, ""); +SYSCTL_INT(_kern, OID_AUTO, filedelay, CTLFLAG_RW, &filedelay, 0, "Time to delay syncing files (in seconds)"); static int dirdelay = 29; /* time to delay syncing directories */ -SYSCTL_INT(_kern, OID_AUTO, dirdelay, CTLFLAG_RW, &dirdelay, 0, ""); +SYSCTL_INT(_kern, OID_AUTO, dirdelay, CTLFLAG_RW, &dirdelay, 0, "Time to delay syncing directories (in seconds)"); static int metadelay = 28; /* time to delay syncing metadata */ -SYSCTL_INT(_kern, OID_AUTO, metadelay, CTLFLAG_RW, &metadelay, 0, ""); +SYSCTL_INT(_kern, OID_AUTO, metadelay, CTLFLAG_RW, &metadelay, 0, "Time to delay syncing metadata (in seconds)"); static int rushjob; /* number of slots to run ASAP */ static int stat_rush_requests; /* number of times I/O speeded up */ -SYSCTL_INT(_debug, OID_AUTO, rush_requests, CTLFLAG_RW, &stat_rush_requests, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, rush_requests, CTLFLAG_RW, &stat_rush_requests, 0, "Number of times I/O speeded up (rush requests)"); /* * When shutting down the syncer, run it at four times normal speed. @@ -544,7 +544,7 @@ enum { TSP_SEC, TSP_HZ, TSP_USEC, TSP_NS static int timestamp_precision = TSP_SEC; SYSCTL_INT(_vfs, OID_AUTO, timestamp_precision, CTLFLAG_RW, - ×tamp_precision, 0, ""); + ×tamp_precision, 0, "File timestamp precision (0: seconds, 1: sec + ns accurate to 1/HZ, 2: sec + ns truncated to ms, 3+: sec + ns (max. precision))"); /* * Get a current timestamp. @@ -2376,7 +2376,7 @@ vinactive(struct vnode *vp, struct threa */ #ifdef DIAGNOSTIC static int busyprt = 0; /* print out busy vnodes */ -SYSCTL_INT(_debug, OID_AUTO, busyprt, CTLFLAG_RW, &busyprt, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, busyprt, CTLFLAG_RW, &busyprt, 0, "Print out busy vnodes"); #endif int @@ -3712,17 +3712,17 @@ extattr_check_cred(struct vnode *vp, int (vp)->v_type == VCHR || (vp)->v_type == VBAD) int vfs_badlock_ddb = 1; /* Drop into debugger on violation. */ -SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_ddb, CTLFLAG_RW, &vfs_badlock_ddb, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_ddb, CTLFLAG_RW, &vfs_badlock_ddb, 0, "Drop into debugger on lock violation"); int vfs_badlock_mutex = 1; /* Check for interlock across VOPs. */ -SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_mutex, CTLFLAG_RW, &vfs_badlock_mutex, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_mutex, CTLFLAG_RW, &vfs_badlock_mutex, 0, "Check for interlock across VOPs"); int vfs_badlock_print = 1; /* Print lock violations. */ -SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_print, CTLFLAG_RW, &vfs_badlock_print, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_print, CTLFLAG_RW, &vfs_badlock_print, 0, "Print lock violations"); #ifdef KDB int vfs_badlock_backtrace = 1; /* Print backtrace at lock violations. */ -SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_backtrace, CTLFLAG_RW, &vfs_badlock_backtrace, 0, ""); +SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_backtrace, CTLFLAG_RW, &vfs_badlock_backtrace, 0, "Print backtrace at lock violations"); #endif static void From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 08:06:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E98A106566B; Sun, 14 Nov 2010 08:06:29 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8BDF78FC18; Sun, 14 Nov 2010 08:06:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAE86TuS074764; Sun, 14 Nov 2010 08:06:29 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE86TgB074758; Sun, 14 Nov 2010 08:06:29 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011140806.oAE86TgB074758@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 08:06:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215283 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 08:06:29 -0000 Author: brucec Date: Sun Nov 14 08:06:29 2010 New Revision: 215283 URL: http://svn.freebsd.org/changeset/base/215283 Log: Fix style(9) issues from r215281 and r215282. MFC after: 1 week Modified: head/sys/kern/kern_proc.c head/sys/kern/kern_tc.c head/sys/kern/subr_clock.c head/sys/kern/vfs_cache.c head/sys/kern/vfs_subr.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Sun Nov 14 07:38:42 2010 (r215282) +++ head/sys/kern/kern_proc.c Sun Nov 14 08:06:29 2010 (r215283) @@ -144,7 +144,8 @@ struct mtx ppeers_lock; uma_zone_t proc_zone; int kstack_pages = KSTACK_PAGES; -SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, "Kernel stack size in pages"); +SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, + "Kernel stack size in pages"); CTASSERT(sizeof(struct kinfo_proc) == KINFO_PROC_SIZE); #ifdef COMPAT_FREEBSD32 Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Sun Nov 14 07:38:42 2010 (r215282) +++ head/sys/kern/kern_tc.c Sun Nov 14 08:06:29 2010 (r215283) @@ -560,7 +560,8 @@ sysctl_kern_timecounter_hardware(SYSCTL_ } SYSCTL_PROC(_kern_timecounter, OID_AUTO, hardware, CTLTYPE_STRING | CTLFLAG_RW, - 0, 0, sysctl_kern_timecounter_hardware, "A", "Timecounter hardware selected"); + 0, 0, sysctl_kern_timecounter_hardware, "A", + "Timecounter hardware selected"); /* Report or change the active timecounter hardware. */ @@ -768,7 +769,8 @@ pps_event(struct pps_state *pps, int eve */ static int tc_tick; -SYSCTL_INT(_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, &tc_tick, 0, "Approximate number of hardclock ticks in a millisecond"); +SYSCTL_INT(_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, &tc_tick, 0, + "Approximate number of hardclock ticks in a millisecond"); void tc_ticktock(int cnt) Modified: head/sys/kern/subr_clock.c ============================================================================== --- head/sys/kern/subr_clock.c Sun Nov 14 07:38:42 2010 (r215282) +++ head/sys/kern/subr_clock.c Sun Nov 14 08:06:29 2010 (r215283) @@ -74,7 +74,8 @@ sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ } SYSCTL_PROC(_machdep, OID_AUTO, adjkerntz, CTLTYPE_INT|CTLFLAG_RW, - &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", "Local offset from UTC in seconds"); + &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", + "Local offset from UTC in seconds"); /*--------------------------------------------------------------------* * Generic routines to convert between a POSIX date Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Sun Nov 14 07:38:42 2010 (r215282) +++ head/sys/kern/vfs_cache.c Sun Nov 14 08:06:29 2010 (r215283) @@ -189,25 +189,38 @@ SYSCTL_INT(_debug_sizeof, OID_AUTO, name /* * The new name cache statistics */ -static SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW, 0, "Name cache statistics"); +static SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW, 0, + "Name cache statistics"); #define STATNODE(mode, name, var, descr) \ SYSCTL_ULONG(_vfs_cache, OID_AUTO, name, mode, var, 0, descr); STATNODE(CTLFLAG_RD, numneg, &numneg, "Number of negative cache entries"); STATNODE(CTLFLAG_RD, numcache, &numcache, "Number of cache entries"); -static u_long numcalls; STATNODE(CTLFLAG_RD, numcalls, &numcalls, "Number of cache lookups"); -static u_long dothits; STATNODE(CTLFLAG_RD, dothits, &dothits, "Number of '.' hits"); -static u_long dotdothits; STATNODE(CTLFLAG_RD, dotdothits, &dotdothits, "Number of '..' hits"); -static u_long numchecks; STATNODE(CTLFLAG_RD, numchecks, &numchecks, "Number of checks in lookup"); -static u_long nummiss; STATNODE(CTLFLAG_RD, nummiss, &nummiss, "Number of cache misses"); -static u_long nummisszap; STATNODE(CTLFLAG_RD, nummisszap, &nummisszap, "Number of cache misses we do not want to cache"); -static u_long numposzaps; STATNODE(CTLFLAG_RD, numposzaps, &numposzaps, "Number of cache hits (positive) we do not want to cache"); -static u_long numposhits; STATNODE(CTLFLAG_RD, numposhits, &numposhits, "Number of cache hits (positive)"); -static u_long numnegzaps; STATNODE(CTLFLAG_RD, numnegzaps, &numnegzaps, "Number of cache hits (negative) we do not want to cache"); -static u_long numneghits; STATNODE(CTLFLAG_RD, numneghits, &numneghits, "Number of cache hits (negative)"); -static u_long numupgrades; STATNODE(CTLFLAG_RD, numupgrades, &numupgrades, "Number of updates of the cache after lookup (write lock + retry)"); +static u_long numcalls; STATNODE(CTLFLAG_RD, numcalls, &numcalls, + "Number of cache lookups"); +static u_long dothits; STATNODE(CTLFLAG_RD, dothits, &dothits, + "Number of '.' hits"); +static u_long dotdothits; STATNODE(CTLFLAG_RD, dotdothits, &dotdothits, + "Number of '..' hits"); +static u_long numchecks; STATNODE(CTLFLAG_RD, numchecks, &numchecks, + "Number of checks in lookup"); +static u_long nummiss; STATNODE(CTLFLAG_RD, nummiss, &nummiss, + "Number of cache misses"); +static u_long nummisszap; STATNODE(CTLFLAG_RD, nummisszap, &nummisszap, + "Number of cache misses we do not want to cache"); +static u_long numposzaps; STATNODE(CTLFLAG_RD, numposzaps, &numposzaps, + "Number of cache hits (positive) we do not want to cache"); +static u_long numposhits; STATNODE(CTLFLAG_RD, numposhits, &numposhits, + "Number of cache hits (positive)"); +static u_long numnegzaps; STATNODE(CTLFLAG_RD, numnegzaps, &numnegzaps, + "Number of cache hits (negative) we do not want to cache"); +static u_long numneghits; STATNODE(CTLFLAG_RD, numneghits, &numneghits, + "Number of cache hits (negative)"); +static u_long numupgrades; STATNODE(CTLFLAG_RD, numupgrades, &numupgrades, + "Number of updates of the cache after lookup (write lock + retry)"); SYSCTL_OPAQUE(_vfs_cache, OID_AUTO, nchstats, CTLFLAG_RD | CTLFLAG_MPSAFE, - &nchstats, sizeof(nchstats), "LU", "VFS cache effectiveness statistics"); + &nchstats, sizeof(nchstats), "LU", + "VFS cache effectiveness statistics"); @@ -981,7 +994,8 @@ SYSCTL_INT(_debug, OID_AUTO, disablefull /* These count for kern___getcwd(), too. */ STATNODE(numfullpathcalls, "Number of fullpath search calls"); STATNODE(numfullpathfail1, "Number of fullpath search errors (ENOTDIR)"); -STATNODE(numfullpathfail2, "Number of fullpath search errors (VOP_VPTOCNP failures)"); +STATNODE(numfullpathfail2, + "Number of fullpath search errors (VOP_VPTOCNP failures)"); STATNODE(numfullpathfail4, "Number of fullpath search errors (ENOMEM)"); STATNODE(numfullpathfound, "Number of successful fullpath calls"); Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun Nov 14 07:38:42 2010 (r215282) +++ head/sys/kern/vfs_subr.c Sun Nov 14 08:06:29 2010 (r215283) @@ -121,7 +121,8 @@ static void destroy_vpollinfo(struct vpo */ static unsigned long numvnodes; -SYSCTL_LONG(_vfs, OID_AUTO, numvnodes, CTLFLAG_RD, &numvnodes, 0, "Number of vnodes in existence"); +SYSCTL_LONG(_vfs, OID_AUTO, numvnodes, CTLFLAG_RD, &numvnodes, 0, + "Number of vnodes in existence"); /* * Conversion tables for conversion from vnode types to inode formats @@ -150,7 +151,8 @@ static u_long wantfreevnodes; SYSCTL_LONG(_vfs, OID_AUTO, wantfreevnodes, CTLFLAG_RW, &wantfreevnodes, 0, ""); /* Number of vnodes in the free list. */ static u_long freevnodes; -SYSCTL_LONG(_vfs, OID_AUTO, freevnodes, CTLFLAG_RD, &freevnodes, 0, "Number of vnodes in the free list"); +SYSCTL_LONG(_vfs, OID_AUTO, freevnodes, CTLFLAG_RD, &freevnodes, 0, + "Number of vnodes in the free list"); static int vlru_allow_cache_src; SYSCTL_INT(_vfs, OID_AUTO, vlru_allow_cache_src, CTLFLAG_RW, @@ -162,7 +164,8 @@ SYSCTL_INT(_vfs, OID_AUTO, vlru_allow_ca * XXX these are probably of (very) limited utility now. */ static int reassignbufcalls; -SYSCTL_INT(_vfs, OID_AUTO, reassignbufcalls, CTLFLAG_RW, &reassignbufcalls, 0, "Number of calls to reassignbuf"); +SYSCTL_INT(_vfs, OID_AUTO, reassignbufcalls, CTLFLAG_RW, &reassignbufcalls, 0, + "Number of calls to reassignbuf"); /* * Cache for the mount type id assigned to NFS. This is used for @@ -237,14 +240,18 @@ static struct cv sync_wakeup; static int syncer_maxdelay = SYNCER_MAXDELAY; /* maximum delay time */ static int syncdelay = 30; /* max time to delay syncing data */ static int filedelay = 30; /* time to delay syncing files */ -SYSCTL_INT(_kern, OID_AUTO, filedelay, CTLFLAG_RW, &filedelay, 0, "Time to delay syncing files (in seconds)"); +SYSCTL_INT(_kern, OID_AUTO, filedelay, CTLFLAG_RW, &filedelay, 0, + "Time to delay syncing files (in seconds)"); static int dirdelay = 29; /* time to delay syncing directories */ -SYSCTL_INT(_kern, OID_AUTO, dirdelay, CTLFLAG_RW, &dirdelay, 0, "Time to delay syncing directories (in seconds)"); +SYSCTL_INT(_kern, OID_AUTO, dirdelay, CTLFLAG_RW, &dirdelay, 0, + "Time to delay syncing directories (in seconds)"); static int metadelay = 28; /* time to delay syncing metadata */ -SYSCTL_INT(_kern, OID_AUTO, metadelay, CTLFLAG_RW, &metadelay, 0, "Time to delay syncing metadata (in seconds)"); +SYSCTL_INT(_kern, OID_AUTO, metadelay, CTLFLAG_RW, &metadelay, 0, + "Time to delay syncing metadata (in seconds)"); static int rushjob; /* number of slots to run ASAP */ static int stat_rush_requests; /* number of times I/O speeded up */ -SYSCTL_INT(_debug, OID_AUTO, rush_requests, CTLFLAG_RW, &stat_rush_requests, 0, "Number of times I/O speeded up (rush requests)"); +SYSCTL_INT(_debug, OID_AUTO, rush_requests, CTLFLAG_RW, &stat_rush_requests, 0, + "Number of times I/O speeded up (rush requests)"); /* * When shutting down the syncer, run it at four times normal speed. @@ -544,7 +551,9 @@ enum { TSP_SEC, TSP_HZ, TSP_USEC, TSP_NS static int timestamp_precision = TSP_SEC; SYSCTL_INT(_vfs, OID_AUTO, timestamp_precision, CTLFLAG_RW, - ×tamp_precision, 0, "File timestamp precision (0: seconds, 1: sec + ns accurate to 1/HZ, 2: sec + ns truncated to ms, 3+: sec + ns (max. precision))"); + ×tamp_precision, 0, "File timestamp precision (0: seconds, " + "1: sec + ns accurate to 1/HZ, 2: sec + ns truncated to ms, " + "3+: sec + ns (max. precision))"); /* * Get a current timestamp. From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 08:25:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 133151065674; Sun, 14 Nov 2010 08:25:28 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 01DFB8FC1A; Sun, 14 Nov 2010 08:25:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAE8PRW8075186; Sun, 14 Nov 2010 08:25:27 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE8PRV4075184; Sun, 14 Nov 2010 08:25:27 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011140825.oAE8PRV4075184@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 08:25:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215284 - head/sys/boot/i386/boot2 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 08:25:28 -0000 Author: brucec Date: Sun Nov 14 08:25:27 2010 New Revision: 215284 URL: http://svn.freebsd.org/changeset/base/215284 Log: When rebooting the machine jump to 0xf000:fff0 instead of 0xffff:0x0. This is the same change that was made in rev 1.33 of boot/i386/btx/btx/btx.S PR: i386/91871 Submitted by: Bjorn Konig MFC after: 1 week Modified: head/sys/boot/i386/boot2/boot1.S Modified: head/sys/boot/i386/boot2/boot1.S ============================================================================== --- head/sys/boot/i386/boot2/boot1.S Sun Nov 14 08:06:29 2010 (r215283) +++ head/sys/boot/i386/boot2/boot1.S Sun Nov 14 08:25:27 2010 (r215284) @@ -239,7 +239,7 @@ error: callw putstr # Display message xorb %ah,%ah # BIOS: Get int $0x16 # keypress movw $0x1234, BDA_BOOT # Do a warm boot - ljmp $0xffff,$0x0 # reboot the machine + ljmp $0xf000,$0x0 # reboot the machine /* * Display a null-terminated string using the BIOS output. */ From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 08:31:02 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C5A71065697; Sun, 14 Nov 2010 08:31:02 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B0E38FC19; Sun, 14 Nov 2010 08:31:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAE8V2eE075321; Sun, 14 Nov 2010 08:31:02 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE8V2iI075319; Sun, 14 Nov 2010 08:31:02 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011140831.oAE8V2iI075319@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 08:31:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215285 - head/sys/boot/i386/boot2 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 08:31:02 -0000 Author: brucec Date: Sun Nov 14 08:31:02 2010 New Revision: 215285 URL: http://svn.freebsd.org/changeset/base/215285 Log: Fix the jump location. Modified: head/sys/boot/i386/boot2/boot1.S Modified: head/sys/boot/i386/boot2/boot1.S ============================================================================== --- head/sys/boot/i386/boot2/boot1.S Sun Nov 14 08:25:27 2010 (r215284) +++ head/sys/boot/i386/boot2/boot1.S Sun Nov 14 08:31:02 2010 (r215285) @@ -239,7 +239,7 @@ error: callw putstr # Display message xorb %ah,%ah # BIOS: Get int $0x16 # keypress movw $0x1234, BDA_BOOT # Do a warm boot - ljmp $0xf000,$0x0 # reboot the machine + ljmp $0xf000,$0xfff0 # reboot the machine /* * Display a null-terminated string using the BIOS output. */ From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 09:03:43 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07D09106564A; Sun, 14 Nov 2010 09:03:43 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA7948FC14; Sun, 14 Nov 2010 09:03:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAE93gqs076079; Sun, 14 Nov 2010 09:03:42 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE93gvh076077; Sun, 14 Nov 2010 09:03:42 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011140903.oAE93gvh076077@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 09:03:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215286 - head/usr.sbin/sysinstall X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 09:03:43 -0000 Author: brucec Date: Sun Nov 14 09:03:42 2010 New Revision: 215286 URL: http://svn.freebsd.org/changeset/base/215286 Log: Connect to ftp2.tr.freebsd.org when the Turkey #2 mirror is selected. PR: bin/128587 Submitted by: Mehmet Kose MFC after: 1 week Modified: head/usr.sbin/sysinstall/menus.c Modified: head/usr.sbin/sysinstall/menus.c ============================================================================== --- head/usr.sbin/sysinstall/menus.c Sun Nov 14 08:31:02 2010 (r215285) +++ head/usr.sbin/sysinstall/menus.c Sun Nov 14 09:03:42 2010 (r215286) @@ -819,7 +819,7 @@ DMenu MenuMediaFTP = { { "Turkey", "ftp.tr.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.tr.freebsd.org" }, { " Turkey #2", "ftp2.tr.freebsd.org", NULL, dmenuSetVariable, NULL, - VAR_FTP_PATH "=ftp://ftp.tr.freebsd.org" }, + VAR_FTP_PATH "=ftp://ftp2.tr.freebsd.org" }, { "UK", "ftp.uk.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=ftp://ftp.uk.freebsd.org" }, From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 09:14:17 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEC7D1065670; Sun, 14 Nov 2010 09:14:17 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD4F48FC08; Sun, 14 Nov 2010 09:14:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAE9EHwl076312; Sun, 14 Nov 2010 09:14:17 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE9EHie076310; Sun, 14 Nov 2010 09:14:17 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011140914.oAE9EHie076310@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 09:14:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215287 - head/usr.sbin/sysinstall X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 09:14:17 -0000 Author: brucec Date: Sun Nov 14 09:14:17 2010 New Revision: 215287 URL: http://svn.freebsd.org/changeset/base/215287 Log: "Web" should not be all upper-case because it's not an acronym. PR: bin/130366 Submitted by: Royce Williams MFC after: 1 week Modified: head/usr.sbin/sysinstall/install.c Modified: head/usr.sbin/sysinstall/install.c ============================================================================== --- head/usr.sbin/sysinstall/install.c Sun Nov 14 09:03:42 2010 (r215286) +++ head/usr.sbin/sysinstall/install.c Sun Nov 14 09:14:17 2010 (r215287) @@ -756,7 +756,7 @@ nodisks: dialog_clear_norefresh(); if (!msgYesNo("The FreeBSD package collection is a collection of thousands of ready-to-run\n" - "applications, from text editors to games to WEB servers and more. Would you\n" + "applications, from text editors to games to Web servers and more. Would you\n" "like to browse the collection now?")) { (void)configPackages(self); } From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 09:33:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9FA0106566C; Sun, 14 Nov 2010 09:33:47 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9881B8FC08; Sun, 14 Nov 2010 09:33:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAE9Xl4M076729; Sun, 14 Nov 2010 09:33:47 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE9Xlxl076727; Sun, 14 Nov 2010 09:33:47 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201011140933.oAE9Xlxl076727@svn.freebsd.org> From: "Simon L. Nielsen" Date: Sun, 14 Nov 2010 09:33:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215288 - head/crypto/openssl/ssl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 09:33:47 -0000 Author: simon Date: Sun Nov 14 09:33:47 2010 New Revision: 215288 URL: http://svn.freebsd.org/changeset/base/215288 Log: Fix double-free in OpenSSL's SSL ECDH code. It has yet to be determined if this warrants a FreeBSD Security Advisory, but we might as well get it fixed in the normal branches. Obtained from: OpenSSL CVS Security: CVE-2010-2939 X-MFC after: Not long... Modified: head/crypto/openssl/ssl/s3_clnt.c Modified: head/crypto/openssl/ssl/s3_clnt.c ============================================================================== --- head/crypto/openssl/ssl/s3_clnt.c Sun Nov 14 09:14:17 2010 (r215287) +++ head/crypto/openssl/ssl/s3_clnt.c Sun Nov 14 09:33:47 2010 (r215288) @@ -1377,6 +1377,7 @@ int ssl3_get_key_exchange(SSL *s) s->session->sess_cert->peer_ecdh_tmp=ecdh; ecdh=NULL; BN_CTX_free(bn_ctx); + bn_ctx = NULL; EC_POINT_free(srvr_ecpoint); srvr_ecpoint = NULL; } From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 09:59:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D75F31065670; Sun, 14 Nov 2010 09:59:52 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C57BF8FC12; Sun, 14 Nov 2010 09:59:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAE9xqa6077240; Sun, 14 Nov 2010 09:59:52 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE9xquG077238; Sun, 14 Nov 2010 09:59:52 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011140959.oAE9xquG077238@svn.freebsd.org> From: Bernhard Schmidt Date: Sun, 14 Nov 2010 09:59:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215289 - head/sys/net80211 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 09:59:52 -0000 Author: bschmidt Date: Sun Nov 14 09:59:52 2010 New Revision: 215289 URL: http://svn.freebsd.org/changeset/base/215289 Log: The ni_rctls checks are used to verify that a ratectl algo has set up its internal data. This has been used to bypass missing calls in drivers which do not use the ratectl framework correctly. Issue is, not all algos use that variable, or even have internal data, therefore valid calls are not done. Fix this by removing the checks, all driver issues should be resolved. MFC after: 1 week Modified: head/sys/net80211/ieee80211_ratectl.h Modified: head/sys/net80211/ieee80211_ratectl.h ============================================================================== --- head/sys/net80211/ieee80211_ratectl.h Sun Nov 14 09:33:47 2010 (r215288) +++ head/sys/net80211/ieee80211_ratectl.h Sun Nov 14 09:59:52 2010 (r215289) @@ -81,8 +81,6 @@ ieee80211_ratectl_node_deinit(struct iee { const struct ieee80211vap *vap = ni->ni_vap; - if (ni->ni_rctls == NULL) /* ratectl not setup */ - return; vap->iv_rate->ir_node_deinit(ni); } @@ -91,8 +89,6 @@ ieee80211_ratectl_rate(struct ieee80211_ { const struct ieee80211vap *vap = ni->ni_vap; - if (ni->ni_rctls == NULL) /* ratectl not setup */ - return 0; return vap->iv_rate->ir_rate(ni, arg, iarg); } @@ -100,8 +96,6 @@ static void __inline ieee80211_ratectl_tx_complete(const struct ieee80211vap *vap, const struct ieee80211_node *ni, int status, void *arg1, void *arg2) { - if (ni->ni_rctls == NULL) /* ratectl not setup */ - return; vap->iv_rate->ir_tx_complete(vap, ni, status, arg1, arg2); } @@ -111,8 +105,6 @@ ieee80211_ratectl_tx_update(const struct { if (vap->iv_rate->ir_tx_update == NULL) return; - if (ni->ni_rctls == NULL) /* ratectl not setup */ - return; vap->iv_rate->ir_tx_update(vap, ni, arg1, arg2, arg3); } From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 10:04:49 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 094E11065675; Sun, 14 Nov 2010 10:04:49 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E9C628FC13; Sun, 14 Nov 2010 10:04:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEA4mJF077441; Sun, 14 Nov 2010 10:04:48 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEA4mbC077436; Sun, 14 Nov 2010 10:04:48 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011141004.oAEA4mbC077436@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 10:04:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215290 - head/usr.sbin/sysinstall X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 10:04:49 -0000 Author: brucec Date: Sun Nov 14 10:04:48 2010 New Revision: 215290 URL: http://svn.freebsd.org/changeset/base/215290 Log: ntpdate(8) hosts are now configured in rc.conf via ntpdate_hosts. PR: bin/148350 Submitted by: Joel FAEDI MFC after: 1 week Modified: head/usr.sbin/sysinstall/config.c head/usr.sbin/sysinstall/menus.c head/usr.sbin/sysinstall/sysinstall.8 head/usr.sbin/sysinstall/sysinstall.h Modified: head/usr.sbin/sysinstall/config.c ============================================================================== --- head/usr.sbin/sysinstall/config.c Sun Nov 14 09:59:52 2010 (r215289) +++ head/usr.sbin/sysinstall/config.c Sun Nov 14 10:04:48 2010 (r215290) @@ -495,14 +495,14 @@ configNTP(dialogMenuItem *self) { int status; - status = variable_get_value(VAR_NTPDATE_FLAGS, + status = variable_get_value(VAR_NTPDATE_HOSTS, "Enter the name of an NTP server", 1) ? DITEM_SUCCESS : DITEM_FAILURE; if (status == DITEM_SUCCESS) { static char tmp[255]; - snprintf(tmp, sizeof(tmp), "ntpdate_enable=YES,ntpdate_flags=%s", - variable_get(VAR_NTPDATE_FLAGS)); + snprintf(tmp, sizeof(tmp), "ntpdate_enable=YES,ntpdate_hosts=%s", + variable_get(VAR_NTPDATE_HOSTS)); self->data = tmp; dmenuSetVariables(self); } Modified: head/usr.sbin/sysinstall/menus.c ============================================================================== --- head/usr.sbin/sysinstall/menus.c Sun Nov 14 09:59:52 2010 (r215289) +++ head/usr.sbin/sysinstall/menus.c Sun Nov 14 10:04:48 2010 (r215290) @@ -1317,7 +1317,7 @@ DMenu MenuNetworking = { dmenuVarCheck, dmenuToggleVariable, NULL, "nfs_client_enable=YES" }, { " NFS server", "This machine will be an NFS server", dmenuVarCheck, configNFSServer, NULL, "nfs_server_enable=YES" }, - { " Ntpdate", "Select a clock-synchronization server", + { " Ntpdate", "Select a clock synchronization server", dmenuVarCheck, dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', (uintptr_t)"ntpdate_enable=YES" }, { " PCNFSD", "Run authentication server for clients with PC-NFS.", @@ -1376,456 +1376,456 @@ DMenu MenuNTP = { NULL, { { "None", "No NTP server", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=NO,ntpdate_flags=none" }, + "ntpdate_enable=NO,ntpdate_hosts=none" }, { "Other", "Select a site not on this list", dmenuVarsCheck, configNTP, NULL, NULL }, { "Worldwide", "pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=pool.ntp.org" }, { "Asia", "asia.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=asia.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=asia.pool.ntp.org" }, { "Europe", "europe.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=europe.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=europe.pool.ntp.org" }, { "Oceania", "oceania.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=oceania.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=oceania.pool.ntp.org" }, { "North America", "north-america.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=north-america.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=north-america.pool.ntp.org" }, { "Argentina", "tick.nap.com.ar", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=tick.nap.com.ar" }, + "ntpdate_enable=YES,ntpdate_hosts=tick.nap.com.ar" }, { "Argentina #2", "time.sinectis.com.ar", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=time.sinectis.com.ar" }, + "ntpdate_enable=YES,ntpdate_hosts=time.sinectis.com.ar" }, { "Argentina #3", "tock.nap.com.ar", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=tock.nap.com.ar" }, + "ntpdate_enable=YES,ntpdate_hosts=tock.nap.com.ar" }, { "Australia", "au.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=au.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=au.pool.ntp.org" }, { "Australia #2", "augean.eleceng.adelaide.edu.au", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=augean.eleceng.adelaide.edu.au" }, + "ntpdate_enable=YES,ntpdate_hosts=augean.eleceng.adelaide.edu.au" }, { "Australia #3", "ntp.adelaide.edu.au", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.adelaide.edu.au" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.adelaide.edu.au" }, { "Australia #4", "ntp.saard.net", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.saard.net" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.saard.net" }, { "Australia #5", "time.deakin.edu.au", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=time.deakin.edu.au" }, + "ntpdate_enable=YES,ntpdate_hosts=time.deakin.edu.au" }, { "Belgium", "ntp1.belbone.be", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp1.belbone.be" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp1.belbone.be" }, { "Belgium #2", "ntp2.belbone.be", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp2.belbone.be" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp2.belbone.be" }, { "Brazil", "a.ntp.br", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=a.ntp.br" }, + "ntpdate_enable=YES,ntpdate_hosts=a.ntp.br" }, { "Brazil #2", "b.ntp.br", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=b.ntp.br" }, + "ntpdate_enable=YES,ntpdate_hosts=b.ntp.br" }, { "Brazil #3", "c.ntp.br", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=c.ntp.br" }, + "ntpdate_enable=YES,ntpdate_hosts=c.ntp.br" }, { "Brazil #4", "ntp.cais.rnp.br", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.cais.rnp.br" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.cais.rnp.br" }, { "Brazil #5", "ntp1.pucpr.br", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp1.pucpr.br" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp1.pucpr.br" }, { "Canada", "ca.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ca.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=ca.pool.ntp.org" }, { "Canada #2", "ntp.cpsc.ucalgary.ca", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.cpsc.ucalgary.ca" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.cpsc.ucalgary.ca" }, { "Canada #3", "ntp1.cmc.ec.gc.ca", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp1.cmc.ec.gc.ca" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp1.cmc.ec.gc.ca" }, { "Canada #4", "ntp2.cmc.ec.gc.ca", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp2.cmc.ec.gc.ca" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp2.cmc.ec.gc.ca" }, { "Canada #5", "tick.utoronto.ca", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=tick.utoronto.ca" }, + "ntpdate_enable=YES,ntpdate_hosts=tick.utoronto.ca" }, { "Canada #6", "time.chu.nrc.ca", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=time.chu.nrc.ca" }, + "ntpdate_enable=YES,ntpdate_hosts=time.chu.nrc.ca" }, { "Canada #7", "time.nrc.ca", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=time.nrc.ca" }, + "ntpdate_enable=YES,ntpdate_hosts=time.nrc.ca" }, { "Canada #8", "timelord.uregina.ca", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=timelord.uregina.ca" }, + "ntpdate_enable=YES,ntpdate_hosts=timelord.uregina.ca" }, { "Canada #9", "tock.utoronto.ca", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=tock.utoronto.ca" }, + "ntpdate_enable=YES,ntpdate_hosts=tock.utoronto.ca" }, { "Czech", "ntp.karpo.cz", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.karpo.cz" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.karpo.cz" }, { "Czech #2", "ntp.cgi.cz", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.cgi.cz" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.cgi.cz" }, { "Denmark", "clock.netcetera.dk", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=clock.netcetera.dk" }, + "ntpdate_enable=YES,ntpdate_hosts=clock.netcetera.dk" }, { "Denmark", "clock2.netcetera.dk", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=clock2.netcetera.dk" }, + "ntpdate_enable=YES,ntpdate_hosts=clock2.netcetera.dk" }, { "Spain", "slug.ctv.es", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=slug.ctv.es" }, + "ntpdate_enable=YES,ntpdate_hosts=slug.ctv.es" }, { "Finland", "tick.keso.fi", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=tick.keso.fi" }, + "ntpdate_enable=YES,ntpdate_hosts=tick.keso.fi" }, { "Finland #2", "tock.keso.fi", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=tock.keso.fi" }, + "ntpdate_enable=YES,ntpdate_hosts=tock.keso.fi" }, { "France", "ntp.obspm.fr", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.obspm.fr" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.obspm.fr" }, { "France #2", "ntp.univ-lyon1.fr", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.univ-lyon1.fr" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.univ-lyon1.fr" }, { "France #3", "ntp.via.ecp.fr", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.via.ecp.fr" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.via.ecp.fr" }, { "Croatia", "zg1.ntp.carnet.hr", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=zg1.ntp.carnet.hr" }, + "ntpdate_enable=YES,ntpdate_hosts=zg1.ntp.carnet.hr" }, { "Croatia #2", "zg2.ntp.carnet.hr", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=zg2.ntp.carnet.hr" }, + "ntpdate_enable=YES,ntpdate_hosts=zg2.ntp.carnet.hr" }, { "Croatia #3", "st.ntp.carnet.hr", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=st.ntp.carnet.hr" }, + "ntpdate_enable=YES,ntpdate_hosts=st.ntp.carnet.hr" }, { "Croatia #4", "ri.ntp.carnet.hr", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ri.ntp.carnet.hr" }, + "ntpdate_enable=YES,ntpdate_hosts=ri.ntp.carnet.hr" }, { "Croatia #5", "os.ntp.carnet.hr", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=os.ntp.carnet.hr" }, + "ntpdate_enable=YES,ntpdate_hosts=os.ntp.carnet.hr" }, { "Hungary", "time.kfki.hu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=time.kfki.hu" }, + "ntpdate_enable=YES,ntpdate_hosts=time.kfki.hu" }, { "Indonesia", "ntp.kim.lipi.go.id", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.kim.lipi.go.id" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.kim.lipi.go.id" }, { "Ireland", "ntp.maths.tcd.ie", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.maths.tcd.ie" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.maths.tcd.ie" }, { "Italy", "it.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=it.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=it.pool.ntp.org" }, { "Japan", "ntp.jst.mfeed.ad.jp", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.jst.mfeed.ad.jp" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.jst.mfeed.ad.jp" }, { "Japan IPv6", "ntp1.v6.mfeed.ad.jp", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp1.v6.mfeed.ad.jp" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp1.v6.mfeed.ad.jp" }, { "Korea", "time.nuri.net", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=time.nuri.net" }, + "ntpdate_enable=YES,ntpdate_hosts=time.nuri.net" }, { "Mexico", "mx.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=mx.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=mx.pool.ntp.org" }, { "Netherlands", "ntp0.nl.net", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp0.nl.net" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp0.nl.net" }, { "Netherlands #2", "ntp1.nl.net", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp1.nl.net" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp1.nl.net" }, { "Netherlands #3", "ntp2.nl.net", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp2.nl.net" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp2.nl.net" }, { "Norway", "fartein.ifi.uio.no", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=fartein.ifi.uio.no" }, + "ntpdate_enable=YES,ntpdate_hosts=fartein.ifi.uio.no" }, { "Norway #2", "time.alcanet.no", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=time.alcanet.no" }, + "ntpdate_enable=YES,ntpdate_hosts=time.alcanet.no" }, { "New Zealand", "ntp.massey.ac.nz", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.massey.ac.nz" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.massey.ac.nz" }, { "New Zealand #2", "ntp.public.otago.ac.nz", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.public.otago.ac.nz" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.public.otago.ac.nz" }, { "New Zealand #3", "tk1.ihug.co.nz", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=tk1.ihug.co.nz" }, + "ntpdate_enable=YES,ntpdate_hosts=tk1.ihug.co.nz" }, { "New Zealand #4", "ntp.waikato.ac.nz", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.waikato.ac.nz" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.waikato.ac.nz" }, { "Poland", "info.cyf-kr.edu.pl", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=info.cyf-kr.edu.pl" }, + "ntpdate_enable=YES,ntpdate_hosts=info.cyf-kr.edu.pl" }, { "Romania", "ticks.roedu.net", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ticks.roedu.net" }, + "ntpdate_enable=YES,ntpdate_hosts=ticks.roedu.net" }, { "Russia", "ru.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ru.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=ru.pool.ntp.org" }, { "Russia #2", "ntp.psn.ru", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.psn.ru" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.psn.ru" }, { "Sweden", "se.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=se.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=se.pool.ntp.org" }, { "Sweden #2", "ntp.lth.se", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.lth.se" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.lth.se" }, { "Sweden #3", "ntp1.sp.se", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp1.sp.se" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp1.sp.se" }, { "Sweden #4", "ntp2.sp.se", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp2.sp.se" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp2.sp.se" }, { "Sweden #5", "ntp.kth.se", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.kth.se" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.kth.se" }, { "Singapore", "sg.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=sg.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=sg.pool.ntp.org" }, { "Slovenia", "si.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=si.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=si.pool.ntp.org" }, { "Slovenia #2", "sizif.mf.uni-lj.si", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=sizif.mf.uni-lj.si" }, + "ntpdate_enable=YES,ntpdate_hosts=sizif.mf.uni-lj.si" }, { "Slovenia #3", "ntp1.arnes.si", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp1.arnes.si" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp1.arnes.si" }, { "Slovenia #4", "ntp2.arnes.si", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp2.arnes.si" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp2.arnes.si" }, { "Slovenia #5", "time.ijs.si", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=time.ijs.si" }, + "ntpdate_enable=YES,ntpdate_hosts=time.ijs.si" }, { "Scotland", "ntp.cs.strath.ac.uk", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.cs.strath.ac.uk" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.cs.strath.ac.uk" }, { "Taiwan", "time.stdtime.gov.tw", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=time.stdtime.gov.tw" }, + "ntpdate_enable=YES,ntpdate_hosts=time.stdtime.gov.tw" }, { "Taiwan #2", "clock.stdtime.gov.tw", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=clock.stdtime.gov.tw" }, + "ntpdate_enable=YES,ntpdate_hosts=clock.stdtime.gov.tw" }, { "Taiwan #3", "tick.stdtime.gov.tw", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=tick.stdtime.gov.tw" }, + "ntpdate_enable=YES,ntpdate_hosts=tick.stdtime.gov.tw" }, { "Taiwan #4", "tock.stdtime.gov.tw", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=tock.stdtime.gov.tw" }, + "ntpdate_enable=YES,ntpdate_hosts=tock.stdtime.gov.tw" }, { "Taiwan #5", "watch.stdtime.gov.tw", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=watch.stdtime.gov.tw" }, + "ntpdate_enable=YES,ntpdate_hosts=watch.stdtime.gov.tw" }, { "United Kingdom", "uk.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=uk.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=uk.pool.ntp.org" }, { "United Kingdom #2", "ntp.exnet.com", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.exnet.com" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.exnet.com" }, { "United Kingdom #3", "ntp0.uk.uu.net", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp0.uk.uu.net" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp0.uk.uu.net" }, { "United Kingdom #4", "ntp1.uk.uu.net", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp1.uk.uu.net" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp1.uk.uu.net" }, { "United Kingdom #5", "ntp2.uk.uu.net", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp2.uk.uu.net" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp2.uk.uu.net" }, { "United Kingdom #6", "ntp2a.mcc.ac.uk", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp2a.mcc.ac.uk" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp2a.mcc.ac.uk" }, { "United Kingdom #7", "ntp2b.mcc.ac.uk", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp2b.mcc.ac.uk" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp2b.mcc.ac.uk" }, { "United Kingdom #8", "ntp2c.mcc.ac.uk", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp2c.mcc.ac.uk" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp2c.mcc.ac.uk" }, { "United Kingdom #9", "ntp2d.mcc.ac.uk", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp2d.mcc.ac.uk" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp2d.mcc.ac.uk" }, { "U.S.", "us.pool.ntp.org", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=us.pool.ntp.org" }, + "ntpdate_enable=YES,ntpdate_hosts=us.pool.ntp.org" }, { "U.S. AR", "sushi.lyon.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=sushi.compsci.lyon.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=sushi.compsci.lyon.edu" }, { "U.S. AZ", "ntp.drydog.com", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.drydog.com" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.drydog.com" }, { "U.S. CA", "ntp.ucsd.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.ucsd.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.ucsd.edu" }, { "U.S. CA #2", "ntp1.mainecoon.com", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp1.mainecoon.com" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp1.mainecoon.com" }, { "U.S. CA #3", "ntp2.mainecoon.com", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp2.mainecoon.com" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp2.mainecoon.com" }, { "U.S. CA #4", "reloj.kjsl.com", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=reloj.kjsl.com" }, + "ntpdate_enable=YES,ntpdate_hosts=reloj.kjsl.com" }, { "U.S. CA #5", "time.five-ten-sg.com", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=time.five-ten-sg.com" }, + "ntpdate_enable=YES,ntpdate_hosts=time.five-ten-sg.com" }, { "U.S. DE", "louie.udel.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=louie.udel.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=louie.udel.edu" }, { "U.S. GA", "ntp.shorty.com", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.shorty.com" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.shorty.com" }, { "U.S. GA #2", "rolex.usg.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=rolex.usg.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=rolex.usg.edu" }, { "U.S. GA #3", "timex.usg.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=timex.usg.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=timex.usg.edu" }, { "U.S. IL", "ntp-0.cso.uiuc.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp-0.cso.uiuc.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp-0.cso.uiuc.edu" }, { "U.S. IL #2", "ntp-1.cso.uiuc.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp-1.cso.uiuc.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp-1.cso.uiuc.edu" }, { "U.S. IL #3", "ntp-1.mcs.anl.gov", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp-1.mcs.anl.gov" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp-1.mcs.anl.gov" }, { "U.S. IL #4", "ntp-2.cso.uiuc.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp-2.cso.uiuc.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp-2.cso.uiuc.edu" }, { "U.S. IL #5", "ntp-2.mcs.anl.gov", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp-2.mcs.anl.gov" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp-2.mcs.anl.gov" }, { "U.S. IN", "gilbreth.ecn.purdue.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=gilbreth.ecn.purdue.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=gilbreth.ecn.purdue.edu" }, { "U.S. IN #2", "harbor.ecn.purdue.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=harbor.ecn.purdue.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=harbor.ecn.purdue.edu" }, { "U.S. IN #3", "molecule.ecn.purdue.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=molecule.ecn.purdue.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=molecule.ecn.purdue.edu" }, { "U.S. KS", "ntp1.kansas.net", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp1.kansas.net" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp1.kansas.net" }, { "U.S. KS #2", "ntp2.kansas.net", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp2.kansas.net" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp2.kansas.net" }, { "U.S. MA", "ntp.ourconcord.net", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.ourconcord.net" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.ourconcord.net" }, { "U.S. MA #2", "timeserver.cs.umb.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=timeserver.cs.umb.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=timeserver.cs.umb.edu" }, { "U.S. MN", "ns.nts.umn.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ns.nts.umn.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ns.nts.umn.edu" }, { "U.S. MN #2", "nss.nts.umn.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=nss.nts.umn.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=nss.nts.umn.edu" }, { "U.S. MO", "time-ext.missouri.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=time-ext.missouri.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=time-ext.missouri.edu" }, { "U.S. MT", "chronos1.umt.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=chronos1.umt.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=chronos1.umt.edu" }, { "U.S. MT #2", "chronos2.umt.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=chronos2.umt.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=chronos2.umt.edu" }, { "U.S. MT #3", "chronos3.umt.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=chronos3.umt.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=chronos3.umt.edu" }, { "U.S. NC", "clock1.unc.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=clock1.unc.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=clock1.unc.edu" }, { "U.S. NV", "cuckoo.nevada.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=cuckoo.nevada.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=cuckoo.nevada.edu" }, { "U.S. NV #2", "tick.cs.unlv.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=tick.cs.unlv.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=tick.cs.unlv.edu" }, { "U.S. NV #3", "tock.cs.unlv.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=tock.cs.unlv.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=tock.cs.unlv.edu" }, { "U.S. NY", "ntp0.cornell.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp0.cornell.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp0.cornell.edu" }, { "U.S. NY #2", "sundial.columbia.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=sundial.columbia.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=sundial.columbia.edu" }, { "U.S. NY #3", "timex.cs.columbia.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=timex.cs.columbia.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=timex.cs.columbia.edu" }, { "U.S. PA", "clock-1.cs.cmu.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=clock-1.cs.cmu.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=clock-1.cs.cmu.edu" }, { "U.S. PA #2", "clock-2.cs.cmu.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=clock-2.cs.cmu.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=clock-2.cs.cmu.edu" }, { "U.S. PA #3", "clock.psu.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=clock.psu.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=clock.psu.edu" }, { "U.S. PA #4", "fuzz.psc.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=fuzz.psc.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=fuzz.psc.edu" }, { "U.S. PA #5", "ntp-1.ece.cmu.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp-1.ece.cmu.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp-1.ece.cmu.edu" }, { "U.S. PA #6", "ntp-2.ece.cmu.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp-2.ece.cmu.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp-2.ece.cmu.edu" }, { "U.S. TX", "ntp.fnbhs.com", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.fnbhs.com" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.fnbhs.com" }, { "U.S. TX #2", "ntp.tmc.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.tmc.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.tmc.edu" }, { "U.S. TX #3", "ntp5.tamu.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp5.tamu.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp5.tamu.edu" }, { "U.S. TX #4", "tick.greyware.com", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=tick.greyware.com" }, + "ntpdate_enable=YES,ntpdate_hosts=tick.greyware.com" }, { "U.S. TX #5", "tock.greyware.com", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=tock.greyware.com" }, + "ntpdate_enable=YES,ntpdate_hosts=tock.greyware.com" }, { "U.S. VA", "ntp-1.vt.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp-1.vt.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp-1.vt.edu" }, { "U.S. VA #2", "ntp-2.vt.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp-2.vt.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp-2.vt.edu" }, { "U.S. VA #3", "ntp.cmr.gov", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.cmr.gov" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.cmr.gov" }, { "U.S. VT", "ntp0.state.vt.us", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp0.state.vt.us" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp0.state.vt.us" }, { "U.S. VT #2", "ntp1.state.vt.us", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp1.state.vt.us" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp1.state.vt.us" }, { "U.S. VT #3", "ntp2.state.vt.us", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp2.state.vt.us" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp2.state.vt.us" }, { "U.S. WA", "ntp.tcp-udp.net", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.tcp-udp.net" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.tcp-udp.net" }, { "U.S. WI", "ntp1.cs.wisc.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp1.cs.wisc.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp1.cs.wisc.edu" }, { "U.S. WI #2", "ntp3.cs.wisc.edu", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp3.cs.wisc.edu" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp3.cs.wisc.edu" }, { "South Africa", "ntp.cs.unp.ac.za", dmenuVarsCheck, dmenuSetVariables, NULL, - "ntpdate_enable=YES,ntpdate_flags=ntp.cs.unp.ac.za" }, + "ntpdate_enable=YES,ntpdate_hosts=ntp.cs.unp.ac.za" }, { NULL } }, }; Modified: head/usr.sbin/sysinstall/sysinstall.8 ============================================================================== --- head/usr.sbin/sysinstall/sysinstall.8 Sun Nov 14 09:59:52 2010 (r215289) +++ head/usr.sbin/sysinstall/sysinstall.8 Sun Nov 14 10:04:48 2010 (r215290) @@ -217,10 +217,10 @@ Configure host as a user of the Network .Pp .Sy Variables : .Bl -tag -width indent -.It ntpdate_flags -The flags to -.Xr ntpdate 8 , -that is to say the name of the server to sync from. +.It ntpdate_hosts +Whitespace-separated list of +.Xr ntpdate 8 +servers to sync from. .El .It configPCNFSD Configure host to support PC NFS. Modified: head/usr.sbin/sysinstall/sysinstall.h ============================================================================== --- head/usr.sbin/sysinstall/sysinstall.h Sun Nov 14 09:59:52 2010 (r215289) +++ head/usr.sbin/sysinstall/sysinstall.h Sun Nov 14 10:04:48 2010 (r215290) @@ -166,7 +166,7 @@ #define VAR_NONINTERACTIVE "nonInteractive" #define VAR_NOVELL "novell" #define VAR_RPCBIND_ENABLE "rpcbind_enable" -#define VAR_NTPDATE_FLAGS "ntpdate_flags" +#define VAR_NTPDATE_HOSTS "ntpdate_hosts" #define VAR_PACKAGE "package" #define VAR_PARTITION "partition" #define VAR_PCNFSD "pcnfsd" From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 10:22:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1AAB31065672; Sun, 14 Nov 2010 10:22:10 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E21788FC19; Sun, 14 Nov 2010 10:22:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEAM9uo077833; Sun, 14 Nov 2010 10:22:09 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEAM9Qm077829; Sun, 14 Nov 2010 10:22:09 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011141022.oAEAM9Qm077829@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 10:22:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215291 - in head/usr.sbin/sysinstall: . help X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 10:22:10 -0000 Author: brucec Date: Sun Nov 14 10:22:09 2010 New Revision: 215291 URL: http://svn.freebsd.org/changeset/base/215291 Log: Remove support for cpioVerbose=medium because bsdcpio doesn't support the "-V" flag. PR: bin/151821 Submitted by: Devin Teske MFC after: 1 week Modified: head/usr.sbin/sysinstall/help/shortcuts.hlp head/usr.sbin/sysinstall/media.c head/usr.sbin/sysinstall/sysinstall.8 Modified: head/usr.sbin/sysinstall/help/shortcuts.hlp ============================================================================== --- head/usr.sbin/sysinstall/help/shortcuts.hlp Sun Nov 14 10:04:48 2010 (r215290) +++ head/usr.sbin/sysinstall/help/shortcuts.hlp Sun Nov 14 10:22:09 2010 (r215291) @@ -13,7 +13,7 @@ blanktime Screen blank tim bootManager Select boot manager: booteasy, standard or none browserBinary Which doc browser to use (default: links) browserPackage Which package to get browser from (default: links) -cpioVerbose How verbose to be with cpio: high, medium or low +cpioVerbose How verbose to be with cpio: high or low debug Extra debugging? defaultrouter IP address of default route disk Which disk to operate on (ad0, da0, etc). Modified: head/usr.sbin/sysinstall/media.c ============================================================================== --- head/usr.sbin/sysinstall/media.c Sun Nov 14 10:04:48 2010 (r215290) +++ head/usr.sbin/sysinstall/media.c Sun Nov 14 10:22:09 2010 (r215291) @@ -117,8 +117,6 @@ cpioVerbosity() if (cp && !strcmp(cp, "high")) return "-v"; - else if (cp && !strcmp(cp, "medium")) - return "-V"; return ""; } @@ -848,8 +846,6 @@ mediaSetCPIOVerbosity(dialogMenuItem *se } else { if (!strcmp(cp, "low")) - variable_set2(VAR_CPIO_VERBOSITY, "medium", 0); - else if (!strcmp(cp, "medium")) variable_set2(VAR_CPIO_VERBOSITY, "high", 0); else /* must be "high" - wrap around */ variable_set2(VAR_CPIO_VERBOSITY, "low", 0); Modified: head/usr.sbin/sysinstall/sysinstall.8 ============================================================================== --- head/usr.sbin/sysinstall/sysinstall.8 Sun Nov 14 10:04:48 2010 (r215290) +++ head/usr.sbin/sysinstall/sysinstall.8 Sun Nov 14 10:22:09 2010 (r215291) @@ -744,8 +744,7 @@ Default: user@host .Sy Variables : .Bl -tag -width indent .It cpioVerbose -Can be used to set the verbosity of cpio extractions to low, medium or -high. +Can be used to set the verbosity of cpio extractions to low or high. .El .It mediaGetType Interactively get the user to specify some type of media. From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 10:43:03 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 703CB1065670; Sun, 14 Nov 2010 10:43:03 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2001:470:9a47::1]) by mx1.freebsd.org (Postfix) with ESMTP id 03B5A8FC0C; Sun, 14 Nov 2010 10:43:02 +0000 (UTC) Received: from localhost (acme.spoerlein.net [188.72.220.29]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id oAEAh1LM006794 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 14 Nov 2010 11:43:02 +0100 (CET) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1289731382; bh=Z1hAN1bG4BoT0Is/SVWmy51pRIixbI6q1qcyJSa1YYA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=i004+pRHcPq0i3nFXau+3TiQuxAN/D6hCN9zq+RxINXhraNtPjhm/jr0BgPrK+n9p dOVoXoBqSWf0G9wbYEyeTmu6N37JplHNI7njDd5WynE+KnlKna0VAyw5zYpaU/fgLp HrJkvlhX63lHvsnp7gdc+7zT4ZxJQkTr/jWQyyiE= Date: Sun, 14 Nov 2010 11:43:01 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Warner Losh Message-ID: <20101114104301.GB64243@acme.spoerlein.net> Mail-Followup-To: Ulrich =?utf-8?B?U3DDtnJsZWlu?= , Warner Losh , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201011132238.oADMcXU1062375@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201011132238.oADMcXU1062375@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r215271 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 10:43:03 -0000 On Sat, 13.11.2010 at 22:38:33 +0000, Warner Losh wrote: > Author: imp > Date: Sat Nov 13 22:38:33 2010 > New Revision: 215271 > URL: http://svn.freebsd.org/changeset/base/215271 > > Log: > Add mips back to universe > > Modified: > head/Makefile > > Modified: head/Makefile > ============================================================================== > --- head/Makefile Sat Nov 13 22:34:12 2010 (r215270) > +++ head/Makefile Sat Nov 13 22:38:33 2010 (r215271) > @@ -281,7 +281,7 @@ tinderbox: > # existing system is. > # > .if make(universe) || make(universe_kernels) || make(tinderbox) > -TARGETS?=amd64 i386 ia64 pc98 powerpc sparc64 sun4v > +TARGETS?=amd64 i386 ia64 pc98 powerpc sparc64 sun4v mips Can we have that sorted, please? I'm sure it was sorted before ... -TARGETS?=amd64 i386 ia64 pc98 powerpc sparc64 sun4v mips +TARGETS?=amd64 i386 ia64 mips pc98 powerpc sparc64 sun4v Uli From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 11:09:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9D471065674; Sun, 14 Nov 2010 11:09:16 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C77C08FC15; Sun, 14 Nov 2010 11:09:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEB9Gpt080098; Sun, 14 Nov 2010 11:09:16 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEB9GZR080095; Sun, 14 Nov 2010 11:09:16 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201011141109.oAEB9GZR080095@svn.freebsd.org> From: Takahashi Yoshihiro Date: Sun, 14 Nov 2010 11:09:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215292 - in head/gnu/usr.bin/gdb: . libgdb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 11:09:16 -0000 Author: nyan Date: Sun Nov 14 11:09:16 2010 New Revision: 215292 URL: http://svn.freebsd.org/changeset/base/215292 Log: Add missing '/'. Modified: head/gnu/usr.bin/gdb/Makefile.inc head/gnu/usr.bin/gdb/libgdb/Makefile Modified: head/gnu/usr.bin/gdb/Makefile.inc ============================================================================== --- head/gnu/usr.bin/gdb/Makefile.inc Sun Nov 14 10:22:09 2010 (r215291) +++ head/gnu/usr.bin/gdb/Makefile.inc Sun Nov 14 11:09:16 2010 (r215292) @@ -20,7 +20,7 @@ OBJ_GDB= ${OBJ_ROOT}/gdb # MACHINE_CPUARCH, but there's no easy way to export make functions... .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc} +TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif Modified: head/gnu/usr.bin/gdb/libgdb/Makefile ============================================================================== --- head/gnu/usr.bin/gdb/libgdb/Makefile Sun Nov 14 10:22:09 2010 (r215291) +++ head/gnu/usr.bin/gdb/libgdb/Makefile Sun Nov 14 11:09:16 2010 (r215292) @@ -4,7 +4,7 @@ # MACHINE_CPUARCH, but there's no easy way to export make functions... .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc} +TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 11:32:57 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A4AB1065694; Sun, 14 Nov 2010 11:32:57 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 185ED8FC12; Sun, 14 Nov 2010 11:32:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEBWuCk080573; Sun, 14 Nov 2010 11:32:56 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEBWumi080571; Sun, 14 Nov 2010 11:32:56 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201011141132.oAEBWumi080571@svn.freebsd.org> From: Joel Dahl Date: Sun, 14 Nov 2010 11:32:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215293 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 11:32:57 -0000 Author: joel (doc committer) Date: Sun Nov 14 11:32:56 2010 New Revision: 215293 URL: http://svn.freebsd.org/changeset/base/215293 Log: Add the cddl/ directory. Modified: head/README Modified: head/README ============================================================================== --- head/README Sun Nov 14 11:09:16 2010 (r215292) +++ head/README Sun Nov 14 11:32:56 2010 (r215293) @@ -43,6 +43,9 @@ Source Roadmap: --------------- bin System/user commands. +cddl Various commands and libraries under the Common Development + and Distribution License. + contrib Packages contributed by 3rd parties. crypto Cryptography stuff (see crypto/README). From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 13:09:33 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3494610656AB; Sun, 14 Nov 2010 13:09:33 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 21EDC8FC17; Sun, 14 Nov 2010 13:09:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAED9Xet082721; Sun, 14 Nov 2010 13:09:33 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAED9Xcv082719; Sun, 14 Nov 2010 13:09:33 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011141309.oAED9Xcv082719@svn.freebsd.org> From: Marius Strobl Date: Sun, 14 Nov 2010 13:09:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215295 - head/sys/opencrypto X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 13:09:33 -0000 Author: marius Date: Sun Nov 14 13:09:32 2010 New Revision: 215295 URL: http://svn.freebsd.org/changeset/base/215295 Log: Let cryptosoft(4) add its pseudo-device with a specific unit number and its probe method return BUS_PROBE_NOWILDCARD so it doesn't get attached to real devices hanging off of nexus(4) with no specific devclass set. Actually, the more desirable fix for this would be to get rid of the newbus interface of cryptosoft(4) altogether but apparently crypto(9) was written with support for cryptographic hardware in mind so that approach would require some KPI breaking changes which don't seem worth it. MFC after: 1 week Modified: head/sys/opencrypto/cryptosoft.c Modified: head/sys/opencrypto/cryptosoft.c ============================================================================== --- head/sys/opencrypto/cryptosoft.c Sun Nov 14 13:06:34 2010 (r215294) +++ head/sys/opencrypto/cryptosoft.c Sun Nov 14 13:09:32 2010 (r215295) @@ -1060,7 +1060,7 @@ swcr_identify(driver_t *drv, device_t pa { /* NB: order 10 is so we get attached after h/w devices */ if (device_find_child(parent, "cryptosoft", -1) == NULL && - BUS_ADD_CHILD(parent, 10, "cryptosoft", -1) == 0) + BUS_ADD_CHILD(parent, 10, "cryptosoft", 0) == 0) panic("cryptosoft: could not attach"); } @@ -1068,7 +1068,7 @@ static int swcr_probe(device_t dev) { device_set_desc(dev, "software crypto"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static int From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 13:25:02 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBFA61065673; Sun, 14 Nov 2010 13:25:01 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D56A58FC0C; Sun, 14 Nov 2010 13:25:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEDP1ka083066; Sun, 14 Nov 2010 13:25:01 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEDP1WC083064; Sun, 14 Nov 2010 13:25:01 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011141325.oAEDP1WC083064@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 13:25:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215296 - head/usr.sbin/sysinstall X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 13:25:02 -0000 Author: brucec Date: Sun Nov 14 13:25:01 2010 New Revision: 215296 URL: http://svn.freebsd.org/changeset/base/215296 Log: Fix use of CD_VERSION=any in cdrom.inf by calling strcmp instead of variable_cmp. PR: bin/142960 Submitted by: G. Paul Ziemba MFC after: 1 week Modified: head/usr.sbin/sysinstall/cdrom.c Modified: head/usr.sbin/sysinstall/cdrom.c ============================================================================== --- head/usr.sbin/sysinstall/cdrom.c Sun Nov 14 13:09:32 2010 (r215295) +++ head/usr.sbin/sysinstall/cdrom.c Sun Nov 14 13:25:01 2010 (r215296) @@ -145,7 +145,7 @@ mediaInitCDROM(Device *dev) else { if (variable_cmp(VAR_RELNAME, cp) && variable_cmp(VAR_RELNAME, "any") && - variable_cmp(cp, "any") && + strcmp(cp, "any") && !bogusCDOK) { msgConfirm("Warning: The version of the FreeBSD disc currently in the drive\n" "(%s) does not match the version of the boot floppy\n" From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 13:26:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0772106564A; Sun, 14 Nov 2010 13:26:10 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B5E18FC08; Sun, 14 Nov 2010 13:26:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEDQAwJ083137; Sun, 14 Nov 2010 13:26:10 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEDQARr083126; Sun, 14 Nov 2010 13:26:10 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011141326.oAEDQARr083126@svn.freebsd.org> From: Marius Strobl Date: Sun, 14 Nov 2010 13:26:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215297 - in head: . sys/dev/bce sys/dev/bge sys/dev/mii sys/dev/msk sys/dev/nfe sys/dev/stge sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 13:26:10 -0000 Author: marius Date: Sun Nov 14 13:26:10 2010 New Revision: 215297 URL: http://svn.freebsd.org/changeset/base/215297 Log: o Flesh out the generic IEEE 802.3 annex 31B full duplex flow control support in mii(4): - Merge generic flow control advertisement (which can be enabled by passing by MIIF_DOPAUSE to mii_attach(9)) and parsing support from NetBSD into mii_physubr.c and ukphy_subr.c. Unlike as in NetBSD, IFM_FLOW isn't implemented as a global option via the "don't care mask" but instead as a media specific option this. This has the following advantages: o allows flow control advertisement with autonegotiation to be turned on and off via ifconfig(8) with the default typically being off (though MIIF_FORCEPAUSE has been added causing flow control to be always advertised, allowing to easily MFC this changes for drivers that previously used home-grown support for flow control that behaved that way without breaking POLA) o allows to deal with PHY drivers where flow control advertisement with manual selection doesn't work or at least isn't implemented, like it's the case with brgphy(4), e1000phy(4) and ip1000phy(4), by setting MIIF_NOMANPAUSE o the available combinations of media options are readily available from the `ifconfig -m` output - Add IFM_FLOW to IFM_SHARED_OPTION_DESCRIPTIONS and IFM_ETH_RXPAUSE and IFM_ETH_TXPAUSE to IFM_SUBTYPE_ETHERNET_OPTION_DESCRIPTIONS so these are understood by ifconfig(8). o Make the master/slave support in mii(4) actually usable: - Change IFM_ETH_MASTER from being implemented as a global option via the "don't care mask" to a media specific one as it actually is only applicable to IFM_1000_T to date. - Let mii_phy_setmedia() set GTCR_MAN_MS in IFM_1000_T slave mode to actually configure manually selected slave mode (like we also do in the PHY specific implementations). - Add IFM_ETH_MASTER to IFM_SUBTYPE_ETHERNET_OPTION_DESCRIPTIONS so it is understood by ifconfig(8). o Switch bge(4), bce(4), msk(4), nfe(4) and stge(4) along with brgphy(4), e1000phy(4) and ip1000phy(4) to use the generic flow control support instead of home-grown solutions via IFM_FLAGs. This includes changing these PHY drivers and smcphy(4) to no longer unconditionally advertise support for flow control but only if the selected media has IFM_FLOW set (or MIIF_FORCEPAUSE is set) and implemented for these media variants, i.e. typically only for copper. o Switch brgphy(4), ciphy(4), e1000phy(4) and ip1000phy(4) to report and set IFM_1000_T master mode via IFM_ETH_MASTER instead of via IFF_LINK0 and some IFM_FLAGn. o Switch brgphy(4) to add at least the the supported copper media based on the contents of the BMSR via mii_phy_add_media() instead of hardcoding them. The latter approach seems to have developed historically, besides causing unnecessary code duplication it was also undesirable because brgphy_mii_phy_auto() already based the capability advertisement on the contents of the BMSR though. o Let brgphy(4) set IFM_1000_T master mode on all supported PHY and not just BCM5701. Apparently this was a misinterpretation of a workaround in the Linux tg3 driver; BCM5701 seem to require RGPHY_1000CTL_MSE and BRGPHY_1000CTL_MSC to be set when configuring autonegotiation but this doesn't mean we can't set these as well on other PHYs for manual media selection. o Let ukphy_status() report IFM_1000_T master mode via IFM_ETH_MASTER so IFM_1000_T master mode support now is generally available with all PHY drivers. o Don't let e1000phy(4) set master/slave bits for IFM_1000_SX as it's not applicable there. Reviewed by: yongari (plus additional testing) Obtained from: NetBSD (partially), OpenBSD (partially) MFC after: 2 weeks Modified: head/UPDATING head/sys/dev/bce/if_bce.c head/sys/dev/bge/if_bge.c head/sys/dev/mii/brgphy.c head/sys/dev/mii/ciphy.c head/sys/dev/mii/e1000phy.c head/sys/dev/mii/ip1000phy.c head/sys/dev/mii/mii.h head/sys/dev/mii/mii_physubr.c head/sys/dev/mii/miivar.h head/sys/dev/mii/smcphy.c head/sys/dev/mii/ukphy_subr.c head/sys/dev/msk/if_msk.c head/sys/dev/nfe/if_nfe.c head/sys/dev/stge/if_stge.c head/sys/net/if_media.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Nov 14 13:25:01 2010 (r215296) +++ head/UPDATING Sun Nov 14 13:26:10 2010 (r215297) @@ -22,6 +22,32 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20101114: + Generic IEEE 802.3 annex 31B full duplex flow control support has been + added to mii(4) and bge(4), bce(4), msk(4), nfe(4) and stge(4) along + with brgphy(4), e1000phy(4) as well as ip1000phy() have been converted + to take advantage of it instead of using custom implementations. This + means that these drivers now no longer unconditionally advertise + support for flow control but only do so if flow control is a selected + media option. This was implemented in the generic support that way in + order to allow flow control to be switched on and off via ifconfig(8) + with the PHY specific default to typically off in order to protect + from unwanted effects. Consequently, if you used flow control with + one of the above mentioned drivers you now need to explicitly enable + it, for example via: + ifconfig bge0 media auto mediaopt flowcontrol + + Along with the above mentioned changes generic support for setting + 1000baseT master mode also has been added and brgphy(4), ciphy(4), + e1000phy(4) as well as ip1000phy(4) have been converted to take + advantage of it. This means that these drivers now no longer take the + link0 parameter for selecting master mode but the master media option + has to be used instead, for example like in the following: + ifconfig bge0 media 1000baseT mediaopt full-duplex,master + + Selection of master mode now is also available with all other PHY + drivers supporting 1000baseT. + 20101111: The TCP stack has received a significant update to add support for modularised congestion control and generally improve the clarity of Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Sun Nov 14 13:25:01 2010 (r215296) +++ head/sys/dev/bce/if_bce.c Sun Nov 14 13:26:10 2010 (r215297) @@ -1143,7 +1143,7 @@ bce_attach(device_t dev) /* MII child bus by attaching the PHY. */ rc = mii_attach(dev, &sc->bce_miibus, ifp, bce_ifmedia_upd, bce_ifmedia_sts, BMSR_DEFCAPMASK, sc->bce_phy_addr, - MII_OFFSET_ANY, 0); + MII_OFFSET_ANY, MIIF_DOPAUSE); if (rc != 0) { BCE_PRINTF("%s(%d): attaching PHYs failed\n", __FILE__, __LINE__); @@ -1769,8 +1769,7 @@ bce_miibus_statchg(device_t dev) REG_WR(sc, BCE_EMAC_MODE, val); - /* FLAG0 is set if RX is enabled and FLAG1 if TX is enabled */ - if (mii->mii_media_active & IFM_FLAG0) { + if ((mii->mii_media_active & IFM_ETH_RXPAUSE) != 0) { DBPRINT(sc, BCE_INFO_PHY, "%s(): Enabling RX flow control.\n", __FUNCTION__); BCE_SETBIT(sc, BCE_EMAC_RX_MODE, BCE_EMAC_RX_MODE_FLOW_EN); @@ -1780,7 +1779,7 @@ bce_miibus_statchg(device_t dev) BCE_CLRBIT(sc, BCE_EMAC_RX_MODE, BCE_EMAC_RX_MODE_FLOW_EN); } - if (mii->mii_media_active & IFM_FLAG1) { + if ((mii->mii_media_active & IFM_ETH_TXPAUSE) != 0) { DBPRINT(sc, BCE_INFO_PHY, "%s(): Enabling TX flow control.\n", __FUNCTION__); BCE_SETBIT(sc, BCE_EMAC_TX_MODE, BCE_EMAC_TX_MODE_FLOW_EN); Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Sun Nov 14 13:25:01 2010 (r215296) +++ head/sys/dev/bge/if_bge.c Sun Nov 14 13:26:10 2010 (r215297) @@ -914,11 +914,13 @@ bge_miibus_statchg(device_t dev) if (IFM_OPTIONS(mii->mii_media_active & IFM_FDX) != 0) { BGE_CLRBIT(sc, BGE_MAC_MODE, BGE_MACMODE_HALF_DUPLEX); - if (IFM_OPTIONS(mii->mii_media_active) & IFM_FLAG1) + if ((IFM_OPTIONS(mii->mii_media_active) & + IFM_ETH_TXPAUSE) != 0) BGE_SETBIT(sc, BGE_TX_MODE, BGE_TXMODE_FLOWCTL_ENABLE); else BGE_CLRBIT(sc, BGE_TX_MODE, BGE_TXMODE_FLOWCTL_ENABLE); - if (IFM_OPTIONS(mii->mii_media_active) & IFM_FLAG0) + if ((IFM_OPTIONS(mii->mii_media_active) & + IFM_ETH_RXPAUSE) != 0) BGE_SETBIT(sc, BGE_RX_MODE, BGE_RXMODE_FLOWCTL_ENABLE); else BGE_CLRBIT(sc, BGE_RX_MODE, BGE_RXMODE_FLOWCTL_ENABLE); @@ -3102,9 +3104,9 @@ bge_attach(device_t dev) again: bge_asf_driver_up(sc); - error = (mii_attach(dev, &sc->bge_miibus, ifp, + error = mii_attach(dev, &sc->bge_miibus, ifp, bge_ifmedia_upd, bge_ifmedia_sts, BMSR_DEFCAPMASK, - phy_addr, MII_OFFSET_ANY, 0)); + phy_addr, MII_OFFSET_ANY, MIIF_DOPAUSE); if (error != 0) { if (trys++ < 4) { device_printf(sc->bge_dev, "Try again\n"); Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Sun Nov 14 13:25:01 2010 (r215296) +++ head/sys/dev/mii/brgphy.c Sun Nov 14 13:26:10 2010 (r215297) @@ -99,9 +99,9 @@ static driver_t brgphy_driver = { DRIVER_MODULE(brgphy, miibus, brgphy_driver, brgphy_devclass, 0, 0); static int brgphy_service(struct mii_softc *, struct mii_data *, int); -static void brgphy_setmedia(struct mii_softc *, int, int); +static void brgphy_setmedia(struct mii_softc *, int); static void brgphy_status(struct mii_softc *); -static void brgphy_mii_phy_auto(struct mii_softc *); +static void brgphy_mii_phy_auto(struct mii_softc *, int); static void brgphy_reset(struct mii_softc *); static void brgphy_enable_loopback(struct mii_softc *); static void bcm5401_load_dspcode(struct mii_softc *); @@ -169,6 +169,7 @@ detect_hs21(struct bce_softc *bce_sc) static int brgphy_probe(device_t dev) { + return (mii_phy_dev_probe(dev, brgphys, BUS_PROBE_DEFAULT)); } @@ -183,7 +184,6 @@ brgphy_attach(device_t dev) struct mii_attach_args *ma; struct mii_data *mii; struct ifnet *ifp; - int fast_ether; bsc = device_get_softc(dev); sc = &bsc->mii_sc; @@ -203,8 +203,7 @@ brgphy_attach(device_t dev) * At least some variants wedge when isolating, at least some also * don't support loopback. */ - sc->mii_flags |= MIIF_NOISOLATE | MIIF_NOLOOP; - sc->mii_anegticks = MII_ANEGTICKS_GIGE; + sc->mii_flags |= MIIF_NOISOLATE | MIIF_NOLOOP | MIIF_NOMANPAUSE; /* Initialize brgphy_softc structure */ bsc->mii_oui = MII_OUI(ma->mii_id1, ma->mii_id2); @@ -212,8 +211,6 @@ brgphy_attach(device_t dev) bsc->mii_rev = MII_REV(ma->mii_id2); bsc->serdes_flags = 0; - fast_ether = 0; - if (bootverbose) device_printf(dev, "OUI 0x%06x, model 0x%04x, rev. %d\n", bsc->mii_oui, bsc->mii_model, bsc->mii_rev); @@ -279,8 +276,7 @@ brgphy_attach(device_t dev) pci_get_device(bge_sc->bge_dev) == BCOM_DEVICEID_BCM5901A2 || pci_get_device(bge_sc->bge_dev) == BCOM_DEVICEID_BCM5906 || pci_get_device(bge_sc->bge_dev) == BCOM_DEVICEID_BCM5906M)) { - fast_ether = 1; - sc->mii_anegticks = MII_ANEGTICKS; + ma->mii_capmask &= ~BMSR_EXTSTAT; } brgphy_reset(sc); @@ -295,27 +291,10 @@ brgphy_attach(device_t dev) /* Add the supported media types */ if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) { - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_T, 0, sc->mii_inst), - BRGPHY_S10); - printf("10baseT, "); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_T, IFM_FDX, sc->mii_inst), - BRGPHY_S10 | BRGPHY_BMCR_FDX); - printf("10baseT-FDX, "); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, 0, sc->mii_inst), - BRGPHY_S100); - printf("100baseTX, "); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_FDX, sc->mii_inst), - BRGPHY_S100 | BRGPHY_BMCR_FDX); - printf("100baseTX-FDX, "); - if (fast_ether == 0) { - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, 0, sc->mii_inst), - BRGPHY_S1000); - printf("1000baseT, "); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, IFM_FDX, sc->mii_inst), - BRGPHY_S1000 | BRGPHY_BMCR_FDX); - printf("1000baseT-FDX, "); - } + mii_phy_add_media(sc); + printf("\n"); } else { + sc->mii_anegticks = MII_ANEGTICKS_GIGE; ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, IFM_FDX, sc->mii_inst), BRGPHY_S1000 | BRGPHY_BMCR_FDX); printf("1000baseSX-FDX, "); @@ -337,11 +316,10 @@ brgphy_attach(device_t dev) printf("auto-neg workaround, "); bsc->serdes_flags |= BRGPHY_NOANWAIT; } + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst), 0); + printf("auto\n"); } - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst), 0); - printf("auto\n"); - #undef ADD MIIBUS_MEDIAINIT(sc->mii_dev); return (0); @@ -367,15 +345,14 @@ brgphy_service(struct mii_softc *sc, str switch (IFM_SUBTYPE(ife->ifm_media)) { case IFM_AUTO: - brgphy_mii_phy_auto(sc); + brgphy_mii_phy_auto(sc, ife->ifm_media); break; case IFM_2500_SX: case IFM_1000_SX: case IFM_1000_T: case IFM_100_TX: case IFM_10_T: - brgphy_setmedia(sc, ife->ifm_media, - mii->mii_ifp->if_flags & IFF_LINK0); + brgphy_setmedia(sc, ife->ifm_media); break; default: return (EINVAL); @@ -397,7 +374,7 @@ brgphy_service(struct mii_softc *sc, str * Check to see if we have link. If we do, we don't * need to restart the autonegotiation process. */ - val = PHY_READ(sc, MII_BMSR) | PHY_READ(sc, MII_BMSR); + val = PHY_READ(sc, MII_BMSR) | PHY_READ(sc, MII_BMSR); if (val & BMSR_LINK) { sc->mii_ticks = 0; /* Reset autoneg timer. */ break; @@ -414,7 +391,7 @@ brgphy_service(struct mii_softc *sc, str /* Retry autonegotiation */ sc->mii_ticks = 0; - brgphy_mii_phy_auto(sc); + brgphy_mii_phy_auto(sc, ife->ifm_media); break; } @@ -456,7 +433,6 @@ brgphy_service(struct mii_softc *sc, str return (0); } - /****************************************************************************/ /* Sets the PHY link speed. */ /* */ @@ -464,12 +440,10 @@ brgphy_service(struct mii_softc *sc, str /* None */ /****************************************************************************/ static void -brgphy_setmedia(struct mii_softc *sc, int media, int master) +brgphy_setmedia(struct mii_softc *sc, int media) { - struct brgphy_softc *bsc = (struct brgphy_softc *)sc; int bmcr = 0, gig; - /* Calculate the value for the BMCR register. */ switch (IFM_SUBTYPE(media)) { case IFM_2500_SX: break; @@ -486,7 +460,6 @@ brgphy_setmedia(struct mii_softc *sc, in break; } - /* Calculate duplex settings for 1000BasetT/1000BaseX. */ if ((media & IFM_GMASK) == IFM_FDX) { bmcr |= BRGPHY_BMCR_FDX; gig = BRGPHY_1000CTL_AFD; @@ -494,53 +467,30 @@ brgphy_setmedia(struct mii_softc *sc, in gig = BRGPHY_1000CTL_AHD; } - /* Force loopback to disconnect PHY for Ethernet medium. */ + /* Force loopback to disconnect PHY from Ethernet medium. */ brgphy_enable_loopback(sc); - /* Disable 1000BaseT advertisements. */ PHY_WRITE(sc, BRGPHY_MII_1000CTL, 0); - /* Disable 10/100 advertisements. */ PHY_WRITE(sc, BRGPHY_MII_ANAR, BRGPHY_SEL_TYPE); - /* Write forced link speed. */ - PHY_WRITE(sc, BRGPHY_MII_BMCR, bmcr); - /* If 10/100 only then configuration is complete. */ - if ((IFM_SUBTYPE(media) != IFM_1000_T) && (IFM_SUBTYPE(media) != IFM_1000_SX)) - goto brgphy_setmedia_exit; + if (IFM_SUBTYPE(media) != IFM_1000_T && + IFM_SUBTYPE(media) != IFM_1000_SX) { + PHY_WRITE(sc, BRGPHY_MII_BMCR, bmcr); + return; + } - /* Set duplex speed advertisement for 1000BaseT/1000BaseX. */ + if (IFM_SUBTYPE(media) == IFM_1000_T) { + gig |= BRGPHY_1000CTL_MSE; + if ((media & IFM_ETH_MASTER) != 0) + gig |= BRGPHY_1000CTL_MSC; + } PHY_WRITE(sc, BRGPHY_MII_1000CTL, gig); - /* Restart auto-negotiation for 1000BaseT/1000BaseX. */ PHY_WRITE(sc, BRGPHY_MII_BMCR, bmcr | BRGPHY_BMCR_AUTOEN | BRGPHY_BMCR_STARTNEG); - - /* If not 5701 PHY then configuration is complete. */ - if (bsc->mii_model != MII_MODEL_xxBROADCOM_BCM5701) - goto brgphy_setmedia_exit; - - /* - * When setting the link manually, one side must be the master and - * the other the slave. However ifmedia doesn't give us a good way - * to specify this, so we fake it by using one of the LINK flags. - * If LINK0 is set, we program the PHY to be a master, otherwise - * it's a slave. - */ - if (master) { - PHY_WRITE(sc, BRGPHY_MII_1000CTL, - gig | BRGPHY_1000CTL_MSE | BRGPHY_1000CTL_MSC); - } else { - PHY_WRITE(sc, BRGPHY_MII_1000CTL, - gig | BRGPHY_1000CTL_MSE); - } - -brgphy_setmedia_exit: - return; } /****************************************************************************/ /* Set the media status based on the PHY settings. */ -/* IFM_FLAG0 = 0 (RX flow control disabled) | 1 (enabled) */ -/* IFM_FLAG1 = 0 (TX flow control disabled) | 1 (enabled) */ /* */ /* Returns: */ /* None */ @@ -550,34 +500,34 @@ brgphy_status(struct mii_softc *sc) { struct brgphy_softc *bsc = (struct brgphy_softc *)sc; struct mii_data *mii = sc->mii_pdata; - int aux, bmcr, bmsr, anar, anlpar, xstat, val; - + int aux, bmcr, bmsr, val, xstat; + u_int flowstat; mii->mii_media_status = IFM_AVALID; mii->mii_media_active = IFM_ETHER; bmsr = PHY_READ(sc, BRGPHY_MII_BMSR) | PHY_READ(sc, BRGPHY_MII_BMSR); bmcr = PHY_READ(sc, BRGPHY_MII_BMCR); - anar = PHY_READ(sc, BRGPHY_MII_ANAR); - anlpar = PHY_READ(sc, BRGPHY_MII_ANLPAR); - /* Loopback is enabled. */ if (bmcr & BRGPHY_BMCR_LOOP) { - mii->mii_media_active |= IFM_LOOP; } - /* Autoneg is still in progress. */ if ((bmcr & BRGPHY_BMCR_AUTOEN) && (bmsr & BRGPHY_BMSR_ACOMP) == 0 && (bsc->serdes_flags & BRGPHY_NOANWAIT) == 0) { /* Erg, still trying, I guess... */ mii->mii_media_active |= IFM_NONE; - goto brgphy_status_exit; + return; } - /* Autoneg is enabled and complete, link should be up. */ if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) { + /* + * NB: reading the ANAR, ANLPAR or 1000STS after the AUXSTS + * wedges at least the PHY of BCM5704 (but not others). + */ + flowstat = mii_phy_flowstatus(sc); + xstat = PHY_READ(sc, BRGPHY_MII_1000STS); aux = PHY_READ(sc, BRGPHY_MII_AUXSTS); /* If copper link is up, get the negotiated speed/duplex. */ @@ -601,8 +551,16 @@ brgphy_status(struct mii_softc *sc) default: mii->mii_media_active |= IFM_NONE; break; } + + if ((mii->mii_media_active & IFM_FDX) != 0) + mii->mii_media_active |= flowstat; + + if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T && + (xstat & BRGPHY_1000STS_MSR) != 0) + mii->mii_media_active |= IFM_ETH_MASTER; } } else { + /* Todo: Add support for flow control. */ /* If serdes link is up, get the negotiated speed/duplex. */ if (bmsr & BRGPHY_BMSR_LINK) { mii->mii_media_status |= IFM_ACTIVE; @@ -620,7 +578,6 @@ brgphy_status(struct mii_softc *sc) else mii->mii_media_active |= IFM_HDX; } - } else if (bsc->serdes_flags & BRGPHY_5708S) { PHY_WRITE(sc, BRGPHY_5708S_BLOCK_ADDR, BRGPHY_5708S_DIG_PG0); xstat = PHY_READ(sc, BRGPHY_5708S_PG0_1000X_STAT1); @@ -642,9 +599,7 @@ brgphy_status(struct mii_softc *sc) mii->mii_media_active |= IFM_FDX; else mii->mii_media_active |= IFM_HDX; - } else if (bsc->serdes_flags & BRGPHY_5709S) { - /* Select GP Status Block of the AN MMD, get autoneg results. */ PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_GP_STATUS); xstat = PHY_READ(sc, BRGPHY_GP_STATUS_TOP_ANEG_STATUS); @@ -670,65 +625,42 @@ brgphy_status(struct mii_softc *sc) else mii->mii_media_active |= IFM_HDX; } - } - - /* Todo: Change bge to use these settings. */ - - /* Fetch flow control settings from the copper PHY. */ - if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) { - /* Set FLAG0 if RX is enabled and FLAG1 if TX is enabled */ - if ((anar & BRGPHY_ANAR_PC) && (anlpar & BRGPHY_ANLPAR_PC)) { - mii->mii_media_active |= IFM_FLAG0 | IFM_FLAG1; - } else if (!(anar & BRGPHY_ANAR_PC) && (anlpar & BRGPHY_ANAR_ASP) && - (anlpar & BRGPHY_ANLPAR_PC) && (anlpar & BRGPHY_ANLPAR_ASP)) { - mii->mii_media_active |= IFM_FLAG1; - } else if ((anar & BRGPHY_ANAR_PC) && (anar & BRGPHY_ANAR_ASP) && - !(anlpar & BRGPHY_ANLPAR_PC) && (anlpar & BRGPHY_ANLPAR_ASP)) { - mii->mii_media_active |= IFM_FLAG0; - } - } - - /* Todo: Add support for fiber settings too. */ - - -brgphy_status_exit: - return; } static void -brgphy_mii_phy_auto(struct mii_softc *sc) +brgphy_mii_phy_auto(struct mii_softc *sc, int media) { struct brgphy_softc *bsc = (struct brgphy_softc *)sc; - int ktcr = 0; + int anar, ktcr = 0; brgphy_reset(sc); - /* Enable flow control in the advertisement register. */ if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) { - /* Pause capability advertisement (pause capable & asymmetric) */ - PHY_WRITE(sc, BRGPHY_MII_ANAR, - BMSR_MEDIA_TO_ANAR(sc->mii_capabilities) | ANAR_CSMA | - BRGPHY_ANAR_ASP | BRGPHY_ANAR_PC); + anar = BMSR_MEDIA_TO_ANAR(sc->mii_capabilities) | ANAR_CSMA; + if ((media & IFM_FLOW) != 0 || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + anar |= BRGPHY_ANAR_PC | BRGPHY_ANAR_ASP; + PHY_WRITE(sc, BRGPHY_MII_ANAR, anar); } else { - PHY_WRITE(sc, BRGPHY_SERDES_ANAR, BRGPHY_SERDES_ANAR_FDX | - BRGPHY_SERDES_ANAR_HDX | BRGPHY_SERDES_ANAR_BOTH_PAUSE); + anar = BRGPHY_SERDES_ANAR_FDX | BRGPHY_SERDES_ANAR_HDX; + if ((media & IFM_FLOW) != 0 || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + anar |= BRGPHY_SERDES_ANAR_BOTH_PAUSE; + PHY_WRITE(sc, BRGPHY_SERDES_ANAR, anar); } - /* Enable speed in the 1000baseT control register */ ktcr = BRGPHY_1000CTL_AFD | BRGPHY_1000CTL_AHD; if (bsc->mii_model == MII_MODEL_xxBROADCOM_BCM5701) ktcr |= BRGPHY_1000CTL_MSE | BRGPHY_1000CTL_MSC; PHY_WRITE(sc, BRGPHY_MII_1000CTL, ktcr); ktcr = PHY_READ(sc, BRGPHY_MII_1000CTL); - /* Start autonegotiation */ - PHY_WRITE(sc, BRGPHY_MII_BMCR,BRGPHY_BMCR_AUTOEN | BRGPHY_BMCR_STARTNEG); + PHY_WRITE(sc, BRGPHY_MII_BMCR, BRGPHY_BMCR_AUTOEN | + BRGPHY_BMCR_STARTNEG); PHY_WRITE(sc, BRGPHY_MII_IMR, 0xFF00); - } - /* Enable loopback to force the link down. */ static void brgphy_enable_loopback(struct mii_softc *sc) @@ -923,7 +855,6 @@ brgphy_fixup_jitter_bug(struct mii_softc PHY_WRITE(sc, dspcode[i].reg, dspcode[i].val); } - static void brgphy_fixup_disable_early_dac(struct mii_softc *sc) { @@ -936,7 +867,6 @@ brgphy_fixup_disable_early_dac(struct mi } - static void brgphy_ethernet_wirespeed(struct mii_softc *sc) { @@ -948,7 +878,6 @@ brgphy_ethernet_wirespeed(struct mii_sof PHY_WRITE(sc, BRGPHY_MII_AUXCTL, val | (1 << 15) | (1 << 4)); } - static void brgphy_jumbo_settings(struct mii_softc *sc, u_long mtu) { @@ -989,7 +918,7 @@ brgphy_reset(struct mii_softc *sc) struct bge_softc *bge_sc = NULL; struct bce_softc *bce_sc = NULL; struct ifnet *ifp; - int val; + int val; /* Perform a standard PHY reset. */ mii_phy_reset(sc); @@ -1029,7 +958,6 @@ brgphy_reset(struct mii_softc *sc) bce_sc = ifp->if_softc; } - /* Handle any bge (NetXtreme/NetLink) workarounds. */ if (bge_sc) { /* Fix up various bugs */ if (bge_sc->bge_phy_flags & BGE_PHY_5704_A0_BUG) @@ -1060,10 +988,7 @@ brgphy_reset(struct mii_softc *sc) /* Adjust output voltage (From Linux driver) */ if (bge_sc->bge_asicrev == BGE_ASICREV_BCM5906) PHY_WRITE(sc, BRGPHY_MII_EPHY_PTEST, 0x12); - - /* Handle any bce (NetXtreme II) workarounds. */ } else if (bce_sc) { - if (BCE_CHIP_NUM(bce_sc) == BCE_CHIP_NUM_5708 && (bce_sc->bce_phy_flags & BCE_PHY_SERDES_FLAG)) { @@ -1154,7 +1079,6 @@ brgphy_reset(struct mii_softc *sc) /* Restore IEEE0 block (assumed in all brgphy(4) code). */ PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_COMBO_IEEE0); - } else if (BCE_CHIP_NUM(bce_sc) == BCE_CHIP_NUM_5709) { if ((BCE_CHIP_REV(bce_sc) == BCE_CHIP_REV_Ax) || (BCE_CHIP_REV(bce_sc) == BCE_CHIP_REV_Bx)) @@ -1167,6 +1091,5 @@ brgphy_reset(struct mii_softc *sc) brgphy_jumbo_settings(sc, ifp->if_mtu); brgphy_ethernet_wirespeed(sc); } - } } Modified: head/sys/dev/mii/ciphy.c ============================================================================== --- head/sys/dev/mii/ciphy.c Sun Nov 14 13:25:01 2010 (r215296) +++ head/sys/dev/mii/ciphy.c Sun Nov 14 13:26:10 2010 (r215297) @@ -165,7 +165,7 @@ ciphy_service(struct mii_softc *sc, stru if (PHY_READ(sc, CIPHY_MII_BMCR) & CIPHY_BMCR_AUTOEN) return (0); #endif - (void) mii_phy_auto(sc); + (void)mii_phy_auto(sc); break; case IFM_1000_T: speed = CIPHY_S1000; @@ -190,30 +190,16 @@ setit: if (IFM_SUBTYPE(ife->ifm_media) != IFM_1000_T) break; + gig |= CIPHY_1000CTL_MSE; + if ((ife->ifm_media & IFM_ETH_MASTER) != 0) + gig |= CIPHY_1000CTL_MSC; PHY_WRITE(sc, CIPHY_MII_1000CTL, gig); PHY_WRITE(sc, CIPHY_MII_BMCR, - speed|CIPHY_BMCR_AUTOEN|CIPHY_BMCR_STARTNEG); - - /* - * When setting the link manually, one side must - * be the master and the other the slave. However - * ifmedia doesn't give us a good way to specify - * this, so we fake it by using one of the LINK - * flags. If LINK0 is set, we program the PHY to - * be a master, otherwise it's a slave. - */ - if ((mii->mii_ifp->if_flags & IFF_LINK0)) { - PHY_WRITE(sc, CIPHY_MII_1000CTL, - gig|CIPHY_1000CTL_MSE|CIPHY_1000CTL_MSC); - } else { - PHY_WRITE(sc, CIPHY_MII_1000CTL, - gig|CIPHY_1000CTL_MSE); - } + speed | CIPHY_BMCR_AUTOEN | CIPHY_BMCR_STARTNEG); break; case IFM_NONE: - PHY_WRITE(sc, MII_BMCR, BMCR_ISO|BMCR_PDOWN); + PHY_WRITE(sc, MII_BMCR, BMCR_ISO | BMCR_PDOWN); break; - case IFM_100_T4: default: return (EINVAL); } @@ -319,6 +305,10 @@ ciphy_status(struct mii_softc *sc) mii->mii_media_active |= IFM_FDX; else mii->mii_media_active |= IFM_HDX; + + if ((IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) && + (PHY_READ(sc, CIPHY_MII_1000STS) & CIPHY_1000STS_MSR) != 0) + mii->mii_media_active |= IFM_ETH_MASTER; } static void Modified: head/sys/dev/mii/e1000phy.c ============================================================================== --- head/sys/dev/mii/e1000phy.c Sun Nov 14 13:25:01 2010 (r215296) +++ head/sys/dev/mii/e1000phy.c Sun Nov 14 13:26:10 2010 (r215297) @@ -91,7 +91,7 @@ DRIVER_MODULE(e1000phy, miibus, e1000phy static int e1000phy_service(struct mii_softc *, struct mii_data *, int); static void e1000phy_status(struct mii_softc *); static void e1000phy_reset(struct mii_softc *); -static int e1000phy_mii_phy_auto(struct e1000phy_softc *); +static int e1000phy_mii_phy_auto(struct e1000phy_softc *, int); static const struct mii_phydesc e1000phys[] = { MII_PHY_DESC(MARVELL, E1000), @@ -146,6 +146,8 @@ e1000phy_attach(device_t dev) sc->mii_service = e1000phy_service; sc->mii_pdata = mii; + sc->mii_flags |= MIIF_NOMANPAUSE; + esc->mii_model = MII_MODEL(ma->mii_id2); ifp = sc->mii_pdata->mii_ifp; if (strcmp(ifp->if_dname, "msk") == 0 && @@ -323,7 +325,7 @@ e1000phy_service(struct mii_softc *sc, s break; if (IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO) { - e1000phy_mii_phy_auto(esc); + e1000phy_mii_phy_auto(esc, ife->ifm_media); break; } @@ -366,27 +368,14 @@ e1000phy_service(struct mii_softc *sc, s reg &= ~E1000_CR_AUTO_NEG_ENABLE; PHY_WRITE(sc, E1000_CR, reg | E1000_CR_RESET); - /* - * When setting the link manually, one side must - * be the master and the other the slave. However - * ifmedia doesn't give us a good way to specify - * this, so we fake it by using one of the LINK - * flags. If LINK0 is set, we program the PHY to - * be a master, otherwise it's a slave. - */ - if (IFM_SUBTYPE(ife->ifm_media) == IFM_1000_T || - (IFM_SUBTYPE(ife->ifm_media) == IFM_1000_SX)) { - if ((mii->mii_ifp->if_flags & IFF_LINK0)) - PHY_WRITE(sc, E1000_1GCR, gig | - E1000_1GCR_MS_ENABLE | E1000_1GCR_MS_VALUE); - else - PHY_WRITE(sc, E1000_1GCR, gig | - E1000_1GCR_MS_ENABLE); - } else { - if ((sc->mii_extcapabilities & - (EXTSR_1000TFDX | EXTSR_1000THDX)) != 0) - PHY_WRITE(sc, E1000_1GCR, 0); - } + if (IFM_SUBTYPE(ife->ifm_media) == IFM_1000_T) { + gig |= E1000_1GCR_MS_ENABLE; + if ((ife->ifm_media & IFM_ETH_MASTER) != 0) + gig |= E1000_1GCR_MS_VALUE; + PHY_WRITE(sc, E1000_1GCR, gig); + } else if ((sc->mii_extcapabilities & + (EXTSR_1000TFDX | EXTSR_1000THDX)) != 0) + PHY_WRITE(sc, E1000_1GCR, 0); PHY_WRITE(sc, E1000_AR, E1000_AR_SELECTOR_FIELD); PHY_WRITE(sc, E1000_CR, speed | E1000_CR_RESET); done: @@ -424,7 +413,7 @@ done: sc->mii_ticks = 0; e1000phy_reset(sc); - e1000phy_mii_phy_auto(esc); + e1000phy_mii_phy_auto(esc, ife->ifm_media); break; } @@ -440,7 +429,7 @@ static void e1000phy_status(struct mii_softc *sc) { struct mii_data *mii = sc->mii_pdata; - int bmcr, bmsr, gsr, ssr, ar, lpar; + int bmcr, bmsr, ssr; mii->mii_media_status = IFM_AVALID; mii->mii_media_active = IFM_ETHER; @@ -485,38 +474,22 @@ e1000phy_status(struct mii_softc *sc) mii->mii_media_active |= IFM_1000_SX; } - if (ssr & E1000_SSR_DUPLEX) + if (ssr & E1000_SSR_DUPLEX) { mii->mii_media_active |= IFM_FDX; - else + if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) + mii->mii_media_active |= mii_phy_flowstatus(sc); + } else mii->mii_media_active |= IFM_HDX; - if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) { - ar = PHY_READ(sc, E1000_AR); - lpar = PHY_READ(sc, E1000_LPAR); - /* FLAG0==rx-flow-control FLAG1==tx-flow-control */ - if ((ar & E1000_AR_PAUSE) && (lpar & E1000_LPAR_PAUSE)) { - mii->mii_media_active |= IFM_FLAG0 | IFM_FLAG1; - } else if (!(ar & E1000_AR_PAUSE) && (ar & E1000_AR_ASM_DIR) && - (lpar & E1000_LPAR_PAUSE) && (lpar & E1000_LPAR_ASM_DIR)) { - mii->mii_media_active |= IFM_FLAG1; - } else if ((ar & E1000_AR_PAUSE) && (ar & E1000_AR_ASM_DIR) && - !(lpar & E1000_LPAR_PAUSE) && (lpar & E1000_LPAR_ASM_DIR)) { - mii->mii_media_active |= IFM_FLAG0; - } - } - - /* FLAG2 : local PHY resolved to MASTER */ - if ((IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) || - (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_SX)) { - PHY_READ(sc, E1000_1GSR); - gsr = PHY_READ(sc, E1000_1GSR); - if ((gsr & E1000_1GSR_MS_CONFIG_RES) != 0) - mii->mii_media_active |= IFM_FLAG2; + if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) { + if (((PHY_READ(sc, E1000_1GSR) | PHY_READ(sc, E1000_1GSR)) & + E1000_1GSR_MS_CONFIG_RES) != 0) + mii->mii_media_active |= IFM_ETH_MASTER; } } static int -e1000phy_mii_phy_auto(struct e1000phy_softc *esc) +e1000phy_mii_phy_auto(struct e1000phy_softc *esc, int media) { struct mii_softc *sc; uint16_t reg; @@ -525,12 +498,13 @@ e1000phy_mii_phy_auto(struct e1000phy_so if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) { reg = PHY_READ(sc, E1000_AR); reg |= E1000_AR_10T | E1000_AR_10T_FD | - E1000_AR_100TX | E1000_AR_100TX_FD | - E1000_AR_PAUSE | E1000_AR_ASM_DIR; + E1000_AR_100TX | E1000_AR_100TX_FD; + if ((media & IFM_FLOW) != 0 || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + reg |= E1000_AR_PAUSE | E1000_AR_ASM_DIR; PHY_WRITE(sc, E1000_AR, reg | E1000_AR_SELECTOR_FIELD); } else - PHY_WRITE(sc, E1000_AR, E1000_FA_1000X_FD | E1000_FA_1000X | - E1000_FA_SYM_PAUSE | E1000_FA_ASYM_PAUSE); + PHY_WRITE(sc, E1000_AR, E1000_FA_1000X_FD | E1000_FA_1000X); if ((sc->mii_extcapabilities & (EXTSR_1000TFDX | EXTSR_1000THDX)) != 0) PHY_WRITE(sc, E1000_1GCR, E1000_1GCR_1000T_FD | E1000_1GCR_1000T); Modified: head/sys/dev/mii/ip1000phy.c ============================================================================== --- head/sys/dev/mii/ip1000phy.c Sun Nov 14 13:25:01 2010 (r215296) +++ head/sys/dev/mii/ip1000phy.c Sun Nov 14 13:26:10 2010 (r215297) @@ -84,7 +84,7 @@ DRIVER_MODULE(ip1000phy, miibus, ip1000p static int ip1000phy_service(struct mii_softc *, struct mii_data *, int); static void ip1000phy_status(struct mii_softc *); static void ip1000phy_reset(struct mii_softc *); -static int ip1000phy_mii_phy_auto(struct mii_softc *); +static int ip1000phy_mii_phy_auto(struct mii_softc *, int); static const struct mii_phydesc ip1000phys[] = { MII_PHY_DESC(ICPLUS, IP1000A), @@ -120,7 +120,7 @@ ip1000phy_attach(device_t dev) sc->mii_service = ip1000phy_service; sc->mii_pdata = mii; - sc->mii_flags |= MIIF_NOISOLATE; + sc->mii_flags |= MIIF_NOISOLATE | MIIF_NOMANPAUSE; isc->model = MII_MODEL(ma->mii_id2); isc->revision = MII_REV(ma->mii_id2); @@ -163,9 +163,8 @@ ip1000phy_service(struct mii_softc *sc, ip1000phy_reset(sc); switch (IFM_SUBTYPE(ife->ifm_media)) { case IFM_AUTO: - (void)ip1000phy_mii_phy_auto(sc); + (void)ip1000phy_mii_phy_auto(sc, ife->ifm_media); goto done; - break; case IFM_1000_T: /* @@ -199,26 +198,10 @@ ip1000phy_service(struct mii_softc *sc, if (IFM_SUBTYPE(ife->ifm_media) != IFM_1000_T) break; + gig |= IP1000PHY_1000CR_MASTER | IP1000PHY_1000CR_MANUAL; + if ((ife->ifm_media & IFM_ETH_MASTER) != 0) + gig |= IP1000PHY_1000CR_MMASTER; PHY_WRITE(sc, IP1000PHY_MII_1000CR, gig); - PHY_WRITE(sc, IP1000PHY_MII_BMCR, speed); - - /* - * When setting the link manually, one side must - * be the master and the other the slave. However - * ifmedia doesn't give us a good way to specify - * this, so we fake it by using one of the LINK - * flags. If LINK0 is set, we program the PHY to - * be a master, otherwise it's a slave. - */ - if ((mii->mii_ifp->if_flags & IFF_LINK0)) - PHY_WRITE(sc, IP1000PHY_MII_1000CR, gig | - IP1000PHY_1000CR_MASTER | - IP1000PHY_1000CR_MMASTER | - IP1000PHY_1000CR_MANUAL); - else - PHY_WRITE(sc, IP1000PHY_MII_1000CR, gig | - IP1000PHY_1000CR_MASTER | - IP1000PHY_1000CR_MANUAL); done: break; @@ -258,7 +241,7 @@ done: break; sc->mii_ticks = 0; - ip1000phy_mii_phy_auto(sc); + ip1000phy_mii_phy_auto(sc, ife->ifm_media); break; } @@ -276,7 +259,6 @@ ip1000phy_status(struct mii_softc *sc) struct ip1000phy_softc *isc; struct mii_data *mii = sc->mii_pdata; uint32_t bmsr, bmcr, stat; - uint32_t ar, lpar; isc = (struct ip1000phy_softc *)sc; @@ -345,36 +327,18 @@ ip1000phy_status(struct mii_softc *sc) mii->mii_media_active |= IFM_HDX; } - ar = PHY_READ(sc, IP1000PHY_MII_ANAR); - lpar = PHY_READ(sc, IP1000PHY_MII_ANLPAR); - - /* - * FLAG0 : Rx flow-control - * FLAG1 : Tx flow-control - */ - if ((ar & IP1000PHY_ANAR_PAUSE) && (lpar & IP1000PHY_ANLPAR_PAUSE)) - mii->mii_media_active |= IFM_FLAG0 | IFM_FLAG1; - else if (!(ar & IP1000PHY_ANAR_PAUSE) && (ar & IP1000PHY_ANAR_APAUSE) && - (lpar & IP1000PHY_ANLPAR_PAUSE) && (lpar & IP1000PHY_ANLPAR_APAUSE)) - mii->mii_media_active |= IFM_FLAG1; - else if ((ar & IP1000PHY_ANAR_PAUSE) && (ar & IP1000PHY_ANAR_APAUSE) && - !(lpar & IP1000PHY_ANLPAR_PAUSE) && - (lpar & IP1000PHY_ANLPAR_APAUSE)) { - mii->mii_media_active |= IFM_FLAG0; - } + if ((mii->mii_media_active & IFM_FDX) != 0) + mii->mii_media_active |= mii_phy_flowstatus(sc); - /* - * FLAG2 : local PHY resolved to MASTER - */ if ((mii->mii_media_active & IFM_1000_T) != 0) { stat = PHY_READ(sc, IP1000PHY_MII_1000SR); if ((stat & IP1000PHY_1000SR_MASTER) != 0) - mii->mii_media_active |= IFM_FLAG2; + mii->mii_media_active |= IFM_ETH_MASTER; } } static int -ip1000phy_mii_phy_auto(struct mii_softc *sc) +ip1000phy_mii_phy_auto(struct mii_softc *sc, int media) { struct ip1000phy_softc *isc; uint32_t reg; @@ -386,8 +350,9 @@ ip1000phy_mii_phy_auto(struct mii_softc reg |= IP1000PHY_ANAR_NP; } reg |= IP1000PHY_ANAR_10T | IP1000PHY_ANAR_10T_FDX | - IP1000PHY_ANAR_100TX | IP1000PHY_ANAR_100TX_FDX | - IP1000PHY_ANAR_PAUSE | IP1000PHY_ANAR_APAUSE; + IP1000PHY_ANAR_100TX | IP1000PHY_ANAR_100TX_FDX; + if ((media & IFM_FLOW) != 0 || (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + reg |= IP1000PHY_ANAR_PAUSE | IP1000PHY_ANAR_APAUSE; PHY_WRITE(sc, IP1000PHY_MII_ANAR, reg | IP1000PHY_ANAR_CSMA); reg = IP1000PHY_1000CR_1000T | IP1000PHY_1000CR_1000T_FDX; Modified: head/sys/dev/mii/mii.h ============================================================================== --- head/sys/dev/mii/mii.h Sun Nov 14 13:25:01 2010 (r215296) +++ head/sys/dev/mii/mii.h Sun Nov 14 13:26:10 2010 (r215297) @@ -128,6 +128,10 @@ #define ANAR_10_FD 0x0040 /* local device supports 10bT FD */ #define ANAR_10 0x0020 /* local device supports 10bT */ #define ANAR_CSMA 0x0001 /* protocol selector CSMA/CD */ +#define ANAR_PAUSE_NONE (0 << 10) +#define ANAR_PAUSE_SYM (1 << 10) +#define ANAR_PAUSE_ASYM (2 << 10) +#define ANAR_PAUSE_TOWARDS (3 << 10) #define ANAR_X_FD 0x0020 /* local device supports 1000BASE-X FD */ #define ANAR_X_HD 0x0040 /* local device supports 1000BASE-X HD */ @@ -148,6 +152,11 @@ #define ANLPAR_10_FD 0x0040 /* link partner supports 10bT FD */ #define ANLPAR_10 0x0020 /* link partner supports 10bT */ #define ANLPAR_CSMA 0x0001 /* protocol selector CSMA/CD */ +#define ANLPAR_PAUSE_MASK (3 << 10) +#define ANLPAR_PAUSE_NONE (0 << 10) +#define ANLPAR_PAUSE_SYM (1 << 10) +#define ANLPAR_PAUSE_ASYM (2 << 10) +#define ANLPAR_PAUSE_TOWARDS (3 << 10) #define ANLPAR_X_FD 0x0020 /* local device supports 1000BASE-X FD */ #define ANLPAR_X_HD 0x0040 /* local device supports 1000BASE-X HD */ Modified: head/sys/dev/mii/mii_physubr.c ============================================================================== --- head/sys/dev/mii/mii_physubr.c Sun Nov 14 13:25:01 2010 (r215296) +++ head/sys/dev/mii/mii_physubr.c Sun Nov 14 13:26:10 2010 (r215297) @@ -106,8 +106,13 @@ mii_phy_setmedia(struct mii_softc *sc) int bmcr, anar, gtcr; if (IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO) { + /* + * Force renegotiation if MIIF_DOPAUSE or MIIF_FORCEANEG. + * The former is necessary as we might switch from flow- + * control advertisment being off to on or vice versa. + */ if ((PHY_READ(sc, MII_BMCR) & BMCR_AUTOEN) == 0 || - (sc->mii_flags & MIIF_FORCEANEG) != 0) + (sc->mii_flags & (MIIF_DOPAUSE | MIIF_FORCEANEG)) != 0) (void)mii_phy_auto(sc); return; } @@ -124,14 +129,23 @@ mii_phy_setmedia(struct mii_softc *sc) bmcr = mii_media_table[ife->ifm_data].mm_bmcr; gtcr = mii_media_table[ife->ifm_data].mm_gtcr; - if ((mii->mii_media.ifm_media & IFM_ETH_MASTER) != 0) { - switch (IFM_SUBTYPE(ife->ifm_media)) { - case IFM_1000_T: - gtcr |= GTCR_MAN_MS | GTCR_ADV_MS; - break; + if (IFM_SUBTYPE(ife->ifm_media) == IFM_1000_T) { + gtcr |= GTCR_MAN_MS; + if ((ife->ifm_media & IFM_ETH_MASTER) != 0) + gtcr |= GTCR_ADV_MS; + } - default: - printf("mii_phy_setmedia: MASTER on wrong media\n"); + if ((ife->ifm_media & IFM_GMASK) == (IFM_FDX | IFM_FLOW) || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0) { + if ((sc->mii_flags & MIIF_IS_1000X) != 0) + anar |= ANAR_X_PAUSE_TOWARDS; + else { + anar |= ANAR_FC; + /* XXX Only 1000BASE-T has PAUSE_ASYM? */ + if ((sc->mii_flags & MIIF_HAVE_GTCR) != 0 && + (sc->mii_extcapabilities & + (EXTSR_1000THDX | EXTSR_1000TFDX)) != 0) + anar |= ANAR_X_PAUSE_ASYM; } } @@ -147,6 +161,7 @@ mii_phy_setmedia(struct mii_softc *sc) int mii_phy_auto(struct mii_softc *sc) { + struct ifmedia_entry *ife = sc->mii_pdata->mii_media.ifm_cur; int anar, gtcr; /* @@ -160,16 +175,23 @@ mii_phy_auto(struct mii_softc *sc) if ((sc->mii_extcapabilities & EXTSR_1000XHDX) != 0) anar |= ANAR_X_HD; - if ((sc->mii_flags & MIIF_DOPAUSE) != 0) { - /* XXX Asymmetric vs. symmetric? */ - anar |= ANLPAR_X_PAUSE_TOWARDS; - } + if ((ife->ifm_media & IFM_FLOW) != 0 || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + anar |= ANAR_X_PAUSE_TOWARDS; PHY_WRITE(sc, MII_ANAR, anar); } else { anar = BMSR_MEDIA_TO_ANAR(sc->mii_capabilities) | ANAR_CSMA; - if ((sc->mii_flags & MIIF_DOPAUSE) != 0) - anar |= ANAR_FC; + if ((ife->ifm_media & IFM_FLOW) != 0 || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0) { + if ((sc->mii_capabilities & BMSR_100TXFDX) != 0) + anar |= ANAR_FC; + /* XXX Only 1000BASE-T has PAUSE_ASYM? */ + if (((sc->mii_flags & MIIF_HAVE_GTCR) != 0) && + (sc->mii_extcapabilities & + (EXTSR_1000THDX | EXTSR_1000TFDX)) != 0) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 13:31:01 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 685F2106564A; Sun, 14 Nov 2010 13:31:01 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 551D08FC0C; Sun, 14 Nov 2010 13:31:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEDV1ZC083262; Sun, 14 Nov 2010 13:31:01 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEDV15W083256; Sun, 14 Nov 2010 13:31:01 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011141331.oAEDV15W083256@svn.freebsd.org> From: Marius Strobl Date: Sun, 14 Nov 2010 13:31:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215298 - head/sys/dev/mii X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 13:31:01 -0000 Author: marius Date: Sun Nov 14 13:31:01 2010 New Revision: 215298 URL: http://svn.freebsd.org/changeset/base/215298 Log: - Change these drivers to take advantage and use the generic IEEE 802.3 annex 31B full duplex flow control as well as the IFM_1000_T master support committed in r215297. For atphy(4) and jmphy(4) this includes changing these PHY drivers to no longer unconditionally advertise support for flow control but only if the selected media has IFM_FLOW set (or MIIF_FORCEPAUSE is set). - Rename {atphy,jmphy}_auto() to {atphy,jmphy}_setmedia() as these handle other media types as well. Reviewed by: yongari (plus additional testing) Obtained from: NetBSD (partially), OpenBSD (partially) MFC after: 2 weeks Modified: head/sys/dev/mii/atphy.c head/sys/dev/mii/gentbi.c head/sys/dev/mii/jmphy.c head/sys/dev/mii/nsgphy.c head/sys/dev/mii/rgephy.c Modified: head/sys/dev/mii/atphy.c ============================================================================== --- head/sys/dev/mii/atphy.c Sun Nov 14 13:26:10 2010 (r215297) +++ head/sys/dev/mii/atphy.c Sun Nov 14 13:31:01 2010 (r215298) @@ -82,7 +82,7 @@ static int atphy_service(struct mii_soft static void atphy_status(struct mii_softc *); static void atphy_reset(struct mii_softc *); static uint16_t atphy_anar(struct ifmedia_entry *); -static int atphy_auto(struct mii_softc *); +static int atphy_setmedia(struct mii_softc *, int); static const struct mii_phydesc atphys[] = { MII_PHY_DESC(ATHEROS, F1), @@ -158,7 +158,7 @@ atphy_service(struct mii_softc *sc, stru if (IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO || IFM_SUBTYPE(ife->ifm_media) == IFM_1000_T) { - atphy_auto(sc); + atphy_setmedia(sc, ife->ifm_media); break; } @@ -175,7 +175,7 @@ atphy_service(struct mii_softc *sc, stru /* * XXX * Due to an unknown reason powering down PHY resulted - * in unexpected results such as inaccessbility of + * in unexpected results such as inaccessibility of * hardware of freshly rebooted system. Disable * powering down PHY until I got more information for * Attansic/Atheros PHY hardwares. @@ -189,8 +189,9 @@ atphy_service(struct mii_softc *sc, stru anar = atphy_anar(ife); if (((ife->ifm_media & IFM_GMASK) & IFM_FDX) != 0) { bmcr |= BMCR_FDX; - /* Enable pause. */ - anar |= (3 << 10); + if (((ife->ifm_media & IFM_GMASK) & IFM_FLOW) != 0 || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + anar |= ANAR_PAUSE_TOWARDS; } if ((sc->mii_extcapabilities & (EXTSR_1000TFDX | @@ -222,7 +223,7 @@ done: } /* - * check for link. + * Check for link. * Read the status register twice; BMSR_LINK is latch-low. */ bmsr = PHY_READ(sc, MII_BMSR) | PHY_READ(sc, MII_BMSR); @@ -238,7 +239,7 @@ done: return (0); sc->mii_ticks = 0; - atphy_auto(sc); + atphy_setmedia(sc, ife->ifm_media); break; } @@ -284,7 +285,7 @@ atphy_status(struct mii_softc *sc) case ATPHY_SSR_1000MBS: mii->mii_media_active |= IFM_1000_T; /* - * atphy(4) got a valid link so reset mii_ticks. + * atphy(4) has a valid link so reset mii_ticks. * Resetting mii_ticks is needed in order to * detect link loss after auto-negotiation. */ @@ -304,11 +305,13 @@ atphy_status(struct mii_softc *sc) } if ((ssr & ATPHY_SSR_DUPLEX) != 0) - mii->mii_media_active |= IFM_FDX; + mii->mii_media_active |= IFM_FDX | mii_phy_flowstatus(sc); else mii->mii_media_active |= IFM_HDX; - /* XXX Master/Slave, Flow-control */ + if ((IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) && + (PHY_READ(sc, MII_100T2SR) & GTSR_MS_RES) != 0) + mii->mii_media_active |= IFM_ETH_MASTER; } static void @@ -336,7 +339,7 @@ atphy_reset(struct mii_softc *sc) PHY_WRITE(sc, ATPHY_SCR, reg); /* Workaround F1 bug to reset phy. */ - atphy_auto(sc); + atphy_setmedia(sc, sc->mii_pdata->mii_media.ifm_cur->ifm_media); for (i = 0; i < 1000; i++) { DELAY(1); @@ -378,12 +381,17 @@ atphy_anar(struct ifmedia_entry *ife) } static int -atphy_auto(struct mii_softc *sc) +atphy_setmedia(struct mii_softc *sc, int media) { uint16_t anar; - anar = BMSR_MEDIA_TO_ANAR(sc->mii_capabilities); - PHY_WRITE(sc, MII_ANAR, anar | (3 << 10) | ANAR_CSMA); + anar = BMSR_MEDIA_TO_ANAR(sc->mii_capabilities) | ANAR_CSMA; + if (((IFM_SUBTYPE(media) == IFM_AUTO || + ((media & IFM_GMASK) & IFM_FDX) != 0) && + ((media & IFM_GMASK) & IFM_FLOW) != 0) || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + anar |= ANAR_PAUSE_TOWARDS; + PHY_WRITE(sc, MII_ANAR, anar); if ((sc->mii_extcapabilities & (EXTSR_1000TFDX | EXTSR_1000THDX)) != 0) PHY_WRITE(sc, MII_100T2CR, GTCR_ADV_1000TFDX | GTCR_ADV_1000THDX); Modified: head/sys/dev/mii/gentbi.c ============================================================================== --- head/sys/dev/mii/gentbi.c Sun Nov 14 13:26:10 2010 (r215297) +++ head/sys/dev/mii/gentbi.c Sun Nov 14 13:31:01 2010 (r215298) @@ -267,7 +267,8 @@ gentbi_status(struct mii_softc *sc) anlpar = PHY_READ(sc, MII_ANLPAR); if ((sc->mii_extcapabilities & EXTSR_1000XFDX) != 0 && (anlpar & ANLPAR_X_FD) != 0) - mii->mii_media_active |= IFM_FDX; + mii->mii_media_active |= + IFM_FDX | mii_phy_flowstatus(sc); else mii->mii_media_active |= IFM_HDX; } else Modified: head/sys/dev/mii/jmphy.c ============================================================================== --- head/sys/dev/mii/jmphy.c Sun Nov 14 13:26:10 2010 (r215297) +++ head/sys/dev/mii/jmphy.c Sun Nov 14 13:31:01 2010 (r215298) @@ -50,11 +50,11 @@ __FBSDID("$FreeBSD$"); #include "miibus_if.h" -static int jmphy_probe(device_t); -static int jmphy_attach(device_t); +static int jmphy_probe(device_t); +static int jmphy_attach(device_t); static void jmphy_reset(struct mii_softc *); static uint16_t jmphy_anar(struct ifmedia_entry *); -static int jmphy_auto(struct mii_softc *, struct ifmedia_entry *); +static int jmphy_setmedia(struct mii_softc *, struct ifmedia_entry *); struct jmphy_softc { struct mii_softc mii_sc; @@ -154,7 +154,7 @@ jmphy_service(struct mii_softc *sc, stru if ((mii->mii_ifp->if_flags & IFF_UP) == 0) break; - if (jmphy_auto(sc, ife) != EJUSTRETURN) + if (jmphy_setmedia(sc, ife) != EJUSTRETURN) return (EINVAL); break; @@ -186,7 +186,7 @@ jmphy_service(struct mii_softc *sc, stru return (0); sc->mii_ticks = 0; - jmphy_auto(sc, ife); + (void)jmphy_setmedia(sc, ife); break; } @@ -251,16 +251,14 @@ jmphy_status(struct mii_softc *sc) } if ((ssr & JMPHY_SSR_DUPLEX) != 0) - mii->mii_media_active |= IFM_FDX; + mii->mii_media_active |= IFM_FDX | mii_phy_flowstatus(sc); else mii->mii_media_active |= IFM_HDX; - /* XXX Flow-control. */ -#ifdef notyet + if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) { if ((PHY_READ(sc, MII_100T2SR) & GTSR_MS_RES) != 0) mii->mii_media_active |= IFM_ETH_MASTER; } -#endif } static void @@ -309,7 +307,7 @@ jmphy_anar(struct ifmedia_entry *ife) } static int -jmphy_auto(struct mii_softc *sc, struct ifmedia_entry *ife) +jmphy_setmedia(struct mii_softc *sc, struct ifmedia_entry *ife) { uint16_t anar, bmcr, gig; @@ -336,17 +334,18 @@ jmphy_auto(struct mii_softc *sc, struct bmcr |= BMCR_LOOP; anar = jmphy_anar(ife); - /* XXX Always advertise pause capability. */ - anar |= (3 << 10); + if (((IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO || + (ife->ifm_media & IFM_FDX) != 0) && + (ife->ifm_media & IFM_FLOW) != 0) || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + anar |= ANAR_PAUSE_TOWARDS; if ((sc->mii_flags & MIIF_HAVE_GTCR) != 0) { -#ifdef notyet - struct mii_data *mii; - - mii = sc->mii_pdata; - if ((mii->mii_media.ifm_media & IFM_ETH_MASTER) != 0) - gig |= GTCR_MAN_MS | GTCR_MAN_ADV; -#endif + if (IFM_SUBTYPE(ife->ifm_media) == IFM_1000_T) { + gig |= GTCR_MAN_MS; + if ((ife->ifm_media & IFM_ETH_MASTER) != 0) + gig |= GTCR_ADV_MS; + } PHY_WRITE(sc, MII_100T2CR, gig); } PHY_WRITE(sc, MII_ANAR, anar | ANAR_CSMA); Modified: head/sys/dev/mii/nsgphy.c ============================================================================== --- head/sys/dev/mii/nsgphy.c Sun Nov 14 13:26:10 2010 (r215297) +++ head/sys/dev/mii/nsgphy.c Sun Nov 14 13:31:01 2010 (r215298) @@ -246,7 +246,8 @@ nsgphy_status(struct mii_softc *sc) } if (physup & PHY_SUP_DUPLEX) - mii->mii_media_active |= IFM_FDX; + mii->mii_media_active |= + IFM_FDX | mii_phy_flowstatus(sc); else mii->mii_media_active |= IFM_HDX; } else Modified: head/sys/dev/mii/rgephy.c ============================================================================== --- head/sys/dev/mii/rgephy.c Sun Nov 14 13:26:10 2010 (r215297) +++ head/sys/dev/mii/rgephy.c Sun Nov 14 13:31:01 2010 (r215298) @@ -89,7 +89,7 @@ DRIVER_MODULE(rgephy, miibus, rgephy_dri static int rgephy_service(struct mii_softc *, struct mii_data *, int); static void rgephy_status(struct mii_softc *); -static int rgephy_mii_phy_auto(struct mii_softc *); +static int rgephy_mii_phy_auto(struct mii_softc *, int); static void rgephy_reset(struct mii_softc *); static void rgephy_loop(struct mii_softc *); static void rgephy_load_dspcode(struct mii_softc *); @@ -113,7 +113,6 @@ rgephy_attach(device_t dev) struct mii_softc *sc; struct mii_attach_args *ma; struct mii_data *mii; - const char *sep = ""; rsc = device_get_softc(dev); sc = &rsc->mii_sc; @@ -132,27 +131,21 @@ rgephy_attach(device_t dev) rsc->mii_revision = MII_REV(ma->mii_id2); #define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL) -#define PRINT(s) printf("%s%s", sep, s); sep = ", " #if 0 ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_LOOP, sc->mii_inst), MII_MEDIA_100_TX); #endif - sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & ma->mii_capmask; - sc->mii_capabilities &= ~BMSR_ANEG; + /* RTL8169S do not report auto-sense; add manually. */ + sc->mii_capabilities = (PHY_READ(sc, MII_BMSR) | BMSR_ANEG) & + ma->mii_capmask; if (sc->mii_capabilities & BMSR_EXTSTAT) sc->mii_extcapabilities = PHY_READ(sc, MII_EXTSR); - device_printf(dev, " "); mii_phy_add_media(sc); - /* RTL8169S do not report auto-sense; add manually. */ - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst), MII_NMEDIA); - sep = ", "; - PRINT("auto"); printf("\n"); #undef ADD -#undef PRINT rgephy_reset(sc); MIIBUS_MEDIAINIT(sc->mii_dev); @@ -182,7 +175,8 @@ rgephy_service(struct mii_softc *sc, str rgephy_reset(sc); /* XXX hardware bug work-around */ anar = PHY_READ(sc, RGEPHY_MII_ANAR); - anar &= ~(RGEPHY_ANAR_TX_FD | RGEPHY_ANAR_TX | + anar &= ~(RGEPHY_ANAR_PC | RGEPHY_ANAR_ASP | + RGEPHY_ANAR_TX_FD | RGEPHY_ANAR_TX | RGEPHY_ANAR_10_FD | RGEPHY_ANAR_10); switch (IFM_SUBTYPE(ife->ifm_media)) { @@ -194,7 +188,7 @@ rgephy_service(struct mii_softc *sc, str if (PHY_READ(sc, RGEPHY_MII_BMCR) & RGEPHY_BMCR_AUTOEN) return (0); #endif - (void) rgephy_mii_phy_auto(sc); + (void)rgephy_mii_phy_auto(sc, ife->ifm_media); break; case IFM_1000_T: speed = RGEPHY_S1000; @@ -222,32 +216,26 @@ setit: PHY_WRITE(sc, RGEPHY_MII_1000CTL, 0); PHY_WRITE(sc, RGEPHY_MII_ANAR, anar); PHY_WRITE(sc, RGEPHY_MII_BMCR, speed | - RGEPHY_BMCR_AUTOEN | RGEPHY_BMCR_STARTNEG); + RGEPHY_BMCR_AUTOEN | + RGEPHY_BMCR_STARTNEG); break; } - /* - * When setting the link manually, one side must - * be the master and the other the slave. However - * ifmedia doesn't give us a good way to specify - * this, so we fake it by using one of the LINK - * flags. If LINK0 is set, we program the PHY to - * be a master, otherwise it's a slave. - */ - if ((mii->mii_ifp->if_flags & IFF_LINK0)) { - PHY_WRITE(sc, RGEPHY_MII_1000CTL, - gig|RGEPHY_1000CTL_MSE|RGEPHY_1000CTL_MSC); - } else { - PHY_WRITE(sc, RGEPHY_MII_1000CTL, - gig|RGEPHY_1000CTL_MSE); - } + if ((ife->ifm_media & IFM_FLOW) != 0 || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + anar |= RGEPHY_ANAR_PC | RGEPHY_ANAR_ASP; + + gig |= RGEPHY_1000CTL_MSE; + if ((ife->ifm_media & IFM_ETH_MASTER) != 0) + gig |= RGEPHY_1000CTL_MSC; + PHY_WRITE(sc, RGEPHY_MII_1000CTL, gig); + PHY_WRITE(sc, RGEPHY_MII_ANAR, anar); PHY_WRITE(sc, RGEPHY_MII_BMCR, speed | RGEPHY_BMCR_AUTOEN | RGEPHY_BMCR_STARTNEG); break; case IFM_NONE: - PHY_WRITE(sc, MII_BMCR, BMCR_ISO|BMCR_PDOWN); + PHY_WRITE(sc, MII_BMCR, BMCR_ISO | BMCR_PDOWN); break; - case IFM_100_T4: default: return (EINVAL); } @@ -297,7 +285,7 @@ setit: return (0); sc->mii_ticks = 0; - rgephy_mii_phy_auto(sc); + rgephy_mii_phy_auto(sc, ife->ifm_media); break; } @@ -395,22 +383,32 @@ rgephy_status(struct mii_softc *sc) else mii->mii_media_active |= IFM_HDX; } + + if ((mii->mii_media_active & IFM_FDX) != 0) + mii->mii_media_active |= mii_phy_flowstatus(sc); + + if ((IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) && + (PHY_READ(sc, RGEPHY_MII_1000STS) & RGEPHY_1000STS_MSR) != 0) + mii->mii_media_active |= IFM_ETH_MASTER; } static int -rgephy_mii_phy_auto(struct mii_softc *mii) +rgephy_mii_phy_auto(struct mii_softc *sc, int media) { + int anar; - rgephy_loop(mii); - rgephy_reset(mii); + rgephy_loop(sc); + rgephy_reset(sc); - PHY_WRITE(mii, RGEPHY_MII_ANAR, - BMSR_MEDIA_TO_ANAR(mii->mii_capabilities) | ANAR_CSMA); + anar = BMSR_MEDIA_TO_ANAR(sc->mii_capabilities) | ANAR_CSMA; + if ((media & IFM_FLOW) != 0 || (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + anar |= RGEPHY_ANAR_PC | RGEPHY_ANAR_ASP; + PHY_WRITE(sc, RGEPHY_MII_ANAR, anar); DELAY(1000); - PHY_WRITE(mii, RGEPHY_MII_1000CTL, - RGEPHY_1000CTL_AHD|RGEPHY_1000CTL_AFD); + PHY_WRITE(sc, RGEPHY_MII_1000CTL, + RGEPHY_1000CTL_AHD | RGEPHY_1000CTL_AFD); DELAY(1000); - PHY_WRITE(mii, RGEPHY_MII_BMCR, + PHY_WRITE(sc, RGEPHY_MII_BMCR, RGEPHY_BMCR_AUTOEN | RGEPHY_BMCR_STARTNEG); DELAY(100); From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 14:12:43 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2B841065672; Sun, 14 Nov 2010 14:12:43 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B5EB18FC08; Sun, 14 Nov 2010 14:12:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEEChP1084112; Sun, 14 Nov 2010 14:12:43 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEEChsE084107; Sun, 14 Nov 2010 14:12:43 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201011141412.oAEEChsE084107@svn.freebsd.org> From: Ed Schouten Date: Sun, 14 Nov 2010 14:12:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215299 - in head/sys: geom/eli kern libkern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 14:12:44 -0000 Author: ed Date: Sun Nov 14 14:12:43 2010 New Revision: 215299 URL: http://svn.freebsd.org/changeset/base/215299 Log: Add support for asterisk characters when filling in the GELI password during boot. Change the last argument of gets() to indicate a visibility flag and add definitions for the numerical constants. Except for the value 2, gets() will behave exactly the same, so existing consumers shouldn't break. We only use it in two places, though. Submitted by: lme (older version) Modified: head/sys/geom/eli/g_eli.c head/sys/kern/vfs_mountroot.c head/sys/libkern/gets.c head/sys/sys/libkern.h Modified: head/sys/geom/eli/g_eli.c ============================================================================== --- head/sys/geom/eli/g_eli.c Sun Nov 14 13:31:01 2010 (r215298) +++ head/sys/geom/eli/g_eli.c Sun Nov 14 14:12:43 2010 (r215299) @@ -64,11 +64,11 @@ static u_int g_eli_tries = 3; TUNABLE_INT("kern.geom.eli.tries", &g_eli_tries); SYSCTL_UINT(_kern_geom_eli, OID_AUTO, tries, CTLFLAG_RW, &g_eli_tries, 0, "Number of tries for entering the passphrase"); -static u_int g_eli_visible_passphrase = 0; +static u_int g_eli_visible_passphrase = GETS_NOECHO; TUNABLE_INT("kern.geom.eli.visible_passphrase", &g_eli_visible_passphrase); SYSCTL_UINT(_kern_geom_eli, OID_AUTO, visible_passphrase, CTLFLAG_RW, &g_eli_visible_passphrase, 0, - "Turn on echo when entering the passphrase (for debug purposes only!!)"); + "Visibility of passphrase prompt (0 = invisible, 1 = visible, 2 = asterisk)"); u_int g_eli_overwrites = G_ELI_OVERWRITES; TUNABLE_INT("kern.geom.eli.overwrites", &g_eli_overwrites); SYSCTL_UINT(_kern_geom_eli, OID_AUTO, overwrites, CTLFLAG_RW, &g_eli_overwrites, Modified: head/sys/kern/vfs_mountroot.c ============================================================================== --- head/sys/kern/vfs_mountroot.c Sun Nov 14 13:31:01 2010 (r215298) +++ head/sys/kern/vfs_mountroot.c Sun Nov 14 14:12:43 2010 (r215299) @@ -484,7 +484,7 @@ parse_dir_ask(char **conf) again: printf("\nmountroot> "); - gets(name, sizeof(name), 1); + gets(name, sizeof(name), GETS_ECHO); if (name[0] == '\0') return (0); if (name[0] == '?') { Modified: head/sys/libkern/gets.c ============================================================================== --- head/sys/libkern/gets.c Sun Nov 14 13:31:01 2010 (r215298) +++ head/sys/libkern/gets.c Sun Nov 14 14:12:43 2010 (r215299) @@ -60,8 +60,16 @@ gets(char *cp, size_t size, int visible) continue; default: if (lp < end) { - if (visible) + switch (visible) { + case GETS_NOECHO: + break; + case GETS_ECHOPASS: + printf("*"); + break; + default: printf("%c", c); + break; + } *lp++ = c; } } Modified: head/sys/sys/libkern.h ============================================================================== --- head/sys/sys/libkern.h Sun Nov 14 13:31:01 2010 (r215298) +++ head/sys/sys/libkern.h Sun Nov 14 14:12:43 2010 (r215299) @@ -187,4 +187,9 @@ strrchr(const char *p, int ch) #define FNM_IGNORECASE FNM_CASEFOLD #define FNM_FILE_NAME FNM_PATHNAME +/* Visibility of characters in gets() */ +#define GETS_NOECHO 0 /* Disable echoing of characters. */ +#define GETS_ECHO 1 /* Enable echoing of characters. */ +#define GETS_ECHOPASS 2 /* Print a * for every character. */ + #endif /* !_SYS_LIBKERN_H_ */ From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 14:25:04 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5354106564A; Sun, 14 Nov 2010 14:25:04 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BEA458FC08; Sun, 14 Nov 2010 14:25:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEEP4F3084429; Sun, 14 Nov 2010 14:25:04 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEEP4t4084427; Sun, 14 Nov 2010 14:25:04 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011141425.oAEEP4t4084427@svn.freebsd.org> From: Marius Strobl Date: Sun, 14 Nov 2010 14:25:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215300 - head/sys/dev/mii X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 14:25:05 -0000 Author: marius Date: Sun Nov 14 14:25:04 2010 New Revision: 215300 URL: http://svn.freebsd.org/changeset/base/215300 Log: Remove redundant cases and a style(9) bug. Modified: head/sys/dev/mii/xmphy.c Modified: head/sys/dev/mii/xmphy.c ============================================================================== --- head/sys/dev/mii/xmphy.c Sun Nov 14 14:12:43 2010 (r215299) +++ head/sys/dev/mii/xmphy.c Sun Nov 14 14:25:04 2010 (r215300) @@ -167,7 +167,7 @@ xmphy_service(struct mii_softc *sc, stru if (PHY_READ(sc, XMPHY_MII_BMCR) & XMPHY_BMCR_AUTOEN) return (0); #endif - (void) xmphy_mii_phy_auto(sc); + (void)xmphy_mii_phy_auto(sc); break; case IFM_1000_SX: mii_phy_reset(sc); @@ -179,9 +179,6 @@ xmphy_service(struct mii_softc *sc, stru PHY_WRITE(sc, XMPHY_MII_BMCR, 0); } break; - case IFM_100_T4: - case IFM_100_TX: - case IFM_10_T: default: return (EINVAL); } From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 14:37:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F01C8106564A; Sun, 14 Nov 2010 14:37:20 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDD148FC0A; Sun, 14 Nov 2010 14:37:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEEbKkk084734; Sun, 14 Nov 2010 14:37:20 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEEbK3Z084732; Sun, 14 Nov 2010 14:37:20 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011141437.oAEEbK3Z084732@svn.freebsd.org> From: Michael Tuexen Date: Sun, 14 Nov 2010 14:37:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215301 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 14:37:21 -0000 Author: tuexen Date: Sun Nov 14 14:37:20 2010 New Revision: 215301 URL: http://svn.freebsd.org/changeset/base/215301 Log: Simplify sctp_delayed_cksum() a bit. MFC after: 3 days. Modified: head/sys/netinet/sctp_crc32.c Modified: head/sys/netinet/sctp_crc32.c ============================================================================== --- head/sys/netinet/sctp_crc32.c Sun Nov 14 14:25:04 2010 (r215300) +++ head/sys/netinet/sctp_crc32.c Sun Nov 14 14:37:20 2010 (r215301) @@ -124,18 +124,16 @@ sctp_delayed_cksum(struct mbuf *m, uint3 #if defined(SCTP_WITH_NO_CSUM) panic("sctp_delayed_cksum() called when using no SCTP CRC."); #else - struct ip *ip; uint32_t checksum; - ip = mtod(m, struct ip *); checksum = sctp_calculate_cksum(m, offset); SCTP_STAT_DECR(sctps_sendhwcrc); SCTP_STAT_INCR(sctps_sendswcrc); offset += offsetof(struct sctphdr, checksum); if (offset + sizeof(uint32_t) > (uint32_t) (m->m_len)) { - printf("delayed m_pullup, m->len: %d off: %d p: %d\n", - (uint32_t) m->m_len, offset, ip->ip_p); + printf("sctp_delayed_cksum(): m->len: %d, off: %d.\n", + (uint32_t) m->m_len, offset); /* * XXX this shouldn't happen, but if it does, the correct * behavior may be to insert the checksum in the appropriate From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 15:15:23 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A4001065695; Sun, 14 Nov 2010 15:15:23 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 07AD88FC08; Sun, 14 Nov 2010 15:15:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEFFMol085601; Sun, 14 Nov 2010 15:15:22 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEFFMfa085598; Sun, 14 Nov 2010 15:15:22 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011141515.oAEFFMfa085598@svn.freebsd.org> From: Marius Strobl Date: Sun, 14 Nov 2010 15:15:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215302 - in head/sys/dev: bge mii X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 15:15:23 -0000 Author: marius Date: Sun Nov 14 15:15:22 2010 New Revision: 215302 URL: http://svn.freebsd.org/changeset/base/215302 Log: Move the limiting of the PHY to 10/100 modes of operation due to limitations of certain MAC models from brgphy(4) to bge(4) where it belongs. While at it, update the list of models having that restriction to what OpenBSD uses, which in turn seems to have obtained that information from the Linux tg3 driver. Modified: head/sys/dev/bge/if_bge.c head/sys/dev/mii/brgphy.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Sun Nov 14 14:37:20 2010 (r215301) +++ head/sys/dev/bge/if_bge.c Sun Nov 14 15:15:22 2010 (r215302) @@ -2640,7 +2640,7 @@ bge_attach(device_t dev) struct bge_softc *sc; uint32_t hwcfg = 0, misccfg; u_char eaddr[ETHER_ADDR_LEN]; - int error, f, msicount, phy_addr, reg, rid, trys; + int capmask, error, f, msicount, phy_addr, reg, rid, trys; sc = device_get_softc(dev); sc->bge_dev = dev; @@ -2824,13 +2824,31 @@ bge_attach(device_t dev) if (BGE_IS_5755_PLUS(sc) == 0) sc->bge_flags |= BGE_FLAG_4G_BNDRY_BUG; + misccfg = CSR_READ_4(sc, BGE_MISC_CFG) & BGE_MISCCFG_BOARD_ID; if (sc->bge_asicrev == BGE_ASICREV_BCM5705) { - misccfg = CSR_READ_4(sc, BGE_MISC_CFG) & BGE_MISCCFG_BOARD_ID; if (misccfg == BGE_MISCCFG_BOARD_ID_5788 || misccfg == BGE_MISCCFG_BOARD_ID_5788M) sc->bge_flags |= BGE_FLAG_5788; } + capmask = BMSR_DEFCAPMASK; + if ((sc->bge_asicrev == BGE_ASICREV_BCM5703 && + (misccfg == 0x4000 || misccfg == 0x8000)) || + (sc->bge_asicrev == BGE_ASICREV_BCM5705 && + pci_get_vendor(dev) == BCOM_VENDORID && + (pci_get_device(dev) == BCOM_DEVICEID_BCM5901 || + pci_get_device(dev) == BCOM_DEVICEID_BCM5901A2 || + pci_get_device(dev) == BCOM_DEVICEID_BCM5705F)) || + (pci_get_vendor(dev) == BCOM_VENDORID && + (pci_get_device(dev) == BCOM_DEVICEID_BCM5751F || + pci_get_device(dev) == BCOM_DEVICEID_BCM5753F || + pci_get_device(dev) == BCOM_DEVICEID_BCM5787F)) || + pci_get_device(dev) == BCOM_DEVICEID_BCM57790 || + sc->bge_asicrev == BGE_ASICREV_BCM5906) { + /* These chips are 10/100 only. */ + capmask &= ~BMSR_EXTSTAT; + } + /* * Some controllers seem to require a special firmware to use * TSO. But the firmware is not available to FreeBSD and Linux @@ -3104,9 +3122,9 @@ bge_attach(device_t dev) again: bge_asf_driver_up(sc); - error = mii_attach(dev, &sc->bge_miibus, ifp, - bge_ifmedia_upd, bge_ifmedia_sts, BMSR_DEFCAPMASK, - phy_addr, MII_OFFSET_ANY, MIIF_DOPAUSE); + error = mii_attach(dev, &sc->bge_miibus, ifp, bge_ifmedia_upd, + bge_ifmedia_sts, capmask, phy_addr, MII_OFFSET_ANY, + MIIF_DOPAUSE); if (error != 0) { if (trys++ < 4) { device_printf(sc->bge_dev, "Try again\n"); Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Sun Nov 14 14:37:20 2010 (r215301) +++ head/sys/dev/mii/brgphy.c Sun Nov 14 15:15:22 2010 (r215302) @@ -268,17 +268,6 @@ brgphy_attach(device_t dev) bce_sc = ifp->if_softc; } - /* Todo: Need to add additional controllers such as 5906 & 5787F */ - /* The 590x chips are 10/100 only. */ - if (bge_sc && - pci_get_vendor(bge_sc->bge_dev) == BCOM_VENDORID && - (pci_get_device(bge_sc->bge_dev) == BCOM_DEVICEID_BCM5901 || - pci_get_device(bge_sc->bge_dev) == BCOM_DEVICEID_BCM5901A2 || - pci_get_device(bge_sc->bge_dev) == BCOM_DEVICEID_BCM5906 || - pci_get_device(bge_sc->bge_dev) == BCOM_DEVICEID_BCM5906M)) { - ma->mii_capmask &= ~BMSR_EXTSTAT; - } - brgphy_reset(sc); /* Read the PHY's capabilities. */ From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 15:15:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6548C106566B; Sun, 14 Nov 2010 15:15:51 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 68B998FC1C; Sun, 14 Nov 2010 15:15:50 +0000 (UTC) Received: by fxm19 with SMTP id 19so3378946fxm.13 for ; Sun, 14 Nov 2010 07:15:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :x-comment-to:date:in-reply-to:message-id:user-agent:mime-version :content-type:content-transfer-encoding; bh=x7rw1cA56HtZ4bWyPPPDCLnFTfbLVE1n9C63w8H5L2I=; b=c1vggxsxZYuHR3cnOwrrAnfv4/+s761zfOm4LJyo4ByZ38nuprgUZ9KdXAub4xVEHO Vryc/ZzkZIIiIMQB8AqKsCRlyD00g3/hmWSvEfjZvFJr7XcYkGAWh0hIGsslLL7dg1m+ 460/pM2s06FtFUAly21R7AWgq0EvGLVXIv6ug= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:x-comment-to:date:in-reply-to :message-id:user-agent:mime-version:content-type :content-transfer-encoding; b=QdwJNePeor2lPm8hgnKJ4aJjzgYkipN2wFA22Kdzl8+f/GtoCBosHGDpQ4/N9BaqvJ 5EAORfcIyG3RBIqmy+mia5PfgrIqcY0IxIIbCorSII1C/yfYy2o1G/htiLsoVYsRtz7B AKXk1QrkDrzeBK5IfguJreJsrkr4TsFem4Vao= Received: by 10.223.72.14 with SMTP id k14mr3677052faj.45.1289747749161; Sun, 14 Nov 2010 07:15:49 -0800 (PST) Received: from localhost ([95.69.174.185]) by mx.google.com with ESMTPS id b15sm592297fah.4.2010.11.14.07.15.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 14 Nov 2010 07:15:47 -0800 (PST) From: Mikolaj Golub To: Lawrence Stewart References: <201011120641.oAC6fui3098584@svn.freebsd.org> <8662w17e90.fsf@kopusha.home.net> <4CDF3A58.6080505@freebsd.org> X-Comment-To: Lawrence Stewart Date: Sun, 14 Nov 2010 17:15:44 +0200 In-Reply-To: <4CDF3A58.6080505@freebsd.org> (Lawrence Stewart's message of "Sun, 14 Nov 2010 12:24:40 +1100") Message-ID: <86pqu8q6lb.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r215166 - in head: . sys/conf sys/netinet sys/netinet/cc sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 15:15:51 -0000 On Sun, 14 Nov 2010 12:24:40 +1100 Lawrence Stewart wrote: LS> On 11/13/10 20:40, Mikolaj Golub wrote: >> >> On Fri, 12 Nov 2010 06:41:56 +0000 (UTC) Lawrence Stewart wrote: >> >> LS> Author: lstewart >> LS> Date: Fri Nov 12 06:41:55 2010 >> LS> New Revision: 215166 >> LS> URL: http://svn.freebsd.org/changeset/base/215166 >> >> LS> Log: >> LS> This commit marks the first formal contribution of the "Five New TCP Congestion >> LS> Control Algorithms for FreeBSD" FreeBSD Foundation funded project. More details >> LS> about the project are available at: http://caia.swin.edu.au/freebsd/5cc/ >> >> It looks like the code needs improvement to work with VIMAGE :-) >> >> options VIMAGE >> >> jail -i -c vnet persist path=/ >> >> panic: lock "cc_list" 0xc101c418 already initialized >> >> #0 doadump () at pcpu.h:231 >> #1 0xc04f26b9 in db_fncall (dummy1=-1064234614, dummy2=0, dummy3=-1, >> dummy4=0xca54b688 "\234¶TÊ") at /usr/src/sys/ddb/db_command.c:548 >> #2 0xc04f2aef in db_command (last_cmdp=0xc0e7957c, cmd_table=0x0, dopager=0) >> at /usr/src/sys/ddb/db_command.c:445 >> #3 0xc04f2ba4 in db_command_script (command=0xc0e7a484 "call doadump") >> at /usr/src/sys/ddb/db_command.c:516 >> #4 0xc04f6df0 in db_script_exec (scriptname=0xca54b794 "kdb.enter.panic", warnifnotfound=Variable "warnifnotfound" is not available.) >> at /usr/src/sys/ddb/db_script.c:302 >> #5 0xc04f6ed7 in db_script_kdbenter (eventname=0xc0d2410e "panic") >> at /usr/src/sys/ddb/db_script.c:324 >> #6 0xc04f4b28 in db_trap (type=3, code=0) at /usr/src/sys/ddb/db_main.c:228 >> #7 0xc0910fbe in kdb_trap (type=3, code=0, tf=0xca54b918) at /usr/src/sys/kern/subr_kdb.c:546 >> #8 0xc0c3d7c6 in trap (frame=0xca54b918) at /usr/src/sys/i386/i386/trap.c:732 >> #9 0xc0c2647c in calltrap () at /usr/src/sys/i386/i386/exception.s:168 >> #10 0xc091118a in kdb_enter (why=0xc0d2410e "panic", msg=0xc0d2410e "panic") at cpufunc.h:71 >> #11 0xc08dcd14 in panic (fmt=0xc0d27986 "lock \"%s\" %p already initialized") >> at /usr/src/sys/kern/kern_shutdown.c:574 >> #12 0xc0911bd4 in lock_init (lock=0xc147b204, class=0xc0e23a00, name=0xc0d3f215 "cc_list", >> type=0x0, flags=2228224) at /usr/src/sys/kern/subr_lock.c:81 >> #13 0xc08daf5d in rw_init_flags (rw=0xc101c418, name=0xc0d3f215 "cc_list", opts=0) >> at /usr/src/sys/kern/kern_rwlock.c:195 >> #14 0xc0a0d0c2 in cc_init () at /usr/src/sys/netinet/cc/cc.c:182 >> #15 0xc0a7a4fd in tcp_init () at /usr/src/sys/netinet/tcp_subr.c:281 >> #16 0xc0940e59 in protosw_init (pr=0x0) at /usr/src/sys/kern/uipc_domain.c:157 >> #17 0xc0940e87 in domain_init (arg=0xc0e34280) at /usr/src/sys/kern/uipc_domain.c:174 >> #18 0xc0940ee1 in vnet_domain_init (arg=0xc0e34280) at /usr/src/sys/kern/uipc_domain.c:190 >> #19 0xc09adb2e in vnet_sysinit () at /usr/src/sys/net/vnet.c:625 >> #20 0xc09ae1ef in vnet_alloc () at /usr/src/sys/net/vnet.c:254 >> #21 0xc08ba41a in kern_jail_set (td=0xc306d870, optuio=0xc2d66a80, flags=0) >> at /usr/src/sys/kern/kern_jail.c:1244 >> #22 0xc08bbd00 in jail_set (td=0xc306d870, uap=0xca54bcec) at /usr/src/sys/kern/kern_jail.c:489 >> #23 0xc091e903 in syscallenter (td=0xc306d870, sa=0xca54bce4) >> at /usr/src/sys/kern/subr_trap.c:318 >> #24 0xc0c3cebf in syscall (frame=0xca54bd28) at /usr/src/sys/i386/i386/trap.c:1095 >> #25 0xc0c26511 in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:266 >> #26 0x00000033 in ?? () >> LS> Would you mind testing the following patch? It fixes the panic for me. LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit.patch With this patch the system hangs during the boot. Ctr-Alt-Esc to break into ddb does not work. I am trying this under VirtualBox. -- Mikolaj Golub From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 15:32:00 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B15A106564A; Sun, 14 Nov 2010 15:32:00 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E4418FC15; Sun, 14 Nov 2010 15:32:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEFW0jm085943; Sun, 14 Nov 2010 15:32:00 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEFW0VK085939; Sun, 14 Nov 2010 15:32:00 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011141532.oAEFW0VK085939@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 14 Nov 2010 15:32:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215303 - in head/bin/sh: . bltin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 15:32:00 -0000 Author: jilles Date: Sun Nov 14 15:31:59 2010 New Revision: 215303 URL: http://svn.freebsd.org/changeset/base/215303 Log: sh: Add binary buffered output for use by the printf builtin. Modified: head/bin/sh/bltin/bltin.h head/bin/sh/output.c head/bin/sh/output.h Modified: head/bin/sh/bltin/bltin.h ============================================================================== --- head/bin/sh/bltin/bltin.h Sun Nov 14 15:15:22 2010 (r215302) +++ head/bin/sh/bltin/bltin.h Sun Nov 14 15:31:59 2010 (r215303) @@ -54,6 +54,7 @@ #define putchar(c) out1c(c) #define fprintf outfmt #define fputs outstr +#define fwrite(ptr, size, nmemb, file) outbin(ptr, (size) * (nmemb), file) #define fflush flushout #define INITARGS(argv) #define warnx1(a, b, c) { \ Modified: head/bin/sh/output.c ============================================================================== --- head/bin/sh/output.c Sun Nov 14 15:15:22 2010 (r215302) +++ head/bin/sh/output.c Sun Nov 14 15:31:59 2010 (r215303) @@ -122,8 +122,7 @@ out2qstr(const char *p) void outstr(const char *p, struct output *file) { - while (*p) - outc(*p++, file); + outbin(p, strlen(p), file); } /* Like outstr(), but quote for re-input into the shell. */ @@ -165,6 +164,16 @@ outqstr(const char *p, struct output *fi outc('\'', file); } +void +outbin(const void *data, size_t len, struct output *file) +{ + const char *p; + + p = data; + while (len-- > 0) + outc(*p++, file); +} + static char out_junk[16]; void @@ -285,17 +294,11 @@ static int doformat_wr(void *cookie, const char *buf, int len) { struct output *o; - int origlen; - unsigned char c; o = (struct output *)cookie; - origlen = len; - while (len-- != 0) { - c = (unsigned char)*buf++; - outc(c, o); - } + outbin(buf, len, o); - return (origlen); + return (len); } void Modified: head/bin/sh/output.h ============================================================================== --- head/bin/sh/output.h Sun Nov 14 15:15:22 2010 (r215302) +++ head/bin/sh/output.h Sun Nov 14 15:31:59 2010 (r215303) @@ -36,6 +36,7 @@ #ifndef OUTPUT_INCL #include +#include struct output { char *nextc; @@ -59,6 +60,7 @@ void out2str(const char *); void out2qstr(const char *); void outstr(const char *, struct output *); void outqstr(const char *, struct output *); +void outbin(const void *, size_t, struct output *); void emptyoutbuf(struct output *); void flushall(void); void flushout(struct output *); From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 16:10:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C2E11065670; Sun, 14 Nov 2010 16:10:15 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 590388FC0C; Sun, 14 Nov 2010 16:10:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEGAFOE086790; Sun, 14 Nov 2010 16:10:15 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEGAFK8086784; Sun, 14 Nov 2010 16:10:15 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011141610.oAEGAFK8086784@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 16:10:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215304 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 16:10:15 -0000 Author: brucec Date: Sun Nov 14 16:10:15 2010 New Revision: 215304 URL: http://svn.freebsd.org/changeset/base/215304 Log: Fix some more style(9) issues. Modified: head/sys/kern/kern_proc.c head/sys/kern/kern_tc.c head/sys/kern/subr_clock.c head/sys/kern/vfs_cache.c head/sys/kern/vfs_subr.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Sun Nov 14 15:31:59 2010 (r215303) +++ head/sys/kern/kern_proc.c Sun Nov 14 16:10:15 2010 (r215304) @@ -145,7 +145,7 @@ uma_zone_t proc_zone; int kstack_pages = KSTACK_PAGES; SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, - "Kernel stack size in pages"); + "Kernel stack size in pages"); CTASSERT(sizeof(struct kinfo_proc) == KINFO_PROC_SIZE); #ifdef COMPAT_FREEBSD32 Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Sun Nov 14 15:31:59 2010 (r215303) +++ head/sys/kern/kern_tc.c Sun Nov 14 16:10:15 2010 (r215304) @@ -770,7 +770,7 @@ pps_event(struct pps_state *pps, int eve static int tc_tick; SYSCTL_INT(_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, &tc_tick, 0, - "Approximate number of hardclock ticks in a millisecond"); + "Approximate number of hardclock ticks in a millisecond"); void tc_ticktock(int cnt) Modified: head/sys/kern/subr_clock.c ============================================================================== --- head/sys/kern/subr_clock.c Sun Nov 14 15:31:59 2010 (r215303) +++ head/sys/kern/subr_clock.c Sun Nov 14 16:10:15 2010 (r215304) @@ -61,7 +61,7 @@ int tz_dsttime; * kern. */ SYSCTL_INT(_machdep, OID_AUTO, wall_cmos_clock, - CTLFLAG_RW, &wall_cmos_clock, 0, "CMOS clock keeps wall time"); + CTLFLAG_RW, &wall_cmos_clock, 0, "CMOS clock keeps wall time"); static int sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ARGS) @@ -74,8 +74,8 @@ sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ } SYSCTL_PROC(_machdep, OID_AUTO, adjkerntz, CTLTYPE_INT|CTLFLAG_RW, - &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", - "Local offset from UTC in seconds"); + &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", + "Local offset from UTC in seconds"); /*--------------------------------------------------------------------* * Generic routines to convert between a POSIX date Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Sun Nov 14 15:31:59 2010 (r215303) +++ head/sys/kern/vfs_cache.c Sun Nov 14 16:10:15 2010 (r215304) @@ -184,43 +184,43 @@ SYSCTL_INT(_debug, OID_AUTO, vfscache, C /* Export size information to userland */ SYSCTL_INT(_debug_sizeof, OID_AUTO, namecache, CTLFLAG_RD, 0, - sizeof(struct namecache), "sizeof(struct namecache)"); + sizeof(struct namecache), "sizeof(struct namecache)"); /* * The new name cache statistics */ static SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW, 0, - "Name cache statistics"); + "Name cache statistics"); #define STATNODE(mode, name, var, descr) \ SYSCTL_ULONG(_vfs_cache, OID_AUTO, name, mode, var, 0, descr); STATNODE(CTLFLAG_RD, numneg, &numneg, "Number of negative cache entries"); STATNODE(CTLFLAG_RD, numcache, &numcache, "Number of cache entries"); static u_long numcalls; STATNODE(CTLFLAG_RD, numcalls, &numcalls, - "Number of cache lookups"); + "Number of cache lookups"); static u_long dothits; STATNODE(CTLFLAG_RD, dothits, &dothits, - "Number of '.' hits"); + "Number of '.' hits"); static u_long dotdothits; STATNODE(CTLFLAG_RD, dotdothits, &dotdothits, - "Number of '..' hits"); + "Number of '..' hits"); static u_long numchecks; STATNODE(CTLFLAG_RD, numchecks, &numchecks, - "Number of checks in lookup"); + "Number of checks in lookup"); static u_long nummiss; STATNODE(CTLFLAG_RD, nummiss, &nummiss, - "Number of cache misses"); + "Number of cache misses"); static u_long nummisszap; STATNODE(CTLFLAG_RD, nummisszap, &nummisszap, - "Number of cache misses we do not want to cache"); + "Number of cache misses we do not want to cache"); static u_long numposzaps; STATNODE(CTLFLAG_RD, numposzaps, &numposzaps, - "Number of cache hits (positive) we do not want to cache"); + "Number of cache hits (positive) we do not want to cache"); static u_long numposhits; STATNODE(CTLFLAG_RD, numposhits, &numposhits, - "Number of cache hits (positive)"); + "Number of cache hits (positive)"); static u_long numnegzaps; STATNODE(CTLFLAG_RD, numnegzaps, &numnegzaps, - "Number of cache hits (negative) we do not want to cache"); + "Number of cache hits (negative) we do not want to cache"); static u_long numneghits; STATNODE(CTLFLAG_RD, numneghits, &numneghits, - "Number of cache hits (negative)"); + "Number of cache hits (negative)"); static u_long numupgrades; STATNODE(CTLFLAG_RD, numupgrades, &numupgrades, - "Number of updates of the cache after lookup (write lock + retry)"); + "Number of updates of the cache after lookup (write lock + retry)"); SYSCTL_OPAQUE(_vfs_cache, OID_AUTO, nchstats, CTLFLAG_RD | CTLFLAG_MPSAFE, - &nchstats, sizeof(nchstats), "LU", - "VFS cache effectiveness statistics"); + &nchstats, sizeof(nchstats), "LU", + "VFS cache effectiveness statistics"); @@ -272,8 +272,8 @@ sysctl_debug_hashstat_rawnchash(SYSCTL_H return (0); } SYSCTL_PROC(_debug_hashstat, OID_AUTO, rawnchash, CTLTYPE_INT|CTLFLAG_RD| - CTLFLAG_MPSAFE, 0, 0, sysctl_debug_hashstat_rawnchash, "S,int", - "nchash chain lengths"); + CTLFLAG_MPSAFE, 0, 0, sysctl_debug_hashstat_rawnchash, "S,int", + "nchash chain lengths"); static int sysctl_debug_hashstat_nchash(SYSCTL_HANDLER_ARGS) @@ -321,8 +321,8 @@ sysctl_debug_hashstat_nchash(SYSCTL_HAND return (0); } SYSCTL_PROC(_debug_hashstat, OID_AUTO, nchash, CTLTYPE_INT|CTLFLAG_RD| - CTLFLAG_MPSAFE, 0, 0, sysctl_debug_hashstat_nchash, "I", - "nchash chain lengths"); + CTLFLAG_MPSAFE, 0, 0, sysctl_debug_hashstat_nchash, "I", + "nchash chain lengths"); #endif /* @@ -989,13 +989,13 @@ kern___getcwd(struct thread *td, u_char static int disablefullpath; SYSCTL_INT(_debug, OID_AUTO, disablefullpath, CTLFLAG_RW, &disablefullpath, 0, - "Disable the vn_fullpath function"); + "Disable the vn_fullpath function"); /* These count for kern___getcwd(), too. */ STATNODE(numfullpathcalls, "Number of fullpath search calls"); STATNODE(numfullpathfail1, "Number of fullpath search errors (ENOTDIR)"); STATNODE(numfullpathfail2, - "Number of fullpath search errors (VOP_VPTOCNP failures)"); + "Number of fullpath search errors (VOP_VPTOCNP failures)"); STATNODE(numfullpathfail4, "Number of fullpath search errors (ENOMEM)"); STATNODE(numfullpathfound, "Number of successful fullpath calls"); Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun Nov 14 15:31:59 2010 (r215303) +++ head/sys/kern/vfs_subr.c Sun Nov 14 16:10:15 2010 (r215304) @@ -122,7 +122,7 @@ static void destroy_vpollinfo(struct vpo static unsigned long numvnodes; SYSCTL_LONG(_vfs, OID_AUTO, numvnodes, CTLFLAG_RD, &numvnodes, 0, - "Number of vnodes in existence"); + "Number of vnodes in existence"); /* * Conversion tables for conversion from vnode types to inode formats @@ -152,7 +152,7 @@ SYSCTL_LONG(_vfs, OID_AUTO, wantfreevnod /* Number of vnodes in the free list. */ static u_long freevnodes; SYSCTL_LONG(_vfs, OID_AUTO, freevnodes, CTLFLAG_RD, &freevnodes, 0, - "Number of vnodes in the free list"); + "Number of vnodes in the free list"); static int vlru_allow_cache_src; SYSCTL_INT(_vfs, OID_AUTO, vlru_allow_cache_src, CTLFLAG_RW, @@ -165,7 +165,7 @@ SYSCTL_INT(_vfs, OID_AUTO, vlru_allow_ca */ static int reassignbufcalls; SYSCTL_INT(_vfs, OID_AUTO, reassignbufcalls, CTLFLAG_RW, &reassignbufcalls, 0, - "Number of calls to reassignbuf"); + "Number of calls to reassignbuf"); /* * Cache for the mount type id assigned to NFS. This is used for @@ -241,17 +241,17 @@ static int syncer_maxdelay = SYNCER_MAXD static int syncdelay = 30; /* max time to delay syncing data */ static int filedelay = 30; /* time to delay syncing files */ SYSCTL_INT(_kern, OID_AUTO, filedelay, CTLFLAG_RW, &filedelay, 0, - "Time to delay syncing files (in seconds)"); + "Time to delay syncing files (in seconds)"); static int dirdelay = 29; /* time to delay syncing directories */ SYSCTL_INT(_kern, OID_AUTO, dirdelay, CTLFLAG_RW, &dirdelay, 0, - "Time to delay syncing directories (in seconds)"); + "Time to delay syncing directories (in seconds)"); static int metadelay = 28; /* time to delay syncing metadata */ SYSCTL_INT(_kern, OID_AUTO, metadelay, CTLFLAG_RW, &metadelay, 0, - "Time to delay syncing metadata (in seconds)"); + "Time to delay syncing metadata (in seconds)"); static int rushjob; /* number of slots to run ASAP */ static int stat_rush_requests; /* number of times I/O speeded up */ SYSCTL_INT(_debug, OID_AUTO, rush_requests, CTLFLAG_RW, &stat_rush_requests, 0, - "Number of times I/O speeded up (rush requests)"); + "Number of times I/O speeded up (rush requests)"); /* * When shutting down the syncer, run it at four times normal speed. @@ -552,8 +552,8 @@ enum { TSP_SEC, TSP_HZ, TSP_USEC, TSP_NS static int timestamp_precision = TSP_SEC; SYSCTL_INT(_vfs, OID_AUTO, timestamp_precision, CTLFLAG_RW, ×tamp_precision, 0, "File timestamp precision (0: seconds, " - "1: sec + ns accurate to 1/HZ, 2: sec + ns truncated to ms, " - "3+: sec + ns (max. precision))"); + "1: sec + ns accurate to 1/HZ, 2: sec + ns truncated to ms, " + "3+: sec + ns (max. precision))"); /* * Get a current timestamp. @@ -3027,7 +3027,7 @@ vfs_sysctl(SYSCTL_HANDLER_ARGS) } static SYSCTL_NODE(_vfs, VFS_GENERIC, generic, CTLFLAG_RD | CTLFLAG_SKIP, - vfs_sysctl, "Generic filesystem"); + vfs_sysctl, "Generic filesystem"); #if 1 || defined(COMPAT_PRELITE2) @@ -3148,7 +3148,7 @@ sysctl_vnode(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_kern, KERN_VNODE, vnode, CTLTYPE_OPAQUE|CTLFLAG_RD, - 0, 0, sysctl_vnode, "S,xvnode", ""); + 0, 0, sysctl_vnode, "S,xvnode", ""); #endif /* @@ -3721,17 +3721,21 @@ extattr_check_cred(struct vnode *vp, int (vp)->v_type == VCHR || (vp)->v_type == VBAD) int vfs_badlock_ddb = 1; /* Drop into debugger on violation. */ -SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_ddb, CTLFLAG_RW, &vfs_badlock_ddb, 0, "Drop into debugger on lock violation"); +SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_ddb, CTLFLAG_RW, &vfs_badlock_ddb, 0, + "Drop into debugger on lock violation"); int vfs_badlock_mutex = 1; /* Check for interlock across VOPs. */ -SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_mutex, CTLFLAG_RW, &vfs_badlock_mutex, 0, "Check for interlock across VOPs"); +SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_mutex, CTLFLAG_RW, &vfs_badlock_mutex, + 0, "Check for interlock across VOPs"); int vfs_badlock_print = 1; /* Print lock violations. */ -SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_print, CTLFLAG_RW, &vfs_badlock_print, 0, "Print lock violations"); +SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_print, CTLFLAG_RW, &vfs_badlock_print, + 0, "Print lock violations"); #ifdef KDB int vfs_badlock_backtrace = 1; /* Print backtrace at lock violations. */ -SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_backtrace, CTLFLAG_RW, &vfs_badlock_backtrace, 0, "Print backtrace at lock violations"); +SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_backtrace, CTLFLAG_RW, + &vfs_badlock_backtrace, 0, "Print backtrace at lock violations"); #endif static void From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 16:18:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B7EF106564A; Sun, 14 Nov 2010 16:18:13 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id DE3438FC15; Sun, 14 Nov 2010 16:18:12 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id oAEGCruv095209; Sun, 14 Nov 2010 09:12:53 -0700 (MST) (envelope-from imp@bsdimp.com) Message-ID: <4CE00A85.8020000@bsdimp.com> Date: Sun, 14 Nov 2010 09:12:53 -0700 From: Warner Losh User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.9) Gecko/20100918 Thunderbird/3.1.4 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Ulrich_Sp=F6rlein?= , Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201011132238.oADMcXU1062375@svn.freebsd.org> <20101114104301.GB64243@acme.spoerlein.net> In-Reply-To: <20101114104301.GB64243@acme.spoerlein.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: Subject: Re: svn commit: r215271 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 16:18:13 -0000 On 11/14/2010 03:43, Ulrich Spörlein wrote: > On Sat, 13.11.2010 at 22:38:33 +0000, Warner Losh wrote: >> Author: imp >> Date: Sat Nov 13 22:38:33 2010 >> New Revision: 215271 >> URL: http://svn.freebsd.org/changeset/base/215271 >> >> Log: >> Add mips back to universe >> >> Modified: >> head/Makefile >> >> Modified: head/Makefile >> ============================================================================== >> --- head/Makefile Sat Nov 13 22:34:12 2010 (r215270) >> +++ head/Makefile Sat Nov 13 22:38:33 2010 (r215271) >> @@ -281,7 +281,7 @@ tinderbox: >> # existing system is. >> # >> .if make(universe) || make(universe_kernels) || make(tinderbox) >> -TARGETS?=amd64 i386 ia64 pc98 powerpc sparc64 sun4v >> +TARGETS?=amd64 i386 ia64 pc98 powerpc sparc64 sun4v mips > Can we have that sorted, please? I'm sure it was sorted before ... > > -TARGETS?=amd64 i386 ia64 pc98 powerpc sparc64 sun4v mips > +TARGETS?=amd64 i386 ia64 mips pc98 powerpc sparc64 sun4v I'll sort it when I'm 100% it works for everybody and that I don't have any uncommitted changes in my test tree. My first run suggests it works, but the test in my pristine loopback tree are still running. Warner From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 16:44:18 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 643A0106566B; Sun, 14 Nov 2010 16:44:18 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52ADC8FC23; Sun, 14 Nov 2010 16:44:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEGiIng087631; Sun, 14 Nov 2010 16:44:18 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEGiIi5087629; Sun, 14 Nov 2010 16:44:18 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011141644.oAEGiIi5087629@svn.freebsd.org> From: Michael Tuexen Date: Sun, 14 Nov 2010 16:44:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215305 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 16:44:18 -0000 Author: tuexen Date: Sun Nov 14 16:44:18 2010 New Revision: 215305 URL: http://svn.freebsd.org/changeset/base/215305 Log: Take out special code for disable CRC computations on the loopback interface for IPv6. It will be handled by the loopback interface. Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sun Nov 14 16:10:15 2010 (r215304) +++ head/sys/netinet/sctp_output.c Sun Nov 14 16:44:18 2010 (r215305) @@ -4069,15 +4069,9 @@ sctp_lowlevel_chunk_output(struct sctp_i #if defined(SCTP_WITH_NO_CSUM) SCTP_STAT_INCR(sctps_sendnocrc); #else - if (!(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) && - (stcb) && - (stcb->asoc.loopback_scope))) { - m->m_pkthdr.csum_flags = CSUM_SCTP; - m->m_pkthdr.csum_data = 0; - SCTP_STAT_INCR(sctps_sendhwcrc); - } else { - SCTP_STAT_INCR(sctps_sendnocrc); - } + m->m_pkthdr.csum_flags = CSUM_SCTP; + m->m_pkthdr.csum_data = 0; + SCTP_STAT_INCR(sctps_sendhwcrc); #endif } /* send it out. table id is taken from stcb */ From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 17:24:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C87D21065673; Sun, 14 Nov 2010 17:24:15 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C7DF8FC19; Sun, 14 Nov 2010 17:24:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEHOFbp088455; Sun, 14 Nov 2010 17:24:15 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEHOFY8088453; Sun, 14 Nov 2010 17:24:15 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011141724.oAEHOFY8088453@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 17:24:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215306 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 17:24:15 -0000 Author: brucec Date: Sun Nov 14 17:24:15 2010 New Revision: 215306 URL: http://svn.freebsd.org/changeset/base/215306 Log: libatm_p.a, libkeycap_p.a and libmytinfo_p.a are already in ObsoleteFiles.inc. liblwres.so.10 has been replaced by liblwres.so.50. Reported by: arundel Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 14 16:44:18 2010 (r215305) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 14 17:24:15 2010 (r215306) @@ -162,7 +162,7 @@ OLD_FILES+=usr/include/lwres/platform.h OLD_DIRS+=usr/include/lwres OLD_FILES+=usr/lib/liblwres.a OLD_FILES+=usr/lib/liblwres_p.a -OLD_LIBS+=usr/lib/liblwres.so.10 +OLD_LIBS+=usr/lib/liblwres.so.50 OLD_FILES+=usr/lib/liblwres.so OLD_FILES+=usr/sbin/named OLD_FILES+=usr/sbin/lwresd @@ -288,7 +288,7 @@ OLD_FILES+=usr/share/man/man3/lwres_getn OLD_FILES+=usr/share/man/man3/lwres_string_parse.3.gz OLD_FILES+=usr/share/man/man5/named.conf.5.gz OLD_FILES+=usr/share/man/man5/rndc.conf.5.gz -OLD_FILES+=usr/share/man/man8/nsupdate.8.gz +OLD_FILES+=usr/share/man/man1/nsupdate.1.gz OLD_FILES+=usr/share/man/man8/dnssec-keygen.8.gz OLD_FILES+=usr/share/man/man8/dnssec-signzone.8.gz OLD_FILES+=usr/share/man/man8/named.8.gz @@ -1839,7 +1839,6 @@ OLD_FILES+=usr/lib/libalias_skinny_p.a OLD_FILES+=usr/lib/libalias_smedia_p.a OLD_FILES+=usr/lib/libarchive_p.a OLD_FILES+=usr/lib/libasn1_p.a -OLD_FILES+=usr/lib/libatm_p.a OLD_FILES+=usr/lib/libbegemot_p.a OLD_FILES+=usr/lib/libbluetooth_p.a OLD_FILES+=usr/lib/libbsdxml_p.a @@ -1880,7 +1879,6 @@ OLD_FILES+=usr/lib/libjail_p.a OLD_FILES+=usr/lib/libkadm5clnt_p.a OLD_FILES+=usr/lib/libkadm5srv_p.a OLD_FILES+=usr/lib/libkafs5_p.a -OLD_FILES+=usr/lib/libkeycap_p.a OLD_FILES+=usr/lib/libkiconv_p.a OLD_FILES+=usr/lib/libkrb5_p.a OLD_FILES+=usr/lib/libkvm_p.a @@ -1895,7 +1893,6 @@ OLD_FILES+=usr/lib/libmenu_p.a OLD_FILES+=usr/lib/libmenuw_p.a OLD_FILES+=usr/lib/libmilter_p.a OLD_FILES+=usr/lib/libmp_p.a -OLD_FILES+=usr/lib/libmytinfo_p.a OLD_FILES+=usr/lib/libncp_p.a OLD_FILES+=usr/lib/libncurses_p.a OLD_FILES+=usr/lib/libncursesw_p.a From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 17:53:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id C43731065673; Sun, 14 Nov 2010 17:53:14 +0000 (UTC) Date: Sun, 14 Nov 2010 17:53:14 +0000 From: Alexander Best To: Bruce Cran Message-ID: <20101114175314.GA72802@freebsd.org> References: <201011141724.oAEHOFY8088453@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201011141724.oAEHOFY8088453@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215306 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 17:53:14 -0000 On Sun Nov 14 10, Bruce Cran wrote: > Author: brucec > Date: Sun Nov 14 17:24:15 2010 > New Revision: 215306 > URL: http://svn.freebsd.org/changeset/base/215306 > > Log: > libatm_p.a, libkeycap_p.a and libmytinfo_p.a are already in ObsoleteFiles.inc. > liblwres.so.10 has been replaced by liblwres.so.50. thanks. :) ...also usr/share/man/man8/nsupdate.8.gz was moved to usr/share/man/man1/nsupdate.1.gz in bind 9.4.3. that's why the entry in OptionalObsoleteFiles.inc was changed. while you're at it, could you add the following after MK_BOOT? #.if ${MK_BSNMP} == no # to be filled in #.endif i'll try to run two buildworld instances two see which files are being affected by WITHOUT_BSNMP. cheers. alex > > Reported by: arundel > > Modified: > head/tools/build/mk/OptionalObsoleteFiles.inc > > Modified: head/tools/build/mk/OptionalObsoleteFiles.inc > ============================================================================== > --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 14 16:44:18 2010 (r215305) > +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 14 17:24:15 2010 (r215306) > @@ -162,7 +162,7 @@ OLD_FILES+=usr/include/lwres/platform.h > OLD_DIRS+=usr/include/lwres > OLD_FILES+=usr/lib/liblwres.a > OLD_FILES+=usr/lib/liblwres_p.a > -OLD_LIBS+=usr/lib/liblwres.so.10 > +OLD_LIBS+=usr/lib/liblwres.so.50 > OLD_FILES+=usr/lib/liblwres.so > OLD_FILES+=usr/sbin/named > OLD_FILES+=usr/sbin/lwresd > @@ -288,7 +288,7 @@ OLD_FILES+=usr/share/man/man3/lwres_getn > OLD_FILES+=usr/share/man/man3/lwres_string_parse.3.gz > OLD_FILES+=usr/share/man/man5/named.conf.5.gz > OLD_FILES+=usr/share/man/man5/rndc.conf.5.gz > -OLD_FILES+=usr/share/man/man8/nsupdate.8.gz > +OLD_FILES+=usr/share/man/man1/nsupdate.1.gz > OLD_FILES+=usr/share/man/man8/dnssec-keygen.8.gz > OLD_FILES+=usr/share/man/man8/dnssec-signzone.8.gz > OLD_FILES+=usr/share/man/man8/named.8.gz > @@ -1839,7 +1839,6 @@ OLD_FILES+=usr/lib/libalias_skinny_p.a > OLD_FILES+=usr/lib/libalias_smedia_p.a > OLD_FILES+=usr/lib/libarchive_p.a > OLD_FILES+=usr/lib/libasn1_p.a > -OLD_FILES+=usr/lib/libatm_p.a > OLD_FILES+=usr/lib/libbegemot_p.a > OLD_FILES+=usr/lib/libbluetooth_p.a > OLD_FILES+=usr/lib/libbsdxml_p.a > @@ -1880,7 +1879,6 @@ OLD_FILES+=usr/lib/libjail_p.a > OLD_FILES+=usr/lib/libkadm5clnt_p.a > OLD_FILES+=usr/lib/libkadm5srv_p.a > OLD_FILES+=usr/lib/libkafs5_p.a > -OLD_FILES+=usr/lib/libkeycap_p.a > OLD_FILES+=usr/lib/libkiconv_p.a > OLD_FILES+=usr/lib/libkrb5_p.a > OLD_FILES+=usr/lib/libkvm_p.a > @@ -1895,7 +1893,6 @@ OLD_FILES+=usr/lib/libmenu_p.a > OLD_FILES+=usr/lib/libmenuw_p.a > OLD_FILES+=usr/lib/libmilter_p.a > OLD_FILES+=usr/lib/libmp_p.a > -OLD_FILES+=usr/lib/libmytinfo_p.a > OLD_FILES+=usr/lib/libncp_p.a > OLD_FILES+=usr/lib/libncurses_p.a > OLD_FILES+=usr/lib/libncursesw_p.a -- a13x From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 17:53:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A77D21065673; Sun, 14 Nov 2010 17:53:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7BE308FC18; Sun, 14 Nov 2010 17:53:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEHrqTm089024; Sun, 14 Nov 2010 17:53:52 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEHrqYr089022; Sun, 14 Nov 2010 17:53:52 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201011141753.oAEHrqYr089022@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 14 Nov 2010 17:53:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215307 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 17:53:52 -0000 Author: kib Date: Sun Nov 14 17:53:52 2010 New Revision: 215307 URL: http://svn.freebsd.org/changeset/base/215307 Log: Implement a (soft) stack guard page for auto-growing stack mappings. The unmapped page separates the tip of the stack and possible adjanced segment, making some uses of stack overflow harder. The stack growing code refuses to expand the segment to the last page of the reseved region when sysctl security.bsd.stack_guard_page is set to 1. The default value for sysctl and accompanying tunable is 0. Please note that mmap(MAP_FIXED) still can place a mapping right up to the stack, making continuous region. Reviewed by: alc MFC after: 1 week Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sun Nov 14 17:24:15 2010 (r215306) +++ head/sys/vm/vm_map.c Sun Nov 14 17:53:52 2010 (r215307) @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -76,6 +77,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -3216,6 +3218,12 @@ vm_map_stack(vm_map_t map, vm_offset_t a return (rv); } +static int stack_guard_page = 0; +TUNABLE_INT("security.bsd.stack_guard_page", &stack_guard_page); +SYSCTL_INT(_security_bsd, OID_AUTO, stack_guard_page, CTLFLAG_RW, + &stack_guard_page, 0, + "Insert stack guard page ahead of the growable segments."); + /* Attempts to grow a vm stack entry. Returns KERN_SUCCESS if the * desired address is already mapped, or if we successfully grow * the stack. Also returns KERN_SUCCESS if addr is outside the @@ -3312,7 +3320,7 @@ Retry: * This also effectively destroys any guard page the user might have * intended by limiting the stack size. */ - if (grow_amount > max_grow) { + if (grow_amount + (stack_guard_page ? PAGE_SIZE : 0) > max_grow) { if (vm_map_lock_upgrade(map)) goto Retry; @@ -3365,6 +3373,8 @@ Retry: if (addr < end) { stack_entry->avail_ssize = max_grow; addr = end; + if (stack_guard_page) + addr += PAGE_SIZE; } rv = vm_map_insert(map, NULL, 0, addr, stack_entry->start, @@ -3397,6 +3407,8 @@ Retry: if (addr > end) { stack_entry->avail_ssize = end - stack_entry->end; addr = end; + if (stack_guard_page) + addr -= PAGE_SIZE; } grow_amount = addr - stack_entry->end; From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 18:05:03 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 602211065694; Sun, 14 Nov 2010 18:05:03 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B36C8FC15; Sun, 14 Nov 2010 18:05:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEI53de089333; Sun, 14 Nov 2010 18:05:03 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEI53c3089331; Sun, 14 Nov 2010 18:05:03 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201011141805.oAEI53c3089331@svn.freebsd.org> From: Ed Maste Date: Sun, 14 Nov 2010 18:05:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215308 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 18:05:03 -0000 Author: emaste Date: Sun Nov 14 18:05:03 2010 New Revision: 215308 URL: http://svn.freebsd.org/changeset/base/215308 Log: Update comment to reflect the removal of libc_r from the tree. Submitted by: Alexander Best arundel@ Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Nov 14 17:53:52 2010 (r215307) +++ head/ObsoleteFiles.inc Sun Nov 14 18:05:03 2010 (r215308) @@ -5086,7 +5086,7 @@ OLD_LIBS+=usr/lib/libthr.so.2 .endif # 20060127: revert libdisk to static-only OLD_LIBS+=usr/lib/libdisk.so.3 -# 20051027: libc_r discontinued +# 20051027: libc_r discontinued (removed 20101113) OLD_LIBS+=usr/lib/libc_r.a OLD_LIBS+=usr/lib/libc_r.so OLD_LIBS+=usr/lib/libc_r.so.7 From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 18:24:12 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E94E9106564A; Sun, 14 Nov 2010 18:24:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD1718FC17; Sun, 14 Nov 2010 18:24:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEIOCfw089925; Sun, 14 Nov 2010 18:24:12 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEIOCtN089920; Sun, 14 Nov 2010 18:24:12 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201011141824.oAEIOCtN089920@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 14 Nov 2010 18:24:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215309 - in head/sys: amd64/amd64 i386/i386 sys vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 18:24:13 -0000 Author: kib Date: Sun Nov 14 18:24:12 2010 New Revision: 215309 URL: http://svn.freebsd.org/changeset/base/215309 Log: Use symbolic names instead of hardcoding values for magic p_osrel constants. MFC after: 1 week Modified: head/sys/amd64/amd64/trap.c head/sys/i386/i386/trap.c head/sys/sys/param.h head/sys/vm/vm_mmap.c Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Sun Nov 14 18:05:03 2010 (r215308) +++ head/sys/amd64/amd64/trap.c Sun Nov 14 18:24:12 2010 (r215309) @@ -415,9 +415,9 @@ trap(struct trapframe *frame) * This check also covers the images * without the ABI-tag ELF note. */ - if (SV_CURPROC_ABI() == - SV_ABI_FREEBSD && - p->p_osrel >= 700004) { + if (SV_CURPROC_ABI() == SV_ABI_FREEBSD + && p->p_osrel >= + __FreeBSD_version_SIGSEGV) { i = SIGSEGV; ucode = SEGV_ACCERR; } else { Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Sun Nov 14 18:05:03 2010 (r215308) +++ head/sys/i386/i386/trap.c Sun Nov 14 18:24:12 2010 (r215309) @@ -461,9 +461,9 @@ trap(struct trapframe *frame) * This check also covers the images * without the ABI-tag ELF note. */ - if (SV_CURPROC_ABI() == - SV_ABI_FREEBSD && - p->p_osrel >= 700004) { + if (SV_CURPROC_ABI() == SV_ABI_FREEBSD + && p->p_osrel >= + __FreeBSD_version_SIGSEGV) { i = SIGSEGV; ucode = SEGV_ACCERR; } else { Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sun Nov 14 18:05:03 2010 (r215308) +++ head/sys/sys/param.h Sun Nov 14 18:24:12 2010 (r215309) @@ -60,6 +60,11 @@ #undef __FreeBSD_version #define __FreeBSD_version 900025 /* Master, propagated to newvers */ +#ifdef _KERNEL +#define __FreeBSD_version_SIGSEGV 700004 +#define __FreeBSD_version_MAP_ANON 800104 +#endif + #ifndef LOCORE #include #endif Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Sun Nov 14 18:05:03 2010 (r215308) +++ head/sys/vm/vm_mmap.c Sun Nov 14 18:24:12 2010 (r215309) @@ -232,7 +232,7 @@ mmap(td, uap) /* Make sure mapping fits into numeric range, etc. */ if ((uap->len == 0 && !SV_CURPROC_FLAG(SV_AOUT) && - curproc->p_osrel >= 800104) || + curproc->p_osrel >= __FreeBSD_version_MAP_ANON) || ((flags & MAP_ANON) && (uap->fd != -1 || pos != 0))) return (EINVAL); From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 18:42:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E7EC1065670; Sun, 14 Nov 2010 18:42:39 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5DAA38FC0C; Sun, 14 Nov 2010 18:42:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEIgdXd090363; Sun, 14 Nov 2010 18:42:39 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEIgdqL090361; Sun, 14 Nov 2010 18:42:39 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201011141842.oAEIgdqL090361@svn.freebsd.org> From: Ed Schouten Date: Sun, 14 Nov 2010 18:42:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215310 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 18:42:39 -0000 Author: ed Date: Sun Nov 14 18:42:39 2010 New Revision: 215310 URL: http://svn.freebsd.org/changeset/base/215310 Log: Always set errno to a sane value when pututxline(3) fails. For example, it will now return ESRCH when trying to replace a nonexistent entry with DEAD_PROCESS. Modified: head/lib/libc/gen/pututxline.c Modified: head/lib/libc/gen/pututxline.c ============================================================================== --- head/lib/libc/gen/pututxline.c Sun Nov 14 18:24:12 2010 (r215309) +++ head/lib/libc/gen/pututxline.c Sun Nov 14 18:42:39 2010 (r215310) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -53,6 +54,7 @@ futx_open(const char *file) /* Safety check: never use broken files. */ if (_fstat(fd, &sb) != -1 && sb.st_size % sizeof(struct futx) != 0) { _close(fd); + errno = EINVAL; return (NULL); } @@ -142,6 +144,7 @@ utx_active_remove(struct futx *fu) } fclose(fp); + errno = ESRCH; return (1); } From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 19:05:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 219B11065673; Sun, 14 Nov 2010 19:05:28 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (muon.cran.org.uk [IPv6:2a01:348:0:15:5d59:5c40:0:1]) by mx1.freebsd.org (Postfix) with ESMTP id AF3B48FC1A; Sun, 14 Nov 2010 19:05:27 +0000 (UTC) Received: from muon.cran.org.uk (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id 03ABBE6095; Sun, 14 Nov 2010 19:05:27 +0000 (GMT) Received: from core.nessbank (client-86-27-19-226.glfd.adsl.virginmedia.com [86.27.19.226]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA; Sun, 14 Nov 2010 19:05:26 +0000 (GMT) From: Bruce Cran To: Alexander Best Date: Sun, 14 Nov 2010 19:05:25 +0000 User-Agent: KMail/1.13.5 (FreeBSD/9.0-CURRENT; KDE/4.5.2; amd64; ; ) References: <201011141724.oAEHOFY8088453@svn.freebsd.org> <20101114175314.GA72802@freebsd.org> In-Reply-To: <20101114175314.GA72802@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201011141905.25634.bruce@cran.org.uk> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Cran Subject: Re: svn commit: r215306 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 19:05:28 -0000 On Sunday 14 November 2010 17:53:14 Alexander Best wrote: > while you're at it, could you add the following after MK_BOOT? > > #.if ${MK_BSNMP} == no > # to be filled in > #.endif > > i'll try to run two buildworld instances two see which files are being > affected by WITHOUT_BSNMP. It might make more sense to just leave it until we know which files to remove. -- Bruce Cran From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 19:28:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 3CA5F1065679; Sun, 14 Nov 2010 19:28:21 +0000 (UTC) Date: Sun, 14 Nov 2010 19:28:21 +0000 From: Alexander Best To: Bruce Cran Message-ID: <20101114192821.GA83707@freebsd.org> References: <201011141724.oAEHOFY8088453@svn.freebsd.org> <20101114175314.GA72802@freebsd.org> <201011141905.25634.bruce@cran.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201011141905.25634.bruce@cran.org.uk> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Cran Subject: Re: svn commit: r215306 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 19:28:21 -0000 On Sun Nov 14 10, Bruce Cran wrote: > On Sunday 14 November 2010 17:53:14 Alexander Best wrote: > > > while you're at it, could you add the following after MK_BOOT? > > > > #.if ${MK_BSNMP} == no > > # to be filled in > > #.endif > > > > i'll try to run two buildworld instances two see which files are being > > affected by WITHOUT_BSNMP. > > It might make more sense to just leave it until we know which files to remove. you're right. a lot of options need imporovement actually. i'll get back to you on that one. ;) however the following should take care of *_GPIO: .if ${MK_GPIO} == no OLD_FILES+=usr/sbin/gpioctl OLD_FILES+=usr/share/man/man8/gpioctl.8.gz .endif along with src.conf needing regeneration. cheers. alex > > -- > Bruce Cran -- a13x From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 19:37:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F5031065670; Sun, 14 Nov 2010 19:37:08 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E2F98FC19; Sun, 14 Nov 2010 19:37:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEJb7FM091590; Sun, 14 Nov 2010 19:37:07 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEJb7jg091588; Sun, 14 Nov 2010 19:37:07 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011141937.oAEJb7jg091588@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 19:37:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215312 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 19:37:08 -0000 Author: brucec Date: Sun Nov 14 19:37:07 2010 New Revision: 215312 URL: http://svn.freebsd.org/changeset/base/215312 Log: lib32 is installed on powerpc64 too. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 14 19:36:55 2010 (r215311) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 14 19:37:07 2010 (r215312) @@ -101,7 +101,7 @@ OLD_LIBS+=usr/lib/libngatm.so.4 OLD_FILES+=usr/lib/libngatm_p.a OLD_FILES+=usr/lib/snmp_atm.so OLD_LIBS+=usr/lib/snmp_atm.so.6 -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_FILES+=usr/lib32/libngatm.a OLD_FILES+=usr/lib32/libngatm.so OLD_LIBS+=usr/lib32/libngatm.so.4 @@ -368,7 +368,7 @@ OLD_FILES+=usr/lib/libsdp.a OLD_FILES+=usr/lib/libsdp.so OLD_LIBS+=usr/lib/libsdp.so.4 OLD_FILES+=usr/lib/libsdp_p.a -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_FILES+=usr/lib32/libbluetooth.a OLD_FILES+=usr/lib32/libbluetooth.so OLD_LIBS+=usr/lib32/libbluetooth.so.4 @@ -561,7 +561,7 @@ OLD_FILES+=usr/lib/libumem_p.a OLD_FILES+=usr/lib/libuutil.a OLD_FILES+=usr/lib/libuutil.so OLD_FILES+=usr/lib/libuutil_p.a -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_FILES+=usr/lib32/dtrace/drti.o OLD_FILES+=usr/lib32/libavl.a OLD_FILES+=usr/lib32/libavl.so @@ -612,7 +612,7 @@ OLD_FILES+=usr/lib/libzfs.so OLD_FILES+=usr/lib/libzfs_p.a OLD_FILES+=usr/lib/libzpool.a OLD_FILES+=usr/lib/libzpool.so -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_FILES+=usr/lib32/libzfs.a OLD_FILES+=usr/lib32/libzfs.so OLD_LIBS+=usr/lib32/libzfs.so.2 @@ -800,7 +800,7 @@ OLD_FILES+=usr/lib/libgpib.a OLD_FILES+=usr/lib/libgpib.so OLD_LIBS+=usr/lib/libgpib.so.3 OLD_FILES+=usr/lib/libgpib_p.a -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_FILES+=usr/lib32/libgpib.a OLD_FILES+=usr/lib32/libgpib.so OLD_LIBS+=usr/lib32/libgpib.so.3 @@ -816,7 +816,7 @@ OLD_FILES+=usr/lib/libgssapi_p.a OLD_FILES+=usr/lib/librpcsec_gss.a OLD_FILES+=usr/lib/librpcsec_gss.so OLD_LIBS+=usr/lib/librpcsec_gss.so.1 -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_FILES+=usr/lib32/libgssapi.a OLD_FILES+=usr/lib32/libgssapi.so OLD_LIBS+=usr/lib32/libgssapi.so.10 @@ -1039,7 +1039,7 @@ OLD_LIBS+=lib/libipx.so.5 OLD_FILES+=usr/lib/libipx.a OLD_FILES+=usr/lib/libipx.so OLD_FILES+=usr/lib/libipx_p.a -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_FILES+=usr/lib32/libipx.a OLD_FILES+=usr/lib32/libipx.so OLD_LIBS+=usr/lib32/libipx.so.5 @@ -1164,7 +1164,7 @@ OLD_FILES+=usr/lib/pam_krb5.so OLD_LIBS+=usr/lib/pam_krb5.so.5 OLD_FILES+=usr/lib/pam_ksu.so OLD_LIBS+=usr/lib/pam_ksu.so.5 -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_FILES+=usr/lib32/libasn1.a OLD_FILES+=usr/lib32/libasn1.so OLD_LIBS+=usr/lib32/libasn1.so.10 @@ -1626,7 +1626,7 @@ OLD_FILES+=usr/lib/libncp.a OLD_FILES+=usr/lib/libncp.so OLD_LIBS+=usr/lib/libncp.so.4 OLD_FILES+=usr/lib/libncp_p.a -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_FILES+=usr/lib32/libncp.a OLD_FILES+=usr/lib32/libncp.so OLD_LIBS+=usr/lib32/libncp.so.4 @@ -2010,7 +2010,7 @@ OLD_FILES+=usr/include/libmilter/mfdef.h OLD_FILES+=usr/lib/libmilter.a OLD_LIBS+=usr/lib/libmilter.so.5 OLD_FILES+=usr/lib/libmilter_p.a -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" OLD_FILES+=usr/lib32/libmilter.a OLD_LIBS+=usr/lib32/libmilter.so.5 OLD_FILES+=usr/lib32/libmilter_p.a From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 19:57:56 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85E761065673; Sun, 14 Nov 2010 19:57:56 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 753A58FC13; Sun, 14 Nov 2010 19:57:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEJvuYG092094; Sun, 14 Nov 2010 19:57:56 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEJvu78092092; Sun, 14 Nov 2010 19:57:56 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201011141957.oAEJvu78092092@svn.freebsd.org> From: Bruce Cran Date: Sun, 14 Nov 2010 19:57:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215314 - head/usr.sbin/sysinstall X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 19:57:56 -0000 Author: brucec Date: Sun Nov 14 19:57:56 2010 New Revision: 215314 URL: http://svn.freebsd.org/changeset/base/215314 Log: ipv6_enable has been obsoleted in favour of ipv6_activate_all_interfaces. Modified: head/usr.sbin/sysinstall/sysinstall.h Modified: head/usr.sbin/sysinstall/sysinstall.h ============================================================================== --- head/usr.sbin/sysinstall/sysinstall.h Sun Nov 14 19:40:22 2010 (r215313) +++ head/usr.sbin/sysinstall/sysinstall.h Sun Nov 14 19:57:56 2010 (r215314) @@ -130,7 +130,7 @@ #define VAR_INSTALL_CFG "installConfig" #define VAR_INSTALL_ROOT "installRoot" #define VAR_IPADDR "ipaddr" -#define VAR_IPV6_ENABLE "ipv6_enable" +#define VAR_IPV6_ENABLE "ipv6_activate_all_interfaces" #define VAR_IPV6ADDR "ipv6addr" #define VAR_KERN_SECURELEVEL "kern_securelevel" #define VAR_KEYMAP "keymap" From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 20:14:25 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0C571065695; Sun, 14 Nov 2010 20:14:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B57628FC16; Sun, 14 Nov 2010 20:14:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEKEPfS092490; Sun, 14 Nov 2010 20:14:25 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEKEP7f092485; Sun, 14 Nov 2010 20:14:25 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201011142014.oAEKEP7f092485@svn.freebsd.org> From: Dimitry Andric Date: Sun, 14 Nov 2010 20:14:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215315 - in head: lib/libkvm sys/kern sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 20:14:25 -0000 Author: dim Date: Sun Nov 14 20:14:25 2010 New Revision: 215315 URL: http://svn.freebsd.org/changeset/base/215315 Log: Similar to sys/net/vnet.h, define the linker set name for sys/sys/pcpu.h as a macro, and use it instead of literal strings. Modified: head/lib/libkvm/kvm.c head/lib/libkvm/kvm_pcpu.c head/sys/kern/link_elf_obj.c head/sys/sys/pcpu.h Modified: head/lib/libkvm/kvm.c ============================================================================== --- head/lib/libkvm/kvm.c Sun Nov 14 19:57:56 2010 (r215314) +++ head/lib/libkvm/kvm.c Sun Nov 14 20:14:25 2010 (r215315) @@ -50,6 +50,7 @@ static char sccsid[] = "@(#)kvm.c 8.2 (B #include #include #include +#include #include @@ -433,7 +434,7 @@ _kvm_nlist(kvm_t *kd, struct nlist *nl, if (error > 0 && _kvm_dpcpu_initialized(kd, initialize)) error = kvm_fdnlist_prefix(kd, nl, error, - "pcpu_entry_", _kvm_dpcpu_validaddr); + DPCPU_SYMPREFIX, _kvm_dpcpu_validaddr); return (error); } @@ -473,7 +474,7 @@ again: p->n_value = _kvm_vnet_validaddr(kd, lookup.symvalue); else if (_kvm_dpcpu_initialized(kd, initialize) && - !strcmp(prefix, "pcpu_entry_")) + !strcmp(prefix, DPCPU_SYMPREFIX)) p->n_value = _kvm_dpcpu_validaddr(kd, lookup.symvalue); else @@ -495,7 +496,7 @@ again: } if (error && _kvm_dpcpu_initialized(kd, initialize) && !tried_dpcpu) { tried_dpcpu = 1; - prefix = "pcpu_entry_"; + prefix = DPCPU_SYMPREFIX; goto again; } Modified: head/lib/libkvm/kvm_pcpu.c ============================================================================== --- head/lib/libkvm/kvm_pcpu.c Sun Nov 14 19:57:56 2010 (r215314) +++ head/lib/libkvm/kvm_pcpu.c Sun Nov 14 20:14:25 2010 (r215315) @@ -197,9 +197,9 @@ _kvm_dpcpu_init(kvm_t *kd) { struct nlist nl[] = { #define NLIST_START_SET_PCPU 0 - { "___start_set_pcpu" }, + { "___start_" DPCPU_SETNAME }, #define NLIST_STOP_SET_PCPU 1 - { "___stop_set_pcpu" }, + { "___stop_" DPCPU_SETNAME }, #define NLIST_DPCPU_OFF 2 { "_dpcpu_off" }, #define NLIST_MP_MAXCPUS 3 Modified: head/sys/kern/link_elf_obj.c ============================================================================== --- head/sys/kern/link_elf_obj.c Sun Nov 14 19:57:56 2010 (r215314) +++ head/sys/kern/link_elf_obj.c Sun Nov 14 20:14:25 2010 (r215315) @@ -336,7 +336,7 @@ link_elf_link_preload(linker_class_t cls ef->progtab[pb].name = ef->shstrtab + shdr[i].sh_name; if (ef->progtab[pb].name != NULL && - !strcmp(ef->progtab[pb].name, "set_pcpu")) { + !strcmp(ef->progtab[pb].name, DPCPU_SETNAME)) { void *dpcpu; dpcpu = dpcpu_alloc(shdr[i].sh_size); @@ -757,7 +757,7 @@ link_elf_load_file(linker_class_t cls, c else ef->progtab[pb].name = "<>"; if (ef->progtab[pb].name != NULL && - !strcmp(ef->progtab[pb].name, "set_pcpu")) + !strcmp(ef->progtab[pb].name, DPCPU_SETNAME)) ef->progtab[pb].addr = dpcpu_alloc(shdr[i].sh_size); #ifdef VIMAGE @@ -789,7 +789,7 @@ link_elf_load_file(linker_class_t cls, c } /* Initialize the per-cpu or vnet area. */ if (ef->progtab[pb].addr != (void *)mapbase && - !strcmp(ef->progtab[pb].name, "set_pcpu")) + !strcmp(ef->progtab[pb].name, DPCPU_SETNAME)) dpcpu_copy(ef->progtab[pb].addr, shdr[i].sh_size); #ifdef VIMAGE @@ -911,7 +911,7 @@ link_elf_unload_file(linker_file_t file) continue; if (ef->progtab[i].name == NULL) continue; - if (!strcmp(ef->progtab[i].name, "set_pcpu")) + if (!strcmp(ef->progtab[i].name, DPCPU_SETNAME)) dpcpu_free(ef->progtab[i].addr, ef->progtab[i].size); #ifdef VIMAGE Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Sun Nov 14 19:57:56 2010 (r215314) +++ head/sys/sys/pcpu.h Sun Nov 14 20:14:25 2010 (r215315) @@ -42,6 +42,9 @@ #include #include +#define DPCPU_SETNAME "set_pcpu" +#define DPCPU_SYMPREFIX "pcpu_entry_" + #ifdef _KERNEL /* @@ -72,7 +75,7 @@ extern uintptr_t dpcpu_off[]; */ #define DPCPU_NAME(n) pcpu_entry_##n #define DPCPU_DECLARE(t, n) extern t DPCPU_NAME(n) -#define DPCPU_DEFINE(t, n) t DPCPU_NAME(n) __section("set_pcpu") __used +#define DPCPU_DEFINE(t, n) t DPCPU_NAME(n) __section(DPCPU_SETNAME) __used /* * Accessors with a given base. From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 20:23:02 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B13AF10656B8; Sun, 14 Nov 2010 20:23:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 807B08FC13; Sun, 14 Nov 2010 20:23:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEKN28r092724; Sun, 14 Nov 2010 20:23:02 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEKN2qB092721; Sun, 14 Nov 2010 20:23:02 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201011142023.oAEKN2qB092721@svn.freebsd.org> From: Dimitry Andric Date: Sun, 14 Nov 2010 20:23:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215316 - in head/sys: net sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 20:23:02 -0000 Author: dim Date: Sun Nov 14 20:23:02 2010 New Revision: 215316 URL: http://svn.freebsd.org/changeset/base/215316 Log: Add macros to define static instances of VNET_DEFINE and DPCPU_DEFINE. Modified: head/sys/net/vnet.h head/sys/sys/pcpu.h Modified: head/sys/net/vnet.h ============================================================================== --- head/sys/net/vnet.h Sun Nov 14 20:14:25 2010 (r215315) +++ head/sys/net/vnet.h Sun Nov 14 20:23:02 2010 (r215316) @@ -196,8 +196,10 @@ extern struct sx vnet_sxlock; #define VNET_NAME(n) vnet_entry_##n #define VNET_DECLARE(t, n) extern t VNET_NAME(n) #define VNET_DEFINE(t, n) t VNET_NAME(n) __section(VNET_SETNAME) __used -#define _VNET_PTR(b, n) (__typeof(VNET_NAME(n))*) \ - ((b) + (uintptr_t)&VNET_NAME(n)) +#define STATIC_VNET_DEFINE(t, n) \ + VNET_DEFINE(static t, n) +#define _VNET_PTR(b, n) \ + (__typeof(VNET_NAME(n))*)((b) + (uintptr_t)&VNET_NAME(n)) #define _VNET(b, n) (*_VNET_PTR(b, n)) @@ -371,10 +373,11 @@ do { \ * Versions of the VNET macros that compile to normal global variables and * standard sysctl definitions. */ -#define VNET_NAME(n) n -#define VNET_DECLARE(t, n) extern t n -#define VNET_DEFINE(t, n) t n -#define _VNET_PTR(b, n) &VNET_NAME(n) +#define VNET_NAME(n) n +#define VNET_DECLARE(t, n) extern t n +#define VNET_DEFINE(t, n) t n +#define STATIC_VNET_DEFINE(t, n) static t n +#define _VNET_PTR(b, n) &VNET_NAME(n) /* * Virtualized global variable accessor macros. Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Sun Nov 14 20:14:25 2010 (r215315) +++ head/sys/sys/pcpu.h Sun Nov 14 20:23:02 2010 (r215316) @@ -76,6 +76,8 @@ extern uintptr_t dpcpu_off[]; #define DPCPU_NAME(n) pcpu_entry_##n #define DPCPU_DECLARE(t, n) extern t DPCPU_NAME(n) #define DPCPU_DEFINE(t, n) t DPCPU_NAME(n) __section(DPCPU_SETNAME) __used +#define STATIC_DPCPU_DEFINE(t, n) \ + DPCPU_DEFINE(static t, n) /* * Accessors with a given base. From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 20:38:12 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52987106564A; Sun, 14 Nov 2010 20:38:12 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3EC2B8FC13; Sun, 14 Nov 2010 20:38:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEKcCX3093173; Sun, 14 Nov 2010 20:38:12 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEKcB9M093130; Sun, 14 Nov 2010 20:38:11 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201011142038.oAEKcB9M093130@svn.freebsd.org> From: Dimitry Andric Date: Sun, 14 Nov 2010 20:38:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215317 - in head/sys: kern mips/mips mips/rmi net netgraph netinet netinet/ipfw netinet6 netipsec powerpc/aim powerpc/booke X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 20:38:12 -0000 Author: dim Date: Sun Nov 14 20:38:11 2010 New Revision: 215317 URL: http://svn.freebsd.org/changeset/base/215317 Log: Apply the STATIC_VNET_DEFINE and STATIC_DPCPU_DEFINE macros throughout the tree. Modified: head/sys/kern/kern_clock.c head/sys/kern/kern_clocksource.c head/sys/kern/sched_4bsd.c head/sys/kern/subr_pcpu.c head/sys/mips/mips/tick.c head/sys/mips/rmi/tick.c head/sys/net/flowtable.c head/sys/net/if.c head/sys/net/if_clone.c head/sys/net/if_ethersubr.c head/sys/net/if_gif.c head/sys/net/if_llatbl.c head/sys/net/if_loop.c head/sys/net/route.c head/sys/net/vnet.c head/sys/netgraph/ng_base.c head/sys/netgraph/ng_eiface.c head/sys/netgraph/ng_iface.c head/sys/netinet/if_ether.c head/sys/netinet/igmp.c head/sys/netinet/in.c head/sys/netinet/in_pcb.c head/sys/netinet/in_rmx.c head/sys/netinet/ip_divert.c head/sys/netinet/ip_fastfwd.c head/sys/netinet/ip_icmp.c head/sys/netinet/ip_input.c head/sys/netinet/ip_ipsec.c head/sys/netinet/ip_mroute.c head/sys/netinet/ipfw/ip_fw2.c head/sys/netinet/ipfw/ip_fw_dynamic.c head/sys/netinet/ipfw/ip_fw_nat.c head/sys/netinet/ipfw/ip_fw_pfil.c head/sys/netinet/siftr.c head/sys/netinet/tcp_hostcache.c head/sys/netinet/tcp_reass.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_syncache.c head/sys/netinet/tcp_timewait.c head/sys/netinet/udp_usrreq.c head/sys/netinet6/frag6.c head/sys/netinet6/icmp6.c head/sys/netinet6/in6_rmx.c head/sys/netinet6/in6_src.c head/sys/netinet6/ip6_ipsec.c head/sys/netinet6/ip6_mroute.c head/sys/netinet6/mld6.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6_nbr.c head/sys/netinet6/nd6_rtr.c head/sys/netinet6/scope6.c head/sys/netinet6/send.c head/sys/netipsec/key.c head/sys/netipsec/keysock.c head/sys/netipsec/xform_esp.c head/sys/powerpc/aim/clock.c head/sys/powerpc/booke/clock.c Modified: head/sys/kern/kern_clock.c ============================================================================== --- head/sys/kern/kern_clock.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/kern/kern_clock.c Sun Nov 14 20:38:11 2010 (r215317) @@ -373,7 +373,7 @@ int profprocs; int ticks; int psratio; -static DPCPU_DEFINE(int, pcputicks); /* Per-CPU version of ticks. */ +STATIC_DPCPU_DEFINE(int, pcputicks); /* Per-CPU version of ticks. */ static int global_hardclock_run = 0; /* Modified: head/sys/kern/kern_clocksource.c ============================================================================== --- head/sys/kern/kern_clocksource.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/kern/kern_clocksource.c Sun Nov 14 20:38:11 2010 (r215317) @@ -135,7 +135,7 @@ struct pcpu_state { int idle; /* This CPU is in idle mode. */ }; -static DPCPU_DEFINE(struct pcpu_state, timerstate); +STATIC_DPCPU_DEFINE(struct pcpu_state, timerstate); #define FREQ2BT(freq, bt) \ { \ Modified: head/sys/kern/sched_4bsd.c ============================================================================== --- head/sys/kern/sched_4bsd.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/kern/sched_4bsd.c Sun Nov 14 20:38:11 2010 (r215317) @@ -161,7 +161,7 @@ struct pcpuidlestat { u_int idlecalls; u_int oldidlecalls; }; -static DPCPU_DEFINE(struct pcpuidlestat, idlestat); +STATIC_DPCPU_DEFINE(struct pcpuidlestat, idlestat); static void setup_runqs(void) Modified: head/sys/kern/subr_pcpu.c ============================================================================== --- head/sys/kern/subr_pcpu.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/kern/subr_pcpu.c Sun Nov 14 20:38:11 2010 (r215317) @@ -70,7 +70,7 @@ struct dpcpu_free { TAILQ_ENTRY(dpcpu_free) df_link; }; -static DPCPU_DEFINE(char, modspace[DPCPU_MODMIN]); +STATIC_DPCPU_DEFINE(char, modspace[DPCPU_MODMIN]); static TAILQ_HEAD(, dpcpu_free) dpcpu_head = TAILQ_HEAD_INITIALIZER(dpcpu_head); static struct sx dpcpu_lock; uintptr_t dpcpu_off[MAXCPU]; Modified: head/sys/mips/mips/tick.c ============================================================================== --- head/sys/mips/mips/tick.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/mips/mips/tick.c Sun Nov 14 20:38:11 2010 (r215317) @@ -57,13 +57,13 @@ uint64_t counter_freq; struct timecounter *platform_timecounter; -static DPCPU_DEFINE(uint32_t, cycles_per_tick); +STATIC_DPCPU_DEFINE(uint32_t, cycles_per_tick); static uint32_t cycles_per_usec; -static DPCPU_DEFINE(volatile uint32_t, counter_upper); -static DPCPU_DEFINE(volatile uint32_t, counter_lower_last); -static DPCPU_DEFINE(uint32_t, compare_ticks); -static DPCPU_DEFINE(uint32_t, lost_ticks); +STATIC_DPCPU_DEFINE(volatile uint32_t, counter_upper); +STATIC_DPCPU_DEFINE(volatile uint32_t, counter_lower_last); +STATIC_DPCPU_DEFINE(uint32_t, compare_ticks); +STATIC_DPCPU_DEFINE(uint32_t, lost_ticks); struct clock_softc { int intr_rid; Modified: head/sys/mips/rmi/tick.c ============================================================================== --- head/sys/mips/rmi/tick.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/mips/rmi/tick.c Sun Nov 14 20:38:11 2010 (r215317) @@ -59,13 +59,13 @@ uint64_t counter_freq; struct timecounter *platform_timecounter; -static DPCPU_DEFINE(uint32_t, cycles_per_tick); +STATIC_DPCPU_DEFINE(uint32_t, cycles_per_tick); static uint32_t cycles_per_usec; -static DPCPU_DEFINE(volatile uint32_t, counter_upper); -static DPCPU_DEFINE(volatile uint32_t, counter_lower_last); -static DPCPU_DEFINE(uint32_t, compare_ticks); -static DPCPU_DEFINE(uint32_t, lost_ticks); +STATIC_DPCPU_DEFINE(volatile uint32_t, counter_upper); +STATIC_DPCPU_DEFINE(volatile uint32_t, counter_lower_last); +STATIC_DPCPU_DEFINE(uint32_t, compare_ticks); +STATIC_DPCPU_DEFINE(uint32_t, lost_ticks); struct clock_softc { int intr_rid; Modified: head/sys/net/flowtable.c ============================================================================== --- head/sys/net/flowtable.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/net/flowtable.c Sun Nov 14 20:38:11 2010 (r215317) @@ -184,10 +184,10 @@ struct flowtable { } __aligned(CACHE_LINE_SIZE); static struct proc *flowcleanerproc; -static VNET_DEFINE(struct flowtable *, flow_list_head); -static VNET_DEFINE(uint32_t, flow_hashjitter); -static VNET_DEFINE(uma_zone_t, flow_ipv4_zone); -static VNET_DEFINE(uma_zone_t, flow_ipv6_zone); +STATIC_VNET_DEFINE(struct flowtable *, flow_list_head); +STATIC_VNET_DEFINE(uint32_t, flow_hashjitter); +STATIC_VNET_DEFINE(uma_zone_t, flow_ipv4_zone); +STATIC_VNET_DEFINE(uma_zone_t, flow_ipv6_zone); #define V_flow_list_head VNET(flow_list_head) #define V_flow_hashjitter VNET(flow_hashjitter) @@ -230,13 +230,13 @@ do { \ * - idetach() cleanup for options VIMAGE builds. */ VNET_DEFINE(int, flowtable_enable) = 1; -static VNET_DEFINE(int, flowtable_debug); -static VNET_DEFINE(int, flowtable_syn_expire) = SYN_IDLE; -static VNET_DEFINE(int, flowtable_udp_expire) = UDP_IDLE; -static VNET_DEFINE(int, flowtable_fin_wait_expire) = FIN_WAIT_IDLE; -static VNET_DEFINE(int, flowtable_tcp_expire) = TCP_IDLE; -static VNET_DEFINE(int, flowtable_nmbflows); -static VNET_DEFINE(int, flowtable_ready) = 0; +STATIC_VNET_DEFINE(int, flowtable_debug); +STATIC_VNET_DEFINE(int, flowtable_syn_expire) = SYN_IDLE; +STATIC_VNET_DEFINE(int, flowtable_udp_expire) = UDP_IDLE; +STATIC_VNET_DEFINE(int, flowtable_fin_wait_expire) = FIN_WAIT_IDLE; +STATIC_VNET_DEFINE(int, flowtable_tcp_expire) = TCP_IDLE; +STATIC_VNET_DEFINE(int, flowtable_nmbflows); +STATIC_VNET_DEFINE(int, flowtable_ready) = 0; #define V_flowtable_enable VNET(flowtable_enable) #define V_flowtable_debug VNET(flowtable_debug) Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/net/if.c Sun Nov 14 20:38:11 2010 (r215317) @@ -183,7 +183,7 @@ int ifqmaxlen = IFQ_MAXLEN; VNET_DEFINE(struct ifnethead, ifnet); /* depend on static init XXX */ VNET_DEFINE(struct ifgrouphead, ifg_head); -static VNET_DEFINE(int, if_indexlim) = 8; +STATIC_VNET_DEFINE(int, if_indexlim) = 8; /* Table of ifnet by index. */ VNET_DEFINE(struct ifindex_entry *, ifindex_table); Modified: head/sys/net/if_clone.c ============================================================================== --- head/sys/net/if_clone.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/net/if_clone.c Sun Nov 14 20:38:11 2010 (r215317) @@ -56,7 +56,7 @@ static int if_clone_createif(struct if_c caddr_t params); static struct mtx if_cloners_mtx; -static VNET_DEFINE(int, if_cloners_count); +STATIC_VNET_DEFINE(int, if_cloners_count); VNET_DEFINE(LIST_HEAD(, if_clone), if_cloners); #define V_if_cloners_count VNET(if_cloners_count) Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/net/if_ethersubr.c Sun Nov 14 20:38:11 2010 (r215317) @@ -144,7 +144,7 @@ MALLOC_DEFINE(M_ARPCOM, "arpcom", "802.* #if defined(INET) || defined(INET6) int ether_ipfw_chk(struct mbuf **m0, struct ifnet *dst, int shared); -static VNET_DEFINE(int, ether_ipfw); +STATIC_VNET_DEFINE(int, ether_ipfw); #define V_ether_ipfw VNET(ether_ipfw) #endif Modified: head/sys/net/if_gif.c ============================================================================== --- head/sys/net/if_gif.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/net/if_gif.c Sun Nov 14 20:38:11 2010 (r215317) @@ -94,7 +94,7 @@ */ static struct mtx gif_mtx; static MALLOC_DEFINE(M_GIF, "gif", "Generic Tunnel Interface"); -static VNET_DEFINE(LIST_HEAD(, gif_softc), gif_softc_list); +STATIC_VNET_DEFINE(LIST_HEAD(, gif_softc), gif_softc_list); #define V_gif_softc_list VNET(gif_softc_list) void (*ng_gif_input_p)(struct ifnet *ifp, struct mbuf **mp, int af); @@ -124,7 +124,7 @@ SYSCTL_NODE(_net_link, IFT_GIF, gif, CTL */ #define MAX_GIF_NEST 1 #endif -static VNET_DEFINE(int, max_gif_nesting) = MAX_GIF_NEST; +STATIC_VNET_DEFINE(int, max_gif_nesting) = MAX_GIF_NEST; #define V_max_gif_nesting VNET(max_gif_nesting) SYSCTL_VNET_INT(_net_link_gif, OID_AUTO, max_nesting, CTLFLAG_RW, &VNET_NAME(max_gif_nesting), 0, "Max nested tunnels"); @@ -135,9 +135,9 @@ SYSCTL_VNET_INT(_net_link_gif, OID_AUTO, * we allow control over this check here. */ #ifdef XBONEHACK -static VNET_DEFINE(int, parallel_tunnels) = 1; +STATIC_VNET_DEFINE(int, parallel_tunnels) = 1; #else -static VNET_DEFINE(int, parallel_tunnels) = 0; +STATIC_VNET_DEFINE(int, parallel_tunnels) = 0; #endif #define V_parallel_tunnels VNET(parallel_tunnels) SYSCTL_VNET_INT(_net_link_gif, OID_AUTO, parallel_tunnels, CTLFLAG_RW, Modified: head/sys/net/if_llatbl.c ============================================================================== --- head/sys/net/if_llatbl.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/net/if_llatbl.c Sun Nov 14 20:38:11 2010 (r215317) @@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$"); MALLOC_DEFINE(M_LLTABLE, "lltable", "link level address tables"); -static VNET_DEFINE(SLIST_HEAD(, lltable), lltables); +STATIC_VNET_DEFINE(SLIST_HEAD(, lltable), lltables); #define V_lltables VNET(lltables) extern void arprequest(struct ifnet *, struct in_addr *, struct in_addr *, Modified: head/sys/net/if_loop.c ============================================================================== --- head/sys/net/if_loop.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/net/if_loop.c Sun Nov 14 20:38:11 2010 (r215317) @@ -106,8 +106,8 @@ static void lo_clone_destroy(struct ifne VNET_DEFINE(struct ifnet *, loif); /* Used externally */ #ifdef VIMAGE -static VNET_DEFINE(struct ifc_simple_data, lo_cloner_data); -static VNET_DEFINE(struct if_clone, lo_cloner); +STATIC_VNET_DEFINE(struct ifc_simple_data, lo_cloner_data); +STATIC_VNET_DEFINE(struct if_clone, lo_cloner); #define V_lo_cloner_data VNET(lo_cloner_data) #define V_lo_cloner VNET(lo_cloner) #endif Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/net/route.c Sun Nov 14 20:38:11 2010 (r215317) @@ -113,7 +113,7 @@ VNET_DEFINE(int, rttrash); /* routes no */ #define RNTORT(p) ((struct rtentry *)(p)) -static VNET_DEFINE(uma_zone_t, rtzone); /* Routing table UMA zone. */ +STATIC_VNET_DEFINE(uma_zone_t, rtzone); /* Routing table UMA zone. */ #define V_rtzone VNET(rtzone) #if 0 Modified: head/sys/net/vnet.c ============================================================================== --- head/sys/net/vnet.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/net/vnet.c Sun Nov 14 20:38:11 2010 (r215317) @@ -177,7 +177,7 @@ MALLOC_DEFINE(M_VNET_DATA, "vnet_data", * Space to store virtualized global variables from loadable kernel modules, * and the free list to manage it. */ -static VNET_DEFINE(char, modspace[VNET_MODMIN]); +STATIC_VNET_DEFINE(char, modspace[VNET_MODMIN]); /* * Global lists of subsystem constructor and destructors for vnets. They are Modified: head/sys/netgraph/ng_base.c ============================================================================== --- head/sys/netgraph/ng_base.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netgraph/ng_base.c Sun Nov 14 20:38:11 2010 (r215317) @@ -171,7 +171,7 @@ static struct mtx ng_typelist_mtx; /* Hash related definitions */ /* XXX Don't need to initialise them because it's a LIST */ -static VNET_DEFINE(LIST_HEAD(, ng_node), ng_ID_hash[NG_ID_HASH_SIZE]); +STATIC_VNET_DEFINE(LIST_HEAD(, ng_node), ng_ID_hash[NG_ID_HASH_SIZE]); #define V_ng_ID_hash VNET(ng_ID_hash) static struct mtx ng_idhash_mtx; @@ -189,7 +189,7 @@ static struct mtx ng_idhash_mtx; } \ } while (0) -static VNET_DEFINE(LIST_HEAD(, ng_node), ng_name_hash[NG_NAME_HASH_SIZE]); +STATIC_VNET_DEFINE(LIST_HEAD(, ng_node), ng_name_hash[NG_NAME_HASH_SIZE]); #define V_ng_name_hash VNET(ng_name_hash) static struct mtx ng_namehash_mtx; @@ -359,7 +359,7 @@ ng_alloc_node(void) #define TRAP_ERROR() #endif -static VNET_DEFINE(ng_ID_t, nextID) = 1; +STATIC_VNET_DEFINE(ng_ID_t, nextID) = 1; #define V_nextID VNET(nextID) #ifdef INVARIANTS Modified: head/sys/netgraph/ng_eiface.c ============================================================================== --- head/sys/netgraph/ng_eiface.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netgraph/ng_eiface.c Sun Nov 14 20:38:11 2010 (r215317) @@ -114,7 +114,7 @@ static struct ng_type typestruct = { }; NETGRAPH_INIT(eiface, &typestruct); -static VNET_DEFINE(struct unrhdr *, ng_eiface_unit); +STATIC_VNET_DEFINE(struct unrhdr *, ng_eiface_unit); #define V_ng_eiface_unit VNET(ng_eiface_unit) /************************************************************************ Modified: head/sys/netgraph/ng_iface.c ============================================================================== --- head/sys/netgraph/ng_iface.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netgraph/ng_iface.c Sun Nov 14 20:38:11 2010 (r215317) @@ -210,7 +210,7 @@ static struct ng_type typestruct = { }; NETGRAPH_INIT(iface, &typestruct); -static VNET_DEFINE(struct unrhdr *, ng_iface_unit); +STATIC_VNET_DEFINE(struct unrhdr *, ng_iface_unit); #define V_ng_iface_unit VNET(ng_iface_unit) /************************************************************************ Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/if_ether.c Sun Nov 14 20:38:11 2010 (r215317) @@ -81,17 +81,17 @@ SYSCTL_NODE(_net_link_ether, PF_INET, in SYSCTL_NODE(_net_link_ether, PF_ARP, arp, CTLFLAG_RW, 0, ""); /* timer values */ -static VNET_DEFINE(int, arpt_keep) = (20*60); /* once resolved, good for 20 +STATIC_VNET_DEFINE(int, arpt_keep) = (20*60); /* once resolved, good for 20 * minutes */ -static VNET_DEFINE(int, arp_maxtries) = 5; +STATIC_VNET_DEFINE(int, arp_maxtries) = 5; VNET_DEFINE(int, useloopback) = 1; /* use loopback interface for * local traffic */ -static VNET_DEFINE(int, arp_proxyall) = 0; -static VNET_DEFINE(int, arpt_down) = 20; /* keep incomplete entries for +STATIC_VNET_DEFINE(int, arp_proxyall) = 0; +STATIC_VNET_DEFINE(int, arpt_down) = 20; /* keep incomplete entries for * 20 seconds */ VNET_DEFINE(struct arpstat, arpstat); /* ARP statistics, see if_arp.h */ -static VNET_DEFINE(int, arp_maxhold) = 1; +STATIC_VNET_DEFINE(int, arp_maxhold) = 1; #define V_arpt_keep VNET(arpt_keep) #define V_arpt_down VNET(arpt_down) Modified: head/sys/netinet/igmp.c ============================================================================== --- head/sys/netinet/igmp.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/igmp.c Sun Nov 14 20:38:11 2010 (r215317) @@ -206,11 +206,11 @@ MALLOC_DEFINE(M_IGMP, "igmp", "igmp stat * FUTURE: Stop using IFP_TO_IA/INADDR_ANY, and use source address selection * policy to control the address used by IGMP on the link. */ -static VNET_DEFINE(int, interface_timers_running); /* IGMPv3 general +STATIC_VNET_DEFINE(int, interface_timers_running); /* IGMPv3 general * query response */ -static VNET_DEFINE(int, state_change_timers_running); /* IGMPv3 state-change +STATIC_VNET_DEFINE(int, state_change_timers_running); /* IGMPv3 state-change * retransmit */ -static VNET_DEFINE(int, current_state_timers_running); /* IGMPv1/v2 host +STATIC_VNET_DEFINE(int, current_state_timers_running); /* IGMPv1/v2 host * report; IGMPv3 g/sg * query response */ @@ -218,24 +218,24 @@ static VNET_DEFINE(int, current_state_ti #define V_state_change_timers_running VNET(state_change_timers_running) #define V_current_state_timers_running VNET(current_state_timers_running) -static VNET_DEFINE(LIST_HEAD(, igmp_ifinfo), igi_head); -static VNET_DEFINE(struct igmpstat, igmpstat) = { +STATIC_VNET_DEFINE(LIST_HEAD(, igmp_ifinfo), igi_head); +STATIC_VNET_DEFINE(struct igmpstat, igmpstat) = { .igps_version = IGPS_VERSION_3, .igps_len = sizeof(struct igmpstat), }; -static VNET_DEFINE(struct timeval, igmp_gsrdelay) = {10, 0}; +STATIC_VNET_DEFINE(struct timeval, igmp_gsrdelay) = {10, 0}; #define V_igi_head VNET(igi_head) #define V_igmpstat VNET(igmpstat) #define V_igmp_gsrdelay VNET(igmp_gsrdelay) -static VNET_DEFINE(int, igmp_recvifkludge) = 1; -static VNET_DEFINE(int, igmp_sendra) = 1; -static VNET_DEFINE(int, igmp_sendlocal) = 1; -static VNET_DEFINE(int, igmp_v1enable) = 1; -static VNET_DEFINE(int, igmp_v2enable) = 1; -static VNET_DEFINE(int, igmp_legacysupp); -static VNET_DEFINE(int, igmp_default_version) = IGMP_VERSION_3; +STATIC_VNET_DEFINE(int, igmp_recvifkludge) = 1; +STATIC_VNET_DEFINE(int, igmp_sendra) = 1; +STATIC_VNET_DEFINE(int, igmp_sendlocal) = 1; +STATIC_VNET_DEFINE(int, igmp_v1enable) = 1; +STATIC_VNET_DEFINE(int, igmp_v2enable) = 1; +STATIC_VNET_DEFINE(int, igmp_legacysupp); +STATIC_VNET_DEFINE(int, igmp_default_version) = IGMP_VERSION_3; #define V_igmp_recvifkludge VNET(igmp_recvifkludge) #define V_igmp_sendra VNET(igmp_sendra) Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/in.c Sun Nov 14 20:38:11 2010 (r215317) @@ -76,12 +76,12 @@ static int in_ifinit(struct ifnet *, struct in_ifaddr *, struct sockaddr_in *, int); static void in_purgemaddrs(struct ifnet *); -static VNET_DEFINE(int, subnetsarelocal); +STATIC_VNET_DEFINE(int, subnetsarelocal); #define V_subnetsarelocal VNET(subnetsarelocal) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, subnets_are_local, CTLFLAG_RW, &VNET_NAME(subnetsarelocal), 0, "Treat all subnets as directly connected"); -static VNET_DEFINE(int, sameprefixcarponly); +STATIC_VNET_DEFINE(int, sameprefixcarponly); #define V_sameprefixcarponly VNET(sameprefixcarponly) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, same_prefix_carp_only, CTLFLAG_RW, &VNET_NAME(sameprefixcarponly), 0, Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/in_pcb.c Sun Nov 14 20:38:11 2010 (r215317) @@ -108,7 +108,7 @@ VNET_DEFINE(int, ipport_randomcps) = 10; VNET_DEFINE(int, ipport_randomtime) = 45; /* user controlled via sysctl */ VNET_DEFINE(int, ipport_stoprandom); /* toggled by ipport_tick */ VNET_DEFINE(int, ipport_tcpallocs); -static VNET_DEFINE(int, ipport_tcplastcount); +STATIC_VNET_DEFINE(int, ipport_tcplastcount); #define V_ipport_tcplastcount VNET(ipport_tcplastcount) Modified: head/sys/netinet/in_rmx.c ============================================================================== --- head/sys/netinet/in_rmx.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/in_rmx.c Sun Nov 14 20:38:11 2010 (r215317) @@ -132,21 +132,21 @@ in_matroute(void *v_arg, struct radix_no return rn; } -static VNET_DEFINE(int, rtq_reallyold) = 60*60; /* one hour is "really old" */ +STATIC_VNET_DEFINE(int, rtq_reallyold) = 60*60; /* one hour is "really old" */ #define V_rtq_reallyold VNET(rtq_reallyold) SYSCTL_VNET_INT(_net_inet_ip, IPCTL_RTEXPIRE, rtexpire, CTLFLAG_RW, &VNET_NAME(rtq_reallyold), 0, "Default expiration time on dynamically learned routes"); /* never automatically crank down to less */ -static VNET_DEFINE(int, rtq_minreallyold) = 10; +STATIC_VNET_DEFINE(int, rtq_minreallyold) = 10; #define V_rtq_minreallyold VNET(rtq_minreallyold) SYSCTL_VNET_INT(_net_inet_ip, IPCTL_RTMINEXPIRE, rtminexpire, CTLFLAG_RW, &VNET_NAME(rtq_minreallyold), 0, "Minimum time to attempt to hold onto dynamically learned routes"); /* 128 cached routes is "too many" */ -static VNET_DEFINE(int, rtq_toomany) = 128; +STATIC_VNET_DEFINE(int, rtq_toomany) = 128; #define V_rtq_toomany VNET(rtq_toomany) SYSCTL_VNET_INT(_net_inet_ip, IPCTL_RTMAXCACHE, rtmaxcache, CTLFLAG_RW, &VNET_NAME(rtq_toomany), 0, @@ -240,8 +240,8 @@ in_rtqkill(struct radix_node *rn, void * } #define RTQ_TIMEOUT 60*10 /* run no less than once every ten minutes */ -static VNET_DEFINE(int, rtq_timeout) = RTQ_TIMEOUT; -static VNET_DEFINE(struct callout, rtq_timer); +STATIC_VNET_DEFINE(int, rtq_timeout) = RTQ_TIMEOUT; +STATIC_VNET_DEFINE(struct callout, rtq_timer); #define V_rtq_timeout VNET(rtq_timeout) #define V_rtq_timer VNET(rtq_timer) Modified: head/sys/netinet/ip_divert.c ============================================================================== --- head/sys/netinet/ip_divert.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/ip_divert.c Sun Nov 14 20:38:11 2010 (r215317) @@ -105,8 +105,8 @@ __FBSDID("$FreeBSD$"); */ /* Internal variables. */ -static VNET_DEFINE(struct inpcbhead, divcb); -static VNET_DEFINE(struct inpcbinfo, divcbinfo); +STATIC_VNET_DEFINE(struct inpcbhead, divcb); +STATIC_VNET_DEFINE(struct inpcbinfo, divcbinfo); #define V_divcb VNET(divcb) #define V_divcbinfo VNET(divcbinfo) Modified: head/sys/netinet/ip_fastfwd.c ============================================================================== --- head/sys/netinet/ip_fastfwd.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/ip_fastfwd.c Sun Nov 14 20:38:11 2010 (r215317) @@ -106,7 +106,7 @@ __FBSDID("$FreeBSD$"); #include -static VNET_DEFINE(int, ipfastforward_active); +STATIC_VNET_DEFINE(int, ipfastforward_active); #define V_ipfastforward_active VNET(ipfastforward_active) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, fastforwarding, CTLFLAG_RW, Modified: head/sys/netinet/ip_icmp.c ============================================================================== --- head/sys/netinet/ip_icmp.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/ip_icmp.c Sun Nov 14 20:38:11 2010 (r215317) @@ -80,55 +80,55 @@ VNET_DEFINE(struct icmpstat, icmpstat); SYSCTL_VNET_STRUCT(_net_inet_icmp, ICMPCTL_STATS, stats, CTLFLAG_RW, &VNET_NAME(icmpstat), icmpstat, ""); -static VNET_DEFINE(int, icmpmaskrepl) = 0; +STATIC_VNET_DEFINE(int, icmpmaskrepl) = 0; #define V_icmpmaskrepl VNET(icmpmaskrepl) SYSCTL_VNET_INT(_net_inet_icmp, ICMPCTL_MASKREPL, maskrepl, CTLFLAG_RW, &VNET_NAME(icmpmaskrepl), 0, "Reply to ICMP Address Mask Request packets."); -static VNET_DEFINE(u_int, icmpmaskfake) = 0; +STATIC_VNET_DEFINE(u_int, icmpmaskfake) = 0; #define V_icmpmaskfake VNET(icmpmaskfake) SYSCTL_VNET_UINT(_net_inet_icmp, OID_AUTO, maskfake, CTLFLAG_RW, &VNET_NAME(icmpmaskfake), 0, "Fake reply to ICMP Address Mask Request packets."); -static VNET_DEFINE(int, drop_redirect) = 0; +STATIC_VNET_DEFINE(int, drop_redirect) = 0; #define V_drop_redirect VNET(drop_redirect) SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, drop_redirect, CTLFLAG_RW, &VNET_NAME(drop_redirect), 0, "Ignore ICMP redirects"); -static VNET_DEFINE(int, log_redirect) = 0; +STATIC_VNET_DEFINE(int, log_redirect) = 0; #define V_log_redirect VNET(log_redirect) SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, log_redirect, CTLFLAG_RW, &VNET_NAME(log_redirect), 0, "Log ICMP redirects to the console"); -static VNET_DEFINE(int, icmplim) = 200; +STATIC_VNET_DEFINE(int, icmplim) = 200; #define V_icmplim VNET(icmplim) SYSCTL_VNET_INT(_net_inet_icmp, ICMPCTL_ICMPLIM, icmplim, CTLFLAG_RW, &VNET_NAME(icmplim), 0, "Maximum number of ICMP responses per second"); -static VNET_DEFINE(int, icmplim_output) = 1; +STATIC_VNET_DEFINE(int, icmplim_output) = 1; #define V_icmplim_output VNET(icmplim_output) SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, icmplim_output, CTLFLAG_RW, &VNET_NAME(icmplim_output), 0, "Enable rate limiting of ICMP responses"); -static VNET_DEFINE(char, reply_src[IFNAMSIZ]); +STATIC_VNET_DEFINE(char, reply_src[IFNAMSIZ]); #define V_reply_src VNET(reply_src) SYSCTL_VNET_STRING(_net_inet_icmp, OID_AUTO, reply_src, CTLFLAG_RW, &VNET_NAME(reply_src), IFNAMSIZ, "icmp reply source for non-local packets."); -static VNET_DEFINE(int, icmp_rfi) = 0; +STATIC_VNET_DEFINE(int, icmp_rfi) = 0; #define V_icmp_rfi VNET(icmp_rfi) SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, reply_from_interface, CTLFLAG_RW, &VNET_NAME(icmp_rfi), 0, "ICMP reply from incoming interface for non-local packets"); -static VNET_DEFINE(int, icmp_quotelen) = 8; +STATIC_VNET_DEFINE(int, icmp_quotelen) = 8; #define V_icmp_quotelen VNET(icmp_quotelen) SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, quotelen, CTLFLAG_RW, &VNET_NAME(icmp_quotelen), 0, @@ -137,7 +137,7 @@ SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO /* * ICMP broadcast echo sysctl */ -static VNET_DEFINE(int, icmpbmcastecho) = 0; +STATIC_VNET_DEFINE(int, icmpbmcastecho) = 0; #define V_icmpbmcastecho VNET(icmpbmcastecho) SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, bmcastecho, CTLFLAG_RW, &VNET_NAME(icmpbmcastecho), 0, Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/ip_input.c Sun Nov 14 20:38:11 2010 (r215317) @@ -96,7 +96,7 @@ SYSCTL_VNET_INT(_net_inet_ip, IPCTL_FORW &VNET_NAME(ipforwarding), 0, "Enable IP forwarding between interfaces"); -static VNET_DEFINE(int, ipsendredirects) = 1; /* XXX */ +STATIC_VNET_DEFINE(int, ipsendredirects) = 1; /* XXX */ #define V_ipsendredirects VNET(ipsendredirects) SYSCTL_VNET_INT(_net_inet_ip, IPCTL_SENDREDIRECTS, redirect, CTLFLAG_RW, &VNET_NAME(ipsendredirects), 0, @@ -107,13 +107,13 @@ SYSCTL_VNET_INT(_net_inet_ip, IPCTL_DEFT &VNET_NAME(ip_defttl), 0, "Maximum TTL on IP packets"); -static VNET_DEFINE(int, ip_keepfaith); +STATIC_VNET_DEFINE(int, ip_keepfaith); #define V_ip_keepfaith VNET(ip_keepfaith) SYSCTL_VNET_INT(_net_inet_ip, IPCTL_KEEPFAITH, keepfaith, CTLFLAG_RW, &VNET_NAME(ip_keepfaith), 0, "Enable packet capture for FAITH IPv4->IPv6 translater daemon"); -static VNET_DEFINE(int, ip_sendsourcequench); +STATIC_VNET_DEFINE(int, ip_sendsourcequench); #define V_ip_sendsourcequench VNET(ip_sendsourcequench) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, sendsourcequench, CTLFLAG_RW, &VNET_NAME(ip_sendsourcequench), 0, @@ -137,7 +137,7 @@ SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, * to the loopback interface instead of the interface where the * packets for those addresses are received. */ -static VNET_DEFINE(int, ip_checkinterface); +STATIC_VNET_DEFINE(int, ip_checkinterface); #define V_ip_checkinterface VNET(ip_checkinterface) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, check_interface, CTLFLAG_RW, &VNET_NAME(ip_checkinterface), 0, @@ -164,8 +164,8 @@ SYSCTL_VNET_STRUCT(_net_inet_ip, IPCTL_S &VNET_NAME(ipstat), ipstat, "IP statistics (struct ipstat, netinet/ip_var.h)"); -static VNET_DEFINE(uma_zone_t, ipq_zone); -static VNET_DEFINE(TAILQ_HEAD(ipqhead, ipq), ipq[IPREASS_NHASH]); +STATIC_VNET_DEFINE(uma_zone_t, ipq_zone); +STATIC_VNET_DEFINE(TAILQ_HEAD(ipqhead, ipq), ipq[IPREASS_NHASH]); static struct mtx ipqlock; #define V_ipq_zone VNET(ipq_zone) @@ -180,15 +180,15 @@ static void maxnipq_update(void); static void ipq_zone_change(void *); static void ip_drain_locked(void); -static VNET_DEFINE(int, maxnipq); /* Administrative limit on # reass queues. */ -static VNET_DEFINE(int, nipq); /* Total # of reass queues */ +STATIC_VNET_DEFINE(int, maxnipq); /* Administrative limit on # reass queues. */ +STATIC_VNET_DEFINE(int, nipq); /* Total # of reass queues */ #define V_maxnipq VNET(maxnipq) #define V_nipq VNET(nipq) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, fragpackets, CTLFLAG_RD, &VNET_NAME(nipq), 0, "Current number of IPv4 fragment reassembly queue entries"); -static VNET_DEFINE(int, maxfragsperpacket); +STATIC_VNET_DEFINE(int, maxfragsperpacket); #define V_maxfragsperpacket VNET(maxfragsperpacket) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, maxfragsperpacket, CTLFLAG_RW, &VNET_NAME(maxfragsperpacket), 0, @@ -209,7 +209,7 @@ SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, #endif #ifdef FLOWTABLE -static VNET_DEFINE(int, ip_output_flowtable_size) = 2048; +STATIC_VNET_DEFINE(int, ip_output_flowtable_size) = 2048; VNET_DEFINE(struct flowtable *, ip_ft); #define V_ip_output_flowtable_size VNET(ip_output_flowtable_size) @@ -1719,7 +1719,7 @@ makedummy: * locking. This code remains in ip_input.c as ip_mroute.c is optionally * compiled. */ -static VNET_DEFINE(int, ip_rsvp_on); +STATIC_VNET_DEFINE(int, ip_rsvp_on); VNET_DEFINE(struct socket *, ip_rsvpd); #define V_ip_rsvp_on VNET(ip_rsvp_on) Modified: head/sys/netinet/ip_ipsec.c ============================================================================== --- head/sys/netinet/ip_ipsec.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/ip_ipsec.c Sun Nov 14 20:38:11 2010 (r215317) @@ -72,9 +72,9 @@ extern struct protosw inetsw[]; #ifdef IPSEC #ifdef IPSEC_FILTERTUNNEL -static VNET_DEFINE(int, ip4_ipsec_filtertunnel) = 1; +STATIC_VNET_DEFINE(int, ip4_ipsec_filtertunnel) = 1; #else -static VNET_DEFINE(int, ip4_ipsec_filtertunnel) = 0; +STATIC_VNET_DEFINE(int, ip4_ipsec_filtertunnel) = 0; #endif #define V_ip4_ipsec_filtertunnel VNET(ip4_ipsec_filtertunnel) Modified: head/sys/netinet/ip_mroute.c ============================================================================== --- head/sys/netinet/ip_mroute.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/ip_mroute.c Sun Nov 14 20:38:11 2010 (r215317) @@ -121,7 +121,7 @@ __FBSDID("$FreeBSD$"); #define VIFI_INVALID ((vifi_t) -1) #define M_HASCL(m) ((m)->m_flags & M_EXT) -static VNET_DEFINE(uint32_t, last_tv_sec); /* last time we processed this */ +STATIC_VNET_DEFINE(uint32_t, last_tv_sec); /* last time we processed this */ #define V_last_tv_sec VNET(last_tv_sec) static MALLOC_DEFINE(M_MRTABLE, "mroutetbl", "multicast forwarding cache"); @@ -145,14 +145,14 @@ static struct mtx mrouter_mtx; static int ip_mrouter_cnt; /* # of vnets with active mrouters */ static int ip_mrouter_unloading; /* Allow no more V_ip_mrouter sockets */ -static VNET_DEFINE(struct mrtstat, mrtstat); +STATIC_VNET_DEFINE(struct mrtstat, mrtstat); #define V_mrtstat VNET(mrtstat) SYSCTL_VNET_STRUCT(_net_inet_ip, OID_AUTO, mrtstat, CTLFLAG_RW, &VNET_NAME(mrtstat), mrtstat, "IPv4 Multicast Forwarding Statistics (struct mrtstat, " "netinet/ip_mroute.h)"); -static VNET_DEFINE(u_long, mfchash); +STATIC_VNET_DEFINE(u_long, mfchash); #define V_mfchash VNET(mfchash) #define MFCHASH(a, g) \ ((((a).s_addr >> 20) ^ ((a).s_addr >> 10) ^ (a).s_addr ^ \ @@ -160,9 +160,9 @@ static VNET_DEFINE(u_long, mfchash); #define MFCHASHSIZE 256 static u_long mfchashsize; /* Hash size */ -static VNET_DEFINE(u_char *, nexpire); /* 0..mfchashsize-1 */ +STATIC_VNET_DEFINE(u_char *, nexpire); /* 0..mfchashsize-1 */ #define V_nexpire VNET(nexpire) -static VNET_DEFINE(LIST_HEAD(mfchashhdr, mfc)*, mfchashtbl); +STATIC_VNET_DEFINE(LIST_HEAD(mfchashhdr, mfc)*, mfchashtbl); #define V_mfchashtbl VNET(mfchashtbl) static struct mtx mfc_mtx; @@ -173,9 +173,9 @@ static struct mtx mfc_mtx; mtx_init(&mfc_mtx, "IPv4 multicast forwarding cache", NULL, MTX_DEF) #define MFC_LOCK_DESTROY() mtx_destroy(&mfc_mtx) -static VNET_DEFINE(vifi_t, numvifs); +STATIC_VNET_DEFINE(vifi_t, numvifs); #define V_numvifs VNET(numvifs) -static VNET_DEFINE(struct vif, viftable[MAXVIFS]); +STATIC_VNET_DEFINE(struct vif, viftable[MAXVIFS]); #define V_viftable VNET(viftable) SYSCTL_VNET_OPAQUE(_net_inet_ip, OID_AUTO, viftable, CTLFLAG_RD, &VNET_NAME(viftable), sizeof(V_viftable), "S,vif[MAXVIFS]", @@ -191,7 +191,7 @@ static struct mtx vif_mtx; static eventhandler_tag if_detach_event_tag = NULL; -static VNET_DEFINE(struct callout, expire_upcalls_ch); +STATIC_VNET_DEFINE(struct callout, expire_upcalls_ch); #define V_expire_upcalls_ch VNET(expire_upcalls_ch) #define EXPIRE_TIMEOUT (hz / 4) /* 4x / second */ @@ -206,9 +206,9 @@ static MALLOC_DEFINE(M_BWMETER, "bwmeter * expiration time. Periodically, the entries are analysed and processed. */ #define BW_METER_BUCKETS 1024 -static VNET_DEFINE(struct bw_meter*, bw_meter_timers[BW_METER_BUCKETS]); +STATIC_VNET_DEFINE(struct bw_meter*, bw_meter_timers[BW_METER_BUCKETS]); #define V_bw_meter_timers VNET(bw_meter_timers) -static VNET_DEFINE(struct callout, bw_meter_ch); +STATIC_VNET_DEFINE(struct callout, bw_meter_ch); #define V_bw_meter_ch VNET(bw_meter_ch) #define BW_METER_PERIOD (hz) /* periodical handling of bw meters */ @@ -216,16 +216,16 @@ static VNET_DEFINE(struct callout, bw_me * Pending upcalls are stored in a vector which is flushed when * full, or periodically */ -static VNET_DEFINE(struct bw_upcall, bw_upcalls[BW_UPCALLS_MAX]); +STATIC_VNET_DEFINE(struct bw_upcall, bw_upcalls[BW_UPCALLS_MAX]); #define V_bw_upcalls VNET(bw_upcalls) -static VNET_DEFINE(u_int, bw_upcalls_n); /* # of pending upcalls */ +STATIC_VNET_DEFINE(u_int, bw_upcalls_n); /* # of pending upcalls */ #define V_bw_upcalls_n VNET(bw_upcalls_n) -static VNET_DEFINE(struct callout, bw_upcalls_ch); +STATIC_VNET_DEFINE(struct callout, bw_upcalls_ch); #define V_bw_upcalls_ch VNET(bw_upcalls_ch) #define BW_UPCALLS_PERIOD (hz) /* periodical flush of bw upcalls */ -static VNET_DEFINE(struct pimstat, pimstat); +STATIC_VNET_DEFINE(struct pimstat, pimstat); #define V_pimstat VNET(pimstat) SYSCTL_NODE(_net_inet, IPPROTO_PIM, pim, CTLFLAG_RW, 0, "PIM"); @@ -296,9 +296,9 @@ static struct pim_encap_pimhdr pim_encap 0 /* flags */ }; -static VNET_DEFINE(vifi_t, reg_vif_num) = VIFI_INVALID; +STATIC_VNET_DEFINE(vifi_t, reg_vif_num) = VIFI_INVALID; #define V_reg_vif_num VNET(reg_vif_num) -static VNET_DEFINE(struct ifnet, multicast_register_if); +STATIC_VNET_DEFINE(struct ifnet, multicast_register_if); #define V_multicast_register_if VNET(multicast_register_if) /* @@ -367,9 +367,9 @@ static const uint32_t mrt_api_support = MRT_MFC_FLAGS_BORDER_VIF | MRT_MFC_RP | MRT_MFC_BW_UPCALL); -static VNET_DEFINE(uint32_t, mrt_api_config); +STATIC_VNET_DEFINE(uint32_t, mrt_api_config); #define V_mrt_api_config VNET(mrt_api_config) -static VNET_DEFINE(int, pim_assert_enabled); +STATIC_VNET_DEFINE(int, pim_assert_enabled); #define V_pim_assert_enabled VNET(pim_assert_enabled) static struct timeval pim_assert_interval = { 3, 0 }; /* Rate limit */ Modified: head/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw2.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/ipfw/ip_fw2.c Sun Nov 14 20:38:11 2010 (r215317) @@ -100,10 +100,10 @@ __FBSDID("$FreeBSD$"); */ /* ipfw_vnet_ready controls when we are open for business */ -static VNET_DEFINE(int, ipfw_vnet_ready) = 0; +STATIC_VNET_DEFINE(int, ipfw_vnet_ready) = 0; #define V_ipfw_vnet_ready VNET(ipfw_vnet_ready) -static VNET_DEFINE(int, fw_deny_unknown_exthdrs); +STATIC_VNET_DEFINE(int, fw_deny_unknown_exthdrs); #define V_fw_deny_unknown_exthdrs VNET(fw_deny_unknown_exthdrs) #ifdef IPFIREWALL_DEFAULT_TO_ACCEPT Modified: head/sys/netinet/ipfw/ip_fw_dynamic.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_dynamic.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/ipfw/ip_fw_dynamic.c Sun Nov 14 20:38:11 2010 (r215317) @@ -118,10 +118,10 @@ __FBSDID("$FreeBSD$"); /* * Static variables followed by global ones */ -static VNET_DEFINE(ipfw_dyn_rule **, ipfw_dyn_v); -static VNET_DEFINE(u_int32_t, dyn_buckets); -static VNET_DEFINE(u_int32_t, curr_dyn_buckets); -static VNET_DEFINE(struct callout, ipfw_timeout); +STATIC_VNET_DEFINE(ipfw_dyn_rule **, ipfw_dyn_v); +STATIC_VNET_DEFINE(u_int32_t, dyn_buckets); +STATIC_VNET_DEFINE(u_int32_t, curr_dyn_buckets); +STATIC_VNET_DEFINE(struct callout, ipfw_timeout); #define V_ipfw_dyn_v VNET(ipfw_dyn_v) #define V_dyn_buckets VNET(dyn_buckets) #define V_curr_dyn_buckets VNET(curr_dyn_buckets) @@ -150,12 +150,12 @@ ipfw_dyn_unlock(void) /* * Timeouts for various events in handing dynamic rules. */ -static VNET_DEFINE(u_int32_t, dyn_ack_lifetime); -static VNET_DEFINE(u_int32_t, dyn_syn_lifetime); -static VNET_DEFINE(u_int32_t, dyn_fin_lifetime); -static VNET_DEFINE(u_int32_t, dyn_rst_lifetime); -static VNET_DEFINE(u_int32_t, dyn_udp_lifetime); -static VNET_DEFINE(u_int32_t, dyn_short_lifetime); +STATIC_VNET_DEFINE(u_int32_t, dyn_ack_lifetime); +STATIC_VNET_DEFINE(u_int32_t, dyn_syn_lifetime); +STATIC_VNET_DEFINE(u_int32_t, dyn_fin_lifetime); +STATIC_VNET_DEFINE(u_int32_t, dyn_rst_lifetime); +STATIC_VNET_DEFINE(u_int32_t, dyn_udp_lifetime); +STATIC_VNET_DEFINE(u_int32_t, dyn_short_lifetime); #define V_dyn_ack_lifetime VNET(dyn_ack_lifetime) #define V_dyn_syn_lifetime VNET(dyn_syn_lifetime) @@ -172,16 +172,16 @@ static VNET_DEFINE(u_int32_t, dyn_short_ * than dyn_keepalive_period. */ -static VNET_DEFINE(u_int32_t, dyn_keepalive_interval); -static VNET_DEFINE(u_int32_t, dyn_keepalive_period); -static VNET_DEFINE(u_int32_t, dyn_keepalive); +STATIC_VNET_DEFINE(u_int32_t, dyn_keepalive_interval); +STATIC_VNET_DEFINE(u_int32_t, dyn_keepalive_period); +STATIC_VNET_DEFINE(u_int32_t, dyn_keepalive); #define V_dyn_keepalive_interval VNET(dyn_keepalive_interval) #define V_dyn_keepalive_period VNET(dyn_keepalive_period) #define V_dyn_keepalive VNET(dyn_keepalive) -static VNET_DEFINE(u_int32_t, dyn_count); /* # of dynamic rules */ -static VNET_DEFINE(u_int32_t, dyn_max); /* max # of dynamic rules */ +STATIC_VNET_DEFINE(u_int32_t, dyn_count); /* # of dynamic rules */ +STATIC_VNET_DEFINE(u_int32_t, dyn_max); /* max # of dynamic rules */ #define V_dyn_count VNET(dyn_count) #define V_dyn_max VNET(dyn_max) Modified: head/sys/netinet/ipfw/ip_fw_nat.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_nat.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/ipfw/ip_fw_nat.c Sun Nov 14 20:38:11 2010 (r215317) @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #include /* XXX for in_cksum */ -static VNET_DEFINE(eventhandler_tag, ifaddr_event_tag); +STATIC_VNET_DEFINE(eventhandler_tag, ifaddr_event_tag); #define V_ifaddr_event_tag VNET(ifaddr_event_tag) static void Modified: head/sys/netinet/ipfw/ip_fw_pfil.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_pfil.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/ipfw/ip_fw_pfil.c Sun Nov 14 20:38:11 2010 (r215317) @@ -63,11 +63,11 @@ __FBSDID("$FreeBSD$"); #include -static VNET_DEFINE(int, fw_enable) = 1; +STATIC_VNET_DEFINE(int, fw_enable) = 1; #define V_fw_enable VNET(fw_enable) #ifdef INET6 -static VNET_DEFINE(int, fw6_enable) = 1; +STATIC_VNET_DEFINE(int, fw6_enable) = 1; #define V_fw6_enable VNET(fw6_enable) #endif Modified: head/sys/netinet/siftr.c ============================================================================== --- head/sys/netinet/siftr.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/siftr.c Sun Nov 14 20:38:11 2010 (r215317) @@ -260,7 +260,7 @@ struct siftr_stats uint32_t nskip_out_dejavu; }; -static DPCPU_DEFINE(struct siftr_stats, ss); +STATIC_DPCPU_DEFINE(struct siftr_stats, ss); static volatile unsigned int siftr_exit_pkt_manager_thread = 0; static unsigned int siftr_enabled = 0; Modified: head/sys/netinet/tcp_hostcache.c ============================================================================== --- head/sys/netinet/tcp_hostcache.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/tcp_hostcache.c Sun Nov 14 20:38:11 2010 (r215317) @@ -106,10 +106,10 @@ __FBSDID("$FreeBSD$"); #define TCP_HOSTCACHE_EXPIRE 60*60 /* one hour */ #define TCP_HOSTCACHE_PRUNE 5*60 /* every 5 minutes */ -static VNET_DEFINE(struct tcp_hostcache, tcp_hostcache); +STATIC_VNET_DEFINE(struct tcp_hostcache, tcp_hostcache); #define V_tcp_hostcache VNET(tcp_hostcache) -static VNET_DEFINE(struct callout, tcp_hc_callout); +STATIC_VNET_DEFINE(struct callout, tcp_hc_callout); #define V_tcp_hc_callout VNET(tcp_hc_callout) static struct hc_metrics *tcp_hc_lookup(struct in_conninfo *); Modified: head/sys/netinet/tcp_reass.c ============================================================================== --- head/sys/netinet/tcp_reass.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/tcp_reass.c Sun Nov 14 20:38:11 2010 (r215317) @@ -80,25 +80,25 @@ static int tcp_reass_sysctl_qsize(SYSCTL SYSCTL_NODE(_net_inet_tcp, OID_AUTO, reass, CTLFLAG_RW, 0, "TCP Segment Reassembly Queue"); -static VNET_DEFINE(int, tcp_reass_maxseg) = 0; +STATIC_VNET_DEFINE(int, tcp_reass_maxseg) = 0; #define V_tcp_reass_maxseg VNET(tcp_reass_maxseg) SYSCTL_VNET_PROC(_net_inet_tcp_reass, OID_AUTO, maxsegments, CTLFLAG_RDTUN, &VNET_NAME(tcp_reass_maxseg), 0, &tcp_reass_sysctl_maxseg, "I", "Global maximum number of TCP Segments in Reassembly Queue"); -static VNET_DEFINE(int, tcp_reass_qsize) = 0; +STATIC_VNET_DEFINE(int, tcp_reass_qsize) = 0; #define V_tcp_reass_qsize VNET(tcp_reass_qsize) SYSCTL_VNET_PROC(_net_inet_tcp_reass, OID_AUTO, cursegments, CTLFLAG_RD, &VNET_NAME(tcp_reass_qsize), 0, &tcp_reass_sysctl_qsize, "I", "Global number of TCP Segments currently in Reassembly Queue"); -static VNET_DEFINE(int, tcp_reass_overflows) = 0; +STATIC_VNET_DEFINE(int, tcp_reass_overflows) = 0; #define V_tcp_reass_overflows VNET(tcp_reass_overflows) SYSCTL_VNET_INT(_net_inet_tcp_reass, OID_AUTO, overflows, CTLFLAG_RD, &VNET_NAME(tcp_reass_overflows), 0, "Global number of TCP Segment Reassembly Queue Overflows"); -static VNET_DEFINE(uma_zone_t, tcp_reass_zone); +STATIC_VNET_DEFINE(uma_zone_t, tcp_reass_zone); #define V_tcp_reass_zone VNET(tcp_reass_zone) /* Initialize TCP reassembly queue */ Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/tcp_subr.c Sun Nov 14 20:38:11 2010 (r215317) @@ -193,13 +193,13 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, do_t SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, pcbcount, CTLFLAG_RD, &VNET_NAME(tcbinfo.ipi_count), 0, "Number of active PCBs"); -static VNET_DEFINE(int, icmp_may_rst) = 1; +STATIC_VNET_DEFINE(int, icmp_may_rst) = 1; #define V_icmp_may_rst VNET(icmp_may_rst) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, icmp_may_rst, CTLFLAG_RW, &VNET_NAME(icmp_may_rst), 0, "Certain ICMP unreachable messages may abort connections in SYN_SENT"); -static VNET_DEFINE(int, tcp_isn_reseed_interval) = 0; +STATIC_VNET_DEFINE(int, tcp_isn_reseed_interval) = 0; #define V_tcp_isn_reseed_interval VNET(tcp_isn_reseed_interval) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, isn_reseed_interval, CTLFLAG_RW, &VNET_NAME(tcp_isn_reseed_interval), 0, @@ -241,7 +241,7 @@ struct tcpcb_mem { struct cc_var ccv; }; -static VNET_DEFINE(uma_zone_t, tcpcb_zone); +STATIC_VNET_DEFINE(uma_zone_t, tcpcb_zone); #define V_tcpcb_zone VNET(tcpcb_zone) MALLOC_DEFINE(M_TCPLOG, "tcplog", "TCP address and flags print buffers"); @@ -1453,10 +1453,10 @@ tcp6_ctlinput(int cmd, struct sockaddr * #define ISN_STATIC_INCREMENT 4096 #define ISN_RANDOM_INCREMENT (4096 - 1) -static VNET_DEFINE(u_char, isn_secret[32]); -static VNET_DEFINE(int, isn_last_reseed); -static VNET_DEFINE(u_int32_t, isn_offset); -static VNET_DEFINE(u_int32_t, isn_offset_old); +STATIC_VNET_DEFINE(u_char, isn_secret[32]); +STATIC_VNET_DEFINE(int, isn_last_reseed); +STATIC_VNET_DEFINE(u_int32_t, isn_offset); +STATIC_VNET_DEFINE(u_int32_t, isn_offset_old); #define V_isn_secret VNET(isn_secret) #define V_isn_last_reseed VNET(isn_last_reseed) Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/tcp_syncache.c Sun Nov 14 20:38:11 2010 (r215317) @@ -97,13 +97,13 @@ __FBSDID("$FreeBSD$"); #include -static VNET_DEFINE(int, tcp_syncookies) = 1; +STATIC_VNET_DEFINE(int, tcp_syncookies) = 1; #define V_tcp_syncookies VNET(tcp_syncookies) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, syncookies, CTLFLAG_RW, &VNET_NAME(tcp_syncookies), 0, "Use TCP SYN cookies if the syncache overflows"); -static VNET_DEFINE(int, tcp_syncookiesonly) = 0; +STATIC_VNET_DEFINE(int, tcp_syncookiesonly) = 0; #define V_tcp_syncookiesonly VNET(tcp_syncookiesonly) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, syncookies_only, CTLFLAG_RW, &VNET_NAME(tcp_syncookiesonly), 0, @@ -143,7 +143,7 @@ static struct syncache #define TCP_SYNCACHE_HASHSIZE 512 #define TCP_SYNCACHE_BUCKETLIMIT 30 -static VNET_DEFINE(struct tcp_syncache, tcp_syncache); +STATIC_VNET_DEFINE(struct tcp_syncache, tcp_syncache); #define V_tcp_syncache VNET(tcp_syncache) SYSCTL_NODE(_net_inet_tcp, OID_AUTO, syncache, CTLFLAG_RW, 0, "TCP SYN cache"); Modified: head/sys/netinet/tcp_timewait.c ============================================================================== --- head/sys/netinet/tcp_timewait.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/tcp_timewait.c Sun Nov 14 20:38:11 2010 (r215317) @@ -92,7 +92,7 @@ __FBSDID("$FreeBSD$"); #include -static VNET_DEFINE(uma_zone_t, tcptw_zone); +STATIC_VNET_DEFINE(uma_zone_t, tcptw_zone); #define V_tcptw_zone VNET(tcptw_zone) static int maxtcptw; @@ -102,7 +102,7 @@ static int maxtcptw; * queue pointers in each tcptw structure, are protected using the global * tcbinfo lock, which must be held over queue iteration and modification. */ -static VNET_DEFINE(TAILQ_HEAD(, tcptw), twq_2msl); +STATIC_VNET_DEFINE(TAILQ_HEAD(, tcptw), twq_2msl); #define V_twq_2msl VNET(twq_2msl) static void tcp_tw_2msl_reset(struct tcptw *, int); Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Sun Nov 14 20:23:02 2010 (r215316) +++ head/sys/netinet/udp_usrreq.c Sun Nov 14 20:38:11 2010 (r215317) @@ -131,7 +131,7 @@ SYSCTL_ULONG(_net_inet_udp, UDPCTL_RECVS VNET_DEFINE(struct inpcbhead, udb); /* from udp_var.h */ VNET_DEFINE(struct inpcbinfo, udbinfo); -static VNET_DEFINE(uma_zone_t, udpcb_zone); +STATIC_VNET_DEFINE(uma_zone_t, udpcb_zone); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 20:40:56 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A542106566C; Sun, 14 Nov 2010 20:40:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 09C018FC15; Sun, 14 Nov 2010 20:40:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEKetjp093275; Sun, 14 Nov 2010 20:40:55 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEKetST093270; Sun, 14 Nov 2010 20:40:55 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201011142040.oAEKetST093270@svn.freebsd.org> From: Dimitry Andric Date: Sun, 14 Nov 2010 20:40:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215318 - in head/sys: net sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 20:40:56 -0000 Author: dim Date: Sun Nov 14 20:40:55 2010 New Revision: 215318 URL: http://svn.freebsd.org/changeset/base/215318 Log: Instead of unconditionally emitting .globl's for the __start_set_xxx and __stop_set_xxx symbols, only emit them when the set_vnet or set_pcpu sections are actually defined. Modified: head/sys/net/vnet.h head/sys/sys/cdefs.h head/sys/sys/linker_set.h head/sys/sys/pcpu.h Modified: head/sys/net/vnet.h ============================================================================== --- head/sys/net/vnet.h Sun Nov 14 20:38:11 2010 (r215317) +++ head/sys/net/vnet.h Sun Nov 14 20:40:55 2010 (r215318) @@ -95,9 +95,7 @@ struct vnet { * Location of the kernel's 'set_vnet' linker set. */ extern uintptr_t *__start_set_vnet; -__GLOBL(__start_set_vnet); extern uintptr_t *__stop_set_vnet; -__GLOBL(__stop_set_vnet); #define VNET_START (uintptr_t)&__start_set_vnet #define VNET_STOP (uintptr_t)&__stop_set_vnet @@ -195,7 +193,10 @@ extern struct sx vnet_sxlock; */ #define VNET_NAME(n) vnet_entry_##n #define VNET_DECLARE(t, n) extern t VNET_NAME(n) -#define VNET_DEFINE(t, n) t VNET_NAME(n) __section(VNET_SETNAME) __used +#define VNET_DEFINE(t, n) \ + __GLOBL("__start_" VNET_SETNAME); \ + __GLOBL("__stop_" VNET_SETNAME); \ + t VNET_NAME(n) __section(VNET_SETNAME) __used #define STATIC_VNET_DEFINE(t, n) \ VNET_DEFINE(static t, n) #define _VNET_PTR(b, n) \ Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Sun Nov 14 20:38:11 2010 (r215317) +++ head/sys/sys/cdefs.h Sun Nov 14 20:40:55 2010 (r215318) @@ -401,8 +401,7 @@ #endif /* __STDC__ */ #endif /* __GNUC__ || __INTEL_COMPILER */ -#define __GLOBL1(sym) __asm__(".globl " #sym) -#define __GLOBL(sym) __GLOBL1(sym) +#define __GLOBL(sym) __asm__(".globl " sym) #if defined(__GNUC__) || defined(__INTEL_COMPILER) #define __IDSTRING(name,string) __asm__(".ident\t\"" string "\"") Modified: head/sys/sys/linker_set.h ============================================================================== --- head/sys/sys/linker_set.h Sun Nov 14 20:38:11 2010 (r215317) +++ head/sys/sys/linker_set.h Sun Nov 14 20:40:55 2010 (r215318) @@ -45,8 +45,8 @@ */ #ifdef __GNUCLIKE___SECTION #define __MAKE_SET(set, sym) \ - __GLOBL(__CONCAT(__start_set_,set)); \ - __GLOBL(__CONCAT(__stop_set_,set)); \ + __GLOBL("__start_set_" #set); \ + __GLOBL("__stop_set_" #set); \ static void const * const __set_##set##_sym_##sym \ __section("set_" #set) __used = &sym #else /* !__GNUCLIKE___SECTION */ Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Sun Nov 14 20:38:11 2010 (r215317) +++ head/sys/sys/pcpu.h Sun Nov 14 20:40:55 2010 (r215318) @@ -51,9 +51,7 @@ * Define a set for pcpu data. */ extern uintptr_t *__start_set_pcpu; -__GLOBL(__start_set_pcpu); extern uintptr_t *__stop_set_pcpu; -__GLOBL(__stop_set_pcpu); /* * Array of dynamic pcpu base offsets. Indexed by id. @@ -75,7 +73,10 @@ extern uintptr_t dpcpu_off[]; */ #define DPCPU_NAME(n) pcpu_entry_##n #define DPCPU_DECLARE(t, n) extern t DPCPU_NAME(n) -#define DPCPU_DEFINE(t, n) t DPCPU_NAME(n) __section(DPCPU_SETNAME) __used +#define DPCPU_DEFINE(t, n) \ + __GLOBL("__start_" DPCPU_SETNAME); \ + __GLOBL("__stop_" DPCPU_SETNAME); \ + t DPCPU_NAME(n) __section(DPCPU_SETNAME) __used #define STATIC_DPCPU_DEFINE(t, n) \ DPCPU_DEFINE(static t, n) From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 20:41:23 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CA721065679; Sun, 14 Nov 2010 20:41:23 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2AB358FC18; Sun, 14 Nov 2010 20:41:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEKfNUp093328; Sun, 14 Nov 2010 20:41:23 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEKfN6Y093321; Sun, 14 Nov 2010 20:41:23 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011142041.oAEKfN6Y093321@svn.freebsd.org> From: Andrew Thompson Date: Sun, 14 Nov 2010 20:41:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215319 - head/sys/arm/xscale/ixp425 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 20:41:23 -0000 Author: thompsa Date: Sun Nov 14 20:41:22 2010 New Revision: 215319 URL: http://svn.freebsd.org/changeset/base/215319 Log: Provide a mutex around the read/modify/write of the IXP425_GPIO_* registers. Giant was used in some places, but not all. Modified: head/sys/arm/xscale/ixp425/avila_gpio.c head/sys/arm/xscale/ixp425/avila_led.c head/sys/arm/xscale/ixp425/cambria_gpio.c head/sys/arm/xscale/ixp425/ixp425.c head/sys/arm/xscale/ixp425/ixp425_iic.c head/sys/arm/xscale/ixp425/ixp425var.h Modified: head/sys/arm/xscale/ixp425/avila_gpio.c ============================================================================== --- head/sys/arm/xscale/ixp425/avila_gpio.c Sun Nov 14 20:40:55 2010 (r215318) +++ head/sys/arm/xscale/ixp425/avila_gpio.c Sun Nov 14 20:41:22 2010 (r215319) @@ -58,13 +58,8 @@ __FBSDID("$FreeBSD$"); #define GPIO_CLEAR_BITS(sc, reg, bits) \ GPIO_CONF_WRITE_4(sc, reg, GPIO_CONF_READ_4(sc, (reg)) & ~(bits)) -#define GPIO_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) -#define GPIO_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) -#define GPIO_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) - struct avila_gpio_softc { device_t sc_dev; - struct mtx sc_mtx; bus_space_tag_t sc_iot; bus_space_handle_t sc_gpio_ioh; uint32_t sc_valid; @@ -148,12 +143,12 @@ avila_gpio_pin_configure(struct avila_gp uint32_t mask; mask = 1 << pin->gp_pin; - GPIO_LOCK(sc); /* * Manage input/output */ if (flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) { + IXP4XX_GPIO_LOCK(sc); pin->gp_flags &= ~(GPIO_PIN_INPUT|GPIO_PIN_OUTPUT); if (flags & GPIO_PIN_OUTPUT) { pin->gp_flags |= GPIO_PIN_OUTPUT; @@ -163,9 +158,8 @@ avila_gpio_pin_configure(struct avila_gp pin->gp_flags |= GPIO_PIN_INPUT; GPIO_SET_BITS(sc, IXP425_GPIO_GPOER, mask); } + IXP4XX_GPIO_UNLOCK(sc); } - - GPIO_UNLOCK(sc); } static int @@ -184,10 +178,7 @@ avila_gpio_pin_getcaps(device_t dev, uin if (pin >= IXP4XX_GPIO_PINS || !(sc->sc_valid & (1 << pin))) return (EINVAL); - GPIO_LOCK(sc); *caps = sc->sc_pins[pin].gp_caps; - GPIO_UNLOCK(sc); - return (0); } @@ -199,11 +190,11 @@ avila_gpio_pin_getflags(device_t dev, ui if (pin >= IXP4XX_GPIO_PINS || !(sc->sc_valid & (1 << pin))) return (EINVAL); - GPIO_LOCK(sc); + IXP4XX_GPIO_LOCK(sc); /* refresh since we do not own all the pins */ sc->sc_pins[pin].gp_flags = avila_gpio_pin_flags(sc, pin); *flags = sc->sc_pins[pin].gp_flags; - GPIO_UNLOCK(sc); + IXP4XX_GPIO_UNLOCK(sc); return (0); } @@ -216,10 +207,7 @@ avila_gpio_pin_getname(device_t dev, uin if (pin >= IXP4XX_GPIO_PINS || !(sc->sc_valid & (1 << pin))) return (EINVAL); - GPIO_LOCK(sc); memcpy(name, sc->sc_pins[pin].gp_name, GPIOMAXNAME); - GPIO_UNLOCK(sc); - return (0); } @@ -254,12 +242,12 @@ avila_gpio_pin_set(device_t dev, uint32_ if (pin >= IXP4XX_GPIO_PINS || !(sc->sc_valid & mask)) return (EINVAL); - GPIO_LOCK(sc); + IXP4XX_GPIO_LOCK(sc); if (value) GPIO_SET_BITS(sc, IXP425_GPIO_GPOUTR, mask); else GPIO_CLEAR_BITS(sc, IXP425_GPIO_GPOUTR, mask); - GPIO_UNLOCK(sc); + IXP4XX_GPIO_UNLOCK(sc); return (0); } @@ -272,9 +260,9 @@ avila_gpio_pin_get(device_t dev, uint32_ if (pin >= IXP4XX_GPIO_PINS || !(sc->sc_valid & (1 << pin))) return (EINVAL); - GPIO_LOCK(sc); + IXP4XX_GPIO_LOCK(sc); *val = (GPIO_CONF_READ_4(sc, IXP425_GPIO_GPINR) & (1 << pin)) ? 1 : 0; - GPIO_UNLOCK(sc); + IXP4XX_GPIO_UNLOCK(sc); return (0); } @@ -289,13 +277,13 @@ avila_gpio_pin_toggle(device_t dev, uint if (pin >= IXP4XX_GPIO_PINS || !(sc->sc_valid & mask)) return (EINVAL); - GPIO_LOCK(sc); - res = (GPIO_CONF_READ_4(sc, IXP425_GPIO_GPINR) & mask) ? 1 : 0; + IXP4XX_GPIO_LOCK(sc); + res = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPINR) & mask; if (res) GPIO_CLEAR_BITS(sc, IXP425_GPIO_GPOUTR, mask); else GPIO_SET_BITS(sc, IXP425_GPIO_GPOUTR, mask); - GPIO_UNLOCK(sc); + IXP4XX_GPIO_UNLOCK(sc); return (0); } @@ -320,9 +308,6 @@ avila_gpio_attach(device_t dev) sc->sc_iot = sa->sc_iot; sc->sc_gpio_ioh = sa->sc_gpio_ioh; - mtx_init(&sc->sc_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, - MTX_DEF); - for (i = 0; i < N(avila_gpio_pins); i++) { struct avila_gpio_pin *p = &avila_gpio_pins[i]; @@ -342,14 +327,9 @@ avila_gpio_attach(device_t dev) static int avila_gpio_detach(device_t dev) { - struct avila_gpio_softc *sc = device_get_softc(dev); - - KASSERT(mtx_initialized(&sc->sc_mtx), ("gpio mutex not initialized")); bus_generic_detach(dev); - mtx_destroy(&sc->sc_mtx); - return(0); } Modified: head/sys/arm/xscale/ixp425/avila_led.c ============================================================================== --- head/sys/arm/xscale/ixp425/avila_led.c Sun Nov 14 20:40:55 2010 (r215318) +++ head/sys/arm/xscale/ixp425/avila_led.c Sun Nov 14 20:41:22 2010 (r215319) @@ -52,12 +52,14 @@ led_func(void *arg, int onoff) struct led_avila_softc *sc = arg; uint32_t reg; + IXP4XX_GPIO_LOCK(); reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPOUTR); if (onoff) reg &= ~GPIO_LED_STATUS_BIT; else reg |= GPIO_LED_STATUS_BIT; GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPOUTR, reg); + IXP4XX_GPIO_UNLOCK(); } static int Modified: head/sys/arm/xscale/ixp425/cambria_gpio.c ============================================================================== --- head/sys/arm/xscale/ixp425/cambria_gpio.c Sun Nov 14 20:40:55 2010 (r215318) +++ head/sys/arm/xscale/ixp425/cambria_gpio.c Sun Nov 14 20:41:22 2010 (r215319) @@ -133,11 +133,11 @@ i2c_getsda(struct cambria_gpio_softc *sc { uint32_t reg; - mtx_lock(&Giant); + IXP4XX_GPIO_LOCK(); GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT); reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPINR); - mtx_unlock(&Giant); + IXP4XX_GPIO_UNLOCK(); return (reg & GPIO_I2C_SDA_BIT); } @@ -145,13 +145,13 @@ static void i2c_setsda(struct cambria_gpio_softc *sc, int val) { - mtx_lock(&Giant); + IXP4XX_GPIO_LOCK(); GPIO_CONF_CLR(sc, IXP425_GPIO_GPOUTR, GPIO_I2C_SDA_BIT); if (val) GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT); else GPIO_CONF_CLR(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT); - mtx_unlock(&Giant); + IXP4XX_GPIO_UNLOCK(); DELAY(I2C_DELAY); } @@ -159,13 +159,13 @@ static void i2c_setscl(struct cambria_gpio_softc *sc, int val) { - mtx_lock(&Giant); + IXP4XX_GPIO_LOCK(); GPIO_CONF_CLR(sc, IXP425_GPIO_GPOUTR, GPIO_I2C_SCL_BIT); if (val) GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SCL_BIT); else GPIO_CONF_CLR(sc, IXP425_GPIO_GPOER, GPIO_I2C_SCL_BIT); - mtx_unlock(&Giant); + IXP4XX_GPIO_UNLOCK(); DELAY(I2C_DELAY); } Modified: head/sys/arm/xscale/ixp425/ixp425.c ============================================================================== --- head/sys/arm/xscale/ixp425/ixp425.c Sun Nov 14 20:40:55 2010 (r215318) +++ head/sys/arm/xscale/ixp425/ixp425.c Sun Nov 14 20:41:22 2010 (r215319) @@ -66,6 +66,8 @@ uint32_t intr_steer2 = 0; struct ixp425_softc *ixp425_softc = NULL; +struct mtx ixp425_gpio_mtx; + static int ixp425_probe(device_t); static void ixp425_identify(driver_t *, device_t); static int ixp425_attach(device_t); @@ -164,6 +166,7 @@ ixp425_set_gpio(struct ixp425_softc *sc, { uint32_t gpiotr = GPIO_CONF_READ_4(sc, GPIO_TYPE_REG(pin)); + IXP4XX_GPIO_LOCK(); /* clear interrupt type */ GPIO_CONF_WRITE_4(sc, GPIO_TYPE_REG(pin), gpiotr &~ GPIO_TYPE(pin, GPIO_TYPE_MASK)); @@ -176,6 +179,7 @@ ixp425_set_gpio(struct ixp425_softc *sc, /* configure gpio line as an input */ GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPOER, GPIO_CONF_READ_4(sc, IXP425_GPIO_GPOER) | (1<sc_iot, IXP425_GPIO_HWBASE, IXP425_GPIO_SIZE, 0, &sc->sc_gpio_ioh)) panic("%s: unable to map GPIO registers", __func__); Modified: head/sys/arm/xscale/ixp425/ixp425_iic.c ============================================================================== --- head/sys/arm/xscale/ixp425/ixp425_iic.c Sun Nov 14 20:40:55 2010 (r215318) +++ head/sys/arm/xscale/ixp425/ixp425_iic.c Sun Nov 14 20:41:22 2010 (r215319) @@ -106,11 +106,11 @@ ixpiic_getscl(device_t dev) struct ixpiic_softc *sc = ixpiic_sc; uint32_t reg; - mtx_lock(&Giant); + IXP4XX_GPIO_LOCK(); GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SCL_BIT); reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPINR); - mtx_unlock(&Giant); + IXP4XX_GPIO_UNLOCK(); return (reg & GPIO_I2C_SCL_BIT); } @@ -120,11 +120,11 @@ ixpiic_getsda(device_t dev) struct ixpiic_softc *sc = ixpiic_sc; uint32_t reg; - mtx_lock(&Giant); + IXP4XX_GPIO_LOCK(); GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT); reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPINR); - mtx_unlock(&Giant); + IXP4XX_GPIO_UNLOCK(); return (reg & GPIO_I2C_SDA_BIT); } @@ -133,13 +133,13 @@ ixpiic_setsda(device_t dev, int val) { struct ixpiic_softc *sc = ixpiic_sc; - mtx_lock(&Giant); + IXP4XX_GPIO_LOCK(); GPIO_CONF_CLR(sc, IXP425_GPIO_GPOUTR, GPIO_I2C_SDA_BIT); if (val) GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT); else GPIO_CONF_CLR(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT); - mtx_unlock(&Giant); + IXP4XX_GPIO_UNLOCK(); DELAY(I2C_DELAY); } @@ -148,13 +148,13 @@ ixpiic_setscl(device_t dev, int val) { struct ixpiic_softc *sc = ixpiic_sc; - mtx_lock(&Giant); + IXP4XX_GPIO_LOCK(); GPIO_CONF_CLR(sc, IXP425_GPIO_GPOUTR, GPIO_I2C_SCL_BIT); if (val) GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SCL_BIT); else GPIO_CONF_CLR(sc, IXP425_GPIO_GPOER, GPIO_I2C_SCL_BIT); - mtx_unlock(&Giant); + IXP4XX_GPIO_UNLOCK(); DELAY(I2C_DELAY); } Modified: head/sys/arm/xscale/ixp425/ixp425var.h ============================================================================== --- head/sys/arm/xscale/ixp425/ixp425var.h Sun Nov 14 20:40:55 2010 (r215318) +++ head/sys/arm/xscale/ixp425/ixp425var.h Sun Nov 14 20:41:22 2010 (r215319) @@ -93,6 +93,9 @@ struct ixppcib_softc { bus_space_write_4(sc->sc_iot, sc->sc_gpio_ioh, reg, data) #define GPIO_CONF_READ_4(sc, reg) \ bus_space_read_4(sc->sc_iot, sc->sc_gpio_ioh, reg) +#define IXP4XX_GPIO_LOCK() mtx_lock(&ixp425_gpio_mtx) +#define IXP4XX_GPIO_UNLOCK() mtx_unlock(&ixp425_gpio_mtx) +extern struct mtx ixp425_gpio_mtx; extern struct bus_space ixp425_bs_tag; extern struct bus_space ixp425_a4x_bs_tag; From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 21:20:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D49B5106564A; Sun, 14 Nov 2010 21:20:52 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id E8F878FC08; Sun, 14 Nov 2010 21:20:51 +0000 (UTC) Received: by wwi14 with SMTP id 14so298345wwi.31 for ; Sun, 14 Nov 2010 13:20:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=UXsuT7/pXe6suTKLTn9D/mtLlbAiTCKmP8LKmCHKjAM=; b=tXjC3lxuenbwoohskxp1vPSbv6faYB5VbT5dJPE5sbmxeLt9kXm7cdUgjAYh7CxWyo 4P/Fr/ZyW35yLpmGsZa8T9QhYJNv3fYnb5IUGbqiYZ6zxMeW9sNza1Gnnnb99Bx9A8tB aSd34JG6uoJMsc+hsRA3bsykn8kXNb8FWozFk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=dpPFQxBNv95KQdiaji3pdgWQ/nirsMSjyP+Vq7eQsBx61IGctpHUWtKy26by+Rser2 vEBZ1vD7dzJd6FbdE01j+MmxbFvO44XvHtsfOoBDrbz7XmZ+2WvsCcyd4WtKaLZhvcnu ir5SNiY61etn+9sbu70TCobc2PfjKq+BcDgl8= Received: by 10.216.177.81 with SMTP id c59mr6228085wem.81.1289769650243; Sun, 14 Nov 2010 13:20:50 -0800 (PST) Received: from localhost ([109.169.29.56]) by mx.google.com with ESMTPS id p4sm3364544wer.29.2010.11.14.13.20.47 (version=SSLv3 cipher=RC4-MD5); Sun, 14 Nov 2010 13:20:49 -0800 (PST) From: Anonymous To: Konstantin Belousov References: <201011141824.oAEIOCtN089920@svn.freebsd.org> Date: Mon, 15 Nov 2010 00:20:37 +0300 In-Reply-To: <201011141824.oAEIOCtN089920@svn.freebsd.org> (Konstantin Belousov's message of "Sun, 14 Nov 2010 18:24:12 +0000 (UTC)") Message-ID: <86wrofob4q.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, freebsd-ports@freebsd.org Subject: Re: svn commit: r215309 - in head/sys: amd64/amd64 i386/i386 sys vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 21:20:53 -0000 Konstantin Belousov writes: > Author: kib > Date: Sun Nov 14 18:24:12 2010 > New Revision: 215309 > URL: http://svn.freebsd.org/changeset/base/215309 > > Log: > Use symbolic names instead of hardcoding values for magic p_osrel constants. > > MFC after: 1 week [...] > Modified: head/sys/sys/param.h > ============================================================================== > --- head/sys/sys/param.h Sun Nov 14 18:05:03 2010 (r215308) > +++ head/sys/sys/param.h Sun Nov 14 18:24:12 2010 (r215309) > @@ -60,6 +60,11 @@ > #undef __FreeBSD_version > #define __FreeBSD_version 900025 /* Master, propagated to newvers */ > > +#ifdef _KERNEL > +#define __FreeBSD_version_SIGSEGV 700004 > +#define __FreeBSD_version_MAP_ANON 800104 > +#endif > + This breaks bsd.port.mk regexp to determine OSVERSION. # Get __FreeBSD_version .if !defined(OSVERSION) .if exists(/usr/include/sys/param.h) OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < /usr/include/sys/param.h .elif exists(/usr/src/sys/sys/param.h) OSVERSION!= ${AWK} '/^\#define[[:blank::]]__FreeBSD_version/ {print $$3}' < /usr/src/sys/sys/param.h .else OSVERSION!= ${SYSCTL} -n kern.osreldate .endif .endif $ make -V OSVERSION 900025 700004 800104 And every port chokes on it. $ make -C devel/libpthread-stubs "Makefile", line 26: warning: String comparison operator should be either == or != "Makefile", line 26: Malformed conditional (${OSVERSION} < 700000) "Makefile", line 28: if-less endif "/usr/ports/Mk/bsd.port.mk", line 1739: warning: String comparison operator should be either == or != "/usr/ports/Mk/bsd.port.mk", line 1739: Malformed conditional (defined(USE_XZ) && ( (${OSVERSION} >= 900000 && ${OSVERSION} < 900012) || ${OSVERSION} < 800505 )) "/usr/ports/Mk/bsd.port.mk", line 6394: if-less endif make: fatal errors encountered -- cannot continue %% Index: Mk/bsd.port.mk =================================================================== RCS file: /a/.cvsup/ports/Mk/bsd.port.mk,v retrieving revision 1.654 diff -u -p -r1.654 bsd.port.mk --- Mk/bsd.port.mk 8 Nov 2010 16:07:03 -0000 1.654 +++ Mk/bsd.port.mk 14 Nov 2010 21:18:32 -0000 @@ -1219,9 +1219,9 @@ OSREL!= ${UNAME} -r | ${SED} -e 's/[-(]. # Get __FreeBSD_version .if !defined(OSVERSION) .if exists(/usr/include/sys/param.h) -OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < /usr/include/sys/param.h +OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version[[:blank:]]/ {print $$3}' < /usr/include/sys/param.h .elif exists(/usr/src/sys/sys/param.h) -OSVERSION!= ${AWK} '/^\#define[[:blank::]]__FreeBSD_version/ {print $$3}' < /usr/src/sys/sys/param.h +OSVERSION!= ${AWK} '/^\#define[[:blank::]]__FreeBSD_version[[:blank:]]/ {print $$3}' < /usr/src/sys/sys/param.h .else OSVERSION!= ${SYSCTL} -n kern.osreldate .endif %% From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 21:37:57 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 921881065672; Sun, 14 Nov 2010 21:37:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id D47588FC14; Sun, 14 Nov 2010 21:37:56 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id oAELboOO032201 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 14 Nov 2010 23:37:50 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id oAELbnsP052232; Sun, 14 Nov 2010 23:37:49 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id oAELbnaj052231; Sun, 14 Nov 2010 23:37:49 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 14 Nov 2010 23:37:49 +0200 From: Kostik Belousov To: Anonymous Message-ID: <20101114213749.GW2392@deviant.kiev.zoral.com.ua> References: <201011141824.oAEIOCtN089920@svn.freebsd.org> <86wrofob4q.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LKH70Ka7gWbFxE9+" Content-Disposition: inline In-Reply-To: <86wrofob4q.fsf@gmail.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, freebsd-ports@freebsd.org Subject: Re: svn commit: r215309 - in head/sys: amd64/amd64 i386/i386 sys vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 21:37:57 -0000 --LKH70Ka7gWbFxE9+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 15, 2010 at 12:20:37AM +0300, Anonymous wrote: > Konstantin Belousov writes: >=20 > > Author: kib > > Date: Sun Nov 14 18:24:12 2010 > > New Revision: 215309 > > URL: http://svn.freebsd.org/changeset/base/215309 > > > > Log: > > Use symbolic names instead of hardcoding values for magic p_osrel con= stants. > > =20 > > MFC after: 1 week > [...] > > Modified: head/sys/sys/param.h > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/sys/sys/param.h Sun Nov 14 18:05:03 2010 (r215308) > > +++ head/sys/sys/param.h Sun Nov 14 18:24:12 2010 (r215309) > > @@ -60,6 +60,11 @@ > > #undef __FreeBSD_version > > #define __FreeBSD_version 900025 /* Master, propagated to newvers */ > > =20 > > +#ifdef _KERNEL > > +#define __FreeBSD_version_SIGSEGV 700004 > > +#define __FreeBSD_version_MAP_ANON 800104 > > +#endif > > + >=20 > This breaks bsd.port.mk regexp to determine OSVERSION. >=20 > # Get __FreeBSD_version > .if !defined(OSVERSION) > .if exists(/usr/include/sys/param.h) > OSVERSION!=3D ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$= 3}' < /usr/include/sys/param.h > .elif exists(/usr/src/sys/sys/param.h) > OSVERSION!=3D ${AWK} '/^\#define[[:blank::]]__FreeBSD_version/ {print $= $3}' < /usr/src/sys/sys/param.h > .else > OSVERSION!=3D ${SYSCTL} -n kern.osreldate > .endif > .endif >=20 > $ make -V OSVERSION > 900025 700004 800104 >=20 > And every port chokes on it. >=20 > $ make -C devel/libpthread-stubs > "Makefile", line 26: warning: String comparison operator should be eith= er =3D=3D or !=3D > "Makefile", line 26: Malformed conditional (${OSVERSION} < 700000) > "Makefile", line 28: if-less endif > "/usr/ports/Mk/bsd.port.mk", line 1739: warning: String comparison oper= ator should be either =3D=3D or !=3D > "/usr/ports/Mk/bsd.port.mk", line 1739: Malformed conditional (defined(= USE_XZ) && ( (${OSVERSION} >=3D 900000 && ${OSVERSION} < 900012) || ${OSVER= SION} < 800505 )) > "/usr/ports/Mk/bsd.port.mk", line 6394: if-less endif > make: fatal errors encountered -- cannot continue >=20 > %% > Index: Mk/bsd.port.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /a/.cvsup/ports/Mk/bsd.port.mk,v > retrieving revision 1.654 > diff -u -p -r1.654 bsd.port.mk > --- Mk/bsd.port.mk 8 Nov 2010 16:07:03 -0000 1.654 > +++ Mk/bsd.port.mk 14 Nov 2010 21:18:32 -0000 > @@ -1219,9 +1219,9 @@ OSREL!=3D ${UNAME} -r | ${SED} -e 's/[-(]. > # Get __FreeBSD_version > .if !defined(OSVERSION) > .if exists(/usr/include/sys/param.h) > -OSVERSION!=3D ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3= }' < /usr/include/sys/param.h > +OSVERSION!=3D ${AWK} '/^\#define[[:blank:]]__FreeBSD_version[[:blank:]]/= {print $$3}' < /usr/include/sys/param.h > .elif exists(/usr/src/sys/sys/param.h) > -OSVERSION!=3D ${AWK} '/^\#define[[:blank::]]__FreeBSD_version/ {print $$= 3}' < /usr/src/sys/sys/param.h > +OSVERSION!=3D ${AWK} '/^\#define[[:blank::]]__FreeBSD_version[[:blank:]]= / {print $$3}' < /usr/src/sys/sys/param.h > .else > OSVERSION!=3D ${SYSCTL} -n kern.osreldate > .endif > %% I think it is better to select different namespace for the special versions. Can you confirm that the following patch fixes the ports mk for you ? It is enough to cd /usr/src/include && make install after patching. diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index a1a3ebc..e5184a6 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -416,8 +416,7 @@ trap(struct trapframe *frame) * without the ABI-tag ELF note. */ if (SV_CURPROC_ABI() =3D=3D SV_ABI_FREEBSD - && p->p_osrel >=3D - __FreeBSD_version_SIGSEGV) { + && p->p_osrel >=3D P_OSREL_SIGSEGV) { i =3D SIGSEGV; ucode =3D SEGV_ACCERR; } else { diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index b6f843a..026ba9d 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -462,8 +462,7 @@ trap(struct trapframe *frame) * without the ABI-tag ELF note. */ if (SV_CURPROC_ABI() =3D=3D SV_ABI_FREEBSD - && p->p_osrel >=3D - __FreeBSD_version_SIGSEGV) { + && p->p_osrel >=3D P_OSREL_SIGSEGV) { i =3D SIGSEGV; ucode =3D SEGV_ACCERR; } else { diff --git a/sys/sys/param.h b/sys/sys/param.h index 3e4cdf6..ea90308 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -61,8 +61,8 @@ #define __FreeBSD_version 900025 /* Master, propagated to newvers */ =20 #ifdef _KERNEL -#define __FreeBSD_version_SIGSEGV 700004 -#define __FreeBSD_version_MAP_ANON 800104 +#define P_OSREL_SIGSEGV 700004 +#define P_OSREL_MAP_ANON 800104 #endif =20 #ifndef LOCORE diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index 4d92573..a6decc3 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -232,7 +232,7 @@ mmap(td, uap) =20 /* Make sure mapping fits into numeric range, etc. */ if ((uap->len =3D=3D 0 && !SV_CURPROC_FLAG(SV_AOUT) && - curproc->p_osrel >=3D __FreeBSD_version_MAP_ANON) || + curproc->p_osrel >=3D P_OSREL_MAP_ANON) || ((flags & MAP_ANON) && (uap->fd !=3D -1 || pos !=3D 0))) return (EINVAL); =20 --LKH70Ka7gWbFxE9+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAkzgVq0ACgkQC3+MBN1Mb4i5pACeN887Uxku6VZOrBfTMIuoDgh+ PrkAmQFkp9CRPb01V3/RIybTHUthu1Jg =Spak -----END PGP SIGNATURE----- --LKH70Ka7gWbFxE9+-- From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 21:41:43 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDF9A106566B; Sun, 14 Nov 2010 21:41:43 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5B03D8FC14; Sun, 14 Nov 2010 21:41:43 +0000 (UTC) Received: by iwn39 with SMTP id 39so5978760iwn.13 for ; Sun, 14 Nov 2010 13:41:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=J77mXngbWsLjZa1ExqHdDgJziBvZl/gYOnxaH9mLknc=; b=rbeynVNg9XxiffZXoEOm1C/kNsDtxRUDXA/74mP8IG3LPA0G2KlxtW59QPF7D6wvAB qSCdvIFUZujhN++xolmcudqywCIdw6XnouzxQvJgnvCkeCDTPUEGH5nGako6i8gKjLp+ +WFZPJjC0q5Zbvv2mqVmDQx2Bu24rBbpp8XjE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=IGbDe2XzmQdlF0NPv26bwejV4rwwa/wzaPYanyfrcX0XgdPep1429Jx0MLZtfn9GLs 0+4iJlwFfubf/iaq5/zWIePNZ7F7qIT7V8NgWzxBCJpC0j9evVLTbRHlQcKJ9rlDYFgn o0X2AfYpznJ7KuhhYvlQjhnC1w+xrD+k5GCqU= MIME-Version: 1.0 Received: by 10.231.16.75 with SMTP id n11mr3805708iba.97.1289769195532; Sun, 14 Nov 2010 13:13:15 -0800 (PST) Sender: mdf356@gmail.com Received: by 10.231.21.35 with HTTP; Sun, 14 Nov 2010 13:13:15 -0800 (PST) In-Reply-To: <201011142038.oAEKcB9M093130@svn.freebsd.org> References: <201011142038.oAEKcB9M093130@svn.freebsd.org> Date: Sun, 14 Nov 2010 13:13:15 -0800 X-Google-Sender-Auth: b0QQkCcLdDDa3AjCJ_uvW_YACME Message-ID: From: mdf@FreeBSD.org To: Dimitry Andric Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215317 - in head/sys: kern mips/mips mips/rmi net netgraph netinet netinet/ipfw netinet6 netipsec powerpc/aim powerpc/booke X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 21:41:43 -0000 On Sun, Nov 14, 2010 at 12:38 PM, Dimitry Andric wrote: > Author: dim > Date: Sun Nov 14 20:38:11 2010 > New Revision: 215317 > URL: http://svn.freebsd.org/changeset/base/215317 > > Log: > =A0Apply the STATIC_VNET_DEFINE and STATIC_DPCPU_DEFINE macros throughout > =A0the tree. If "static DPCPU_DEFINE" and "STATIC_DPCPU_DEFINE" are the same thing, it seems backwards to prefer the macro over the C code. Is there a difference? Thanks, matthew > > Modified: > =A0head/sys/kern/kern_clock.c > =A0head/sys/kern/kern_clocksource.c > =A0head/sys/kern/sched_4bsd.c > =A0head/sys/kern/subr_pcpu.c > =A0head/sys/mips/mips/tick.c > =A0head/sys/mips/rmi/tick.c > =A0head/sys/net/flowtable.c > =A0head/sys/net/if.c > =A0head/sys/net/if_clone.c > =A0head/sys/net/if_ethersubr.c > =A0head/sys/net/if_gif.c > =A0head/sys/net/if_llatbl.c > =A0head/sys/net/if_loop.c > =A0head/sys/net/route.c > =A0head/sys/net/vnet.c > =A0head/sys/netgraph/ng_base.c > =A0head/sys/netgraph/ng_eiface.c > =A0head/sys/netgraph/ng_iface.c > =A0head/sys/netinet/if_ether.c > =A0head/sys/netinet/igmp.c > =A0head/sys/netinet/in.c > =A0head/sys/netinet/in_pcb.c > =A0head/sys/netinet/in_rmx.c > =A0head/sys/netinet/ip_divert.c > =A0head/sys/netinet/ip_fastfwd.c > =A0head/sys/netinet/ip_icmp.c > =A0head/sys/netinet/ip_input.c > =A0head/sys/netinet/ip_ipsec.c > =A0head/sys/netinet/ip_mroute.c > =A0head/sys/netinet/ipfw/ip_fw2.c > =A0head/sys/netinet/ipfw/ip_fw_dynamic.c > =A0head/sys/netinet/ipfw/ip_fw_nat.c > =A0head/sys/netinet/ipfw/ip_fw_pfil.c > =A0head/sys/netinet/siftr.c > =A0head/sys/netinet/tcp_hostcache.c > =A0head/sys/netinet/tcp_reass.c > =A0head/sys/netinet/tcp_subr.c > =A0head/sys/netinet/tcp_syncache.c > =A0head/sys/netinet/tcp_timewait.c > =A0head/sys/netinet/udp_usrreq.c > =A0head/sys/netinet6/frag6.c > =A0head/sys/netinet6/icmp6.c > =A0head/sys/netinet6/in6_rmx.c > =A0head/sys/netinet6/in6_src.c > =A0head/sys/netinet6/ip6_ipsec.c > =A0head/sys/netinet6/ip6_mroute.c > =A0head/sys/netinet6/mld6.c > =A0head/sys/netinet6/nd6.c > =A0head/sys/netinet6/nd6_nbr.c > =A0head/sys/netinet6/nd6_rtr.c > =A0head/sys/netinet6/scope6.c > =A0head/sys/netinet6/send.c > =A0head/sys/netipsec/key.c > =A0head/sys/netipsec/keysock.c > =A0head/sys/netipsec/xform_esp.c > =A0head/sys/powerpc/aim/clock.c > =A0head/sys/powerpc/booke/clock.c > > Modified: head/sys/kern/kern_clock.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/kern_clock.c =A0Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 = =A0(r215316) > +++ head/sys/kern/kern_clock.c =A0Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 = =A0(r215317) > @@ -373,7 +373,7 @@ int profprocs; > =A0int =A0 =A0ticks; > =A0int =A0 =A0psratio; > > -static DPCPU_DEFINE(int, pcputicks); =A0 /* Per-CPU version of ticks. */ > +STATIC_DPCPU_DEFINE(int, pcputicks); =A0 /* Per-CPU version of ticks. */ > =A0static int global_hardclock_run =3D 0; > > =A0/* > > Modified: head/sys/kern/kern_clocksource.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/kern_clocksource.c =A0 =A0Sun Nov 14 20:23:02 2010 =A0 = =A0 =A0 =A0(r215316) > +++ head/sys/kern/kern_clocksource.c =A0 =A0Sun Nov 14 20:38:11 2010 =A0 = =A0 =A0 =A0(r215317) > @@ -135,7 +135,7 @@ struct pcpu_state { > =A0 =A0 =A0 =A0int =A0 =A0 =A0 =A0 =A0 =A0 idle; =A0 =A0 =A0 =A0 =A0 /* T= his CPU is in idle mode. */ > =A0}; > > -static DPCPU_DEFINE(struct pcpu_state, timerstate); > +STATIC_DPCPU_DEFINE(struct pcpu_state, timerstate); > > =A0#define FREQ2BT(freq, bt) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\ > =A0{ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\ > > Modified: head/sys/kern/sched_4bsd.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/sched_4bsd.c =A0Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 = =A0(r215316) > +++ head/sys/kern/sched_4bsd.c =A0Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 = =A0(r215317) > @@ -161,7 +161,7 @@ struct pcpuidlestat { > =A0 =A0 =A0 =A0u_int idlecalls; > =A0 =A0 =A0 =A0u_int oldidlecalls; > =A0}; > -static DPCPU_DEFINE(struct pcpuidlestat, idlestat); > +STATIC_DPCPU_DEFINE(struct pcpuidlestat, idlestat); > > =A0static void > =A0setup_runqs(void) > > Modified: head/sys/kern/subr_pcpu.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/subr_pcpu.c =A0 Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 = =A0(r215316) > +++ head/sys/kern/subr_pcpu.c =A0 Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 = =A0(r215317) > @@ -70,7 +70,7 @@ struct dpcpu_free { > =A0 =A0 =A0 =A0TAILQ_ENTRY(dpcpu_free) df_link; > =A0}; > > -static DPCPU_DEFINE(char, modspace[DPCPU_MODMIN]); > +STATIC_DPCPU_DEFINE(char, modspace[DPCPU_MODMIN]); > =A0static TAILQ_HEAD(, dpcpu_free) dpcpu_head =3D TAILQ_HEAD_INITIALIZER(= dpcpu_head); > =A0static struct sx dpcpu_lock; > =A0uintptr_t dpcpu_off[MAXCPU]; > > Modified: head/sys/mips/mips/tick.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/mips/mips/tick.c =A0 Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 = =A0(r215316) > +++ head/sys/mips/mips/tick.c =A0 Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 = =A0(r215317) > @@ -57,13 +57,13 @@ uint64_t counter_freq; > > =A0struct timecounter *platform_timecounter; > > -static DPCPU_DEFINE(uint32_t, cycles_per_tick); > +STATIC_DPCPU_DEFINE(uint32_t, cycles_per_tick); > =A0static uint32_t cycles_per_usec; > > -static DPCPU_DEFINE(volatile uint32_t, counter_upper); > -static DPCPU_DEFINE(volatile uint32_t, counter_lower_last); > -static DPCPU_DEFINE(uint32_t, compare_ticks); > -static DPCPU_DEFINE(uint32_t, lost_ticks); > +STATIC_DPCPU_DEFINE(volatile uint32_t, counter_upper); > +STATIC_DPCPU_DEFINE(volatile uint32_t, counter_lower_last); > +STATIC_DPCPU_DEFINE(uint32_t, compare_ticks); > +STATIC_DPCPU_DEFINE(uint32_t, lost_ticks); > > =A0struct clock_softc { > =A0 =A0 =A0 =A0int intr_rid; > > Modified: head/sys/mips/rmi/tick.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/mips/rmi/tick.c =A0 =A0Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 = =A0(r215316) > +++ head/sys/mips/rmi/tick.c =A0 =A0Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 = =A0(r215317) > @@ -59,13 +59,13 @@ uint64_t counter_freq; > > =A0struct timecounter *platform_timecounter; > > -static DPCPU_DEFINE(uint32_t, cycles_per_tick); > +STATIC_DPCPU_DEFINE(uint32_t, cycles_per_tick); > =A0static uint32_t cycles_per_usec; > > -static DPCPU_DEFINE(volatile uint32_t, counter_upper); > -static DPCPU_DEFINE(volatile uint32_t, counter_lower_last); > -static DPCPU_DEFINE(uint32_t, compare_ticks); > -static DPCPU_DEFINE(uint32_t, lost_ticks); > +STATIC_DPCPU_DEFINE(volatile uint32_t, counter_upper); > +STATIC_DPCPU_DEFINE(volatile uint32_t, counter_lower_last); > +STATIC_DPCPU_DEFINE(uint32_t, compare_ticks); > +STATIC_DPCPU_DEFINE(uint32_t, lost_ticks); > > =A0struct clock_softc { > =A0 =A0 =A0 =A0int intr_rid; > > Modified: head/sys/net/flowtable.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/net/flowtable.c =A0 =A0Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 = =A0(r215316) > +++ head/sys/net/flowtable.c =A0 =A0Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 = =A0(r215317) > @@ -184,10 +184,10 @@ struct flowtable { > =A0} __aligned(CACHE_LINE_SIZE); > > =A0static struct proc *flowcleanerproc; > -static VNET_DEFINE(struct flowtable *, flow_list_head); > -static VNET_DEFINE(uint32_t, flow_hashjitter); > -static VNET_DEFINE(uma_zone_t, flow_ipv4_zone); > -static VNET_DEFINE(uma_zone_t, flow_ipv6_zone); > +STATIC_VNET_DEFINE(struct flowtable *, flow_list_head); > +STATIC_VNET_DEFINE(uint32_t, flow_hashjitter); > +STATIC_VNET_DEFINE(uma_zone_t, flow_ipv4_zone); > +STATIC_VNET_DEFINE(uma_zone_t, flow_ipv6_zone); > > =A0#define =A0 =A0 =A0 =A0V_flow_list_head =A0 =A0 =A0 =A0VNET(flow_list_= head) > =A0#define =A0 =A0 =A0 =A0V_flow_hashjitter =A0 =A0 =A0 VNET(flow_hashjit= ter) > @@ -230,13 +230,13 @@ do { =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\ > =A0* - idetach() cleanup for options VIMAGE builds. > =A0*/ > =A0VNET_DEFINE(int, flowtable_enable) =3D 1; > -static VNET_DEFINE(int, flowtable_debug); > -static VNET_DEFINE(int, flowtable_syn_expire) =3D SYN_IDLE; > -static VNET_DEFINE(int, flowtable_udp_expire) =3D UDP_IDLE; > -static VNET_DEFINE(int, flowtable_fin_wait_expire) =3D FIN_WAIT_IDLE; > -static VNET_DEFINE(int, flowtable_tcp_expire) =3D TCP_IDLE; > -static VNET_DEFINE(int, flowtable_nmbflows); > -static VNET_DEFINE(int, flowtable_ready) =3D 0; > +STATIC_VNET_DEFINE(int, flowtable_debug); > +STATIC_VNET_DEFINE(int, flowtable_syn_expire) =3D SYN_IDLE; > +STATIC_VNET_DEFINE(int, flowtable_udp_expire) =3D UDP_IDLE; > +STATIC_VNET_DEFINE(int, flowtable_fin_wait_expire) =3D FIN_WAIT_IDLE; > +STATIC_VNET_DEFINE(int, flowtable_tcp_expire) =3D TCP_IDLE; > +STATIC_VNET_DEFINE(int, flowtable_nmbflows); > +STATIC_VNET_DEFINE(int, flowtable_ready) =3D 0; > > =A0#define =A0 =A0 =A0 =A0V_flowtable_enable =A0 =A0 =A0 =A0 =A0 =A0 =A0V= NET(flowtable_enable) > =A0#define =A0 =A0 =A0 =A0V_flowtable_debug =A0 =A0 =A0 =A0 =A0 =A0 =A0 V= NET(flowtable_debug) > > Modified: head/sys/net/if.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/net/if.c =A0 Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 =A0(r21531= 6) > +++ head/sys/net/if.c =A0 Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 =A0(r21531= 7) > @@ -183,7 +183,7 @@ int ifqmaxlen =3D IFQ_MAXLEN; > =A0VNET_DEFINE(struct ifnethead, ifnet); =A0/* depend on static init XXX = */ > =A0VNET_DEFINE(struct ifgrouphead, ifg_head); > > -static VNET_DEFINE(int, if_indexlim) =3D 8; > +STATIC_VNET_DEFINE(int, if_indexlim) =3D 8; > > =A0/* Table of ifnet by index. */ > =A0VNET_DEFINE(struct ifindex_entry *, ifindex_table); > > Modified: head/sys/net/if_clone.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/net/if_clone.c =A0 =A0 Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 = =A0(r215316) > +++ head/sys/net/if_clone.c =A0 =A0 Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 = =A0(r215317) > @@ -56,7 +56,7 @@ static int =A0 =A0if_clone_createif(struct if_c > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0caddr_t params); > > =A0static struct mtx =A0 =A0 =A0if_cloners_mtx; > -static VNET_DEFINE(int, if_cloners_count); > +STATIC_VNET_DEFINE(int, if_cloners_count); > =A0VNET_DEFINE(LIST_HEAD(, if_clone), if_cloners); > > =A0#define =A0 =A0 =A0 =A0V_if_cloners_count =A0 =A0 =A0VNET(if_cloners_c= ount) > > Modified: head/sys/net/if_ethersubr.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/net/if_ethersubr.c Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 =A0(= r215316) > +++ head/sys/net/if_ethersubr.c Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 =A0(= r215317) > @@ -144,7 +144,7 @@ MALLOC_DEFINE(M_ARPCOM, "arpcom", "802.* > =A0#if defined(INET) || defined(INET6) > =A0int > =A0ether_ipfw_chk(struct mbuf **m0, struct ifnet *dst, int shared); > -static VNET_DEFINE(int, ether_ipfw); > +STATIC_VNET_DEFINE(int, ether_ipfw); > =A0#define =A0 =A0 =A0 =A0V_ether_ipfw =A0 =A0VNET(ether_ipfw) > =A0#endif > > > Modified: head/sys/net/if_gif.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/net/if_gif.c =A0 =A0 =A0 Sun Nov 14 20:23:02 2010 =A0 =A0 = =A0 =A0(r215316) > +++ head/sys/net/if_gif.c =A0 =A0 =A0 Sun Nov 14 20:38:11 2010 =A0 =A0 = =A0 =A0(r215317) > @@ -94,7 +94,7 @@ > =A0*/ > =A0static struct mtx gif_mtx; > =A0static MALLOC_DEFINE(M_GIF, "gif", "Generic Tunnel Interface"); > -static VNET_DEFINE(LIST_HEAD(, gif_softc), gif_softc_list); > +STATIC_VNET_DEFINE(LIST_HEAD(, gif_softc), gif_softc_list); > =A0#define =A0 =A0 =A0 =A0V_gif_softc_list =A0 =A0 =A0 =A0VNET(gif_softc_= list) > > =A0void =A0 (*ng_gif_input_p)(struct ifnet *ifp, struct mbuf **mp, int af= ); > @@ -124,7 +124,7 @@ SYSCTL_NODE(_net_link, IFT_GIF, gif, CTL > =A0*/ > =A0#define MAX_GIF_NEST 1 > =A0#endif > -static VNET_DEFINE(int, max_gif_nesting) =3D MAX_GIF_NEST; > +STATIC_VNET_DEFINE(int, max_gif_nesting) =3D MAX_GIF_NEST; > =A0#define =A0 =A0 =A0 =A0V_max_gif_nesting =A0 =A0 =A0 VNET(max_gif_nest= ing) > =A0SYSCTL_VNET_INT(_net_link_gif, OID_AUTO, max_nesting, CTLFLAG_RW, > =A0 =A0 &VNET_NAME(max_gif_nesting), 0, "Max nested tunnels"); > @@ -135,9 +135,9 @@ SYSCTL_VNET_INT(_net_link_gif, OID_AUTO, > =A0* we allow control over this check here. > =A0*/ > =A0#ifdef XBONEHACK > -static VNET_DEFINE(int, parallel_tunnels) =3D 1; > +STATIC_VNET_DEFINE(int, parallel_tunnels) =3D 1; > =A0#else > -static VNET_DEFINE(int, parallel_tunnels) =3D 0; > +STATIC_VNET_DEFINE(int, parallel_tunnels) =3D 0; > =A0#endif > =A0#define =A0 =A0 =A0 =A0V_parallel_tunnels =A0 =A0 =A0VNET(parallel_tun= nels) > =A0SYSCTL_VNET_INT(_net_link_gif, OID_AUTO, parallel_tunnels, CTLFLAG_RW, > > Modified: head/sys/net/if_llatbl.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/net/if_llatbl.c =A0 =A0Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 = =A0(r215316) > +++ head/sys/net/if_llatbl.c =A0 =A0Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 = =A0(r215317) > @@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$"); > > =A0MALLOC_DEFINE(M_LLTABLE, "lltable", "link level address tables"); > > -static VNET_DEFINE(SLIST_HEAD(, lltable), lltables); > +STATIC_VNET_DEFINE(SLIST_HEAD(, lltable), lltables); > =A0#define =A0 =A0 =A0 =A0V_lltables =A0 =A0 =A0VNET(lltables) > > =A0extern void arprequest(struct ifnet *, struct in_addr *, struct in_add= r *, > > Modified: head/sys/net/if_loop.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/net/if_loop.c =A0 =A0 =A0Sun Nov 14 20:23:02 2010 =A0 =A0 = =A0 =A0(r215316) > +++ head/sys/net/if_loop.c =A0 =A0 =A0Sun Nov 14 20:38:11 2010 =A0 =A0 = =A0 =A0(r215317) > @@ -106,8 +106,8 @@ static void lo_clone_destroy(struct ifne > =A0VNET_DEFINE(struct ifnet *, loif); =A0 =A0 /* Used externally */ > > =A0#ifdef VIMAGE > -static VNET_DEFINE(struct ifc_simple_data, lo_cloner_data); > -static VNET_DEFINE(struct if_clone, lo_cloner); > +STATIC_VNET_DEFINE(struct ifc_simple_data, lo_cloner_data); > +STATIC_VNET_DEFINE(struct if_clone, lo_cloner); > =A0#define =A0 =A0 =A0 =A0V_lo_cloner_data =A0 =A0 =A0 =A0VNET(lo_cloner_= data) > =A0#define =A0 =A0 =A0 =A0V_lo_cloner =A0 =A0 =A0 =A0 =A0 =A0 VNET(lo_clo= ner) > =A0#endif > > Modified: head/sys/net/route.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/net/route.c =A0 =A0 =A0 =A0Sun Nov 14 20:23:02 2010 =A0 =A0 = =A0 =A0(r215316) > +++ head/sys/net/route.c =A0 =A0 =A0 =A0Sun Nov 14 20:38:11 2010 =A0 =A0 = =A0 =A0(r215317) > @@ -113,7 +113,7 @@ VNET_DEFINE(int, rttrash); =A0 =A0 =A0 =A0 =A0/* rout= es no > =A0*/ > =A0#define RNTORT(p) =A0 =A0 =A0((struct rtentry *)(p)) > > -static VNET_DEFINE(uma_zone_t, rtzone); =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/= * Routing table UMA zone. */ > +STATIC_VNET_DEFINE(uma_zone_t, rtzone); =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/= * Routing table UMA zone. */ > =A0#define =A0 =A0 =A0 =A0V_rtzone =A0 =A0 =A0 =A0VNET(rtzone) > > =A0#if 0 > > Modified: head/sys/net/vnet.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/net/vnet.c Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 =A0(r215316) > +++ head/sys/net/vnet.c Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 =A0(r215317) > @@ -177,7 +177,7 @@ MALLOC_DEFINE(M_VNET_DATA, "vnet_data", > =A0* Space to store virtualized global variables from loadable kernel mod= ules, > =A0* and the free list to manage it. > =A0*/ > -static VNET_DEFINE(char, modspace[VNET_MODMIN]); > +STATIC_VNET_DEFINE(char, modspace[VNET_MODMIN]); > > =A0/* > =A0* Global lists of subsystem constructor and destructors for vnets. =A0= They are > > Modified: head/sys/netgraph/ng_base.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netgraph/ng_base.c Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 =A0(= r215316) > +++ head/sys/netgraph/ng_base.c Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 =A0(= r215317) > @@ -171,7 +171,7 @@ static struct mtx =A0 ng_typelist_mtx; > > =A0/* Hash related definitions */ > =A0/* XXX Don't need to initialise them because it's a LIST */ > -static VNET_DEFINE(LIST_HEAD(, ng_node), ng_ID_hash[NG_ID_HASH_SIZE]); > +STATIC_VNET_DEFINE(LIST_HEAD(, ng_node), ng_ID_hash[NG_ID_HASH_SIZE]); > =A0#define =A0 =A0 =A0 =A0V_ng_ID_hash =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0VNET(ng_ID_hash) > > =A0static struct mtx =A0 =A0 =A0ng_idhash_mtx; > @@ -189,7 +189,7 @@ static struct mtx =A0 ng_idhash_mtx; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 \ > =A0 =A0 =A0 =A0} while (0) > > -static VNET_DEFINE(LIST_HEAD(, ng_node), ng_name_hash[NG_NAME_HASH_SIZE]= ); > +STATIC_VNET_DEFINE(LIST_HEAD(, ng_node), ng_name_hash[NG_NAME_HASH_SIZE]= ); > =A0#define =A0 =A0 =A0 =A0V_ng_name_hash =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0VNET(ng_name_hash) > > =A0static struct mtx =A0 =A0 =A0ng_namehash_mtx; > @@ -359,7 +359,7 @@ ng_alloc_node(void) > =A0#define TRAP_ERROR() > =A0#endif > > -static VNET_DEFINE(ng_ID_t, nextID) =3D 1; > +STATIC_VNET_DEFINE(ng_ID_t, nextID) =3D 1; > =A0#define =A0 =A0 =A0 =A0V_nextID =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0VNET(nextID) > > =A0#ifdef INVARIANTS > > Modified: head/sys/netgraph/ng_eiface.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netgraph/ng_eiface.c =A0 =A0 =A0 Sun Nov 14 20:23:02 2010 = =A0 =A0 =A0 =A0(r215316) > +++ head/sys/netgraph/ng_eiface.c =A0 =A0 =A0 Sun Nov 14 20:38:11 2010 = =A0 =A0 =A0 =A0(r215317) > @@ -114,7 +114,7 @@ static struct ng_type typestruct =3D { > =A0}; > =A0NETGRAPH_INIT(eiface, &typestruct); > > -static VNET_DEFINE(struct unrhdr *, ng_eiface_unit); > +STATIC_VNET_DEFINE(struct unrhdr *, ng_eiface_unit); > =A0#define =A0 =A0 =A0 =A0V_ng_eiface_unit =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0VNET(ng_eiface_unit) > > =A0/*********************************************************************= *** > > Modified: head/sys/netgraph/ng_iface.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netgraph/ng_iface.c =A0 =A0 =A0 =A0Sun Nov 14 20:23:02 2010 = =A0 =A0 =A0 =A0(r215316) > +++ head/sys/netgraph/ng_iface.c =A0 =A0 =A0 =A0Sun Nov 14 20:38:11 2010 = =A0 =A0 =A0 =A0(r215317) > @@ -210,7 +210,7 @@ static struct ng_type typestruct =3D { > =A0}; > =A0NETGRAPH_INIT(iface, &typestruct); > > -static VNET_DEFINE(struct unrhdr *, ng_iface_unit); > +STATIC_VNET_DEFINE(struct unrhdr *, ng_iface_unit); > =A0#define =A0 =A0 =A0 =A0V_ng_iface_unit =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= VNET(ng_iface_unit) > > =A0/*********************************************************************= *** > > Modified: head/sys/netinet/if_ether.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/if_ether.c Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 =A0(= r215316) > +++ head/sys/netinet/if_ether.c Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 =A0(= r215317) > @@ -81,17 +81,17 @@ SYSCTL_NODE(_net_link_ether, PF_INET, in > =A0SYSCTL_NODE(_net_link_ether, PF_ARP, arp, CTLFLAG_RW, 0, ""); > > =A0/* timer values */ > -static VNET_DEFINE(int, arpt_keep) =3D (20*60); =A0/* once resolved, goo= d for 20 > +STATIC_VNET_DEFINE(int, arpt_keep) =3D (20*60); =A0/* once resolved, goo= d for 20 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 * minutes */ > -static VNET_DEFINE(int, arp_maxtries) =3D 5; > +STATIC_VNET_DEFINE(int, arp_maxtries) =3D 5; > =A0VNET_DEFINE(int, useloopback) =3D 1; =A0 =A0 /* use loopback interface= for > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 * local traffic */ > -static VNET_DEFINE(int, arp_proxyall) =3D 0; > -static VNET_DEFINE(int, arpt_down) =3D 20; =A0 =A0 =A0/* keep incomplete= entries for > +STATIC_VNET_DEFINE(int, arp_proxyall) =3D 0; > +STATIC_VNET_DEFINE(int, arpt_down) =3D 20; =A0 =A0 =A0/* keep incomplete= entries for > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 * 20 seconds */ > =A0VNET_DEFINE(struct arpstat, arpstat); =A0/* ARP statistics, see if_arp= .h */ > > -static VNET_DEFINE(int, arp_maxhold) =3D 1; > +STATIC_VNET_DEFINE(int, arp_maxhold) =3D 1; > > =A0#define =A0 =A0 =A0 =A0V_arpt_keep =A0 =A0 =A0 =A0 =A0 =A0 VNET(arpt_k= eep) > =A0#define =A0 =A0 =A0 =A0V_arpt_down =A0 =A0 =A0 =A0 =A0 =A0 VNET(arpt_d= own) > > Modified: head/sys/netinet/igmp.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/igmp.c =A0 =A0 Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 = =A0(r215316) > +++ head/sys/netinet/igmp.c =A0 =A0 Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 = =A0(r215317) > @@ -206,11 +206,11 @@ MALLOC_DEFINE(M_IGMP, "igmp", "igmp stat > =A0* FUTURE: Stop using IFP_TO_IA/INADDR_ANY, and use source address sele= ction > =A0* policy to control the address used by IGMP on the link. > =A0*/ > -static VNET_DEFINE(int, interface_timers_running); =A0 =A0 /* IGMPv3 gen= eral > +STATIC_VNET_DEFINE(int, interface_timers_running); =A0 =A0 /* IGMPv3 gen= eral > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * query response */ > -static VNET_DEFINE(int, state_change_timers_running); =A0/* IGMPv3 state= -change > +STATIC_VNET_DEFINE(int, state_change_timers_running); =A0/* IGMPv3 state= -change > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * retransmit */ > -static VNET_DEFINE(int, current_state_timers_running); /* IGMPv1/v2 host > +STATIC_VNET_DEFINE(int, current_state_timers_running); /* IGMPv1/v2 host > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * report; IGMPv3 g/sg > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * query response */ > > @@ -218,24 +218,24 @@ static VNET_DEFINE(int, current_state_ti > =A0#define =A0 =A0 =A0 =A0V_state_change_timers_running =A0 VNET(state_ch= ange_timers_running) > =A0#define =A0 =A0 =A0 =A0V_current_state_timers_running =A0VNET(current_= state_timers_running) > > -static VNET_DEFINE(LIST_HEAD(, igmp_ifinfo), igi_head); > -static VNET_DEFINE(struct igmpstat, igmpstat) =3D { > +STATIC_VNET_DEFINE(LIST_HEAD(, igmp_ifinfo), igi_head); > +STATIC_VNET_DEFINE(struct igmpstat, igmpstat) =3D { > =A0 =A0 =A0 =A0.igps_version =3D IGPS_VERSION_3, > =A0 =A0 =A0 =A0.igps_len =3D sizeof(struct igmpstat), > =A0}; > -static VNET_DEFINE(struct timeval, igmp_gsrdelay) =3D {10, 0}; > +STATIC_VNET_DEFINE(struct timeval, igmp_gsrdelay) =3D {10, 0}; > > =A0#define =A0 =A0 =A0 =A0V_igi_head =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0VNET(igi_head) > =A0#define =A0 =A0 =A0 =A0V_igmpstat =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0VNET(igmpstat) > =A0#define =A0 =A0 =A0 =A0V_igmp_gsrdelay =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= VNET(igmp_gsrdelay) > > -static VNET_DEFINE(int, igmp_recvifkludge) =3D 1; > -static VNET_DEFINE(int, igmp_sendra) =3D 1; > -static VNET_DEFINE(int, igmp_sendlocal) =3D 1; > -static VNET_DEFINE(int, igmp_v1enable) =3D 1; > -static VNET_DEFINE(int, igmp_v2enable) =3D 1; > -static VNET_DEFINE(int, igmp_legacysupp); > -static VNET_DEFINE(int, igmp_default_version) =3D IGMP_VERSION_3; > +STATIC_VNET_DEFINE(int, igmp_recvifkludge) =3D 1; > +STATIC_VNET_DEFINE(int, igmp_sendra) =3D 1; > +STATIC_VNET_DEFINE(int, igmp_sendlocal) =3D 1; > +STATIC_VNET_DEFINE(int, igmp_v1enable) =3D 1; > +STATIC_VNET_DEFINE(int, igmp_v2enable) =3D 1; > +STATIC_VNET_DEFINE(int, igmp_legacysupp); > +STATIC_VNET_DEFINE(int, igmp_default_version) =3D IGMP_VERSION_3; > > =A0#define =A0 =A0 =A0 =A0V_igmp_recvifkludge =A0 =A0 =A0 =A0 =A0 =A0 VNE= T(igmp_recvifkludge) > =A0#define =A0 =A0 =A0 =A0V_igmp_sendra =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 VNET(igmp_sendra) > > Modified: head/sys/netinet/in.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/in.c =A0 =A0 =A0 Sun Nov 14 20:23:02 2010 =A0 =A0 = =A0 =A0(r215316) > +++ head/sys/netinet/in.c =A0 =A0 =A0 Sun Nov 14 20:38:11 2010 =A0 =A0 = =A0 =A0(r215317) > @@ -76,12 +76,12 @@ static int =A0in_ifinit(struct ifnet *, > =A0 =A0 =A0 =A0 =A0 =A0struct in_ifaddr *, struct sockaddr_in *, int); > =A0static void =A0 =A0in_purgemaddrs(struct ifnet *); > > -static VNET_DEFINE(int, subnetsarelocal); > +STATIC_VNET_DEFINE(int, subnetsarelocal); > =A0#define =A0 =A0 =A0 =A0V_subnetsarelocal =A0 =A0 =A0 =A0 =A0 =A0 =A0 V= NET(subnetsarelocal) > =A0SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, subnets_are_local, CTLFLAG_RW, > =A0 =A0 =A0 =A0&VNET_NAME(subnetsarelocal), 0, > =A0 =A0 =A0 =A0"Treat all subnets as directly connected"); > -static VNET_DEFINE(int, sameprefixcarponly); > +STATIC_VNET_DEFINE(int, sameprefixcarponly); > =A0#define =A0 =A0 =A0 =A0V_sameprefixcarponly =A0 =A0 =A0 =A0 =A0 =A0VNE= T(sameprefixcarponly) > =A0SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, same_prefix_carp_only, CTLFLAG= _RW, > =A0 =A0 =A0 =A0&VNET_NAME(sameprefixcarponly), 0, > > Modified: head/sys/netinet/in_pcb.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/in_pcb.c =A0 Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 = =A0(r215316) > +++ head/sys/netinet/in_pcb.c =A0 Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 = =A0(r215317) > @@ -108,7 +108,7 @@ VNET_DEFINE(int, ipport_randomcps) =3D 10; > =A0VNET_DEFINE(int, ipport_randomtime) =3D 45; =A0 =A0 =A0/* user control= led via sysctl */ > =A0VNET_DEFINE(int, ipport_stoprandom); =A0 =A0 =A0 =A0 =A0 /* toggled by= ipport_tick */ > =A0VNET_DEFINE(int, ipport_tcpallocs); > -static VNET_DEFINE(int, ipport_tcplastcount); > +STATIC_VNET_DEFINE(int, ipport_tcplastcount); > > =A0#define =A0 =A0 =A0 =A0V_ipport_tcplastcount =A0 =A0 =A0 =A0 =A0 VNET(= ipport_tcplastcount) > > > Modified: head/sys/netinet/in_rmx.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/in_rmx.c =A0 Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 = =A0(r215316) > +++ head/sys/netinet/in_rmx.c =A0 Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 = =A0(r215317) > @@ -132,21 +132,21 @@ in_matroute(void *v_arg, struct radix_no > =A0 =A0 =A0 =A0return rn; > =A0} > > -static VNET_DEFINE(int, rtq_reallyold) =3D 60*60; /* one hour is "really= old" */ > +STATIC_VNET_DEFINE(int, rtq_reallyold) =3D 60*60; /* one hour is "really= old" */ > =A0#define =A0 =A0 =A0 =A0V_rtq_reallyold =A0 =A0 =A0 =A0 VNET(rtq_really= old) > =A0SYSCTL_VNET_INT(_net_inet_ip, IPCTL_RTEXPIRE, rtexpire, CTLFLAG_RW, > =A0 =A0 &VNET_NAME(rtq_reallyold), 0, > =A0 =A0 "Default expiration time on dynamically learned routes"); > > =A0/* never automatically crank down to less */ > -static VNET_DEFINE(int, rtq_minreallyold) =3D 10; > +STATIC_VNET_DEFINE(int, rtq_minreallyold) =3D 10; > =A0#define =A0 =A0 =A0 =A0V_rtq_minreallyold =A0 =A0 =A0VNET(rtq_minreall= yold) > =A0SYSCTL_VNET_INT(_net_inet_ip, IPCTL_RTMINEXPIRE, rtminexpire, CTLFLAG_= RW, > =A0 =A0 &VNET_NAME(rtq_minreallyold), 0, > =A0 =A0 "Minimum time to attempt to hold onto dynamically learned routes"= ); > > =A0/* 128 cached routes is "too many" */ > -static VNET_DEFINE(int, rtq_toomany) =3D 128; > +STATIC_VNET_DEFINE(int, rtq_toomany) =3D 128; > =A0#define =A0 =A0 =A0 =A0V_rtq_toomany =A0 =A0 =A0 =A0 =A0 VNET(rtq_toom= any) > =A0SYSCTL_VNET_INT(_net_inet_ip, IPCTL_RTMAXCACHE, rtmaxcache, CTLFLAG_RW= , > =A0 =A0 &VNET_NAME(rtq_toomany), 0, > @@ -240,8 +240,8 @@ in_rtqkill(struct radix_node *rn, void * > =A0} > > =A0#define RTQ_TIMEOUT =A0 =A060*10 =A0 /* run no less than once every te= n minutes */ > -static VNET_DEFINE(int, rtq_timeout) =3D RTQ_TIMEOUT; > -static VNET_DEFINE(struct callout, rtq_timer); > +STATIC_VNET_DEFINE(int, rtq_timeout) =3D RTQ_TIMEOUT; > +STATIC_VNET_DEFINE(struct callout, rtq_timer); > > =A0#define =A0 =A0 =A0 =A0V_rtq_timeout =A0 =A0 =A0 =A0 =A0 VNET(rtq_time= out) > =A0#define =A0 =A0 =A0 =A0V_rtq_timer =A0 =A0 =A0 =A0 =A0 =A0 VNET(rtq_ti= mer) > > Modified: head/sys/netinet/ip_divert.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/ip_divert.c =A0 =A0 =A0 =A0Sun Nov 14 20:23:02 2010 = =A0 =A0 =A0 =A0(r215316) > +++ head/sys/netinet/ip_divert.c =A0 =A0 =A0 =A0Sun Nov 14 20:38:11 2010 = =A0 =A0 =A0 =A0(r215317) > @@ -105,8 +105,8 @@ __FBSDID("$FreeBSD$"); > =A0*/ > > =A0/* Internal variables. */ > -static VNET_DEFINE(struct inpcbhead, divcb); > -static VNET_DEFINE(struct inpcbinfo, divcbinfo); > +STATIC_VNET_DEFINE(struct inpcbhead, divcb); > +STATIC_VNET_DEFINE(struct inpcbinfo, divcbinfo); > > =A0#define =A0 =A0 =A0 =A0V_divcb =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 VNET(divcb) > =A0#define =A0 =A0 =A0 =A0V_divcbinfo =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 VNET(divcbinfo) > > Modified: head/sys/netinet/ip_fastfwd.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/ip_fastfwd.c =A0 =A0 =A0 Sun Nov 14 20:23:02 2010 = =A0 =A0 =A0 =A0(r215316) > +++ head/sys/netinet/ip_fastfwd.c =A0 =A0 =A0 Sun Nov 14 20:38:11 2010 = =A0 =A0 =A0 =A0(r215317) > @@ -106,7 +106,7 @@ __FBSDID("$FreeBSD$"); > > =A0#include > > -static VNET_DEFINE(int, ipfastforward_active); > +STATIC_VNET_DEFINE(int, ipfastforward_active); > =A0#define =A0 =A0 =A0 =A0V_ipfastforward_active =A0 =A0 =A0 =A0 =A0VNET(= ipfastforward_active) > > =A0SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, fastforwarding, CTLFLAG_RW, > > Modified: head/sys/netinet/ip_icmp.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/ip_icmp.c =A0Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 = =A0(r215316) > +++ head/sys/netinet/ip_icmp.c =A0Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 = =A0(r215317) > @@ -80,55 +80,55 @@ VNET_DEFINE(struct icmpstat, icmpstat); > =A0SYSCTL_VNET_STRUCT(_net_inet_icmp, ICMPCTL_STATS, stats, CTLFLAG_RW, > =A0 =A0 =A0 =A0&VNET_NAME(icmpstat), icmpstat, ""); > > -static VNET_DEFINE(int, icmpmaskrepl) =3D 0; > +STATIC_VNET_DEFINE(int, icmpmaskrepl) =3D 0; > =A0#define =A0 =A0 =A0 =A0V_icmpmaskrepl =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0VNET(icmpmaskrepl) > =A0SYSCTL_VNET_INT(_net_inet_icmp, ICMPCTL_MASKREPL, maskrepl, CTLFLAG_RW= , > =A0 =A0 =A0 =A0&VNET_NAME(icmpmaskrepl), 0, > =A0 =A0 =A0 =A0"Reply to ICMP Address Mask Request packets."); > > -static VNET_DEFINE(u_int, icmpmaskfake) =3D 0; > +STATIC_VNET_DEFINE(u_int, icmpmaskfake) =3D 0; > =A0#define =A0 =A0 =A0 =A0V_icmpmaskfake =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0VNET(icmpmaskfake) > =A0SYSCTL_VNET_UINT(_net_inet_icmp, OID_AUTO, maskfake, CTLFLAG_RW, > =A0 =A0 =A0 =A0&VNET_NAME(icmpmaskfake), 0, > =A0 =A0 =A0 =A0"Fake reply to ICMP Address Mask Request packets."); > > -static VNET_DEFINE(int, drop_redirect) =3D 0; > +STATIC_VNET_DEFINE(int, drop_redirect) =3D 0; > =A0#define =A0 =A0 =A0 =A0V_drop_redirect =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= VNET(drop_redirect) > =A0SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, drop_redirect, CTLFLAG_RW, > =A0 =A0 =A0 =A0&VNET_NAME(drop_redirect), 0, > =A0 =A0 =A0 =A0"Ignore ICMP redirects"); > > -static VNET_DEFINE(int, log_redirect) =3D 0; > +STATIC_VNET_DEFINE(int, log_redirect) =3D 0; > =A0#define =A0 =A0 =A0 =A0V_log_redirect =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0VNET(log_redirect) > =A0SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, log_redirect, CTLFLAG_RW, > =A0 =A0 =A0 =A0&VNET_NAME(log_redirect), 0, > =A0 =A0 =A0 =A0"Log ICMP redirects to the console"); > > -static VNET_DEFINE(int, icmplim) =3D 200; > +STATIC_VNET_DEFINE(int, icmplim) =3D 200; > =A0#define =A0 =A0 =A0 =A0V_icmplim =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 VNET(icmplim) > =A0SYSCTL_VNET_INT(_net_inet_icmp, ICMPCTL_ICMPLIM, icmplim, CTLFLAG_RW, > =A0 =A0 =A0 =A0&VNET_NAME(icmplim), 0, > =A0 =A0 =A0 =A0"Maximum number of ICMP responses per second"); > > -static VNET_DEFINE(int, icmplim_output) =3D 1; > +STATIC_VNET_DEFINE(int, icmplim_output) =3D 1; > =A0#define =A0 =A0 =A0 =A0V_icmplim_output =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0VNET(icmplim_output) > =A0SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, icmplim_output, CTLFLAG_RW, > =A0 =A0 =A0 =A0&VNET_NAME(icmplim_output), 0, > =A0 =A0 =A0 =A0"Enable rate limiting of ICMP responses"); > > -static VNET_DEFINE(char, reply_src[IFNAMSIZ]); > +STATIC_VNET_DEFINE(char, reply_src[IFNAMSIZ]); > =A0#define =A0 =A0 =A0 =A0V_reply_src =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 VNET(reply_src) > =A0SYSCTL_VNET_STRING(_net_inet_icmp, OID_AUTO, reply_src, CTLFLAG_RW, > =A0 =A0 =A0 =A0&VNET_NAME(reply_src), IFNAMSIZ, > =A0 =A0 =A0 =A0"icmp reply source for non-local packets."); > > -static VNET_DEFINE(int, icmp_rfi) =3D 0; > +STATIC_VNET_DEFINE(int, icmp_rfi) =3D 0; > =A0#define =A0 =A0 =A0 =A0V_icmp_rfi =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0VNET(icmp_rfi) > =A0SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, reply_from_interface, CTLFLA= G_RW, > =A0 =A0 =A0 =A0&VNET_NAME(icmp_rfi), 0, > =A0 =A0 =A0 =A0"ICMP reply from incoming interface for non-local packets"= ); > > -static VNET_DEFINE(int, icmp_quotelen) =3D 8; > +STATIC_VNET_DEFINE(int, icmp_quotelen) =3D 8; > =A0#define =A0 =A0 =A0 =A0V_icmp_quotelen =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= VNET(icmp_quotelen) > =A0SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, quotelen, CTLFLAG_RW, > =A0 =A0 =A0 =A0&VNET_NAME(icmp_quotelen), 0, > @@ -137,7 +137,7 @@ SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO > =A0/* > =A0* ICMP broadcast echo sysctl > =A0*/ > -static VNET_DEFINE(int, icmpbmcastecho) =3D 0; > +STATIC_VNET_DEFINE(int, icmpbmcastecho) =3D 0; > =A0#define =A0 =A0 =A0 =A0V_icmpbmcastecho =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0VNET(icmpbmcastecho) > =A0SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, bmcastecho, CTLFLAG_RW, > =A0 =A0 =A0 =A0&VNET_NAME(icmpbmcastecho), 0, > > Modified: head/sys/netinet/ip_input.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/ip_input.c Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 =A0(= r215316) > +++ head/sys/netinet/ip_input.c Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 =A0(= r215317) > @@ -96,7 +96,7 @@ SYSCTL_VNET_INT(_net_inet_ip, IPCTL_FORW > =A0 =A0 &VNET_NAME(ipforwarding), 0, > =A0 =A0 "Enable IP forwarding between interfaces"); > > -static VNET_DEFINE(int, ipsendredirects) =3D 1; =A0/* XXX */ > +STATIC_VNET_DEFINE(int, ipsendredirects) =3D 1; =A0/* XXX */ > =A0#define =A0 =A0 =A0 =A0V_ipsendredirects =A0 =A0 =A0 VNET(ipsendredire= cts) > =A0SYSCTL_VNET_INT(_net_inet_ip, IPCTL_SENDREDIRECTS, redirect, CTLFLAG_R= W, > =A0 =A0 &VNET_NAME(ipsendredirects), 0, > @@ -107,13 +107,13 @@ SYSCTL_VNET_INT(_net_inet_ip, IPCTL_DEFT > =A0 =A0 &VNET_NAME(ip_defttl), 0, > =A0 =A0 "Maximum TTL on IP packets"); > > -static VNET_DEFINE(int, ip_keepfaith); > +STATIC_VNET_DEFINE(int, ip_keepfaith); > =A0#define =A0 =A0 =A0 =A0V_ip_keepfaith =A0 =A0 =A0 =A0 =A0VNET(ip_keepf= aith) > =A0SYSCTL_VNET_INT(_net_inet_ip, IPCTL_KEEPFAITH, keepfaith, CTLFLAG_RW, > =A0 =A0 &VNET_NAME(ip_keepfaith), 0, > =A0 =A0 "Enable packet capture for FAITH IPv4->IPv6 translater daemon"); > > -static VNET_DEFINE(int, ip_sendsourcequench); > +STATIC_VNET_DEFINE(int, ip_sendsourcequench); > =A0#define =A0 =A0 =A0 =A0V_ip_sendsourcequench =A0 VNET(ip_sendsourceque= nch) > =A0SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, sendsourcequench, CTLFLAG_RW, > =A0 =A0 &VNET_NAME(ip_sendsourcequench), 0, > @@ -137,7 +137,7 @@ SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, > =A0* to the loopback interface instead of the interface where the > =A0* packets for those addresses are received. > =A0*/ > -static VNET_DEFINE(int, ip_checkinterface); > +STATIC_VNET_DEFINE(int, ip_checkinterface); > =A0#define =A0 =A0 =A0 =A0V_ip_checkinterface =A0 =A0 VNET(ip_checkinterf= ace) > =A0SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, check_interface, CTLFLAG_RW, > =A0 =A0 &VNET_NAME(ip_checkinterface), 0, > @@ -164,8 +164,8 @@ SYSCTL_VNET_STRUCT(_net_inet_ip, IPCTL_S > =A0 =A0 &VNET_NAME(ipstat), ipstat, > =A0 =A0 "IP statistics (struct ipstat, netinet/ip_var.h)"); > > -static VNET_DEFINE(uma_zone_t, ipq_zone); > -static VNET_DEFINE(TAILQ_HEAD(ipqhead, ipq), ipq[IPREASS_NHASH]); > +STATIC_VNET_DEFINE(uma_zone_t, ipq_zone); > +STATIC_VNET_DEFINE(TAILQ_HEAD(ipqhead, ipq), ipq[IPREASS_NHASH]); > =A0static struct mtx ipqlock; > > =A0#define =A0 =A0 =A0 =A0V_ipq_zone =A0 =A0 =A0 =A0 =A0 =A0 =A0VNET(ipq_= zone) > @@ -180,15 +180,15 @@ static void =A0 =A0 =A0 maxnipq_update(void); > =A0static void =A0 =A0ipq_zone_change(void *); > =A0static void =A0 =A0ip_drain_locked(void); > > -static VNET_DEFINE(int, maxnipq); =A0/* Administrative limit on # reass = queues. */ > -static VNET_DEFINE(int, nipq); =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* Total = # of reass queues */ > +STATIC_VNET_DEFINE(int, maxnipq); =A0/* Administrative limit on # reass = queues. */ > +STATIC_VNET_DEFINE(int, nipq); =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* Total = # of reass queues */ > =A0#define =A0 =A0 =A0 =A0V_maxnipq =A0 =A0 =A0 =A0 =A0 =A0 =A0 VNET(maxn= ipq) > =A0#define =A0 =A0 =A0 =A0V_nipq =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0VNET(= nipq) > =A0SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, fragpackets, CTLFLAG_RD, > =A0 =A0 &VNET_NAME(nipq), 0, > =A0 =A0 "Current number of IPv4 fragment reassembly queue entries"); > > -static VNET_DEFINE(int, maxfragsperpacket); > +STATIC_VNET_DEFINE(int, maxfragsperpacket); > =A0#define =A0 =A0 =A0 =A0V_maxfragsperpacket =A0 =A0 VNET(maxfragsperpac= ket) > =A0SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, maxfragsperpacket, CTLFLAG_RW, > =A0 =A0 &VNET_NAME(maxfragsperpacket), 0, > @@ -209,7 +209,7 @@ SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, > =A0#endif > > =A0#ifdef FLOWTABLE > -static VNET_DEFINE(int, ip_output_flowtable_size) =3D 2048; > +STATIC_VNET_DEFINE(int, ip_output_flowtable_size) =3D 2048; > =A0VNET_DEFINE(struct flowtable *, ip_ft); > =A0#define =A0 =A0 =A0 =A0V_ip_output_flowtable_size =A0 =A0 =A0VNET(ip_o= utput_flowtable_size) > > @@ -1719,7 +1719,7 @@ makedummy: > =A0* locking. =A0This code remains in ip_input.c as ip_mroute.c is option= ally > =A0* compiled. > =A0*/ > -static VNET_DEFINE(int, ip_rsvp_on); > +STATIC_VNET_DEFINE(int, ip_rsvp_on); > =A0VNET_DEFINE(struct socket *, ip_rsvpd); > > =A0#define =A0 =A0 =A0 =A0V_ip_rsvp_on =A0 =A0 =A0 =A0 =A0 =A0VNET(ip_rsv= p_on) > > Modified: head/sys/netinet/ip_ipsec.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/ip_ipsec.c Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 =A0(= r215316) > +++ head/sys/netinet/ip_ipsec.c Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 =A0(= r215317) > @@ -72,9 +72,9 @@ extern =A0 =A0 =A0 =A0struct protosw inetsw[]; > > =A0#ifdef IPSEC > =A0#ifdef IPSEC_FILTERTUNNEL > -static VNET_DEFINE(int, ip4_ipsec_filtertunnel) =3D 1; > +STATIC_VNET_DEFINE(int, ip4_ipsec_filtertunnel) =3D 1; > =A0#else > -static VNET_DEFINE(int, ip4_ipsec_filtertunnel) =3D 0; > +STATIC_VNET_DEFINE(int, ip4_ipsec_filtertunnel) =3D 0; > =A0#endif > =A0#define =A0 =A0 =A0 =A0V_ip4_ipsec_filtertunnel VNET(ip4_ipsec_filtert= unnel) > > > Modified: head/sys/netinet/ip_mroute.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/ip_mroute.c =A0 =A0 =A0 =A0Sun Nov 14 20:23:02 2010 = =A0 =A0 =A0 =A0(r215316) > +++ head/sys/netinet/ip_mroute.c =A0 =A0 =A0 =A0Sun Nov 14 20:38:11 2010 = =A0 =A0 =A0 =A0(r215317) > @@ -121,7 +121,7 @@ __FBSDID("$FreeBSD$"); > =A0#define =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0VIFI_INVALID =A0 =A0((vifi_t) -= 1) > =A0#define =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0M_HASCL(m) =A0 =A0 =A0((m)->m_f= lags & M_EXT) > > -static VNET_DEFINE(uint32_t, last_tv_sec); /* last time we processed thi= s */ > +STATIC_VNET_DEFINE(uint32_t, last_tv_sec); /* last time we processed thi= s */ > =A0#define =A0 =A0 =A0 =A0V_last_tv_sec =A0 VNET(last_tv_sec) > > =A0static MALLOC_DEFINE(M_MRTABLE, "mroutetbl", "multicast forwarding cac= he"); > @@ -145,14 +145,14 @@ static struct mtx mrouter_mtx; > =A0static int ip_mrouter_cnt; =A0 =A0 /* # of vnets with active mrouters = */ > =A0static int ip_mrouter_unloading; /* Allow no more V_ip_mrouter sockets= */ > > -static VNET_DEFINE(struct mrtstat, mrtstat); > +STATIC_VNET_DEFINE(struct mrtstat, mrtstat); > =A0#define =A0 =A0 =A0 =A0V_mrtstat =A0 =A0 =A0 =A0 =A0 =A0 =A0 VNET(mrts= tat) > =A0SYSCTL_VNET_STRUCT(_net_inet_ip, OID_AUTO, mrtstat, CTLFLAG_RW, > =A0 =A0 &VNET_NAME(mrtstat), mrtstat, > =A0 =A0 "IPv4 Multicast Forwarding Statistics (struct mrtstat, " > =A0 =A0 "netinet/ip_mroute.h)"); > > -static VNET_DEFINE(u_long, mfchash); > +STATIC_VNET_DEFINE(u_long, mfchash); > =A0#define =A0 =A0 =A0 =A0V_mfchash =A0 =A0 =A0 =A0 =A0 =A0 =A0 VNET(mfch= ash) > =A0#define =A0 =A0 =A0 =A0MFCHASH(a, g) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 \ > =A0 =A0 =A0 =A0((((a).s_addr >> 20) ^ ((a).s_addr >> 10) ^ (a).s_addr ^ \ > @@ -160,9 +160,9 @@ static VNET_DEFINE(u_long, mfchash); > =A0#define =A0 =A0 =A0 =A0MFCHASHSIZE =A0 =A0 256 > > =A0static u_long mfchashsize; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* = Hash size */ > -static VNET_DEFINE(u_char *, nexpire); =A0 =A0 =A0 =A0 /* 0..mfchashsize= -1 */ > +STATIC_VNET_DEFINE(u_char *, nexpire); =A0 =A0 =A0 =A0 /* 0..mfchashsize= -1 */ > =A0#define =A0 =A0 =A0 =A0V_nexpire =A0 =A0 =A0 =A0 =A0 =A0 =A0 VNET(nexp= ire) > -static VNET_DEFINE(LIST_HEAD(mfchashhdr, mfc)*, mfchashtbl); > +STATIC_VNET_DEFINE(LIST_HEAD(mfchashhdr, mfc)*, mfchashtbl); > =A0#define =A0 =A0 =A0 =A0V_mfchashtbl =A0 =A0 =A0 =A0 =A0 =A0VNET(mfchas= htbl) > > =A0static struct mtx mfc_mtx; > @@ -173,9 +173,9 @@ static struct mtx mfc_mtx; > =A0 =A0 =A0 =A0mtx_init(&mfc_mtx, "IPv4 multicast forwarding cache", NULL= , MTX_DEF) > =A0#define =A0 =A0 =A0 =A0MFC_LOCK_DESTROY() =A0 =A0 =A0mtx_destroy(&mfc_= mtx) > > -static VNET_DEFINE(vifi_t, numvifs); > +STATIC_VNET_DEFINE(vifi_t, numvifs); > =A0#define =A0 =A0 =A0 =A0V_numvifs =A0 =A0 =A0 =A0 =A0 =A0 =A0 VNET(numv= ifs) > -static VNET_DEFINE(struct vif, viftable[MAXVIFS]); > +STATIC_VNET_DEFINE(struct vif, viftable[MAXVIFS]); > =A0#define =A0 =A0 =A0 =A0V_viftable =A0 =A0 =A0 =A0 =A0 =A0 =A0VNET(vift= able) > =A0SYSCTL_VNET_OPAQUE(_net_inet_ip, OID_AUTO, viftable, CTLFLAG_RD, > =A0 =A0 &VNET_NAME(viftable), sizeof(V_viftable), "S,vif[MAXVIFS]", > @@ -191,7 +191,7 @@ static struct mtx vif_mtx; > > =A0static eventhandler_tag if_detach_event_tag =3D NULL; > > -static VNET_DEFINE(struct callout, expire_upcalls_ch); > +STATIC_VNET_DEFINE(struct callout, expire_upcalls_ch); > =A0#define =A0 =A0 =A0 =A0V_expire_upcalls_ch =A0 =A0 VNET(expire_upcalls= _ch) > > =A0#define =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0EXPIRE_TIMEOUT =A0(hz / 4) =A0 = =A0 =A0 =A0/* 4x / second =A0 =A0 =A0 =A0 =A0*/ > @@ -206,9 +206,9 @@ static MALLOC_DEFINE(M_BWMETER, "bwmeter > =A0* expiration time. Periodically, the entries are analysed and processe= d. > =A0*/ > =A0#define =A0 =A0 =A0 =A0BW_METER_BUCKETS =A0 =A0 =A0 =A01024 > -static VNET_DEFINE(struct bw_meter*, bw_meter_timers[BW_METER_BUCKETS]); > +STATIC_VNET_DEFINE(struct bw_meter*, bw_meter_timers[BW_METER_BUCKETS]); > =A0#define =A0 =A0 =A0 =A0V_bw_meter_timers =A0 =A0 =A0 VNET(bw_meter_tim= ers) > -static VNET_DEFINE(struct callout, bw_meter_ch); > +STATIC_VNET_DEFINE(struct callout, bw_meter_ch); > =A0#define =A0 =A0 =A0 =A0V_bw_meter_ch =A0 =A0 =A0 =A0 =A0 VNET(bw_meter= _ch) > =A0#define =A0 =A0 =A0 =A0BW_METER_PERIOD (hz) =A0 =A0 =A0 =A0 =A0 =A0/* = periodical handling of bw meters */ > > @@ -216,16 +216,16 @@ static VNET_DEFINE(struct callout, bw_me > =A0* Pending upcalls are stored in a vector which is flushed when > =A0* full, or periodically > =A0*/ > -static VNET_DEFINE(struct bw_upcall, bw_upcalls[BW_UPCALLS_MAX]); > +STATIC_VNET_DEFINE(struct bw_upcall, bw_upcalls[BW_UPCALLS_MAX]); > =A0#define =A0 =A0 =A0 =A0V_bw_upcalls =A0 =A0 =A0 =A0 =A0 =A0VNET(bw_upc= alls) > -static VNET_DEFINE(u_int, bw_upcalls_n); /* # of pending upcalls */ > +STATIC_VNET_DEFINE(u_int, bw_upcalls_n); /* # of pending upcalls */ > =A0#define =A0 =A0 =A0 =A0V_bw_upcalls_n =A0 =A0 =A0 =A0 =A0VNET(bw_upcal= ls_n) > -static VNET_DEFINE(struct callout, bw_upcalls_ch); > +STATIC_VNET_DEFINE(struct callout, bw_upcalls_ch); > =A0#define =A0 =A0 =A0 =A0V_bw_upcalls_ch =A0 =A0 =A0 =A0 VNET(bw_upcalls= _ch) > > =A0#define BW_UPCALLS_PERIOD (hz) =A0 =A0 =A0 =A0 /* periodical flush of = bw upcalls */ > > -static VNET_DEFINE(struct pimstat, pimstat); > +STATIC_VNET_DEFINE(struct pimstat, pimstat); > =A0#define =A0 =A0 =A0 =A0V_pimstat =A0 =A0 =A0 =A0 =A0 =A0 =A0 VNET(pims= tat) > > =A0SYSCTL_NODE(_net_inet, IPPROTO_PIM, pim, CTLFLAG_RW, 0, "PIM"); > @@ -296,9 +296,9 @@ static struct pim_encap_pimhdr pim_encap > =A0 =A0 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* flags */ > =A0}; > > -static VNET_DEFINE(vifi_t, reg_vif_num) =3D VIFI_INVALID; > +STATIC_VNET_DEFINE(vifi_t, reg_vif_num) =3D VIFI_INVALID; > =A0#define =A0 =A0 =A0 =A0V_reg_vif_num =A0 =A0 =A0 =A0 =A0 VNET(reg_vif_= num) > -static VNET_DEFINE(struct ifnet, multicast_register_if); > +STATIC_VNET_DEFINE(struct ifnet, multicast_register_if); > =A0#define =A0 =A0 =A0 =A0V_multicast_register_if VNET(multicast_register= _if) > > =A0/* > @@ -367,9 +367,9 @@ static const uint32_t mrt_api_support =3D > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 MRT_MFC_FLAGS_BORDER_VIF | > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 MRT_MFC_RP | > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 MRT_MFC_BW_UPCALL); > -static VNET_DEFINE(uint32_t, mrt_api_config); > +STATIC_VNET_DEFINE(uint32_t, mrt_api_config); > =A0#define =A0 =A0 =A0 =A0V_mrt_api_config =A0 =A0 =A0 =A0VNET(mrt_api_co= nfig) > -static VNET_DEFINE(int, pim_assert_enabled); > +STATIC_VNET_DEFINE(int, pim_assert_enabled); > =A0#define =A0 =A0 =A0 =A0V_pim_assert_enabled =A0 =A0VNET(pim_assert_ena= bled) > =A0static struct timeval pim_assert_interval =3D { 3, 0 }; =A0/* Rate lim= it */ > > > Modified: head/sys/netinet/ipfw/ip_fw2.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/ipfw/ip_fw2.c =A0 =A0 =A0Sun Nov 14 20:23:02 2010 = =A0 =A0 =A0 =A0(r215316) > +++ head/sys/netinet/ipfw/ip_fw2.c =A0 =A0 =A0Sun Nov 14 20:38:11 2010 = =A0 =A0 =A0 =A0(r215317) > @@ -100,10 +100,10 @@ __FBSDID("$FreeBSD$"); > =A0*/ > > =A0/* ipfw_vnet_ready controls when we are open for business */ > -static VNET_DEFINE(int, ipfw_vnet_ready) =3D 0; > +STATIC_VNET_DEFINE(int, ipfw_vnet_ready) =3D 0; > =A0#define =A0 =A0 =A0 =A0V_ipfw_vnet_ready =A0 =A0 =A0 VNET(ipfw_vnet_re= ady) > > -static VNET_DEFINE(int, fw_deny_unknown_exthdrs); > +STATIC_VNET_DEFINE(int, fw_deny_unknown_exthdrs); > =A0#define =A0 =A0 =A0 =A0V_fw_deny_unknown_exthdrs =A0 =A0 =A0 VNET(fw_d= eny_unknown_exthdrs) > > =A0#ifdef IPFIREWALL_DEFAULT_TO_ACCEPT > > Modified: head/sys/netinet/ipfw/ip_fw_dynamic.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/ipfw/ip_fw_dynamic.c =A0 =A0 =A0 Sun Nov 14 20:23:02= 2010 =A0 =A0 =A0 =A0(r215316) > +++ head/sys/netinet/ipfw/ip_fw_dynamic.c =A0 =A0 =A0 Sun Nov 14 20:38:11= 2010 =A0 =A0 =A0 =A0(r215317) > @@ -118,10 +118,10 @@ __FBSDID("$FreeBSD$"); > =A0/* > =A0* Static variables followed by global ones > =A0*/ > -static VNET_DEFINE(ipfw_dyn_rule **, ipfw_dyn_v); > -static VNET_DEFINE(u_int32_t, dyn_buckets); > -static VNET_DEFINE(u_int32_t, curr_dyn_buckets); > -static VNET_DEFINE(struct callout, ipfw_timeout); > +STATIC_VNET_DEFINE(ipfw_dyn_rule **, ipfw_dyn_v); > +STATIC_VNET_DEFINE(u_int32_t, dyn_buckets); > +STATIC_VNET_DEFINE(u_int32_t, curr_dyn_buckets); > +STATIC_VNET_DEFINE(struct callout, ipfw_timeout); > =A0#define =A0 =A0 =A0 =A0V_ipfw_dyn_v =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0VNET(ipfw_dyn_v) > =A0#define =A0 =A0 =A0 =A0V_dyn_buckets =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 VNET(dyn_buckets) > =A0#define =A0 =A0 =A0 =A0V_curr_dyn_buckets =A0 =A0 =A0 =A0 =A0 =A0 =A0V= NET(curr_dyn_buckets) > @@ -150,12 +150,12 @@ ipfw_dyn_unlock(void) > =A0/* > =A0* Timeouts for various events in handing dynamic rules. > =A0*/ > -static VNET_DEFINE(u_int32_t, dyn_ack_lifetime); > -static VNET_DEFINE(u_int32_t, dyn_syn_lifetime); > -static VNET_DEFINE(u_int32_t, dyn_fin_lifetime); > -static VNET_DEFINE(u_int32_t, dyn_rst_lifetime); > -static VNET_DEFINE(u_int32_t, dyn_udp_lifetime); > -static VNET_DEFINE(u_int32_t, dyn_short_lifetime); > +STATIC_VNET_DEFINE(u_int32_t, dyn_ack_lifetime); > +STATIC_VNET_DEFINE(u_int32_t, dyn_syn_lifetime); > +STATIC_VNET_DEFINE(u_int32_t, dyn_fin_lifetime); > +STATIC_VNET_DEFINE(u_int32_t, dyn_rst_lifetime); > +STATIC_VNET_DEFINE(u_int32_t, dyn_udp_lifetime); > +STATIC_VNET_DEFINE(u_int32_t, dyn_short_lifetime); > > =A0#define =A0 =A0 =A0 =A0V_dyn_ack_lifetime =A0 =A0 =A0 =A0 =A0 =A0 =A0V= NET(dyn_ack_lifetime) > =A0#define =A0 =A0 =A0 =A0V_dyn_syn_lifetime =A0 =A0 =A0 =A0 =A0 =A0 =A0V= NET(dyn_syn_lifetime) > @@ -172,16 +172,16 @@ static VNET_DEFINE(u_int32_t, dyn_short_ > =A0* than dyn_keepalive_period. > =A0*/ > > -static VNET_DEFINE(u_int32_t, dyn_keepalive_interval); > -static VNET_DEFINE(u_int32_t, dyn_keepalive_period); > -static VNET_DEFINE(u_int32_t, dyn_keepalive); > +STATIC_VNET_DEFINE(u_int32_t, dyn_keepalive_interval); > +STATIC_VNET_DEFINE(u_int32_t, dyn_keepalive_period); > +STATIC_VNET_DEFINE(u_int32_t, dyn_keepalive); > > =A0#define =A0 =A0 =A0 =A0V_dyn_keepalive_interval =A0 =A0 =A0 =A0VNET(dy= n_keepalive_interval) > =A0#define =A0 =A0 =A0 =A0V_dyn_keepalive_period =A0 =A0 =A0 =A0 =A0VNET(= dyn_keepalive_period) > =A0#define =A0 =A0 =A0 =A0V_dyn_keepalive =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= VNET(dyn_keepalive) > > -static VNET_DEFINE(u_int32_t, dyn_count); =A0 =A0 =A0/* # of dynamic rul= es */ > -static VNET_DEFINE(u_int32_t, dyn_max); =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/= * max # of dynamic rules */ > +STATIC_VNET_DEFINE(u_int32_t, dyn_count); =A0 =A0 =A0/* # of dynamic rul= es */ > +STATIC_VNET_DEFINE(u_int32_t, dyn_max); =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/= * max # of dynamic rules */ > > =A0#define =A0 =A0 =A0 =A0V_dyn_count =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 VNET(dyn_count) > =A0#define =A0 =A0 =A0 =A0V_dyn_max =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 VNET(dyn_max) > > Modified: head/sys/netinet/ipfw/ip_fw_nat.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/ipfw/ip_fw_nat.c =A0 Sun Nov 14 20:23:02 2010 =A0 = =A0 =A0 =A0(r215316) > +++ head/sys/netinet/ipfw/ip_fw_nat.c =A0 Sun Nov 14 20:38:11 2010 =A0 = =A0 =A0 =A0(r215317) > @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); > > =A0#include =A0/* XXX for in_cksum */ > > -static VNET_DEFINE(eventhandler_tag, ifaddr_event_tag); > +STATIC_VNET_DEFINE(eventhandler_tag, ifaddr_event_tag); > =A0#define =A0 =A0 =A0 =A0V_ifaddr_event_tag =A0 =A0 =A0VNET(ifaddr_event= _tag) > > =A0static void > > Modified: head/sys/netinet/ipfw/ip_fw_pfil.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/ipfw/ip_fw_pfil.c =A0Sun Nov 14 20:23:02 2010 =A0 = =A0 =A0 =A0(r215316) > +++ head/sys/netinet/ipfw/ip_fw_pfil.c =A0Sun Nov 14 20:38:11 2010 =A0 = =A0 =A0 =A0(r215317) > @@ -63,11 +63,11 @@ __FBSDID("$FreeBSD$"); > > =A0#include > > -static VNET_DEFINE(int, fw_enable) =3D 1; > +STATIC_VNET_DEFINE(int, fw_enable) =3D 1; > =A0#define V_fw_enable =A0 =A0VNET(fw_enable) > > =A0#ifdef INET6 > -static VNET_DEFINE(int, fw6_enable) =3D 1; > +STATIC_VNET_DEFINE(int, fw6_enable) =3D 1; > =A0#define V_fw6_enable =A0 VNET(fw6_enable) > =A0#endif > > > Modified: head/sys/netinet/siftr.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/siftr.c =A0 =A0Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 = =A0(r215316) > +++ head/sys/netinet/siftr.c =A0 =A0Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 = =A0(r215317) > @@ -260,7 +260,7 @@ struct siftr_stats > =A0 =A0 =A0 =A0uint32_t nskip_out_dejavu; > =A0}; > > -static DPCPU_DEFINE(struct siftr_stats, ss); > +STATIC_DPCPU_DEFINE(struct siftr_stats, ss); > > =A0static volatile unsigned int siftr_exit_pkt_manager_thread =3D 0; > =A0static unsigned int siftr_enabled =3D 0; > > Modified: head/sys/netinet/tcp_hostcache.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/tcp_hostcache.c =A0 =A0Sun Nov 14 20:23:02 2010 =A0 = =A0 =A0 =A0(r215316) > +++ head/sys/netinet/tcp_hostcache.c =A0 =A0Sun Nov 14 20:38:11 2010 =A0 = =A0 =A0 =A0(r215317) > @@ -106,10 +106,10 @@ __FBSDID("$FreeBSD$"); > =A0#define TCP_HOSTCACHE_EXPIRE =A0 =A0 =A0 =A0 =A0 60*60 =A0 /* one hour= */ > =A0#define TCP_HOSTCACHE_PRUNE =A0 =A0 =A0 =A0 =A0 =A05*60 =A0 =A0/* ever= y 5 minutes */ > > -static VNET_DEFINE(struct tcp_hostcache, tcp_hostcache); > +STATIC_VNET_DEFINE(struct tcp_hostcache, tcp_hostcache); > =A0#define =A0 =A0 =A0 =A0V_tcp_hostcache =A0 =A0 =A0 =A0 VNET(tcp_hostca= che) > > -static VNET_DEFINE(struct callout, tcp_hc_callout); > +STATIC_VNET_DEFINE(struct callout, tcp_hc_callout); > =A0#define =A0 =A0 =A0 =A0V_tcp_hc_callout =A0 =A0 =A0 =A0VNET(tcp_hc_cal= lout) > > =A0static struct hc_metrics *tcp_hc_lookup(struct in_conninfo *); > > Modified: head/sys/netinet/tcp_reass.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/tcp_reass.c =A0 =A0 =A0 =A0Sun Nov 14 20:23:02 2010 = =A0 =A0 =A0 =A0(r215316) > +++ head/sys/netinet/tcp_reass.c =A0 =A0 =A0 =A0Sun Nov 14 20:38:11 2010 = =A0 =A0 =A0 =A0(r215317) > @@ -80,25 +80,25 @@ static int tcp_reass_sysctl_qsize(SYSCTL > =A0SYSCTL_NODE(_net_inet_tcp, OID_AUTO, reass, CTLFLAG_RW, 0, > =A0 =A0 "TCP Segment Reassembly Queue"); > > -static VNET_DEFINE(int, tcp_reass_maxseg) =3D 0; > +STATIC_VNET_DEFINE(int, tcp_reass_maxseg) =3D 0; > =A0#define =A0 =A0 =A0 =A0V_tcp_reass_maxseg =A0 =A0 =A0 =A0 =A0 =A0 =A0V= NET(tcp_reass_maxseg) > =A0SYSCTL_VNET_PROC(_net_inet_tcp_reass, OID_AUTO, maxsegments, CTLFLAG_R= DTUN, > =A0 =A0 &VNET_NAME(tcp_reass_maxseg), 0, &tcp_reass_sysctl_maxseg, "I", > =A0 =A0 "Global maximum number of TCP Segments in Reassembly Queue"); > > -static VNET_DEFINE(int, tcp_reass_qsize) =3D 0; > +STATIC_VNET_DEFINE(int, tcp_reass_qsize) =3D 0; > =A0#define =A0 =A0 =A0 =A0V_tcp_reass_qsize =A0 =A0 =A0 =A0 =A0 =A0 =A0 V= NET(tcp_reass_qsize) > =A0SYSCTL_VNET_PROC(_net_inet_tcp_reass, OID_AUTO, cursegments, CTLFLAG_R= D, > =A0 =A0 &VNET_NAME(tcp_reass_qsize), 0, &tcp_reass_sysctl_qsize, "I", > =A0 =A0 "Global number of TCP Segments currently in Reassembly Queue"); > > -static VNET_DEFINE(int, tcp_reass_overflows) =3D 0; > +STATIC_VNET_DEFINE(int, tcp_reass_overflows) =3D 0; > =A0#define =A0 =A0 =A0 =A0V_tcp_reass_overflows =A0 =A0 =A0 =A0 =A0 VNET(= tcp_reass_overflows) > =A0SYSCTL_VNET_INT(_net_inet_tcp_reass, OID_AUTO, overflows, CTLFLAG_RD, > =A0 =A0 &VNET_NAME(tcp_reass_overflows), 0, > =A0 =A0 "Global number of TCP Segment Reassembly Queue Overflows"); > > -static VNET_DEFINE(uma_zone_t, tcp_reass_zone); > +STATIC_VNET_DEFINE(uma_zone_t, tcp_reass_zone); > =A0#define =A0 =A0 =A0 =A0V_tcp_reass_zone =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0VNET(tcp_reass_zone) > > =A0/* Initialize TCP reassembly queue */ > > Modified: head/sys/netinet/tcp_subr.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/tcp_subr.c Sun Nov 14 20:23:02 2010 =A0 =A0 =A0 =A0(= r215316) > +++ head/sys/netinet/tcp_subr.c Sun Nov 14 20:38:11 2010 =A0 =A0 =A0 =A0(= r215317) > @@ -193,13 +193,13 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, do_t > =A0SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, pcbcount, CTLFLAG_RD, > =A0 =A0 &VNET_NAME(tcbinfo.ipi_count), 0, "Number of active PCBs"); > > -static VNET_DEFINE(int, icmp_may_rst) =3D 1; > +STATIC_VNET_DEFINE(int, icmp_may_rst) =3D 1; > =A0#define =A0 =A0 =A0 =A0V_icmp_may_rst =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0VNET(icmp_may_rst) > =A0SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, icmp_may_rst, CTLFLAG_RW, > =A0 =A0 &VNET_NAME(icmp_may_rst), 0, > =A0 =A0 "Certain ICMP unreachable messages may abort connections in SYN_S= ENT"); > > -static VNET_DEFINE(int, tcp_isn_reseed_interval) =3D 0; > +STATIC_VNET_DEFINE(int, tcp_isn_reseed_interval) =3D 0; > =A0#define =A0 =A0 =A0 =A0V_tcp_isn_reseed_interval =A0 =A0 =A0 VNET(tcp_= isn_reseed_interval) > =A0SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, isn_reseed_interval, CTLFLAG_= RW, > =A0 =A0 &VNET_NAME(tcp_isn_reseed_interval), 0, > @@ -241,7 +241,7 @@ struct tcpcb_mem { > =A0 =A0 =A0 =A0struct cc_var =A0 =A0 =A0 =A0 =A0 ccv; > =A0}; > > -static VNET_DEFINE(uma_zone_t, tcpcb_zone); > +STATIC_VNET_DEFINE(uma_zone_t, tcpcb_zone); > =A0#define =A0 =A0 =A0 =A0V_tcpcb_zone =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0VNET(tcpcb_zone) > > =A0MALLOC_DEFINE(M_TCPLOG, "tcplog", "TCP address and flags print buffers= "); > @@ -1453,10 +1453,10 @@ tcp6_ctlinput(int cmd, struct sockaddr * > =A0#define ISN_STATIC_INCREMENT 4096 > =A0#define ISN_RANDOM_INCREMENT (4096 - 1) > > -static VNET_DEFINE(u_char, isn_secret[32]); > -static VNET_DEFINE(int, isn_last_reseed); > -static VNET_DEFINE(u_int32_t, isn_offset); > -static VNET_DEFINE(u_int32_t, isn_offset_old); > +STATIC_VNET_DEFINE(u_char, isn_secret[32]); > +STATIC_VNET_DEFINE(int, isn_last_reseed); > +STATIC_VNET_DEFINE(u_int32_t, isn_offset); > +STATIC_VNET_DEFINE(u_int32_t, isn_offset_old); > > =A0#define =A0 =A0 =A0 =A0V_isn_secret =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0VNET(isn_secret) > =A0#define =A0 =A0 =A0 =A0V_isn_last_reseed =A0 =A0 =A0 =A0 =A0 =A0 =A0 V= NET(isn_last_reseed) > > Modified: head/sys/netinet/tcp_syncache.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/tcp_syncache.c =A0 =A0 Sun Nov 14 20:23:02 2010 =A0 = =A0 =A0 =A0(r215316) > +++ head/sys/netinet/tcp_syncache.c =A0 =A0 Sun Nov 14 20:38:11 2010 =A0 = =A0 =A0 =A0(r215317) > @@ -97,13 +97,13 @@ __FBSDID("$FreeBSD$"); > > =A0#include > > -static VNET_DEFINE(int, tcp_syncookies) =3D 1; > +STATIC_VNET_DEFINE(int, tcp_syncookies) =3D 1; > =A0#define =A0 =A0 =A0 =A0V_tcp_syncookies =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0VNET(tcp_syncookies) > =A0SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, syncookies, CTLFLAG_RW, > =A0 =A0 &VNET_NAME(tcp_syncookies), 0, > =A0 =A0 "Use TCP SYN cookies if the syncache overflows"); > > -static VNET_DEFINE(int, tcp_syncookiesonly) =3D 0; > +STATIC_VNET_DEFINE(int, tcp_syncookiesonly) =3D 0; > =A0#define =A0 =A0 =A0 =A0V_tcp_syncookiesonly =A0 =A0 =A0 =A0 =A0 =A0VNE= T(tcp_syncookiesonly) > =A0SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, syncookies_only, CTLFLAG_RW, > =A0 =A0 &VNET_NAME(tcp_syncookiesonly), 0, > @@ -143,7 +143,7 @@ static struct syncache > =A0#define TCP_SYNCACHE_HASHSIZE =A0 =A0 =A0 =A0 =A0512 > =A0#define TCP_SYNCACHE_BUCKETLIMIT =A0 =A0 =A0 30 > > -static VNET_DEFINE(struct tcp_syncache, tcp_syncache); > +STATIC_VNET_DEFINE(struct tcp_syncache, tcp_syncache); > =A0#define =A0 =A0 =A0 =A0V_tcp_syncache =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0VNET(tcp_syncache) > > =A0SYSCTL_NODE(_net_inet_tcp, OID_AUTO, syncache, CTLFLAG_RW, 0, "TCP SYN= cache"); > > Modified: head/sys/netinet/tcp_timewait.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/tcp_timewait.c =A0 =A0 Sun Nov 14 20:23:02 2010 =A0 = =A0 =A0 =A0(r215316) > +++ head/sys/netinet/tcp_timewait.c =A0 =A0 Sun Nov 14 20:38:11 2010 =A0 = =A0 =A0 =A0(r215317) > @@ -92,7 +92,7 @@ __FBSDID("$FreeBSD$"); > > =A0#include > > -static VNET_DEFINE(uma_zone_t, tcptw_zone); > +STATIC_VNET_DEFINE(uma_zone_t, tcptw_zone); > =A0#define =A0 =A0 =A0 =A0V_tcptw_zone =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0VNET(tcptw_zone) > =A0static int =A0 =A0 maxtcptw; > > @@ -102,7 +102,7 @@ static int =A0maxtcptw; > =A0* queue pointers in each tcptw structure, are protected using the glob= al > =A0* tcbinfo lock, which must be held over queue iteration and modificati= on. > =A0*/ > -static VNET_DEFINE(TAILQ_HEAD(, tcptw), twq_2msl); > +STATIC_VNET_DEFINE(TAILQ_HEAD(, tcptw), twq_2msl); > =A0#define =A0 =A0 =A0 =A0V_twq_2msl =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0VNET(twq_2msl) > > =A0static void =A0 =A0tcp_tw_2msl_reset(struct tcptw *, int); > > Modified: head/sys/netinet/udp_usrreq.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/udp_usrreq.c =A0 =A0 =A0 Sun Nov 14 20:23:02 2010 = =A0 =A0 =A0 =A0(r215316) > +++ head/sys/netinet/udp_usrreq.c =A0 =A0 =A0 Sun Nov 14 20:38:11 2010 = =A0 =A0 =A0 =A0(r215317) > @@ -131,7 +131,7 @@ SYSCTL_ULONG(_net_inet_udp, UDPCTL_RECVS > > =A0VNET_DEFINE(struct inpcbhead, udb); =A0 =A0 =A0 =A0 =A0 =A0/* from udp= _var.h */ > =A0VNET_DEFINE(struct inpcbinfo, udbinfo); > -static VNET_DEFINE(uma_zone_t, udpcb_zone); > +STATIC_VNET_DEFINE(uma_zone_t, udpcb_zone); > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 21:45:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97DC61065672; Sun, 14 Nov 2010 21:45:59 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 11A6D8FC15; Sun, 14 Nov 2010 21:45:58 +0000 (UTC) Received: by gxk9 with SMTP id 9so2809520gxk.13 for ; Sun, 14 Nov 2010 13:45:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=tdfqNNfZ/G7WO+YOmVXVdqdAb8eWEnuT8Hk6Tguye74=; b=hmEGpAAwgdrR8AAxY075yhHt3+XEugS+bNFr1kjqFqLVigowxusRH8G3liPoKkz+Sd JiOB+0Dgd/v+s1si0tC3HYgDQQOFqlvX+nRkGsVdB1ClyPMNK9+zf73o9J/Dz3h7PkCD WR/cvTmpO/8AimHyVSDB4KIMx5CXqjbA5gBI0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=jT9U0aMqP0PPUdcFD1+/e+jYMJmr7rApA6F3iwnInBUxUQvaengKo6HP+qROXGk8V6 P08edhtjLgkfyXwaA3LzZOXiGlzUoUcQ/DLFFGRjIZjJfh9KCBiyTXVvYpbPXICLlzxo gdJcoTrzq2Ll0yV4j1NJEUuNSPNu5E2VcnF5c= Received: by 10.100.174.5 with SMTP id w5mr3748415ane.28.1289771157405; Sun, 14 Nov 2010 13:45:57 -0800 (PST) Received: from localhost ([95.65.58.105]) by mx.google.com with ESMTPS id g18sm2945850anh.18.2010.11.14.13.45.51 (version=SSLv3 cipher=RC4-MD5); Sun, 14 Nov 2010 13:45:56 -0800 (PST) From: Anonymous To: Kostik Belousov References: <201011141824.oAEIOCtN089920@svn.freebsd.org> <86wrofob4q.fsf@gmail.com> <20101114213749.GW2392@deviant.kiev.zoral.com.ua> Date: Mon, 15 Nov 2010 00:45:11 +0300 In-Reply-To: <20101114213749.GW2392@deviant.kiev.zoral.com.ua> (Kostik Belousov's message of "Sun, 14 Nov 2010 23:37:49 +0200") Message-ID: <86wrofmvfc.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, freebsd-ports@freebsd.org Subject: Re: svn commit: r215309 - in head/sys: amd64/amd64 i386/i386 sys vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 21:45:59 -0000 Kostik Belousov writes: > On Mon, Nov 15, 2010 at 12:20:37AM +0300, Anonymous wrote: >> Konstantin Belousov writes: >> >> > Author: kib >> > Date: Sun Nov 14 18:24:12 2010 >> > New Revision: 215309 >> > URL: http://svn.freebsd.org/changeset/base/215309 >> > >> > Log: >> > Use symbolic names instead of hardcoding values for magic p_osrel constants. >> > >> > MFC after: 1 week >> [...] >> > Modified: head/sys/sys/param.h >> > ============================================================================== >> > --- head/sys/sys/param.h Sun Nov 14 18:05:03 2010 (r215308) >> > +++ head/sys/sys/param.h Sun Nov 14 18:24:12 2010 (r215309) >> > @@ -60,6 +60,11 @@ >> > #undef __FreeBSD_version >> > #define __FreeBSD_version 900025 /* Master, propagated to newvers */ >> > >> > +#ifdef _KERNEL >> > +#define __FreeBSD_version_SIGSEGV 700004 >> > +#define __FreeBSD_version_MAP_ANON 800104 >> > +#endif >> > + >> >> This breaks bsd.port.mk regexp to determine OSVERSION. [...] >> >> $ make -C devel/libpthread-stubs >> "Makefile", line 26: warning: String comparison operator should be either == or != >> "Makefile", line 26: Malformed conditional (${OSVERSION} < 700000) >> "Makefile", line 28: if-less endif >> "/usr/ports/Mk/bsd.port.mk", line 1739: warning: String comparison operator should be either == or != >> "/usr/ports/Mk/bsd.port.mk", line 1739: Malformed conditional (defined(USE_XZ) && ( (${OSVERSION} >= 900000 && ${OSVERSION} < 900012) || ${OSVERSION} < 800505 )) >> "/usr/ports/Mk/bsd.port.mk", line 6394: if-less endif >> make: fatal errors encountered -- cannot continue [...] > I think it is better to select different namespace for the special versions. > Can you confirm that the following patch fixes the ports mk for you ? > It is enough to cd /usr/src/include && make install after patching. [...] > diff --git a/sys/sys/param.h b/sys/sys/param.h > index 3e4cdf6..ea90308 100644 > --- a/sys/sys/param.h > +++ b/sys/sys/param.h > @@ -61,8 +61,8 @@ > #define __FreeBSD_version 900025 /* Master, propagated to newvers */ > > #ifdef _KERNEL > -#define __FreeBSD_version_SIGSEGV 700004 > -#define __FreeBSD_version_MAP_ANON 800104 > +#define P_OSREL_SIGSEGV 700004 > +#define P_OSREL_MAP_ANON 800104 > #endif Yep, it does fix. From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 21:49:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46C0A1065672; Sun, 14 Nov 2010 21:49:40 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 016458FC16; Sun, 14 Nov 2010 21:49:40 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:20d4:5ad4:8ef9:2ce4] (unknown [IPv6:2001:7b8:3a7:0:20d4:5ad4:8ef9:2ce4]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 258F85C43; Sun, 14 Nov 2010 22:49:39 +0100 (CET) Message-ID: <4CE0597A.300@FreeBSD.org> Date: Sun, 14 Nov 2010 22:49:46 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.13pre) Gecko/20101113 Lanikai/3.1.7pre MIME-Version: 1.0 To: mdf@FreeBSD.org References: <201011142038.oAEKcB9M093130@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215317 - in head/sys: kern mips/mips mips/rmi net netgraph netinet netinet/ipfw netinet6 netipsec powerpc/aim powerpc/booke X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 21:49:40 -0000 On 2010-11-14 22:13, mdf@FreeBSD.org wrote: > If "static DPCPU_DEFINE" and "STATIC_DPCPU_DEFINE" are the same thing, > it seems backwards to prefer the macro over the C code. Is there a > difference? After a follow-up commit, r215318, they are different. This is because the macro then inserts __asm__(".globl") statements just before the actual definition of the variable, which was not possible before. E.g.: static __asm__(".globl foo") int bar; would not compile. From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 21:59:12 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61E5D106566C; Sun, 14 Nov 2010 21:59:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 35CAF8FC14; Sun, 14 Nov 2010 21:59:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAELxCgf095040; Sun, 14 Nov 2010 21:59:12 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAELxCMc095034; Sun, 14 Nov 2010 21:59:12 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201011142159.oAELxCMc095034@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 14 Nov 2010 21:59:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215321 - in head/sys: amd64/amd64 i386/i386 sys vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 21:59:12 -0000 Author: kib Date: Sun Nov 14 21:59:11 2010 New Revision: 215321 URL: http://svn.freebsd.org/changeset/base/215321 Log: Do not use __FreeBSD_version prefix for the special osrel version. The ports/Mk/bsd.port.mk uses sys/param.h to fetch osrel, and cannot grok several constants with the prefix. Reported and tested by: swell.k gmail com MFC after: 1 week Modified: head/sys/amd64/amd64/trap.c head/sys/i386/i386/trap.c head/sys/sys/param.h head/sys/vm/vm_mmap.c Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Sun Nov 14 20:47:30 2010 (r215320) +++ head/sys/amd64/amd64/trap.c Sun Nov 14 21:59:11 2010 (r215321) @@ -416,8 +416,7 @@ trap(struct trapframe *frame) * without the ABI-tag ELF note. */ if (SV_CURPROC_ABI() == SV_ABI_FREEBSD - && p->p_osrel >= - __FreeBSD_version_SIGSEGV) { + && p->p_osrel >= P_OSREL_SIGSEGV) { i = SIGSEGV; ucode = SEGV_ACCERR; } else { Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Sun Nov 14 20:47:30 2010 (r215320) +++ head/sys/i386/i386/trap.c Sun Nov 14 21:59:11 2010 (r215321) @@ -462,8 +462,7 @@ trap(struct trapframe *frame) * without the ABI-tag ELF note. */ if (SV_CURPROC_ABI() == SV_ABI_FREEBSD - && p->p_osrel >= - __FreeBSD_version_SIGSEGV) { + && p->p_osrel >= P_OSREL_SIGSEGV) { i = SIGSEGV; ucode = SEGV_ACCERR; } else { Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sun Nov 14 20:47:30 2010 (r215320) +++ head/sys/sys/param.h Sun Nov 14 21:59:11 2010 (r215321) @@ -61,8 +61,8 @@ #define __FreeBSD_version 900025 /* Master, propagated to newvers */ #ifdef _KERNEL -#define __FreeBSD_version_SIGSEGV 700004 -#define __FreeBSD_version_MAP_ANON 800104 +#define P_OSREL_SIGSEGV 700004 +#define P_OSREL_MAP_ANON 800104 #endif #ifndef LOCORE Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Sun Nov 14 20:47:30 2010 (r215320) +++ head/sys/vm/vm_mmap.c Sun Nov 14 21:59:11 2010 (r215321) @@ -232,7 +232,7 @@ mmap(td, uap) /* Make sure mapping fits into numeric range, etc. */ if ((uap->len == 0 && !SV_CURPROC_FLAG(SV_AOUT) && - curproc->p_osrel >= __FreeBSD_version_MAP_ANON) || + curproc->p_osrel >= P_OSREL_MAP_ANON) || ((flags & MAP_ANON) && (uap->fd != -1 || pos != 0))) return (EINVAL); From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 22:08:56 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCE4B106566B; Sun, 14 Nov 2010 22:08:56 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BB6B68FC1B; Sun, 14 Nov 2010 22:08:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEM8uFd095336; Sun, 14 Nov 2010 22:08:56 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEM8uin095334; Sun, 14 Nov 2010 22:08:56 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201011142208.oAEM8uin095334@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Sun, 14 Nov 2010 22:08:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215322 - head/share/man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 22:08:56 -0000 Author: gonzo Date: Sun Nov 14 22:08:56 2010 New Revision: 215322 URL: http://svn.freebsd.org/changeset/base/215322 Log: Regenerate src.conf manpage after adding WITHOUT_GPIO build knob Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Sun Nov 14 21:59:11 2010 (r215321) +++ head/share/man/man5/src.conf.5 Sun Nov 14 22:08:56 2010 (r215322) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 188848 2009-02-20 11:09:55Z mtm .\" $FreeBSD$ -.Dd August 25, 2010 +.Dd November 14, 2010 .Dt SRC.CONF 5 .Os .Sh NAME @@ -355,6 +355,9 @@ Set to build some programs without optio .It Va WITHOUT_GPIB .\" from FreeBSD: head/tools/build/options/WITHOUT_GPIB 156932 2006-03-21 07:50:50Z ru Set to not build GPIB bus support. +.It Va WITH_GPIO +.\" from FreeBSD: head/tools/build/options/WITH_GPIO 213463 2010-10-05 22:26:01Z gonzo +Set to build gpioctl(8) as part of the base system. .It Va WITHOUT_GROFF .\" from FreeBSD: head/tools/build/options/WITHOUT_GROFF 156932 2006-03-21 07:50:50Z ru Set to not build From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 22:14:36 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C33BA106564A; Sun, 14 Nov 2010 22:14:36 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B1F818FC19; Sun, 14 Nov 2010 22:14:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEMEaiE095498; Sun, 14 Nov 2010 22:14:36 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEMEagR095496; Sun, 14 Nov 2010 22:14:36 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201011142214.oAEMEagR095496@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Sun, 14 Nov 2010 22:14:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215323 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 22:14:36 -0000 Author: gonzo Date: Sun Nov 14 22:14:36 2010 New Revision: 215323 URL: http://svn.freebsd.org/changeset/base/215323 Log: Add optional files controlled by WITH_GPIO knob Submitted by: Alexander Best Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 14 22:08:56 2010 (r215322) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 14 22:14:36 2010 (r215323) @@ -808,6 +808,11 @@ OLD_FILES+=usr/lib32/libgpib_p.a .endif .endif +.if ${MK_GPIO} == no +OLD_FILES+=usr/sbin/gpioctl +OLD_FILES+=usr/share/man/man8/gpioctl.8.gz +.endif + .if ${MK_GSSAPI} == no OLD_FILES+=usr/lib/libgssapi.a OLD_FILES+=usr/lib/libgssapi.so From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 22:17:12 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBCBB1065672; Sun, 14 Nov 2010 22:17:12 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BACCD8FC1C; Sun, 14 Nov 2010 22:17:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEMHCfJ095588; Sun, 14 Nov 2010 22:17:12 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEMHCWT095586; Sun, 14 Nov 2010 22:17:12 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201011142217.oAEMHCWT095586@svn.freebsd.org> From: Dimitry Andric Date: Sun, 14 Nov 2010 22:17:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215324 - head/lib/clang X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 22:17:12 -0000 Author: dim Date: Sun Nov 14 22:17:12 2010 New Revision: 215324 URL: http://svn.freebsd.org/changeset/base/215324 Log: Don't use -fno-exceptions or -fno-rtti for .c files, when building llvm/clang. Modified: head/lib/clang/clang.build.mk Modified: head/lib/clang/clang.build.mk ============================================================================== --- head/lib/clang/clang.build.mk Sun Nov 14 22:14:36 2010 (r215323) +++ head/lib/clang/clang.build.mk Sun Nov 14 22:17:12 2010 (r215324) @@ -18,14 +18,14 @@ TARGET_ARCH?= ${MACHINE_ARCH} CFLAGS+=-DLLVM_HOSTTRIPLE=\"${TARGET_ARCH}-undermydesk-freebsd9.0\" .ifndef LLVM_REQUIRES_EH -CFLAGS+=-fno-exceptions +CXXFLAGS+=-fno-exceptions .else # If the library or program requires EH, it also requires RTTI. LLVM_REQUIRES_RTTI= .endif .ifndef LLVM_REQUIRES_RTTI -CFLAGS+=-fno-rtti +CXXFLAGS+=-fno-rtti .endif .ifdef TOOLS_PREFIX From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 22:34:34 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F738106564A; Sun, 14 Nov 2010 22:34:34 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3DDBC8FC14; Sun, 14 Nov 2010 22:34:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEMYYil096007; Sun, 14 Nov 2010 22:34:34 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEMYYhu096005; Sun, 14 Nov 2010 22:34:34 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011142234.oAEMYYhu096005@svn.freebsd.org> From: Marius Strobl Date: Sun, 14 Nov 2010 22:34:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215325 - head/sys/dev/mpt X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 22:34:34 -0000 Author: marius Date: Sun Nov 14 22:34:33 2010 New Revision: 215325 URL: http://svn.freebsd.org/changeset/base/215325 Log: Use the correct variable for determining the verbosity level in mpt_lprtc(). While at it, fix the whitespace of that macro. PR: 149502 Submitted by: Andrew Boyer MFC after: 1 week Modified: head/sys/dev/mpt/mpt.h Modified: head/sys/dev/mpt/mpt.h ============================================================================== --- head/sys/dev/mpt/mpt.h Sun Nov 14 22:17:12 2010 (r215324) +++ head/sys/dev/mpt/mpt.h Sun Nov 14 22:34:33 2010 (r215325) @@ -1112,10 +1112,10 @@ do { \ mpt_prt(mpt, __VA_ARGS__); \ } while (0) -#define mpt_lprtc(mpt, level, ...) \ -do { \ - if (level <= (mpt)->debug_level) \ - mpt_prtc(mpt, __VA_ARGS__); \ +#define mpt_lprtc(mpt, level, ...) \ +do { \ + if (level <= (mpt)->verbose) \ + mpt_prtc(mpt, __VA_ARGS__); \ } while (0) #else void mpt_lprt(struct mpt_softc *, int, const char *, ...) From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 23:00:49 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 867DC1065670; Sun, 14 Nov 2010 23:00:49 +0000 (UTC) Date: Sun, 14 Nov 2010 23:00:49 +0000 From: Alexander Best To: Bruce Cran Message-ID: <20101114230049.GA23041@freebsd.org> References: <201011141724.oAEHOFY8088453@svn.freebsd.org> <20101114175314.GA72802@freebsd.org> <201011141905.25634.bruce@cran.org.uk> <20101114192821.GA83707@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101114192821.GA83707@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Cran Subject: Re: svn commit: r215306 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 23:00:49 -0000 On Sun Nov 14 10, Alexander Best wrote: > On Sun Nov 14 10, Bruce Cran wrote: > > On Sunday 14 November 2010 17:53:14 Alexander Best wrote: > > > > > while you're at it, could you add the following after MK_BOOT? > > > > > > #.if ${MK_BSNMP} == no > > > # to be filled in > > > #.endif > > > > > > i'll try to run two buildworld instances two see which files are being > > > affected by WITHOUT_BSNMP. > > > > It might make more sense to just leave it until we know which files to remove. > > you're right. a lot of options need imporovement actually. i'll get back to you > on that one. ;) > > however the following should take care of *_GPIO: just committed by gonzo@. ;) cheers. alex > > .if ${MK_GPIO} == no > OLD_FILES+=usr/sbin/gpioctl > OLD_FILES+=usr/share/man/man8/gpioctl.8.gz > .endif > > along with src.conf needing regeneration. > > cheers. > alex > > > > > -- > > Bruce Cran > > -- > a13x -- a13x From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 23:05:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 224AC1065675; Sun, 14 Nov 2010 23:05:58 +0000 (UTC) (envelope-from dd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC3818FC14; Sun, 14 Nov 2010 23:05:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEN5vP9096753; Sun, 14 Nov 2010 23:05:57 GMT (envelope-from dd@svn.freebsd.org) Received: (from dd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEN5vFS096750; Sun, 14 Nov 2010 23:05:57 GMT (envelope-from dd@svn.freebsd.org) Message-Id: <201011142305.oAEN5vFS096750@svn.freebsd.org> From: Dima Dorfman Date: Sun, 14 Nov 2010 23:05:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215326 - in head/sys/dev/usb: . serial X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 23:05:58 -0000 Author: dd Date: Sun Nov 14 23:05:57 2010 New Revision: 215326 URL: http://svn.freebsd.org/changeset/base/215326 Log: Add a special INIT product ID used by some models of the HUAWEI K3765 datacard. After ejecting this device, it reappears using the normal K3765 ID. It does not switch automatically Reviewed by: n_hibma Obtained from: OpenBSD MFC after: 2 weeks Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Sun Nov 14 22:34:33 2010 (r215325) +++ head/sys/dev/usb/serial/u3g.c Sun Nov 14 23:05:57 2010 (r215326) @@ -288,6 +288,7 @@ static const struct usb_device_id u3g_de U3G_DEV(HUAWEI, MOBILE, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E1752, U3GINIT_HUAWEISCSI), U3G_DEV(HUAWEI, K3765, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, K3765_INIT, U3GINIT_HUAWEISCSI), U3G_DEV(KYOCERA2, CDMA_MSM_K, 0), U3G_DEV(KYOCERA2, KPC680, 0), U3G_DEV(LONGCHEER, WM66, U3GINIT_HUAWEI), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sun Nov 14 22:34:33 2010 (r215325) +++ head/sys/dev/usb/usbdevs Sun Nov 14 23:05:57 2010 (r215326) @@ -1857,6 +1857,7 @@ product HUAWEI E143F 0x143f 3G modem product HUAWEI E1752 0x1446 3G modem product HUAWEI K3765 0x1465 3G modem product HUAWEI E14AC 0x14ac 3G modem +product HUAWEI K3765_INIT 0x1520 HUAWEI Mobile K3765 Initial /* HUAWEI 3com products */ product HUAWEI3COM WUB320G 0x0009 Aolynk WUB320g From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 23:07:02 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89B3A106564A; Sun, 14 Nov 2010 23:07:02 +0000 (UTC) (envelope-from gavin@ury.york.ac.uk) Received: from ixe-mta-27.emailfiltering.com (ixe-mta-27-tx.emailfiltering.com [194.116.199.158]) by mx1.freebsd.org (Postfix) with ESMTP id 97FA58FC08; Sun, 14 Nov 2010 23:07:00 +0000 (UTC) Received: from mail-gw14.york.ac.uk ([144.32.129.164]) by ixe-mta-27.emailfiltering.com with emfmta (version 4.6.0.72) by TLS id 820039482 for ed@FreeBSD.org;2bfdefeaec0891c3; Sun, 14 Nov 2010 23:07:00 +0000 Received: from ury.york.ac.uk ([144.32.108.81]:55922) by mail-gw14.york.ac.uk with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1PHlf1-0007UD-DC; Sun, 14 Nov 2010 23:06:59 +0000 Received: from gavin (helo=localhost) by ury.york.ac.uk with local-esmtp (Exim 4.72) (envelope-from ) id 1PHlf1-00049q-4r; Sun, 14 Nov 2010 23:06:59 +0000 Date: Sun, 14 Nov 2010 23:06:59 +0000 (GMT) From: Gavin Atkinson X-X-Sender: gavin@ury.york.ac.uk To: Ed Schouten In-Reply-To: <201011141842.oAEIgdqL090361@svn.freebsd.org> Message-ID: References: <201011141842.oAEIgdqL090361@svn.freebsd.org> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215310 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 23:07:02 -0000 On Sun, 14 Nov 2010, Ed Schouten wrote: > Author: ed > Date: Sun Nov 14 18:42:39 2010 > New Revision: 215310 > URL: http://svn.freebsd.org/changeset/base/215310 > > Log: > Always set errno to a sane value when pututxline(3) fails. > > For example, it will now return ESRCH when trying to replace a > nonexistent entry with DEAD_PROCESS. > > Modified: > head/lib/libc/gen/pututxline.c > > Modified: head/lib/libc/gen/pututxline.c > ============================================================================== > --- head/lib/libc/gen/pututxline.c Sun Nov 14 18:24:12 2010 (r215309) > +++ head/lib/libc/gen/pututxline.c Sun Nov 14 18:42:39 2010 (r215310) > @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -53,6 +54,7 @@ futx_open(const char *file) > /* Safety check: never use broken files. */ > if (_fstat(fd, &sb) != -1 && sb.st_size % sizeof(struct futx) != 0) { > _close(fd); > + errno = EINVAL; > return (NULL); > } setutxdb(3) returns EFTYPE here, for the same error. Should this be the same? > > @@ -142,6 +144,7 @@ utx_active_remove(struct futx *fu) > } > > fclose(fp); > + errno = ESRCH; > return (1); > } These possible errors should probably also now be documented in pututxline(3). Gavin From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 23:07:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58944106564A; Sun, 14 Nov 2010 23:07:08 +0000 (UTC) (envelope-from gavin@ury.york.ac.uk) Received: from ixe-mta-27.emailfiltering.com (ixe-mta-27-tx.emailfiltering.com [194.116.199.158]) by mx1.freebsd.org (Postfix) with ESMTP id 499848FC16; Sun, 14 Nov 2010 23:07:07 +0000 (UTC) Received: from mail-gw12.york.ac.uk ([144.32.129.162]) by ixe-mta-27.emailfiltering.com with emfmta (version 4.6.0.72) by TLS id 820036414 for thompsa@FreeBSD.org; 9523c0c76ff0152c; Sun, 14 Nov 2010 22:56:08 +0000 Received: from ury.york.ac.uk ([144.32.108.81]:56297) by mail-gw12.york.ac.uk with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1PHlUW-0001Qs-2I; Sun, 14 Nov 2010 22:56:08 +0000 Received: from gavin (helo=localhost) by ury.york.ac.uk with local-esmtp (Exim 4.72) (envelope-from ) id 1PHlUV-00048P-RR; Sun, 14 Nov 2010 22:56:07 +0000 Date: Sun, 14 Nov 2010 22:56:07 +0000 (GMT) From: Gavin Atkinson X-X-Sender: gavin@ury.york.ac.uk To: Andrew Thompson In-Reply-To: <201011142041.oAEKfN6Y093321@svn.freebsd.org> Message-ID: References: <201011142041.oAEKfN6Y093321@svn.freebsd.org> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215319 - head/sys/arm/xscale/ixp425 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 23:07:08 -0000 On Sun, 14 Nov 2010, Andrew Thompson wrote: > Author: thompsa > Date: Sun Nov 14 20:41:22 2010 > New Revision: 215319 > URL: http://svn.freebsd.org/changeset/base/215319 > > Log: > Provide a mutex around the read/modify/write of the IXP425_GPIO_* > registers. Giant was used in some places, but not all. I believe this should fix my PR arm/134338, but don't have the bandwidth at the moment to verify that. Is there any chance you could see if you believe the same? Thanks, Gavin From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 23:13:27 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF325106566C; Sun, 14 Nov 2010 23:13:27 +0000 (UTC) (envelope-from gavin@ury.york.ac.uk) Received: from gse-mta-27.emailfiltering.com (gse-mta-27-tx.emailfiltering.com [194.116.198.158]) by mx1.freebsd.org (Postfix) with ESMTP id EDFFA8FC0A; Sun, 14 Nov 2010 23:13:26 +0000 (UTC) Received: from mail-gw13.york.ac.uk ([144.32.129.163]) by gse-mta-27.emailfiltering.com with emfmta (version 4.6.0.72) by TLS id 810217688 for marius@FreeBSD.org; 6ae18208c040f1d1; Sun, 14 Nov 2010 23:13:25 +0000 Received: from ury.york.ac.uk ([144.32.108.81]:45033) by mail-gw13.york.ac.uk with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1PHllE-0004I9-RV; Sun, 14 Nov 2010 23:13:24 +0000 Received: from gavin (helo=localhost) by ury.york.ac.uk with local-esmtp (Exim 4.72) (envelope-from ) id 1PHllE-0004B7-K5; Sun, 14 Nov 2010 23:13:24 +0000 Date: Sun, 14 Nov 2010 23:13:24 +0000 (GMT) From: Gavin Atkinson X-X-Sender: gavin@ury.york.ac.uk To: Marius Strobl In-Reply-To: <201011141309.oAED9Xcv082719@svn.freebsd.org> Message-ID: References: <201011141309.oAED9Xcv082719@svn.freebsd.org> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215295 - head/sys/opencrypto X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 23:13:27 -0000 On Sun, 14 Nov 2010, Marius Strobl wrote: > Author: marius > Date: Sun Nov 14 13:09:32 2010 > New Revision: 215295 > URL: http://svn.freebsd.org/changeset/base/215295 > > Log: > Let cryptosoft(4) add its pseudo-device with a specific unit number and its > probe method return BUS_PROBE_NOWILDCARD so it doesn't get attached to real > devices hanging off of nexus(4) with no specific devclass set. Actually, the > more desirable fix for this would be to get rid of the newbus interface of > cryptosoft(4) altogether but apparently crypto(9) was written with support > for cryptographic hardware in mind so that approach would require some KPI > breaking changes which don't seem worth it. I'm guessing this fixes kern/132129 and kern/136123? Thanks, Gavin From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 23:15:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C6D3106566B; Sun, 14 Nov 2010 23:15:29 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 95B178FC19; Sun, 14 Nov 2010 23:15:28 +0000 (UTC) Received: by wyb36 with SMTP id 36so1957546wyb.13 for ; Sun, 14 Nov 2010 15:15:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=YB32VYogyHA9YUdDFInEiSNegR+Wipl5gaZTCgXoh/w=; b=ujnuBYTko3jXu9L4oXf3m2bUgwTFrGKxYZy0eXj2I181DpG9avvgnzZdCPh3h61NUe a0vghwfLzVZG7j0qgShepaXXcCdD0/rml+XrMv5Vm8Xz2q9SZCWQ+mdEFWD4U9Y9BTBm 1sNTvUpyvYrh0oA87p9p03AAo9m04CL2cYLWA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=A3yWs9VBT3tixDPPLEl2wQzvrxC6UbEF5yh/T7m6mDpXMoplUQBrk3qko9nQiH24Ko 6Co7mCOLhqmtRZcuOasa+ciibJI3PLPqOJY+P4dOMu433m2/hodOsMQzfJk1yS3lHwba xT2PH95f23zDXQiMF+Iwj5qry4C/0fXbVxNjU= MIME-Version: 1.0 Received: by 10.216.7.210 with SMTP id 60mr6585535wep.30.1289776527350; Sun, 14 Nov 2010 15:15:27 -0800 (PST) Sender: yanegomi@gmail.com Received: by 10.216.198.27 with HTTP; Sun, 14 Nov 2010 15:15:27 -0800 (PST) In-Reply-To: References: <201011141842.oAEIgdqL090361@svn.freebsd.org> Date: Sun, 14 Nov 2010 15:15:27 -0800 X-Google-Sender-Auth: T_jtEs22wMTU5pKjxlbtx6oAiCM Message-ID: From: Garrett Cooper To: Gavin Atkinson Content-Type: multipart/mixed; boundary=0016364c7576c09e0404950b7fbf Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ed Schouten Subject: Re: svn commit: r215310 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 23:15:30 -0000 --0016364c7576c09e0404950b7fbf Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Sun, Nov 14, 2010 at 3:06 PM, Gavin Atkinson wrote: > On Sun, 14 Nov 2010, Ed Schouten wrote: >> Author: ed >> Date: Sun Nov 14 18:42:39 2010 >> New Revision: 215310 >> URL: http://svn.freebsd.org/changeset/base/215310 >> >> Log: >> =A0 Always set errno to a sane value when pututxline(3) fails. >> >> =A0 For example, it will now return ESRCH when trying to replace a >> =A0 nonexistent entry with DEAD_PROCESS. >> >> Modified: >> =A0 head/lib/libc/gen/pututxline.c >> >> Modified: head/lib/libc/gen/pututxline.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/lib/libc/gen/pututxline.c =A0 =A0Sun Nov 14 18:24:12 2010 =A0 = =A0 =A0 =A0(r215309) >> +++ head/lib/libc/gen/pututxline.c =A0 =A0Sun Nov 14 18:42:39 2010 =A0 = =A0 =A0 =A0(r215310) >> @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); >> =A0#include >> =A0#include >> =A0#include >> +#include >> =A0#include >> =A0#include >> =A0#include >> @@ -53,6 +54,7 @@ futx_open(const char *file) >> =A0 =A0 =A0 /* Safety check: never use broken files. */ >> =A0 =A0 =A0 if (_fstat(fd, &sb) !=3D -1 && sb.st_size % sizeof(struct fu= tx) !=3D 0) { >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 _close(fd); >> + =A0 =A0 =A0 =A0 =A0 =A0 errno =3D EINVAL; >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 return (NULL); >> =A0 =A0 =A0 } > > setutxdb(3) returns EFTYPE here, for the same error. =A0Should this be th= e > same? > >> >> @@ -142,6 +144,7 @@ utx_active_remove(struct futx *fu) >> =A0 =A0 =A0 } >> >> =A0 =A0 =A0 fclose(fp); >> + =A0 =A0 errno =3D ESRCH; >> =A0 =A0 =A0 return (1); >> =A0} > > These possible errors should probably also now be documented in > pututxline(3). I submitted another patch earlier to Ed that does this and a bit more (attached). He was going to take a look at the patch and get back to me (and I CCed Bruce Evans for additional comments), but please feel free to chime in :). Thanks, -Garrett --0016364c7576c09e0404950b7fbf Content-Type: text/x-patch; charset=US-ASCII; name="utx-changes-2.patch" Content-Disposition: attachment; filename="utx-changes-2.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ggijlnzh0 SW5kZXg6IGxpYi9saWJjL2dlbi9nZXR1dHhlbnQuMwo9PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBsaWIvbGliYy9n ZW4vZ2V0dXR4ZW50LjMJKHJldmlzaW9uIDIxNTMxNCkKKysrIGxpYi9saWJjL2dlbi9nZXR1dHhl bnQuMwkod29ya2luZyBjb3B5KQpAQCAtMzY3LDE2ICszNjcsMTUgQEAKIC5EdiBOVUxMCiB3aGVu IHRoZSBwcm92aWRlZAogLlZ0IHV0bXB4Ci1pcyBpbnZhbGlkLgotVGhpcyBtYXkgYmUgYmVjYXVz ZQoraXMgaW52YWxpZCwgb3IKIC5GYSB1dF90eXBlCi1pcyBpbnZhbGlkIG9yCi0uRmEgdXRfdHlw ZQogaGFzIGEgdmFsdWUgb2YKIC5EdiBERUFEX1BST0NFU1MKIGFuZCBhbiBlbnRyeSB3aXRoIGFu IGlkZW50aWZpZXIgd2l0aCBhIHZhbHVlIGVxdWFsIHRvIHRoZSBmaWVsZAogLkZhIHV0X2lkCi13 YXMgbm90IGZvdW5kLgord2FzIG5vdCBmb3VuZDsgdGhlIGdsb2JhbCB2YXJpYWJsZQorLlZhIGVy cm5vCitpcyBzZXQgdG8gaW5kaWNhdGUgdGhlIGVycm9yLgogLlBwCiBUaGUKIC5GbiBzZXR1dHhk YgpAQCAtMzg3LDggKzM4NiwyNiBAQAogaXMgc2V0IHRvIGluZGljYXRlIHRoZSBlcnJvci4KIC5T aCBFUlJPUlMKIEluIGFkZGl0aW9uIHRvIHRoZSBlcnJvciBjb25kaXRpb25zIGRlc2NyaWJlZCBp bgorLlhyIGZkb3BlbiAzICwKIC5YciBmb3BlbiAzICwKKy5YciBmc2VlayAzICwKKy5YciBvcGVu IDMgLAogdGhlCisuRm4gcHV0dXR4bGluZQorZnVuY3Rpb24gY2FuIGdlbmVyYXRlIHRoZSBmb2xs b3dpbmcgZXJyb3JzOgorLkJsIC10YWcgLXdpZHRoIEVyCisuSXQgQnEgRXIgRVNSQ0gKK1RoZSB2 YWx1ZSBvZgorLkZhIHV0X3R5cGUKK2lzIERFQURfUFJPQ0VTUywgYW5kIHRoZSBwcm9jZXNzIGVu dHJ5IGNvdWxkIG5vdCBiZSBmb3VuZC4KKy5JdCBCcSBFciBFSU5WQUwKK1RoZSB2YWx1ZSBvZgor LkZhIHV0X3R5cGUKK2lzIG5vdCBzdXBwb3J0ZWQgYnkgdGhpcyBpbXBsZW1lbnRhdGlvbi4KKy5F bAorSW4gYWRkaXRpb24gdG8gdGhlIGVycm9yIGNvbmRpdGlvbnMgZGVzY3JpYmVkIGluCisuWHIg Zm9wZW4gMyAsCit0aGUKIC5GbiBzZXR1dHhkYgogZnVuY3Rpb24gY2FuIGdlbmVyYXRlIHRoZSBm b2xsb3dpbmcgZXJyb3JzOgogLkJsIC10YWcgLXdpZHRoIEVyCkluZGV4OiBsaWIvbGliYy9nZW4v Z2V0dXR4ZW50LmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PQotLS0gbGliL2xpYmMvZ2VuL2dldHV0eGVudC5jCShyZXZp c2lvbiAyMTUzMTQpCisrKyBsaWIvbGliYy9nZW4vZ2V0dXR4ZW50LmMJKHdvcmtpbmcgY29weSkK QEAgLTExMiwyMiArMTEyLDIyIEBACiAJaWYgKHVkYiA9PSBVVFhEQl9MT0cpIHsKIAkJdWludDE2 X3QgbGVuOwogCi0JCWlmIChmcmVhZCgmbGVuLCBzaXplb2YgbGVuLCAxLCB1ZikgIT0gMSkKKwkJ aWYgKGZyZWFkKCZsZW4sIHNpemVvZihsZW4pLCAxLCB1ZikgIT0gMSkKIAkJCXJldHVybiAoLTEp OwogCQlsZW4gPSBiZTE2dG9oKGxlbik7CiAJCWlmIChsZW4gPiBzaXplb2YgKmZ1KSB7CiAJCQkv KiBGb3J3YXJkIGNvbXBhdGliaWxpdHkuICovCi0JCQlpZiAoZnJlYWQoZnUsIHNpemVvZiAqZnUs IDEsIHVmKSAhPSAxKQorCQkJaWYgKGZyZWFkKGZ1LCBzaXplb2YoKmZ1KSwgMSwgdWYpICE9IDEp CiAJCQkJcmV0dXJuICgtMSk7Ci0JCQlmc2Vlayh1ZiwgbGVuIC0gc2l6ZW9mICpmdSwgU0VFS19D VVIpOworCQkJZnNlZWsodWYsIGxlbiAtIHNpemVvZigqZnUpLCBTRUVLX0NVUik7CiAJCX0gZWxz ZSB7CiAJCQkvKiBQYXJ0aWFsIHJlY29yZC4gKi8KLQkJCW1lbXNldChmdSwgMCwgc2l6ZW9mICpm dSk7CisJCQltZW1zZXQoZnUsIDAsIHNpemVvZigqZnUpKTsKIAkJCWlmIChmcmVhZChmdSwgbGVu LCAxLCB1ZikgIT0gMSkKIAkJCQlyZXR1cm4gKC0xKTsKIAkJfQogCX0gZWxzZSB7Ci0JCWlmIChm cmVhZChmdSwgc2l6ZW9mICpmdSwgMSwgdWYpICE9IDEpCisJCWlmIChmcmVhZChmdSwgc2l6ZW9m KCpmdSksIDEsIHVmKSAhPSAxKQogCQkJcmV0dXJuICgtMSk7CiAJfQogCXJldHVybiAoMCk7CkBA IC0xNjMsNyArMTYzLDggQEAKIAkJCWNhc2UgTE9HSU5fUFJPQ0VTUzoKIAkJCWNhc2UgREVBRF9Q Uk9DRVNTOgogCQkJCWlmIChtZW1jbXAoZnUuZnVfaWQsIGlkLT51dF9pZCwKLQkJCQkgICAgTUlO KHNpemVvZiBmdS5mdV9pZCwgc2l6ZW9mIGlkLT51dF9pZCkpID09IDApCisJCQkJICAgIE1JTihz aXplb2YoZnUuZnVfaWQpLCBzaXplb2YoaWQtPnV0X2lkKSkpID09CisJCQkJICAgIDApCiAJCQkJ CWdvdG8gZm91bmQ7CiAJCQl9CiAJCQlicmVhazsKQEAgLTE5MSw3ICsxOTIsOCBAQAogCQljYXNl IFVTRVJfUFJPQ0VTUzoKIAkJY2FzZSBMT0dJTl9QUk9DRVNTOgogCQkJaWYgKHN0cm5jbXAoZnUu ZnVfbGluZSwgbGluZS0+dXRfbGluZSwKLQkJCSAgICBNSU4oc2l6ZW9mIGZ1LmZ1X2xpbmUsIHNp emVvZiBsaW5lLT51dF9saW5lKSkgPT0gMCkKKwkJCSAgICBNSU4oc2l6ZW9mKGZ1LmZ1X2xpbmUp LCBzaXplb2YobGluZS0+dXRfbGluZSkpKSA9PQorCQkJICAgIDApCiAJCQkJZ290byBmb3VuZDsK IAkJCWJyZWFrOwogCQl9CkBAIC0yMTIsNyArMjE0LDcgQEAKIAogCQlzd2l0Y2ggKGZ1LmZ1X3R5 cGUpIHsKIAkJY2FzZSBVU0VSX1BST0NFU1M6Ci0JCQlpZiAoc3RybmNtcChmdS5mdV91c2VyLCB1 c2VyLCBzaXplb2YgZnUuZnVfdXNlcikgPT0gMCkKKwkJCWlmIChzdHJuY21wKGZ1LmZ1X3VzZXIs IHVzZXIsIHNpemVvZihmdS5mdV91c2VyKSkgPT0gMCkKIAkJCQlnb3RvIGZvdW5kOwogCQkJYnJl YWs7CiAJCX0KSW5kZXg6IGxpYi9saWJjL2dlbi9wdXR1dHhsaW5lLmMKPT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0g bGliL2xpYmMvZ2VuL3B1dHV0eGxpbmUuYwkocmV2aXNpb24gMjE1MzE0KQorKysgbGliL2xpYmMv Z2VuL3B1dHV0eGxpbmUuYwkod29ya2luZyBjb3B5KQpAQCAtNDMsOSArNDMsOSBAQAogc3RhdGlj IEZJTEUgKgogZnV0eF9vcGVuKGNvbnN0IGNoYXIgKmZpbGUpCiB7CisJc3RydWN0IHN0YXQgc2I7 CisJRklMRSAqZnA7CiAJaW50IGZkOwotCUZJTEUgKmZwOwotCXN0cnVjdCBzdGF0IHNiOwogCiAJ ZmQgPSBfb3BlbihmaWxlLCBPX0NSRUFUfE9fUkRXUnxPX0VYTE9DSywgMDY0NCk7CiAJaWYgKGZk IDwgMCkKQEAgLTU0LDcgKzU0LDcgQEAKIAkvKiBTYWZldHkgY2hlY2s6IG5ldmVyIHVzZSBicm9r ZW4gZmlsZXMuICovCiAJaWYgKF9mc3RhdChmZCwgJnNiKSAhPSAtMSAmJiBzYi5zdF9zaXplICUg c2l6ZW9mKHN0cnVjdCBmdXR4KSAhPSAwKSB7CiAJCV9jbG9zZShmZCk7Ci0JCWVycm5vID0gRUlO VkFMOworCQllcnJubyA9IEVGVFlQRTsKIAkJcmV0dXJuIChOVUxMKTsKIAl9CiAJCkBAIC02Mywx NiArNjMsMTYgQEAKIAkJX2Nsb3NlKGZkKTsKIAkJcmV0dXJuIChOVUxMKTsKIAl9Ci0KIAlyZXR1 cm4gKGZwKTsKIH0KIAogc3RhdGljIGludAogdXR4X2FjdGl2ZV9hZGQoY29uc3Qgc3RydWN0IGZ1 dHggKmZ1KQogeworCXN0cnVjdCBmdXR4IGZlOwogCUZJTEUgKmZwOwotCXN0cnVjdCBmdXR4IGZl OwogCW9mZl90IHBhcnRpYWwgPSAtMTsKKwlpbnQgZXJyb3IsIHJldDsKIAogCS8qCiAJICogUmVn aXN0ZXIgdXNlciBsb2dpbiBzZXNzaW9ucy4gIE92ZXJ3cml0ZSBlbnRyaWVzIG9mIHNlc3Npb25z CkBAIC04MCwxNiArODAsMTcgQEAKIAkgKi8KIAlmcCA9IGZ1dHhfb3BlbihfUEFUSF9VVFhfQUNU SVZFKTsKIAlpZiAoZnAgPT0gTlVMTCkKLQkJcmV0dXJuICgxKTsKLQl3aGlsZSAoZnJlYWQoJmZl LCBzaXplb2YgZmUsIDEsIGZwKSA9PSAxKSB7CisJCXJldHVybiAoLTEpOworCXdoaWxlIChmcmVh ZCgmZmUsIHNpemVvZihmZSksIDEsIGZwKSA9PSAxKSB7CiAJCXN3aXRjaCAoZmUuZnVfdHlwZSkg ewogCQljYXNlIFVTRVJfUFJPQ0VTUzoKIAkJY2FzZSBJTklUX1BST0NFU1M6CiAJCWNhc2UgTE9H SU5fUFJPQ0VTUzoKIAkJY2FzZSBERUFEX1BST0NFU1M6CiAJCQkvKiBPdmVyd3JpdGUgd2hlbiB1 dF9pZCBtYXRjaGVzLiAqLwotCQkJaWYgKG1lbWNtcChmdS0+ZnVfaWQsIGZlLmZ1X2lkLCBzaXpl b2YgZmUuZnVfaWQpID09IDApIHsKLQkJCQlmc2Vla28oZnAsIC0ob2ZmX3Qpc2l6ZW9mIGZlLCBT RUVLX0NVUik7CisJCQlpZiAobWVtY21wKGZ1LT5mdV9pZCwgZmUuZnVfaWQsIHNpemVvZihmZS5m dV9pZCkpID09CisJCQkgICAgMCkgeworCQkJCXJldCA9IGZzZWVrbyhmcCwgLShvZmZfdClzaXpl b2YoZmUpLCBTRUVLX0NVUik7CiAJCQkJZ290byBleGFjdDsKIAkJCX0KIAkJCWlmIChmZS5mdV90 eXBlICE9IERFQURfUFJPQ0VTUykKQEAgLTk3LDU1ICs5OCw3MyBAQAogCQkJLyogRkFMTFRIUk9V R0ggKi8KIAkJZGVmYXVsdDoKIAkJCS8qIEFsbG93IHVzIHRvIG92ZXJ3cml0ZSB1bnVzZWQgcmVj b3Jkcy4gKi8KLQkJCWlmIChwYXJ0aWFsID09IC0xKQotCQkJCXBhcnRpYWwgPSBmdGVsbG8oZnAp IC0gKG9mZl90KXNpemVvZiBmZTsKKwkJCWlmIChwYXJ0aWFsID09IC0xKSB7CisJCQkJcGFydGlh bCA9IGZ0ZWxsbyhmcCk7CisJCQkJLyogCisJCQkJICogRGlzdGluZ3Vpc2ggZXJyb3JzIGZyb20g dmFsaWQgdmFsdWVzIHNvIHdlCisJCQkJICogZG9uJ3Qgb3ZlcndyaXRlIGdvb2QgZGF0YSBieSBh Y2NpZGVudC4KKwkJCQkgKi8KKwkJCQlpZiAocGFydGlhbCAhPSAtMSkKKwkJCQkJcGFydGlhbCAt PSAob2ZmX3Qpc2l6ZW9mKGZlKTsKKwkJCX0KIAkJCWJyZWFrOwogCQl9CiAJfQotCQorCiAJLyoK IAkgKiBObyBleGFjdCBtYXRjaCBmb3VuZC4gIFVzZSB0aGUgcGFydGlhbCBtYXRjaC4gIElmIG5v IHBhcnRpYWwKIAkgKiBtYXRjaCB3YXMgZm91bmQsIGp1c3QgYXBwZW5kIGEgbmV3IHJlY29yZC4K IAkgKi8KIAlpZiAocGFydGlhbCAhPSAtMSkKLQkJZnNlZWtvKGZwLCBwYXJ0aWFsLCBTRUVLX1NF VCk7CisJCXJldCA9IGZzZWVrbyhmcCwgcGFydGlhbCwgU0VFS19TRVQpOwogZXhhY3Q6Ci0JZndy aXRlKGZ1LCBzaXplb2YgKmZ1LCAxLCBmcCk7CisJaWYgKHJldCA9PSAtMSkKKwkJZXJyb3IgPSBl cnJubzsKKwllbHNlIGlmIChmd3JpdGUoZnUsIHNpemVvZigqZnUpLCAxLCBmcCkgPCAxKQorCQll cnJvciA9IGVycm5vOworCWVsc2UKKwkJZXJyb3IgPSAwOwogCWZjbG9zZShmcCk7Ci0JcmV0dXJu ICgwKTsKKwllcnJubyA9IGVycm9yOworCXJldHVybiAoZXJyb3IgPT0gMCA/IDAgOiAxKTsKIH0K IAogc3RhdGljIGludAogdXR4X2FjdGl2ZV9yZW1vdmUoc3RydWN0IGZ1dHggKmZ1KQogeworCXN0 cnVjdCBmdXR4IGZlOwogCUZJTEUgKmZwOwotCXN0cnVjdCBmdXR4IGZlOworCWludCBlcnJvciwg cmV0OwogCiAJLyoKIAkgKiBSZW1vdmUgdXNlciBsb2dpbiBzZXNzaW9ucywgaGF2aW5nIHRoZSBz YW1lIHV0X2lkLgogCSAqLwogCWZwID0gZnV0eF9vcGVuKF9QQVRIX1VUWF9BQ1RJVkUpOwogCWlm IChmcCA9PSBOVUxMKQotCQlyZXR1cm4gKDEpOwotCXdoaWxlIChmcmVhZCgmZmUsIHNpemVvZiBm ZSwgMSwgZnApID09IDEpIHsKKwkJcmV0dXJuICgtMSk7CisJZXJyb3IgPSBFU1JDSDsKKwlyZXQg PSAtMTsKKwl3aGlsZSAoZnJlYWQoJmZlLCBzaXplb2YoZmUpLCAxLCBmcCkgPT0gMSAmJiByZXQg IT0gMCkKIAkJc3dpdGNoIChmZS5mdV90eXBlKSB7CiAJCWNhc2UgVVNFUl9QUk9DRVNTOgogCQlj YXNlIElOSVRfUFJPQ0VTUzoKIAkJY2FzZSBMT0dJTl9QUk9DRVNTOgotCQkJaWYgKG1lbWNtcChm dS0+ZnVfaWQsIGZlLmZ1X2lkLCBzaXplb2YgZmUuZnVfaWQpICE9IDApCisJCQlpZiAobWVtY21w KGZ1LT5mdV9pZCwgZmUuZnVfaWQsIHNpemVvZihmZS5mdV9pZCkpICE9IDApCiAJCQkJY29udGlu dWU7CiAKIAkJCS8qIFRlcm1pbmF0ZSBzZXNzaW9uLiAqLwotCQkJZnNlZWtvKGZwLCAtKG9mZl90 KXNpemVvZiBmZSwgU0VFS19DVVIpOwotCQkJZndyaXRlKGZ1LCBzaXplb2YgKmZ1LCAxLCBmcCk7 Ci0JCQlmY2xvc2UoZnApOwotCQkJcmV0dXJuICgwKTsKKwkJCWlmIChmc2Vla28oZnAsIC0ob2Zm X3Qpc2l6ZW9mKGZlKSwgU0VFS19DVVIpID09IC0xKQorCQkJCWVycm9yID0gZXJybm87CisJCQll bHNlIGlmIChmd3JpdGUoZnUsIHNpemVvZigqZnUpLCAxLCBmcCkgPCAxKQorCQkJCWVycm9yID0g ZXJybm87CisJCQllbHNlCisJCQkJcmV0ID0gMDsKKwogCQl9Ci0JfQogCiAJZmNsb3NlKGZwKTsK LQllcnJubyA9IEVTUkNIOwotCXJldHVybiAoMSk7CisJZXJybm8gPSBlcnJvcjsKKwlyZXR1cm4g KHJldCk7CiB9CiAKIHN0YXRpYyB2b2lkCkBAIC0xNTgsOSArMTc3LDEyIEBACiBzdGF0aWMgaW50 CiB1dHhfbGFzdGxvZ2luX2FkZChjb25zdCBzdHJ1Y3QgZnV0eCAqZnUpCiB7CisJc3RydWN0IGZ1 dHggZmU7CiAJRklMRSAqZnA7Ci0Jc3RydWN0IGZ1dHggZmU7CisJaW50IGVycm9yLCByZXQ7CiAK KwlyZXQgPSAwOworCiAJLyoKIAkgKiBXcml0ZSBhbiBlbnRyeSB0byBsYXN0bG9naW4uICBPdmVy d3JpdGUgdGhlIGVudHJ5IGlmIHRoZQogCSAqIGN1cnJlbnQgdXNlciBhbHJlYWR5IGhhcyBhbiBl bnRyeS4gIElmIG5vdCwgYXBwZW5kIGEgbmV3CkBAIC0xNjgsMjUgKzE5MCwzMSBAQAogCSAqLwog CWZwID0gZnV0eF9vcGVuKF9QQVRIX1VUWF9MQVNUTE9HSU4pOwogCWlmIChmcCA9PSBOVUxMKQot CQlyZXR1cm4gKDEpOworCQlyZXR1cm4gKC0xKTsKIAl3aGlsZSAoZnJlYWQoJmZlLCBzaXplb2Yg ZmUsIDEsIGZwKSA9PSAxKSB7CiAJCWlmIChzdHJuY21wKGZ1LT5mdV91c2VyLCBmZS5mdV91c2Vy LCBzaXplb2YgZmUuZnVfdXNlcikgIT0gMCkKIAkJCWNvbnRpbnVlOwotCQkKKwogCQkvKiBGb3Vu ZCBhIHByZXZpb3VzIGxhc3Rsb2dpbiBlbnRyeSBmb3IgdGhpcyB1c2VyLiAqLwotCQlmc2Vla28o ZnAsIC0ob2ZmX3Qpc2l6ZW9mIGZlLCBTRUVLX0NVUik7CisJCXJldCA9IGZzZWVrbyhmcCwgLShv ZmZfdClzaXplb2YgZmUsIFNFRUtfQ1VSKTsKIAkJYnJlYWs7CiAJfQotCWZ3cml0ZShmdSwgc2l6 ZW9mICpmdSwgMSwgZnApOworCWlmIChyZXQgPT0gLTEpCisJCWVycm9yID0gZXJybm87CisJZWxz ZSBpZiAoZndyaXRlKGZ1LCBzaXplb2YgKmZ1LCAxLCBmcCkgPCAxKSB7CisJCWVycm9yID0gZXJy bm87CisJCXJldCA9IC0xOworCX0KIAlmY2xvc2UoZnApOwotCXJldHVybiAoMCk7CisJZXJybm8g PSBlcnJvcjsKKwlyZXR1cm4gKHJldCk7CiB9CiAKIHN0YXRpYyB2b2lkCiB1dHhfbGFzdGxvZ2lu X3VwZ3JhZGUodm9pZCkKIHsKKwlzdHJ1Y3Qgc3RhdCBzYjsKIAlpbnQgZmQ7Ci0Jc3RydWN0IHN0 YXQgc2I7CiAKIAlmZCA9IF9vcGVuKF9QQVRIX1VUWF9MQVNUTE9HSU4sIE9fUkRXUiwgMDY0NCk7 CiAJaWYgKGZkIDwgMCkKQEAgLTIwNSw5ICsyMzMsOSBAQAogc3RhdGljIGludAogdXR4X2xvZ19h ZGQoY29uc3Qgc3RydWN0IGZ1dHggKmZ1KQogewotCWludCBmZDsKKwlzdHJ1Y3QgaW92ZWMgdmVj WzJdOworCWludCBlcnJvciwgZmQ7CiAJdWludDE2X3QgbDsKLQlzdHJ1Y3QgaW92ZWMgdmVjWzJd OwogCiAJLyoKIAkgKiBBcHBlbmQgYW4gZW50cnkgdG8gdGhlIGxvZyBmaWxlLiAgV2Ugb25seSBu ZWVkIHRvIGFwcGVuZApAQCAtMjE1LDE5ICsyNDMsMjMgQEAKIAkgKiB6ZXJvLWJ5dGVzLiAgUHJl cGVuZCBhIGxlbmd0aCBmaWVsZCwgaW5kaWNhdGluZyB0aGUgbGVuZ3RoIG9mCiAJICogdGhlIHJl Y29yZCwgZXhjbHVkaW5nIHRoZSBsZW5ndGggZmllbGQgaXRzZWxmLgogCSAqLwotCWZvciAobCA9 IHNpemVvZiAqZnU7IGwgPiAwICYmICgoY29uc3QgY2hhciAqKWZ1KVtsIC0gMV0gPT0gJ1wwJzsg bC0tKTsKKwlmb3IgKGwgPSBzaXplb2YoKmZ1KTsgbCA+IDAgJiYgKChjb25zdCBjaGFyICopZnUp W2wgLSAxXSA9PSAnXDAnOyBsLS0pIDsKIAl2ZWNbMF0uaW92X2Jhc2UgPSAmbDsKLQl2ZWNbMF0u aW92X2xlbiA9IHNpemVvZiBsOworCXZlY1swXS5pb3ZfbGVuID0gc2l6ZW9mKGwpOwogCXZlY1sx XS5pb3ZfYmFzZSA9IF9fREVDT05TVCh2b2lkICosIGZ1KTsKIAl2ZWNbMV0uaW92X2xlbiA9IGw7 CiAJbCA9IGh0b2JlMTYobCk7CiAKIAlmZCA9IF9vcGVuKF9QQVRIX1VUWF9MT0csIE9fQ1JFQVR8 T19XUk9OTFl8T19BUFBFTkQsIDA2NDQpOwogCWlmIChmZCA8IDApCi0JCXJldHVybiAoMSk7Ci0J X3dyaXRldihmZCwgdmVjLCAyKTsKKwkJcmV0dXJuICgtMSk7CisJaWYgKF93cml0ZXYoZmQsIHZl YywgMikgPT0gLTEpCisJCWVycm9yID0gZXJybm87CisJZWxzZQorCQllcnJvciA9IDA7CiAJX2Ns b3NlKGZkKTsKLQlyZXR1cm4gKDApOworCWVycm5vID0gZXJyb3I7CisJcmV0dXJuIChlcnJvciA9 PSAwID8gMCA6IDEpOwogfQogCiBzdHJ1Y3QgdXRtcHggKgpAQCAtMjM3LDcgKzI2OSw3IEBACiAJ aW50IGJhZCA9IDA7CiAKIAl1dHhfdG9fZnV0eCh1dG1weCwgJmZ1KTsKLQkKKwogCXN3aXRjaCAo ZnUuZnVfdHlwZSkgewogCWNhc2UgQk9PVF9USU1FOgogCWNhc2UgU0hVVERPV05fVElNRToKQEAg LTI2Nyw2ICsyOTksNyBAQAogCQkJcmV0dXJuIChOVUxMKTsKIAkJYnJlYWs7CiAJZGVmYXVsdDoK KwkJZXJybm8gPSBFSU5WQUw7CiAJCXJldHVybiAoTlVMTCk7CiAJfQogCkluZGV4OiBsaWIvbGli Yy9nZW4vdXR4ZGIuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBsaWIvbGliYy9nZW4vdXR4ZGIuYwkocmV2aXNp b24gMjE1MzE0KQorKysgbGliL2xpYmMvZ2VuL3V0eGRiLmMJKHdvcmtpbmcgY29weSkKQEAgLTEz Miw5ICsxMzIsOCBAQAogCQl1dCA9IGNhbGxvYygxLCBzaXplb2YgKnV0KTsKIAkJaWYgKHV0ID09 IE5VTEwpCiAJCQlyZXR1cm4gKE5VTEwpOwotCX0gZWxzZSB7CisJfSBlbHNlCiAJCW1lbXNldCh1 dCwgMCwgc2l6ZW9mICp1dCk7Ci0JfQogCiAJc3dpdGNoIChmdS0+ZnVfdHlwZSkgewogCWNhc2Ug Qk9PVF9USU1FOgo= --0016364c7576c09e0404950b7fbf-- From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 23:25:22 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 632131065695; Sun, 14 Nov 2010 23:25:22 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id E675A8FC15; Sun, 14 Nov 2010 23:25:21 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id oAENPKnV062469; Mon, 15 Nov 2010 00:25:20 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id oAENPKWx062468; Mon, 15 Nov 2010 00:25:20 +0100 (CET) (envelope-from marius) Date: Mon, 15 Nov 2010 00:25:20 +0100 From: Marius Strobl To: Gavin Atkinson Message-ID: <20101114232520.GB57077@alchemy.franken.de> References: <201011141309.oAED9Xcv082719@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215295 - head/sys/opencrypto X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 23:25:22 -0000 On Sun, Nov 14, 2010 at 11:13:24PM +0000, Gavin Atkinson wrote: > On Sun, 14 Nov 2010, Marius Strobl wrote: > > Author: marius > > Date: Sun Nov 14 13:09:32 2010 > > New Revision: 215295 > > URL: http://svn.freebsd.org/changeset/base/215295 > > > > Log: > > Let cryptosoft(4) add its pseudo-device with a specific unit number and its > > probe method return BUS_PROBE_NOWILDCARD so it doesn't get attached to real > > devices hanging off of nexus(4) with no specific devclass set. Actually, the > > more desirable fix for this would be to get rid of the newbus interface of > > cryptosoft(4) altogether but apparently crypto(9) was written with support > > for cryptographic hardware in mind so that approach would require some KPI > > breaking changes which don't seem worth it. > > I'm guessing this fixes kern/132129 and kern/136123? > Likely, I haven't seen the failure mode described in these PRs though. Marius From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 23:37:43 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8547A1065673; Sun, 14 Nov 2010 23:37:43 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6955D8FC13; Sun, 14 Nov 2010 23:37:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAENbhRt097427; Sun, 14 Nov 2010 23:37:43 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAENbheD097425; Sun, 14 Nov 2010 23:37:43 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201011142337.oAENbheD097425@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 14 Nov 2010 23:37:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215327 - head/sys/dev/nfe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 23:37:43 -0000 Author: yongari Date: Sun Nov 14 23:37:43 2010 New Revision: 215327 URL: http://svn.freebsd.org/changeset/base/215327 Log: P5N32-SLI PREMIUM from ASUSTeK is known to have MSI/MSI-X issue such that nfe(4) does not work with MSI-X. When MSI-X support was introduced, I remember MCP55 controller worked without problems so the issue could be either PCI bridge or BIOS issue. But I also noticed snd_hda(4) disabled MSI on all MCP55 chipset so I'm still not sure this is generic issue of MCP55 chipset. If this was PCI bridge issue we would have added it to a system wide black-list table but it's not clear to me at this moment whether it was caused by either broken BIOS or silicon bug of MCP55 chipset. To workaround the issue, maintain a MSI/MSI-X black-list table in driver and lookup base board manufacturer and product name from the table before attempting to use MSI-X. If driver find an matching entry, nfe(4) will not use MSI/MSI-X and fall back on traditional INTx mode. This approach should be the last resort since it relies on smbios and if another instance of MSI/MSI-X breakage is reported with different maker/product, we may have to get the PCI bridge black-listed instead of adding an new entry. PR: kern/152150 Modified: head/sys/dev/nfe/if_nfe.c Modified: head/sys/dev/nfe/if_nfe.c ============================================================================== --- head/sys/dev/nfe/if_nfe.c Sun Nov 14 23:05:57 2010 (r215326) +++ head/sys/dev/nfe/if_nfe.c Sun Nov 14 23:37:43 2010 (r215327) @@ -77,6 +77,7 @@ static int nfe_detach(device_t); static int nfe_suspend(device_t); static int nfe_resume(device_t); static int nfe_shutdown(device_t); +static int nfe_can_use_msix(struct nfe_softc *); static void nfe_power(struct nfe_softc *); static int nfe_miibus_readreg(device_t, int, int); static int nfe_miibus_writereg(device_t, int, int, int); @@ -383,6 +384,13 @@ nfe_attach(device_t dev) "max. width of link(x%d)\n", width, v); } + if (nfe_can_use_msix(sc) == 0) { + device_printf(sc->nfe_dev, + "MSI/MSI-X capability black-listed, will use INTx\n"); + msix_disable = 1; + msi_disable = 1; + } + /* Allocate interrupt */ if (msix_disable == 0 || msi_disable == 0) { if (msix_disable == 0 && @@ -784,6 +792,41 @@ nfe_resume(device_t dev) } +static int +nfe_can_use_msix(struct nfe_softc *sc) +{ + static struct msix_blacklist { + char *maker; + char *product; + } msix_blacklists[] = { + { "ASUSTeK Computer INC.", "P5N32-SLI PREMIUM" } + }; + + struct msix_blacklist *mblp; + char *maker, *product; + int count, n; + + /* + * Search base board manufacturer and product name table + * to see this system has a known MSI/MSI-X issue. + */ + maker = getenv("smbios.planar.maker"); + product = getenv("smbios.planar.product"); + if (maker != NULL && product != NULL) { + count = sizeof(msix_blacklists) / sizeof(msix_blacklists[0]); + mblp = msix_blacklists; + for (n = 0; n < count; n++) { + if (strcmp(maker, mblp->maker) == 0 && + strcmp(product, mblp->product) == 0) + return (0); + mblp++; + } + } + + return (1); +} + + /* Take PHY/NIC out of powerdown, from Linux */ static void nfe_power(struct nfe_softc *sc) From owner-svn-src-head@FreeBSD.ORG Sun Nov 14 23:53:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2689106564A; Sun, 14 Nov 2010 23:53:13 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 963668FC17; Sun, 14 Nov 2010 23:53:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAENrDSw097789; Sun, 14 Nov 2010 23:53:13 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAENrDu1097787; Sun, 14 Nov 2010 23:53:13 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201011142353.oAENrDu1097787@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 14 Nov 2010 23:53:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215328 - head/sys/dev/xl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2010 23:53:14 -0000 Author: yongari Date: Sun Nov 14 23:53:13 2010 New Revision: 215328 URL: http://svn.freebsd.org/changeset/base/215328 Log: Add flow control for 3C905B and newer controllers. Note, these controllers support RX pause only. Reviewed by: marius Modified: head/sys/dev/xl/if_xl.c Modified: head/sys/dev/xl/if_xl.c ============================================================================== --- head/sys/dev/xl/if_xl.c Sun Nov 14 23:37:43 2010 (r215327) +++ head/sys/dev/xl/if_xl.c Sun Nov 14 23:53:13 2010 (r215328) @@ -555,6 +555,7 @@ xl_miibus_statchg(device_t dev) { struct xl_softc *sc; struct mii_data *mii; + uint8_t macctl; sc = device_get_softc(dev); mii = device_get_softc(sc->xl_miibus); @@ -563,11 +564,22 @@ xl_miibus_statchg(device_t dev) /* Set ASIC's duplex mode to match the PHY. */ XL_SEL_WIN(3); - if ((mii->mii_media_active & IFM_GMASK) == IFM_FDX) - CSR_WRITE_1(sc, XL_W3_MAC_CTRL, XL_MACCTRL_DUPLEX); - else - CSR_WRITE_1(sc, XL_W3_MAC_CTRL, - (CSR_READ_1(sc, XL_W3_MAC_CTRL) & ~XL_MACCTRL_DUPLEX)); + macctl = CSR_READ_1(sc, XL_W3_MAC_CTRL); + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) { + macctl |= XL_MACCTRL_DUPLEX; + if (sc->xl_type == XL_TYPE_905B) { + if ((IFM_OPTIONS(mii->mii_media_active) & + IFM_ETH_RXPAUSE) != 0) + macctl |= XL_MACCTRL_FLOW_CONTROL_ENB; + else + macctl &= ~XL_MACCTRL_FLOW_CONTROL_ENB; + } + } else { + macctl &= ~XL_MACCTRL_DUPLEX; + if (sc->xl_type == XL_TYPE_905B) + macctl &= ~XL_MACCTRL_FLOW_CONTROL_ENB; + } + CSR_WRITE_1(sc, XL_W3_MAC_CTRL, macctl); } /* @@ -1464,7 +1476,8 @@ xl_attach(device_t dev) if ((sc->xl_flags & XL_FLAG_PHYOK) == 0) phy = 24; error = mii_attach(dev, &sc->xl_miibus, ifp, xl_ifmedia_upd, - xl_ifmedia_sts, BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, 0); + xl_ifmedia_sts, BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, + sc->xl_type == XL_TYPE_905B ? MIIF_DOPAUSE : 0); if (error != 0) { device_printf(dev, "attaching PHYs failed\n"); goto fail; From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 00:06:19 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE5C5106566B; Mon, 15 Nov 2010 00:06:19 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C6BF8FC1A; Mon, 15 Nov 2010 00:06:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAF06JkD098154; Mon, 15 Nov 2010 00:06:19 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAF06JcI098152; Mon, 15 Nov 2010 00:06:19 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201011150006.oAF06JcI098152@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 15 Nov 2010 00:06:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215329 - head/sys/dev/re X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 00:06:19 -0000 Author: yongari Date: Mon Nov 15 00:06:19 2010 New Revision: 215329 URL: http://svn.freebsd.org/changeset/base/215329 Log: Add flow control for all re(4) controllers. re(4) controllers do not provide any MAC configuration interface for resolved flow control parameters. There is even no register that configures water mark which will control generation of pause frames. However enabling flow control surely enhanced performance a lot. Modified: head/sys/dev/re/if_re.c Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Sun Nov 14 23:53:13 2010 (r215328) +++ head/sys/dev/re/if_re.c Mon Nov 15 00:06:19 2010 (r215329) @@ -1449,7 +1449,7 @@ re_attach(device_t dev) if (sc->rl_type == RL_8169) phy = 1; error = mii_attach(dev, &sc->rl_miibus, ifp, re_ifmedia_upd, - re_ifmedia_sts, BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, 0); + re_ifmedia_sts, BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, MIIF_DOPAUSE); if (error != 0) { device_printf(dev, "attaching PHYs failed\n"); goto fail; From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 00:11:54 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 142F4106566C; Mon, 15 Nov 2010 00:11:54 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3A93E8FC08; Mon, 15 Nov 2010 00:11:52 +0000 (UTC) Received: by bwz2 with SMTP id 2so4698234bwz.13 for ; Sun, 14 Nov 2010 16:11:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=FoaCtLQSqDUBj3HpGPf1C+XsBkmevIw2iq2WuWTxtLA=; b=WjJo2f+uYOiu5B6gIfJzhC34Ss76ROpkncv4rUrOZFYZTEMgEZQwOpRn58TL8JiV1D vLMtgO6UXjb/QX3zIk4ZBzZMhttD6ugVnVeAvsV9RuHepDQc12KYPTidiJv4ZUxUNXX+ sOnZv2unXXT+vtiGU/q/nwoILML32T3o3Ju4o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=Tzf+TyysyaKCOGdWoVUMHV2YK62/J5j53KybOFj3L5SxvDlUn5HkQWCEn2eQF8ofON HmpJxG1Z7lMLAUn0jf1GPs7sTzL5cTPa4Jbhz6evFMicPhaQbKQ7Msp4zer3cMCBWipS Z5ipThQ9s3WWn7MFOu0fOfRIypCJF+YTyPceY= Received: by 10.204.53.4 with SMTP id k4mr5363777bkg.145.1289779911798; Sun, 14 Nov 2010 16:11:51 -0800 (PST) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id g8sm2716388bkg.23.2010.11.14.16.11.49 (version=SSLv3 cipher=RC4-MD5); Sun, 14 Nov 2010 16:11:50 -0800 (PST) Sender: Alexander Motin Message-ID: <4CE07AA3.6040205@FreeBSD.org> Date: Mon, 15 Nov 2010 02:11:15 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Pyun YongHyeon References: <201011142337.oAENbheD097425@svn.freebsd.org> In-Reply-To: <201011142337.oAENbheD097425@svn.freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215327 - head/sys/dev/nfe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 00:11:54 -0000 Pyun YongHyeon wrote: > Author: yongari > Date: Sun Nov 14 23:37:43 2010 > New Revision: 215327 > URL: http://svn.freebsd.org/changeset/base/215327 > > Log: > P5N32-SLI PREMIUM from ASUSTeK is known to have MSI/MSI-X issue > such that nfe(4) does not work with MSI-X. When MSI-X support was > introduced, I remember MCP55 controller worked without problems so > the issue could be either PCI bridge or BIOS issue. But I also > noticed snd_hda(4) disabled MSI on all MCP55 chipset so I'm still > not sure this is generic issue of MCP55 chipset. If this was PCI > bridge issue we would have added it to a system wide black-list > table but it's not clear to me at this moment whether it was caused > by either broken BIOS or silicon bug of MCP55 chipset. MCP5x seem to be infinite source of surprises. Some reports I remember: - snd_hda not working with MSI enabled - AFAIR not just loosing interrupts but completely stops responding; - using regular HPET interrupts breaks HDA sound after some time (interrupts are not shared), while legacy_route mode operates properly; - at least on one system I've seen non-functioning SATA interrupts. It would be nice to find what's going on there. I've got tired to add workarounds for it. :( -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 00:14:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AB74106576B; Mon, 15 Nov 2010 00:14:31 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 54C2A8FC14; Mon, 15 Nov 2010 00:14:29 +0000 (UTC) Received: by wyb36 with SMTP id 36so1988534wyb.13 for ; Sun, 14 Nov 2010 16:14:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.227.29.92 with SMTP id p28mr5352524wbc.70.1289778708696; Sun, 14 Nov 2010 15:51:48 -0800 (PST) Sender: andy@fud.org.nz Received: by 10.227.146.67 with HTTP; Sun, 14 Nov 2010 15:51:48 -0800 (PST) In-Reply-To: References: <201011142041.oAEKfN6Y093321@svn.freebsd.org> Date: Mon, 15 Nov 2010 12:51:48 +1300 X-Google-Sender-Auth: h3mP9bKrH-y9GqyEH6qr4mBTuWg Message-ID: From: Andrew Thompson To: Gavin Atkinson Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215319 - head/sys/arm/xscale/ixp425 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 00:14:31 -0000 On 15 November 2010 11:56, Gavin Atkinson wrote: > On Sun, 14 Nov 2010, Andrew Thompson wrote: > >> Author: thompsa >> Date: Sun Nov 14 20:41:22 2010 >> New Revision: 215319 >> URL: http://svn.freebsd.org/changeset/base/215319 >> >> Log: >> =A0 Provide a mutex around the read/modify/write of the IXP425_GPIO_* >> =A0 registers. Giant was used in some places, but not all. > > I believe this should fix my PR arm/134338, but don't have the bandwidth > at the moment to verify that. =A0Is there any chance you could see if you > believe the same? It is essentially the same. I have not added locks around the probe/attach routines as interrupts/scheduler are still disabled. Andrew From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 00:28:06 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21295106566B; Mon, 15 Nov 2010 00:28:06 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 34E528FC08; Mon, 15 Nov 2010 00:28:05 +0000 (UTC) Received: by gxk9 with SMTP id 9so2844846gxk.13 for ; Sun, 14 Nov 2010 16:28:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=aWG0sf+fkxfhJAqhMtCZlBi/Q4PAioXnkCuIn5CkQkw=; b=f0iMTubu12fmCgZonaAwAH94KI7YsPNm/st2LcPbMUBoPFXIwrMdO2z7fwjP4NGJfT QuTZe+wW+AhXrSeW6ETylBs4olEQs54VCW//ku47Z7DlAcK52qTHaJNh6hvKIXEk8XSm Y1waOUS49KC+hD3IGB08sUqfLw0hMzVQJSjas= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=OcACnu64sOfYRC1EgnBMPTz0zX1MIHTqmFiOuDrNdHZgyQpFNoed5FWOQ8JxPohohh xrvnJeey056s9HqkPcfvBJ4aVW6/XALbwKT8pydcsN293KUhDgx3ghrLdF/qe0cbH2Wv /UZ2avczTKvaXblh2PJa1BsQTfnGjYQ5Kqnaw= Received: by 10.150.190.3 with SMTP id n3mr8389258ybf.282.1289780884593; Sun, 14 Nov 2010 16:28:04 -0800 (PST) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id 5sm4178402yhl.47.2010.11.14.16.28.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 14 Nov 2010 16:28:02 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Sun, 14 Nov 2010 16:27:59 -0800 From: Pyun YongHyeon Date: Sun, 14 Nov 2010 16:27:59 -0800 To: Alexander Motin Message-ID: <20101115002759.GA1351@michelle.cdnetworks.com> References: <201011142337.oAENbheD097425@svn.freebsd.org> <4CE07AA3.6040205@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4CE07AA3.6040205@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Pyun YongHyeon Subject: Re: svn commit: r215327 - head/sys/dev/nfe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 00:28:06 -0000 On Mon, Nov 15, 2010 at 02:11:15AM +0200, Alexander Motin wrote: > Pyun YongHyeon wrote: > > Author: yongari > > Date: Sun Nov 14 23:37:43 2010 > > New Revision: 215327 > > URL: http://svn.freebsd.org/changeset/base/215327 > > > > Log: > > P5N32-SLI PREMIUM from ASUSTeK is known to have MSI/MSI-X issue > > such that nfe(4) does not work with MSI-X. When MSI-X support was > > introduced, I remember MCP55 controller worked without problems so > > the issue could be either PCI bridge or BIOS issue. But I also > > noticed snd_hda(4) disabled MSI on all MCP55 chipset so I'm still > > not sure this is generic issue of MCP55 chipset. If this was PCI > > bridge issue we would have added it to a system wide black-list > > table but it's not clear to me at this moment whether it was caused > > by either broken BIOS or silicon bug of MCP55 chipset. > > MCP5x seem to be infinite source of surprises. Some reports I remember: Yeah, they even do not release any errata. > - snd_hda not working with MSI enabled - AFAIR not just loosing > interrupts but completely stops responding; > - using regular HPET interrupts breaks HDA sound after some time > (interrupts are not shared), while legacy_route mode operates properly; > - at least on one system I've seen non-functioning SATA interrupts. > It would be nice to find what's going on there. I've got tired to add > workarounds for it. :( > Yeah, I agree but I'm sure not all MCP55 was broken because one user who tested MCP55 with MSI-X reported success. This is reason why I didn't add it to system-wide blacklist table. If you remember exact PCI bridge chipset I think you can compare it with the pciconf output in PR/152150 and if it's the same we can move it to PCI quirk table. From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 00:51:23 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 93E9A1065670; Mon, 15 Nov 2010 00:51:23 +0000 (UTC) Date: Mon, 15 Nov 2010 00:51:23 +0000 From: Alexander Best To: Steve Kargl Message-ID: <20101115005123.GA46134@freebsd.org> References: <201011131054.oADAsA7I045096@svn.freebsd.org> <20101113125648.GA25183@freebsd.org> <20101113164645.GB69612@troutmask.apl.washington.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101113164645.GB69612@troutmask.apl.washington.edu> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ulrich Spoerlein Subject: Re: svn commit: r215237 - head/lib/msun/src X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 00:51:23 -0000 On Sat Nov 13 10, Steve Kargl wrote: > On Sat, Nov 13, 2010 at 12:56:48PM +0000, Alexander Best wrote: > > On Sat Nov 13 10, Ulrich Spoerlein wrote: > > > Author: uqs > > > Date: Sat Nov 13 10:54:10 2010 > > > New Revision: 215237 > > > URL: http://svn.freebsd.org/changeset/base/215237 > > > > > > Log: > > > Fix bug in jn(3) and jnf(3) that led to -inf results > > > > thank you very much for fixing this long outstanding issue. > > you might want to have a look at [1], where two more issues have been reported. > > > > cheers. > > alex > > > > [1] http://mailman.oakapple.net/pipermail/numeric-interest/2010-September/thread.html > > > > Ulrich, thanks. Of the two remaining issues, I can verify > one is indeed an issue. also it seems one of the regression tests in tools/regression/lib/msun fails (assert tripped): test-lrint. cheers. alex > > laptop:kargl[204] cat mn.c > #include > #include > > static const double z = 0.; > > int > main(void) > { > double x, y; > x = -1. / z; > y = exp( 0.5 * log(x)); > printf("pow(%f, 0.5) = %le, %le\n", x, pow(x, 0.5), y); > y = exp(-0.5 * log(x)); > printf("pow(%f, -0.5) = %le, %le\n", x, pow(x, -0.5), y); > return 0; > } > > laptop:kargl[205] cc -o z mn.c -fno-builtin -lm && ./z > pow(-inf, 0.5) = inf, nan > pow(-inf, -0.5) = 0.000000e+00, nan > > -- > Steve -- a13x From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 01:24:14 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1701B1065670; Mon, 15 Nov 2010 01:24:14 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id C91B78FC23; Mon, 15 Nov 2010 01:24:13 +0000 (UTC) Received: from lawrence1.loshell.room52.net (ppp59-167-184-191.static.internode.on.net [59.167.184.191]) by lauren.room52.net (Postfix) with ESMTPSA id 27B7B7E8A5; Mon, 15 Nov 2010 12:24:07 +1100 (EST) Message-ID: <4CE08BB6.1090304@freebsd.org> Date: Mon, 15 Nov 2010 12:24:06 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-AU; rv:1.9.2.9) Gecko/20101006 Lightning/1.0b2 Thunderbird/3.1.4 MIME-Version: 1.0 To: Mikolaj Golub References: <201011120641.oAC6fui3098584@svn.freebsd.org> <8662w17e90.fsf@kopusha.home.net> <4CDF3A58.6080505@freebsd.org> <86pqu8q6lb.fsf@kopusha.home.net> In-Reply-To: <86pqu8q6lb.fsf@kopusha.home.net> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on lauren.room52.net Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r215166 - in head: . sys/conf sys/netinet sys/netinet/cc sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 01:24:14 -0000 On 11/15/10 02:15, Mikolaj Golub wrote: > > On Sun, 14 Nov 2010 12:24:40 +1100 Lawrence Stewart wrote: > > LS> On 11/13/10 20:40, Mikolaj Golub wrote: > >> > >> On Fri, 12 Nov 2010 06:41:56 +0000 (UTC) Lawrence Stewart wrote: > >> > >> LS> Author: lstewart > >> LS> Date: Fri Nov 12 06:41:55 2010 > >> LS> New Revision: 215166 > >> LS> URL: http://svn.freebsd.org/changeset/base/215166 > >> > >> LS> Log: > >> LS> This commit marks the first formal contribution of the "Five New TCP Congestion > >> LS> Control Algorithms for FreeBSD" FreeBSD Foundation funded project. More details > >> LS> about the project are available at: http://caia.swin.edu.au/freebsd/5cc/ > >> > >> It looks like the code needs improvement to work with VIMAGE :-) > >> > >> options VIMAGE > >> > >> jail -i -c vnet persist path=/ > >> > >> panic: lock "cc_list" 0xc101c418 already initialized > >> [snip backtrace] > > LS> Would you mind testing the following patch? It fixes the panic for me. > > LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit.patch > > With this patch the system hangs during the boot. Ctr-Alt-Esc to break into > ddb does not work. I am trying this under VirtualBox. I can't reproduce a hang, but please try this patch instead: http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit_v2.patch The previous patch had a bug, in that CC modules register with SI_ORDER_ANY in the same SI_SUB_PROTO_IFATTACHDOMAIN category as the CC framework's SYSINIT (which also ran with SI_ORDER_ANY). Therefore, there is a possibility an algo could have tried to register before the CC framework SYSINIT ran. To be honest though, I don't expect the updated patch will fix the hang. I would have expected a panic rather than a hang if you were seeing any complications due to the SYSINIT ordering because the algo registration would have attempted to use an uninitialised lock. I suspect your hang might be caused by something unrelated to the modular CC work, but let me know how you go. Cheers, Lawrence From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 02:27:01 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C33F106564A; Mon, 15 Nov 2010 02:27:01 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A0278FC15; Mon, 15 Nov 2010 02:27:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAF2R1qv001139; Mon, 15 Nov 2010 02:27:01 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAF2R11K001136; Mon, 15 Nov 2010 02:27:01 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201011150227.oAF2R11K001136@svn.freebsd.org> From: Andrew Thompson Date: Mon, 15 Nov 2010 02:27:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215330 - in head/sys/dev/usb: . serial X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 02:27:01 -0000 Author: thompsa Date: Mon Nov 15 02:27:01 2010 New Revision: 215330 URL: http://svn.freebsd.org/changeset/base/215330 Log: Add the Sierra MC8700. Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Mon Nov 15 00:06:19 2010 (r215329) +++ head/sys/dev/usb/serial/u3g.c Mon Nov 15 02:27:01 2010 (r215330) @@ -458,6 +458,7 @@ static const struct usb_device_id u3g_de U3G_DEV(SIERRA, MC5727, 0), U3G_DEV(SIERRA, MC5727_2, 0), U3G_DEV(SIERRA, MC5728, 0), + U3G_DEV(SIERRA, MC8700, 0), U3G_DEV(SIERRA, MC8755, 0), U3G_DEV(SIERRA, MC8755_2, 0), U3G_DEV(SIERRA, MC8755_3, 0), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Mon Nov 15 00:06:19 2010 (r215329) +++ head/sys/dev/usb/usbdevs Mon Nov 15 02:27:01 2010 (r215330) @@ -2920,6 +2920,7 @@ product SIERRA C888 0x6890 C888 product SIERRA C22 0x6891 C22 product SIERRA E6892 0x6892 E6892 product SIERRA E6893 0x6893 E6893 +product SIERRA MC8700 0x68A3 MC8700 product SIERRA AIRCARD875 0x6820 Aircard 875 HSDPA product SIERRA TRUINSTALL 0x0fff Aircard Tru Installer From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 02:39:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACAFE1065672; Mon, 15 Nov 2010 02:39:52 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id 447468FC0C; Mon, 15 Nov 2010 02:39:51 +0000 (UTC) Received: from c122-106-146-145.carlnfd1.nsw.optusnet.com.au (c122-106-146-145.carlnfd1.nsw.optusnet.com.au [122.106.146.145]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id oAF2dlh9019650 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 15 Nov 2010 13:39:48 +1100 Date: Mon, 15 Nov 2010 13:39:47 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Alexander Best In-Reply-To: <20101115005123.GA46134@freebsd.org> Message-ID: <20101115124817.O1683@besplex.bde.org> References: <201011131054.oADAsA7I045096@svn.freebsd.org> <20101113125648.GA25183@freebsd.org> <20101113164645.GB69612@troutmask.apl.washington.edu> <20101115005123.GA46134@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Steve Kargl , Ulrich Spoerlein Subject: Re: svn commit: r215237 - head/lib/msun/src X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 02:39:52 -0000 On Mon, 15 Nov 2010, Alexander Best wrote: > also it seems one of the regression tests in tools/regression/lib/msun fails > (assert tripped): test-lrint. I get this on amd64, and lots more failures starting with csqrt() on i386. Here is the output of make >foo 2>&1, after adding "set +e; " to the loop in the Makefile so that the shell loop doesn't abort on the first failure: % set +e; for p in test-conj test-csqrt test-exponential test-fenv test-fma test-fmaxmin test-ilogb test-invtrig test-lrint test-lround test-nan test-next test-rem test-trig; do /dumpster/home/bde/q/src/tools/regression/lib/msun/$p; done % 1..42 % ok 1 # conjf(0.0 + 0.0I) % ok 2 # conj(0.0 + 0.0I) % ok 3 # conjl(0.0 + 0.0I) % ok 4 # conjf(0.0 + 1.0I) % ok 5 # conj(0.0 + 1.0I) % ok 6 # conjl(0.0 + 1.0I) % ok 7 # conjf(1.0 + 0.0I) % ok 8 # conj(1.0 + 0.0I) % ok 9 # conjl(1.0 + 0.0I) % ok 10 # conjf(-1.0 + 0.0I) % ok 11 # conj(-1.0 + 0.0I) % ok 12 # conjl(-1.0 + 0.0I) % ok 13 # conjf(1.0 + -0.0I) % ok 14 # conj(1.0 + -0.0I) % ok 15 # conjl(1.0 + -0.0I) % ok 16 # conjf(0.0 + -1.0I) % ok 17 # conj(0.0 + -1.0I) % ok 18 # conjl(0.0 + -1.0I) % ok 19 # conjf(2.0 + 4.0I) % ok 20 # conj(2.0 + 4.0I) % ok 21 # conjl(2.0 + 4.0I) % ok 22 # conjf(0.0 + infI) % ok 23 # conj(0.0 + infI) % ok 24 # conjl(0.0 + infI) % ok 25 # conjf(0.0 + -infI) % ok 26 # conj(0.0 + -infI) % ok 27 # conjl(0.0 + -infI) % ok 28 # conjf(inf + 0.0I) % ok 29 # conj(inf + 0.0I) % ok 30 # conjl(inf + 0.0I) % ok 31 # conjf(nan + 1.0I) % ok 32 # conj(nan + 1.0I) % ok 33 # conjl(nan + 1.0I) % ok 34 # conjf(1.0 + nanI) % ok 35 # conj(1.0 + nanI) % ok 36 # conjl(1.0 + nanI) % ok 37 # conjf(nan + nanI) % ok 38 # conj(nan + nanI) % ok 39 # conjl(nan + nanI) % ok 40 # conjf(-inf + infI) % ok 41 # conj(-inf + infI) % ok 42 # conjl(-inf + infI) % Assertion failed: (creall(result) == ldexpl(14 * 0x1p-4, maxexp / 2)), function test_overflow, file test-csqrt.c, line 258. % 1..15 Probably just due to not setting the rounding precision to extended before calling the long double functions. Callers are expected to know about this bug, but the unreasonableness of this expectation is demonstrated by not all of the tests doing it, and the ones that do it do it incorrectly by setting it for all precisions, which breaks some of the double precision functions in msun and may give false successes by running the double or float precision functions in an abnormal environment. % ok 1 - csqrt % ok 2 - csqrt % ok 3 - csqrt % ok 4 - csqrt % ok 5 - csqrt % ok 6 - csqrt % ok 7 - csqrt % ok 8 - csqrt % ok 9 - csqrt % ok 10 - csqrt % ok 11 - csqrt % ok 12 - csqrt % ok 13 - csqrt % ok 14 - csqrt % Abort trap (core dumped) The tests are missing fflush()'s, so the error output for test 15 (?) occurs before the normal output for tests 1-14. Then the shell prints the abort message in the correct order. Output to a terminal is more readable due to the line buffering. % Assertion failed: (fpequal((exp2)(_d), (__builtin_inff()))), function run_generic_tests, file test-exponential.c, line 118. % 1..3 % Abort trap (core dumped) Unordered again. This is test 1 in test-exponential. test-exponential does set the rounding precision to extended. % 1..8 % ok 1 - fenv % ok 2 - fenv % ok 3 - fenv % ok 4 - fenv % ok 5 - fenv % ok 6 - fenv % ok 7 - fenv % ok 8 - fenv % Assertion failed: (fpequal((fmal)((1.1897314953572317650E+4932L), (1.1897314953572317650E+4932L), (-__builtin_inff())), (-__builtin_inff()))), function test_infinities, file test-fma.c, line 156. Maybe a general problem with __builting_inf() vs long doubles? % 1..18 % ok 1 - fma zeroes % ok 2 - fma zeroes % ok 3 - fma zeroes % ok 4 - fma zeroes % Abort trap (core dumped) % 1..12 % ok 1 - big = 1, small = 0 % ok 2 - big = 42, small = 41.999996185302734375 % ok 3 - big = 42.000003814697265625, small = 42 % ok 4 - big = -5, small = -5 % ok 5 - big = -3, small = -4 % ok 6 - big = 1, small = nan % ok 7 - big = inf, small = nan % ok 8 - big = inf, small = 1 % ok 9 - big = -3, small = -inf % ok 10 - big = 3, small = -inf % ok 11 - big = nan, small = nan % ok 12 - big = 0, small = -0 % 1..3 % ok 1 - ilogb % ok 2 - ilogbf % ok 3 - ilogbl % Assertion failed: (fpequal(acosf(_in), _out, ((0) * ldexpf(1.0, 1 - 24)))), function test_special, file test-invtrig.c, line 144. % 1..7 % Abort trap (core dumped) test-invtrig is missing setting of the rounding precision. % Assertion failed: ((lrint)(__builtin_inff()) == (0) || fetestexcept(FE_INVALID)), function run_tests, file test-lrint.c, line 79. % 1..1 % Abort trap (core dumped) Same as on amd64. This is compiler bug. (lrint)(__builtin_inff()) is evaluated at compile time despite being compiled with -O0, and it is evaluated incorrectly, without setting FE_INVALID as lrint() is specified to do when the result is not representable. In other words, gcc doesn't understand its own __builtin_inff() when combined with its builtin lrint(). Compiling the tests with -fno-builtin "fixes" this by avoiding the buggy builtin lrint(). The macros made debugging this painful. I preprocessed the source file using cpp -E and indent. indent made a mess of the hex constants by putting spaces in them. % 1..1 % ok 1 - lround % 1..1 % ok 1 - nan % 1..5 % ok 1 - next % ok 2 - next % ok 3 - next % ok 4 - next % ok 5 - next % 1..2 % ok 1 - rem % ok 2 - rem % 1..3 % ok 1 - trig % ok 2 - trig % ok 3 - trig Bruce From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 02:53:04 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDC9F106564A; Mon, 15 Nov 2010 02:53:04 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id 88ABA8FC0A; Mon, 15 Nov 2010 02:53:04 +0000 (UTC) Received: from c122-106-146-145.carlnfd1.nsw.optusnet.com.au (c122-106-146-145.carlnfd1.nsw.optusnet.com.au [122.106.146.145]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id oAF2r0Jk020979 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 15 Nov 2010 13:53:01 +1100 Date: Mon, 15 Nov 2010 13:53:00 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Cran In-Reply-To: <201011141610.oAEGAFK8086784@svn.freebsd.org> Message-ID: <20101115134014.D1683@besplex.bde.org> References: <201011141610.oAEGAFK8086784@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215304 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 02:53:05 -0000 On Sun, 14 Nov 2010, Bruce Cran wrote: > Log: > Fix some more style(9) issues. Better, but still has style bug(s) on almost every changed line... > Modified: head/sys/kern/kern_proc.c > ============================================================================== > --- head/sys/kern/kern_proc.c Sun Nov 14 15:31:59 2010 (r215303) > +++ head/sys/kern/kern_proc.c Sun Nov 14 16:10:15 2010 (r215304) > @@ -145,7 +145,7 @@ uma_zone_t proc_zone; > > int kstack_pages = KSTACK_PAGES; > SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, > - "Kernel stack size in pages"); > + "Kernel stack size in pages"); ... Long SYSCTL declarations are conventionally always split after CTLFLAG* but aren't here... > Modified: head/sys/kern/kern_tc.c > ============================================================================== > --- head/sys/kern/kern_tc.c Sun Nov 14 15:31:59 2010 (r215303) > +++ head/sys/kern/kern_tc.c Sun Nov 14 16:10:15 2010 (r215304) > @@ -770,7 +770,7 @@ pps_event(struct pps_state *pps, int eve > > static int tc_tick; > SYSCTL_INT(_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, &tc_tick, 0, > - "Approximate number of hardclock ticks in a millisecond"); > + "Approximate number of hardclock ticks in a millisecond"); ...or here... > void > tc_ticktock(int cnt) > > Modified: head/sys/kern/subr_clock.c > ============================================================================== > --- head/sys/kern/subr_clock.c Sun Nov 14 15:31:59 2010 (r215303) > +++ head/sys/kern/subr_clock.c Sun Nov 14 16:10:15 2010 (r215304) > @@ -61,7 +61,7 @@ int tz_dsttime; > * kern. > */ > SYSCTL_INT(_machdep, OID_AUTO, wall_cmos_clock, > - CTLFLAG_RW, &wall_cmos_clock, 0, "CMOS clock keeps wall time"); > + CTLFLAG_RW, &wall_cmos_clock, 0, "CMOS clock keeps wall time"); ...or here... (this one was an older mistake, split just before CTLFLAG* instead of long after). > @@ -74,8 +74,8 @@ sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ > } > > SYSCTL_PROC(_machdep, OID_AUTO, adjkerntz, CTLTYPE_INT|CTLFLAG_RW, > - &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", > - "Local offset from UTC in seconds"); > + &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", > + "Local offset from UTC in seconds"); This one had normal splitting, but has the common bug of missing spaces around the binary operator "|", and had its single continuation line misindented. Then recent changes duplicated the misindentation of the coninued line. You fixed a lot of old bugs of this form. ... Bruce From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 03:03:41 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45C3A1065696; Mon, 15 Nov 2010 03:03:41 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail07.syd.optusnet.com.au (mail07.syd.optusnet.com.au [211.29.132.188]) by mx1.freebsd.org (Postfix) with ESMTP id B9ADA8FC1D; Mon, 15 Nov 2010 03:03:40 +0000 (UTC) Received: from c122-106-146-145.carlnfd1.nsw.optusnet.com.au (c122-106-146-145.carlnfd1.nsw.optusnet.com.au [122.106.146.145]) by mail07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id oAF33aCt007174 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 15 Nov 2010 14:03:37 +1100 Date: Mon, 15 Nov 2010 14:03:36 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Cran In-Reply-To: <201011140609.oAE69oqd072190@svn.freebsd.org> Message-ID: <20101115135506.J1683@besplex.bde.org> References: <201011140609.oAE69oqd072190@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215281 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 03:03:41 -0000 On Sun, 14 Nov 2010, Bruce Cran wrote: > Log: > Add some descriptions to sys/kern sysctls. > Modified: head/sys/kern/kern_tc.c > ============================================================================== > --- head/sys/kern/kern_tc.c Sun Nov 14 05:05:41 2010 (r215280) > +++ head/sys/kern/kern_tc.c Sun Nov 14 06:09:50 2010 (r215281) > @@ -103,7 +103,7 @@ SYSCTL_NODE(_kern_timecounter, OID_AUTO, > > static int timestepwarnings; > SYSCTL_INT(_kern_timecounter, OID_AUTO, stepwarnings, CTLFLAG_RW, > - ×tepwarnings, 0, ""); > + ×tepwarnings, 0, "Log time steps"); Another problem (other than style bugs) with these and some old descriptions is inconsistent descriptions of boolean variables. I like always starting with "Enable". > @@ -768,7 +768,7 @@ pps_event(struct pps_state *pps, int eve > */ > > static int tc_tick; > -SYSCTL_INT(_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, &tc_tick, 0, ""); > +SYSCTL_INT(_kern_timecounter, OID_AUTO, tick, CTLFLAG_RD, &tc_tick, 0, "Approximate number of hardclock ticks in a millisecond"); It can't possibly be that if a hardclock tick is much larger than a millisecond, and this doesn't describe its purpose. It is actually a rate limiter for timecounter updates, to avoid the natural rate of once per hardclock tick if that is considered too frequent. Thus it has nothing to do with milliseconds except once per millisecond is considered frequent enough. It is the number of hardclock ticks between timercounter updates. Bruce From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 03:05:33 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96FCD106566C; Mon, 15 Nov 2010 03:05:33 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 851C48FC1D; Mon, 15 Nov 2010 03:05:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAF35Xi1002235; Mon, 15 Nov 2010 03:05:33 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAF35Xu1002233; Mon, 15 Nov 2010 03:05:33 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201011150305.oAF35Xu1002233@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 15 Nov 2010 03:05:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215331 - head/sbin/hastd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 03:05:33 -0000 Author: pjd Date: Mon Nov 15 03:05:33 2010 New Revision: 215331 URL: http://svn.freebsd.org/changeset/base/215331 Log: 1. Exit when we cannot create incoming connection. 2. Improve logging to inform which connection can't be created. Submitted by: [1] Mikolaj Golub MFC after: 3 days Modified: head/sbin/hastd/primary.c Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Mon Nov 15 02:27:01 2010 (r215330) +++ head/sbin/hastd/primary.c Mon Nov 15 03:05:33 2010 (r215331) @@ -511,7 +511,8 @@ init_remote(struct hast_resource *res, s /* Prepare outgoing connection with remote node. */ if (proto_client(res->hr_remoteaddr, &out) < 0) { - primary_exit(EX_TEMPFAIL, "Unable to create connection to %s", + primary_exit(EX_TEMPFAIL, + "Unable to create outgoing connection to %s", res->hr_remoteaddr); } /* Try to connect, but accept failure. */ @@ -577,7 +578,8 @@ init_remote(struct hast_resource *res, s * Setup incoming connection with remote node. */ if (proto_client(res->hr_remoteaddr, &in) < 0) { - pjdlog_errno(LOG_WARNING, "Unable to create connection to %s", + primary_exit(EX_TEMPFAIL, + "Unable to create incoming connection to %s", res->hr_remoteaddr); } /* Try to connect, but accept failure. */ From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 03:07:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF3EB106566B; Mon, 15 Nov 2010 03:07:42 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD5758FC13; Mon, 15 Nov 2010 03:07:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAF37gIq002304; Mon, 15 Nov 2010 03:07:42 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAF37g0W002302; Mon, 15 Nov 2010 03:07:42 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201011150307.oAF37g0W002302@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 15 Nov 2010 03:07:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215332 - head/sbin/hastd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 03:07:42 -0000 Author: pjd Date: Mon Nov 15 03:07:42 2010 New Revision: 215332 URL: http://svn.freebsd.org/changeset/base/215332 Log: Move timeout.tv_sec initialization outside the loop - sigtimedwait(2) won't modify it. Submitted by: Mikolaj Golub MFC after: 3 days Modified: head/sbin/hastd/primary.c Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Mon Nov 15 03:05:33 2010 (r215331) +++ head/sbin/hastd/primary.c Mon Nov 15 03:07:42 2010 (r215332) @@ -2010,6 +2010,7 @@ guard_thread(void *arg) PJDLOG_VERIFY(sigaddset(&mask, SIGINT) == 0); PJDLOG_VERIFY(sigaddset(&mask, SIGTERM) == 0); + timeout.tv_sec = RETRY_SLEEP; timeout.tv_nsec = 0; signo = -1; @@ -2035,7 +2036,6 @@ guard_thread(void *arg) guard_one(res, ii); lastcheck = now; } - timeout.tv_sec = RETRY_SLEEP; signo = sigtimedwait(&mask, NULL, &timeout); } /* NOTREACHED */ From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 03:34:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id BC5241065673; Mon, 15 Nov 2010 03:34:09 +0000 (UTC) Date: Mon, 15 Nov 2010 03:34:09 +0000 From: Alexey Dokuchaev To: Warner Losh Message-ID: <20101115033409.GA52905@FreeBSD.org> References: <201011140137.oAE1b9CW066153@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201011140137.oAE1b9CW066153@svn.freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215274 - head/share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 03:34:09 -0000 On Sun, Nov 14, 2010 at 01:37:09AM +0000, Warner Losh wrote: > Author: imp > Date: Sun Nov 14 01:37:08 2010 > New Revision: 215274 > URL: http://svn.freebsd.org/changeset/base/215274 > > Log: > This case is actually powerpc specific, and doesn't apply to powerpc64. > > Submitted by: nathanw@ finger nathanw@freebsd.org [...] finger: nathanw: no such user ./danfe From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 03:38:54 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 997EC106564A; Mon, 15 Nov 2010 03:38:54 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 8493E8FC13; Mon, 15 Nov 2010 03:38:53 +0000 (UTC) Received: by wwi14 with SMTP id 14so512055wwi.31 for ; Sun, 14 Nov 2010 19:38:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=vFwmrsNc9+ag0D9plyH9QbZe1fvtlkRsivMaLWOwn70=; b=lZDKb4Z+GGWi9NvlkNQVLK+aYl4hkOUAlxYud+kXch96wn5ks9VgDmTZAYnvMdF3k3 ImxMtSOWNphmyVOyffNC6IbdS4WN2ryhfQHChyC8jj9PEitLJaxsayR+tMlOjRyP1/cD esoVvknphSz2T2O6eAL7q5cEdPxdIFSWtpMqQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=a2tuojSAM4WwoXYuTNWWtvQJY65iBLmc9WJR/TGZv7uo3Zyi+MGE8CxYGh6aLc9LO4 +1d9oJSNVxYwprTspvZdK4gJ60Ju5XCOtmNkiPXAhb4hbcrDE589rrhmKgmxXM/H73i1 FoJYpySHPdGUcwmqs+z42a/sfbVmSm+kPOpPc= MIME-Version: 1.0 Received: by 10.216.175.18 with SMTP id y18mr5361036wel.30.1289792331391; Sun, 14 Nov 2010 19:38:51 -0800 (PST) Sender: yanegomi@gmail.com Received: by 10.216.198.27 with HTTP; Sun, 14 Nov 2010 19:38:51 -0800 (PST) In-Reply-To: <20101115033409.GA52905@FreeBSD.org> References: <201011140137.oAE1b9CW066153@svn.freebsd.org> <20101115033409.GA52905@FreeBSD.org> Date: Sun, 14 Nov 2010 19:38:51 -0800 X-Google-Sender-Auth: ikijXThvhiAlvG226RC93f_K3hA Message-ID: From: Garrett Cooper To: Alexey Dokuchaev Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh Subject: Re: svn commit: r215274 - head/share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 03:38:54 -0000 2010/11/14 Alexey Dokuchaev : > On Sun, Nov 14, 2010 at 01:37:09AM +0000, Warner Losh wrote: >> Author: imp >> Date: Sun Nov 14 01:37:08 2010 >> New Revision: 215274 >> URL: http://svn.freebsd.org/changeset/base/215274 >> >> Log: >> =A0 This case is actually powerpc specific, and doesn't apply to powerpc= 64. >> >> =A0 Submitted by: =A0 =A0 =A0 nathanw@ > > finger nathanw@freebsd.org > [...] > finger: nathanw: no such user Was supposed to be nwhitehorn@ -Garrett From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 03:47:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 07302106566C; Mon, 15 Nov 2010 03:47:30 +0000 (UTC) Date: Mon, 15 Nov 2010 03:47:30 +0000 From: Alexey Dokuchaev To: Garrett Cooper Message-ID: <20101115034729.GA68931@FreeBSD.org> References: <201011140137.oAE1b9CW066153@svn.freebsd.org> <20101115033409.GA52905@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh Subject: Re: svn commit: r215274 - head/share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 03:47:30 -0000 On Sun, Nov 14, 2010 at 07:38:51PM -0800, Garrett Cooper wrote: > 2010/11/14 Alexey Dokuchaev : > > On Sun, Nov 14, 2010 at 01:37:09AM +0000, Warner Losh wrote: > >> Log: > >> š This case is actually powerpc specific, and doesn't apply to powerpc64. > >> > >> š Submitted by: š š š nathanw@ > > > > finger nathanw@freebsd.org > > [...] > > finger: nathanw: no such user > > Was supposed to be nwhitehorn@ You know that, I know, and others likely know it as well. My point, however, is that this might not be true to someone reading the logs 10 years from now. ./danfe From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 04:12:50 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5B4E106564A; Mon, 15 Nov 2010 04:12:50 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id A34A28FC19; Mon, 15 Nov 2010 04:12:50 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id oAF44llr010206; Sun, 14 Nov 2010 21:04:47 -0700 (MST) (envelope-from imp@bsdimp.com) Message-ID: <4CE0B15F.2050006@bsdimp.com> Date: Sun, 14 Nov 2010 21:04:47 -0700 From: Warner Losh User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.9) Gecko/20100918 Thunderbird/3.1.4 MIME-Version: 1.0 To: Alexey Dokuchaev References: <201011140137.oAE1b9CW066153@svn.freebsd.org> <20101115033409.GA52905@FreeBSD.org> <20101115034729.GA68931@FreeBSD.org> In-Reply-To: <20101115034729.GA68931@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Warner Losh , Garrett Cooper Subject: Re: svn commit: r215274 - head/share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 04:12:51 -0000 On 11/14/2010 20:47, Alexey Dokuchaev wrote: > On Sun, Nov 14, 2010 at 07:38:51PM -0800, Garrett Cooper wrote: >> 2010/11/14 Alexey Dokuchaev: >>> On Sun, Nov 14, 2010 at 01:37:09AM +0000, Warner Losh wrote: >>>> Log: >>>> This case is actually powerpc specific, and doesn't apply to powerpc64. >>>> >>>> Submitted by: nathanw@ >>> finger nathanw@freebsd.org >>> [...] >>> finger: nathanw: no such user >> Was supposed to be nwhitehorn@ > You know that, I know, and others likely know it as well. My point, > however, is that this might not be true to someone reading the logs 10 > years from now. Point taken. I'd forgotten he's backwards in email than in irc. :) Warner > ./danfe > > > From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 05:25:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27B25106566C; Mon, 15 Nov 2010 05:25:52 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 133568FC24; Mon, 15 Nov 2010 05:25:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAF5PpJI005453; Mon, 15 Nov 2010 05:25:51 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAF5Pp8J005442; Mon, 15 Nov 2010 05:25:51 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201011150525.oAF5Pp8J005442@svn.freebsd.org> From: Doug Barton Date: Mon, 15 Nov 2010 05:25:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215334 - in head: share/doc/papers/jail share/doc/smm/01.setup share/man/man8 sys/dev/firewire sys/dev/tdfx usr.sbin/config/SMM.doc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 05:25:52 -0000 Author: dougb Date: Mon Nov 15 05:25:51 2010 New Revision: 215334 URL: http://svn.freebsd.org/changeset/base/215334 Log: Remove references to MAKEDEV(8) Deleted: head/share/man/man8/MAKEDEV.8 Modified: head/share/doc/papers/jail/mgt.ms head/share/doc/smm/01.setup/2.t head/share/doc/smm/01.setup/4.t head/share/doc/smm/01.setup/5.t head/share/doc/smm/01.setup/spell.ok head/share/man/man8/Makefile head/sys/dev/firewire/00README head/sys/dev/tdfx/tdfx_pci.c head/usr.sbin/config/SMM.doc/6.t head/usr.sbin/config/SMM.doc/spell.ok Modified: head/share/doc/papers/jail/mgt.ms ============================================================================== --- head/share/doc/papers/jail/mgt.ms Mon Nov 15 03:13:36 2010 (r215333) +++ head/share/doc/papers/jail/mgt.ms Mon Nov 15 05:25:51 2010 (r215334) @@ -56,8 +56,6 @@ FreeBSD build environment. .PP One notable difference from the default FreeBSD install is that only a limited set of device nodes should be created. -MAKEDEV(8) has been modified to accept a ``jail'' argument that creates -the correct set of nodes. .PP To improve storage efficiency, a fair number of the binaries in the system tree may be deleted, as they are not relevant in a jail environment. Modified: head/share/doc/smm/01.setup/2.t ============================================================================== --- head/share/doc/smm/01.setup/2.t Mon Nov 15 03:13:36 2010 (r215333) +++ head/share/doc/smm/01.setup/2.t Mon Nov 15 05:25:51 2010 (r215334) @@ -482,13 +482,7 @@ lw(2i) l. \fB#\fP \fImount_mfs -s 1000 -T type /dev/null /tmp\fP (create a writable filesystem) (\fItype\fP is the disk type as determined from /etc/disktab) \fB#\fP \fIcd /tmp\fP (connect to that directory) -\fB#\fP \fI../dev/MAKEDEV \*(Dk#\fP (create special files for root disk) -(\fI\*(Dk\fP is the disk type, \fI#\fP is the unit number) -(ignore warning from ``sh'') \fB#\fP \fImount \-uw /tmp/\*(Dk#a /\fP (read-write mount root filesystem) -\fB#\fP \fIcd /dev\fP (go to device directory) -\fB#\fP \fI./MAKEDEV \*(Dk#\fP (create permanent special files for root disk) -(again, ignore warning from ``sh'') .TE .DE .Sh 4 "Step 4: (optional) restoring the root filesystem" @@ -513,8 +507,6 @@ To really create the root filesystem on you should first label the disk as described in step 5 below. Then run the following commands: .DS -\fB#\fP \fIcd /dev\fP -\fB#\fP \fI./MAKEDEV \*(Dk1a\fP \fB#\fP\|\fInewfs /dev/r\*(Dk1a\fP \fB#\fP\|\fImount /dev/\*(Dk1a /mnt\fP \fB#\fP\|\fIcd /mnt\fP @@ -1393,8 +1385,6 @@ To make the .Pn /var filesystem we would do: .DS -\fB#\fP \fIcd /dev\fP -\fB#\fP \fIMAKEDEV \*(Dk1\fP \fB#\fP \fIdisklabel -wr \*(Dk1 "disk type" "disk name"\fP \fB#\fP \fInewfs \*(Dk1f\fP (information about filesystem prints out) Modified: head/share/doc/smm/01.setup/4.t ============================================================================== --- head/share/doc/smm/01.setup/4.t Mon Nov 15 03:13:36 2010 (r215333) +++ head/share/doc/smm/01.setup/4.t Mon Nov 15 05:25:51 2010 (r215334) @@ -30,6 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)4.t 8.1 (Berkeley) 7/29/93 +.\" $FreeBSD$ .\" .ds LH "Installing/Operating \*(4B .ds CF \*(Dy @@ -152,38 +153,11 @@ directory. For all the devices supported by the distribution system, the files in .Pn /dev -are created by the -.Pn /dev/MAKEDEV -shell script. +are created by devfs. .PP Determine the set of devices that you have and create a new .Pn /dev -directory by running the MAKEDEV script. -First create a new directory -.Pn /newdev , -copy MAKEDEV into it, edit the file MAKEDEV.local -to provide an entry for local needs, -and run it to generate a -.Pn /newdev directory. -For instance, -.DS -\fB#\fP \fIcd /\fP -\fB#\fP \fImkdir newdev\fP -\fB#\fP \fIcp dev/MAKEDEV newdev/MAKEDEV\fP -\fB#\fP \fIcd newdev\fP -\fB#\fP \fIMAKEDEV \*(Dk0 pt0 std LOCAL\fP -.DE -Note the ``std'' argument causes standard devices such as -.Pn /dev/console , -the machine console, to be created. -.PP -You can then do -.DS -\fB#\fP \fIcd /\fP -\fB#\fP \fImv dev olddev ; mv newdev dev\fP -\fB#\fP \fIsync\fP -.DE -to install the new device directory. +directory by mounting devfs. .Sh 3 "Building new system images" .PP The kernel configuration of each UNIX system is described by @@ -232,8 +206,8 @@ the file must be edited. .PP To add a new terminal device, be sure the device is configured into the system -and that the special files for the device have been made by -.Pn /dev/MAKEDEV . +and that the special files for the device exist in +.Pn /dev . Then, enable the appropriate lines of .Pn /etc/ttys by setting the ``status'' @@ -335,9 +309,6 @@ Finally note that you should change the terminals to ttyd? where ? is in [0-9a-zA-Z], as some programs use this property of the names to determine if a terminal is a dialup. -Shell commands to do this should be put in the -.Pn /dev/MAKEDEV.local -script. .PP While it is possible to use truly arbitrary strings for terminal names, the accounting and noticeably the Modified: head/share/doc/smm/01.setup/5.t ============================================================================== --- head/share/doc/smm/01.setup/5.t Mon Nov 15 03:13:36 2010 (r215333) +++ head/share/doc/smm/01.setup/5.t Mon Nov 15 05:25:51 2010 (r215334) @@ -30,6 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)5.t 8.1 (Berkeley) 7/27/93 +.\" $FreeBSD$ .\" .ds lq `` .ds rq '' @@ -111,35 +112,6 @@ translations for machines that do not pa command. Additional information is provided in the manual page describing .Xr ESIS (4). -.PP -To use the pseudo terminals just configured, device -entries must be created in the -.Pn /dev -directory. To create 32 -pseudo terminals (plenty, unless you have a heavy network load) -execute the following commands. -.DS -\fB#\fP \fIcd /dev\fP -\fB#\fP \fIMAKEDEV pty0 pty1\fP -.DE -More pseudo terminals may be made by specifying -.Pn pty2 , -.Pn pty3 , -etc. The kernel normally includes support for 32 pseudo terminals -unless the configuration file specifies a different number. -Each pseudo terminal really consists of two files in -.Pn /dev : -a master and a slave. The master pseudo terminal file is named -.Pn /dev/ptyp? , -while the slave side is -.Pn /dev/ttyp? . -Pseudo terminals are also used by several programs not related to the network. -In addition to creating the pseudo terminals, -be sure to install them in the -.Pn /etc/ttys -file (with a `none' in the second column so no -.Xr getty -is started). .Sh 2 "Local subnets" .PP In \*(4B the Internet support Modified: head/share/doc/smm/01.setup/spell.ok ============================================================================== --- head/share/doc/smm/01.setup/spell.ok Mon Nov 15 03:13:36 2010 (r215333) +++ head/share/doc/smm/01.setup/spell.ok Mon Nov 15 05:25:51 2010 (r215334) @@ -1,3 +1,4 @@ +# $FreeBSD$ A1096A AA ACU @@ -91,7 +92,6 @@ LK201 LOGFILE Leffler Luna -MAKEDEV.local MB MC68040 MFS Modified: head/share/man/man8/Makefile ============================================================================== --- head/share/man/man8/Makefile Mon Nov 15 03:13:36 2010 (r215333) +++ head/share/man/man8/Makefile Mon Nov 15 05:25:51 2010 (r215334) @@ -4,7 +4,6 @@ MAN= crash.8 \ diskless.8 \ intro.8 \ - MAKEDEV.8 \ nanobsd.8 \ picobsd.8 \ rc.8 \ Modified: head/sys/dev/firewire/00README ============================================================================== --- head/sys/dev/firewire/00README Mon Nov 15 03:13:36 2010 (r215333) +++ head/sys/dev/firewire/00README Mon Nov 15 05:25:51 2010 (r215334) @@ -44,10 +44,6 @@ IEEE 1394 support for FreeBSD-5.X and 4. - make install - make load - For FreeBSD-4 user: - - - ./MAKEDEV - 3. SBP-II support (sbp) - You need CAM(SCSI) support in your kernel. Modified: head/sys/dev/tdfx/tdfx_pci.c ============================================================================== --- head/sys/dev/tdfx/tdfx_pci.c Mon Nov 15 03:13:36 2010 (r215333) +++ head/sys/dev/tdfx/tdfx_pci.c Mon Nov 15 05:25:51 2010 (r215334) @@ -250,7 +250,7 @@ tdfx_attach(device_t dev) { /* * make_dev registers the cdev to access the 3dfx card from /dev * use hex here for the dev num, simply to provide better support if > 10 - * voodoo cards, for the mad. The user must set the link, or use MAKEDEV. + * voodoo cards, for the mad. The user must set the link. * Why would we want that many voodoo cards anyhow? */ tdfx_info->devt = make_dev(&tdfx_cdev, device_get_unit(dev), Modified: head/usr.sbin/config/SMM.doc/6.t ============================================================================== --- head/usr.sbin/config/SMM.doc/6.t Mon Nov 15 03:13:36 2010 (r215333) +++ head/usr.sbin/config/SMM.doc/6.t Mon Nov 15 05:25:51 2010 (r215334) @@ -30,6 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)6.t 8.1 (Berkeley) 6/8/93 +.\" $FreeBSD$ .\" .\".ds RH "Adding New Devices .ne 2i @@ -230,10 +231,3 @@ Remember that the position in the device table specifies the major device number. The block major number is needed in the ``devices.machine'' file if the device is a disk. -.PP -With the configuration information in place, your configuration -file appropriately modified, and a system reconfigured and rebooted -you should incorporate the shell commands needed to install the special -files in the file system to the file ``/dev/MAKEDEV'' or -``/dev/MAKEDEV.local''. This is discussed in the document ``Installing -and Operating 4.4BSD''. Modified: head/usr.sbin/config/SMM.doc/spell.ok ============================================================================== --- head/usr.sbin/config/SMM.doc/spell.ok Mon Nov 15 03:13:36 2010 (r215333) +++ head/usr.sbin/config/SMM.doc/spell.ok Mon Nov 15 05:25:51 2010 (r215334) @@ -1,3 +1,4 @@ +# $FreeBSD$ ACC ANSEL ARP @@ -38,8 +39,6 @@ Info Karels LH Leffler -MAKEDEV -MAKEDEV.local MASSBUS MAXDSIZ MAXTSIZ From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 05:30:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27739106564A for ; Mon, 15 Nov 2010 05:30:52 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx23.fluidhosting.com [204.14.89.6]) by mx1.freebsd.org (Postfix) with ESMTP id A73468FC16 for ; Mon, 15 Nov 2010 05:30:51 +0000 (UTC) Received: (qmail 23861 invoked by uid 399); 15 Nov 2010 05:30:50 -0000 Received: from localhost (HELO doug-optiplex.ka9q.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 15 Nov 2010 05:30:50 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4CE0C589.6030407@FreeBSD.org> Date: Sun, 14 Nov 2010 21:30:49 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101028 Thunderbird/3.1.6 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201011150525.oAF5Pp8J005442@svn.freebsd.org> In-Reply-To: <201011150525.oAF5Pp8J005442@svn.freebsd.org> X-Enigmail-Version: 1.1.2 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r215334 - in head: share/doc/papers/jail share/doc/smm/01.setup share/man/man8 sys/dev/firewire sys/dev/tdfx usr.sbin/config/SMM.doc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 05:30:52 -0000 If anyone has suggestions for better wording and/or markup on any of these changes feel free to commit them directly, and let me know. I plan to MFC these changes before the impending releases. Doug From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 06:04:25 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF02F106566B; Mon, 15 Nov 2010 06:04:25 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BDA918FC13; Mon, 15 Nov 2010 06:04:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAF64PrW006270; Mon, 15 Nov 2010 06:04:25 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAF64PFC006268; Mon, 15 Nov 2010 06:04:25 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201011150604.oAF64PFC006268@svn.freebsd.org> From: Kevin Lo Date: Mon, 15 Nov 2010 06:04:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215335 - head/sys/dev/usb/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 06:04:25 -0000 Author: kevlo Date: Mon Nov 15 06:04:25 2010 New Revision: 215335 URL: http://svn.freebsd.org/changeset/base/215335 Log: Remove unused struct rue_type Modified: head/sys/dev/usb/net/if_ruereg.h Modified: head/sys/dev/usb/net/if_ruereg.h ============================================================================== --- head/sys/dev/usb/net/if_ruereg.h Mon Nov 15 05:25:51 2010 (r215334) +++ head/sys/dev/usb/net/if_ruereg.h Mon Nov 15 06:04:25 2010 (r215335) @@ -157,11 +157,6 @@ struct rue_intrpkt { uint8_t rue_col_cnt; } __packed; -struct rue_type { - uint16_t rue_vid; - uint16_t rue_did; -}; - enum { RUE_BULK_DT_WR, RUE_BULK_DT_RD, From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 07:33:54 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1ACA106566B; Mon, 15 Nov 2010 07:33:54 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90A928FC18; Mon, 15 Nov 2010 07:33:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAF7Xswk008198; Mon, 15 Nov 2010 07:33:54 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAF7XsQ1008196; Mon, 15 Nov 2010 07:33:54 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201011150733.oAF7XsQ1008196@svn.freebsd.org> From: David Xu Date: Mon, 15 Nov 2010 07:33:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215336 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 07:33:54 -0000 Author: davidxu Date: Mon Nov 15 07:33:54 2010 New Revision: 215336 URL: http://svn.freebsd.org/changeset/base/215336 Log: Only unlock process if a thread is found. Modified: head/sys/kern/kern_umtx.c Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Mon Nov 15 06:04:25 2010 (r215335) +++ head/sys/kern/kern_umtx.c Mon Nov 15 07:33:54 2010 (r215336) @@ -1592,11 +1592,11 @@ umtxq_sleep_pi(struct umtx_q *uq, struct /* XXX Only look up thread in current process. */ td1 = tdfind(owner, curproc->p_pid); mtx_lock_spin(&umtx_lock); - if (td1 != NULL && pi->pi_owner == NULL) { - uq1 = td1->td_umtxq; - umtx_pi_setowner(pi, td1); + if (td1 != NULL) { + if (pi->pi_owner == NULL) + umtx_pi_setowner(pi, td1); + PROC_UNLOCK(td1->td_proc); } - PROC_UNLOCK(td1->td_proc); } TAILQ_FOREACH(uq1, &pi->pi_blocked, uq_lockq) { From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 09:43:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 881D4106564A; Mon, 15 Nov 2010 09:43:42 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 931BE8FC08; Mon, 15 Nov 2010 09:43:41 +0000 (UTC) Received: by fxm19 with SMTP id 19so3765751fxm.13 for ; Mon, 15 Nov 2010 01:43:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject :organization:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; bh=UPwD0FRMRveBWTA/8fY8cH+FKZwWXuHim5iQCf1hYg8=; b=QLvdmSaPr7SIymbyB+rLJxbgefeYB8+5N5ep5CucsvUMjFDqiUdmwWSLVwuc/fG5Z9 Bhk+7+zH01nePlPf1BB8liAEmLXFIu44T8YIJm+07nZANN17mRJTuOJivs5MQB2z5oxH BPlWVueSmHjjRU+sYbtWqj8Ta4K7A84Uf7wMI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:organization:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; b=utX1QlWP0OlC858mYj00lH1Xk3DEnWQiu57nb1JgJtA/V4T6oZmiFp5jxVKDcnk9cE /BXKUTp+G6q/lvJaF62bTuP1QSlclqO0TfTXOc3rn2Sf41Gd2YQ+ertnSFwO7KVp3Ccm XzwWP3sLOjL2iwmrl6HVOORiiZMyq0pixskAc= Received: by 10.223.116.5 with SMTP id k5mr2195235faq.123.1289814220535; Mon, 15 Nov 2010 01:43:40 -0800 (PST) Received: from localhost (ua1.etadirect.net [91.198.140.16]) by mx.google.com with ESMTPS id a25sm420106fak.20.2010.11.15.01.43.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 15 Nov 2010 01:43:39 -0800 (PST) From: Mikolaj Golub To: Lawrence Stewart Organization: TOA Ukraine References: <201011120641.oAC6fui3098584@svn.freebsd.org> <8662w17e90.fsf@kopusha.home.net> <4CDF3A58.6080505@freebsd.org> <86pqu8q6lb.fsf@kopusha.home.net> <4CE08BB6.1090304@freebsd.org> Date: Mon, 15 Nov 2010 11:43:36 +0200 In-Reply-To: <4CE08BB6.1090304@freebsd.org> (Lawrence Stewart's message of "Mon, 15 Nov 2010 12:24:06 +1100") Message-ID: <86ipzyncqf.fsf@zhuzha.ua1> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r215166 - in head: . sys/conf sys/netinet sys/netinet/cc sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 09:43:42 -0000 On Mon, 15 Nov 2010 12:24:06 +1100 Lawrence Stewart wrote: LS> On 11/15/10 02:15, Mikolaj Golub wrote: >> >> LS> Would you mind testing the following patch? It fixes the panic for me. >> >> LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit.patch >> >> With this patch the system hangs during the boot. Ctr-Alt-Esc to break into >> ddb does not work. I am trying this under VirtualBox. LS> I can't reproduce a hang, but please try this patch instead: LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit_v2.patch I can't try it now on the box where I observed the hang. Trying on another box I can't reproduce the hang -- both patches works for me: no hang and I can create/remove jail and tcp connections to jail work. I will try the patch on the "problem" box tonight. -- Mikolaj Golub From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 11:57:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16F771065673; Mon, 15 Nov 2010 11:57:13 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 725998FC08; Mon, 15 Nov 2010 11:57:12 +0000 (UTC) Received: by qwd6 with SMTP id 6so46784qwd.13 for ; Mon, 15 Nov 2010 03:57:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=h0uR2pJoonGKmjW2/vreEElHZ7yzwGu/gVNdTDy6V8M=; b=W19Rv7M+N0aOPl/+RjV1EFAoM8ua+YVcV8mFo+4F0hrH9hMDqIk1Oyj5b+T6eGPfwn p/QBxzqeApET9nkmrBqHv6IiDAErlC592EoMZskbxZpPnv/xKVMf1myjNk1nah5NR5Pl 7N6y0MM8Vy9ELDh9TffQorUlMjc/pPEE1VKaY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=VO4MsrSQPShPWAR0BIAncNK78qbO8/DuZ4l9HwEyd5nPEMQTaTDXXNlsulrC3QEeMB TbmDmuZh5jDr/sqfoP0EImk5MVjJC9efQG+nzN5Rc9sorrHGlOArJJpKGwC2Plye2Ocl q0BUP79ACF7zC+KGS8r5op3EHeMnyA31e5hOw= Received: by 10.229.232.15 with SMTP id js15mr5032689qcb.161.1289822231084; Mon, 15 Nov 2010 03:57:11 -0800 (PST) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.229.231.143 with HTTP; Mon, 15 Nov 2010 03:56:29 -0800 (PST) In-Reply-To: <201011121302.oACD2Qjt009385@svn.freebsd.org> References: <201011121302.oACD2Qjt009385@svn.freebsd.org> From: Ivan Voras Date: Mon, 15 Nov 2010 12:56:29 +0100 X-Google-Sender-Auth: Ixzq7-YgIFk9l8yvYOUM3TD4Npw Message-ID: To: Luigi Rizzo Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215178 - in head: lib/libc/sys sys/kern sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 11:57:13 -0000 On 12 November 2010 14:02, Luigi Rizzo wrote: > Author: luigi > Date: Fri Nov 12 13:02:26 2010 > New Revision: 215178 > URL: http://svn.freebsd.org/changeset/base/215178 > > Log: > =C2=A0This commit implements the SO_USER_COOKIE socket option, which lets > =C2=A0you tag a socket with an uint32_t value. The cookie can then be > =C2=A0used by the kernel for various purposes, e.g. setting the skipto > =C2=A0rule or pipe number in ipfw (this is the reason SO_USER_COOKIE has > =C2=A0been implemented; however there is nothing ipfw-specific in its > =C2=A0implementation). While at it, why not intptr_t? It would be marginally more useful and almost free. From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 13:03:36 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE31910656D0; Mon, 15 Nov 2010 13:03:36 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F0DB68FC12; Mon, 15 Nov 2010 13:03:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAFD3ZIH017572; Mon, 15 Nov 2010 13:03:35 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFD3ZrE017569; Mon, 15 Nov 2010 13:03:35 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201011151303.oAFD3ZrE017569@svn.freebsd.org> From: Alexander Leidinger Date: Mon, 15 Nov 2010 13:03:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215338 - head/sys/compat/linux X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 13:03:37 -0000 Author: netchild Date: Mon Nov 15 13:03:35 2010 New Revision: 215338 URL: http://svn.freebsd.org/changeset/base/215338 Log: - print out the PID and program name of the program trying to use an unsupported futex operation - for those futex operations which are known to be not supported, print out which futex operation it is - shortcut the error return of the unsupported FUTEX_CLOCK_REALTIME in some cases: FUTEX_CLOCK_REALTIME can be used to tell linux to use CLOCK_REALTIME instead of CLOCK_MONOTONIC. FUTEX_CLOCK_REALTIME however must only be set, if either FUTEX_WAIT_BITSET or FUTEX_WAIT_REQUEUE_PI are set too. If that's not the case we can die with ENOSYS right at the beginning. Submitted by: arundel Reviewed by: rdivacky (earlier iteration of the patch) MFC after: 1 week Modified: head/sys/compat/linux/linux_futex.c head/sys/compat/linux/linux_futex.h Modified: head/sys/compat/linux/linux_futex.c ============================================================================== --- head/sys/compat/linux/linux_futex.c Mon Nov 15 09:41:46 2010 (r215337) +++ head/sys/compat/linux/linux_futex.c Mon Nov 15 13:03:35 2010 (r215338) @@ -416,7 +416,7 @@ futex_atomic_op(struct thread *td, int e int linux_sys_futex(struct thread *td, struct linux_sys_futex_args *args) { - int op_ret, val, ret, nrwake; + int clockrt, nrwake, op_ret, ret, val; struct linux_emuldata *em; struct waiting_proc *wp; struct futex *f, *f2 = NULL; @@ -429,7 +429,19 @@ linux_sys_futex(struct thread *td, struc * in most cases (ie. when futexes are not shared on file descriptor * or between different processes.). */ - args->op = (args->op & ~LINUX_FUTEX_PRIVATE_FLAG); + args->op = args->op & ~LINUX_FUTEX_PRIVATE_FLAG; + + /* + * Currently support for switching between CLOCK_MONOTONIC and + * CLOCK_REALTIME is not present. However Linux forbids the use of + * FUTEX_CLOCK_REALTIME with any op except FUTEX_WAIT_BITSET and + * FUTEX_WAIT_REQUEUE_PI. + */ + clockrt = args->op & LINUX_FUTEX_CLOCK_REALTIME; + args->op = args->op & ~LINUX_FUTEX_CLOCK_REALTIME; + if (clockrt && args->op != LINUX_FUTEX_WAIT_BITSET && + args->op != LINUX_FUTEX_WAIT_REQUEUE_PI) + return (ENOSYS); switch (args->op) { case LINUX_FUTEX_WAIT: @@ -612,14 +624,23 @@ linux_sys_futex(struct thread *td, struc case LINUX_FUTEX_LOCK_PI: /* not yet implemented */ + linux_msg(td, + "linux_sys_futex: " + "op LINUX_FUTEX_LOCK_PI not implemented.\n"); return (ENOSYS); case LINUX_FUTEX_UNLOCK_PI: /* not yet implemented */ + linux_msg(td, + "linux_sys_futex: " + "op LINUX_FUTEX_UNLOCK_PI not implemented.\n"); return (ENOSYS); case LINUX_FUTEX_TRYLOCK_PI: /* not yet implemented */ + linux_msg(td, + "linux_sys_futex: " + "op LINUX_FUTEX_TRYLOCK_PI not implemented.\n"); return (ENOSYS); case LINUX_FUTEX_REQUEUE: @@ -632,15 +653,30 @@ linux_sys_futex(struct thread *td, struc */ em = em_find(td->td_proc, EMUL_DONTLOCK); if (em->used_requeue == 0) { - printf("linux(%s (%d)) sys_futex: " - "unsupported futex_requeue op\n", - td->td_proc->p_comm, td->td_proc->p_pid); + linux_msg(td, + "linux_sys_futex: " + "unsupported futex_requeue op\n"); em->used_requeue = 1; } return (EINVAL); + case LINUX_FUTEX_WAIT_BITSET: + /* not yet implemented */ + linux_msg(td, + "linux_sys_futex: " + "op FUTEX_WAIT_BITSET not implemented.\n"); + return (ENOSYS); + + case LINUX_FUTEX_WAIT_REQUEUE_PI: + /* not yet implemented */ + linux_msg(td, + "linux_sys_futex: " + "op FUTEX_WAIT_REQUEUE_PI not implemented.\n"); + return (ENOSYS); + default: - printf("linux_sys_futex: unknown op %d\n", args->op); + linux_msg(td, + "linux_sys_futex: unknown op %d\n", args->op); return (ENOSYS); } Modified: head/sys/compat/linux/linux_futex.h ============================================================================== --- head/sys/compat/linux/linux_futex.h Mon Nov 15 09:41:46 2010 (r215337) +++ head/sys/compat/linux/linux_futex.h Mon Nov 15 13:03:35 2010 (r215338) @@ -39,17 +39,20 @@ extern LIST_HEAD(futex_list, futex) futex_list; extern struct mtx futex_mtx; -#define LINUX_FUTEX_WAIT 0 -#define LINUX_FUTEX_WAKE 1 -#define LINUX_FUTEX_FD 2 /* unused */ -#define LINUX_FUTEX_REQUEUE 3 -#define LINUX_FUTEX_CMP_REQUEUE 4 -#define LINUX_FUTEX_WAKE_OP 5 -#define LINUX_FUTEX_LOCK_PI 6 -#define LINUX_FUTEX_UNLOCK_PI 7 -#define LINUX_FUTEX_TRYLOCK_PI 8 +#define LINUX_FUTEX_WAIT 0 +#define LINUX_FUTEX_WAKE 1 +#define LINUX_FUTEX_FD 2 /* unused */ +#define LINUX_FUTEX_REQUEUE 3 +#define LINUX_FUTEX_CMP_REQUEUE 4 +#define LINUX_FUTEX_WAKE_OP 5 +#define LINUX_FUTEX_LOCK_PI 6 +#define LINUX_FUTEX_UNLOCK_PI 7 +#define LINUX_FUTEX_TRYLOCK_PI 8 +#define LINUX_FUTEX_WAIT_BITSET 9 +#define LINUX_FUTEX_WAIT_REQUEUE_PI 11 #define LINUX_FUTEX_PRIVATE_FLAG 128 +#define LINUX_FUTEX_CLOCK_REALTIME 256 #define FUTEX_OP_SET 0 /* *(int *)UADDR2 = OPARG; */ #define FUTEX_OP_ADD 1 /* *(int *)UADDR2 += OPARG; */ From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 13:07:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A733D1065704; Mon, 15 Nov 2010 13:07:10 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 956B48FC21; Mon, 15 Nov 2010 13:07:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAFD7AFE017674; Mon, 15 Nov 2010 13:07:10 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFD7Ar3017672; Mon, 15 Nov 2010 13:07:10 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201011151307.oAFD7Ar3017672@svn.freebsd.org> From: Alexander Leidinger Date: Mon, 15 Nov 2010 13:07:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215339 - head/sys/compat/linux X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 13:07:10 -0000 Author: netchild Date: Mon Nov 15 13:07:10 2010 New Revision: 215339 URL: http://svn.freebsd.org/changeset/base/215339 Log: Some style(9) fixes. Submitted by: arundel MFC after: 1 week Modified: head/sys/compat/linux/linux_futex.c Modified: head/sys/compat/linux/linux_futex.c ============================================================================== --- head/sys/compat/linux/linux_futex.c Mon Nov 15 13:03:35 2010 (r215338) +++ head/sys/compat/linux/linux_futex.c Mon Nov 15 13:07:10 2010 (r215339) @@ -656,7 +656,7 @@ linux_sys_futex(struct thread *td, struc linux_msg(td, "linux_sys_futex: " "unsupported futex_requeue op\n"); - em->used_requeue = 1; + em->used_requeue = 1; } return (EINVAL); @@ -701,7 +701,7 @@ linux_set_robust_list(struct thread *td, em->robust_futexes = args->head; EMUL_UNLOCK(&emul_lock); - return (0); + return (0); } int @@ -719,7 +719,7 @@ linux_get_robust_list(struct thread *td, if (!args->pid) { em = em_find(td->td_proc, EMUL_DONTLOCK); - head = em->robust_futexes; + head = em->robust_futexes; } else { struct proc *p; @@ -729,14 +729,14 @@ linux_get_robust_list(struct thread *td, em = em_find(p, EMUL_DONTLOCK); /* XXX: ptrace? */ - if (priv_check(td, PRIV_CRED_SETUID) || + if (priv_check(td, PRIV_CRED_SETUID) || priv_check(td, PRIV_CRED_SETEUID) || p_candebug(td, p)) { PROC_UNLOCK(p); return (EPERM); } head = em->robust_futexes; - + PROC_UNLOCK(p); } From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 13:46:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B27351065672; Mon, 15 Nov 2010 13:46:50 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 6EA2C8FC16; Mon, 15 Nov 2010 13:46:50 +0000 (UTC) Received: from lawrence1.loshell.room52.net (ppp59-167-184-191.static.internode.on.net [59.167.184.191]) by lauren.room52.net (Postfix) with ESMTPSA id D1E807E84A; Tue, 16 Nov 2010 00:46:48 +1100 (EST) Message-ID: <4CE139C5.4010300@freebsd.org> Date: Tue, 16 Nov 2010 00:46:45 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-AU; rv:1.9.2.9) Gecko/20101006 Lightning/1.0b2 Thunderbird/3.1.4 MIME-Version: 1.0 To: Mikolaj Golub References: <201011120641.oAC6fui3098584@svn.freebsd.org> <8662w17e90.fsf@kopusha.home.net> <4CDF3A58.6080505@freebsd.org> <86pqu8q6lb.fsf@kopusha.home.net> <4CE08BB6.1090304@freebsd.org> <86ipzyncqf.fsf@zhuzha.ua1> In-Reply-To: <86ipzyncqf.fsf@zhuzha.ua1> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on lauren.room52.net Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215166 - in head: . sys/conf sys/netinet sys/netinet/cc sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 13:46:50 -0000 On 11/15/10 20:43, Mikolaj Golub wrote: > > On Mon, 15 Nov 2010 12:24:06 +1100 Lawrence Stewart wrote: > > LS> On 11/15/10 02:15, Mikolaj Golub wrote: > >> > >> LS> Would you mind testing the following patch? It fixes the panic for me. > >> > >> LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit.patch > >> > >> With this patch the system hangs during the boot. Ctr-Alt-Esc to break into > >> ddb does not work. I am trying this under VirtualBox. > > LS> I can't reproduce a hang, but please try this patch instead: > > LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit_v2.patch > > I can't try it now on the box where I observed the hang. Trying on another box > I can't reproduce the hang -- both patches works for me: no hang and I can > create/remove jail and tcp connections to jail work. > > I will try the patch on the "problem" box tonight. Ok thanks. If you are or anyone else is feeling really adventurous, I have created a series of patches that add better VIMAGE support to the framework. If you feel like testing them, they need to be applied in the following order: 1. Init the CC framework global state only once on system boot by switching to a SYSINIT. (You already have this one) http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit_v2.patch 2. When unloading an algo module, loop through all TCP control blocks in all vnets (instead of just the default vnet) to look for connections using the algo. http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnet_algounloadcleanup.patch 3. Move protocol specific implementation detail out of the core CC framework (not vnet specific but useful cleanup). http://people.freebsd.org/~lstewart/patches/5cc/modcc_tcpalgounload.patch 4. Create a per-vnet variable to store a ptr to the vnet's default CC algo and hook it up to a vnet aware sysctl handler. vnets can now choose their own default from the global list of registered algos independently of other vnets. http://people.freebsd.org/~lstewart/patches/5cc/modcc_pervnet_defaultalgo.patch It would be fine to test all of them in one go. The last one is the most intrusive and the one I'd most like to see some testing done with. Only if you feel like it of course. Cheers, Lawrence From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 14:40:55 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74A1E106564A; Mon, 15 Nov 2010 14:40:55 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4508D8FC13; Mon, 15 Nov 2010 14:40:53 +0000 (UTC) Received: by fxm19 with SMTP id 19so3969547fxm.13 for ; Mon, 15 Nov 2010 06:40:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject :organization:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; bh=PjsbLfKHmCq3dO8Of/Q+CDEsRve7OOY3EPwCMr5Popo=; b=Z14XVrZ0EXo4fP7e3e1fB32iK/jzU6T9s4uC2eg8lg5frndgmN+XsNVJWHgv+MadP5 g3VPwP/S9K1hLhtTbro8X5OLlSjUlMvGApQy1VcXZtZEQVMaAk7oJw6UfYk++qTaFGt0 xOJ+TI2TXLvPnOjmJDi+d5DKzK7Vl3vGHNomY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:organization:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; b=FdxBEEaCqLwzru6rmoqsebJoPUazCBAe4sWwoQFffOVzBHi1aQyy3AItEeYCR6PchX b56+oxPDVJ1/zGfWzAytvOZ6IbUia0M733Rg0gtvZiiigv/OYYQOMB6mz9rWyzfNWvfW mCeikJxgrYZjb94r9CKkROSfFRbRe0uKezpkw= Received: by 10.223.97.73 with SMTP id k9mr875763fan.120.1289832053164; Mon, 15 Nov 2010 06:40:53 -0800 (PST) Received: from localhost (ua1.etadirect.net [91.198.140.16]) by mx.google.com with ESMTPS id 16sm873620fal.0.2010.11.15.06.40.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 15 Nov 2010 06:40:51 -0800 (PST) From: Mikolaj Golub To: Lawrence Stewart Organization: TOA Ukraine References: <201011120641.oAC6fui3098584@svn.freebsd.org> <8662w17e90.fsf@kopusha.home.net> <4CDF3A58.6080505@freebsd.org> <86pqu8q6lb.fsf@kopusha.home.net> <4CE08BB6.1090304@freebsd.org> <86ipzyncqf.fsf@zhuzha.ua1> <4CE139C5.4010300@freebsd.org> Date: Mon, 15 Nov 2010 16:40:49 +0200 In-Reply-To: <4CE139C5.4010300@freebsd.org> (Lawrence Stewart's message of "Tue, 16 Nov 2010 00:46:45 +1100") Message-ID: <86aalamyz2.fsf@zhuzha.ua1> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215166 - in head: . sys/conf sys/netinet sys/netinet/cc sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 14:40:55 -0000 On Tue, 16 Nov 2010 00:46:45 +1100 Lawrence Stewart wrote: LS> Ok thanks. If you are or anyone else is feeling really adventurous, I LS> have created a series of patches that add better VIMAGE support to the LS> framework. LS> If you feel like testing them, they need to be applied in the following LS> order: LS> 1. Init the CC framework global state only once on system boot by LS> switching to a SYSINIT. (You already have this one) LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit_v2.patch LS> 2. When unloading an algo module, loop through all TCP control blocks in LS> all vnets (instead of just the default vnet) to look for connections LS> using the algo. LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnet_algounloadcleanup.patch LS> 3. Move protocol specific implementation detail out of the core CC LS> framework (not vnet specific but useful cleanup). LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_tcpalgounload.patch LS> 4. Create a per-vnet variable to store a ptr to the vnet's default CC LS> algo and hook it up to a vnet aware sysctl handler. vnets can now choose LS> their own default from the global list of registered algos independently LS> of other vnets. LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_pervnet_defaultalgo.patch LS> It would be fine to test all of them in one go. The last one is the most LS> intrusive and the one I'd most like to see some testing done with. Only LS> if you feel like it of course. Feeling virtually adventurous, applied them all on VirtualBox :-). This is the box where the hang is not observed. It works ok for me so far. I will try at home too (where the hang is observed) and let you know if there are any issues. -- Mikolaj Golub From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 15:00:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E48C106564A; Mon, 15 Nov 2010 15:00:20 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 56DBE8FC0C; Mon, 15 Nov 2010 15:00:08 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 530C641C736; Mon, 15 Nov 2010 16:00:07 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id oYW82thhsoXB; Mon, 15 Nov 2010 16:00:06 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id A9E4041C735; Mon, 15 Nov 2010 16:00:06 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 729234448F3; Mon, 15 Nov 2010 14:58:15 +0000 (UTC) Date: Mon, 15 Nov 2010 14:58:15 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Dimitry Andric In-Reply-To: <201011142040.oAEKetST093270@svn.freebsd.org> Message-ID: <20101115145153.C24596@maildrop.int.zabbadoz.net> References: <201011142040.oAEKetST093270@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215318 - in head/sys: net sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 15:00:20 -0000 On Sun, 14 Nov 2010, Dimitry Andric wrote: > Author: dim > Date: Sun Nov 14 20:40:55 2010 > New Revision: 215318 > URL: http://svn.freebsd.org/changeset/base/215318 > > Log: > Instead of unconditionally emitting .globl's for the __start_set_xxx and > __stop_set_xxx symbols, only emit them when the set_vnet or set_pcpu > sections are actually defined. Unless you have a very good reason that is NOT cosmetic for this I want to know it. None of you commit messages is giving this. This breaks the classic C semantics that we had gained with the former type of macros, which is a shame. Kind of annoying neither of the changes had a Reviewed by: and despite being about 2 weeks behind of most email I hadn't spotted this on arch@ before nor seen it on virtualization@ that it obviously touches. I would have loved to hear about them before foing to have a hard time integrating this white space into half a year of development work. Looking forward to the technical explanation. > Modified: > head/sys/net/vnet.h > head/sys/sys/cdefs.h > head/sys/sys/linker_set.h > head/sys/sys/pcpu.h -- Bjoern A. Zeeb Welcome a new stage of life. Going to jail sucks -- All my daemons like it! http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 15:32:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC44C106566C; Mon, 15 Nov 2010 15:32:15 +0000 (UTC) (envelope-from zec@icir.org) Received: from munja.zvne.fer.hr (munja.zvne.fer.hr [161.53.66.248]) by mx1.freebsd.org (Postfix) with ESMTP id 5BE168FC0C; Mon, 15 Nov 2010 15:32:14 +0000 (UTC) Received: from sluga.fer.hr ([161.53.66.244]) by munja.zvne.fer.hr with Microsoft SMTPSVC(6.0.3790.4675); Mon, 15 Nov 2010 16:20:10 +0100 Received: from localhost ([161.53.19.8]) by sluga.fer.hr with Microsoft SMTPSVC(6.0.3790.4675); Mon, 15 Nov 2010 16:20:09 +0100 From: Marko Zec To: "Bjoern A. Zeeb" Date: Mon, 15 Nov 2010 16:19:36 +0100 User-Agent: KMail/1.9.10 References: <201011142040.oAEKetST093270@svn.freebsd.org> <20101115145153.C24596@maildrop.int.zabbadoz.net> In-Reply-To: <20101115145153.C24596@maildrop.int.zabbadoz.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201011151619.37758.zec@icir.org> X-OriginalArrivalTime: 15 Nov 2010 15:20:10.0654 (UTC) FILETIME=[97E7BBE0:01CB84D8] Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric Subject: Re: svn commit: r215318 - in head/sys: net sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 15:32:15 -0000 On Monday 15 November 2010 15:58:15 Bjoern A. Zeeb wrote: > On Sun, 14 Nov 2010, Dimitry Andric wrote: > > Author: dim > > Date: Sun Nov 14 20:40:55 2010 > > New Revision: 215318 > > URL: http://svn.freebsd.org/changeset/base/215318 > > > > Log: > > Instead of unconditionally emitting .globl's for the __start_set_xxx and > > __stop_set_xxx symbols, only emit them when the set_vnet or set_pcpu > > sections are actually defined. > > Unless you have a very good reason that is NOT cosmetic for this I > want to know it. None of you commit messages is giving this. > > This breaks the classic C semantics that we had gained with the former > type of macros, which is a shame. > > Kind of annoying neither of the changes had a Reviewed by: and despite > being about 2 weeks behind of most email I hadn't spotted this on arch@ > before nor seen it on virtualization@ that it obviously touches. I > would have loved to hear about them before foing to have a hard time > integrating this white space into half a year of development work. > > Looking forward to the technical explanation. Another fundamental problem is that the commit note doesn't include a MFC plan, so if we just leave it as is, starting from now on an extremely large portion MFCs of networking code will need to be hand-adjusted. Marko > > Modified: > > head/sys/net/vnet.h > > head/sys/sys/cdefs.h > > head/sys/sys/linker_set.h > > head/sys/sys/pcpu.h From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 15:44:50 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 330E41065675; Mon, 15 Nov 2010 15:44:50 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id D5B4E8FC12; Mon, 15 Nov 2010 15:44:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id oAFFcG3s017836; Mon, 15 Nov 2010 08:38:16 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 15 Nov 2010 08:38:16 -0700 (MST) Message-Id: <20101115.083816.74734305.imp@bsdimp.com> To: kostikbel@gmail.com From: Warner Losh In-Reply-To: <20101114213749.GW2392@deviant.kiev.zoral.com.ua> References: <201011141824.oAEIOCtN089920@svn.freebsd.org> <86wrofob4q.fsf@gmail.com> <20101114213749.GW2392@deviant.kiev.zoral.com.ua> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: swell.k@gmail.com, svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, freebsd-ports@FreeBSD.org Subject: Re: svn commit: r215309 - in head/sys: amd64/amd64 i386/i386 sys vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 15:44:50 -0000 From: Kostik Belousov Subject: Re: svn commit: r215309 - in head/sys: amd64/amd64 i386/i386 sys vm Date: Sun, 14 Nov 2010 23:37:49 +0200 > On Mon, Nov 15, 2010 at 12:20:37AM +0300, Anonymous wrote: > > Konstantin Belousov writes: > > > > > Author: kib > > > Date: Sun Nov 14 18:24:12 2010 > > > New Revision: 215309 > > > URL: http://svn.freebsd.org/changeset/base/215309 > > > > > > Log: > > > Use symbolic names instead of hardcoding values for magic p_osrel constants. > > > > > > MFC after: 1 week > > [...] > > > Modified: head/sys/sys/param.h > > > ============================================================================== > > > --- head/sys/sys/param.h Sun Nov 14 18:05:03 2010 (r215308) > > > +++ head/sys/sys/param.h Sun Nov 14 18:24:12 2010 (r215309) > > > @@ -60,6 +60,11 @@ > > > #undef __FreeBSD_version > > > #define __FreeBSD_version 900025 /* Master, propagated to newvers */ > > > > > > +#ifdef _KERNEL > > > +#define __FreeBSD_version_SIGSEGV 700004 > > > +#define __FreeBSD_version_MAP_ANON 800104 > > > +#endif > > > + > > > > This breaks bsd.port.mk regexp to determine OSVERSION. > > > > # Get __FreeBSD_version > > .if !defined(OSVERSION) > > .if exists(/usr/include/sys/param.h) > > OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < /usr/include/sys/param.h > > .elif exists(/usr/src/sys/sys/param.h) > > OSVERSION!= ${AWK} '/^\#define[[:blank::]]__FreeBSD_version/ {print $$3}' < /usr/src/sys/sys/param.h > > .else > > OSVERSION!= ${SYSCTL} -n kern.osreldate > > .endif > > .endif > > > > $ make -V OSVERSION > > 900025 700004 800104 > > > > And every port chokes on it. > > > > $ make -C devel/libpthread-stubs > > "Makefile", line 26: warning: String comparison operator should be either == or != > > "Makefile", line 26: Malformed conditional (${OSVERSION} < 700000) > > "Makefile", line 28: if-less endif > > "/usr/ports/Mk/bsd.port.mk", line 1739: warning: String comparison operator should be either == or != > > "/usr/ports/Mk/bsd.port.mk", line 1739: Malformed conditional (defined(USE_XZ) && ( (${OSVERSION} >= 900000 && ${OSVERSION} < 900012) || ${OSVERSION} < 800505 )) > > "/usr/ports/Mk/bsd.port.mk", line 6394: if-less endif > > make: fatal errors encountered -- cannot continue > > > > %% > > Index: Mk/bsd.port.mk > > =================================================================== > > RCS file: /a/.cvsup/ports/Mk/bsd.port.mk,v > > retrieving revision 1.654 > > diff -u -p -r1.654 bsd.port.mk > > --- Mk/bsd.port.mk 8 Nov 2010 16:07:03 -0000 1.654 > > +++ Mk/bsd.port.mk 14 Nov 2010 21:18:32 -0000 > > @@ -1219,9 +1219,9 @@ OSREL!= ${UNAME} -r | ${SED} -e 's/[-(]. > > # Get __FreeBSD_version > > .if !defined(OSVERSION) > > .if exists(/usr/include/sys/param.h) > > -OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < /usr/include/sys/param.h > > +OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version[[:blank:]]/ {print $$3}' < /usr/include/sys/param.h > > .elif exists(/usr/src/sys/sys/param.h) > > -OSVERSION!= ${AWK} '/^\#define[[:blank::]]__FreeBSD_version/ {print $$3}' < /usr/src/sys/sys/param.h > > +OSVERSION!= ${AWK} '/^\#define[[:blank::]]__FreeBSD_version[[:blank:]]/ {print $$3}' < /usr/src/sys/sys/param.h > > .else > > OSVERSION!= ${SYSCTL} -n kern.osreldate > > .endif > > %% > > I think it is better to select different namespace for the special versions. > Can you confirm that the following patch fixes the ports mk for you ? > It is enough to cd /usr/src/include && make install after patching. I think this is a better idea. There's a number of other places lurking that make a similar assumption. Warner From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 15:57:15 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D71141065673; Mon, 15 Nov 2010 15:57:15 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id 705F38FC20; Mon, 15 Nov 2010 15:57:14 +0000 (UTC) Received: from c122-106-146-145.carlnfd1.nsw.optusnet.com.au (c122-106-146-145.carlnfd1.nsw.optusnet.com.au [122.106.146.145]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id oAFFvB0F023999 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Nov 2010 02:57:13 +1100 Date: Tue, 16 Nov 2010 02:57:11 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Alexander Best In-Reply-To: <20101113125648.GA25183@freebsd.org> Message-ID: <20101116011754.T1430@besplex.bde.org> References: <201011131054.oADAsA7I045096@svn.freebsd.org> <20101113125648.GA25183@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Ulrich Spoerlein Subject: Re: svn commit: r215237 - head/lib/msun/src X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 15:57:16 -0000 On Sat, 13 Nov 2010, Alexander Best wrote: > thank you very much for fixing this long outstanding issue. > you might want to have a look at [1], where two more issues have been reported. > > [1] http://mailman.oakapple.net/pipermail/numeric-interest/2010-September/thread.html These are either features or not our problem (yet?). The second issue is compiler bugs, mostly for VC++. For gcc, the corresponding bugs are that gcc is not a C99 compiler, so it doesn't support fenv. clang has even worse support for fenv (both have no direct support for fenv, but clang does more optimizations that are invalid if the environment is not the default). fdlibm's problems in this area are that it was written before fenv existed, so it just assumes that the compiler doesn't do too many optimizations -- an assumption that is almost but not quite satisifed with gcc <= 4.2.1 (unless you enable bugs like -ffast-math of course). The other issue is a (historical?) bug now standardized by C99: from n1256.pdf: % -- pow(-Inf, y) returns +0 for y<0 and not an odd integer. % -- pow(-Inf, y) returns +Inf for y>0 and not an odd integer. So pow(-Inf, 0.5) must return +Inf and pow(-Inf, -0.5) must return +0, although the bug reporter wants the value to be NaN in both cases, like it would be for sqrt(-Inf) and 1/sqrt(-Inf), respectively. pow(-Inf, -0.5) = +0 is reasonable, since it can be interpreted as either 1/sqrt(-Inf) or sqrt(1/-Inf) = sqrt(-0) = 0, and the latter is reasonable and Standard (sqrt(-0) could be required to be NaN since -0 can be regarded as being on the branch cut for sqrt(), but that would make -0 too special, especially for real sqrt()). pow(-Inf, 0.5) = +Inf is not so reasonable, but is consistent with other (historical?) and now Standard bugs in pow(): essentially, everywhere that there is a correct special case for the second arg being an odd integer (so that there is no branch cut involved, and the oddness affects the sign of the result in the natural way), there is a bogus special case when the second arg is finite and not an odd integer, and another bogus special case when the second arge is infinite. The finite non-odd-integer cases are generally treated by throwing away all signs so that the result is +Inf or +0 where it would be +-Inf or +-0 for an odd integer. Infinite args are sort of both even and odd, so they should give all of the results +-Inf or +-0, but this is impossible so the result should be NaN, but Standards say that it is just +Inf or +0, as results from ignoring the odd integer singularities. >From n1156.pdf (not quoting the complementatry odd integer cases): % -- pow(+-0, y) returns +Inf and raises the divide-by-zero % exception for y<0 and not an odd integer. This is uncontroversial for +0. However, for -0, it must be interpreted as 1/pow(-0, -y) and not as 1/pow(1/-0, y) = 1/(-Inf, y) to avoid a controversial operation on -Inf. % -- pow(+-0, y) returns +0 for y>0 and not an odd integer. Uncontroversial for +0, and less controversial than the above for -0. % -- pow(-1, +-Inf) returns 1. Indirectly related. This is a new bug in n1156.pdf. It wasn't in n869 (not sure if it was in initial-C99), and isn't in fdlibm. but this is needed for bug for bug compatibility with pow(-1-eps, +-Inf). The value of the latter should be NaN, since pow(-1-eps, y) has limits both +-Inf as y -> +-Inf (strictly the latter should be NaN unless y is an integer, since a correct complex result is unrepresentable), but it is +Inf. But since we fix the sign for the latter, we should fix the sign for this too. % -- pow(x, -Inf) returns +Inf for |x|<1. % -- pow(x, -Inf) returns +0 for |x|>1. % -- pow(x, +Inf) returns +0 for |x|<1. % -- pow(x, +Inf) returns +Inf for |x|>1. Historical(?) and Standard, but bogus for x < -1 since pow() should only be defined there when y is an integer and then the result approaches both +-Inf. Less bogus for -1 < x <= 0 since then the result (although it should never be defined :-)) approaches +-0. % -- pow(-Inf, y) returns +0 for y<0 and not an odd integer. % -- pow(-Inf, y) returns +Inf for y>0 and not an odd integer. These 2 were quoted earlier. They are just the rules for +-0 inverted. cpow() has to deal with pow(x, y) actually existing for negative x, so it should use projective infinity and not have special cases for +-Inf or +-0, but presumably it has to be bug for bug compatible with pow() on the real axis so its special cases can only be more complicated and/or bogus. I checked most cases specified in n1156.pdf and found only the following non-conforming behaviour in FreeBSD: %C99 rule -- pow(-Inf, y) returns -0 for y an odd integer < 0. %fdlibm rule(?) * 17. -INF ** (anything) = -0 ** (-anything) fdlibm error: returns +0 instead of -0. I'm not sure if I matched the rules correctly. %C99 rule -- pow(-1, +-Inf) returns 1. %fdlibm rule * 9. +-1 ** +-INF is NAN fdlibm non-error: pow(-1, +-Inf) is NaN, not 1 as specified by C99. fdlibm non-error: pow(1, +-Inf) is 1 as specified by C99, not NaN as claimed in the comment. I know of 1 other similar bug in C99: lgamma(-Inf) should be NaN, but is Inf. lgamma() has a very bad singularity at -Inf even when it is restricted to the real axis. This bug is missing for tgamma(). Bruce From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 16:09:25 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D0581065673; Mon, 15 Nov 2010 16:09:25 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail07.syd.optusnet.com.au (mail07.syd.optusnet.com.au [211.29.132.188]) by mx1.freebsd.org (Postfix) with ESMTP id A00D18FC16; Mon, 15 Nov 2010 16:09:24 +0000 (UTC) Received: from c122-106-146-145.carlnfd1.nsw.optusnet.com.au (c122-106-146-145.carlnfd1.nsw.optusnet.com.au [122.106.146.145]) by mail07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id oAFG9JqY026881 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Nov 2010 03:09:22 +1100 Date: Tue, 16 Nov 2010 03:09:19 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans In-Reply-To: <20101116011754.T1430@besplex.bde.org> Message-ID: <20101116030331.L1885@besplex.bde.org> References: <201011131054.oADAsA7I045096@svn.freebsd.org> <20101113125648.GA25183@freebsd.org> <20101116011754.T1430@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, Alexander Best , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Ulrich Spoerlein Subject: Re: svn commit: r215237 - head/lib/msun/src X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 16:09:25 -0000 On Tue, 16 Nov 2010, Bruce Evans wrote: > ... > I checked most cases specified in n1156.pdf and found only the following > non-conforming behaviour in FreeBSD: > > %C99 rule -- pow(-Inf, y) returns -0 for y an odd integer < 0. > %fdlibm rule(?) * 17. -INF ** (anything) = -0 ** (-anything) > > fdlibm error: returns +0 instead of -0. I'm not sure if I matched the > rules correctly. False alarm. It actually returns -0 as specified. > %C99 rule -- pow(-1, +-Inf) returns 1. > %fdlibm rule * 9. +-1 ** +-INF is NAN > > fdlibm non-error: pow(-1, +-Inf) is NaN, not 1 as specified by C99. > fdlibm non-error: pow(1, +-Inf) is 1 as specified by C99, not NaN as > claimed in the comment. So I didn't find any non-conforming behaviour in fdlibm except for not conforming to the new pow(-1, +-Inf) bug (which is required for conistency with old bugs). Bruce From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 16:28:12 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: by hub.freebsd.org (Postfix, from userid 1233) id A4C1E1065674; Mon, 15 Nov 2010 16:28:12 +0000 (UTC) Date: Mon, 15 Nov 2010 16:28:12 +0000 From: Alexander Best To: Bruce Evans Message-ID: <20101115162812.GA76761@freebsd.org> References: <201011131054.oADAsA7I045096@svn.freebsd.org> <20101113125648.GA25183@freebsd.org> <20101116011754.T1430@besplex.bde.org> <20101116030331.L1885@besplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101116030331.L1885@besplex.bde.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Ulrich Spoerlein Subject: Re: svn commit: r215237 - head/lib/msun/src X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 16:28:12 -0000 On Tue Nov 16 10, Bruce Evans wrote: > On Tue, 16 Nov 2010, Bruce Evans wrote: > > >... > >I checked most cases specified in n1156.pdf and found only the following > >non-conforming behaviour in FreeBSD: > > > >%C99 rule -- pow(-Inf, y) returns -0 for y an odd integer < > >0. > >%fdlibm rule(?) * 17. -INF ** (anything) = -0 ** (-anything) > > > >fdlibm error: returns +0 instead of -0. I'm not sure if I matched the > >rules correctly. > > False alarm. It actually returns -0 as specified. > > >%C99 rule -- pow(-1, +-Inf) returns 1. > >%fdlibm rule * 9. +-1 ** +-INF is NAN > > > >fdlibm non-error: pow(-1, +-Inf) is NaN, not 1 as specified by C99. > >fdlibm non-error: pow(1, +-Inf) is 1 as specified by C99, not NaN as > >claimed in the comment. > > So I didn't find any non-conforming behaviour in fdlibm except for not > conforming to the new pow(-1, +-Inf) bug (which is required for conistency > with old bugs). thanks for all your work. i don't think there are a lot of people able to understand the tiny details of arithmetics, so having your expertise is invaluable. :) if you are interested in solving two more msun mysteries, you might want to have a look at #PR kern/133583 and standards/143358. cheers. alex > > Bruce -- a13x From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 16:48:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06000106566C; Mon, 15 Nov 2010 16:48:16 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: from eu1sys200aog120.obsmtp.com (eu1sys200aog120.obsmtp.com [207.126.144.149]) by mx1.freebsd.org (Postfix) with SMTP id 9D8698FC20; Mon, 15 Nov 2010 16:48:13 +0000 (UTC) Received: from source ([63.174.175.251]) by eu1sys200aob120.postini.com ([207.126.147.11]) with SMTP ID DSNKTOFkTMyYqxa+UI9ZMlovaqsCMnSctsKB@postini.com; Mon, 15 Nov 2010 16:48:15 UTC Received: from [172.17.10.53] (unknown [172.17.10.53]) by bbbx3.usdmm.com (Postfix) with ESMTP id 0CCA7FD01C; Mon, 15 Nov 2010 16:48:12 +0000 (UTC) Message-ID: <4CE16414.8060606@tomjudge.com> Date: Mon, 15 Nov 2010 10:47:16 -0600 From: Tom Judge User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: Alexander Motin References: <201011142337.oAENbheD097425@svn.freebsd.org> <4CE07AA3.6040205@FreeBSD.org> In-Reply-To: <4CE07AA3.6040205@FreeBSD.org> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Pyun YongHyeon Subject: Re: svn commit: r215327 - head/sys/dev/nfe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 16:48:16 -0000 On 11/14/2010 06:11 PM, Alexander Motin wrote: > Pyun YongHyeon wrote: >> Author: yongari >> Date: Sun Nov 14 23:37:43 2010 >> New Revision: 215327 >> URL: http://svn.freebsd.org/changeset/base/215327 >> >> Log: >> P5N32-SLI PREMIUM from ASUSTeK is known to have MSI/MSI-X issue >> such that nfe(4) does not work with MSI-X. When MSI-X support was >> introduced, I remember MCP55 controller worked without problems so >> the issue could be either PCI bridge or BIOS issue. But I also >> noticed snd_hda(4) disabled MSI on all MCP55 chipset so I'm still >> not sure this is generic issue of MCP55 chipset. If this was PCI >> bridge issue we would have added it to a system wide black-list >> table but it's not clear to me at this moment whether it was caused >> by either broken BIOS or silicon bug of MCP55 chipset. > > MCP5x seem to be infinite source of surprises. Some reports I remember: > - snd_hda not working with MSI enabled - AFAIR not just loosing > interrupts but completely stops responding; > - using regular HPET interrupts breaks HDA sound after some time > (interrupts are not shared), while legacy_route mode operates properly; > - at least on one system I've seen non-functioning SATA interrupts. > It would be nice to find what's going on there. I've got tired to add > workarounds for it. :( > Another one for the list is Intel em cards not working with MSI enabled on MCP51 systems. (On 8.1) TJ -- TJU13-ARIN From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 17:16:42 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BA4A106566C; Mon, 15 Nov 2010 17:16:42 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 3C7E58FC13; Mon, 15 Nov 2010 17:16:42 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id A3D8973098; Mon, 15 Nov 2010 18:10:16 +0100 (CET) Date: Mon, 15 Nov 2010 18:10:16 +0100 From: Luigi Rizzo To: Ivan Voras Message-ID: <20101115171016.GB20524@onelab2.iet.unipi.it> References: <201011121302.oACD2Qjt009385@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, Luigi Rizzo , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r215178 - in head: lib/libc/sys sys/kern sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 17:16:42 -0000 On Mon, Nov 15, 2010 at 12:56:29PM +0100, Ivan Voras wrote: > On 12 November 2010 14:02, Luigi Rizzo wrote: > > Author: luigi > > Date: Fri Nov 12 13:02:26 2010 > > New Revision: 215178 > > URL: http://svn.freebsd.org/changeset/base/215178 > > > > Log: > > ??This commit implements the SO_USER_COOKIE socket option, which lets > > ??you tag a socket with an uint32_t value. The cookie can then be > > ??used by the kernel for various purposes, e.g. setting the skipto > > ??rule or pipe number in ipfw (this is the reason SO_USER_COOKIE has > > ??been implemented; however there is nothing ipfw-specific in its > > ??implementation). > > While at it, why not intptr_t? It would be marginally more useful and > almost free. several reasons, some generic, some specific to this application: 1. [generic] over time i have become more and more a fan of fixed-size, arch-indepentent fields in defining APIs/ABIs. I think this greatly improves code portability and reduces the chance of bugs induced by compilers or headers. 2. [generic] passing pointers between userland and kernel requires remapping the pointer when going up or down. As the mapping would be application specific, i don't see much use in allowing room for a pointer without kernel code to map userland <-> kernel pointers. 3. [specific] use of signed vs unsigned, of course the two choices are completely equivalent but since i needed an unsigned value i saw no reason to go for an int instead of uint; 4. [specific] choosing 64 bit might have given perhaps more flexibility, but then again a) the reason for introducing this change only needed 32-bit operand, and b) the use of 64-bit would make the code marginally bigger/slower for 32-bit architectures. I think #3 and #4 are completely debatable, but #1 and #2 are in my opinion a compelling reason to avoid intptr_t and int vs int32_t in an API. cheers luigi cheaper for 32-bit ma From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 17:59:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A386106566B; Mon, 15 Nov 2010 17:59:42 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from out-0.mx.aerioconnect.net (out-0-7.mx.aerioconnect.net [216.240.47.67]) by mx1.freebsd.org (Postfix) with ESMTP id 534A68FC19; Mon, 15 Nov 2010 17:59:42 +0000 (UTC) Received: from idiom.com (postfix@mx0.idiom.com [216.240.32.160]) by out-0.mx.aerioconnect.net (8.13.8/8.13.8) with ESMTP id oAFHxcmn017417; Mon, 15 Nov 2010 09:59:40 -0800 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137]) by idiom.com (Postfix) with ESMTP id B83412D6017; Mon, 15 Nov 2010 09:59:36 -0800 (PST) Message-ID: <4CE1750A.6040404@freebsd.org> Date: Mon, 15 Nov 2010 09:59:38 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: Luigi Rizzo References: <201011121302.oACD2Qjt009385@svn.freebsd.org> <20101115171016.GB20524@onelab2.iet.unipi.it> In-Reply-To: <20101115171016.GB20524@onelab2.iet.unipi.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 216.240.47.51 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Luigi Rizzo , src-committers@freebsd.org, Ivan Voras Subject: Re: svn commit: r215178 - in head: lib/libc/sys sys/kern sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 17:59:42 -0000 On 11/15/10 9:10 AM, Luigi Rizzo wrote: > On Mon, Nov 15, 2010 at 12:56:29PM +0100, Ivan Voras wrote: >> On 12 November 2010 14:02, Luigi Rizzo wrote: >>> Author: luigi >>> Date: Fri Nov 12 13:02:26 2010 >>> New Revision: 215178 >>> URL: http://svn.freebsd.org/changeset/base/215178 >>> >>> Log: >>> ??This commit implements the SO_USER_COOKIE socket option, which lets >>> ??you tag a socket with an uint32_t value. The cookie can then be >>> ??used by the kernel for various purposes, e.g. setting the skipto >>> ??rule or pipe number in ipfw (this is the reason SO_USER_COOKIE has >>> ??been implemented; however there is nothing ipfw-specific in its >>> ??implementation). >> While at it, why not intptr_t? It would be marginally more useful and >> almost free. > several reasons, some generic, some specific to this application: > > 1. [generic] over time i have become more and more a fan of fixed-size, > arch-indepentent fields in defining APIs/ABIs. I think this > greatly improves code portability and reduces the chance of bugs > induced by compilers or headers. > > 2. [generic] passing pointers between userland and kernel > requires remapping the pointer when going up or down. > As the mapping would be application specific, i don't > see much use in allowing room for a pointer without kernel code > to map userland<-> kernel pointers. > > 3. [specific] use of signed vs unsigned, of course the two choices are > completely equivalent but since i needed an unsigned value i > saw no reason to go for an int instead of uint; > > 4. [specific] choosing 64 bit might have given perhaps more > flexibility, but then again a) the reason for introducing this > change only needed 32-bit operand, and b) the use of 64-bit would > make the code marginally bigger/slower for 32-bit architectures. also it's supposed to take the place of a tablearg which is 32 bits is it not? > I think #3 and #4 are completely debatable, but #1 and #2 are in > my opinion a compelling reason to avoid intptr_t and int vs int32_t > in an API. > > cheers > luigi > cheaper for 32-bit ma > From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 19:05:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7E0E10656AB; Mon, 15 Nov 2010 19:05:09 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D6A9E8FC16; Mon, 15 Nov 2010 19:05:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAFJ59T2025628; Mon, 15 Nov 2010 19:05:09 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFJ595x025626; Mon, 15 Nov 2010 19:05:09 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201011151905.oAFJ595x025626@svn.freebsd.org> From: Warner Losh Date: Mon, 15 Nov 2010 19:05:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215344 - head/sys/boot/arm/uboot X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 19:05:10 -0000 Author: imp Date: Mon Nov 15 19:05:09 2010 New Revision: 215344 URL: http://svn.freebsd.org/changeset/base/215344 Log: We no longer need the OUTPUT_FORMAT line, so fix the build by removing it. Modified: head/sys/boot/arm/uboot/ldscript.arm Modified: head/sys/boot/arm/uboot/ldscript.arm ============================================================================== --- head/sys/boot/arm/uboot/ldscript.arm Mon Nov 15 18:49:42 2010 (r215343) +++ head/sys/boot/arm/uboot/ldscript.arm Mon Nov 15 19:05:09 2010 (r215344) @@ -1,6 +1,5 @@ /* $FreeBSD$ */ -OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) SECTIONS From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 19:55:19 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B31BC10656D2; Mon, 15 Nov 2010 19:55:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1DC88FC0A; Mon, 15 Nov 2010 19:55:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAFJtJMX026773; Mon, 15 Nov 2010 19:55:19 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFJtJ3R026771; Mon, 15 Nov 2010 19:55:19 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201011151955.oAFJtJ3R026771@svn.freebsd.org> From: John Baldwin Date: Mon, 15 Nov 2010 19:55:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215345 - head/sys/boot/forth X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 19:55:19 -0000 Author: jhb Date: Mon Nov 15 19:55:19 2010 New Revision: 215345 URL: http://svn.freebsd.org/changeset/base/215345 Log: Don't display option 2 (to toggle ACPI on or off) on x86 machines if the BIOS does not support ACPI. The other options in the menu retain their existing numbers, option 2 is simply blanked out (and '2' is ignored). MFC after: 1 month Modified: head/sys/boot/forth/beastie.4th Modified: head/sys/boot/forth/beastie.4th ============================================================================== --- head/sys/boot/forth/beastie.4th Mon Nov 15 19:05:09 2010 (r215344) +++ head/sys/boot/forth/beastie.4th Mon Nov 15 19:55:19 2010 (r215345) @@ -140,12 +140,16 @@ at-xy ." `--{__________) " fbsdbw-logo ; -: acpienabled? ( -- flag ) +: acpipresent? ( -- flag ) s" hint.acpi.0.rsdp" getenv dup -1 = if drop false exit then 2drop + true +; + +: acpienabled? ( -- flag ) s" hint.acpi.0.disabled" getenv dup -1 <> if s" 0" compare 0<> if @@ -180,11 +184,18 @@ at-xy ." `--{__________) " printmenuitem ." Boot FreeBSD [default]" bootkey ! s" arch-i386" environment? if drop - printmenuitem ." Boot FreeBSD with ACPI " bootacpikey ! - acpienabled? if - ." disabled" + acpipresent? if + printmenuitem ." Boot FreeBSD with ACPI " bootacpikey ! + acpienabled? if + ." disabled" + else + ." enabled" + then else - ." enabled" + menuidx @ + 1+ dup + menuidx ! + -2 bootacpikey ! then else -2 bootacpikey ! From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 20:36:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F105106566C; Mon, 15 Nov 2010 20:36:20 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 54A838FC14; Mon, 15 Nov 2010 20:36:19 +0000 (UTC) Received: by ywa8 with SMTP id 8so2838221ywa.13 for ; Mon, 15 Nov 2010 12:36:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=gtAgVNB66Qot5KLRKvS2/HATkQInmvWuJE+8bmLXW4U=; b=ek88KhL0l8C2gc6l9ukhn1ZJO2J7ZUBHK49T5yoNd7oQzrzKY41heUKqC54uQE2Th8 za8bvfz5U9x0/LoloacJP27sKmbnqg0j9ACmtH7+mnUQm2h4LbSiNmaSAQs19Hdjp1li Mecq1mzbPIkdI0qAqVkRc9kSShl8MRIqJRCJ8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=goQnH4aeCIuR3uKfZ3Eq9nm2tsEK0r5gpl7cDjoFP9DAeHHmRjKAviuVSW6d+g+Z1B LNMr61AEckK33C7ZAJTote4HFb6x/ZbK7vqy0L1kUOAH6j9puJnEr/Wa18VPoKsk6AUF 0DwRel6hnLGow3nejidsT3E/0E17LdyyYLnHU= Received: by 10.151.78.12 with SMTP id f12mr6737827ybl.148.1289853378273; Mon, 15 Nov 2010 12:36:18 -0800 (PST) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id i9sm215560yha.42.2010.11.15.12.36.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 15 Nov 2010 12:36:16 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Mon, 15 Nov 2010 12:36:09 -0800 From: Pyun YongHyeon Date: Mon, 15 Nov 2010 12:36:09 -0800 To: Tom Judge Message-ID: <20101115203609.GC1257@michelle.cdnetworks.com> References: <201011142337.oAENbheD097425@svn.freebsd.org> <4CE07AA3.6040205@FreeBSD.org> <4CE16414.8060606@tomjudge.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4CE16414.8060606@tomjudge.com> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org, Pyun YongHyeon Subject: Re: svn commit: r215327 - head/sys/dev/nfe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 20:36:20 -0000 On Mon, Nov 15, 2010 at 10:47:16AM -0600, Tom Judge wrote: > On 11/14/2010 06:11 PM, Alexander Motin wrote: > > Pyun YongHyeon wrote: > >> Author: yongari > >> Date: Sun Nov 14 23:37:43 2010 > >> New Revision: 215327 > >> URL: http://svn.freebsd.org/changeset/base/215327 > >> > >> Log: > >> P5N32-SLI PREMIUM from ASUSTeK is known to have MSI/MSI-X issue > >> such that nfe(4) does not work with MSI-X. When MSI-X support was > >> introduced, I remember MCP55 controller worked without problems so > >> the issue could be either PCI bridge or BIOS issue. But I also > >> noticed snd_hda(4) disabled MSI on all MCP55 chipset so I'm still > >> not sure this is generic issue of MCP55 chipset. If this was PCI > >> bridge issue we would have added it to a system wide black-list > >> table but it's not clear to me at this moment whether it was caused > >> by either broken BIOS or silicon bug of MCP55 chipset. > > > > MCP5x seem to be infinite source of surprises. Some reports I remember: > > - snd_hda not working with MSI enabled - AFAIR not just loosing > > interrupts but completely stops responding; > > - using regular HPET interrupts breaks HDA sound after some time > > (interrupts are not shared), while legacy_route mode operates properly; > > - at least on one system I've seen non-functioning SATA interrupts. > > It would be nice to find what's going on there. I've got tired to add > > workarounds for it. :( > > > > Another one for the list is Intel em cards not working with MSI enabled > on MCP51 systems. (On 8.1) > And your nfe(4) on MCP51 also does not work with MSI? If it does not work, show me the output of "pciconf -lcbv" and "kenv | grep smbios". I checked Linux and they does not seem to disable MSI/MSI-X for MCP51/MCP55. But they seems to maintain two entries to selectively disable MSI. From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 21:41:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A2DE1065675; Mon, 15 Nov 2010 21:41:46 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 18E908FC1B; Mon, 15 Nov 2010 21:41:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAFLfj0h029431; Mon, 15 Nov 2010 21:41:45 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFLfj3A029429; Mon, 15 Nov 2010 21:41:45 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011152141.oAFLfj3A029429@svn.freebsd.org> From: Marius Strobl Date: Mon, 15 Nov 2010 21:41:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215348 - head/sys/dev/mii X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 21:41:46 -0000 Author: marius Date: Mon Nov 15 21:41:45 2010 New Revision: 215348 URL: http://svn.freebsd.org/changeset/base/215348 Log: Return from mii_attach() after calling bus_generic_attach(9) on the device_t of the MAC driver in order to attach miibus(4) on the first pass instead of falling through to also calling it on the device_t of miibus(4). The latter code flow was intended to attach the PHY drivers the same way regardless of whether it's the first or a repeated pass, modulo the bus_generic_attach() call in miibus_attach() which shouldn't be there. However, it turned out that these variants cause miibus(4) to be attached twice under certain conditions when using MAC drivers as modules. Submitted by: yongari MFC after: 3 days Modified: head/sys/dev/mii/mii.c Modified: head/sys/dev/mii/mii.c ============================================================================== --- head/sys/dev/mii/mii.c Mon Nov 15 21:41:32 2010 (r215347) +++ head/sys/dev/mii/mii.c Mon Nov 15 21:41:45 2010 (r215348) @@ -438,6 +438,9 @@ mii_attach(device_t dev, device_t *miibu rv = bus_generic_attach(dev); if (rv != 0) goto fail; + + /* Attaching of the PHY drivers is done in miibus_attach(). */ + return (0); } rv = bus_generic_attach(*miibus); if (rv != 0) From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 21:55:24 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63F451065673; Mon, 15 Nov 2010 21:55:24 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6C4D28FC12; Mon, 15 Nov 2010 21:55:23 +0000 (UTC) Received: by fxm19 with SMTP id 19so4398414fxm.13 for ; Mon, 15 Nov 2010 13:55:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :x-comment-to:date:in-reply-to:message-id:user-agent:mime-version :content-type; bh=E4YT82/3dOp1xOW2H9K2L3xHMmkSo1TVzi6Zlu8fv9I=; b=L/Zs/aPGL6j+zF3R1ZETRzaRbKf4oBtPZdasS3GQSRJqo3iOpe4O6yhUD1Ddm8E/ig 3LOUTPvdyAdGf2JE4A4GVPODUiy9SzK0OaXcBfOvu8oTaUwMr+7xlMW99Ik/ZGaI2m0u G/g22O5OooEJB6celhfRRDRymcTkIt0IHOKvc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:x-comment-to:date:in-reply-to :message-id:user-agent:mime-version:content-type; b=RAav8JQLBbkmPn9nF29V1WADwvHKCgLOb41FhZXJeD20SnfOLmlzsCusj2XmPu/bT5 aGrJFIjmwj27iPuDQyvh2/1kpVNDOPSCEaVqZAX6W63ALJvEy/oY/E2Z7YOwji3GH5kG 34KIdO0v20B1QIHIJ94WeUuXm4TVQQ+wGXto0= Received: by 10.223.101.135 with SMTP id c7mr1454840fao.39.1289858122279; Mon, 15 Nov 2010 13:55:22 -0800 (PST) Received: from localhost ([95.69.174.185]) by mx.google.com with ESMTPS id j8sm1071989fah.6.2010.11.15.13.55.19 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 15 Nov 2010 13:55:20 -0800 (PST) From: Mikolaj Golub To: Lawrence Stewart References: <201011120641.oAC6fui3098584@svn.freebsd.org> <8662w17e90.fsf@kopusha.home.net> <4CDF3A58.6080505@freebsd.org> <86pqu8q6lb.fsf@kopusha.home.net> <4CE08BB6.1090304@freebsd.org> <86ipzyncqf.fsf@zhuzha.ua1> <4CE139C5.4010300@freebsd.org> X-Comment-To: Lawrence Stewart Date: Mon, 15 Nov 2010 23:55:18 +0200 In-Reply-To: <4CE139C5.4010300@freebsd.org> (Lawrence Stewart's message of "Tue, 16 Nov 2010 00:46:45 +1100") Message-ID: <86pqu65k1l.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215166 - in head: . sys/conf sys/netinet sys/netinet/cc sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 21:55:24 -0000 On Tue, 16 Nov 2010 00:46:45 +1100 Lawrence Stewart wrote: LS> On 11/15/10 20:43, Mikolaj Golub wrote: >> >> On Mon, 15 Nov 2010 12:24:06 +1100 Lawrence Stewart wrote: >> >> LS> On 11/15/10 02:15, Mikolaj Golub wrote: >> >> >> >> LS> Would you mind testing the following patch? It fixes the panic for me. >> >> >> >> LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit.patch >> >> >> >> With this patch the system hangs during the boot. Ctr-Alt-Esc to break into >> >> ddb does not work. I am trying this under VirtualBox. >> >> LS> I can't reproduce a hang, but please try this patch instead: >> >> LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit_v2.patch >> >> I can't try it now on the box where I observed the hang. Trying on another box >> I can't reproduce the hang -- both patches works for me: no hang and I can >> create/remove jail and tcp connections to jail work. >> >> I will try the patch on the "problem" box tonight. Strange, I can't reproduce the hang today :-). I have tried both SI_ORDER_ANY and SI_ORDER_FIRST. I will keep running the kernel with your patches and let you know if I have any issues. -- Mikolaj Golub From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 21:58:12 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59C741065670; Mon, 15 Nov 2010 21:58:11 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 482DF8FC18; Mon, 15 Nov 2010 21:58:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAFLwB4M029867; Mon, 15 Nov 2010 21:58:11 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFLwBTM029864; Mon, 15 Nov 2010 21:58:11 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011152158.oAFLwBTM029864@svn.freebsd.org> From: Marius Strobl Date: Mon, 15 Nov 2010 21:58:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215349 - head/sys/sparc64/pci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 21:58:12 -0000 Author: marius Date: Mon Nov 15 21:58:10 2010 New Revision: 215349 URL: http://svn.freebsd.org/changeset/base/215349 Log: Convert drivers somehow missed in r200874 to multipass probing. Modified: head/sys/sparc64/pci/psycho.c head/sys/sparc64/pci/schizo.c Modified: head/sys/sparc64/pci/psycho.c ============================================================================== --- head/sys/sparc64/pci/psycho.c Mon Nov 15 21:41:45 2010 (r215348) +++ head/sys/sparc64/pci/psycho.c Mon Nov 15 21:58:10 2010 (r215349) @@ -159,7 +159,8 @@ static devclass_t psycho_devclass; DEFINE_CLASS_0(pcib, psycho_driver, psycho_methods, sizeof(struct psycho_softc)); -DRIVER_MODULE(psycho, nexus, psycho_driver, psycho_devclass, 0, 0); +EARLY_DRIVER_MODULE(psycho, nexus, psycho_driver, psycho_devclass, 0, 0, + BUS_PASS_BUS); static SLIST_HEAD(, psycho_softc) psycho_softcs = SLIST_HEAD_INITIALIZER(psycho_softcs); Modified: head/sys/sparc64/pci/schizo.c ============================================================================== --- head/sys/sparc64/pci/schizo.c Mon Nov 15 21:41:45 2010 (r215348) +++ head/sys/sparc64/pci/schizo.c Mon Nov 15 21:58:10 2010 (r215349) @@ -158,7 +158,8 @@ static devclass_t schizo_devclass; DEFINE_CLASS_0(pcib, schizo_driver, schizo_methods, sizeof(struct schizo_softc)); -DRIVER_MODULE(schizo, nexus, schizo_driver, schizo_devclass, 0, 0); +EARLY_DRIVER_MODULE(schizo, nexus, schizo_driver, schizo_devclass, 0, 0, + BUS_PASS_BUS); static SLIST_HEAD(, schizo_softc) schizo_softcs = SLIST_HEAD_INITIALIZER(schizo_softcs); From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 22:05:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 712CC106566B; Mon, 15 Nov 2010 22:05:08 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F99A8FC1B; Mon, 15 Nov 2010 22:05:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAFM581P030119; Mon, 15 Nov 2010 22:05:08 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFM58Rf030117; Mon, 15 Nov 2010 22:05:08 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201011152205.oAFM58Rf030117@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 15 Nov 2010 22:05:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215350 - head/sys/dev/nfe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 22:05:08 -0000 Author: yongari Date: Mon Nov 15 22:05:08 2010 New Revision: 215350 URL: http://svn.freebsd.org/changeset/base/215350 Log: Plug memory leakage introduced in r215327. Submitted by: jkim Modified: head/sys/dev/nfe/if_nfe.c Modified: head/sys/dev/nfe/if_nfe.c ============================================================================== --- head/sys/dev/nfe/if_nfe.c Mon Nov 15 21:58:10 2010 (r215349) +++ head/sys/dev/nfe/if_nfe.c Mon Nov 15 22:05:08 2010 (r215350) @@ -804,7 +804,7 @@ nfe_can_use_msix(struct nfe_softc *sc) struct msix_blacklist *mblp; char *maker, *product; - int count, n; + int count, n, use_msix; /* * Search base board manufacturer and product name table @@ -812,18 +812,25 @@ nfe_can_use_msix(struct nfe_softc *sc) */ maker = getenv("smbios.planar.maker"); product = getenv("smbios.planar.product"); + use_msix = 1; if (maker != NULL && product != NULL) { count = sizeof(msix_blacklists) / sizeof(msix_blacklists[0]); mblp = msix_blacklists; for (n = 0; n < count; n++) { if (strcmp(maker, mblp->maker) == 0 && - strcmp(product, mblp->product) == 0) - return (0); + strcmp(product, mblp->product) == 0) { + use_msix = 0; + break; + } mblp++; } } + if (maker != NULL) + freeenv(maker); + if (product != NULL) + freeenv(product); - return (1); + return (use_msix); } From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 22:11:18 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5D4F1065672; Mon, 15 Nov 2010 22:11:18 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A41F78FC15; Mon, 15 Nov 2010 22:11:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAFMBIUn030283; Mon, 15 Nov 2010 22:11:18 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFMBIMl030281; Mon, 15 Nov 2010 22:11:18 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201011152211.oAFMBIMl030281@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 15 Nov 2010 22:11:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215351 - head/gnu/usr.bin/binutils X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 22:11:18 -0000 Author: nwhitehorn Date: Mon Nov 15 22:11:18 2010 New Revision: 215351 URL: http://svn.freebsd.org/changeset/base/215351 Log: Try including Makefile.${TARGET_ARCH} before Makefile.${TARGET_CPUARCH} if it exists in order to allow arch-specific overrides. This fixes the binutils (and world) build on powerpc64 after recent TBEMD merges. Reviewed by: imp Modified: head/gnu/usr.bin/binutils/Makefile.inc0 Modified: head/gnu/usr.bin/binutils/Makefile.inc0 ============================================================================== --- head/gnu/usr.bin/binutils/Makefile.inc0 Mon Nov 15 22:05:08 2010 (r215350) +++ head/gnu/usr.bin/binutils/Makefile.inc0 Mon Nov 15 22:11:18 2010 (r215351) @@ -36,28 +36,15 @@ CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64 .endif CFLAGS+= -I. -.if exists(${.CURDIR}/${TARGET_CPUARCH}) -CFLAGS+= -I${.CURDIR}/${TARGET_CPUARCH} -.endif CFLAGS+= -I${.CURDIR} CFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd CFLAGS+= -I${.OBJDIR}/${RELTOP}/libbfd CFLAGS+= -I${SRCDIR}/include -.if exists(${.CURDIR}/${TARGET_CPUARCH}) -.PATH: ${.CURDIR}/${TARGET_CPUARCH} -.endif - ARCHS= ${TARGET_CPUARCH} -.for _arch in ${CROSS_ARCH} -.if (${ARCHS:R:M${_arch:R}} == "") -ARCHS+= $(_arch) -.endif -.endfor - -.for _arch in ${ARCHS} -.if exists(${.CURDIR}/Makefile.${_arch}) -.include "${.CURDIR}/Makefile.${_arch}" +.if exists(${.CURDIR}/Makefile.${TARGET_ARCH}) +.include "${.CURDIR}/Makefile.${TARGET_ARCH}" +.elif exists(${.CURDIR}/Makefile.${TARGET_CPUARCH}) +.include "${.CURDIR}/Makefile.${TARGET_CPUARCH}" .endif -.endfor From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 22:12:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7184106566B; Mon, 15 Nov 2010 22:12:13 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 948A08FC17; Mon, 15 Nov 2010 22:12:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAFMCDjf030336; Mon, 15 Nov 2010 22:12:13 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFMCDr4030333; Mon, 15 Nov 2010 22:12:13 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201011152212.oAFMCDr4030333@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 15 Nov 2010 22:12:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215352 - in head/gnu/usr.bin/binutils: as as/powerpc64-freebsd libbfd libopcodes X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 22:12:13 -0000 Author: nwhitehorn Date: Mon Nov 15 22:12:13 2010 New Revision: 215352 URL: http://svn.freebsd.org/changeset/base/215352 Log: Garbage-collect some code made obsolete by the TBEMD import. Deleted: head/gnu/usr.bin/binutils/as/powerpc64-freebsd/ head/gnu/usr.bin/binutils/libopcodes/Makefile.powerpc64 Modified: head/gnu/usr.bin/binutils/as/Makefile head/gnu/usr.bin/binutils/libbfd/Makefile Modified: head/gnu/usr.bin/binutils/as/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/as/Makefile Mon Nov 15 22:11:18 2010 (r215351) +++ head/gnu/usr.bin/binutils/as/Makefile Mon Nov 15 22:12:13 2010 (r215352) @@ -26,7 +26,7 @@ SRCS+= itbl-ops.c itbl-parse.y itbl-lex. .if ${TARGET_ARCH} == "amd64" SRCS+= tc-i386.c -.elif ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "powerpc64" +.elif ${TARGET_CPUARCH} == "powerpc" SRCS+= tc-ppc.c .elif ${TARGET_ARCH} == "sparc64" # change back to tc-sparc.c when new binutils is imported Modified: head/gnu/usr.bin/binutils/libbfd/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/libbfd/Makefile Mon Nov 15 22:11:18 2010 (r215351) +++ head/gnu/usr.bin/binutils/libbfd/Makefile Mon Nov 15 22:12:13 2010 (r215352) @@ -24,8 +24,6 @@ SELARCH= SELARCH= &bfd_i386_arch .elif ${TARGET_ARCH} == "sparc64" SELARCH= &bfd_sparc_arch -.elif ${TARGET_ARCH} == "powerpc64" -SELARCH= &bfd_powerpc_arch,&bfd_rs6000_arch .else .for _a in ${ARCHS} .if ${SELARCH} == "" From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 23:11:02 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE15F106564A; Mon, 15 Nov 2010 23:11:02 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 6A6A38FC13; Mon, 15 Nov 2010 23:11:02 +0000 (UTC) Received: from lawrence1.loshell.room52.net (ppp59-167-184-191.static.internode.on.net [59.167.184.191]) by lauren.room52.net (Postfix) with ESMTPSA id 7E2867E84A; Tue, 16 Nov 2010 10:11:00 +1100 (EST) Message-ID: <4CE1BE04.7020003@freebsd.org> Date: Tue, 16 Nov 2010 10:11:00 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-AU; rv:1.9.2.9) Gecko/20101006 Lightning/1.0b2 Thunderbird/3.1.4 MIME-Version: 1.0 To: Mikolaj Golub References: <201011120641.oAC6fui3098584@svn.freebsd.org> <8662w17e90.fsf@kopusha.home.net> <4CDF3A58.6080505@freebsd.org> <86pqu8q6lb.fsf@kopusha.home.net> <4CE08BB6.1090304@freebsd.org> <86ipzyncqf.fsf@zhuzha.ua1> <4CE139C5.4010300@freebsd.org> <86pqu65k1l.fsf@kopusha.home.net> In-Reply-To: <86pqu65k1l.fsf@kopusha.home.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on lauren.room52.net Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r215166 - in head: . sys/conf sys/netinet sys/netinet/cc sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 23:11:02 -0000 On 11/16/10 08:55, Mikolaj Golub wrote: > > On Tue, 16 Nov 2010 00:46:45 +1100 Lawrence Stewart wrote: > > LS> On 11/15/10 20:43, Mikolaj Golub wrote: > >> > >> On Mon, 15 Nov 2010 12:24:06 +1100 Lawrence Stewart wrote: > >> > >> LS> On 11/15/10 02:15, Mikolaj Golub wrote: > >> >> > >> >> LS> Would you mind testing the following patch? It fixes the panic for me. > >> >> > >> >> LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit.patch > >> >> > >> >> With this patch the system hangs during the boot. Ctr-Alt-Esc to break into > >> >> ddb does not work. I am trying this under VirtualBox. > >> > >> LS> I can't reproduce a hang, but please try this patch instead: > >> > >> LS> http://people.freebsd.org/~lstewart/patches/5cc/modcc_vnetpanic_ccinit_v2.patch > >> > >> I can't try it now on the box where I observed the hang. Trying on another box > >> I can't reproduce the hang -- both patches works for me: no hang and I can > >> create/remove jail and tcp connections to jail work. > >> > >> I will try the patch on the "problem" box tonight. > > Strange, I can't reproduce the hang today :-). I have tried both SI_ORDER_ANY > and SI_ORDER_FIRST. I will keep running the kernel with your patches and let > you know if I have any issues. Thanks Mikolaj, I really appreciate the help. I'll try to get the patches committed shortly. Cheers, Lawrence From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 23:13:25 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D75DB106564A; Mon, 15 Nov 2010 23:13:25 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C62CE8FC19; Mon, 15 Nov 2010 23:13:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAFNDPW4031705; Mon, 15 Nov 2010 23:13:25 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFNDP7e031703; Mon, 15 Nov 2010 23:13:25 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201011152313.oAFNDP7e031703@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 15 Nov 2010 23:13:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215353 - head/sys/dev/mii X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 23:13:25 -0000 Author: jkim Date: Mon Nov 15 23:13:25 2010 New Revision: 215353 URL: http://svn.freebsd.org/changeset/base/215353 Log: Plug memory leakage introduced in r204989. Reported by: yongari Modified: head/sys/dev/mii/brgphy.c Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Mon Nov 15 22:12:13 2010 (r215352) +++ head/sys/dev/mii/brgphy.c Mon Nov 15 23:13:25 2010 (r215353) @@ -154,15 +154,18 @@ static int detect_hs21(struct bce_softc *bce_sc) { char *sysenv; + int found; - if (bce_sc->bce_chipid != HS21_BCM_CHIPID) - return (0); - sysenv = getenv("smbios.system.product"); - if (sysenv == NULL) - return (0); - if (strncmp(sysenv, HS21_PRODUCT_ID, strlen(HS21_PRODUCT_ID)) != 0) - return (0); - return (1); + found = 0; + if (bce_sc->bce_chipid == HS21_BCM_CHIPID) { + sysenv = getenv("smbios.system.product"); + if (sysenv != NULL) { + if (strcmp(sysenv, HS21_PRODUCT_ID) == 0) + found = 1; + freeenv(sysenv); + } + } + return (found); } /* Search for our PHY in the list of known PHYs */ From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 23:14:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1072106566C; Mon, 15 Nov 2010 23:14:14 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CFE0A8FC0A; Mon, 15 Nov 2010 23:14:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAFNEEtw031763; Mon, 15 Nov 2010 23:14:14 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFNEEaf031761; Mon, 15 Nov 2010 23:14:14 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201011152314.oAFNEEaf031761@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Mon, 15 Nov 2010 23:14:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215354 - head/sys/compat/linsysfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 23:14:15 -0000 Author: des Date: Mon Nov 15 23:14:14 2010 New Revision: 215354 URL: http://svn.freebsd.org/changeset/base/215354 Log: Remove no-op assignment. Submitted by: clang via arundel@ MFC after: 2 weeks Modified: head/sys/compat/linsysfs/linsysfs.c Modified: head/sys/compat/linsysfs/linsysfs.c ============================================================================== --- head/sys/compat/linsysfs/linsysfs.c Mon Nov 15 23:13:25 2010 (r215353) +++ head/sys/compat/linsysfs/linsysfs.c Mon Nov 15 23:14:14 2010 (r215354) @@ -182,8 +182,8 @@ linsysfs_run_bus(device_t dev, struct pf sprintf(host, "host%d", host_number++); strcat(new_path, "/"); strcat(new_path, host); - sub_dir = pfs_create_dir(dir, - host, NULL, NULL, NULL, 0); + pfs_create_dir(dir, host, + NULL, NULL, NULL, 0); scsi_host = malloc(sizeof( struct scsi_host_queue), M_DEVBUF, M_NOWAIT); From owner-svn-src-head@FreeBSD.ORG Mon Nov 15 23:38:53 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 295B1106567A; Mon, 15 Nov 2010 23:38:53 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 181B48FC13; Mon, 15 Nov 2010 23:38:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAFNcqxT032300; Mon, 15 Nov 2010 23:38:52 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFNcqjG032298; Mon, 15 Nov 2010 23:38:52 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201011152338.oAFNcqjG032298@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 15 Nov 2010 23:38:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215355 - head/sys/dev/mii X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 23:38:53 -0000 Author: jkim Date: Mon Nov 15 23:38:52 2010 New Revision: 215355 URL: http://svn.freebsd.org/changeset/base/215355 Log: Restore the previous behaviour of substring match. Modified: head/sys/dev/mii/brgphy.c Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Mon Nov 15 23:14:14 2010 (r215354) +++ head/sys/dev/mii/brgphy.c Mon Nov 15 23:38:52 2010 (r215355) @@ -160,7 +160,8 @@ detect_hs21(struct bce_softc *bce_sc) if (bce_sc->bce_chipid == HS21_BCM_CHIPID) { sysenv = getenv("smbios.system.product"); if (sysenv != NULL) { - if (strcmp(sysenv, HS21_PRODUCT_ID) == 0) + if (strncmp(sysenv, HS21_PRODUCT_ID, + strlen(HS21_PRODUCT_ID)) == 0) found = 1; freeenv(sysenv); } From owner-svn-src-head@FreeBSD.ORG Tue Nov 16 00:34:35 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C3BA106564A; Tue, 16 Nov 2010 00:34:35 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id C842F8FC16; Tue, 16 Nov 2010 00:34:34 +0000 (UTC) Received: by qyk32 with SMTP id 32so416918qyk.13 for ; Mon, 15 Nov 2010 16:34:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type; bh=mkzxH9xDxcs5/0AYhsEZxlnrezRZOKDMWVxRw4lRHIY=; b=U3kIFN/t6P9vFdHiGKon01hOQkzi6DA061GrO3SKCBEOJrUAuG25HzQJxxqEfWT7zC WtpNakisFHlQ6CjoiPf8kBmmmSTGKZDHfGAVH7Dsby89lMsjJDzdR26MRMgZdX+swTqn h+OS3YKr7E0bIgfBByCvIhPqHexGePIipAReQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=hbFgnmVg5H63VJqIch9448+0xFyy0dlCM0Fxi1VxJrVQPLPe2ghxlhqWbpiRLL9XKZ mPAkRNAlk0rjY58I7wnuAsa3IfMMHnzWcFyZd+iHcpKeFu4K0toVsjF+ll30NSUe2YFE 7138hbIyhzkmqjalxiQzDpe2mkIeE/uFwhq3k= Received: by 10.229.212.5 with SMTP id gq5mr5572598qcb.275.1289867673596; Mon, 15 Nov 2010 16:34:33 -0800 (PST) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.229.231.143 with HTTP; Mon, 15 Nov 2010 16:33:53 -0800 (PST) In-Reply-To: <20101115171016.GB20524@onelab2.iet.unipi.it> References: <201011121302.oACD2Qjt009385@svn.freebsd.org> <20101115171016.GB20524@onelab2.iet.unipi.it> From: Ivan Voras Date: Tue, 16 Nov 2010 01:33:53 +0100 X-Google-Sender-Auth: zJWXgp7gaxFYd6597YXNOynBguI Message-ID: To: Luigi Rizzo Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215178 - in head: lib/libc/sys sys/kern sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 00:34:35 -0000 On 15 November 2010 18:10, Luigi Rizzo wrote: > 2. [generic] passing pointers between userland and kernel > requires remapping the pointer when going up or down. > As the mapping would be application specific, i don't > see much use in allowing room for a pointer without kernel code > to map userland <-> kernel pointers. I'm not thinking of passing a *working* pointer into the kernel but used as a cookie, similar to how it's used in kqueue: the intention being the application can send and get a pointer which means something to the application, not something usable to the kernel. Without using intptr_t, if an application wants to hang a structure on the cookie, it needs to maintain its own translation table (index-to-pointer). From owner-svn-src-head@FreeBSD.ORG Tue Nov 16 01:35:18 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8E0E106564A; Tue, 16 Nov 2010 01:35:18 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 862168FC19; Tue, 16 Nov 2010 01:35:18 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id CCBDD73098; Tue, 16 Nov 2010 02:48:17 +0100 (CET) Date: Tue, 16 Nov 2010 02:48:17 +0100 From: Luigi Rizzo To: Ivan Voras Message-ID: <20101116014817.GA25713@onelab2.iet.unipi.it> References: <201011121302.oACD2Qjt009385@svn.freebsd.org> <20101115171016.GB20524@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, Luigi Rizzo , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r215178 - in head: lib/libc/sys sys/kern sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 01:35:18 -0000 On Tue, Nov 16, 2010 at 01:33:53AM +0100, Ivan Voras wrote: > On 15 November 2010 18:10, Luigi Rizzo wrote: > > > 2. [generic] passing pointers between userland and kernel > > requires remapping the pointer when going up or down. > > As the mapping would be application specific, i don't > > see much use in allowing room for a pointer without kernel code > > to map userland <-> kernel pointers. > > I'm not thinking of passing a *working* pointer into the kernel but > used as a cookie, similar to how it's used in kqueue: the intention > being the application can send and get a pointer which means something > to the application, not something usable to the kernel. oh, but then you are thinking of something completely different. The SO_USER_COOKIE is never returned to the application; it is only passed to another kernel subsystem, so it must be significant there, not for the application. cheers luigi From owner-svn-src-head@FreeBSD.ORG Tue Nov 16 03:43:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D6BA10656D5; Tue, 16 Nov 2010 03:43:07 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EF56E8FC22; Tue, 16 Nov 2010 03:43:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG3h6Io038195; Tue, 16 Nov 2010 03:43:06 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG3h683038188; Tue, 16 Nov 2010 03:43:06 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201011160343.oAG3h683038188@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 16 Nov 2010 03:43:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215367 - head/sys/dev/drm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 03:43:07 -0000 Author: nwhitehorn Date: Tue Nov 16 03:43:06 2010 New Revision: 215367 URL: http://svn.freebsd.org/changeset/base/215367 Log: Make drm(4) build, if not work reliably, on PowerPC. Modified: head/sys/dev/drm/drmP.h head/sys/dev/drm/drm_agpsupport.c head/sys/dev/drm/drm_drv.c head/sys/dev/drm/drm_memory.c head/sys/dev/drm/drm_sysctl.c head/sys/dev/drm/radeon_cs.c Modified: head/sys/dev/drm/drmP.h ============================================================================== --- head/sys/dev/drm/drmP.h Tue Nov 16 03:20:57 2010 (r215366) +++ head/sys/dev/drm/drmP.h Tue Nov 16 03:43:06 2010 (r215367) @@ -80,7 +80,9 @@ struct drm_file; #include #include #include +#if defined(__i386__) || defined(__amd64__) #include +#endif #include #include #include @@ -246,20 +248,20 @@ typedef u_int8_t u8; *(volatile u_int8_t *)(((vm_offset_t)(map)->virtual) + \ (vm_offset_t)(offset)) #define DRM_READ16(map, offset) \ - *(volatile u_int16_t *)(((vm_offset_t)(map)->virtual) + \ - (vm_offset_t)(offset)) + le16toh(*(volatile u_int16_t *)(((vm_offset_t)(map)->virtual) + \ + (vm_offset_t)(offset))) #define DRM_READ32(map, offset) \ - *(volatile u_int32_t *)(((vm_offset_t)(map)->virtual) + \ - (vm_offset_t)(offset)) + le32toh(*(volatile u_int32_t *)(((vm_offset_t)(map)->virtual) + \ + (vm_offset_t)(offset))) #define DRM_WRITE8(map, offset, val) \ *(volatile u_int8_t *)(((vm_offset_t)(map)->virtual) + \ (vm_offset_t)(offset)) = val #define DRM_WRITE16(map, offset, val) \ *(volatile u_int16_t *)(((vm_offset_t)(map)->virtual) + \ - (vm_offset_t)(offset)) = val + (vm_offset_t)(offset)) = htole16(val) #define DRM_WRITE32(map, offset, val) \ *(volatile u_int32_t *)(((vm_offset_t)(map)->virtual) + \ - (vm_offset_t)(offset)) = val + (vm_offset_t)(offset)) = htole32(val) #define DRM_VERIFYAREA_READ( uaddr, size ) \ (!useracc(__DECONST(caddr_t, uaddr), size, VM_PROT_READ)) Modified: head/sys/dev/drm/drm_agpsupport.c ============================================================================== --- head/sys/dev/drm/drm_agpsupport.c Tue Nov 16 03:20:57 2010 (r215366) +++ head/sys/dev/drm/drm_agpsupport.c Tue Nov 16 03:43:06 2010 (r215367) @@ -318,7 +318,7 @@ int drm_agp_bind(struct drm_device *dev, if (!dev->agp || !dev->agp->acquired) return EINVAL; - DRM_DEBUG("agp_bind, page_size=%x\n", PAGE_SIZE); + DRM_DEBUG("agp_bind, page_size=%x\n", (int)PAGE_SIZE); entry = drm_agp_lookup_entry(dev, (void *)request->handle); if (entry == NULL || entry->bound) Modified: head/sys/dev/drm/drm_drv.c ============================================================================== --- head/sys/dev/drm/drm_drv.c Tue Nov 16 03:20:57 2010 (r215366) +++ head/sys/dev/drm/drm_drv.c Tue Nov 16 03:43:06 2010 (r215367) @@ -478,7 +478,7 @@ static int drm_load(struct drm_device *d retcode = ENOMEM; goto error; } - if (dev->agp != NULL) { + if (dev->agp != NULL && dev->agp->info.ai_aperture_base != 0) { if (drm_mtrr_add(dev->agp->info.ai_aperture_base, dev->agp->info.ai_aperture_size, DRM_MTRR_WC) == 0) dev->agp->mtrr = 1; Modified: head/sys/dev/drm/drm_memory.c ============================================================================== --- head/sys/dev/drm/drm_memory.c Tue Nov 16 03:20:57 2010 (r215366) +++ head/sys/dev/drm/drm_memory.c Tue Nov 16 03:43:06 2010 (r215367) @@ -73,7 +73,7 @@ void drm_mem_uninit(void) void *drm_ioremap_wc(struct drm_device *dev, drm_local_map_t *map) { - return pmap_mapdev_attr(map->offset, map->size, PAT_WRITE_COMBINING); + return pmap_mapdev_attr(map->offset, map->size, VM_MEMATTR_WRITE_COMBINING); } void *drm_ioremap(struct drm_device *dev, drm_local_map_t *map) Modified: head/sys/dev/drm/drm_sysctl.c ============================================================================== --- head/sys/dev/drm/drm_sysctl.c Tue Nov 16 03:20:57 2010 (r215366) +++ head/sys/dev/drm/drm_sysctl.c Tue Nov 16 03:43:06 2010 (r215367) @@ -259,7 +259,7 @@ static int drm_bufs_info DRM_SYSCTL_HAND *(1 << dma->bufs[i].page_order), (dma->bufs[i].seg_count * (1 << dma->bufs[i].page_order)) - * PAGE_SIZE / 1024); + * (int)PAGE_SIZE / 1024); } DRM_SYSCTL_PRINT("\n"); for (i = 0; i < dma->buf_count; i++) { Modified: head/sys/dev/drm/radeon_cs.c ============================================================================== --- head/sys/dev/drm/radeon_cs.c Tue Nov 16 03:20:57 2010 (r215366) +++ head/sys/dev/drm/radeon_cs.c Tue Nov 16 03:43:06 2010 (r215367) @@ -765,7 +765,7 @@ static int r600_cs_parse(struct drm_rade memcpy(parser->ib, ib_chunk->kdata, ib_chunk->length_dw * sizeof(uint32_t)); /* read back last byte to flush WC buffers */ - rb = readl(((vm_offset_t)parser->ib + (ib_chunk->length_dw-1) * sizeof(uint32_t))); + rb = *(volatile u_int32_t *) (((vm_offset_t)parser->ib + (ib_chunk->length_dw-1) * sizeof(uint32_t))); return 0; } From owner-svn-src-head@FreeBSD.ORG Tue Nov 16 07:09:06 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11CBA106566B; Tue, 16 Nov 2010 07:09:06 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA0398FC08; Tue, 16 Nov 2010 07:09:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG795Pu043017; Tue, 16 Nov 2010 07:09:05 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG7955Q043013; Tue, 16 Nov 2010 07:09:05 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201011160709.oAG7955Q043013@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 16 Nov 2010 07:09:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215377 - in head/sys/netinet: . cc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 07:09:06 -0000 Author: lstewart Date: Tue Nov 16 07:09:05 2010 New Revision: 215377 URL: http://svn.freebsd.org/changeset/base/215377 Log: cc_init() should only be run once on system boot, but with VIMAGE kernels it runs on boot and each time a vnet jail is created. Running cc_init() multiple times results in a panic when attempting to initialise the cc_list lock again, and so r215166 effectively broke the use of vnet jails. Switch to using a SYSINIT to run cc_init() on boot. CC algorithm modules loaded on boot register in the same SI_SUB_PROTO_IFATTACHDOMAIN category as is used in this patch, so cc_init() is run at SI_ORDER_FIRST to ensure the framework is initialised before module registration is attempted. Sponsored by: FreeBSD Foundation Reported and tested by: Mikolaj Golub MFC after: 11 weeks X-MFC with: r215166 Modified: head/sys/netinet/cc.h head/sys/netinet/cc/cc.c head/sys/netinet/tcp_subr.c Modified: head/sys/netinet/cc.h ============================================================================== --- head/sys/netinet/cc.h Tue Nov 16 07:06:51 2010 (r215376) +++ head/sys/netinet/cc.h Tue Nov 16 07:09:05 2010 (r215377) @@ -62,7 +62,6 @@ extern struct cc_algo newreno_cc_algo; SYSCTL_DECL(_net_inet_tcp_cc); /* CC housekeeping functions. */ -void cc_init(void); int cc_register_algo(struct cc_algo *add_cc); int cc_deregister_algo(struct cc_algo *remove_cc); Modified: head/sys/netinet/cc/cc.c ============================================================================== --- head/sys/netinet/cc/cc.c Tue Nov 16 07:06:51 2010 (r215376) +++ head/sys/netinet/cc/cc.c Tue Nov 16 07:09:05 2010 (r215377) @@ -176,8 +176,8 @@ cc_list_available(SYSCTL_HANDLER_ARGS) /* * Initialise CC subsystem on system boot. */ -void -cc_init() +static void +cc_init(void) { CC_LIST_LOCK_INIT(); STAILQ_INIT(&cc_list); @@ -328,6 +328,8 @@ cc_modevent(module_t mod, int event_type return (err); } +SYSINIT(cc, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_FIRST, cc_init, NULL); + /* Declare sysctl tree and populate it. */ SYSCTL_NODE(_net_inet_tcp, OID_AUTO, cc, CTLFLAG_RW, NULL, "congestion control related settings"); Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Tue Nov 16 07:06:51 2010 (r215376) +++ head/sys/netinet/tcp_subr.c Tue Nov 16 07:09:05 2010 (r215377) @@ -278,8 +278,6 @@ tcp_init(void) { int hashsize; - cc_init(); - hashsize = TCBHASHSIZE; TUNABLE_INT_FETCH("net.inet.tcp.tcbhashsize", &hashsize); if (!powerof2(hashsize)) { From owner-svn-src-head@FreeBSD.ORG Tue Nov 16 07:57:56 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65CFF1065694; Tue, 16 Nov 2010 07:57:56 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 547E18FC12; Tue, 16 Nov 2010 07:57:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG7vuHY044750; Tue, 16 Nov 2010 07:57:56 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG7vuVJ044748; Tue, 16 Nov 2010 07:57:56 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201011160757.oAG7vuVJ044748@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 16 Nov 2010 07:57:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215391 - head/sys/netinet/cc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 07:57:56 -0000 Author: lstewart Date: Tue Nov 16 07:57:56 2010 New Revision: 215391 URL: http://svn.freebsd.org/changeset/base/215391 Log: On CC algorithm module unload, we walk the list of active TCP control blocks. Any found to be using the algorithm that is about to go away are switched back to NewReno to avoid leaving dangling pointers which would trigger a panic. For VIMAGE kernels, there is a list per vnet to walk, yet the implementation was only examining one of the vnet lists. Fix the implementation of the above feature for VIMAGE kernels by looping through all active TCP control blocks across all vnets. Sponsored by: FreeBSD Foundation Tested by: Mikolaj Golub Reviewed by: bz (briefly) MFC after: 11 weeks Modified: head/sys/netinet/cc/cc.c Modified: head/sys/netinet/cc/cc.c ============================================================================== --- head/sys/netinet/cc/cc.c Tue Nov 16 07:55:36 2010 (r215390) +++ head/sys/netinet/cc/cc.c Tue Nov 16 07:57:56 2010 (r215391) @@ -193,6 +193,7 @@ cc_deregister_algo(struct cc_algo *remov struct tcpcb *tp; struct inpcb *inp; int err; + VNET_ITERATOR_DECL(vnet_iter); err = ENOENT; @@ -221,9 +222,10 @@ cc_deregister_algo(struct cc_algo *remov if (!err) { /* - * Check all active control blocks and change any that are - * using this algorithm back to newreno. If the algorithm that - * was in use requires cleanup code to be run, call it. + * Check all active control blocks across all network stacks and + * change any that are using this algorithm back to newreno. If + * the algorithm that was in use requires cleanup code to be + * run, call it. * * New connections already part way through being initialised * with the CC algo we're removing will not race with this code @@ -231,30 +233,39 @@ cc_deregister_algo(struct cc_algo *remov * We therefore don't enter the loop below until the connection * list has stabilised. */ - INP_INFO_RLOCK(&V_tcbinfo); - LIST_FOREACH(inp, &V_tcb, inp_list) { - INP_WLOCK(inp); - /* Important to skip tcptw structs. */ - if (!(inp->inp_flags & INP_TIMEWAIT) && - (tp = intotcpcb(inp)) != NULL) { - /* - * By holding INP_WLOCK here, we are - * assured that the connection is not - * currently executing inside the CC - * module's functions i.e. it is safe to - * make the switch back to newreno. - */ - if (CC_ALGO(tp) == remove_cc) { - tmpfuncs = CC_ALGO(tp); - /* Newreno does not require any init. */ - CC_ALGO(tp) = &newreno_cc_algo; - if (tmpfuncs->cb_destroy != NULL) - tmpfuncs->cb_destroy(tp->ccv); + VNET_LIST_RLOCK(); + VNET_FOREACH(vnet_iter) { + CURVNET_SET(vnet_iter); + INP_INFO_RLOCK(&V_tcbinfo); + LIST_FOREACH(inp, &V_tcb, inp_list) { + INP_WLOCK(inp); + /* Important to skip tcptw structs. */ + if (!(inp->inp_flags & INP_TIMEWAIT) && + (tp = intotcpcb(inp)) != NULL) { + /* + * By holding INP_WLOCK here, we are + * assured that the connection is not + * currently executing inside the CC + * module's functions i.e. it is safe + * to make the switch back to newreno. + */ + if (CC_ALGO(tp) == remove_cc) { + tmpfuncs = CC_ALGO(tp); + /* + * Newreno does not + * require any init. + */ + CC_ALGO(tp) = &newreno_cc_algo; + if (tmpfuncs->cb_destroy != NULL) + tmpfuncs->cb_destroy(tp->ccv); + } } + INP_WUNLOCK(inp); } - INP_WUNLOCK(inp); + INP_INFO_RUNLOCK(&V_tcbinfo); + CURVNET_RESTORE(); } - INP_INFO_RUNLOCK(&V_tcbinfo); + VNET_LIST_RUNLOCK(); } return (err); From owner-svn-src-head@FreeBSD.ORG Tue Nov 16 08:30:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 542D8106564A; Tue, 16 Nov 2010 08:30:40 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 427F08FC16; Tue, 16 Nov 2010 08:30:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG8Ue9U045751; Tue, 16 Nov 2010 08:30:40 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG8Ue0I045747; Tue, 16 Nov 2010 08:30:40 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201011160830.oAG8Ue0I045747@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 16 Nov 2010 08:30:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215392 - in head/sys/netinet: . cc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 08:30:40 -0000 Author: lstewart Date: Tue Nov 16 08:30:39 2010 New Revision: 215392 URL: http://svn.freebsd.org/changeset/base/215392 Log: Move protocol specific implementation detail out of the core CC framework. Sponsored by: FreeBSD Foundation Tested by: Mikolaj Golub MFC after: 11 weeks X-MFC with: r215166 Modified: head/sys/netinet/cc/cc.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_var.h Modified: head/sys/netinet/cc/cc.c ============================================================================== --- head/sys/netinet/cc/cc.c Tue Nov 16 07:57:56 2010 (r215391) +++ head/sys/netinet/cc/cc.c Tue Nov 16 08:30:39 2010 (r215392) @@ -190,10 +190,7 @@ int cc_deregister_algo(struct cc_algo *remove_cc) { struct cc_algo *funcs, *tmpfuncs; - struct tcpcb *tp; - struct inpcb *inp; int err; - VNET_ITERATOR_DECL(vnet_iter); err = ENOENT; @@ -220,53 +217,14 @@ cc_deregister_algo(struct cc_algo *remov } CC_LIST_WUNLOCK(); - if (!err) { + if (!err) /* - * Check all active control blocks across all network stacks and - * change any that are using this algorithm back to newreno. If - * the algorithm that was in use requires cleanup code to be - * run, call it. - * - * New connections already part way through being initialised - * with the CC algo we're removing will not race with this code - * because the INP_INFO_WLOCK is held during initialisation. - * We therefore don't enter the loop below until the connection - * list has stabilised. + * XXXLAS: + * - We may need to handle non-zero return values in future. + * - If we add CC framework support for protocols other than + * TCP, we may want a more generic way to handle this step. */ - VNET_LIST_RLOCK(); - VNET_FOREACH(vnet_iter) { - CURVNET_SET(vnet_iter); - INP_INFO_RLOCK(&V_tcbinfo); - LIST_FOREACH(inp, &V_tcb, inp_list) { - INP_WLOCK(inp); - /* Important to skip tcptw structs. */ - if (!(inp->inp_flags & INP_TIMEWAIT) && - (tp = intotcpcb(inp)) != NULL) { - /* - * By holding INP_WLOCK here, we are - * assured that the connection is not - * currently executing inside the CC - * module's functions i.e. it is safe - * to make the switch back to newreno. - */ - if (CC_ALGO(tp) == remove_cc) { - tmpfuncs = CC_ALGO(tp); - /* - * Newreno does not - * require any init. - */ - CC_ALGO(tp) = &newreno_cc_algo; - if (tmpfuncs->cb_destroy != NULL) - tmpfuncs->cb_destroy(tp->ccv); - } - } - INP_WUNLOCK(inp); - } - INP_INFO_RUNLOCK(&V_tcbinfo); - CURVNET_RESTORE(); - } - VNET_LIST_RUNLOCK(); - } + tcp_ccalgounload(remove_cc); return (err); } Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Tue Nov 16 07:57:56 2010 (r215391) +++ head/sys/netinet/tcp_subr.c Tue Nov 16 08:30:39 2010 (r215392) @@ -708,6 +708,69 @@ tcp_newtcpcb(struct inpcb *inp) } /* + * Switch the congestion control algorithm back to NewReno for any active + * control blocks using an algorithm which is about to go away. + * This ensures the CC framework can allow the unload to proceed without leaving + * any dangling pointers which would trigger a panic. + * Returning non-zero would inform the CC framework that something went wrong + * and it would be unsafe to allow the unload to proceed. However, there is no + * way for this to occur with this implementation so we always return zero. + */ +int +tcp_ccalgounload(struct cc_algo *unload_algo) +{ + struct cc_algo *tmpalgo; + struct inpcb *inp; + struct tcpcb *tp; + VNET_ITERATOR_DECL(vnet_iter); + + /* + * Check all active control blocks across all network stacks and change + * any that are using "unload_algo" back to NewReno. If "unload_algo" + * requires cleanup code to be run, call it. + */ + VNET_LIST_RLOCK(); + VNET_FOREACH(vnet_iter) { + CURVNET_SET(vnet_iter); + INP_INFO_RLOCK(&V_tcbinfo); + /* + * New connections already part way through being initialised + * with the CC algo we're removing will not race with this code + * because the INP_INFO_WLOCK is held during initialisation. We + * therefore don't enter the loop below until the connection + * list has stabilised. + */ + LIST_FOREACH(inp, &V_tcb, inp_list) { + INP_WLOCK(inp); + /* Important to skip tcptw structs. */ + if (!(inp->inp_flags & INP_TIMEWAIT) && + (tp = intotcpcb(inp)) != NULL) { + /* + * By holding INP_WLOCK here, we are assured + * that the connection is not currently + * executing inside the CC module's functions + * i.e. it is safe to make the switch back to + * NewReno. + */ + if (CC_ALGO(tp) == unload_algo) { + tmpalgo = CC_ALGO(tp); + /* NewReno does not require any init. */ + CC_ALGO(tp) = &newreno_cc_algo; + if (tmpalgo->cb_destroy != NULL) + tmpalgo->cb_destroy(tp->ccv); + } + } + INP_WUNLOCK(inp); + } + INP_INFO_RUNLOCK(&V_tcbinfo); + CURVNET_RESTORE(); + } + VNET_LIST_RUNLOCK(); + + return (0); +} + +/* * Drop a TCP connection, reporting * the specified error. If connection is synchronized, * then send a RST to peer. Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Tue Nov 16 07:57:56 2010 (r215391) +++ head/sys/netinet/tcp_var.h Tue Nov 16 08:30:39 2010 (r215392) @@ -605,6 +605,7 @@ VNET_DECLARE(int, tcp_ecn_maxretries); #define V_tcp_ecn_maxretries VNET(tcp_ecn_maxretries) int tcp_addoptions(struct tcpopt *, u_char *); +int tcp_ccalgounload(struct cc_algo *unload_algo); struct tcpcb * tcp_close(struct tcpcb *); void tcp_discardcb(struct tcpcb *); From owner-svn-src-head@FreeBSD.ORG Tue Nov 16 08:43:26 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18636106564A; Tue, 16 Nov 2010 08:43:26 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0733F8FC1A; Tue, 16 Nov 2010 08:43:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG8hPci046082; Tue, 16 Nov 2010 08:43:25 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG8hPCm046080; Tue, 16 Nov 2010 08:43:25 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201011160843.oAG8hPCm046080@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 16 Nov 2010 08:43:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215393 - head/sys/netinet/cc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 08:43:26 -0000 Author: lstewart Date: Tue Nov 16 08:43:25 2010 New Revision: 215393 URL: http://svn.freebsd.org/changeset/base/215393 Log: - Querying the default CC algo is more common than setting it and the function is small, so there is no good reason not to declare the buffer at the top. - Fix a whitespace nit. Sponsored by: FreeBSD Foundation MFC after: 11 weeks X-MFC with: r215166 Modified: head/sys/netinet/cc/cc.c Modified: head/sys/netinet/cc/cc.c ============================================================================== --- head/sys/netinet/cc/cc.c Tue Nov 16 08:30:39 2010 (r215392) +++ head/sys/netinet/cc/cc.c Tue Nov 16 08:43:25 2010 (r215393) @@ -106,14 +106,13 @@ cc_set_default(struct cc_algo *new_defau static int cc_default_algo(SYSCTL_HANDLER_ARGS) { + char default_cc[TCP_CA_NAME_MAX]; struct cc_algo *funcs; int err, found; err = found = 0; if (req->newptr == NULL) { - char default_cc[TCP_CA_NAME_MAX]; - /* Just print the current default. */ CC_LIST_RLOCK(); strlcpy(default_cc, CC_DEFAULT()->name, TCP_CA_NAME_MAX); @@ -216,7 +215,7 @@ cc_deregister_algo(struct cc_algo *remov } } CC_LIST_WUNLOCK(); - + if (!err) /* * XXXLAS: From owner-svn-src-head@FreeBSD.ORG Tue Nov 16 09:34:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56CA01065672; Tue, 16 Nov 2010 09:34:32 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 089C88FC16; Tue, 16 Nov 2010 09:34:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAG9YVA3047278; Tue, 16 Nov 2010 09:34:31 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAG9YV4V047275; Tue, 16 Nov 2010 09:34:31 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201011160934.oAG9YV4V047275@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 16 Nov 2010 09:34:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215395 - in head/sys/netinet: . cc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 09:34:33 -0000 Author: lstewart Date: Tue Nov 16 09:34:31 2010 New Revision: 215395 URL: http://svn.freebsd.org/changeset/base/215395 Log: Make the CC framework more VIMAGE friendly by adding the machinery to allow vnets to select their own default CC algorithm independent of each other and the base system. If the base system or a vnet has set a default which gets unloaded, we reset that netstack's default to NewReno. Sponsored by: FreeBSD Foundation Tested by: Mikolaj Golub Reviewed by: bz (briefly) MFC after: 3 months Modified: head/sys/netinet/cc.h head/sys/netinet/cc/cc.c Modified: head/sys/netinet/cc.h ============================================================================== --- head/sys/netinet/cc.h Tue Nov 16 09:01:19 2010 (r215394) +++ head/sys/netinet/cc.h Tue Nov 16 09:34:31 2010 (r215395) @@ -58,6 +58,10 @@ extern STAILQ_HEAD(cc_head, cc_algo) cc_ extern const int tcprexmtthresh; extern struct cc_algo newreno_cc_algo; +/* Per-netstack bits. */ +VNET_DECLARE(struct cc_algo *, default_cc_ptr); +#define V_default_cc_ptr VNET(default_cc_ptr) + /* Define the new net.inet.tcp.cc sysctl tree. */ SYSCTL_DECL(_net_inet_tcp_cc); @@ -146,7 +150,7 @@ struct cc_algo { #define CC_DATA(tp) ((tp)->ccv->cc_data) /* Macro to obtain the system default CC algo's struct ptr. */ -#define CC_DEFAULT() STAILQ_FIRST(&cc_list) +#define CC_DEFAULT() V_default_cc_ptr extern struct rwlock cc_list_lock; #define CC_LIST_LOCK_INIT() rw_init(&cc_list_lock, "cc_list") @@ -155,6 +159,6 @@ extern struct rwlock cc_list_lock; #define CC_LIST_RUNLOCK() rw_runlock(&cc_list_lock) #define CC_LIST_WLOCK() rw_wlock(&cc_list_lock) #define CC_LIST_WUNLOCK() rw_wunlock(&cc_list_lock) -#define CC_LIST_WLOCK_ASSERT() rw_assert(&cc_list_lock, RA_WLOCKED) +#define CC_LIST_LOCK_ASSERT() rw_assert(&cc_list_lock, RA_LOCKED) #endif /* _NETINET_CC_H_ */ Modified: head/sys/netinet/cc/cc.c ============================================================================== --- head/sys/netinet/cc/cc.c Tue Nov 16 09:01:19 2010 (r215394) +++ head/sys/netinet/cc/cc.c Tue Nov 16 09:34:31 2010 (r215395) @@ -81,24 +81,7 @@ struct cc_head cc_list = STAILQ_HEAD_INI /* Protects the cc_list TAILQ. */ struct rwlock cc_list_lock; -/* - * Set the default CC algorithm to new_default. The default is identified - * by being the first element in the cc_list TAILQ. - */ -static void -cc_set_default(struct cc_algo *new_default) -{ - CC_LIST_WLOCK_ASSERT(); - - /* - * Make the requested system default CC algorithm the first element in - * the list if it isn't already. - */ - if (new_default != CC_DEFAULT()) { - STAILQ_REMOVE(&cc_list, new_default, cc_algo, entries); - STAILQ_INSERT_HEAD(&cc_list, new_default, entries); - } -} +VNET_DEFINE(struct cc_algo *, default_cc_ptr) = &newreno_cc_algo; /* * Sysctl handler to show and change the default CC algorithm. @@ -120,15 +103,15 @@ cc_default_algo(SYSCTL_HANDLER_ARGS) err = sysctl_handle_string(oidp, default_cc, 1, req); } else { /* Find algo with specified name and set it to default. */ - CC_LIST_WLOCK(); + CC_LIST_RLOCK(); STAILQ_FOREACH(funcs, &cc_list, entries) { if (strncmp((char *)req->newptr, funcs->name, TCP_CA_NAME_MAX) == 0) { found = 1; - cc_set_default(funcs); + V_default_cc_ptr = funcs; } } - CC_LIST_WUNLOCK(); + CC_LIST_RUNLOCK(); if (!found) err = ESRCH; @@ -173,6 +156,28 @@ cc_list_available(SYSCTL_HANDLER_ARGS) } /* + * Reset the default CC algo to NewReno for any netstack which is using the algo + * that is about to go away as its default. + */ +static void +cc_checkreset_default(struct cc_algo *remove_cc) +{ + VNET_ITERATOR_DECL(vnet_iter); + + CC_LIST_LOCK_ASSERT(); + + VNET_LIST_RLOCK_NOSLEEP(); + VNET_FOREACH(vnet_iter) { + CURVNET_SET(vnet_iter); + if (strncmp(CC_DEFAULT()->name, remove_cc->name, + TCP_CA_NAME_MAX) == 0) + V_default_cc_ptr = &newreno_cc_algo; + CURVNET_RESTORE(); + } + VNET_LIST_RUNLOCK_NOSLEEP(); +} + +/* * Initialise CC subsystem on system boot. */ static void @@ -201,14 +206,7 @@ cc_deregister_algo(struct cc_algo *remov CC_LIST_WLOCK(); STAILQ_FOREACH_SAFE(funcs, &cc_list, entries, tmpfuncs) { if (funcs == remove_cc) { - /* - * If we're removing the current system default, - * reset the default to newreno. - */ - if (strncmp(CC_DEFAULT()->name, remove_cc->name, - TCP_CA_NAME_MAX) == 0) - cc_set_default(&newreno_cc_algo); - + cc_checkreset_default(remove_cc); STAILQ_REMOVE(&cc_list, funcs, cc_algo, entries); err = 0; break; @@ -302,7 +300,7 @@ SYSINIT(cc, SI_SUB_PROTO_IFATTACHDOMAIN, SYSCTL_NODE(_net_inet_tcp, OID_AUTO, cc, CTLFLAG_RW, NULL, "congestion control related settings"); -SYSCTL_PROC(_net_inet_tcp_cc, OID_AUTO, algorithm, CTLTYPE_STRING|CTLFLAG_RW, +SYSCTL_VNET_PROC(_net_inet_tcp_cc, OID_AUTO, algorithm, CTLTYPE_STRING|CTLFLAG_RW, NULL, 0, cc_default_algo, "A", "default congestion control algorithm"); SYSCTL_PROC(_net_inet_tcp_cc, OID_AUTO, available, CTLTYPE_STRING|CTLFLAG_RD, From owner-svn-src-head@FreeBSD.ORG Tue Nov 16 10:55:12 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EBA51065675; Tue, 16 Nov 2010 10:55:12 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 914538FC15; Tue, 16 Nov 2010 10:55:11 +0000 (UTC) Received: by qyk7 with SMTP id 7so568517qyk.13 for ; Tue, 16 Nov 2010 02:55:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type; bh=oIRuuwCzK986QI93anxIcXDqJ5NKYlR1nIRcg082M8g=; b=bZoWst8miB+/wk/6x8y86if+QtnHT4zhJD08f0ADgt204Bv8uPsdmFK6kLmJE7L13I QJZHB/rUo6RwUyZMn8GVB/EiWU1EmVUmOYbJA7IOOAe1qzgB/zt38XYdFV0/GtGLKx8B x6X9Gzn7VlvlebA6484F3dtTu8IM27cokmrj8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=m5jW2DtR/UM7jjZOz5MgtmzlpZtu5pjMFD7cDkHs74AjXTqyXycAcAC2ABk4pqYN51 Tk9WnTynogrO6fCIjG9KIl73KYvxTZKAmejznD6ZMou1iiajnmzg+Oto0Io6USo0sLSX NOtfoG93jD1yZo3x4aMBapUbAjlt4PmscTnzA= Received: by 10.229.82.70 with SMTP id a6mr6280078qcl.9.1289904910837; Tue, 16 Nov 2010 02:55:10 -0800 (PST) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.229.231.143 with HTTP; Tue, 16 Nov 2010 02:54:30 -0800 (PST) In-Reply-To: <20101116014817.GA25713@onelab2.iet.unipi.it> References: <201011121302.oACD2Qjt009385@svn.freebsd.org> <20101115171016.GB20524@onelab2.iet.unipi.it> <20101116014817.GA25713@onelab2.iet.unipi.it> From: Ivan Voras Date: Tue, 16 Nov 2010 11:54:30 +0100 X-Google-Sender-Auth: On0h3FL75zAc2UzvO5wnjJUGQ28 Message-ID: To: Luigi Rizzo Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, Luigi Rizzo , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r215178 - in head: lib/libc/sys sys/kern sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 10:55:12 -0000 On 16 November 2010 02:48, Luigi Rizzo wrote: > On Tue, Nov 16, 2010 at 01:33:53AM +0100, Ivan Voras wrote: >> On 15 November 2010 18:10, Luigi Rizzo wrote: >> >> > 2. [generic] passing pointers between userland and kernel >> > requires remapping the pointer when going up or down. >> > As the mapping would be application specific, i don't >> > see much use in allowing room for a pointer without kernel code >> > to map userland <-> kernel pointers. >> >> I'm not thinking of passing a *working* pointer into the kernel but >> used as a cookie, similar to how it's used in kqueue: the intention >> being the application can send and get a pointer which means something >> to the application, not something usable to the kernel. > > oh, but then you are thinking of something completely different. > The SO_USER_COOKIE is never returned to the application; it is > only passed to another kernel subsystem, so it must be significant > there, not for the application. Ah, ok then. I was thinking you are maybe trying to do something else, like tagging a socket with additional information from userland. From owner-svn-src-head@FreeBSD.ORG Tue Nov 16 12:30:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 743CE1065673; Tue, 16 Nov 2010 12:30:47 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 622E08FC19; Tue, 16 Nov 2010 12:30:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAGCUlSs053880; Tue, 16 Nov 2010 12:30:47 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGCUlVX053878; Tue, 16 Nov 2010 12:30:47 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201011161230.oAGCUlVX053878@svn.freebsd.org> From: Andriy Gapon Date: Tue, 16 Nov 2010 12:30:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215397 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 12:30:47 -0000 Author: avg Date: Tue Nov 16 12:30:47 2010 New Revision: 215397 URL: http://svn.freebsd.org/changeset/base/215397 Log: fix misspelling in a comment Reported by: Daniel Braniss MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Tue Nov 16 10:33:41 2010 (r215396) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Tue Nov 16 12:30:47 2010 (r215397) @@ -1557,7 +1557,7 @@ zfs_vget(vfs_t *vfsp, ino_t ino, int fla int err; /* - * zfs_zget() can't operate on virtual entires like .zfs/ or + * zfs_zget() can't operate on virtual entries like .zfs/ or * .zfs/snapshot/ directories, that's why we return EOPNOTSUPP. * This will make NFS to switch to LOOKUP instead of using VGET. */ From owner-svn-src-head@FreeBSD.ORG Tue Nov 16 12:43:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 162EF106566B; Tue, 16 Nov 2010 12:43:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE5D28FC16; Tue, 16 Nov 2010 12:43:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAGChjWD054220; Tue, 16 Nov 2010 12:43:45 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGChjpi054218; Tue, 16 Nov 2010 12:43:45 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201011161243.oAGChjpi054218@svn.freebsd.org> From: Andriy Gapon Date: Tue, 16 Nov 2010 12:43:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215398 - head/sys/x86/cpufreq X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 12:43:46 -0000 Author: avg Date: Tue Nov 16 12:43:45 2010 New Revision: 215398 URL: http://svn.freebsd.org/changeset/base/215398 Log: hwpstate: use CPU_FOREACH when binding to all available processors Also, add a comment mentioning _PSD - on some systems it's enough to put one logical CPU into a particular P-state to make other CPUs in the same domain to enter that P-state. Also, call sched_unbind() after the loop - sched_bind() automatically rebinds from previous CPU to a new one, and the new arrangement of code is safer against early loop exit. Plus one minor style nit. MFC after: 10 days Modified: head/sys/x86/cpufreq/hwpstate.c Modified: head/sys/x86/cpufreq/hwpstate.c ============================================================================== --- head/sys/x86/cpufreq/hwpstate.c Tue Nov 16 12:30:47 2010 (r215397) +++ head/sys/x86/cpufreq/hwpstate.c Tue Nov 16 12:43:45 2010 (r215398) @@ -157,7 +157,6 @@ DRIVER_MODULE(hwpstate, cpu, hwpstate_dr static int hwpstate_goto_pstate(device_t dev, int pstate) { - struct pcpu *pc; int i; uint64_t msr; int j; @@ -171,18 +170,15 @@ hwpstate_goto_pstate(device_t dev, int p if(limit > id) id = limit; - error = 0; /* * We are going to the same Px-state on all cpus. + * Probably should take _PSD into account. */ - for (i = 0; i < mp_ncpus; i++) { - /* Find each cpu. */ - pc = pcpu_find(i); - if (pc == NULL) - return (ENXIO); - thread_lock(curthread); + error = 0; + CPU_FOREACH(i) { /* Bind to each cpu. */ - sched_bind(curthread, pc->pc_cpuid); + thread_lock(curthread); + sched_bind(curthread, i); thread_unlock(curthread); HWPSTATE_DEBUG(dev, "setting P%d-state on cpu%d\n", id, PCPU_GET(cpuid)); @@ -204,10 +200,10 @@ hwpstate_goto_pstate(device_t dev, int p HWPSTATE_DEBUG(dev, "error: loop is not enough.\n"); error = ENXIO; } - thread_lock(curthread); - sched_unbind(curthread); - thread_unlock(curthread); } + thread_lock(curthread); + sched_unbind(curthread); + thread_unlock(curthread); return (error); } From owner-svn-src-head@FreeBSD.ORG Tue Nov 16 14:08:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1077106566B; Tue, 16 Nov 2010 14:08:21 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF5128FC13; Tue, 16 Nov 2010 14:08:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAGE8LQp056750; Tue, 16 Nov 2010 14:08:21 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGE8LMX056748; Tue, 16 Nov 2010 14:08:21 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201011161408.oAGE8LMX056748@svn.freebsd.org> From: Olivier Houchard Date: Tue, 16 Nov 2010 14:08:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215399 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 14:08:22 -0000 Author: cognet Date: Tue Nov 16 14:08:21 2010 New Revision: 215399 URL: http://svn.freebsd.org/changeset/base/215399 Log: No need to include sys/systm.h twice. Modified: head/sys/kern/kern_rmlock.c Modified: head/sys/kern/kern_rmlock.c ============================================================================== --- head/sys/kern/kern_rmlock.c Tue Nov 16 12:43:45 2010 (r215398) +++ head/sys/kern/kern_rmlock.c Tue Nov 16 14:08:21 2010 (r215399) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include From owner-svn-src-head@FreeBSD.ORG Tue Nov 16 15:23:27 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EA2D106566B; Tue, 16 Nov 2010 15:23:27 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: from eu1sys200aog118.obsmtp.com (eu1sys200aog118.obsmtp.com [207.126.144.145]) by mx1.freebsd.org (Postfix) with SMTP id 379B38FC15; Tue, 16 Nov 2010 15:23:24 +0000 (UTC) Received: from source ([63.174.175.251]) by eu1sys200aob118.postini.com ([207.126.147.11]) with SMTP ID DSNKTOKh65I/U4894NaK0+ZfvdN4vyVn5cJj@postini.com; Tue, 16 Nov 2010 15:23:26 UTC Received: from [172.17.10.53] (unknown [172.17.10.53]) by bbbx3.usdmm.com (Postfix) with ESMTP id 7A7D5FD01B; Tue, 16 Nov 2010 15:23:22 +0000 (UTC) Message-ID: <4CE2A1B1.5030209@tomjudge.com> Date: Tue, 16 Nov 2010 09:22:25 -0600 From: Tom Judge User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: pyunyh@gmail.com References: <201011142337.oAENbheD097425@svn.freebsd.org> <4CE07AA3.6040205@FreeBSD.org> <4CE16414.8060606@tomjudge.com> <20101115203609.GC1257@michelle.cdnetworks.com> In-Reply-To: <20101115203609.GC1257@michelle.cdnetworks.com> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org, Pyun YongHyeon Subject: Re: svn commit: r215327 - head/sys/dev/nfe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 15:23:27 -0000 On 11/15/2010 02:36 PM, Pyun YongHyeon wrote: > On Mon, Nov 15, 2010 at 10:47:16AM -0600, Tom Judge wrote: >> On 11/14/2010 06:11 PM, Alexander Motin wrote: >>> Pyun YongHyeon wrote: >>>> Author: yongari >>>> Date: Sun Nov 14 23:37:43 2010 >>>> New Revision: 215327 >>>> URL: http://svn.freebsd.org/changeset/base/215327 >>>> >>>> Log: >>>> P5N32-SLI PREMIUM from ASUSTeK is known to have MSI/MSI-X issue >>>> such that nfe(4) does not work with MSI-X. When MSI-X support was >>>> introduced, I remember MCP55 controller worked without problems so >>>> the issue could be either PCI bridge or BIOS issue. But I also >>>> noticed snd_hda(4) disabled MSI on all MCP55 chipset so I'm still >>>> not sure this is generic issue of MCP55 chipset. If this was PCI >>>> bridge issue we would have added it to a system wide black-list >>>> table but it's not clear to me at this moment whether it was caused >>>> by either broken BIOS or silicon bug of MCP55 chipset. >>> >>> MCP5x seem to be infinite source of surprises. Some reports I remember: >>> - snd_hda not working with MSI enabled - AFAIR not just loosing >>> interrupts but completely stops responding; >>> - using regular HPET interrupts breaks HDA sound after some time >>> (interrupts are not shared), while legacy_route mode operates properly; >>> - at least on one system I've seen non-functioning SATA interrupts. >>> It would be nice to find what's going on there. I've got tired to add >>> workarounds for it. :( >>> >> >> Another one for the list is Intel em cards not working with MSI enabled >> on MCP51 systems. (On 8.1) >> > > And your nfe(4) on MCP51 also does not work with MSI? > If it does not work, show me the output of "pciconf -lcbv" and > "kenv | grep smbios". > I checked Linux and they does not seem to disable MSI/MSI-X for > MCP51/MCP55. But they seems to maintain two entries to selectively > disable MSI. I was using the default driver for the NIC that ships in GENERIC for 8.1 release. I did not see any issues with that. Unfortunately I have the on board nic disabled now, I will be able to reboot the system to test over the weekend. In the mean time here is the output requested: == pciconf == root@store '20:39:08' '/home/tj' > # pciconf -lcbv none0@pci0:0:0:0: class=0x050000 card=0x50001458 chip=0x02f110de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'C51 Host Bridge' class = memory subclass = RAM cap 08[44] = HT slave cap 08[e0] = HT MSI address window disabled at 0xfee00000 none1@pci0:0:0:1: class=0x050000 card=0x50001458 chip=0x02fa10de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'C51 Memory Controller 0' class = memory subclass = RAM none2@pci0:0:0:2: class=0x050000 card=0x50001458 chip=0x02fe10de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'C51 Memory Controller 1' class = memory subclass = RAM none3@pci0:0:0:3: class=0x050000 card=0x50001458 chip=0x02f810de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'C51 Memory Controller 5' class = memory subclass = RAM none4@pci0:0:0:4: class=0x050000 card=0x50001458 chip=0x02f910de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'C51 Memory Controller 4' class = memory subclass = RAM none5@pci0:0:0:5: class=0x050000 card=0x50001458 chip=0x02ff10de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'C51 Host Bridge' class = memory subclass = RAM cap 00[44] = unknown cap 00[fe] = unknown none6@pci0:0:0:6: class=0x050000 card=0x50001458 chip=0x027f10de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'C51 Memory Controller 3' class = memory subclass = RAM none7@pci0:0:0:7: class=0x050000 card=0x50001458 chip=0x027e10de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'C51 Memory Controller 2' class = memory subclass = RAM pcib1@pci0:0:3:0: class=0x060400 card=0x000010de chip=0x02fd10de rev=0xa1 hdr=0x01 vendor = 'NVIDIA Corporation' device = 'C51 PCIe Bridge' class = bridge subclass = PCI-PCI cap 0d[40] = PCI Bridge card=0x000010de cap 01[48] = powerspec 2 supports D0 D3 current D0 cap 05[50] = MSI supports 2 messages, 64 bit cap 08[60] = HT MSI address window disabled at 0xfee00000 cap 10[80] = PCI-Express 1 root port max data 128(128) link x1(x1) pcib2@pci0:0:4:0: class=0x060400 card=0x000010de chip=0x02fb10de rev=0xa1 hdr=0x01 vendor = 'NVIDIA Corporation' device = 'C51 PCIe Bridge' class = bridge subclass = PCI-PCI cap 0d[40] = PCI Bridge card=0x000010de cap 01[48] = powerspec 2 supports D0 D3 current D0 cap 05[50] = MSI supports 2 messages, 64 bit cap 08[60] = HT MSI address window disabled at 0xfee00000 cap 10[80] = PCI-Express 1 root port max data 128(128) link x8(x16) vgapci0@pci0:0:5:0: class=0x030000 card=0xd0001458 chip=0x024210de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'NVIDIA GeForce 6100 (C51)' class = display subclass = VGA bar [10] = type Memory, range 32, base 0xf2000000, size 16777216, enabled bar [14] = type Prefetchable Memory, range 64, base 0xe0000000, size 268435456, enabled bar [1c] = type Memory, range 64, base 0xf3000000, size 16777216, enabled cap 01[48] = powerspec 2 supports D0 D3 current D0 cap 05[50] = MSI supports 1 message, 64 bit none8@pci0:0:9:0: class=0x050000 card=0x50011458 chip=0x027010de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'MCP51 Host Bridge' class = memory subclass = RAM cap 08[44] = HT slave cap 08[e0] = HT MSI address window disabled at 0xfee00000 isab0@pci0:0:10:0: class=0x060100 card=0x50011458 chip=0x026010de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'MCP51 LPC Bridge' class = bridge subclass = PCI-ISA none9@pci0:0:10:1: class=0x0c0500 card=0x02641458 chip=0x026410de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'NVIDIA nForce PCI System Management (NVIDIA SMB Bus Controller)' class = serial bus subclass = SMBus bar [20] = type I/O Port, range 32, base 0x1c00, size 64, enabled bar [24] = type I/O Port, range 32, base 0x1c80, size 64, enabled cap 01[44] = powerspec 2 supports D0 D3 current D0 none10@pci0:0:10:2: class=0x050000 card=0x02641458 chip=0x027210de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'MCP51 Memory Controller 0' class = memory subclass = RAM ohci0@pci0:0:11:0: class=0x0c0310 card=0x50041458 chip=0x026d10de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'MCP51 USB Controller' class = serial bus subclass = USB bar [10] = type Memory, range 32, base 0xf7204000, size 4096, enabled cap 01[44] = powerspec 2 supports D0 D1 D2 D3 current D0 ehci0@pci0:0:11:1: class=0x0c0320 card=0x50041458 chip=0x026e10de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'MCP51 USB Controller' class = serial bus subclass = USB bar [10] = type Memory, range 32, base 0xf7205000, size 256, enabled cap 0a[44] = EHCI Debug Port at offset 0x98 in map 0x14 cap 01[80] = powerspec 2 supports D0 D1 D2 D3 current D0 atapci0@pci0:0:13:0: class=0x01018a card=0xb0001458 chip=0x026510de rev=0xa1 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'MCP51 Parallel ATA Controller' class = mass storage subclass = ATA bar [20] = type I/O Port, range 32, base 0xf000, size 16, enabled cap 01[44] = powerspec 2 supports D0 D3 current D0 atapci1@pci0:0:14:0: class=0x010185 card=0xb0021458 chip=0x026610de rev=0xa1 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'NVIDIA nForce 430/410 Serial ATA Controller (MCP51S)' class = mass storage subclass = ATA bar [10] = type I/O Port, range 32, base 0x9f0, size 8, enabled bar [14] = type I/O Port, range 32, base 0xbf0, size 4, enabled bar [18] = type I/O Port, range 32, base 0x970, size 8, enabled bar [1c] = type I/O Port, range 32, base 0xb70, size 4, enabled bar [20] = type I/O Port, range 32, base 0xdc00, size 16, enabled bar [24] = type Memory, range 32, base 0xf7207000, size 4096, enabled cap 01[44] = powerspec 2 supports D0 D3 current D0 cap 05[b0] = MSI supports 4 messages, 64 bit cap 08[cc] = HT MSI fixed address window disabled at 0xfee00000 atapci2@pci0:0:15:0: class=0x010185 card=0xb0021458 chip=0x026710de rev=0xa1 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'NVIDIA nForce 430/410 Serial ATA Controller (MCP51S)' class = mass storage subclass = ATA bar [10] = type I/O Port, range 32, base 0x9e0, size 8, enabled bar [14] = type I/O Port, range 32, base 0xbe0, size 4, enabled bar [18] = type I/O Port, range 32, base 0x960, size 8, enabled bar [1c] = type I/O Port, range 32, base 0xb60, size 4, enabled bar [20] = type I/O Port, range 32, base 0xc800, size 16, enabled bar [24] = type Memory, range 32, base 0xf7206000, size 4096, enabled cap 01[44] = powerspec 2 supports D0 D3 current D0 cap 05[b0] = MSI supports 4 messages, 64 bit cap 08[cc] = HT MSI fixed address window disabled at 0xfee00000 pcib4@pci0:0:16:0: class=0x060401 card=0x00000000 chip=0x026f10de rev=0xa2 hdr=0x01 vendor = 'NVIDIA Corporation' device = 'MCP51 PCI Bridge' class = bridge subclass = PCI-PCI cap 0d[b8] = PCI Bridge card=0x00000000 cap 08[8c] = HT MSI address window disabled at 0xfee00000 none11@pci0:0:16:1: class=0x040300 card=0xa1021458 chip=0x026c10de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'High Definition Audio Controller (MCP51)' class = multimedia subclass = HDA bar [10] = type Memory, range 32, base 0xf7200000, size 16384, enabled cap 01[44] = powerspec 2 supports D0 D3 current D0 cap 05[50] = MSI supports 1 message, 64 bit, vector masks cap 08[6c] = HT MSI fixed address window disabled at 0xfee00000 hostb0@pci0:0:24:0: class=0x060000 card=0x00000000 chip=0x11001022 rev=0x00 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'Athlon64/Opteron/Sempron (K8 Family) HyperTransport Technology Configuration' class = bridge subclass = HOST-PCI cap 08[80] = HT host hostb1@pci0:0:24:1: class=0x060000 card=0x00000000 chip=0x11011022 rev=0x00 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'Athlon64/Opteron/Sempron (K8 Family) Address Map' class = bridge subclass = HOST-PCI hostb2@pci0:0:24:2: class=0x060000 card=0x00000000 chip=0x11021022 rev=0x00 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'Athlon64/Opteron/Sempron (K8 Family) DRAM Controller' class = bridge subclass = HOST-PCI hostb3@pci0:0:24:3: class=0x060000 card=0x00000000 chip=0x11031022 rev=0x00 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'Athlon64/Opteron/Sempron (K8 Family) Miscellaneous Control' class = bridge subclass = HOST-PCI em0@pci0:4:0:0: class=0x020000 card=0x10848086 chip=0x107d8086 rev=0x06 hdr=0x00 vendor = 'Intel Corporation' device = 'PRO/1000 PT' class = network subclass = ethernet bar [10] = type Memory, range 32, base 0xf7100000, size 131072, enabled bar [14] = type Memory, range 32, base 0xf7120000, size 131072, enabled bar [18] = type I/O Port, range 32, base 0xb000, size 32, enabled cap 01[c8] = powerspec 2 supports D0 D3 current D0 cap 05[d0] = MSI supports 1 message, 64 bit cap 10[e0] = PCI-Express 1 endpoint max data 128(256) link x1(x1) pcib3@pci0:2:0:0: class=0x060400 card=0x00000000 chip=0x032c8086 rev=0x09 hdr=0x01 vendor = 'Intel Corporation' device = 'PCI Express-to-PCI Express Bridge (6702PXH)' class = bridge subclass = PCI-PCI cap 10[44] = PCI-Express 1 PCI bridge max data 128(256) link x8(x8) cap 05[5c] = MSI supports 1 message, 64 bit cap 01[6c] = powerspec 2 supports D0 D3 current D0 cap 07[d8] = PCI-X bridge mpt0@pci0:3:8:0: class=0x010000 card=0x1f091028 chip=0x00541000 rev=0x01 hdr=0x00 vendor = 'LSI Logic (Was: Symbios Logic, NCR)' device = 'SAS 3000 series, 8-port with 1068 -StorPort' class = mass storage subclass = SCSI bar [10] = type I/O Port, range 32, base 0xa000, size 256, disabled bar [14] = type Memory, range 64, base 0xf6010000, size 16384, enabled bar [1c] = type Memory, range 64, base 0xf6000000, size 65536, enabled cap 01[50] = powerspec 2 supports D0 D1 D2 D3 current D0 cap 05[98] = MSI supports 1 message, 64 bit cap 07[68] = PCI-X 64-bit supports 133MHz, 2048 burst read, 16 split transactions cap 11[b0] = MSI-X supports 1 message in map 0x14 fwohci0@pci0:1:14:0: class=0x0c0010 card=0x10001458 chip=0x30441106 rev=0x80 hdr=0x00 vendor = 'VIA Technologies, Inc.' device = 'VT6306 VIA Fire II IEEE-1394 OHCI Link Layer Controller' class = serial bus subclass = FireWire bar [10] = type Memory, range 32, base 0xf7000000, size 2048, enabled bar [14] = type I/O Port, range 32, base 0x9000, size 128, enabled cap 01[50] = powerspec 2 supports D0 D2 D3 current D0 == kenv == root@store '20:39:13' '/home/tj' > # kenv | grep smbios smbios.bios.reldate="10/06/2005" smbios.bios.vendor="Award Software International, Inc." smbios.bios.version="F2" smbios.chassis.maker=" " smbios.chassis.serial=" " smbios.chassis.tag=" " smbios.chassis.version=" " smbios.memory.enabled="1572864" smbios.planar.maker="Gigabyte Technology Co., Ltd." smbios.planar.product="C51-MCP51" smbios.planar.serial="Thu Oct 20 23:29:13 2005 smbios.planar.version="x.x" smbios.socket.enabled="1" smbios.socket.populated="2" smbios.system.maker=" " smbios.system.product=" " smbios.system.serial=" " smbios.system.version=" " smbios.version="2.3" -- TJU13-ARIN From owner-svn-src-head@FreeBSD.ORG Tue Nov 16 15:53:44 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAE6D1065670; Tue, 16 Nov 2010 15:53:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F0778FC0C; Tue, 16 Nov 2010 15:53:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAGFriYr059426; Tue, 16 Nov 2010 15:53:44 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGFri1a059424; Tue, 16 Nov 2010 15:53:44 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201011161553.oAGFri1a059424@svn.freebsd.org> From: Andriy Gapon Date: Tue, 16 Nov 2010 15:53:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215401 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 15:53:44 -0000 Author: avg Date: Tue Nov 16 15:53:44 2010 New Revision: 215401 URL: http://svn.freebsd.org/changeset/base/215401 Log: zfs+sendfile: populate all requested pages, not just those already cached kern_sendfile() uses vm_rdwr() to read-ahead blocks of data to populate page cache. When sendfile stumbles upon a page that is not populated yet, it sends out all the mbufs that it collected so far. This resulted in very poor performance with ZFS when file data is not in the page cache, because ZFS vop_read for UIO_NOCOPY case populated only those pages that are already in cache, but not valid. Which means that most of the time it populated only the first requested page in the described above scenario. Reported by: Alexander Zagrebin Tested by: Alexander Zagrebin , Artemiev Igor MFC after: 12 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Nov 16 15:02:53 2010 (r215400) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Nov 16 15:53:44 2010 (r215401) @@ -67,6 +67,7 @@ #include #include #include +#include /* * Programming rules. @@ -481,7 +482,7 @@ again: uiomove_fromphys(&m, off, bytes, uio); VM_OBJECT_LOCK(obj); vm_page_wakeup(m); - } else if (m != NULL && uio->uio_segflg == UIO_NOCOPY) { + } else if (uio->uio_segflg == UIO_NOCOPY) { /* * The code below is here to make sendfile(2) work * correctly with ZFS. As pointed out by ups@ @@ -491,7 +492,7 @@ again: */ KASSERT(off == 0, ("unexpected offset in mappedread for sendfile")); - if ((m->oflags & VPO_BUSY) != 0) { + if (m != NULL && (m->oflags & VPO_BUSY) != 0) { /* * Reference the page before unlocking and * sleeping so that the page daemon is less @@ -501,8 +502,17 @@ again: vm_page_flag_set(m, PG_REFERENCED); vm_page_sleep(m, "zfsmrb"); goto again; + } else if (m == NULL) { + m = vm_page_alloc(obj, OFF_TO_IDX(start), + VM_ALLOC_NOBUSY | VM_ALLOC_NORMAL); + if (m == NULL) { + VM_OBJECT_UNLOCK(obj); + VM_WAIT; + VM_OBJECT_LOCK(obj); + goto again; + } } - vm_page_busy(m); + vm_page_io_start(m); VM_OBJECT_UNLOCK(obj); if (dirbytes > 0) { error = dmu_read_uio(os, zp->z_id, uio, @@ -520,7 +530,7 @@ again: VM_OBJECT_LOCK(obj); if (error == 0) m->valid = VM_PAGE_BITS_ALL; - vm_page_wakeup(m); + vm_page_io_finish(m); if (error == 0) { uio->uio_resid -= bytes; uio->uio_offset += bytes; From owner-svn-src-head@FreeBSD.ORG Tue Nov 16 20:39:53 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1201B1065670; Tue, 16 Nov 2010 20:39:53 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 007668FC1F; Tue, 16 Nov 2010 20:39:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAGKdqMW066990; Tue, 16 Nov 2010 20:39:52 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGKdqLZ066988; Tue, 16 Nov 2010 20:39:52 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201011162039.oAGKdqLZ066988@svn.freebsd.org> From: "George V. Neville-Neil" Date: Tue, 16 Nov 2010 20:39:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215409 - head/tools/tools/mctest X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 20:39:53 -0000 Author: gnn Date: Tue Nov 16 20:39:52 2010 New Revision: 215409 URL: http://svn.freebsd.org/changeset/base/215409 Log: Fix an error in our results printing. Modified: head/tools/tools/mctest/mctest.cc Modified: head/tools/tools/mctest/mctest.cc ============================================================================== --- head/tools/tools/mctest/mctest.cc Tue Nov 16 20:38:41 2010 (r215408) +++ head/tools/tools/mctest/mctest.cc Tue Nov 16 20:39:52 2010 (r215409) @@ -419,7 +419,7 @@ int source(char *interface, struct in_ad // cout << "sec: " << result.tv_sec; // cout << " usecs: " << result.tv_usec << endl; } - cout << "comparing %lu deltas" << long(deltas.size()) << endl; + cout << "comparing " << long(deltas.size()) << " deltas" << endl; cout << "number represents usecs of round-trip time" << endl; sort(deltas.begin(), deltas.end()); for (int i = 0; idx[i] != 0; ++i) { From owner-svn-src-head@FreeBSD.ORG Tue Nov 16 22:16:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2E58106566C; Tue, 16 Nov 2010 22:16:38 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 86A508FC15; Tue, 16 Nov 2010 22:16:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAGMGc8d069026; Tue, 16 Nov 2010 22:16:38 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGMGcUv069022; Tue, 16 Nov 2010 22:16:38 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201011162216.oAGMGcUv069022@svn.freebsd.org> From: Michael Tuexen Date: Tue, 16 Nov 2010 22:16:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215410 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 22:16:38 -0000 Author: tuexen Date: Tue Nov 16 22:16:38 2010 New Revision: 215410 URL: http://svn.freebsd.org/changeset/base/215410 Log: Add an SCTP socket option to retrieve the number of timeouts of an association. MFC after: 3 days. Modified: head/sys/netinet/sctp.h head/sys/netinet/sctp_uio.h head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp.h ============================================================================== --- head/sys/netinet/sctp.h Tue Nov 16 20:39:52 2010 (r215409) +++ head/sys/netinet/sctp.h Tue Nov 16 22:16:38 2010 (r215410) @@ -123,6 +123,7 @@ struct sctp_paramhdr { #define SCTP_LOCAL_AUTH_CHUNKS 0x00000103 #define SCTP_GET_ASSOC_NUMBER 0x00000104 /* ro */ #define SCTP_GET_ASSOC_ID_LIST 0x00000105 /* ro */ +#define SCTP_TIMEOUTS 0x00000106 /* * user socket options: BSD implementation specific Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Tue Nov 16 20:39:52 2010 (r215409) +++ head/sys/netinet/sctp_uio.h Tue Nov 16 22:16:38 2010 (r215410) @@ -563,6 +563,17 @@ struct sctp_sack_info { uint32_t sack_freq; }; +struct sctp_timeouts { + sctp_assoc_t stimo_assoc_id; + uint32_t stimo_init; + uint32_t stimo_data; + uint32_t stimo_sack; + uint32_t stimo_shutdown; + uint32_t stimo_heartbeat; + uint32_t stimo_cookie; + uint32_t stimo_shutdownack; +}; + struct sctp_cwnd_args { struct sctp_nets *net; /* network to *//* FIXME: LP64 issue */ uint32_t cwnd_new_value;/* cwnd in k */ Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Tue Nov 16 20:39:52 2010 (r215409) +++ head/sys/netinet/sctp_usrreq.c Tue Nov 16 22:16:38 2010 (r215410) @@ -2441,6 +2441,29 @@ flags_out: *optsize = sizeof(*srto); } break; + case SCTP_TIMEOUTS: + { + struct sctp_timeouts *stimo; + + SCTP_CHECK_AND_CAST(stimo, optval, struct sctp_timeouts, *optsize); + SCTP_FIND_STCB(inp, stcb, stimo->stimo_assoc_id); + + if (stcb) { + stimo->stimo_init = stcb->asoc.timoinit; + stimo->stimo_data = stcb->asoc.timodata; + stimo->stimo_sack = stcb->asoc.timosack; + stimo->stimo_shutdown = stcb->asoc.timoshutdown; + stimo->stimo_heartbeat = stcb->asoc.timoheartbeat; + stimo->stimo_cookie = stcb->asoc.timocookie; + stimo->stimo_shutdownack = stcb->asoc.timoshutdownack; + SCTP_TCB_UNLOCK(stcb); + } else { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, error); + error = EINVAL; + } + *optsize = sizeof(*stimo); + } + break; case SCTP_ASSOCINFO: { struct sctp_assocparams *sasoc; From owner-svn-src-head@FreeBSD.ORG Tue Nov 16 22:21:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BA771065670; Tue, 16 Nov 2010 22:21:15 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A2458FC14; Tue, 16 Nov 2010 22:21:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAGMLEC2069157; Tue, 16 Nov 2010 22:21:14 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGMLEFN069155; Tue, 16 Nov 2010 22:21:14 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201011162221.oAGMLEFN069155@svn.freebsd.org> From: Adrian Chadd Date: Tue, 16 Nov 2010 22:21:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215411 - head/share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 22:21:15 -0000 Author: adrian Date: Tue Nov 16 22:21:14 2010 New Revision: 215411 URL: http://svn.freebsd.org/changeset/base/215411 Log: Add in forgotten install rule. Modified: head/share/mk/Makefile Modified: head/share/mk/Makefile ============================================================================== --- head/share/mk/Makefile Tue Nov 16 22:16:38 2010 (r215410) +++ head/share/mk/Makefile Tue Nov 16 22:21:14 2010 (r215411) @@ -12,7 +12,7 @@ FILES+= bsd.obj.mk bsd.own.mk FILES+= bsd.port.mk bsd.port.options.mk bsd.port.post.mk FILES+= bsd.port.pre.mk bsd.port.subdir.mk bsd.prog.mk FILES+= bsd.snmpmod.mk bsd.subdir.mk bsd.sys.mk bsd.symver.mk -FILES+= sys.mk version_gen.awk +FILES+= sys.mk version_gen.awk bsd.crunchgen.mk NO_OBJ= FILESDIR= ${BINDIR}/mk From owner-svn-src-head@FreeBSD.ORG Tue Nov 16 22:22:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6E10106566C; Tue, 16 Nov 2010 22:22:16 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B51EC8FC13; Tue, 16 Nov 2010 22:22:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAGMMGZf069224; Tue, 16 Nov 2010 22:22:16 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGMMGA1069222; Tue, 16 Nov 2010 22:22:16 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201011162222.oAGMMGA1069222@svn.freebsd.org> From: Adrian Chadd Date: Tue, 16 Nov 2010 22:22:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215412 - head/share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 22:22:16 -0000 Author: adrian Date: Tue Nov 16 22:22:16 2010 New Revision: 215412 URL: http://svn.freebsd.org/changeset/base/215412 Log: .. and then notice that the list of mk files is ordered, and update to suit. Modified: head/share/mk/Makefile Modified: head/share/mk/Makefile ============================================================================== --- head/share/mk/Makefile Tue Nov 16 22:21:14 2010 (r215411) +++ head/share/mk/Makefile Tue Nov 16 22:22:16 2010 (r215412) @@ -5,14 +5,14 @@ FILES= bsd.README FILES+= bsd.arch.inc.mk FILES+= bsd.compat.mk bsd.cpu.mk bsd.dep.mk bsd.doc.mk bsd.dtrace.mk FILES+= bsd.endian.mk -FILES+= bsd.files.mk bsd.incs.mk bsd.info.mk bsd.init.mk +FILES+= bsd.files.mk bsd.crunchgen.mk bsd.incs.mk bsd.info.mk bsd.init.mk FILES+= bsd.kmod.mk FILES+= bsd.lib.mk bsd.libnames.mk bsd.links.mk bsd.man.mk bsd.nls.mk FILES+= bsd.obj.mk bsd.own.mk FILES+= bsd.port.mk bsd.port.options.mk bsd.port.post.mk FILES+= bsd.port.pre.mk bsd.port.subdir.mk bsd.prog.mk FILES+= bsd.snmpmod.mk bsd.subdir.mk bsd.sys.mk bsd.symver.mk -FILES+= sys.mk version_gen.awk bsd.crunchgen.mk +FILES+= sys.mk version_gen.awk NO_OBJ= FILESDIR= ${BINDIR}/mk From owner-svn-src-head@FreeBSD.ORG Tue Nov 16 22:23:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1E9B1065670; Tue, 16 Nov 2010 22:23:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D05FA8FC08; Tue, 16 Nov 2010 22:23:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAGMNKlF069280; Tue, 16 Nov 2010 22:23:20 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGMNKvI069278; Tue, 16 Nov 2010 22:23:20 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201011162223.oAGMNKvI069278@svn.freebsd.org> From: Adrian Chadd Date: Tue, 16 Nov 2010 22:23:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215413 - head/share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 22:23:21 -0000 Author: adrian Date: Tue Nov 16 22:23:20 2010 New Revision: 215413 URL: http://svn.freebsd.org/changeset/base/215413 Log: Re-enable generating links. Modified: head/share/mk/bsd.crunchgen.mk Modified: head/share/mk/bsd.crunchgen.mk ============================================================================== --- head/share/mk/bsd.crunchgen.mk Tue Nov 16 22:22:16 2010 (r215412) +++ head/share/mk/bsd.crunchgen.mk Tue Nov 16 22:23:20 2010 (r215413) @@ -51,17 +51,14 @@ $(OUTPUTS): $(CRUNCH_SRCDIR_${P})/Makefi .else $(OUTPUTS): $(.CURDIR)/../../$(D)/$(P)/Makefile .endif -# Disable building links for bsdbox - whatever is installing the binaries into -# the embedded system should (for now) do the linking there. This may change -# in the future. -adrian -#.ifndef CRUNCH_SUPPRESS_LINK_${P} -#LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(P) -#.endif -#.for A in $(CRUNCH_ALIAS_$(P)) -#.ifndef CRUNCH_SUPPRESS_LINK_${A} -#LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(A) -#.endif -#.endfor +.ifndef CRUNCH_SUPPRESS_LINK_${P} +LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(P) +.endif +.for A in $(CRUNCH_ALIAS_$(P)) +.ifndef CRUNCH_SUPPRESS_LINK_${A} +LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(A) +.endif +.endfor .endfor .endfor From owner-svn-src-head@FreeBSD.ORG Tue Nov 16 22:39:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD8C9106566B; Tue, 16 Nov 2010 22:39:38 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1C1FA8FC13; Tue, 16 Nov 2010 22:39:37 +0000 (UTC) Received: by wyb35 with SMTP id 35so422529wyb.13 for ; Tue, 16 Nov 2010 14:39:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=XC3pPm4YClO71zp3TxG6lTqMbyIJqbd1Uupi9Fn4Osg=; b=O5XQ9jcrZYWn+usePvqvho3w7bPi/bAjrsHYVpaSwVJ9ZBd0XYajhuyH0LD08VZvGf BnDV7gn0KOF2vQI8mIfquG1i0+M64OJN4drK6TbJ6tVItWIx+Qj8HhAHvdjqOQ5lyVyR PPTzK3pJfM+xfDwXTas3T0caJCm/vCzLlgtkg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=bps870PCYjb/5lAc7H2nI73i4sdyZ9wreS+RBcMzA1oAGhyUZuTAAuFWIRwbXmWI3F G9RzfMu1KuUd0y3UnY89ANxshNwG+iidvWI08x14F6jk2HWQZ+GXk49WHPexr70DNw+7 N30D06qDhzMMoHCWtYYbZWvht+e3IJPkclb/M= MIME-Version: 1.0 Received: by 10.216.142.131 with SMTP id i3mr906334wej.5.1289945573881; Tue, 16 Nov 2010 14:12:53 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.65.210 with HTTP; Tue, 16 Nov 2010 14:12:53 -0800 (PST) In-Reply-To: <201011130311.oAD3BSxX033195@svn.freebsd.org> References: <201011130311.oAD3BSxX033195@svn.freebsd.org> Date: Wed, 17 Nov 2010 06:12:53 +0800 X-Google-Sender-Auth: v8gEsjwVMMnXZzq4QRxgPdHQ0mE Message-ID: From: Adrian Chadd To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: svn commit: r215226 - in head: rescue/rescue share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 22:39:39 -0000 This has apparently broken symlink generation. I thought I had tested that locally. Grr. In any case, I'll investigate this over the weekend. I have an exam tomorro= w. Thanks, Adrian On 13 November 2010 11:11, Adrian Chadd wrote: > > Author: adrian > Date: Sat Nov 13 03:11:27 2010 > New Revision: 215226 > URL: http://svn.freebsd.org/changeset/base/215226 > > Log: > =A0Break out the rules which generate crunchgen'ed binaries into a separa= te > =A0.mk file so they can be reused. > > =A0Introduce a new option, CRUNCH_BUILDTOOLS, which lists the binaries th= at > =A0require tools built in the local architecture. sh and csh both require= this. > =A0It was previously hardcoded in rescue/rescue/Makefile . > > =A0Introduce a new option, CRUNCH_SHLIBS, which lists the shared librarie= s > =A0to link against. These override the static libraries listed in CRUNCH_= LIBS. > =A0Some build environments may wish to use a handful of shared libraries > =A0(eg libc.so) so other small, dynamic binaries can be run in the enviro= nment. > > =A0Remove the now-shared code from rescue/rescue/Makefile and introduce t= he > =A0CRUNCH_BUILDTOOLS option for the above shells. > > Added: > =A0head/share/mk/bsd.crunchgen.mk =A0 (contents, props changed) > Modified: > =A0head/rescue/rescue/Makefile > > Modified: head/rescue/rescue/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/rescue/rescue/Makefile Sat Nov 13 01:28:56 2010 =A0 =A0 =A0 =A0(= r215225) > +++ head/rescue/rescue/Makefile Sat Nov 13 03:11:27 2010 =A0 =A0 =A0 =A0(= r215226) > @@ -22,27 +22,7 @@ dhclient_FIXED: ../../sbin/dhclient/dhcl > =A0 =A0 =A0 =A0sed '1s/\/bin\//\/rescue\//' ${.ALLSRC} > ${.TARGET} > =A0CLEANFILES+=3D dhclient_FIXED > > -################################################################# > -# > -# General notes: > -# > -# A number of Make variables are used to generate the crunchgen config f= ile. > -# > -# =A0CRUNCH_SRCDIRS: lists directories to search for included programs > -# =A0CRUNCH_PROGS: =A0lists programs to be included > -# =A0CRUNCH_LIBS: =A0libraries to link with > -# =A0CRUNCH_BUILDOPTS: generic build options to be added to every progra= m > -# > -# Special options can be specified for individual programs > -# =A0CRUNCH_SRCDIR_$(P): base source directory for program $(P) > -# =A0CRUNCH_BUILDOPTS_$(P): additional build options for $(P) > -# =A0CRUNCH_ALIAS_$(P): additional names to be used for $(P) > -# > -# By default, any name appearing in CRUNCH_PROGS or CRUNCH_ALIAS_${P} > -# will be used to generate a hard link to the resulting binary. > -# Specific links can be suppressed by setting > -# CRUNCH_SUPPRESS_LINK_$(NAME) to 1. > -# > +# The help which used to be here is now in mk/bsd.crunchgen.mk > > =A0# Define Makefile variable RESCUE > =A0CRUNCH_BUILDOPTS+=3D -DRESCUE > @@ -73,6 +53,7 @@ CRUNCH_PROGS_bin=3D cat chflags chio chmod > =A0 =A0 =A0 =A0 ed expr getfacl hostname kenv kill ln ls mkdir mv =A0 =A0= =A0\ > =A0 =A0 =A0 =A0 pkill ps pwd realpath rm rmdir setfacl sh stty sync test > =A0CRUNCH_LIBS+=3D -lcrypt -ledit -lkvm -ll -ltermcap -lutil > +CRUNCH_BUILDTOOLS+=3D bin/sh > > =A0# Additional options for specific programs > =A0CRUNCH_ALIAS_test=3D [ > @@ -91,6 +72,7 @@ CRUNCH_PROGS_bin+=3D rcp > =A0.if ${MK_TCSH} !=3D "no" > =A0CRUNCH_PROGS_bin+=3D csh > =A0CRUNCH_ALIAS_csh=3D -csh tcsh -tcsh > +CRUNCH_BUILDTOOLS+=3D bin/csh > =A0CRUNCH_SUPPRESS_LINK_-csh=3D 1 > =A0CRUNCH_SUPPRESS_LINK_-tcsh=3D 1 > =A0.endif > @@ -236,132 +218,5 @@ CRUNCH_ALIAS_chown=3D chgrp > =A0################################################################## > =A0CRUNCH_LIBS+=3D -lm > > -################################################################## > -# =A0The following is pretty nearly a generic crunchgen-handling makefil= e > -# > - > -CONF=3D =A0$(PROG).conf > -OUTMK=3D $(PROG).mk > -OUTC=3D =A0 $(PROG).c > -OUTPUTS=3D$(OUTMK) $(OUTC) $(PROG).cache > -CRUNCHOBJS=3D ${.OBJDIR} > -.if defined(MAKEOBJDIRPREFIX) > -CANONICALOBJDIR:=3D ${MAKEOBJDIRPREFIX}${.CURDIR} > -.else > -CANONICALOBJDIR:=3D /usr/obj${.CURDIR} > -.endif > - > -CLEANFILES+=3D $(CONF) *.o *.lo *.c *.mk *.cache *.a *.h > - > -# Program names and their aliases contribute hardlinks to 'rescue' execu= table, > -# except for those that get suppressed. > -.for D in $(CRUNCH_SRCDIRS) > -.for P in $(CRUNCH_PROGS_$(D)) > -.ifdef CRUNCH_SRCDIR_${P} > -$(OUTPUTS): $(CRUNCH_SRCDIR_${P})/Makefile > -.else > -$(OUTPUTS): $(.CURDIR)/../../$(D)/$(P)/Makefile > -.endif > -.ifndef CRUNCH_SUPPRESS_LINK_${P} > -LINKS+=3D $(BINDIR)/$(PROG) $(BINDIR)/$(P) > -.endif > -.for A in $(CRUNCH_ALIAS_$(P)) > -.ifndef CRUNCH_SUPPRESS_LINK_${A} > -LINKS+=3D $(BINDIR)/$(PROG) $(BINDIR)/$(A) > -.endif > -.endfor > -.endfor > -.endfor > - > -all: $(PROG) > -exe: $(PROG) > - > -$(CONF): Makefile > - =A0 =A0 =A0 echo \# Auto-generated, do not edit >$(.TARGET) > -.ifdef CRUNCH_BUILDOPTS > - =A0 =A0 =A0 echo buildopts $(CRUNCH_BUILDOPTS) >>$(.TARGET) > -.endif > -.ifdef CRUNCH_LIBS > - =A0 =A0 =A0 echo libs $(CRUNCH_LIBS) >>$(.TARGET) > -.endif > -.for D in $(CRUNCH_SRCDIRS) > -.for P in $(CRUNCH_PROGS_$(D)) > - =A0 =A0 =A0 echo progs $(P) >>$(.TARGET) > -.ifdef CRUNCH_SRCDIR_${P} > - =A0 =A0 =A0 echo special $(P) srcdir $(CRUNCH_SRCDIR_${P}) >>$(.TARGET) > -.else > - =A0 =A0 =A0 echo special $(P) srcdir $(.CURDIR)/../../$(D)/$(P) >>$(.TA= RGET) > -.endif > -.ifdef CRUNCH_BUILDOPTS_${P} > - =A0 =A0 =A0 echo special $(P) buildopts DIRPRFX=3D${DIRPRFX}${P}/ \ > - =A0 =A0 =A0 =A0 =A0 $(CRUNCH_BUILDOPTS_${P}) >>$(.TARGET) > -.else > - =A0 =A0 =A0 echo special $(P) buildopts DIRPRFX=3D${DIRPRFX}${P}/ >>$(.= TARGET) > -.endif > -.for A in $(CRUNCH_ALIAS_$(P)) > - =A0 =A0 =A0 echo ln $(P) $(A) >>$(.TARGET) > -.endfor > -.endfor > -.endfor > - > -# XXX Make sure we don't pass -P to crunchgen(1). > -.MAKEFLAGS:=3D ${.MAKEFLAGS:N-P} > -.ORDER: $(OUTPUTS) objs > -$(OUTPUTS): $(CONF) > - =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} crunchgen -fq -m $(OUTMK) = \ > - =A0 =A0 =A0 =A0 =A0 -c $(OUTC) $(CONF) > - > -$(PROG): $(OUTPUTS) objs > - =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} ${MAKE} -f $(OUTMK) exe > - > -objs: $(OUTMK) > - =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} ${MAKE} -f $(OUTMK) objs > - > -# Someone should replace the bin/csh and bin/sh build-tools with > -# shell scripts so we can remove this nonsense. > -build-tools: > -.for _tool in bin/csh bin/sh > - =A0 =A0 =A0 cd $(.CURDIR)/../../${_tool}; \ > - =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} ${MAKE} obj; \ > - =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} ${MAKE} build-tools > -.endfor > - > -# Use a separate build tree to hold files compiled for this crunchgen bi= nary > -# Yes, this does seem to partly duplicate bsd.subdir.mk, but I can't > -# get that to cooperate with bsd.prog.mk. =A0Besides, many of the standa= rd > -# targets should NOT be propagated into the components. > -cleandepend cleandir obj objlink: > -.for D in $(CRUNCH_SRCDIRS) > -.for P in $(CRUNCH_PROGS_$(D)) > -.ifdef CRUNCH_SRCDIR_${P} > - =A0 =A0 =A0 cd ${CRUNCH_SRCDIR_$(P)} && \ > - =A0 =A0 =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CANONICALOBJDIR} ${MAKE} \ > - =A0 =A0 =A0 =A0 =A0 DIRPRFX=3D${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TA= RGET} > -.else > - =A0 =A0 =A0 cd $(.CURDIR)/../../${D}/${P} && \ > - =A0 =A0 =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CANONICALOBJDIR} ${MAKE} \ > - =A0 =A0 =A0 =A0 =A0 DIRPRFX=3D${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TA= RGET} > -.endif > -.endfor > -.endfor > - > -clean: > - =A0 =A0 =A0 rm -f ${CLEANFILES} > - =A0 =A0 =A0 if [ -e ${.OBJDIR}/$(OUTMK) ]; then =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 \ > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} ${MAKE} -f= $(OUTMK) clean; =A0 =A0 =A0 \ > - =A0 =A0 =A0 fi > -.for D in $(CRUNCH_SRCDIRS) > -.for P in $(CRUNCH_PROGS_$(D)) > -.ifdef CRUNCH_SRCDIR_${P} > - =A0 =A0 =A0 cd ${CRUNCH_SRCDIR_$(P)} && \ > - =A0 =A0 =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CANONICALOBJDIR} ${MAKE} \ > - =A0 =A0 =A0 =A0 =A0 DIRPRFX=3D${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TA= RGET} > -.else > - =A0 =A0 =A0 cd $(.CURDIR)/../../${D}/${P} && \ > - =A0 =A0 =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CANONICALOBJDIR} ${MAKE} \ > - =A0 =A0 =A0 =A0 =A0 DIRPRFX=3D${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TA= RGET} > -.endif > -.endfor > -.endfor > - > +.include > =A0.include > > Added: head/share/mk/bsd.crunchgen.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- /dev/null =A0 00:00:00 1970 =A0 (empty, because file is newly added) > +++ head/share/mk/bsd.crunchgen.mk =A0 =A0 =A0Sat Nov 13 03:11:27 2010 = =A0 =A0 =A0 =A0(r215226) > @@ -0,0 +1,160 @@ > +################################################################# > +# > +# General notes: > +# > +# A number of Make variables are used to generate the crunchgen config f= ile. > +# > +# =A0CRUNCH_SRCDIRS: lists directories to search for included programs > +# =A0CRUNCH_PROGS: =A0lists programs to be included > +# =A0CRUNCH_LIBS: =A0libraries to statically link with > +# =A0CRUNCH_SHLIBS: =A0libraries to dynamically link with > +# =A0CRUNCH_BUILDOPTS: generic build options to be added to every progra= m > +# =A0CRUNCH_BUILDTOOLS: lists programs that need build tools built in th= e > +# =A0 =A0 =A0 local architecture. > +# > +# Special options can be specified for individual programs > +# =A0CRUNCH_SRCDIR_$(P): base source directory for program $(P) > +# =A0CRUNCH_BUILDOPTS_$(P): additional build options for $(P) > +# =A0CRUNCH_ALIAS_$(P): additional names to be used for $(P) > +# > +# By default, any name appearing in CRUNCH_PROGS or CRUNCH_ALIAS_${P} > +# will be used to generate a hard link to the resulting binary. > +# Specific links can be suppressed by setting > +# CRUNCH_SUPPRESS_LINK_$(NAME) to 1. > +# > + > +# $FreeBSD$ > + > +################################################################## > +# =A0The following is pretty nearly a generic crunchgen-handling makefil= e > +# > + > +CONF=3D =A0$(PROG).conf > +OUTMK=3D $(PROG).mk > +OUTC=3D =A0 $(PROG).c > +OUTPUTS=3D$(OUTMK) $(OUTC) $(PROG).cache > +CRUNCHOBJS=3D ${.OBJDIR} > +.if defined(MAKEOBJDIRPREFIX) > +CANONICALOBJDIR:=3D ${MAKEOBJDIRPREFIX}${.CURDIR} > +.else > +CANONICALOBJDIR:=3D /usr/obj${.CURDIR} > +.endif > + > +CLEANFILES+=3D $(CONF) *.o *.lo *.c *.mk *.cache *.a *.h > + > +# Program names and their aliases contribute hardlinks to 'rescue' execu= table, > +# except for those that get suppressed. > +.for D in $(CRUNCH_SRCDIRS) > +.for P in $(CRUNCH_PROGS_$(D)) > +.ifdef CRUNCH_SRCDIR_${P} > +$(OUTPUTS): $(CRUNCH_SRCDIR_${P})/Makefile > +.else > +$(OUTPUTS): $(.CURDIR)/../../$(D)/$(P)/Makefile > +.endif > +# Disable building links for bsdbox - whatever is installing the binarie= s into > +# the embedded system should (for now) do the linking there. This may ch= ange > +# in the future. -adrian > +#.ifndef CRUNCH_SUPPRESS_LINK_${P} > +#LINKS+=3D $(BINDIR)/$(PROG) $(BINDIR)/$(P) > +#.endif > +#.for A in $(CRUNCH_ALIAS_$(P)) > +#.ifndef CRUNCH_SUPPRESS_LINK_${A} > +#LINKS+=3D $(BINDIR)/$(PROG) $(BINDIR)/$(A) > +#.endif > +#.endfor > +.endfor > +.endfor > + > +all: $(PROG) > +exe: $(PROG) > + > +$(CONF): Makefile > + =A0 =A0 =A0 echo \# Auto-generated, do not edit >$(.TARGET) > +.ifdef CRUNCH_BUILDOPTS > + =A0 =A0 =A0 echo buildopts $(CRUNCH_BUILDOPTS) >>$(.TARGET) > +.endif > +.ifdef CRUNCH_LIBS > + =A0 =A0 =A0 echo libs $(CRUNCH_LIBS) >>$(.TARGET) > +.endif > +.ifdef CRUNCH_SHLIBS > + =A0 =A0 =A0 echo libs_so $(CRUNCH_SHLIBS) >>$(.TARGET) > +.endif > +.for D in $(CRUNCH_SRCDIRS) > +.for P in $(CRUNCH_PROGS_$(D)) > + =A0 =A0 =A0 echo progs $(P) >>$(.TARGET) > +.ifdef CRUNCH_SRCDIR_${P} > + =A0 =A0 =A0 echo special $(P) srcdir $(CRUNCH_SRCDIR_${P}) >>$(.TARGET) > +.else > + =A0 =A0 =A0 echo special $(P) srcdir $(.CURDIR)/../../$(D)/$(P) >>$(.TA= RGET) > +.endif > +.ifdef CRUNCH_BUILDOPTS_${P} > + =A0 =A0 =A0 echo special $(P) buildopts DIRPRFX=3D${DIRPRFX}${P}/ \ > + =A0 =A0 =A0 =A0 =A0 $(CRUNCH_BUILDOPTS_${P}) >>$(.TARGET) > +.else > + =A0 =A0 =A0 echo special $(P) buildopts DIRPRFX=3D${DIRPRFX}${P}/ >>$(.= TARGET) > +.endif > +.for A in $(CRUNCH_ALIAS_$(P)) > + =A0 =A0 =A0 echo ln $(P) $(A) >>$(.TARGET) > +.endfor > +.endfor > +.endfor > + > +# XXX Make sure we don't pass -P to crunchgen(1). > +.MAKEFLAGS:=3D ${.MAKEFLAGS:N-P} > +.ORDER: $(OUTPUTS) objs > +$(OUTPUTS): $(CONF) > + =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} crunchgen -fq -m $(OUTMK) = \ > + =A0 =A0 =A0 =A0 =A0 -c $(OUTC) $(CONF) > + > +$(PROG): $(OUTPUTS) objs > + =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} ${MAKE} -f $(OUTMK) exe > + > +objs: $(OUTMK) > + =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} ${MAKE} -f $(OUTMK) objs > + > +# Someone should replace the bin/csh and bin/sh build-tools with > +# shell scripts so we can remove this nonsense. > +build-tools: > +.for _tool in $(CRUNCH_BUILDTOOLS) > + =A0 =A0 =A0 cd $(.CURDIR)/../../${_tool}; \ > + =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} ${MAKE} obj; \ > + =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} ${MAKE} build-tools > +.endfor > + > +# Use a separate build tree to hold files compiled for this crunchgen bi= nary > +# Yes, this does seem to partly duplicate bsd.subdir.mk, but I can't > +# get that to cooperate with bsd.prog.mk. =A0Besides, many of the standa= rd > +# targets should NOT be propagated into the components. > +cleandepend cleandir obj objlink: > +.for D in $(CRUNCH_SRCDIRS) > +.for P in $(CRUNCH_PROGS_$(D)) > +.ifdef CRUNCH_SRCDIR_${P} > + =A0 =A0 =A0 cd ${CRUNCH_SRCDIR_$(P)} && \ > + =A0 =A0 =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CANONICALOBJDIR} ${MAKE} \ > + =A0 =A0 =A0 =A0 =A0 DIRPRFX=3D${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TA= RGET} > +.else > + =A0 =A0 =A0 cd $(.CURDIR)/../../${D}/${P} && \ > + =A0 =A0 =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CANONICALOBJDIR} ${MAKE} \ > + =A0 =A0 =A0 =A0 =A0 DIRPRFX=3D${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TA= RGET} > +.endif > +.endfor > +.endfor > + > +clean: > + =A0 =A0 =A0 rm -f ${CLEANFILES} > + =A0 =A0 =A0 if [ -e ${.OBJDIR}/$(OUTMK) ]; then =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 \ > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} ${MAKE} -f= $(OUTMK) clean; =A0 =A0 =A0 \ > + =A0 =A0 =A0 fi > +.for D in $(CRUNCH_SRCDIRS) > +.for P in $(CRUNCH_PROGS_$(D)) > +.ifdef CRUNCH_SRCDIR_${P} > + =A0 =A0 =A0 cd ${CRUNCH_SRCDIR_$(P)} && \ > + =A0 =A0 =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CANONICALOBJDIR} ${MAKE} \ > + =A0 =A0 =A0 =A0 =A0 DIRPRFX=3D${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TA= RGET} > +.else > + =A0 =A0 =A0 cd $(.CURDIR)/../../${D}/${P} && \ > + =A0 =A0 =A0 =A0 =A0 MAKEOBJDIRPREFIX=3D${CANONICALOBJDIR} ${MAKE} \ > + =A0 =A0 =A0 =A0 =A0 DIRPRFX=3D${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TA= RGET} > +.endif > +.endfor > +.endfor From owner-svn-src-head@FreeBSD.ORG Tue Nov 16 22:44:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA0C21065672; Tue, 16 Nov 2010 22:44:58 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 97EC98FC13; Tue, 16 Nov 2010 22:44:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAGMiw95069800; Tue, 16 Nov 2010 22:44:58 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGMiwnO069797; Tue, 16 Nov 2010 22:44:58 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201011162244.oAGMiwnO069797@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 16 Nov 2010 22:44:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215414 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 22:44:58 -0000 Author: jkim Date: Tue Nov 16 22:44:58 2010 New Revision: 215414 URL: http://svn.freebsd.org/changeset/base/215414 Log: Invalidate TLBs explicitly. r1.4 of sys/i386/i386/i686_mem.c removed this code but probably it only worked by chance because modifying CR4.PGE bit causes invlidation of entire TLBs. Since these are very rare events, this micro-optimization seems useless. Reviewed by: jhb Modified: head/sys/amd64/amd64/amd64_mem.c head/sys/i386/i386/i686_mem.c Modified: head/sys/amd64/amd64/amd64_mem.c ============================================================================== --- head/sys/amd64/amd64/amd64_mem.c Tue Nov 16 22:23:20 2010 (r215413) +++ head/sys/amd64/amd64/amd64_mem.c Tue Nov 16 22:44:58 2010 (r215414) @@ -321,6 +321,7 @@ amd64_mrstoreone(void *arg) /* Flushes caches and TLBs. */ wbinvd(); + invltlb(); /* Disable MTRRs (E = 0). */ wrmsr(MSR_MTRRdefType, rdmsr(MSR_MTRRdefType) & ~MTRR_DEF_ENABLE); @@ -388,8 +389,9 @@ amd64_mrstoreone(void *arg) wrmsr(msr + 1, msrv); } - /* Flush caches, TLBs. */ + /* Flush caches and TLBs. */ wbinvd(); + invltlb(); /* Enable MTRRs. */ wrmsr(MSR_MTRRdefType, rdmsr(MSR_MTRRdefType) | MTRR_DEF_ENABLE); Modified: head/sys/i386/i386/i686_mem.c ============================================================================== --- head/sys/i386/i386/i686_mem.c Tue Nov 16 22:23:20 2010 (r215413) +++ head/sys/i386/i386/i686_mem.c Tue Nov 16 22:44:58 2010 (r215414) @@ -315,6 +315,7 @@ i686_mrstoreone(void *arg) /* Flushes caches and TLBs. */ wbinvd(); + invltlb(); /* Disable MTRRs (E = 0). */ wrmsr(MSR_MTRRdefType, rdmsr(MSR_MTRRdefType) & ~MTRR_DEF_ENABLE); @@ -382,8 +383,9 @@ i686_mrstoreone(void *arg) wrmsr(msr + 1, msrv); } - /* Flush caches, TLBs. */ + /* Flush caches and TLBs. */ wbinvd(); + invltlb(); /* Enable MTRRs. */ wrmsr(MSR_MTRRdefType, rdmsr(MSR_MTRRdefType) | MTRR_DEF_ENABLE); From owner-svn-src-head@FreeBSD.ORG Tue Nov 16 23:26:03 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36BEC1065670; Tue, 16 Nov 2010 23:26:03 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A7118FC1B; Tue, 16 Nov 2010 23:26:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAGNQ2La070645; Tue, 16 Nov 2010 23:26:02 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGNQ2Ll070642; Tue, 16 Nov 2010 23:26:02 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201011162326.oAGNQ2Ll070642@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 16 Nov 2010 23:26:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215415 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 23:26:03 -0000 Author: jkim Date: Tue Nov 16 23:26:02 2010 New Revision: 215415 URL: http://svn.freebsd.org/changeset/base/215415 Log: Restore CR0 after MTRR initialization for correctness sakes. There will be no noticeable change because we enable caches before we enter here for both BSP and AP cases. Remove another pointless optimization for CR4.PGE bit while I am here. Modified: head/sys/amd64/amd64/amd64_mem.c head/sys/i386/i386/i686_mem.c Modified: head/sys/amd64/amd64/amd64_mem.c ============================================================================== --- head/sys/amd64/amd64/amd64_mem.c Tue Nov 16 22:44:58 2010 (r215414) +++ head/sys/amd64/amd64/amd64_mem.c Tue Nov 16 23:26:02 2010 (r215415) @@ -307,17 +307,17 @@ amd64_mrstoreone(void *arg) struct mem_range_desc *mrd; u_int64_t omsrv, msrv; int i, j, msr; - u_int cr4save; + u_long cr0, cr4; mrd = sc->mr_desc; /* Disable PGE. */ - cr4save = rcr4(); - if (cr4save & CR4_PGE) - load_cr4(cr4save & ~CR4_PGE); + cr4 = rcr4(); + load_cr4(cr4 & ~CR4_PGE); /* Disable caches (CD = 1, NW = 0). */ - load_cr0((rcr0() & ~CR0_NW) | CR0_CD); + cr0 = rcr0(); + load_cr0((cr0 & ~CR0_NW) | CR0_CD); /* Flushes caches and TLBs. */ wbinvd(); @@ -396,11 +396,9 @@ amd64_mrstoreone(void *arg) /* Enable MTRRs. */ wrmsr(MSR_MTRRdefType, rdmsr(MSR_MTRRdefType) | MTRR_DEF_ENABLE); - /* Enable caches (CD = 0, NW = 0). */ - load_cr0(rcr0() & ~(CR0_CD | CR0_NW)); - - /* Restore PGE. */ - load_cr4(cr4save); + /* Restore caches and PGE. */ + load_cr0(cr0); + load_cr4(cr4); } /* Modified: head/sys/i386/i386/i686_mem.c ============================================================================== --- head/sys/i386/i386/i686_mem.c Tue Nov 16 22:44:58 2010 (r215414) +++ head/sys/i386/i386/i686_mem.c Tue Nov 16 23:26:02 2010 (r215415) @@ -301,17 +301,17 @@ i686_mrstoreone(void *arg) struct mem_range_desc *mrd; u_int64_t omsrv, msrv; int i, j, msr; - u_int cr4save; + u_long cr0, cr4; mrd = sc->mr_desc; /* Disable PGE. */ - cr4save = rcr4(); - if (cr4save & CR4_PGE) - load_cr4(cr4save & ~CR4_PGE); + cr4 = rcr4(); + load_cr4(cr4 & ~CR4_PGE); /* Disable caches (CD = 1, NW = 0). */ - load_cr0((rcr0() & ~CR0_NW) | CR0_CD); + cr0 = rcr0(); + load_cr0((cr0 & ~CR0_NW) | CR0_CD); /* Flushes caches and TLBs. */ wbinvd(); @@ -390,11 +390,9 @@ i686_mrstoreone(void *arg) /* Enable MTRRs. */ wrmsr(MSR_MTRRdefType, rdmsr(MSR_MTRRdefType) | MTRR_DEF_ENABLE); - /* Enable caches (CD = 0, NW = 0). */ - load_cr0(rcr0() & ~(CR0_CD | CR0_NW)); - - /* Restore PGE. */ - load_cr4(cr4save); + /* Restore caches and PGE. */ + load_cr0(cr0); + load_cr4(cr4); } /* From owner-svn-src-head@FreeBSD.ORG Wed Nov 17 09:25:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEE361065672; Wed, 17 Nov 2010 09:25:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D4978FC1F; Wed, 17 Nov 2010 09:25:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAH9P8tw084667; Wed, 17 Nov 2010 09:25:08 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAH9P8Lq084665; Wed, 17 Nov 2010 09:25:08 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201011170925.oAH9P8Lq084665@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 17 Nov 2010 09:25:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215418 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 09:25:08 -0000 Author: bz Date: Wed Nov 17 09:25:08 2010 New Revision: 215418 URL: http://svn.freebsd.org/changeset/base/215418 Log: No need to re-initialize the callout. We initially do it in in6_lltable_new() right after allocation. Worse, we are losing the right flags here. MFC after: 4 days Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Wed Nov 17 08:56:01 2010 (r215417) +++ head/sys/netinet6/nd6.c Wed Nov 17 09:25:08 2010 (r215418) @@ -851,10 +851,8 @@ nd6_lookup(struct in6_addr *addr6, int f llflags |= LLE_EXCLUSIVE; ln = lla_lookup(LLTABLE6(ifp), llflags, (struct sockaddr *)&sin6); - if ((ln != NULL) && (flags & LLE_CREATE)) { + if ((ln != NULL) && (flags & LLE_CREATE)) ln->ln_state = ND6_LLINFO_NOSTATE; - callout_init(&ln->ln_timer_ch, 0); - } return (ln); } From owner-svn-src-head@FreeBSD.ORG Wed Nov 17 09:28:17 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6CAA106566B; Wed, 17 Nov 2010 09:28:17 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4D5D8FC1B; Wed, 17 Nov 2010 09:28:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAH9SHA9084759; Wed, 17 Nov 2010 09:28:17 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAH9SHCA084756; Wed, 17 Nov 2010 09:28:17 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011170928.oAH9SHCA084756@svn.freebsd.org> From: Bernhard Schmidt Date: Wed, 17 Nov 2010 09:28:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215419 - head/sys/compat/ndis X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 09:28:17 -0000 Author: bschmidt Date: Wed Nov 17 09:28:17 2010 New Revision: 215419 URL: http://svn.freebsd.org/changeset/base/215419 Log: Use kmem_alloc_contig() to honour the cache_type variable. Pointed out by: alc Modified: head/sys/compat/ndis/ntoskrnl_var.h head/sys/compat/ndis/subr_ntoskrnl.c Modified: head/sys/compat/ndis/ntoskrnl_var.h ============================================================================== --- head/sys/compat/ndis/ntoskrnl_var.h Wed Nov 17 09:25:08 2010 (r215418) +++ head/sys/compat/ndis/ntoskrnl_var.h Wed Nov 17 09:28:17 2010 (r215419) @@ -162,6 +162,16 @@ typedef struct mdl mdl, ndis_buffer; #define WDM_MINOR_WINXP 0x20 #define WDM_MINOR_WIN2003 0x30 +enum nt_caching_type { + MmNonCached = 0, + MmCached = 1, + MmWriteCombined = 2, + MmHardwareCoherentCached = 3, + MmNonCachedUnordered = 4, + MmUSWCCached = 5, + MmMaximumCacheType = 6 +}; + /*- * The ndis_kspin_lock type is called KSPIN_LOCK in MS-Windows. * According to the Windows DDK header files, KSPIN_LOCK is defined like this: Modified: head/sys/compat/ndis/subr_ntoskrnl.c ============================================================================== --- head/sys/compat/ndis/subr_ntoskrnl.c Wed Nov 17 09:25:08 2010 (r215418) +++ head/sys/compat/ndis/subr_ntoskrnl.c Wed Nov 17 09:28:17 2010 (r215419) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -197,9 +198,10 @@ static uint32_t InterlockedDecrement(vol static void ExInterlockedAddLargeStatistic(uint64_t *, uint32_t); static void *MmAllocateContiguousMemory(uint32_t, uint64_t); static void *MmAllocateContiguousMemorySpecifyCache(uint32_t, - uint64_t, uint64_t, uint64_t, uint32_t); + uint64_t, uint64_t, uint64_t, enum nt_caching_type); static void MmFreeContiguousMemory(void *); -static void MmFreeContiguousMemorySpecifyCache(void *, uint32_t, uint32_t); +static void MmFreeContiguousMemorySpecifyCache(void *, uint32_t, + enum nt_caching_type); static uint32_t MmSizeOfMdl(void *, size_t); static void *MmMapLockedPages(mdl *, uint8_t); static void *MmMapLockedPagesSpecifyCache(mdl *, @@ -2424,11 +2426,34 @@ MmAllocateContiguousMemorySpecifyCache(s uint64_t lowest; uint64_t highest; uint64_t boundary; - uint32_t cachetype; + enum nt_caching_type cachetype; { + vm_memattr_t memattr; + void *ret; - return (contigmalloc(size, M_DEVBUF, M_ZERO|M_NOWAIT, lowest, - highest, PAGE_SIZE, boundary)); + switch (cachetype) { + case MmNonCached: + memattr = VM_MEMATTR_UNCACHEABLE; + break; + case MmWriteCombined: + memattr = VM_MEMATTR_WRITE_COMBINING; + break; + case MmNonCachedUnordered: + memattr = VM_MEMATTR_UNCACHEABLE; + break; + case MmCached: + case MmHardwareCoherentCached: + case MmUSWCCached: + default: + memattr = VM_MEMATTR_DEFAULT; + break; + } + + ret = (void *)kmem_alloc_contig(kernel_map, size, M_ZERO | M_NOWAIT, + lowest, highest, PAGE_SIZE, boundary, memattr); + if (ret != NULL) + malloc_type_allocated(M_DEVBUF, round_page(size)); + return (ret); } static void @@ -2442,7 +2467,7 @@ static void MmFreeContiguousMemorySpecifyCache(base, size, cachetype) void *base; uint32_t size; - uint32_t cachetype; + enum nt_caching_type cachetype; { contigfree(base, size, M_DEVBUF); } From owner-svn-src-head@FreeBSD.ORG Wed Nov 17 09:32:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA2D71065694; Wed, 17 Nov 2010 09:32:39 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C751E8FC16; Wed, 17 Nov 2010 09:32:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAH9WdSj084878; Wed, 17 Nov 2010 09:32:39 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAH9WdLe084876; Wed, 17 Nov 2010 09:32:39 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201011170932.oAH9WdLe084876@svn.freebsd.org> From: Bernhard Schmidt Date: Wed, 17 Nov 2010 09:32:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215420 - head/sys/compat/ndis X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 09:32:40 -0000 Author: bschmidt Date: Wed Nov 17 09:32:39 2010 New Revision: 215420 URL: http://svn.freebsd.org/changeset/base/215420 Log: Fix a panic on i386 for drivers using MmAllocateContiguousMemory() and MmAllocateContiguousMemorySpecifyCache(). Those two functions take 64-bit variable(s) for their arguments. On i386 that takes additional 32-bit variable per argument. This is required so that windrv_wrap() can correctly wrap function that miniport driver calls with stdcall convention. Similar explanation is provided in subr_ndis.c for other functions. Submitted by: Paul B Mahol Modified: head/sys/compat/ndis/subr_ntoskrnl.c Modified: head/sys/compat/ndis/subr_ntoskrnl.c ============================================================================== --- head/sys/compat/ndis/subr_ntoskrnl.c Wed Nov 17 09:28:17 2010 (r215419) +++ head/sys/compat/ndis/subr_ntoskrnl.c Wed Nov 17 09:32:39 2010 (r215420) @@ -4237,8 +4237,8 @@ image_patch_table ntoskrnl_functbl[] = { IMPORT_FFUNC(ExInterlockedAddLargeStatistic, 2), IMPORT_SFUNC(IoAllocateMdl, 5), IMPORT_SFUNC(IoFreeMdl, 1), - IMPORT_SFUNC(MmAllocateContiguousMemory, 2), - IMPORT_SFUNC(MmAllocateContiguousMemorySpecifyCache, 5), + IMPORT_SFUNC(MmAllocateContiguousMemory, 2 + 1), + IMPORT_SFUNC(MmAllocateContiguousMemorySpecifyCache, 5 + 3), IMPORT_SFUNC(MmFreeContiguousMemory, 1), IMPORT_SFUNC(MmFreeContiguousMemorySpecifyCache, 3), IMPORT_SFUNC_MAP(MmGetPhysicalAddress, pmap_kextract, 1), From owner-svn-src-head@FreeBSD.ORG Wed Nov 17 10:43:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D70F7106564A; Wed, 17 Nov 2010 10:43:20 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AABDE8FC0C; Wed, 17 Nov 2010 10:43:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAHAhKcn086552; Wed, 17 Nov 2010 10:43:20 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHAhKNo086550; Wed, 17 Nov 2010 10:43:20 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201011171043.oAHAhKNo086550@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 17 Nov 2010 10:43:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215423 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 10:43:20 -0000 Author: bz Date: Wed Nov 17 10:43:20 2010 New Revision: 215423 URL: http://svn.freebsd.org/changeset/base/215423 Log: Do not initialize flag variables before needed. Consistently use the LLE_ prefix for lla_lookup() and the ND6_ prefix for nd6_lookup() even though both are defined the same. Use the right flag variable when checking each. No real functional change. MFC after: 4 days Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Wed Nov 17 09:49:51 2010 (r215422) +++ head/sys/netinet6/nd6.c Wed Nov 17 10:43:20 2010 (r215423) @@ -836,7 +836,7 @@ nd6_lookup(struct in6_addr *addr6, int f { struct sockaddr_in6 sin6; struct llentry *ln; - int llflags = 0; + int llflags; bzero(&sin6, sizeof(sin6)); sin6.sin6_len = sizeof(struct sockaddr_in6); @@ -845,13 +845,14 @@ nd6_lookup(struct in6_addr *addr6, int f IF_AFDATA_LOCK_ASSERT(ifp); + llflags = 0; if (flags & ND6_CREATE) llflags |= LLE_CREATE; if (flags & ND6_EXCLUSIVE) llflags |= LLE_EXCLUSIVE; ln = lla_lookup(LLTABLE6(ifp), llflags, (struct sockaddr *)&sin6); - if ((ln != NULL) && (flags & LLE_CREATE)) + if ((ln != NULL) && (llflags & LLE_CREATE)) ln->ln_state = ND6_LLINFO_NOSTATE; return (ln); @@ -1451,7 +1452,7 @@ nd6_cache_lladdr(struct ifnet *ifp, stru int do_update; int olladdr; int llchange; - int flags = 0; + int flags; int newstate = 0; uint16_t router = 0; struct sockaddr_in6 sin6; @@ -1478,13 +1479,13 @@ nd6_cache_lladdr(struct ifnet *ifp, stru * Spec says nothing in sections for RA, RS and NA. There's small * description on it in NS section (RFC 2461 7.2.3). */ - flags |= lladdr ? ND6_EXCLUSIVE : 0; + flags = lladdr ? ND6_EXCLUSIVE : 0; IF_AFDATA_LOCK(ifp); ln = nd6_lookup(from, flags, ifp); if (ln == NULL) { - flags |= LLE_EXCLUSIVE; - ln = nd6_lookup(from, flags |ND6_CREATE, ifp); + flags |= ND6_EXCLUSIVE; + ln = nd6_lookup(from, flags | ND6_CREATE, ifp); IF_AFDATA_UNLOCK(ifp); is_newentry = 1; } else { From owner-svn-src-head@FreeBSD.ORG Wed Nov 17 15:12:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A3D1106567A; Wed, 17 Nov 2010 15:12:10 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 58EDC8FC08; Wed, 17 Nov 2010 15:12:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAHFCArZ095098; Wed, 17 Nov 2010 15:12:10 GMT (envelope-from ivoras@svn.freebsd.org) Received: (from ivoras@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHFCAg5095095; Wed, 17 Nov 2010 15:12:10 GMT (envelope-from ivoras@svn.freebsd.org) Message-Id: <201011171512.oAHFCAg5095095@svn.freebsd.org> From: Ivan Voras Date: Wed, 17 Nov 2010 15:12:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215425 - head/usr.sbin/iostat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 15:12:10 -0000 Author: ivoras Date: Wed Nov 17 15:12:10 2010 New Revision: 215425 URL: http://svn.freebsd.org/changeset/base/215425 Log: Change "wait" banner to "qlen" to be more indicative of its purpose and to be more inline with what gstat uses. Reviewed by: gnn Silence from: phk, keramida Modified: head/usr.sbin/iostat/iostat.8 head/usr.sbin/iostat/iostat.c Modified: head/usr.sbin/iostat/iostat.8 ============================================================================== --- head/usr.sbin/iostat/iostat.8 Wed Nov 17 13:52:09 2010 (r215424) +++ head/usr.sbin/iostat/iostat.8 Wed Nov 17 15:12:10 2010 (r215425) @@ -348,7 +348,7 @@ write operations per second kilobytes read per second .It kw/s kilobytes write per second -.It wait +.It qlen transactions queue length .It svc_t average duration of transactions, in milliseconds Modified: head/usr.sbin/iostat/iostat.c ============================================================================== --- head/usr.sbin/iostat/iostat.c Wed Nov 17 13:52:09 2010 (r215424) +++ head/usr.sbin/iostat/iostat.c Wed Nov 17 15:12:10 2010 (r215425) @@ -750,11 +750,11 @@ devstats(int perf_select, long double et printf("\n"); if (Iflag == 0) printf( - "device r/s w/s kr/s kw/s wait svc_t %%b " + "device r/s w/s kr/s kw/s qlen svc_t %%b " ); else printf( - "device r/i w/i kr/i kw/i wait svc_t %%b " + "device r/i w/i kr/i kw/i qlen svc_t %%b " ); if (Tflag > 0) printf("tin tout "); From owner-svn-src-head@FreeBSD.ORG Wed Nov 17 15:42:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B76E0106566C; Wed, 17 Nov 2010 15:42:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C42F8FC08; Wed, 17 Nov 2010 15:42:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAHFglha096218; Wed, 17 Nov 2010 15:42:47 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHFglsf096217; Wed, 17 Nov 2010 15:42:47 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201011171542.oAHFglsf096217@svn.freebsd.org> From: John Baldwin Date: Wed, 17 Nov 2010 15:42:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215426 - in head: lib/libautofs sbin/mount_autofs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 15:42:47 -0000 Author: jhb Date: Wed Nov 17 15:42:47 2010 New Revision: 215426 URL: http://svn.freebsd.org/changeset/base/215426 Log: Remove unused autofs userland bits. Approved by: core Deleted: head/lib/libautofs/ head/sbin/mount_autofs/ From owner-svn-src-head@FreeBSD.ORG Wed Nov 17 16:17:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00C501065672; Wed, 17 Nov 2010 16:17:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C99BD8FC15; Wed, 17 Nov 2010 16:17:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAHGHFNJ097108; Wed, 17 Nov 2010 16:17:15 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHGHFSW097106; Wed, 17 Nov 2010 16:17:15 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201011171617.oAHGHFSW097106@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 17 Nov 2010 16:17:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215427 - head/sys/crypto/aesni X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 16:17:16 -0000 Author: kib Date: Wed Nov 17 16:17:15 2010 New Revision: 215427 URL: http://svn.freebsd.org/changeset/base/215427 Log: Only save FPU context when not executing in the context of the crypto thread. Tested by: Mike Tancsa Modified: head/sys/crypto/aesni/aesni_wrap.c Modified: head/sys/crypto/aesni/aesni_wrap.c ============================================================================== --- head/sys/crypto/aesni/aesni_wrap.c Wed Nov 17 15:42:47 2010 (r215426) +++ head/sys/crypto/aesni/aesni_wrap.c Wed Nov 17 16:17:15 2010 (r215427) @@ -246,14 +246,21 @@ int aesni_cipher_setup(struct aesni_session *ses, struct cryptoini *encini) { struct thread *td; - int error; + int error, saved_ctx; td = curthread; - error = fpu_kern_enter(td, &ses->fpu_ctx, FPU_KERN_NORMAL); + if (!is_fpu_kern_thread(0)) { + error = fpu_kern_enter(td, &ses->fpu_ctx, FPU_KERN_NORMAL); + saved_ctx = 1; + } else { + error = 0; + saved_ctx = 0; + } if (error == 0) { error = aesni_cipher_setup_common(ses, encini->cri_key, encini->cri_klen); - fpu_kern_leave(td, &ses->fpu_ctx); + if (saved_ctx) + fpu_kern_leave(td, &ses->fpu_ctx); } return (error); } @@ -264,16 +271,22 @@ aesni_cipher_process(struct aesni_sessio { struct thread *td; uint8_t *buf; - int error, allocated; + int error, allocated, saved_ctx; buf = aesni_cipher_alloc(enccrd, crp, &allocated); if (buf == NULL) return (ENOMEM); td = curthread; - error = fpu_kern_enter(td, &ses->fpu_ctx, FPU_KERN_NORMAL); - if (error != 0) - goto out; + if (!is_fpu_kern_thread(0)) { + error = fpu_kern_enter(td, &ses->fpu_ctx, FPU_KERN_NORMAL); + if (error != 0) + goto out; + saved_ctx = 1; + } else { + saved_ctx = 0; + error = 0; + } if ((enccrd->crd_flags & CRD_F_KEY_EXPLICIT) != 0) { error = aesni_cipher_setup_common(ses, enccrd->crd_key, @@ -311,7 +324,8 @@ aesni_cipher_process(struct aesni_sessio ses->iv); } } - fpu_kern_leave(td, &ses->fpu_ctx); + if (saved_ctx) + fpu_kern_leave(td, &ses->fpu_ctx); if (allocated) crypto_copyback(crp->crp_flags, crp->crp_buf, enccrd->crd_skip, enccrd->crd_len, buf); From owner-svn-src-head@FreeBSD.ORG Wed Nov 17 16:17:36 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22C5B106580A; Wed, 17 Nov 2010 16:17:36 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11EE78FC23; Wed, 17 Nov 2010 16:17:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAHGHZlK097150; Wed, 17 Nov 2010 16:17:35 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHGHZSg097148; Wed, 17 Nov 2010 16:17:35 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201011171617.oAHGHZSg097148@svn.freebsd.org> From: Alexander Motin Date: Wed, 17 Nov 2010 16:17:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215428 - head/sys/dev/ata/chipsets X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 16:17:36 -0000 Author: mav Date: Wed Nov 17 16:17:35 2010 New Revision: 215428 URL: http://svn.freebsd.org/changeset/base/215428 Log: Add IDs for VIA VX900 chipset SATA controller. MFC after: 1 week Modified: head/sys/dev/ata/chipsets/ata-via.c Modified: head/sys/dev/ata/chipsets/ata-via.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-via.c Wed Nov 17 16:17:15 2010 (r215427) +++ head/sys/dev/ata/chipsets/ata-via.c Wed Nov 17 16:17:35 2010 (r215428) @@ -106,6 +106,7 @@ ata_via_probe(device_t dev) { ATA_VIACX700, 0x00, VIA133, VIASATA, ATA_SA150, "CX700" }, { ATA_VIAVX800, 0x00, VIA133, VIASATA, ATA_SA150, "VX800" }, { ATA_VIAVX855, 0x00, VIA133, 0x00, ATA_UDMA6, "VX855" }, + { ATA_VIAVX900, 0x00, VIA133, VIASATA, ATA_SA300, "VX900" }, { 0, 0, 0, 0, 0, 0 }}; static struct ata_chip_id new_ids[] = {{ ATA_VIA6410, 0x00, 0, 0x00, ATA_UDMA6, "6410" }, @@ -123,7 +124,9 @@ ata_via_probe(device_t dev) if (pci_get_devid(dev) == ATA_VIA82C571 || pci_get_devid(dev) == ATA_VIACX700IDE || - pci_get_devid(dev) == ATA_VIASATAIDE) { + pci_get_devid(dev) == ATA_VIASATAIDE || + pci_get_devid(dev) == ATA_VIASATAIDE2 || + pci_get_devid(dev) == ATA_VIASATAIDE3) { if (!(ctlr->chip = ata_find_chip(dev, ids, -99))) return ENXIO; } From owner-svn-src-head@FreeBSD.ORG Wed Nov 17 17:52:05 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 426AA1065696; Wed, 17 Nov 2010 17:52:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 320678FC0C; Wed, 17 Nov 2010 17:52:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAHHq5n8099338; Wed, 17 Nov 2010 17:52:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHHq5M8099336; Wed, 17 Nov 2010 17:52:05 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201011171752.oAHHq5M8099336@svn.freebsd.org> From: Alexander Motin Date: Wed, 17 Nov 2010 17:52:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215431 - head/sys/dev/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 17:52:05 -0000 Author: mav Date: Wed Nov 17 17:52:04 2010 New Revision: 215431 URL: http://svn.freebsd.org/changeset/base/215431 Log: Add IDs for VIA VX900 chipset SATA controller. (Missed part of r215428) Modified: head/sys/dev/ata/ata-pci.h Modified: head/sys/dev/ata/ata-pci.h ============================================================================== --- head/sys/dev/ata/ata-pci.h Wed Nov 17 17:29:22 2010 (r215430) +++ head/sys/dev/ata/ata-pci.h Wed Nov 17 17:52:04 2010 (r215431) @@ -512,7 +512,10 @@ struct ata_pci_controller { #define ATA_VIACX700 0x83241106 #define ATA_VIASATAIDE 0x53241106 #define ATA_VIAVX800 0x83531106 +#define ATA_VIASATAIDE2 0xc4091106 #define ATA_VIAVX855 0x84091106 +#define ATA_VIASATAIDE3 0x90011106 +#define ATA_VIAVX900 0x84101106 /* global prototypes ata-pci.c */ int ata_pci_probe(device_t dev); From owner-svn-src-head@FreeBSD.ORG Wed Nov 17 17:59:01 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 12E6E1065674; Wed, 17 Nov 2010 17:59:01 +0000 (UTC) Date: Wed, 17 Nov 2010 17:59:01 +0000 From: Alexander Best To: Ivan Voras Message-ID: <20101117175901.GA9012@freebsd.org> References: <201011171512.oAHFCAg5095095@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="oyUTqETQ0mS9luUI" Content-Disposition: inline In-Reply-To: <201011171512.oAHFCAg5095095@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215425 - head/usr.sbin/iostat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 17:59:01 -0000 --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed Nov 17 10, Ivan Voras wrote: > Author: ivoras > Date: Wed Nov 17 15:12:10 2010 > New Revision: 215425 > URL: http://svn.freebsd.org/changeset/base/215425 > > Log: > Change "wait" banner to "qlen" to be more indicative of its purpose and to > be more inline with what gstat uses. any thoughts on this manual page change? cheers. alex > > Reviewed by: gnn > Silence from: phk, keramida > > Modified: > head/usr.sbin/iostat/iostat.8 > head/usr.sbin/iostat/iostat.c > > Modified: head/usr.sbin/iostat/iostat.8 > ============================================================================== > --- head/usr.sbin/iostat/iostat.8 Wed Nov 17 13:52:09 2010 (r215424) > +++ head/usr.sbin/iostat/iostat.8 Wed Nov 17 15:12:10 2010 (r215425) > @@ -348,7 +348,7 @@ write operations per second > kilobytes read per second > .It kw/s > kilobytes write per second > -.It wait > +.It qlen > transactions queue length > .It svc_t > average duration of transactions, in milliseconds > > Modified: head/usr.sbin/iostat/iostat.c > ============================================================================== > --- head/usr.sbin/iostat/iostat.c Wed Nov 17 13:52:09 2010 (r215424) > +++ head/usr.sbin/iostat/iostat.c Wed Nov 17 15:12:10 2010 (r215425) > @@ -750,11 +750,11 @@ devstats(int perf_select, long double et > printf("\n"); > if (Iflag == 0) > printf( > - "device r/s w/s kr/s kw/s wait svc_t %%b " > + "device r/s w/s kr/s kw/s qlen svc_t %%b " > ); > else > printf( > - "device r/i w/i kr/i kw/i wait svc_t %%b " > + "device r/i w/i kr/i kw/i qlen svc_t %%b " > ); > if (Tflag > 0) > printf("tin tout "); -- a13x --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="iostat.8.diff" diff --git a/usr.sbin/iostat/iostat.8 b/usr.sbin/iostat/iostat.8 index 6a9ef02..3b03acc 100644 --- a/usr.sbin/iostat/iostat.8 +++ b/usr.sbin/iostat/iostat.8 @@ -60,7 +60,7 @@ .\" .\" @(#)iostat.8 8.1 (Berkeley) 6/6/93 .\" -.Dd April 17, 2006 +.Dd November 17, 2010 .Dt IOSTAT 8 .Os .Sh NAME @@ -102,11 +102,15 @@ Repeat the display times. If no repeat .Ar count -is specified, the default is infinity. +is specified, and +.Fl w +is specified, the default is infinity, otherwise the default is one. .It Fl C Display CPU statistics. This is on by default, unless .Fl d +or +.Fl x is specified. .It Fl d Display only device statistics. @@ -231,6 +235,8 @@ output, up to the number of devices that can be displayed in Display TTY statistics. This is on by default, unless .Fl d +or +.Fl x is specified. .It Fl w Pause --oyUTqETQ0mS9luUI-- From owner-svn-src-head@FreeBSD.ORG Wed Nov 17 18:09:02 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 832021065670; Wed, 17 Nov 2010 18:09:02 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 726E38FC12; Wed, 17 Nov 2010 18:09:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAHI924Q099778; Wed, 17 Nov 2010 18:09:02 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHI9268099776; Wed, 17 Nov 2010 18:09:02 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201011171809.oAHI9268099776@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 17 Nov 2010 18:09:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215432 - head/sys/dev/nfe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 18:09:02 -0000 Author: yongari Date: Wed Nov 17 18:09:02 2010 New Revision: 215432 URL: http://svn.freebsd.org/changeset/base/215432 Log: MCP55 is the only NVIDIA controller that supports VLAN tag insertion/stripping and it also supports TSO over VLAN. Implement TSO over VLAN support for MCP55 controller. While I'm here clean up SIOCSIFCAP ioctl handler. Since nfe(4) sets ifp capabilities based on various hardware flags in device attach, there is no need to check hardware flags again in SIOCSIFCAP ioctl handler. Also fix a bug which toggled both TX and RX checksum offloading even if user requested either TX or RX checksum configuration change. Tested by: Rob Farmer ( rfarmer <> predatorlabs dot net ) Modified: head/sys/dev/nfe/if_nfe.c Modified: head/sys/dev/nfe/if_nfe.c ============================================================================== --- head/sys/dev/nfe/if_nfe.c Wed Nov 17 17:52:04 2010 (r215431) +++ head/sys/dev/nfe/if_nfe.c Wed Nov 17 18:09:02 2010 (r215432) @@ -593,7 +593,8 @@ nfe_attach(device_t dev) if ((sc->nfe_flags & NFE_HW_VLAN) != 0) { ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING; if ((ifp->if_capabilities & IFCAP_HWCSUM) != 0) - ifp->if_capabilities |= IFCAP_VLAN_HWCSUM; + ifp->if_capabilities |= IFCAP_VLAN_HWCSUM | + IFCAP_VLAN_HWTSO; } if (pci_find_extcap(dev, PCIY_PMG, ®) == 0) @@ -1777,20 +1778,35 @@ nfe_ioctl(struct ifnet *ifp, u_long cmd, if ((mask & IFCAP_WOL_MAGIC) != 0 && (ifp->if_capabilities & IFCAP_WOL_MAGIC) != 0) ifp->if_capenable ^= IFCAP_WOL_MAGIC; - - if ((sc->nfe_flags & NFE_HW_CSUM) != 0 && - (mask & IFCAP_HWCSUM) != 0) { - ifp->if_capenable ^= IFCAP_HWCSUM; - if ((IFCAP_TXCSUM & ifp->if_capenable) != 0 && - (IFCAP_TXCSUM & ifp->if_capabilities) != 0) + if ((mask & IFCAP_TXCSUM) != 0 && + (ifp->if_capabilities & IFCAP_TXCSUM) != 0) { + ifp->if_capenable ^= IFCAP_TXCSUM; + if ((ifp->if_capenable & IFCAP_TXCSUM) != 0) ifp->if_hwassist |= NFE_CSUM_FEATURES; else ifp->if_hwassist &= ~NFE_CSUM_FEATURES; + } + if ((mask & IFCAP_RXCSUM) != 0 && + (ifp->if_capabilities & IFCAP_RXCSUM) != 0) { + ifp->if_capenable ^= IFCAP_RXCSUM; init++; } - if ((sc->nfe_flags & NFE_HW_VLAN) != 0 && - (mask & IFCAP_VLAN_HWTAGGING) != 0) { + if ((mask & IFCAP_TSO4) != 0 && + (ifp->if_capabilities & IFCAP_TSO4) != 0) { + ifp->if_capenable ^= IFCAP_TSO4; + if ((IFCAP_TSO4 & ifp->if_capenable) != 0) + ifp->if_hwassist |= CSUM_TSO; + else + ifp->if_hwassist &= ~CSUM_TSO; + } + if ((mask & IFCAP_VLAN_HWTSO) != 0 && + (ifp->if_capabilities & IFCAP_VLAN_HWTSO) != 0) + ifp->if_capenable ^= IFCAP_VLAN_HWTSO; + if ((mask & IFCAP_VLAN_HWTAGGING) != 0 && + (ifp->if_capabilities & IFCAP_VLAN_HWTAGGING) != 0) { ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; + if ((ifp->if_capenable & IFCAP_VLAN_HWTAGGING) == 0) + ifp->if_capenable &= ~IFCAP_VLAN_HWTSO; init++; } /* @@ -1800,28 +1816,17 @@ nfe_ioctl(struct ifnet *ifp, u_long cmd, * VLAN stripping. So when we know Rx checksum offload is * disabled turn entire hardware VLAN assist off. */ - if ((sc->nfe_flags & (NFE_HW_CSUM | NFE_HW_VLAN)) == - (NFE_HW_CSUM | NFE_HW_VLAN)) { - if ((ifp->if_capenable & IFCAP_RXCSUM) == 0) - ifp->if_capenable &= ~IFCAP_VLAN_HWTAGGING; + if ((ifp->if_capenable & IFCAP_RXCSUM) == 0) { + if ((ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0) + init++; + ifp->if_capenable &= ~(IFCAP_VLAN_HWTAGGING | + IFCAP_VLAN_HWTSO); } - - if ((sc->nfe_flags & NFE_HW_CSUM) != 0 && - (mask & IFCAP_TSO4) != 0) { - ifp->if_capenable ^= IFCAP_TSO4; - if ((IFCAP_TSO4 & ifp->if_capenable) != 0 && - (IFCAP_TSO4 & ifp->if_capabilities) != 0) - ifp->if_hwassist |= CSUM_TSO; - else - ifp->if_hwassist &= ~CSUM_TSO; - } - if (init > 0 && (ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { ifp->if_drv_flags &= ~IFF_DRV_RUNNING; nfe_init(sc); } - if ((sc->nfe_flags & NFE_HW_VLAN) != 0) - VLAN_CAPABILITIES(ifp); + VLAN_CAPABILITIES(ifp); break; default: error = ether_ioctl(ifp, cmd, data); From owner-svn-src-head@FreeBSD.ORG Wed Nov 17 18:35:14 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 690041065673; Wed, 17 Nov 2010 18:35:14 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id DF0158FC13; Wed, 17 Nov 2010 18:35:13 +0000 (UTC) Received: from c122-106-146-145.carlnfd1.nsw.optusnet.com.au (c122-106-146-145.carlnfd1.nsw.optusnet.com.au [122.106.146.145]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id oAHIZAeL013262 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Nov 2010 05:35:11 +1100 Date: Thu, 18 Nov 2010 05:35:10 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Adrian Chadd In-Reply-To: <201011162222.oAGMMGA1069222@svn.freebsd.org> Message-ID: <20101118052216.I1172@besplex.bde.org> References: <201011162222.oAGMMGA1069222@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r215412 - head/share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 18:35:14 -0000 On Tue, 16 Nov 2010, Adrian Chadd wrote: > Log: > .. and then notice that the list of mk files is ordered, and update to suit. Please also notice that c is before d, e and f in the English alphapbet. Also note that cr is after c[o-p] in lexicographical order. > Modified: head/share/mk/Makefile > ============================================================================== > --- head/share/mk/Makefile Tue Nov 16 22:21:14 2010 (r215411) > +++ head/share/mk/Makefile Tue Nov 16 22:22:16 2010 (r215412) > @@ -5,14 +5,14 @@ FILES= bsd.README > FILES+= bsd.arch.inc.mk > FILES+= bsd.compat.mk bsd.cpu.mk bsd.dep.mk bsd.doc.mk bsd.dtrace.mk > FILES+= bsd.endian.mk > -FILES+= bsd.files.mk bsd.incs.mk bsd.info.mk bsd.init.mk > +FILES+= bsd.files.mk bsd.crunchgen.mk bsd.incs.mk bsd.info.mk bsd.init.mk > FILES+= bsd.kmod.mk > FILES+= bsd.lib.mk bsd.libnames.mk bsd.links.mk bsd.man.mk bsd.nls.mk > FILES+= bsd.obj.mk bsd.own.mk > FILES+= bsd.port.mk bsd.port.options.mk bsd.port.post.mk > FILES+= bsd.port.pre.mk bsd.port.subdir.mk bsd.prog.mk > FILES+= bsd.snmpmod.mk bsd.subdir.mk bsd.sys.mk bsd.symver.mk > -FILES+= sys.mk version_gen.awk bsd.crunchgen.mk > +FILES+= sys.mk version_gen.awk > NO_OBJ= > FILESDIR= ${BINDIR}/mk The previous (and only other) insertion sort error in this file was putting bsd.symver.mk after bsd.sys.mk. Bruce From owner-svn-src-head@FreeBSD.ORG Wed Nov 17 18:55:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C5B2106564A; Wed, 17 Nov 2010 18:55:13 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A2698FC19; Wed, 17 Nov 2010 18:55:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAHItDGR001095; Wed, 17 Nov 2010 18:55:13 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHItD95001085; Wed, 17 Nov 2010 18:55:13 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201011171855.oAHItD95001085@svn.freebsd.org> From: "George V. Neville-Neil" Date: Wed, 17 Nov 2010 18:55:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215434 - in head: sys/netinet usr.bin/netstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 18:55:13 -0000 Author: gnn Date: Wed Nov 17 18:55:12 2010 New Revision: 215434 URL: http://svn.freebsd.org/changeset/base/215434 Log: Add new, per connection, statistics for TCP, including: Retransmitted Packets Zero Window Advertisements Out of Order Receives These statistics are available via the -T argument to netstat(1). MFC after: 2 weeks Modified: head/sys/netinet/tcp.h head/sys/netinet/tcp_output.c head/sys/netinet/tcp_reass.c head/sys/netinet/tcp_usrreq.c head/sys/netinet/tcp_var.h head/usr.bin/netstat/inet.c head/usr.bin/netstat/main.c head/usr.bin/netstat/netstat.1 head/usr.bin/netstat/netstat.h Modified: head/sys/netinet/tcp.h ============================================================================== --- head/sys/netinet/tcp.h Wed Nov 17 18:21:29 2010 (r215433) +++ head/sys/netinet/tcp.h Wed Nov 17 18:55:12 2010 (r215434) @@ -225,9 +225,12 @@ struct tcp_info { u_int32_t tcpi_snd_nxt; /* Next egress seqno */ u_int32_t tcpi_rcv_nxt; /* Next ingress seqno */ u_int32_t tcpi_toe_tid; /* HWTID for TOE endpoints */ + u_int32_t tcpi_snd_rexmitpack; /* Retransmitted packets */ + u_int32_t tcpi_rcv_ooopack; /* Out-of-order packets */ + u_int32_t tcpi_snd_zerowin; /* Zero-sized windows sent */ /* Padding to grow without breaking ABI. */ - u_int32_t __tcpi_pad[29]; /* Padding. */ + u_int32_t __tcpi_pad[26]; /* Padding. */ }; #endif Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Wed Nov 17 18:21:29 2010 (r215433) +++ head/sys/netinet/tcp_output.c Wed Nov 17 18:55:12 2010 (r215434) @@ -803,6 +803,7 @@ send: if ((tp->t_flags & TF_FORCEDATA) && len == 1) TCPSTAT_INC(tcps_sndprobe); else if (SEQ_LT(tp->snd_nxt, tp->snd_max) || sack_rxmit) { + tp->t_sndrexmitpack++; TCPSTAT_INC(tcps_sndrexmitpack); TCPSTAT_ADD(tcps_sndrexmitbyte, len); } else { @@ -1027,9 +1028,10 @@ send: * to read more data than can be buffered prior to transmitting on * the connection. */ - if (th->th_win == 0) + if (th->th_win == 0) { + tp->t_sndzerowin++; tp->t_flags |= TF_RXWIN0SENT; - else + } else tp->t_flags &= ~TF_RXWIN0SENT; if (SEQ_GT(tp->snd_up, tp->snd_nxt)) { th->th_urp = htons((u_short)(tp->snd_up - tp->snd_nxt)); Modified: head/sys/netinet/tcp_reass.c ============================================================================== --- head/sys/netinet/tcp_reass.c Wed Nov 17 18:21:29 2010 (r215433) +++ head/sys/netinet/tcp_reass.c Wed Nov 17 18:55:12 2010 (r215434) @@ -266,6 +266,7 @@ tcp_reass(struct tcpcb *tp, struct tcphd th->th_seq += i; } } + tp->t_rcvoopack++; TCPSTAT_INC(tcps_rcvoopack); TCPSTAT_ADD(tcps_rcvoobyte, *tlenp); Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Wed Nov 17 18:21:29 2010 (r215433) +++ head/sys/netinet/tcp_usrreq.c Wed Nov 17 18:55:12 2010 (r215434) @@ -1218,6 +1218,9 @@ tcp_fill_info(struct tcpcb *tp, struct t ti->tcpi_rcv_mss = tp->t_maxseg; if (tp->t_flags & TF_TOE) ti->tcpi_options |= TCPI_OPT_TOE; + ti->tcpi_snd_rexmitpack = tp->t_sndrexmitpack; + ti->tcpi_rcv_ooopack = tp->t_rcvoopack; + ti->tcpi_snd_zerowin = tp->t_sndzerowin; } /* Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Wed Nov 17 18:21:29 2010 (r215433) +++ head/sys/netinet/tcp_var.h Wed Nov 17 18:55:12 2010 (r215434) @@ -177,6 +177,7 @@ struct tcpcb { u_long snd_cwnd_prev; /* cwnd prior to retransmit */ u_long snd_ssthresh_prev; /* ssthresh prior to retransmit */ tcp_seq snd_recover_prev; /* snd_recover prior to retransmit */ + int t_sndzerowin; /* zero-window updates sent */ u_int t_badrxtwin; /* window for retransmit recovery */ u_char snd_limited; /* segments limited transmitted */ /* SACK related state */ @@ -193,6 +194,8 @@ struct tcpcb { u_int32_t rfbuf_ts; /* recv buffer autoscaling timestamp */ int rfbuf_cnt; /* recv buffer autoscaling byte count */ struct toe_usrreqs *t_tu; /* offload operations vector */ + int t_sndrexmitpack; /* retransmit packets sent */ + int t_rcvoopack; /* out-of-order packets received */ void *t_toe; /* TOE pcb pointer */ int t_bytes_acked; /* # bytes acked during current RTT */ struct cc_algo *cc_algo; /* congestion control algorithm */ Modified: head/usr.bin/netstat/inet.c ============================================================================== --- head/usr.bin/netstat/inet.c Wed Nov 17 18:21:29 2010 (r215433) +++ head/usr.bin/netstat/inet.c Wed Nov 17 18:55:12 2010 (r215434) @@ -411,25 +411,30 @@ protopr(u_long off, const char *name, in if (Lflag) printf("%-5.5s %-14.14s %-22.22s\n", "Proto", "Listen", "Local Address"); - else { + if (Tflag) + printf((Aflag && !Wflag) ? + "%-5.5s %-6.6s %-6.6s %-6.6s %-18.18s %s\n" : + "%-5.5s %-6.6s %-6.6s %-6.6s %-22.22s %s\n", + "Proto", "Rexmit", "OOORcv", "0-win", + "Local Address", "Foreign Address"); + if (xflag) { + printf("%-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s ", + "R-MBUF", "S-MBUF", "R-CLUS", + "S-CLUS", "R-HIWA", "S-HIWA", + "R-LOWA", "S-LOWA", "R-BCNT", + "S-BCNT", "R-BMAX", "S-BMAX"); + printf("%7.7s %7.7s %7.7s %7.7s %7.7s %7.7s %s\n", + "rexmt", "persist", "keep", + "2msl", "delack", "rcvtime", + "(state)"); + } + if (!xflag && !Tflag) printf((Aflag && !Wflag) ? "%-5.5s %-6.6s %-6.6s %-18.18s %-18.18s" : "%-5.5s %-6.6s %-6.6s %-22.22s %-22.22s", "Proto", "Recv-Q", "Send-Q", "Local Address", "Foreign Address"); - if (xflag) { - printf("%-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s %-6.6s ", - "R-MBUF", "S-MBUF", "R-CLUS", - "S-CLUS", "R-HIWA", "S-HIWA", - "R-LOWA", "S-LOWA", "R-BCNT", - "S-BCNT", "R-BMAX", "S-BMAX"); - printf("%7.7s %7.7s %7.7s %7.7s %7.7s %7.7s %s\n", - "rexmt", "persist", "keep", - "2msl", "delack", "rcvtime", - "(state)"); - } else - printf("(state)\n"); - } + first = 0; } if (Lflag && so->so_qlimit == 0) @@ -455,6 +460,10 @@ protopr(u_long off, const char *name, in snprintf(buf1, 15, "%d/%d/%d", so->so_qlen, so->so_incqlen, so->so_qlimit); printf("%-14.14s ", buf1); + } else if (Tflag) { + if (istcp) + printf("%6u %6u %6u ", tp->t_sndrexmitpack, + tp->t_rcvoopack, tp->t_sndzerowin); } else { printf("%6u %6u ", so->so_rcv.sb_cc, so->so_snd.sb_cc); } @@ -540,7 +549,7 @@ protopr(u_long off, const char *name, in timer->t_rcvtime / 1000, (timer->t_rcvtime % 1000) / 10); } } - if (istcp && !Lflag) { + if (istcp && !Lflag && !xflag && !Tflag) { if (tp->t_state < 0 || tp->t_state >= TCP_NSTATES) printf("%d", tp->t_state); else { Modified: head/usr.bin/netstat/main.c ============================================================================== --- head/usr.bin/netstat/main.c Wed Nov 17 18:21:29 2010 (r215433) +++ head/usr.bin/netstat/main.c Wed Nov 17 18:55:12 2010 (r215434) @@ -342,6 +342,7 @@ int Qflag; /* show netisr information * int rflag; /* show routing tables (or routing stats) */ int sflag; /* show protocol statistics */ int Wflag; /* wide display */ +int Tflag; /* TCP Information */ int xflag; /* extra information, includes all socket buffer info */ int zflag; /* zero stats */ @@ -361,7 +362,7 @@ main(int argc, char *argv[]) af = AF_UNSPEC; - while ((ch = getopt(argc, argv, "AaBbdf:ghI:iLlM:mN:np:Qq:rSsuWw:xz")) + while ((ch = getopt(argc, argv, "AaBbdf:ghI:iLlM:mN:np:Qq:rSTsuWw:xz")) != -1) switch(ch) { case 'A': @@ -476,6 +477,9 @@ main(int argc, char *argv[]) interval = atoi(optarg); iflag = 1; break; + case 'T': + Tflag = 1; + break; case 'x': xflag = 1; break; @@ -515,6 +519,9 @@ main(int argc, char *argv[]) if (!live) setgid(getgid()); + if (xflag && Tflag) + errx(1, "-x and -T are incompatible, pick one."); + if (Bflag) { if (!live) usage(); @@ -794,7 +801,7 @@ static void usage(void) { (void)fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n", -"usage: netstat [-AaLnSWx] [-f protocol_family | -p protocol]\n" +"usage: netstat [-AaLnSTWx] [-f protocol_family | -p protocol]\n" " [-M core] [-N system]", " netstat -i | -I interface [-abdhnW] [-f address_family]\n" " [-M core] [-N system]", Modified: head/usr.bin/netstat/netstat.1 ============================================================================== --- head/usr.bin/netstat/netstat.1 Wed Nov 17 18:21:29 2010 (r215433) +++ head/usr.bin/netstat/netstat.1 Wed Nov 17 18:55:12 2010 (r215434) @@ -49,7 +49,7 @@ depending on the options for the informa .It Xo .Bk -words .Nm -.Op Fl AaLnSWx +.Op Fl AaLnSTWx .Op Fl f Ar protocol_family | Fl p Ar protocol .Op Fl M Ar core .Op Fl N Ar system @@ -88,6 +88,10 @@ but show ports symbolically. If .Fl x is present, display socket buffer and tcp timer statistics for each internet socket. +When +.Fl T +is present, display information from the TCP control block, including +retransmits, out-of-order packets received, and zero-sized windows advertised. .It Xo .Bk -words .Nm Modified: head/usr.bin/netstat/netstat.h ============================================================================== --- head/usr.bin/netstat/netstat.h Wed Nov 17 18:21:29 2010 (r215433) +++ head/usr.bin/netstat/netstat.h Wed Nov 17 18:55:12 2010 (r215434) @@ -50,6 +50,7 @@ extern int numeric_addr; /* show address extern int numeric_port; /* show ports numerically */ extern int rflag; /* show routing tables (or routing stats) */ extern int sflag; /* show protocol statistics */ +extern int Tflag; /* show TCP control block info */ extern int Wflag; /* wide display */ extern int xflag; /* extended display, includes all socket buffer info */ extern int zflag; /* zero stats */ From owner-svn-src-head@FreeBSD.ORG Wed Nov 17 19:25:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F5841065782; Wed, 17 Nov 2010 19:25:38 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1EA308FC16; Wed, 17 Nov 2010 19:25:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAHJPcUS001779; Wed, 17 Nov 2010 19:25:38 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHJPcUS001777; Wed, 17 Nov 2010 19:25:38 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201011171925.oAHJPcUS001777@svn.freebsd.org> From: Andreas Tobler Date: Wed, 17 Nov 2010 19:25:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215435 - head/sys/boot/powerpc/ofw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 19:25:38 -0000 Author: andreast Date: Wed Nov 17 19:25:37 2010 New Revision: 215435 URL: http://svn.freebsd.org/changeset/base/215435 Log: Load the full 16k stack space. Approved by: nwhitehorn (mentor) Modified: head/sys/boot/powerpc/ofw/start.c Modified: head/sys/boot/powerpc/ofw/start.c ============================================================================== --- head/sys/boot/powerpc/ofw/start.c Wed Nov 17 18:55:12 2010 (r215434) +++ head/sys/boot/powerpc/ofw/start.c Wed Nov 17 19:25:37 2010 (r215435) @@ -48,7 +48,7 @@ stack: \n\ _start: \n\ lis %r1,stack@ha \n\ addi %r1,%r1,stack@l \n\ - addi %r1,%r1,8192 \n\ + addi %r1,%r1,16384 \n\ \n\ b startup \n\ "); From owner-svn-src-head@FreeBSD.ORG Wed Nov 17 19:28:49 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B4AD1065672; Wed, 17 Nov 2010 19:28:49 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A7068FC1C; Wed, 17 Nov 2010 19:28:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAHJSnAf001882; Wed, 17 Nov 2010 19:28:49 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHJSnao001880; Wed, 17 Nov 2010 19:28:49 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201011171928.oAHJSnao001880@svn.freebsd.org> From: Andreas Tobler Date: Wed, 17 Nov 2010 19:28:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215436 - head/sys/boot/powerpc/ofw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 19:28:49 -0000 Author: andreast Date: Wed Nov 17 19:28:48 2010 New Revision: 215436 URL: http://svn.freebsd.org/changeset/base/215436 Log: Make sure the .bss is cleared at the beginning. The pSeries OF ELF loader does not clear .bss automatically. Approved by: nwhitehorn (mentor) Modified: head/sys/boot/powerpc/ofw/start.c Modified: head/sys/boot/powerpc/ofw/start.c ============================================================================== --- head/sys/boot/powerpc/ofw/start.c Wed Nov 17 19:25:37 2010 (r215435) +++ head/sys/boot/powerpc/ofw/start.c Wed Nov 17 19:28:48 2010 (r215436) @@ -50,7 +50,20 @@ _start: \n\ addi %r1,%r1,stack@l \n\ addi %r1,%r1,16384 \n\ \n\ - b startup \n\ + /* Clear the .bss!!! */ \n\ + li %r0,0 \n\ + lis %r8,_edata@ha \n\ + addi %r8,%r8,_edata@l\n\ + lis %r9,_end@ha \n\ + addi %r9,%r9,_end@l \n\ + \n\ +1: cmpw 0,%r8,%r9 \n\ + bge 2f \n\ + stw %r0,0(%r8) \n\ + addi %r8,%r8,4 \n\ + b 1b \n\ + \n\ +2: b startup \n\ "); void From owner-svn-src-head@FreeBSD.ORG Wed Nov 17 19:31:49 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 524E2106566B; Wed, 17 Nov 2010 19:31:49 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 419168FC0A; Wed, 17 Nov 2010 19:31:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAHJVnd0002002; Wed, 17 Nov 2010 19:31:49 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHJVn0s002000; Wed, 17 Nov 2010 19:31:49 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201011171931.oAHJVn0s002000@svn.freebsd.org> From: Andreas Tobler Date: Wed, 17 Nov 2010 19:31:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215437 - head/sys/boot/ofw/libofw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 19:31:49 -0000 Author: andreast Date: Wed Nov 17 19:31:48 2010 New Revision: 215437 URL: http://svn.freebsd.org/changeset/base/215437 Log: Move the declaration of the eh struct (used only when debugging is enabled) from ofwn_put into the debug section. Approved by: nwhitehorn (mentor) Modified: head/sys/boot/ofw/libofw/ofw_net.c Modified: head/sys/boot/ofw/libofw/ofw_net.c ============================================================================== --- head/sys/boot/ofw/libofw/ofw_net.c Wed Nov 17 19:28:48 2010 (r215436) +++ head/sys/boot/ofw/libofw/ofw_net.c Wed Nov 17 19:31:48 2010 (r215437) @@ -90,11 +90,11 @@ ofwn_probe(struct netif *nif, void *mach static int ofwn_put(struct iodesc *desc, void *pkt, size_t len) { - struct ether_header *eh; size_t sendlen; ssize_t rv; #if defined(NETIF_DEBUG) + struct ether_header *eh; printf("netif_put: desc=0x%x pkt=0x%x len=%d\n", desc, pkt, len); eh = pkt; printf("dst: %s ", ether_sprintf(eh->ether_dhost)); From owner-svn-src-head@FreeBSD.ORG Wed Nov 17 19:35:56 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A96810656A6; Wed, 17 Nov 2010 19:35:56 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 606E58FC23; Wed, 17 Nov 2010 19:35:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAHJZud7002142; Wed, 17 Nov 2010 19:35:56 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHJZuW4002138; Wed, 17 Nov 2010 19:35:56 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201011171935.oAHJZuW4002138@svn.freebsd.org> From: Andreas Tobler Date: Wed, 17 Nov 2010 19:35:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215438 - head/sys/boot/ofw/libofw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 19:35:56 -0000 Author: andreast Date: Wed Nov 17 19:35:56 2010 New Revision: 215438 URL: http://svn.freebsd.org/changeset/base/215438 Log: Check the real-mode? OF property to find out whether we operate in real or virtual mode. In virtual mode we have to do memory mapping. On PowerMacs it is usually false while on pSeries we have found that it is true. The real-mode? property is not available on sparc64. Approved by: nwhitehorn (mentor) Modified: head/sys/boot/ofw/libofw/ofw_copy.c head/sys/boot/ofw/libofw/openfirm.c head/sys/boot/ofw/libofw/openfirm.h Modified: head/sys/boot/ofw/libofw/ofw_copy.c ============================================================================== --- head/sys/boot/ofw/libofw/ofw_copy.c Wed Nov 17 19:31:48 2010 (r215437) +++ head/sys/boot/ofw/libofw/ofw_copy.c Wed Nov 17 19:35:56 2010 (r215438) @@ -91,16 +91,22 @@ ofw_mapmem(vm_offset_t dest, const size_ return (ENOMEM); } - if (OF_call_method("claim", mmu, 3, 1, destp, dlen, 0, &addr) == -1) { - printf("ofw_mapmem: virtual claim failed\n"); - return (ENOMEM); - } - - if (OF_call_method("map", mmu, 4, 0, destp, destp, dlen, 0) == -1) { - printf("ofw_mapmem: map failed\n"); - return (ENOMEM); - } + /* + * We only do virtual memory management when real_mode is false. + */ + if (real_mode == 0) { + if (OF_call_method("claim", mmu, 3, 1, destp, dlen, 0, &addr) + == -1) { + printf("ofw_mapmem: virtual claim failed\n"); + return (ENOMEM); + } + if (OF_call_method("map", mmu, 4, 0, destp, destp, dlen, 0) + == -1) { + printf("ofw_mapmem: map failed\n"); + return (ENOMEM); + } + } last_dest = (vm_offset_t) destp; last_len = dlen; Modified: head/sys/boot/ofw/libofw/openfirm.c ============================================================================== --- head/sys/boot/ofw/libofw/openfirm.c Wed Nov 17 19:31:48 2010 (r215437) +++ head/sys/boot/ofw/libofw/openfirm.c Wed Nov 17 19:35:56 2010 (r215438) @@ -69,12 +69,15 @@ int (*openfirmware)(void *); phandle_t chosen; ihandle_t mmu; ihandle_t memory; +int real_mode = 0; /* Initialiser */ void OF_init(int (*openfirm)(void *)) { + phandle_t options; + char mode[8]; openfirmware = openfirm; @@ -89,6 +92,15 @@ OF_init(int (*openfirm)(void *)) } if (OF_getprop(chosen, "mmu", &mmu, sizeof(mmu)) == -1) OF_exit(); + + /* + * Check if we run in real mode. If so, we do not need to map + * memory later on. + */ + options = OF_finddevice("/options"); + OF_getprop(options, "real-mode?", mode, sizeof(mode)); + if (strncmp(mode, "true", 4) == 0) + real_mode = 1; } /* Modified: head/sys/boot/ofw/libofw/openfirm.h ============================================================================== --- head/sys/boot/ofw/libofw/openfirm.h Wed Nov 17 19:31:48 2010 (r215437) +++ head/sys/boot/ofw/libofw/openfirm.h Wed Nov 17 19:35:56 2010 (r215438) @@ -72,6 +72,7 @@ typedef unsigned long int cell_t; extern int (*openfirmware)(void *); extern phandle_t chosen; extern ihandle_t memory, mmu; +extern int real_mode; /* * This isn't actually an Open Firmware function, but it seemed like the right From owner-svn-src-head@FreeBSD.ORG Wed Nov 17 19:42:44 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EC4D106564A; Wed, 17 Nov 2010 19:42:44 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 062DA8FC08; Wed, 17 Nov 2010 19:42:42 +0000 (UTC) Received: by qwi4 with SMTP id 4so222456qwi.13 for ; Wed, 17 Nov 2010 11:42:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=xHy8DAs+cO8XgaHHDR2gs4f+WeKgFXDJLZ75UcfX+Sw=; b=OPu+kOtkSCi2qLsVhRXcRiyjFjCKuiO3A5Uk0jjg4eASvL/bojSjqKYzmqJADK+GFe 45B58GbIEZz3jsTrPb8NGa1jEgSEkHTCQMa3CUvIH4C6k2mILJ2B4b7vfKXXaP84KPCL xj7WnUZ5qrVaOrg2dl7bcu5b4ODKqi9IsKBPI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=XJUTrWpvoBf0StLdRDtCgYSaf3UariLDv1cp0jgmETgSwI54pzgBV7wHjQIgTbFnzP sbQDaSur5KtUPc/NMKO8k7DGdb0WiNk1tbf6Q00hLrJ3sNF2wnFcvIcImnL6aiqns5CZ ourqn0tmjkRtnvIqJIWU/MyrF4x3DDk+WtyPg= Received: by 10.229.212.5 with SMTP id gq5mr7728946qcb.275.1290022961505; Wed, 17 Nov 2010 11:42:41 -0800 (PST) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.229.231.143 with HTTP; Wed, 17 Nov 2010 11:42:01 -0800 (PST) In-Reply-To: <20101117175901.GA9012@freebsd.org> References: <201011171512.oAHFCAg5095095@svn.freebsd.org> <20101117175901.GA9012@freebsd.org> From: Ivan Voras Date: Wed, 17 Nov 2010 20:42:01 +0100 X-Google-Sender-Auth: x2abwMi7irqBz8Ebw7fYf9mbLCk Message-ID: To: Alexander Best Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215425 - head/usr.sbin/iostat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 19:42:44 -0000 On 17 November 2010 18:59, Alexander Best wrote: > On Wed Nov 17 10, Ivan Voras wrote: >> Author: ivoras >> Date: Wed Nov 17 15:12:10 2010 >> New Revision: 215425 >> URL: http://svn.freebsd.org/changeset/base/215425 >> >> Log: >> =C2=A0 Change "wait" banner to "qlen" to be more indicative of its purpo= se and to >> =C2=A0 be more inline with what gstat uses. > > any thoughts on this manual page change? Looks reasonable. From owner-svn-src-head@FreeBSD.ORG Wed Nov 17 19:54:02 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22B2A10656A9; Wed, 17 Nov 2010 19:54:02 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 117938FC27; Wed, 17 Nov 2010 19:54:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAHJs18Z002527; Wed, 17 Nov 2010 19:54:01 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHJs1pt002524; Wed, 17 Nov 2010 19:54:01 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201011171954.oAHJs1pt002524@svn.freebsd.org> From: Tijl Coosemans Date: Wed, 17 Nov 2010 19:54:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215439 - in head/gnu/usr.bin: binutils/ld cc/cc_tools X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 19:54:02 -0000 Author: tijl Date: Wed Nov 17 19:54:01 2010 New Revision: 215439 URL: http://svn.freebsd.org/changeset/base/215439 Log: Let gcc and ld know where to find 32 bit libraries on amd64. Reviewed by: arch@ Approved by: kib (mentor) Modified: head/gnu/usr.bin/binutils/ld/Makefile.amd64 head/gnu/usr.bin/cc/cc_tools/Makefile Modified: head/gnu/usr.bin/binutils/ld/Makefile.amd64 ============================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile.amd64 Wed Nov 17 19:35:56 2010 (r215438) +++ head/gnu/usr.bin/binutils/ld/Makefile.amd64 Wed Nov 17 19:54:01 2010 (r215439) @@ -12,7 +12,7 @@ e${NATIVE_EMULATION}.c: emulparams/${NAT ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} X86_EMULATION= elf_i386_fbsd -_i386_path= \"${TOOLS_PREFIX}/usr/lib/i386\" +_i386_path= \"${TOOLS_PREFIX}/usr/lib32\" EMS+= ${X86_EMULATION} .for ext in ${ELF_SCR_EXT} LDSCRIPTS+= ${X86_EMULATION}.${ext} Modified: head/gnu/usr.bin/cc/cc_tools/Makefile ============================================================================== --- head/gnu/usr.bin/cc/cc_tools/Makefile Wed Nov 17 19:35:56 2010 (r215438) +++ head/gnu/usr.bin/cc/cc_tools/Makefile Wed Nov 17 19:54:01 2010 (r215439) @@ -307,7 +307,7 @@ GENSRCS+= gcov-iov.h # Multilib config file multilib.h: -.if ${TARGET_ARCH} == "powerpc64" +.if ${TARGET_ARCH} == "powerpc64" || ${TARGET_ARCH} == "amd64" echo 'static const char *const multilib_raw[] = { \ ". !m64 !m32;", \ "64:../lib m64 !m32;", \ From owner-svn-src-head@FreeBSD.ORG Wed Nov 17 20:37:17 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 119C91065673; Wed, 17 Nov 2010 20:37:17 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 006D58FC13; Wed, 17 Nov 2010 20:37:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAHKbGCE003636; Wed, 17 Nov 2010 20:37:16 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHKbGGD003634; Wed, 17 Nov 2010 20:37:16 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201011172037.oAHKbGGD003634@svn.freebsd.org> From: Andreas Tobler Date: Wed, 17 Nov 2010 20:37:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215441 - head/sys/boot/powerpc/ofw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 20:37:17 -0000 Author: andreast Date: Wed Nov 17 20:37:16 2010 New Revision: 215441 URL: http://svn.freebsd.org/changeset/base/215441 Log: Revert r215435. We need to figure out the exact value to be loaded. Approved by: nwhitehorn (mentor) Modified: head/sys/boot/powerpc/ofw/start.c Modified: head/sys/boot/powerpc/ofw/start.c ============================================================================== --- head/sys/boot/powerpc/ofw/start.c Wed Nov 17 20:21:10 2010 (r215440) +++ head/sys/boot/powerpc/ofw/start.c Wed Nov 17 20:37:16 2010 (r215441) @@ -48,7 +48,7 @@ stack: \n\ _start: \n\ lis %r1,stack@ha \n\ addi %r1,%r1,stack@l \n\ - addi %r1,%r1,16384 \n\ + addi %r1,%r1,8192 \n\ \n\ /* Clear the .bss!!! */ \n\ li %r0,0 \n\ From owner-svn-src-head@FreeBSD.ORG Wed Nov 17 22:03:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBB851065673; Wed, 17 Nov 2010 22:03:10 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from vps.hungerhost.com (vps.hungerhost.com [216.38.53.176]) by mx1.freebsd.org (Postfix) with ESMTP id 94CC58FC26; Wed, 17 Nov 2010 22:03:10 +0000 (UTC) Received: from smtp.hudson-trading.com ([209.249.190.9] helo=gnnmac.hudson-trading.com) by vps.hungerhost.com with esmtpa (Exim 4.69) (envelope-from ) id 1PInPu-0001R1-Ts; Wed, 17 Nov 2010 14:11:38 -0500 Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: George Neville-Neil In-Reply-To: <201011171855.oAHItD95001085@svn.freebsd.org> Date: Wed, 17 Nov 2010 14:11:36 -0500 Content-Transfer-Encoding: 7bit Message-Id: <252070B4-8939-4C10-A5B2-09615B1A597E@neville-neil.com> References: <201011171855.oAHItD95001085@svn.freebsd.org> To: George V. Neville-Neil X-Mailer: Apple Mail (2.1082) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [0 0] X-AntiAbuse: Sender Address Domain - neville-neil.com X-Source: X-Source-Args: X-Source-Dir: Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215434 - in head: sys/netinet usr.bin/netstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 22:03:10 -0000 On Nov 17, 2010, at 13:55 , George V. Neville-Neil wrote: > Author: gnn > Date: Wed Nov 17 18:55:12 2010 > New Revision: 215434 > URL: http://svn.freebsd.org/changeset/base/215434 > > Log: > Add new, per connection, statistics for TCP, including: > Retransmitted Packets > Zero Window Advertisements > Out of Order Receives > > These statistics are available via the -T argument to > netstat(1). > MFC after: 2 weeks > One quick note, I forgot to point out: Submitted by: jhb@ Apologies to John. Best, George From owner-svn-src-head@FreeBSD.ORG Wed Nov 17 22:28:04 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF95C1065672; Wed, 17 Nov 2010 22:28:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BDD918FC08; Wed, 17 Nov 2010 22:28:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAHMS4MA006144; Wed, 17 Nov 2010 22:28:04 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAHMS4PV006140; Wed, 17 Nov 2010 22:28:04 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201011172228.oAHMS4PV006140@svn.freebsd.org> From: John Baldwin Date: Wed, 17 Nov 2010 22:28:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215443 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2010 22:28:04 -0000 Author: jhb Date: Wed Nov 17 22:28:04 2010 New Revision: 215443 URL: http://svn.freebsd.org/changeset/base/215443 Log: Add a resource_list_reserved() method that returns true if a resource list entry contains a reserved resource. Modified: head/sys/kern/subr_bus.c head/sys/sys/bus.h Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Wed Nov 17 21:45:11 2010 (r215442) +++ head/sys/kern/subr_bus.c Wed Nov 17 22:28:04 2010 (r215443) @@ -2934,6 +2934,30 @@ resource_list_busy(struct resource_list } /** + * @brief Determine if a resource entry is reserved. + * + * Returns true if a resource entry is reserved meaning that it has an + * associated "reserved" resource. The resource can either be + * allocated or unallocated. + * + * @param rl the resource list to search + * @param type the resource entry type (e.g. SYS_RES_MEMORY) + * @param rid the resource identifier + * + * @returns Non-zero if the entry is reserved, zero otherwise. + */ +int +resource_list_reserved(struct resource_list *rl, int type, int rid) +{ + struct resource_list_entry *rle; + + rle = resource_list_find(rl, type, rid); + if (rle != NULL && rle->flags & RLE_RESERVED) + return (1); + return (0); +} + +/** * @brief Find a resource entry by type and rid. * * @param rl the resource list to search Modified: head/sys/sys/bus.h ============================================================================== --- head/sys/sys/bus.h Wed Nov 17 21:45:11 2010 (r215442) +++ head/sys/sys/bus.h Wed Nov 17 22:28:04 2010 (r215443) @@ -256,6 +256,7 @@ int resource_list_add_next(struct resour u_long start, u_long end, u_long count); int resource_list_busy(struct resource_list *rl, int type, int rid); +int resource_list_reserved(struct resource_list *rl, int type, int rid); struct resource_list_entry* resource_list_find(struct resource_list *rl, int type, int rid); From owner-svn-src-head@FreeBSD.ORG Thu Nov 18 08:03:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94FD01065695; Thu, 18 Nov 2010 08:03:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 82F1C8FC18; Thu, 18 Nov 2010 08:03:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAI83eIe018654; Thu, 18 Nov 2010 08:03:40 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAI83e5q018652; Thu, 18 Nov 2010 08:03:40 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201011180803.oAI83e5q018652@svn.freebsd.org> From: Alexander Motin Date: Thu, 18 Nov 2010 08:03:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215449 - head/sys/dev/ata/chipsets X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 08:03:40 -0000 Author: mav Date: Thu Nov 18 08:03:40 2010 New Revision: 215449 URL: http://svn.freebsd.org/changeset/base/215449 Log: Some VIA SATA controllers provide access to non-standard SATA registers via PCI config space. Use them to implement hot-plug and link speed reporting. Tested on ASRock PV530 board with VX900 chipset. Modified: head/sys/dev/ata/chipsets/ata-via.c Modified: head/sys/dev/ata/chipsets/ata-via.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-via.c Thu Nov 18 02:16:06 2010 (r215448) +++ head/sys/dev/ata/chipsets/ata-via.c Thu Nov 18 08:03:40 2010 (r215449) @@ -63,6 +63,12 @@ static int ata_via_new_setmode(device_t static int ata_via_sata_ch_attach(device_t dev); static int ata_via_sata_getrev(device_t dev, int target); static int ata_via_sata_setmode(device_t dev, int target, int mode); +static void ata_via_sata_reset(device_t dev); +static int ata_via_sata_scr_read(device_t dev, int port, int reg, + u_int32_t *result); +static int ata_via_sata_scr_write(device_t dev, int port, int reg, + u_int32_t value); +static int ata_via_sata_status(device_t dev); /* misc defines */ #define VIA33 0 @@ -153,11 +159,12 @@ ata_via_chipinit(device_t dev) if (ata_ahci_chipinit(dev) != ENXIO) return (0); } - /* 2 SATA without SATA registers on first channel + 1 PATA on second */ + /* 2 SATA with "SATA registers" at PCI config space + PATA on secondary */ if (ctlr->chip->cfg2 & VIASATA) { ctlr->ch_attach = ata_via_sata_ch_attach; ctlr->setmode = ata_via_sata_setmode; ctlr->getrev = ata_via_sata_getrev; + ctlr->reset = ata_via_sata_reset; return 0; } /* Legacy SATA/SATA+PATA with SATA registers in BAR(5). */ @@ -405,18 +412,30 @@ ata_via_sata_ch_attach(device_t dev) if (ata_pci_ch_attach(dev)) return ENXIO; - if (ch->unit == 0) + if (ch->unit == 0) { + ch->hw.status = ata_via_sata_status; + ch->hw.pm_read = ata_via_sata_scr_read; + ch->hw.pm_write = ata_via_sata_scr_write; + ch->flags |= ATA_PERIODIC_POLL; ch->flags |= ATA_SATA; + ata_sata_scr_write(ch, 0, ATA_SERROR, 0xffffffff); + ata_sata_scr_write(ch, 1, ATA_SERROR, 0xffffffff); + } return (0); } static int ata_via_sata_getrev(device_t dev, int target) { + device_t parent = device_get_parent(dev); struct ata_channel *ch = device_get_softc(dev); - if (ch->unit == 0) - return (1); + if (ch->unit == 0) { + if (pci_read_config(parent, 0xa0 + target, 1) & 0x10) + return (2); + else + return (1); + } return (0); } @@ -430,5 +449,110 @@ ata_via_sata_setmode(device_t dev, int t return (ata_via_old_setmode(dev, target, mode)); } +static void +ata_via_sata_reset(device_t dev) +{ + struct ata_channel *ch = device_get_softc(dev); + int devs; + + if (ch->unit == 0) { + devs = ata_sata_phy_reset(dev, 0, 0); + DELAY(10000); + devs += ata_sata_phy_reset(dev, 1, 0); + } else + devs = 1; + if (devs) + ata_generic_reset(dev); +} + +static int +ata_via_sata_scr_read(device_t dev, int port, int reg, u_int32_t *result) +{ + struct ata_channel *ch; + device_t parent; + uint32_t val; + + parent = device_get_parent(dev); + ch = device_get_softc(dev); + port = (port == 1) ? 1 : 0; + switch (reg) { + case ATA_SSTATUS: + val = pci_read_config(parent, 0xa0 + port, 1); + *result = val & 0x03; + if (*result != ATA_SS_DET_NO_DEVICE) { + if (val & 0x04) + *result |= ATA_SS_IPM_PARTIAL; + else if (val & 0x08) + *result |= ATA_SS_IPM_SLUMBER; + else + *result |= ATA_SS_IPM_ACTIVE; + if (val & 0x10) + *result |= ATA_SS_SPD_GEN2; + else + *result |= ATA_SS_SPD_GEN1; + } + break; + case ATA_SERROR: + *result = pci_read_config(parent, 0xa8 + port * 4, 4); + break; + case ATA_SCONTROL: + val = pci_read_config(parent, 0xa4 + port, 1); + *result = 0; + if (val & 0x01) + *result |= ATA_SC_DET_RESET; + if (val & 0x02) + *result |= ATA_SC_DET_DISABLE; + if (val & 0x04) + *result |= ATA_SC_IPM_DIS_PARTIAL; + if (val & 0x08) + *result |= ATA_SC_IPM_DIS_SLUMBER; + break; + default: + return (EINVAL); + } + return (0); +} + +static int +ata_via_sata_scr_write(device_t dev, int port, int reg, u_int32_t value) +{ + struct ata_channel *ch; + device_t parent; + uint32_t val; + + parent = device_get_parent(dev); + ch = device_get_softc(dev); + port = (port == 1) ? 1 : 0; + switch (reg) { + case ATA_SERROR: + pci_write_config(parent, 0xa8 + port * 4, value, 4); + break; + case ATA_SCONTROL: + val = 0; + if (value & ATA_SC_DET_RESET) + val |= 0x01; + if (value & ATA_SC_DET_DISABLE) + val |= 0x02; + if (value & ATA_SC_IPM_DIS_PARTIAL) + val |= 0x04; + if (value & ATA_SC_IPM_DIS_SLUMBER) + val |= 0x08; + pci_write_config(parent, 0xa4 + port, val, 1); + break; + default: + return (EINVAL); + } + return (0); +} + +static int +ata_via_sata_status(device_t dev) +{ + + ata_sata_phy_check_events(dev, 0); + ata_sata_phy_check_events(dev, 1); + return (ata_pci_status(dev)); +} + ATA_DECLARE_DRIVER(ata_via); MODULE_DEPEND(ata_via, ata_ahci, 1, 1, 1); From owner-svn-src-head@FreeBSD.ORG Thu Nov 18 08:32:48 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E5D21065674; Thu, 18 Nov 2010 08:32:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F02608FC16; Thu, 18 Nov 2010 08:32:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAI8WlaE019409; Thu, 18 Nov 2010 08:32:47 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAI8Wldn019407; Thu, 18 Nov 2010 08:32:47 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201011180832.oAI8Wldn019407@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 18 Nov 2010 08:32:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215450 - head/lib/libusb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 08:32:48 -0000 Author: hselasky Date: Thu Nov 18 08:32:47 2010 New Revision: 215450 URL: http://svn.freebsd.org/changeset/base/215450 Log: Correct description of the return values of the LibUSB v1.0 libusb_control_transfer() function. PR: usb/151851 Submitted by: HIROSHI OOTA Approved by: thompsa (mentor) Modified: head/lib/libusb/libusb.3 Modified: head/lib/libusb/libusb.3 ============================================================================== --- head/lib/libusb/libusb.3 Thu Nov 18 08:03:40 2010 (r215449) +++ head/lib/libusb/libusb.3 Thu Nov 18 08:32:47 2010 (r215450) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 14, 2010 +.Dd November 18, 2010 .Dt LIBUSB 3 .Os .Sh NAME @@ -380,10 +380,15 @@ LIBUSB_ERROR code on failure. .Pp .Ft int .Fn libusb_control_transfer "libusb_device_handle *devh" "uint8_t bmRequestType" "uint8_t bRequest" "uint16_t wValue" "uint16_t wIndex" "unsigned char *data" "uint16_t wLength" "unsigned int timeout" -Perform a USB control transfer. Returns 0 on success, LIBUSB_ERROR_TIMEOUT -if the transfer timeout, LIBUSB_ERROR_PIPE if the control request was not -supported, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and -LIBUSB_ERROR code on other failure. +Perform a USB control transfer. Returns the actual number of bytes +transferred on success in the range from and including zero until and +including +.Xa wLength . +On error a libusb error code is returned, for example +LIBUSB_ERROR_TIMEOUT if the transfer timeout, LIBUSB_ERROR_PIPE if the +control request was not supported, LIBUSB_ERROR_NO_DEVICE if the +device has been disconnected or another LIBUSB_ERROR code on other failures. +The libusb error codes are always negative. . .Pp .Ft int From owner-svn-src-head@FreeBSD.ORG Thu Nov 18 10:34:19 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38BEF1065670; Thu, 18 Nov 2010 10:34:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2799D8FC1B; Thu, 18 Nov 2010 10:34:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAIAYJIo022379; Thu, 18 Nov 2010 10:34:19 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIAYJxI022377; Thu, 18 Nov 2010 10:34:19 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201011181034.oAIAYJxI022377@svn.freebsd.org> From: Alexander Motin Date: Thu, 18 Nov 2010 10:34:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215451 - head/sys/dev/ata/chipsets X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 10:34:19 -0000 Author: mav Date: Thu Nov 18 10:34:18 2010 New Revision: 215451 URL: http://svn.freebsd.org/changeset/base/215451 Log: Record that there is no devices if SATA reset found none. Modified: head/sys/dev/ata/chipsets/ata-via.c Modified: head/sys/dev/ata/chipsets/ata-via.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-via.c Thu Nov 18 08:32:47 2010 (r215450) +++ head/sys/dev/ata/chipsets/ata-via.c Thu Nov 18 10:34:18 2010 (r215451) @@ -463,6 +463,8 @@ ata_via_sata_reset(device_t dev) devs = 1; if (devs) ata_generic_reset(dev); + else + ch->devices = 0; } static int From owner-svn-src-head@FreeBSD.ORG Thu Nov 18 11:58:17 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 581FB106564A; Thu, 18 Nov 2010 11:58:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4790D8FC08; Thu, 18 Nov 2010 11:58:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAIBwHCP029527; Thu, 18 Nov 2010 11:58:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIBwHpA029525; Thu, 18 Nov 2010 11:58:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201011181158.oAIBwHpA029525@svn.freebsd.org> From: Alexander Motin Date: Thu, 18 Nov 2010 11:58:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215453 - head/sys/dev/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 11:58:17 -0000 Author: mav Date: Thu Nov 18 11:58:17 2010 New Revision: 215453 URL: http://svn.freebsd.org/changeset/base/215453 Log: Even if we are skipping SATA hard reset - set power management bits in SControl register. This should make things consistent and help to avoid unexpected PHY events that I've noticed in some cases on VIA controllers. Modified: head/sys/dev/ata/ata-sata.c Modified: head/sys/dev/ata/ata-sata.c ============================================================================== --- head/sys/dev/ata/ata-sata.c Thu Nov 18 11:19:23 2010 (r215452) +++ head/sys/dev/ata/ata-sata.c Thu Nov 18 11:58:17 2010 (r215453) @@ -153,8 +153,12 @@ ata_sata_phy_reset(device_t dev, int por if (quick) { if (ata_sata_scr_read(ch, port, ATA_SCONTROL, &val)) return (0); - if ((val & ATA_SC_DET_MASK) == ATA_SC_DET_IDLE) + if ((val & ATA_SC_DET_MASK) == ATA_SC_DET_IDLE) { + ata_sata_scr_write(ch, port, ATA_SCONTROL, + ATA_SC_DET_IDLE | ((ch->pm_level > 0) ? 0 : + ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER)); return ata_sata_connect(ch, port, quick); + } } if (bootverbose) { From owner-svn-src-head@FreeBSD.ORG Thu Nov 18 13:25:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 055011065694; Thu, 18 Nov 2010 13:25:08 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 9CD598FC18; Thu, 18 Nov 2010 13:25:07 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id E30D745C9C; Thu, 18 Nov 2010 14:25:05 +0100 (CET) Received: from localhost (pdawidek.whl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 6B25E45C89; Thu, 18 Nov 2010 14:25:00 +0100 (CET) Date: Thu, 18 Nov 2010 14:24:17 +0100 From: Pawel Jakub Dawidek To: Konstantin Belousov Message-ID: <20101118132417.GA2011@garage.freebsd.pl> References: <201011171617.oAHGHFSW097106@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LZvS9be/3tNcYl/X" Content-Disposition: inline In-Reply-To: <201011171617.oAHGHFSW097106@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT amd64 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=4.5 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215427 - head/sys/crypto/aesni X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 13:25:08 -0000 --LZvS9be/3tNcYl/X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 17, 2010 at 04:17:15PM +0000, Konstantin Belousov wrote: > Author: kib > Date: Wed Nov 17 16:17:15 2010 > New Revision: 215427 > URL: http://svn.freebsd.org/changeset/base/215427 >=20 > Log: > Only save FPU context when not executing in the context of the crypto > thread. Is this just performance improvement or some kind of a bug fix? --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --LZvS9be/3tNcYl/X Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkzlKQEACgkQForvXbEpPzS2xQCdEb+4nWJRxB0FP2Qow3MIgW0d R6kAoJ02PCovMohRA++LuJF82asPWPg8 =9To7 -----END PGP SIGNATURE----- --LZvS9be/3tNcYl/X-- From owner-svn-src-head@FreeBSD.ORG Thu Nov 18 13:38:34 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 510271065696; Thu, 18 Nov 2010 13:38:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3FF998FC16; Thu, 18 Nov 2010 13:38:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAIDcYDc034218; Thu, 18 Nov 2010 13:38:34 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIDcYwL034216; Thu, 18 Nov 2010 13:38:34 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201011181338.oAIDcYwL034216@svn.freebsd.org> From: Alexander Motin Date: Thu, 18 Nov 2010 13:38:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215454 - head/sys/cam/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 13:38:34 -0000 Author: mav Date: Thu Nov 18 13:38:33 2010 New Revision: 215454 URL: http://svn.freebsd.org/changeset/base/215454 Log: If HBA doesn't report user-enabled SATA capabilies (like ATA_CAM wrapper) - handle all of them as disabled. This was original cause of the problem, workarounded by r215453. MFC after: 1 week Modified: head/sys/cam/ata/ata_xpt.c Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Thu Nov 18 11:58:17 2010 (r215453) +++ head/sys/cam/ata/ata_xpt.c Thu Nov 18 13:38:33 2010 (r215454) @@ -963,6 +963,8 @@ noerror: xpt_action((union ccb *)&cts); if (cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) caps &= cts.xport_specific.sata.caps; + else + caps = 0; /* Store result to SIM. */ bzero(&cts, sizeof(cts)); xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); @@ -1103,6 +1105,8 @@ notsata: xpt_action((union ccb *)&cts); if (cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) caps &= cts.xport_specific.sata.caps; + else + caps = 0; /* Store result to SIM. */ bzero(&cts, sizeof(cts)); xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); From owner-svn-src-head@FreeBSD.ORG Thu Nov 18 14:17:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC04B106566B; Thu, 18 Nov 2010 14:17:32 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 22C528FC19; Thu, 18 Nov 2010 14:17:31 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id oAIEHSZW048433 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Nov 2010 16:17:28 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id oAIEHReB022003; Thu, 18 Nov 2010 16:17:27 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id oAIEHRik022002; Thu, 18 Nov 2010 16:17:27 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 18 Nov 2010 16:17:27 +0200 From: Kostik Belousov To: Pawel Jakub Dawidek Message-ID: <20101118141727.GG2392@deviant.kiev.zoral.com.ua> References: <201011171617.oAHGHFSW097106@svn.freebsd.org> <20101118132417.GA2011@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PDiuv7PNAHapHaHA" Content-Disposition: inline In-Reply-To: <20101118132417.GA2011@garage.freebsd.pl> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215427 - head/sys/crypto/aesni X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 14:17:32 -0000 --PDiuv7PNAHapHaHA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 18, 2010 at 02:24:17PM +0100, Pawel Jakub Dawidek wrote: > On Wed, Nov 17, 2010 at 04:17:15PM +0000, Konstantin Belousov wrote: > > Author: kib > > Date: Wed Nov 17 16:17:15 2010 > > New Revision: 215427 > > URL: http://svn.freebsd.org/changeset/base/215427 > >=20 > > Log: > > Only save FPU context when not executing in the context of the crypto > > thread. >=20 > Is this just performance improvement or some kind of a bug fix? Only performance improvement. --PDiuv7PNAHapHaHA Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAkzlNXcACgkQC3+MBN1Mb4jMUwCguVzFKUkqtRxBSXM6oX7bfLsF gwkAoMWUtJk7ozmiuxzEqXzLDVzV30fH =qeS1 -----END PGP SIGNATURE----- --PDiuv7PNAHapHaHA-- From owner-svn-src-head@FreeBSD.ORG Thu Nov 18 16:32:53 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 549561065695; Thu, 18 Nov 2010 16:32:53 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 455E78FC17; Thu, 18 Nov 2010 16:32:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAIGWru0038081; Thu, 18 Nov 2010 16:32:53 GMT (envelope-from markm@svn.freebsd.org) Received: (from markm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIGWrje038078; Thu, 18 Nov 2010 16:32:53 GMT (envelope-from markm@svn.freebsd.org) Message-Id: <201011181632.oAIGWrje038078@svn.freebsd.org> From: Mark Murray Date: Thu, 18 Nov 2010 16:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215455 - in head: . cddl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 16:32:53 -0000 Author: markm Date: Thu Nov 18 16:32:52 2010 New Revision: 215455 URL: http://svn.freebsd.org/changeset/base/215455 Log: Do not lint code beyond necessity (with apologies to Wiliam of Ockham). Don't lint externally maintained CDDL code, or relint the 32-bit libraries in amd64 mode. Modified: head/Makefile.inc1 head/cddl/Makefile.inc Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Nov 18 13:38:33 2010 (r215454) +++ head/Makefile.inc1 Thu Nov 18 16:32:52 2010 (r215455) @@ -322,7 +322,7 @@ LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${OBJTR LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \ -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO \ - -DWITHOUT_HTML -DNO_CTF DESTDIR=${LIB32TMP} + -DWITHOUT_HTML -DNO_CTF -DNO_LINT DESTDIR=${LIB32TMP} LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*} -DNO_INCS .endif Modified: head/cddl/Makefile.inc ============================================================================== --- head/cddl/Makefile.inc Thu Nov 18 13:38:33 2010 (r215454) +++ head/cddl/Makefile.inc Thu Nov 18 16:32:52 2010 (r215455) @@ -9,3 +9,8 @@ CFLAGS+= -DNEED_SOLARIS_BOOLEAN WARNS?= 6 CSTD?= gnu89 + +# Do not lint the CDDL stuff. It is all externally maintained and +# lint output is wasteful noise here. + +NO_LINT= From owner-svn-src-head@FreeBSD.ORG Thu Nov 18 17:58:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A68871065672; Thu, 18 Nov 2010 17:58:59 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 97F428FC15; Thu, 18 Nov 2010 17:58:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAIHwxKc040175; Thu, 18 Nov 2010 17:58:59 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIHwxkS040173; Thu, 18 Nov 2010 17:58:59 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201011181758.oAIHwxkS040173@svn.freebsd.org> From: Marius Strobl Date: Thu, 18 Nov 2010 17:58:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215459 - head/sys/dev/mii X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 17:58:59 -0000 Author: marius Date: Thu Nov 18 17:58:59 2010 New Revision: 215459 URL: http://svn.freebsd.org/changeset/base/215459 Log: Fix a bug introduced with r215298; when atphy_reset() is called from atphy_attach() the current media has not been set, yet, leading to a NULL-dereference in atphy_setmedia(). Submitted by: jkim (initial version) Modified: head/sys/dev/mii/atphy.c Modified: head/sys/dev/mii/atphy.c ============================================================================== --- head/sys/dev/mii/atphy.c Thu Nov 18 17:50:23 2010 (r215458) +++ head/sys/dev/mii/atphy.c Thu Nov 18 17:58:59 2010 (r215459) @@ -317,6 +317,7 @@ atphy_status(struct mii_softc *sc) static void atphy_reset(struct mii_softc *sc) { + struct ifmedia_entry *ife = sc->mii_pdata->mii_media.ifm_cur; struct atphy_softc *asc; uint32_t reg; int i; @@ -339,7 +340,7 @@ atphy_reset(struct mii_softc *sc) PHY_WRITE(sc, ATPHY_SCR, reg); /* Workaround F1 bug to reset phy. */ - atphy_setmedia(sc, sc->mii_pdata->mii_media.ifm_cur->ifm_media); + atphy_setmedia(sc, ife == NULL ? IFM_AUTO : ife->ifm_media); for (i = 0; i < 1000; i++) { DELAY(1); From owner-svn-src-head@FreeBSD.ORG Thu Nov 18 18:09:26 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29578106566C; Thu, 18 Nov 2010 18:09:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1AF108FC1C; Thu, 18 Nov 2010 18:09:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAII9Pb5040537; Thu, 18 Nov 2010 18:09:25 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAII9Ph1040535; Thu, 18 Nov 2010 18:09:25 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201011181809.oAII9Ph1040535@svn.freebsd.org> From: Alexander Motin Date: Thu, 18 Nov 2010 18:09:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215462 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 18:09:26 -0000 Author: mav Date: Thu Nov 18 18:09:25 2010 New Revision: 215462 URL: http://svn.freebsd.org/changeset/base/215462 Log: Add VIA VX900 to the list of supported chipsets. Modified: head/share/man/man4/ata.4 Modified: head/share/man/man4/ata.4 ============================================================================== --- head/share/man/man4/ata.4 Thu Nov 18 18:05:59 2010 (r215461) +++ head/share/man/man4/ata.4 Thu Nov 18 18:09:25 2010 (r215462) @@ -183,7 +183,7 @@ SIS963, SIS964, SIS965. .It VIA: VT6410, VT6420, VT6421, VT82C586, VT82C586B, VT82C596, VT82C596B, VT82C686, VT82C686A, VT82C686B, VT8231, VT8233, VT8233A, VT8233C, VT8235, VT8237, -VT8237A, VT8237S, VT8251, CX700, VX800, VX855. +VT8237A, VT8237S, VT8251, CX700, VX800, VX855, VX900. .El .Pp Unknown ATA chipsets are supported in PIO modes, and if the standard From owner-svn-src-head@FreeBSD.ORG Thu Nov 18 18:22:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1F811065673; Thu, 18 Nov 2010 18:22:58 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A37358FC0A; Thu, 18 Nov 2010 18:22:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAIIMwck040855; Thu, 18 Nov 2010 18:22:58 GMT (envelope-from markm@svn.freebsd.org) Received: (from markm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIIMwwk040852; Thu, 18 Nov 2010 18:22:58 GMT (envelope-from markm@svn.freebsd.org) Message-Id: <201011181822.oAIIMwwk040852@svn.freebsd.org> From: Mark Murray Date: Thu, 18 Nov 2010 18:22:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215463 - head/contrib/ipfilter/man X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 18:22:58 -0000 Author: markm Date: Thu Nov 18 18:22:58 2010 New Revision: 215463 URL: http://svn.freebsd.org/changeset/base/215463 Log: Fix paths for example files. Modified: head/contrib/ipfilter/man/ipnat.8 head/contrib/ipfilter/man/mkfilters.1 Modified: head/contrib/ipfilter/man/ipnat.8 ============================================================================== --- head/contrib/ipfilter/man/ipnat.8 Thu Nov 18 18:09:25 2010 (r215462) +++ head/contrib/ipfilter/man/ipnat.8 Thu Nov 18 18:22:58 2010 (r215463) @@ -66,6 +66,6 @@ and active rules/table entries. .SH FILES /dev/ipnat .br -/usr/share/examples/ipf Directory with examples. +/usr/share/examples/ipfilter Directory with examples. .SH SEE ALSO ipnat(5), ipf(8), ipfstat(8) Modified: head/contrib/ipfilter/man/mkfilters.1 ============================================================================== --- head/contrib/ipfilter/man/mkfilters.1 Thu Nov 18 18:09:25 2010 (r215462) +++ head/contrib/ipfilter/man/mkfilters.1 Thu Nov 18 18:22:58 2010 (r215463) @@ -6,7 +6,7 @@ mkfilters \- generate a minimal firewall .SH SYNOPSIS .B mkfilters .SH FILES -/usr/share/examples/ipf/mkfilters +/usr/share/examples/ipfilter/mkfilters .SH DESCRIPTION .PP \fBmkfilters\fP is a perl script that generates a minimal filter rule set for From owner-svn-src-head@FreeBSD.ORG Thu Nov 18 19:28:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E359106566C; Thu, 18 Nov 2010 19:28:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 25F4F8FC0A; Thu, 18 Nov 2010 19:28:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAIJSkGd042656; Thu, 18 Nov 2010 19:28:46 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIJSkBE042653; Thu, 18 Nov 2010 19:28:46 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201011181928.oAIJSkBE042653@svn.freebsd.org> From: Alexander Motin Date: Thu, 18 Nov 2010 19:28:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215468 - head/sys/dev/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 19:28:46 -0000 Author: mav Date: Thu Nov 18 19:28:45 2010 New Revision: 215468 URL: http://svn.freebsd.org/changeset/base/215468 Log: Make ATA_CAM wrapper to report SATA power management capabilities to CAM to make it configure device to initiate transitions if controller configured to accept them. This makes hint.ata.X.pm_level=1 mode working. Modified: head/sys/dev/ata/ata-all.c head/sys/dev/ata/ata-all.h Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Thu Nov 18 19:08:56 2010 (r215467) +++ head/sys/dev/ata/ata-all.c Thu Nov 18 19:28:45 2010 (r215468) @@ -171,7 +171,12 @@ ata_attach(device_t dev) ch->user[i].bytecount = 8192; else ch->user[i].bytecount = MAXPHYS; + ch->user[i].caps = 0; ch->curr[i] = ch->user[i]; + if (ch->pm_level > 0) + ch->user[i].caps |= CTS_SATA_CAPS_H_PMREQ; + if (ch->pm_level > 1) + ch->user[i].caps |= CTS_SATA_CAPS_D_PMREQ; } #endif callout_init(&ch->poll_callout, 1); @@ -1627,6 +1632,8 @@ ataaction(struct cam_sim *sim, union ccb d->bytecount = min(8192, cts->xport_specific.sata.bytecount); if (cts->xport_specific.sata.valid & CTS_SATA_VALID_ATAPI) d->atapi = cts->xport_specific.sata.atapi; + if (cts->xport_specific.sata.valid & CTS_SATA_VALID_CAPS) + d->caps = cts->xport_specific.sata.caps; } else { if (cts->xport_specific.ata.valid & CTS_ATA_VALID_MODE) { if (cts->type == CTS_TYPE_CURRENT_SETTINGS) { @@ -1672,9 +1679,21 @@ ataaction(struct cam_sim *sim, union ccb cts->xport_specific.sata.valid |= CTS_SATA_VALID_REVISION; } + cts->xport_specific.sata.caps = + d->caps & CTS_SATA_CAPS_D; + if (ch->pm_level) { + cts->xport_specific.sata.caps |= + CTS_SATA_CAPS_H_PMREQ; + } + cts->xport_specific.sata.caps &= + ch->user[ccb->ccb_h.target_id].caps; + cts->xport_specific.sata.valid |= + CTS_SATA_VALID_CAPS; } else { cts->xport_specific.sata.revision = d->revision; cts->xport_specific.sata.valid |= CTS_SATA_VALID_REVISION; + cts->xport_specific.sata.caps = d->caps; + cts->xport_specific.sata.valid |= CTS_SATA_VALID_CAPS; } cts->xport_specific.sata.atapi = d->atapi; cts->xport_specific.sata.valid |= CTS_SATA_VALID_ATAPI; Modified: head/sys/dev/ata/ata-all.h ============================================================================== --- head/sys/dev/ata/ata-all.h Thu Nov 18 19:08:56 2010 (r215467) +++ head/sys/dev/ata/ata-all.h Thu Nov 18 19:28:45 2010 (r215468) @@ -535,6 +535,7 @@ struct ata_cam_device { int mode; u_int bytecount; u_int atapi; + u_int caps; }; #endif From owner-svn-src-head@FreeBSD.ORG Thu Nov 18 20:46:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45EA9106564A; Thu, 18 Nov 2010 20:46:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 388B68FC12; Thu, 18 Nov 2010 20:46:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAIKkTFx044374; Thu, 18 Nov 2010 20:46:29 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIKkTUe044371; Thu, 18 Nov 2010 20:46:29 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201011182046.oAIKkTUe044371@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 18 Nov 2010 20:46:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215469 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 20:46:29 -0000 Author: kib Date: Thu Nov 18 20:46:28 2010 New Revision: 215469 URL: http://svn.freebsd.org/changeset/base/215469 Log: Only increment object generation count when inserting the page into object page list. The only use of object generation count now is a restart of the scan in vm_object_page_clean(), which makes sense to do on the page addition. Page removals do not affect the dirtiness of the object, as well as manipulations with the shadow chain. Suggested and reviewed by: alc MFC after: 1 week Modified: head/sys/vm/vm_object.c head/sys/vm/vm_page.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Thu Nov 18 19:28:45 2010 (r215468) +++ head/sys/vm/vm_object.c Thu Nov 18 20:46:28 2010 (r215469) @@ -600,7 +600,6 @@ doterm: VM_OBJECT_LOCK(temp); LIST_REMOVE(object, shadow_list); temp->shadow_count--; - temp->generation++; VM_OBJECT_UNLOCK(temp); object->backing_object = NULL; } @@ -1192,7 +1191,6 @@ vm_object_shadow( VM_OBJECT_LOCK(source); LIST_INSERT_HEAD(&source->shadow_head, result, shadow_list); source->shadow_count++; - source->generation++; #if VM_NRESERVLEVEL > 0 result->flags |= source->flags & OBJ_COLORED; result->pg_color = (source->pg_color + OFF_TO_IDX(*offset)) & @@ -1260,7 +1258,6 @@ vm_object_split(vm_map_entry_t entry) LIST_INSERT_HEAD(&source->shadow_head, new_object, shadow_list); source->shadow_count++; - source->generation++; vm_object_reference_locked(source); /* for new_object */ vm_object_clear_flag(source, OBJ_ONEMAPPING); VM_OBJECT_UNLOCK(source); @@ -1651,7 +1648,6 @@ vm_object_collapse(vm_object_t object) */ LIST_REMOVE(object, shadow_list); backing_object->shadow_count--; - backing_object->generation++; if (backing_object->backing_object) { VM_OBJECT_LOCK(backing_object->backing_object); LIST_REMOVE(backing_object, shadow_list); @@ -1661,7 +1657,6 @@ vm_object_collapse(vm_object_t object) /* * The shadow_count has not changed. */ - backing_object->backing_object->generation++; VM_OBJECT_UNLOCK(backing_object->backing_object); } object->backing_object = backing_object->backing_object; @@ -1703,7 +1698,6 @@ vm_object_collapse(vm_object_t object) */ LIST_REMOVE(object, shadow_list); backing_object->shadow_count--; - backing_object->generation++; new_backing_object = backing_object->backing_object; if ((object->backing_object = new_backing_object) != NULL) { @@ -1714,7 +1708,6 @@ vm_object_collapse(vm_object_t object) shadow_list ); new_backing_object->shadow_count++; - new_backing_object->generation++; vm_object_reference_locked(new_backing_object); VM_OBJECT_UNLOCK(new_backing_object); object->backing_object_offset += Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Thu Nov 18 19:28:45 2010 (r215468) +++ head/sys/vm/vm_page.c Thu Nov 18 20:46:28 2010 (r215469) @@ -846,7 +846,6 @@ vm_page_remove(vm_page_t m) * And show that the object has one fewer resident page. */ object->resident_page_count--; - object->generation++; /* * The vnode may now be recycled. */ @@ -1983,7 +1982,6 @@ vm_page_cache(vm_page_t m) object->root = root; TAILQ_REMOVE(&object->memq, m, listq); object->resident_page_count--; - object->generation++; /* * Restore the default memory attribute to the page. @@ -2395,7 +2393,6 @@ vm_page_set_invalid(vm_page_t m, int bas ("vm_page_set_invalid: page %p is mapped", m)); m->valid &= ~bits; m->dirty &= ~bits; - m->object->generation++; } /* From owner-svn-src-head@FreeBSD.ORG Thu Nov 18 21:02:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 904EF106567A; Thu, 18 Nov 2010 21:02:40 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 830668FC0A; Thu, 18 Nov 2010 21:02:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAIL2eat044889; Thu, 18 Nov 2010 21:02:40 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIL2enA044887; Thu, 18 Nov 2010 21:02:40 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201011182102.oAIL2enA044887@svn.freebsd.org> From: Colin Percival Date: Thu, 18 Nov 2010 21:02:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215470 - head/sys/i386/xen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 21:02:40 -0000 Author: cperciva Date: Thu Nov 18 21:02:40 2010 New Revision: 215470 URL: http://svn.freebsd.org/changeset/base/215470 Log: Don't KASSERT in pmap_release that xpmap_ptom(VM_PAGE_TO_PHYS(m)) == (pmap->pm_pdpt[i] & PG_FRAME) for i = NPGPTD, since pmap->pm_pdpt[i] is only initialized for 0 <= i < NPGPTD. This fixes an inevitable panic with XEN && PAE && INVARIANTS when pmap_release is called (e.g., when /sbin/init is launched). Modified: head/sys/i386/xen/pmap.c Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Thu Nov 18 20:46:28 2010 (r215469) +++ head/sys/i386/xen/pmap.c Thu Nov 18 21:02:40 2010 (r215470) @@ -1877,8 +1877,9 @@ pmap_release(pmap_t pmap) /* unpinning L1 and L2 treated the same */ xen_pgd_unpin(ma); #ifdef PAE - KASSERT(xpmap_ptom(VM_PAGE_TO_PHYS(m)) == (pmap->pm_pdpt[i] & PG_FRAME), - ("pmap_release: got wrong ptd page")); + if (i < NPGPTD) + KASSERT(xpmap_ptom(VM_PAGE_TO_PHYS(m)) == (pmap->pm_pdpt[i] & PG_FRAME), + ("pmap_release: got wrong ptd page")); #endif m->wire_count--; atomic_subtract_int(&cnt.v_wire_count, 1); From owner-svn-src-head@FreeBSD.ORG Thu Nov 18 21:09:02 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 757161065673; Thu, 18 Nov 2010 21:09:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6809F8FC1B; Thu, 18 Nov 2010 21:09:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAIL92Of045041; Thu, 18 Nov 2010 21:09:02 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIL92lb045036; Thu, 18 Nov 2010 21:09:02 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201011182109.oAIL92lb045036@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 18 Nov 2010 21:09:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215471 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 21:09:02 -0000 Author: kib Date: Thu Nov 18 21:09:02 2010 New Revision: 215471 URL: http://svn.freebsd.org/changeset/base/215471 Log: vm_pageout_flush() might cache the pages that finished write to the backing storage. Such pages might be then reused, racing with the assert in vm_object_page_collect_flush() that verified that dirty pages from the run (most likely, pages with VM_PAGER_AGAIN status) are write-protected still. In fact, the page indexes for the pages that were removed from the object page list should be ignored by vm_object_page_clean(). Return the length of successfully written run from vm_pageout_flush(), that is, the count of pages between requested page and first page after requested with status VM_PAGER_AGAIN. Supply the requested page index in the array to vm_pageout_flush(). Use the returned run length to forward the index of next page to clean in vm_object_page_clean(). Reported by: avg Reviewed by: alc MFC after: 1 week Modified: head/sys/vm/vm_contig.c head/sys/vm/vm_object.c head/sys/vm/vm_pageout.c head/sys/vm/vm_pageout.h Modified: head/sys/vm/vm_contig.c ============================================================================== --- head/sys/vm/vm_contig.c Thu Nov 18 21:02:40 2010 (r215470) +++ head/sys/vm/vm_contig.c Thu Nov 18 21:09:02 2010 (r215471) @@ -140,7 +140,7 @@ vm_contig_launder_page(vm_page_t m, vm_p object->type == OBJT_DEFAULT) { vm_page_unlock_queues(); m_tmp = m; - vm_pageout_flush(&m_tmp, 1, VM_PAGER_PUT_SYNC); + vm_pageout_flush(&m_tmp, 1, VM_PAGER_PUT_SYNC, 0, NULL); VM_OBJECT_UNLOCK(object); vm_page_lock_queues(); return (0); Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Thu Nov 18 21:02:40 2010 (r215470) +++ head/sys/vm/vm_object.c Thu Nov 18 21:09:02 2010 (r215471) @@ -884,30 +884,9 @@ vm_object_page_collect_flush(vm_object_t index = (maxb + i) + 1; ma[index] = maf[i]; } - runlen = maxb + maxf + 1; - vm_pageout_flush(ma, runlen, pagerflags); - for (i = 0; i < runlen; i++) { - if (ma[i]->dirty != 0) { - KASSERT((ma[i]->flags & PG_WRITEABLE) == 0, - ("vm_object_page_collect_flush: page %p is not write protected", - ma[i])); - } - } - for (i = 0; i < maxf; i++) { - if (ma[i + maxb + 1]->dirty != 0) { - /* - * maxf will end up being the actual number of pages - * we wrote out contiguously, non-inclusive of the - * first page. We do not count look-behind pages. - */ - if (maxf > i) { - maxf = i; - break; - } - } - } - return (maxf + 1); + vm_pageout_flush(ma, maxb + maxf + 1, pagerflags, maxb + 1, &runlen); + return (runlen); } /* Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Thu Nov 18 21:02:40 2010 (r215470) +++ head/sys/vm/vm_pageout.c Thu Nov 18 21:09:02 2010 (r215471) @@ -438,7 +438,7 @@ more: /* * we allow reads during pageouts... */ - return (vm_pageout_flush(&mc[page_base], pageout_count, 0)); + return (vm_pageout_flush(&mc[page_base], pageout_count, 0, 0, NULL)); } /* @@ -449,14 +449,17 @@ more: * reference count all in here rather then in the parent. If we want * the parent to do more sophisticated things we may have to change * the ordering. + * + * Returned runlen is the count of pages between mreq and first + * page after mreq with status VM_PAGER_AGAIN. */ int -vm_pageout_flush(vm_page_t *mc, int count, int flags) +vm_pageout_flush(vm_page_t *mc, int count, int flags, int mreq, int *prunlen) { vm_object_t object = mc[0]->object; int pageout_status[count]; int numpagedout = 0; - int i; + int i, runlen; VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); mtx_assert(&vm_page_queue_mtx, MA_NOTOWNED); @@ -482,6 +485,7 @@ vm_pageout_flush(vm_page_t *mc, int coun vm_pager_put_pages(object, mc, count, flags, pageout_status); + runlen = count - mreq; for (i = 0; i < count; i++) { vm_page_t mt = mc[i]; @@ -513,6 +517,8 @@ vm_pageout_flush(vm_page_t *mc, int coun vm_page_unlock(mt); break; case VM_PAGER_AGAIN: + if (i >= mreq && i - mreq < runlen) + runlen = i - mreq; break; } @@ -532,6 +538,8 @@ vm_pageout_flush(vm_page_t *mc, int coun } } } + if (prunlen != NULL) + *prunlen = runlen; return (numpagedout); } Modified: head/sys/vm/vm_pageout.h ============================================================================== --- head/sys/vm/vm_pageout.h Thu Nov 18 21:02:40 2010 (r215470) +++ head/sys/vm/vm_pageout.h Thu Nov 18 21:09:02 2010 (r215471) @@ -102,7 +102,7 @@ extern void vm_waitpfault(void); #ifdef _KERNEL boolean_t vm_pageout_fallback_object_lock(vm_page_t, vm_page_t *); -int vm_pageout_flush(vm_page_t *, int, int); +int vm_pageout_flush(vm_page_t *, int, int, int, int *); void vm_pageout_oom(int shortage); boolean_t vm_pageout_page_lock(vm_page_t, vm_page_t *); void vm_contig_grow_cache(int, vm_paddr_t, vm_paddr_t); From owner-svn-src-head@FreeBSD.ORG Thu Nov 18 21:29:43 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70B6A106566C; Thu, 18 Nov 2010 21:29:43 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 63B638FC15; Thu, 18 Nov 2010 21:29:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAILTh80045514; Thu, 18 Nov 2010 21:29:43 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAILThtO045512; Thu, 18 Nov 2010 21:29:43 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201011182129.oAILThtO045512@svn.freebsd.org> From: Colin Percival Date: Thu, 18 Nov 2010 21:29:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215472 - head/sys/i386/xen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 21:29:43 -0000 Author: cperciva Date: Thu Nov 18 21:29:43 2010 New Revision: 215472 URL: http://svn.freebsd.org/changeset/base/215472 Log: Make pmap_release match pmap_pinit by invoking pmap_qremove(pmap->pm_pdpt) to match pmap_pinit's pmap_qenter(pmap->pm_pdpt) call in the case of PAE. Modified: head/sys/i386/xen/pmap.c Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Thu Nov 18 21:09:02 2010 (r215471) +++ head/sys/i386/xen/pmap.c Thu Nov 18 21:29:43 2010 (r215472) @@ -1885,6 +1885,9 @@ pmap_release(pmap_t pmap) atomic_subtract_int(&cnt.v_wire_count, 1); vm_page_free(m); } +#ifdef PAE + pmap_qremove((vm_offset_t)pmap->pm_pdpt, 1); +#endif PMAP_LOCK_DESTROY(pmap); } From owner-svn-src-head@FreeBSD.ORG Thu Nov 18 22:17:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8B3E106566C; Thu, 18 Nov 2010 22:17:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A062A8FC0A; Thu, 18 Nov 2010 22:17:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAIMHKOs046695; Thu, 18 Nov 2010 22:17:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIMHKSa046692; Thu, 18 Nov 2010 22:17:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201011182217.oAIMHKSa046692@svn.freebsd.org> From: John Baldwin Date: Thu, 18 Nov 2010 22:17:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215473 - in head/sys/dev: acpica atkbdc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 22:17:20 -0000 Author: jhb Date: Thu Nov 18 22:17:20 2010 New Revision: 215473 URL: http://svn.freebsd.org/changeset/base/215473 Log: Various small typos and grammar nits in comments. Modified: head/sys/dev/acpica/acpi_hpet.c head/sys/dev/atkbdc/psm.c Modified: head/sys/dev/acpica/acpi_hpet.c ============================================================================== --- head/sys/dev/acpica/acpi_hpet.c Thu Nov 18 21:29:43 2010 (r215472) +++ head/sys/dev/acpica/acpi_hpet.c Thu Nov 18 22:17:20 2010 (r215473) @@ -501,7 +501,7 @@ hpet_attach(device_t dev) /* * Neither QEMU nor VirtualBox report supported IRQs correctly. * The only way to use HPET there is to specify IRQs manually - * and/or use legacy_route. Legacy_route mode work on both. + * and/or use legacy_route. Legacy_route mode works on both. */ if (vm_guest) sc->allowed_irqs = 0x00000000; @@ -591,7 +591,7 @@ hpet_attach(device_t dev) bus_write_4(sc->mem_res, HPET_ISR, 0xffffffff); sc->irq = -1; sc->intr_rid = -1; - /* If at least one timer needs legacy IRQ - setup it. */ + /* If at least one timer needs legacy IRQ - set it up. */ if (sc->useirq) { j = i = fls(cvectors) - 1; while (j > 0 && (cvectors & (1 << (j - 1))) != 0) Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Thu Nov 18 21:29:43 2010 (r215472) +++ head/sys/dev/atkbdc/psm.c Thu Nov 18 22:17:20 2010 (r215473) @@ -1214,12 +1214,12 @@ psmprobe(device_t dev) * be that this is only the case when the controller DOES have the aux * port but the port is not wired on the motherboard.) The keyboard * controllers without the port, such as the original AT, are - * supporsed to return with an error code or simply time out. In any + * supposed to return with an error code or simply time out. In any * case, we have to continue probing the port even when the controller * passes this test. * * XXX: some controllers erroneously return the error code 1, 2 or 3 - * when it has the perfectly functional aux port. We have to ignore + * when it has a perfectly functional aux port. We have to ignore * this error code. Even if the controller HAS error with the aux * port, it will be detected later... * XXX: another incompatible controller returns PSM_ACK (0xfa)... @@ -1250,7 +1250,7 @@ psmprobe(device_t dev) if (sc->config & PSM_CONFIG_NORESET) { /* * Don't try to reset the pointing device. It may possibly be - * left in the unknown state, though... + * left in an unknown state, though... */ } else { /* @@ -1277,7 +1277,7 @@ psmprobe(device_t dev) } /* - * both the aux port and the aux device is functioning, see if the + * both the aux port and the aux device are functioning, see if the * device can be enabled. NOTE: when enabled, the device will start * sending data; we shall immediately disable the device once we know * the device can be enabled. From owner-svn-src-head@FreeBSD.ORG Thu Nov 18 23:46:55 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F113310656A9; Thu, 18 Nov 2010 23:46:55 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E20048FC20; Thu, 18 Nov 2010 23:46:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAINktPH048840; Thu, 18 Nov 2010 23:46:55 GMT (envelope-from rstone@svn.freebsd.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAINktwl048838; Thu, 18 Nov 2010 23:46:55 GMT (envelope-from rstone@svn.freebsd.org) Message-Id: <201011182346.oAINktwl048838@svn.freebsd.org> From: Ryan Stone Date: Thu, 18 Nov 2010 23:46:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215474 - head/usr.bin/netstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 23:46:56 -0000 Author: rstone Date: Thu Nov 18 23:46:55 2010 New Revision: 215474 URL: http://svn.freebsd.org/changeset/base/215474 Log: When netstat was run with -i/-I and -w1 to produce running counters, the idrop field printed an absolute value rather than the delta from the last value Approved by: emaste (mentor) MFC after: 1 week Modified: head/usr.bin/netstat/if.c Modified: head/usr.bin/netstat/if.c ============================================================================== --- head/usr.bin/netstat/if.c Thu Nov 18 22:17:20 2010 (r215473) +++ head/usr.bin/netstat/if.c Thu Nov 18 23:46:55 2010 (r215474) @@ -627,6 +627,7 @@ loop: } ip->ift_ip = ifnet.if_ipackets; ip->ift_ie = ifnet.if_ierrors; + ip->ift_id = ifnet.if_iqdrops; ip->ift_ib = ifnet.if_ibytes; ip->ift_op = ifnet.if_opackets; ip->ift_oe = ifnet.if_oerrors; From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 03:47:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52B48106566B; Fri, 19 Nov 2010 03:47:11 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 425618FC08; Fri, 19 Nov 2010 03:47:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ3lBmQ056248; Fri, 19 Nov 2010 03:47:11 GMT (envelope-from rstone@svn.freebsd.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ3lBSx056245; Fri, 19 Nov 2010 03:47:11 GMT (envelope-from rstone@svn.freebsd.org) Message-Id: <201011190347.oAJ3lBSx056245@svn.freebsd.org> From: Ryan Stone Date: Fri, 19 Nov 2010 03:47:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215507 - head/sbin/camcontrol X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 03:47:11 -0000 Author: rstone Date: Fri Nov 19 03:47:10 2010 New Revision: 215507 URL: http://svn.freebsd.org/changeset/base/215507 Log: When doing a camcontrol rescan all or a camcontrol reset all, use the wildcard path id for enumerating the available busses. Previously camcontrol was implicitly passing 0 as the first path id, which meant that if bus 0 was not present camcontrol would fail with EINVAL instead of rescanning/resetting any busses that were present. Approved by: emaste (mentor) MFC after: 1 week Modified: head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Fri Nov 19 01:58:11 2010 (r215506) +++ head/sbin/camcontrol/camcontrol.c Fri Nov 19 03:47:10 2010 (r215507) @@ -1526,6 +1526,7 @@ rescan_or_reset_bus(int bus, int rescan) bzero(&(&matchccb.ccb_h)[1], sizeof(struct ccb_dev_match) - sizeof(struct ccb_hdr)); matchccb.ccb_h.func_code = XPT_DEV_MATCH; + matchccb.ccb_h.path_id = CAM_BUS_WILDCARD; bufsize = sizeof(struct dev_match_result) * 20; matchccb.cdm.match_buf_len = bufsize; matchccb.cdm.matches=(struct dev_match_result *)malloc(bufsize); From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 04:30:34 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1284B106566C; Fri, 19 Nov 2010 04:30:34 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 027F88FC08; Fri, 19 Nov 2010 04:30:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ4UXql057220; Fri, 19 Nov 2010 04:30:33 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ4UXaH057218; Fri, 19 Nov 2010 04:30:33 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <201011190430.oAJ4UXaH057218@svn.freebsd.org> From: Max Laier Date: Fri, 19 Nov 2010 04:30:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215508 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 04:30:34 -0000 Author: mlaier Date: Fri Nov 19 04:30:33 2010 New Revision: 215508 URL: http://svn.freebsd.org/changeset/base/215508 Log: Off by one page in vm_reserv_reclaim_contig(): Also reclaim reservations with only a single free page if that satisfies the requested size. MFC after: 3 days Reviewed by: alc Modified: head/sys/vm/vm_reserv.c Modified: head/sys/vm/vm_reserv.c ============================================================================== --- head/sys/vm/vm_reserv.c Fri Nov 19 03:47:10 2010 (r215507) +++ head/sys/vm/vm_reserv.c Fri Nov 19 04:30:33 2010 (r215508) @@ -654,7 +654,8 @@ vm_reserv_reclaim_contig(vm_paddr_t size ((pa ^ (pa + size - 1)) & ~(boundary - 1)) != 0) pa_length = 0; - } else if (pa_length >= size) { + } + if (pa_length >= size) { vm_reserv_reclaim(rv); return (TRUE); } From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 09:59:56 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4891C106566C; Fri, 19 Nov 2010 09:59:56 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 381B38FC17; Fri, 19 Nov 2010 09:59:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJ9xuFR067733; Fri, 19 Nov 2010 09:59:56 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJ9xuDV067731; Fri, 19 Nov 2010 09:59:56 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201011190959.oAJ9xuDV067731@svn.freebsd.org> From: Martin Matuska Date: Fri, 19 Nov 2010 09:59:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215515 - head/lib/liblzma X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 09:59:56 -0000 Author: mm Date: Fri Nov 19 09:59:55 2010 New Revision: 215515 URL: http://svn.freebsd.org/changeset/base/215515 Log: Remove obsoleted private symbol. Approved by: delphij (mentor) MFC after: together with 5.0.0 update Modified: head/lib/liblzma/Symbol.map Modified: head/lib/liblzma/Symbol.map ============================================================================== --- head/lib/liblzma/Symbol.map Fri Nov 19 09:59:41 2010 (r215514) +++ head/lib/liblzma/Symbol.map Fri Nov 19 09:59:55 2010 (r215515) @@ -107,7 +107,6 @@ XZprivate_1.0 { lzma_check_finish; lzma_check_init; lzma_check_update; - lzma_chunk_size; lzma_delta_coder_init; lzma_delta_coder_memusage; lzma_delta_decoder_init; From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 10:15:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D0F010656A3; Fri, 19 Nov 2010 10:15:29 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CBDE8FC12; Fri, 19 Nov 2010 10:15:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJAFTk3068815; Fri, 19 Nov 2010 10:15:29 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJAFTrn068813; Fri, 19 Nov 2010 10:15:29 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201011191015.oAJAFTrn068813@svn.freebsd.org> From: Kevin Lo Date: Fri, 19 Nov 2010 10:15:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215518 - head/usr.bin/at X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 10:15:29 -0000 Author: kevlo Date: Fri Nov 19 10:15:29 2010 New Revision: 215518 URL: http://svn.freebsd.org/changeset/base/215518 Log: Close file and directory descriptors MFC after: 3 days Modified: head/usr.bin/at/at.c Modified: head/usr.bin/at/at.c ============================================================================== --- head/usr.bin/at/at.c Fri Nov 19 10:14:07 2010 (r215517) +++ head/usr.bin/at/at.c Fri Nov 19 10:15:29 2010 (r215518) @@ -524,6 +524,7 @@ list_jobs(long *joblist, int len) jobno); } PRIV_END + closedir(spool); } static void @@ -594,6 +595,7 @@ process_jobs(int argc, char **argv, int while((ch = getc(fp)) != EOF) { putchar(ch); } + fclose(fp); } break; @@ -604,6 +606,7 @@ process_jobs(int argc, char **argv, int } } } + closedir(spool); } /* delete_jobs */ #define ATOI2(ar) ((ar)[0] - '0') * 10 + ((ar)[1] - '0'); (ar) += 2; From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 10:18:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EC53106566B; Fri, 19 Nov 2010 10:18:59 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1407A8FC16; Fri, 19 Nov 2010 10:18:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJAIwwO069130; Fri, 19 Nov 2010 10:18:58 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJAIwtP069128; Fri, 19 Nov 2010 10:18:58 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201011191018.oAJAIwtP069128@svn.freebsd.org> From: Kevin Lo Date: Fri, 19 Nov 2010 10:18:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215519 - head/usr.bin/chkey X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 10:18:59 -0000 Author: kevlo Date: Fri Nov 19 10:18:58 2010 New Revision: 215519 URL: http://svn.freebsd.org/changeset/base/215519 Log: Fix fd leak MFC after: 3 days Modified: head/usr.bin/chkey/chkey.c Modified: head/usr.bin/chkey/chkey.c ============================================================================== --- head/usr.bin/chkey/chkey.c Fri Nov 19 10:15:29 2010 (r215518) +++ head/usr.bin/chkey/chkey.c Fri Nov 19 10:18:58 2010 (r215519) @@ -203,6 +203,7 @@ main(int argc, char **argv) write(fd, &newline, sizeof(newline)) < 0) warn("%s: write", ROOTKEY); } + close(fd); } if (key_setsecret(secret) < 0) From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 12:56:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32AFE1065672; Fri, 19 Nov 2010 12:56:14 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 209E68FC19; Fri, 19 Nov 2010 12:56:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJCuEGb074489; Fri, 19 Nov 2010 12:56:14 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJCuDFH074482; Fri, 19 Nov 2010 12:56:13 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011191256.oAJCuDFH074482@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 19 Nov 2010 12:56:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215520 - in head: bin/sh share/man/man1 usr.bin/printf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 12:56:14 -0000 Author: jilles Date: Fri Nov 19 12:56:13 2010 New Revision: 215520 URL: http://svn.freebsd.org/changeset/base/215520 Log: sh: Add printf builtin. This was removed in 2001 but I think it is appropriate to add it back: * I do not want to encourage people to write fragile and non-portable echo commands by making printf much slower than echo. * Recent versions of Autoconf use it a lot. * Almost no software still wants to support systems that do not have printf(1) at all. * In many other shells printf is already a builtin. Side effect: printf is now always the builtin version (which behaves identically to /usr/bin/printf) and cannot be overridden via PATH (except via the undocumented %builtin mechanism). Code size increases about 5K on i386. Embedded folks might want to replace /usr/bin/printf with a hard link to /usr/bin/alias. Modified: head/bin/sh/Makefile head/bin/sh/builtins.def head/bin/sh/sh.1 head/share/man/man1/builtin.1 head/usr.bin/printf/printf.1 head/usr.bin/printf/printf.c Modified: head/bin/sh/Makefile ============================================================================== --- head/bin/sh/Makefile Fri Nov 19 10:18:58 2010 (r215519) +++ head/bin/sh/Makefile Fri Nov 19 12:56:13 2010 (r215520) @@ -5,7 +5,7 @@ PROG= sh INSTALLFLAGS= -S SHSRCS= alias.c arith.y arith_lex.l cd.c echo.c error.c eval.c exec.c expand.c \ histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \ - mystring.c options.c output.c parser.c redir.c show.c \ + mystring.c options.c output.c parser.c printf.c redir.c show.c \ test.c trap.c var.c GENSRCS= builtins.c init.c nodes.c syntax.c GENHDRS= builtins.h nodes.h syntax.h token.h @@ -26,7 +26,8 @@ WARNS?= 2 WFORMAT=0 .PATH: ${.CURDIR}/bltin \ - ${.CURDIR}/../test + ${.CURDIR}/../test \ + ${.CURDIR}/../../usr.bin/printf CLEANFILES+= mkinit mkinit.o mknodes mknodes.o \ mksyntax mksyntax.o Modified: head/bin/sh/builtins.def ============================================================================== --- head/bin/sh/builtins.def Fri Nov 19 10:18:58 2010 (r215519) +++ head/bin/sh/builtins.def Fri Nov 19 12:56:13 2010 (r215520) @@ -71,7 +71,7 @@ histcmd -h fc jobidcmd jobid jobscmd jobs localcmd local -#printfcmd printf +printfcmd printf pwdcmd pwd readcmd read returncmd -s return Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Fri Nov 19 10:18:58 2010 (r215519) +++ head/bin/sh/sh.1 Fri Nov 19 12:56:13 2010 (r215520) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd November 12, 2010 +.Dd November 19, 2010 .Dt SH 1 .Os .Sh NAME @@ -2049,6 +2049,9 @@ line. See the .Sx Functions subsection. +.It Ic printf +A built-in equivalent of +.Xr printf 1 . .It Ic pwd Op Fl L | P Print the path of the current directory. The built-in command may @@ -2470,6 +2473,7 @@ will return the argument. .Xr echo 1 , .Xr ed 1 , .Xr emacs 1 , +.Xr printf 1 , .Xr pwd 1 , .Xr test 1 , .Xr vi 1 , Modified: head/share/man/man1/builtin.1 ============================================================================== --- head/share/man/man1/builtin.1 Fri Nov 19 10:18:58 2010 (r215519) +++ head/share/man/man1/builtin.1 Fri Nov 19 12:56:13 2010 (r215520) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 9, 2010 +.Dd November 19, 2010 .Dt BUILTIN 1 .Os .Sh NAME @@ -99,6 +99,7 @@ .Nm onintr , .Nm popd , .Nm printenv , +.Nm printf , .Nm pushd , .Nm pwd , .Nm read , @@ -263,6 +264,7 @@ but are implemented as scripts using a b .It Ic onintr Ta \&No Ta Yes Ta \&No .It Ic popd Ta \&No Ta Yes Ta \&No .It Ic printenv Ta Yes Ta Yes Ta \&No +.It Ic printf Ta Yes Ta \&No Ta Yes .It Ic pushd Ta \&No Ta Yes Ta \&No .It Ic pwd Ta Yes Ta \&No Ta Yes .It Ic read Ta No** Ta \&No Ta Yes @@ -313,6 +315,7 @@ but are implemented as scripts using a b .Xr nice 1 , .Xr nohup 1 , .Xr printenv 1 , +.Xr printf 1 , .Xr pwd 1 , .Xr sh 1 , .Xr test 1 , Modified: head/usr.bin/printf/printf.1 ============================================================================== --- head/usr.bin/printf/printf.1 Fri Nov 19 10:18:58 2010 (r215519) +++ head/usr.bin/printf/printf.1 Fri Nov 19 12:56:13 2010 (r215520) @@ -35,7 +35,7 @@ .\" @(#)printf.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd September 5, 2010 +.Dd November 19, 2010 .Dt PRINTF 1 .Os .Sh NAME @@ -306,6 +306,13 @@ character is defined in the program's lo In no case does a non-existent or small field width cause truncation of a field; padding takes place only if the specified field width exceeds the actual width. +.Pp +Some shells may provide a builtin +.Nm +command which is similar or identical to this utility. +Consult the +.Xr builtin 1 +manual page. .Sh EXIT STATUS .Ex -std .Sh COMPATIBILITY @@ -316,7 +323,9 @@ with a digit to the .Tn ASCII code of the first character is not supported. .Sh SEE ALSO +.Xr builtin 1 , .Xr echo 1 , +.Xr sh 1 , .Xr printf 3 .Sh STANDARDS The Modified: head/usr.bin/printf/printf.c ============================================================================== --- head/usr.bin/printf/printf.c Fri Nov 19 10:18:58 2010 (r215519) +++ head/usr.bin/printf/printf.c Fri Nov 19 12:56:13 2010 (r215520) @@ -62,6 +62,7 @@ static const char rcsid[] = #define main printfcmd #include "bltin/bltin.h" #include "memalloc.h" +#include "error.h" #else #define warnx1(a, b, c) warnx(a) #define warnx2(a, b, c) warnx(a, b) @@ -90,7 +91,7 @@ static const char rcsid[] = } while (0) static int asciicode(void); -static char *doformat(char *, int *); +static char *printf_doformat(char *, int *); static int escape(char *, int, size_t *); static int getchr(void); static int getfloating(long double *, int); @@ -114,9 +115,12 @@ main(int argc, char *argv[]) int ch, chopped, end, rval; char *format, *fmt, *start; -#ifndef BUILTIN +#if !defined(BUILTIN) && !defined(SHELL) (void) setlocale(LC_NUMERIC, ""); #endif +#ifdef SHELL + optreset = 1; optind = 1; opterr = 0; /* initialize getopt */ +#endif while ((ch = getopt(argc, argv, "")) != -1) switch (ch) { case '?': @@ -132,6 +136,9 @@ main(int argc, char *argv[]) return (1); } +#ifdef SHELL + INTOFF; +#endif /* * Basic algorithm is to scan the format string for conversion * specifications -- once one is found, find out if the field @@ -154,9 +161,13 @@ main(int argc, char *argv[]) putchar('%'); fmt += 2; } else { - fmt = doformat(fmt, &rval); - if (fmt == NULL) + fmt = printf_doformat(fmt, &rval); + if (fmt == NULL) { +#ifdef SHELL + INTON; +#endif return (1); + } end = 0; } start = fmt; @@ -166,11 +177,18 @@ main(int argc, char *argv[]) if (end == 1) { warnx1("missing format character", NULL, NULL); +#ifdef SHELL + INTON; +#endif return (1); } fwrite(start, 1, fmt - start, stdout); - if (chopped || !*gargv) + if (chopped || !*gargv) { +#ifdef SHELL + INTON; +#endif return (rval); + } /* Restart at the beginning of the format string. */ fmt = format; end = 1; @@ -180,7 +198,7 @@ main(int argc, char *argv[]) static char * -doformat(char *start, int *rval) +printf_doformat(char *start, int *rval) { static const char skip1[] = "#'-+ 0"; static const char skip2[] = "0123456789"; From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 14:46:18 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28ABC106567A; Fri, 19 Nov 2010 14:46:18 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 184DF8FC16; Fri, 19 Nov 2010 14:46:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJEkHxk077332; Fri, 19 Nov 2010 14:46:17 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJEkHSi077329; Fri, 19 Nov 2010 14:46:17 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201011191446.oAJEkHSi077329@svn.freebsd.org> From: Andriy Gapon Date: Fri, 19 Nov 2010 14:46:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215522 - in head/sys: amd64/include i386/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 14:46:18 -0000 Author: avg Date: Fri Nov 19 14:46:17 2010 New Revision: 215522 URL: http://svn.freebsd.org/changeset/base/215522 Log: specialreg.h: add definition for AMD Core Performance Boost bit This bit indicates availability of the feature. MFC after: 4 days Modified: head/sys/amd64/include/specialreg.h head/sys/i386/include/specialreg.h Modified: head/sys/amd64/include/specialreg.h ============================================================================== --- head/sys/amd64/include/specialreg.h Fri Nov 19 14:26:45 2010 (r215521) +++ head/sys/amd64/include/specialreg.h Fri Nov 19 14:46:17 2010 (r215522) @@ -206,6 +206,7 @@ #define AMDPM_100MHZ_STEPS 0x00000040 #define AMDPM_HW_PSTATE 0x00000080 #define AMDPM_TSC_INVARIANT 0x00000100 +#define AMDPM_CPB 0x00000200 /* * AMD extended function 8000_0008h ecx info Modified: head/sys/i386/include/specialreg.h ============================================================================== --- head/sys/i386/include/specialreg.h Fri Nov 19 14:26:45 2010 (r215521) +++ head/sys/i386/include/specialreg.h Fri Nov 19 14:46:17 2010 (r215522) @@ -205,6 +205,7 @@ #define AMDPM_100MHZ_STEPS 0x00000040 #define AMDPM_HW_PSTATE 0x00000080 #define AMDPM_TSC_INVARIANT 0x00000100 +#define AMDPM_CPB 0x00000200 /* * AMD extended function 8000_0008h ecx info From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 15:00:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CB34106564A; Fri, 19 Nov 2010 15:00:21 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4199E8FC12; Fri, 19 Nov 2010 15:00:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJF0LQ5077796; Fri, 19 Nov 2010 15:00:21 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJF0L7w077792; Fri, 19 Nov 2010 15:00:21 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201011191500.oAJF0L7w077792@svn.freebsd.org> From: Andriy Gapon Date: Fri, 19 Nov 2010 15:00:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215523 - in head/sys: amd64/include i386/i386 i386/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 15:00:21 -0000 Author: avg Date: Fri Nov 19 15:00:20 2010 New Revision: 215523 URL: http://svn.freebsd.org/changeset/base/215523 Log: specialreg.h: add AMD-specific "Hardware Configuration Register" MSR It seems that this MSR has been available in a range of AMD processors families for quite a while now. Note1: not all AMD MSRs that are found in amd64 specialreg.h are also in the i386 version. Note2: perhaps some additional name component is needed to distinguish AMD-specific MSRs. MFC after: 5 days Modified: head/sys/amd64/include/specialreg.h head/sys/i386/i386/initcpu.c head/sys/i386/include/specialreg.h Modified: head/sys/amd64/include/specialreg.h ============================================================================== --- head/sys/amd64/include/specialreg.h Fri Nov 19 14:46:17 2010 (r215522) +++ head/sys/amd64/include/specialreg.h Fri Nov 19 15:00:20 2010 (r215523) @@ -504,6 +504,7 @@ #define MSR_PERFCTR2 0xc0010006 #define MSR_PERFCTR3 0xc0010007 #define MSR_SYSCFG 0xc0010010 +#define MSR_HWCR 0xc0010015 #define MSR_IORRBASE0 0xc0010016 #define MSR_IORRMASK0 0xc0010017 #define MSR_IORRBASE1 0xc0010018 Modified: head/sys/i386/i386/initcpu.c ============================================================================== --- head/sys/i386/i386/initcpu.c Fri Nov 19 14:46:17 2010 (r215522) +++ head/sys/i386/i386/initcpu.c Fri Nov 19 15:00:20 2010 (r215523) @@ -672,7 +672,7 @@ initializecpu(void) (cpu_id & ~0xf) == 0x670 || (cpu_id & ~0xf) == 0x680)) { u_int regs[4]; - wrmsr(0xC0010015, rdmsr(0xC0010015) & ~0x08000); + wrmsr(MSR_HWCR, rdmsr(MSR_HWCR) & ~0x08000); do_cpuid(1, regs); cpu_feature = regs[3]; } Modified: head/sys/i386/include/specialreg.h ============================================================================== --- head/sys/i386/include/specialreg.h Fri Nov 19 14:46:17 2010 (r215522) +++ head/sys/i386/include/specialreg.h Fri Nov 19 15:00:20 2010 (r215523) @@ -554,7 +554,8 @@ #define AMD_WT_ALLOC_FRE 0x10000 /* fixed (A0000-FFFFF) range enable */ /* AMD64 MSR's */ -#define MSR_EFER 0xc0000080 /* extended features */ +#define MSR_EFER 0xc0000080 /* extended features */ +#define MSR_HWCR 0xc0010015 #define MSR_K8_UCODE_UPDATE 0xc0010020 /* update microcode */ #define MSR_MC0_CTL_MASK 0xc0010044 From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 15:07:36 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C673C106566C; Fri, 19 Nov 2010 15:07:36 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B609B8FC18; Fri, 19 Nov 2010 15:07:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJF7agK077996; Fri, 19 Nov 2010 15:07:36 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJF7ai1077993; Fri, 19 Nov 2010 15:07:36 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201011191507.oAJF7ai1077993@svn.freebsd.org> From: Andriy Gapon Date: Fri, 19 Nov 2010 15:07:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215524 - in head/sys: amd64/include i386/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 15:07:36 -0000 Author: avg Date: Fri Nov 19 15:07:36 2010 New Revision: 215524 URL: http://svn.freebsd.org/changeset/base/215524 Log: specialreg.h: add definitions for MPERF/APERF pair of MSRs These MSRs can be used to determine actual (average) performance as compared to a maximum defined performance. Availability of these MSRs is indicated by bit0 in CPUID.6.ECX on both Intel and AMD processors. MFC after: 5 days Modified: head/sys/amd64/include/specialreg.h head/sys/i386/include/specialreg.h Modified: head/sys/amd64/include/specialreg.h ============================================================================== --- head/sys/amd64/include/specialreg.h Fri Nov 19 15:00:20 2010 (r215523) +++ head/sys/amd64/include/specialreg.h Fri Nov 19 15:07:36 2010 (r215524) @@ -240,6 +240,8 @@ #define MSR_BIOS_SIGN 0x08b #define MSR_PERFCTR0 0x0c1 #define MSR_PERFCTR1 0x0c2 +#define MSR_MPERF 0x0e7 +#define MSR_APERF 0x0e8 #define MSR_IA32_EXT_CONFIG 0x0ee /* Undocumented. Core Solo/Duo only */ #define MSR_MTRRcap 0x0fe #define MSR_BBL_CR_ADDR 0x116 Modified: head/sys/i386/include/specialreg.h ============================================================================== --- head/sys/i386/include/specialreg.h Fri Nov 19 15:00:20 2010 (r215523) +++ head/sys/i386/include/specialreg.h Fri Nov 19 15:07:36 2010 (r215524) @@ -246,6 +246,8 @@ #define MSR_BIOS_SIGN 0x08b #define MSR_PERFCTR0 0x0c1 #define MSR_PERFCTR1 0x0c2 +#define MSR_MPERF 0x0e7 +#define MSR_APERF 0x0e8 #define MSR_IA32_EXT_CONFIG 0x0ee /* Undocumented. Core Solo/Duo only */ #define MSR_MTRRcap 0x0fe #define MSR_BBL_CR_ADDR 0x116 From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 15:12:19 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82062106564A; Fri, 19 Nov 2010 15:12:19 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7199A8FC13; Fri, 19 Nov 2010 15:12:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJFCJbO078204; Fri, 19 Nov 2010 15:12:19 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJFCJQm078202; Fri, 19 Nov 2010 15:12:19 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201011191512.oAJFCJQm078202@svn.freebsd.org> From: Colin Percival Date: Fri, 19 Nov 2010 15:12:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215525 - head/sys/i386/xen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 15:12:19 -0000 Author: cperciva Date: Fri Nov 19 15:12:19 2010 New Revision: 215525 URL: http://svn.freebsd.org/changeset/base/215525 Log: Make pmap_release consistent with pmap_pinit with respect to unpinning pages. The pinning of NPGPTD pages is #if 0ed out in pmap_pinit (I'm not quite sure why...) and this commit adds a corresponding #if 0 in pmap_release to avoid unpinning those pages. Some versions of Xen seem to silently ignore requests to unpin pages which were never pinned in the first place, but some return an error (causing FreeBSD to panic) prior to this commit. Modified: head/sys/i386/xen/pmap.c Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Fri Nov 19 15:07:36 2010 (r215524) +++ head/sys/i386/xen/pmap.c Fri Nov 19 15:12:19 2010 (r215525) @@ -1875,7 +1875,12 @@ pmap_release(pmap_t pmap) m = ptdpg[i]; ma = xpmap_ptom(VM_PAGE_TO_PHYS(m)); /* unpinning L1 and L2 treated the same */ +#if 0 xen_pgd_unpin(ma); +#else + if (i == NPGPTD) + xen_pgd_unpin(ma); +#endif #ifdef PAE if (i < NPGPTD) KASSERT(xpmap_ptom(VM_PAGE_TO_PHYS(m)) == (pmap->pm_pdpt[i] & PG_FRAME), From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 15:21:27 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id BFA371065670; Fri, 19 Nov 2010 15:21:27 +0000 (UTC) Date: Fri, 19 Nov 2010 15:21:27 +0000 From: Alexey Dokuchaev To: Jilles Tjoelker Message-ID: <20101119152127.GA29131@FreeBSD.org> References: <201011191256.oAJCuDFH074482@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201011191256.oAJCuDFH074482@svn.freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215520 - in head: bin/sh share/man/man1 usr.bin/printf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 15:21:27 -0000 On Fri, Nov 19, 2010 at 12:56:13PM +0000, Jilles Tjoelker wrote: > I do not want to encourage people to write fragile and non-portable echo > commands by making printf much slower than echo. True. > Side effect: printf is now always the builtin version (which behaves > identically to /usr/bin/printf) and cannot be overridden via PATH (except > via the undocumented %builtin mechanism). Are there any plans to document it? ./danfe From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 15:40:00 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E87461065673; Fri, 19 Nov 2010 15:39:59 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D80408FC08; Fri, 19 Nov 2010 15:39:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJFdxQV078853; Fri, 19 Nov 2010 15:39:59 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJFdxrZ078849; Fri, 19 Nov 2010 15:39:59 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201011191539.oAJFdxrZ078849@svn.freebsd.org> From: John Baldwin Date: Fri, 19 Nov 2010 15:39:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215526 - head/usr.sbin/mfiutil X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 15:40:00 -0000 Author: jhb Date: Fri Nov 19 15:39:59 2010 New Revision: 215526 URL: http://svn.freebsd.org/changeset/base/215526 Log: Handle malloc() failures more gracefully by error'ing out rather than segfaulting. Submitted by: gcooper MFC after: 1 week Modified: head/usr.sbin/mfiutil/mfi_config.c head/usr.sbin/mfiutil/mfi_evt.c head/usr.sbin/mfiutil/mfi_flash.c Modified: head/usr.sbin/mfiutil/mfi_config.c ============================================================================== --- head/usr.sbin/mfiutil/mfi_config.c Fri Nov 19 15:12:19 2010 (r215525) +++ head/usr.sbin/mfiutil/mfi_config.c Fri Nov 19 15:39:59 2010 (r215526) @@ -328,6 +328,10 @@ parse_array(int fd, int raid_type, char /* Validate each drive. */ info->drives = calloc(count, sizeof(struct mfi_pd_info)); + if (info->drives == NULL) { + warnx("malloc failed"); + return (ENOMEM); + } info->drive_count = count; for (pinfo = info->drives; (cp = strsep(&array_str, ",")) != NULL; pinfo++) { @@ -638,6 +642,10 @@ create_volume(int ac, char **av) break; } arrays = calloc(narrays, sizeof(*arrays)); + if (arrays == NULL) { + warnx("malloc failed"); + return (ENOMEM); + } for (i = 0; i < narrays; i++) { error = parse_array(fd, raid_type, av[i], &arrays[i]); if (error) @@ -673,6 +681,10 @@ create_volume(int ac, char **av) state.array_count = config->array_count; if (config->array_count > 0) { state.arrays = calloc(config->array_count, sizeof(int)); + if (state.arrays == NULL) { + warnx("malloc failed"); + return (ENOMEM); + } for (i = 0; i < config->array_count; i++) { ar = (struct mfi_array *)p; state.arrays[i] = ar->array_ref; @@ -685,6 +697,10 @@ create_volume(int ac, char **av) state.log_drv_count = config->log_drv_count; if (config->log_drv_count) { state.volumes = calloc(config->log_drv_count, sizeof(int)); + if (state.volumes == NULL) { + warnx("malloc failed"); + return (ENOMEM); + } for (i = 0; i < config->log_drv_count; i++) { ld = (struct mfi_ld_config *)p; state.volumes[i] = ld->properties.ld.v.target_id; @@ -721,6 +737,10 @@ create_volume(int ac, char **av) config_size = sizeof(struct mfi_config_data) + sizeof(struct mfi_ld_config) * nvolumes + MFI_ARRAY_SIZE * narrays; config = calloc(1, config_size); + if (config == NULL) { + warnx("malloc failed"); + return (ENOMEM); + } config->size = config_size; config->array_count = narrays; config->array_size = MFI_ARRAY_SIZE; /* XXX: Firmware hardcode */ @@ -902,6 +922,10 @@ add_spare(int ac, char **av) spare = malloc(sizeof(struct mfi_spare) + sizeof(uint16_t) * config->array_count); + if (spare == NULL) { + warnx("malloc failed"); + return (ENOMEM); + } bzero(spare, sizeof(struct mfi_spare)); spare->ref = info.ref; @@ -1170,6 +1194,10 @@ dump(int ac, char **av) } config = malloc(len); + if (config == NULL) { + warnx("malloc failed"); + return (ENOMEM); + } if (sysctlbyname(buf, config, &len, NULL, 0) < 0) { error = errno; warn("Failed to read debug command"); Modified: head/usr.sbin/mfiutil/mfi_evt.c ============================================================================== --- head/usr.sbin/mfiutil/mfi_evt.c Fri Nov 19 15:12:19 2010 (r215525) +++ head/usr.sbin/mfiutil/mfi_evt.c Fri Nov 19 15:39:59 2010 (r215526) @@ -624,6 +624,10 @@ show_events(int ac, char **av) } list = malloc(size); + if (list == NULL) { + warnx("malloc failed"); + return (ENOMEM); + } for (seq = start;;) { if (mfi_get_events(fd, list, num_events, filter, seq, &status) < 0) { Modified: head/usr.sbin/mfiutil/mfi_flash.c ============================================================================== --- head/usr.sbin/mfiutil/mfi_flash.c Fri Nov 19 15:12:19 2010 (r215525) +++ head/usr.sbin/mfiutil/mfi_flash.c Fri Nov 19 15:39:59 2010 (r215526) @@ -163,6 +163,10 @@ flash_adapter(int ac, char **av) /* Upload the file 64k at a time. */ buf = malloc(FLASH_BUF_SIZE); + if (buf == NULL) { + warnx("malloc failed"); + return (ENOMEM); + } offset = 0; while (sb.st_size > 0) { nread = read(flash, buf, FLASH_BUF_SIZE); From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 16:24:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F9871065674; Fri, 19 Nov 2010 16:24:31 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id A1CBD8FC1D; Fri, 19 Nov 2010 16:24:30 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 12B6F35A86E; Fri, 19 Nov 2010 17:24:30 +0100 (CET) Received: by turtle.stack.nl (Postfix, from userid 1677) id 05A5317042; Fri, 19 Nov 2010 17:24:29 +0100 (CET) Date: Fri, 19 Nov 2010 17:24:29 +0100 From: Jilles Tjoelker To: Alexey Dokuchaev Message-ID: <20101119162429.GD7614@stack.nl> References: <201011191256.oAJCuDFH074482@svn.freebsd.org> <20101119152127.GA29131@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101119152127.GA29131@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215520 - in head: bin/sh share/man/man1 usr.bin/printf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 16:24:31 -0000 On Fri, Nov 19, 2010 at 03:21:27PM +0000, Alexey Dokuchaev wrote: > On Fri, Nov 19, 2010 at 12:56:13PM +0000, Jilles Tjoelker wrote: > > Side effect: printf is now always the builtin version (which behaves > > identically to /usr/bin/printf) and cannot be overridden via PATH (except > > via the undocumented %builtin mechanism). > Are there any plans to document it? It would have to be fixed first so it has sensible behaviour. Right now all builtins, including ones that must execute as a builtin for full functionality, can be overridden via %builtin, which does not seem to make a lot of sense. POSIX (XCU 2.9.1.1 Command Search and Execution) requires that special builtins and some other builtins such as bg, cd and command be found without a PATH search. For consistency with execvp(3) and perhaps also for POSIX compliance, the special cases with % are not really good. Another way to allow overriding builtins would be to make each overridable builtin pretend to be in a directory (e.g. /usr/bin) and be found at that point in the PATH search. For example, printf could pretend to be /usr/bin/printf, which would mean PATH=/usr/bin printf would find the builtin, but PATH=/elsewhere:/usr/bin printf would find /elsewhere/printf if it exists. Command names containing slashes would not participate in this and always invoke the external program. For example, /usr/bin/printf would continue to use the external program. Some builtins in ksh93 (but not printf) work this way. If the echo builtin pretends to be /bin/echo, it is a bit strange because the two utilities are rather incompatible. If I take POSIX's list and add other utilities that must execute as a builtin for full functionality, only very few utilities remain. Many of these are non-standard and are not present in the filesystem. In the specific case of printf, note that the bash, ksh93 and zsh versions of the printf builtin support %n, writing the result into a specified shell variable, which can only work if it is a builtin. Although our printf does not support this and I do not plan on adding it, it means that various shell authors think printf should always be a builtin. The general issue is that I do not know how exactly %builtin is or can be used in practice. -- Jilles Tjoelker From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 16:56:22 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30877106566C; Fri, 19 Nov 2010 16:56:22 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id B5D968FC0C; Fri, 19 Nov 2010 16:56:21 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id oAJGuKR9031054; Fri, 19 Nov 2010 17:56:20 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id oAJGuKPa031053; Fri, 19 Nov 2010 17:56:20 +0100 (CET) (envelope-from marius) Date: Fri, 19 Nov 2010 17:56:20 +0100 From: Marius Strobl To: Ryan Stone Message-ID: <20101119165620.GB9966@alchemy.franken.de> References: <201011190347.oAJ3lBSx056245@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201011190347.oAJ3lBSx056245@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, emaste@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, ken@freebsd.org Subject: Re: svn commit: r215507 - head/sbin/camcontrol X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 16:56:22 -0000 On Fri, Nov 19, 2010 at 03:47:11AM +0000, Ryan Stone wrote: > Author: rstone > Date: Fri Nov 19 03:47:10 2010 > New Revision: 215507 > URL: http://svn.freebsd.org/changeset/base/215507 > > Log: > When doing a camcontrol rescan all or a camcontrol reset all, use the wildcard > path id for enumerating the available busses. Previously camcontrol was > implicitly passing 0 as the first path id, which meant that if bus 0 was not > present camcontrol would fail with EINVAL instead of rescanning/resetting any > busses that were present. > > Approved by: emaste (mentor) > MFC after: 1 week > > Modified: > head/sbin/camcontrol/camcontrol.c > > Modified: head/sbin/camcontrol/camcontrol.c > ============================================================================== > --- head/sbin/camcontrol/camcontrol.c Fri Nov 19 01:58:11 2010 (r215506) > +++ head/sbin/camcontrol/camcontrol.c Fri Nov 19 03:47:10 2010 (r215507) > @@ -1526,6 +1526,7 @@ rescan_or_reset_bus(int bus, int rescan) > bzero(&(&matchccb.ccb_h)[1], > sizeof(struct ccb_dev_match) - sizeof(struct ccb_hdr)); > matchccb.ccb_h.func_code = XPT_DEV_MATCH; > + matchccb.ccb_h.path_id = CAM_BUS_WILDCARD; > bufsize = sizeof(struct dev_match_result) * 20; > matchccb.cdm.match_buf_len = bufsize; > matchccb.cdm.matches=(struct dev_match_result *)malloc(bufsize); Hrm, shouldn't that use CAM_XPT_PATH_ID instead of CAM_BUS_WILDCARD as XPT_DEV_MATCH is marked XPT_FC_XPT_ONLY and supply a complete Connect ID (i.e. the triple of Path ID, Target ID and LUN)? At least that's what ken@ changed a similar patch of mine to in r126514: http://svn.freebsd.org/viewvc/base/head/sbin/camcontrol/camcontrol.c?r1=126514&r2=126513&pathrev=126514&diff_format=u In any case it's unfortunate that both CAM_BUS_WILDCARD and CAM_XPT_PATH_ID are defined as ~0. According to the last CAM draft [1] the XPT Path ID should be 0xff. Marius 1: http://www.t10.org/ftp/t10/drafts/cam/cam-r12b.pdf From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 17:49:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA005106566B; Fri, 19 Nov 2010 17:49:08 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA14E8FC18; Fri, 19 Nov 2010 17:49:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJHn8A2083450; Fri, 19 Nov 2010 17:49:08 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJHn8e1083448; Fri, 19 Nov 2010 17:49:08 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201011191749.oAJHn8e1083448@svn.freebsd.org> From: Alan Cox Date: Fri, 19 Nov 2010 17:49:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215538 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 17:49:08 -0000 Author: alc Date: Fri Nov 19 17:49:08 2010 New Revision: 215538 URL: http://svn.freebsd.org/changeset/base/215538 Log: Reduce the amount of detail printed by vm_page_free_toq() when it panics. Reviewed by: kib Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Fri Nov 19 17:24:03 2010 (r215537) +++ head/sys/vm/vm_page.c Fri Nov 19 17:49:08 2010 (r215538) @@ -1663,16 +1663,10 @@ vm_page_free_toq(vm_page_t m) } PCPU_INC(cnt.v_tfree); - if (m->busy || VM_PAGE_IS_FREE(m)) { - printf( - "vm_page_free: pindex(%lu), busy(%d), VPO_BUSY(%d), hold(%d)\n", - (u_long)m->pindex, m->busy, (m->oflags & VPO_BUSY) ? 1 : 0, - m->hold_count); - if (VM_PAGE_IS_FREE(m)) - panic("vm_page_free: freeing free page"); - else - panic("vm_page_free: freeing busy page"); - } + if (VM_PAGE_IS_FREE(m)) + panic("vm_page_free: freeing free page %p", m); + else if (m->busy != 0) + panic("vm_page_free: freeing busy page %p", m); /* * unqueue, then remove page. Note that we cannot destroy @@ -1695,13 +1689,8 @@ vm_page_free_toq(vm_page_t m) m->valid = 0; vm_page_undirty(m); - if (m->wire_count != 0) { - if (m->wire_count > 1) { - panic("vm_page_free: invalid wire count (%d), pindex: 0x%lx", - m->wire_count, (long)m->pindex); - } - panic("vm_page_free: freeing wired page"); - } + if (m->wire_count != 0) + panic("vm_page_free: freeing wired page %p", m); if (m->hold_count != 0) { m->flags &= ~PG_ZERO; vm_page_lock_queues(); From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 17:56:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F11871065670; Fri, 19 Nov 2010 17:56:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E15738FC18; Fri, 19 Nov 2010 17:56:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJHuGYL083784; Fri, 19 Nov 2010 17:56:16 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJHuGIg083781; Fri, 19 Nov 2010 17:56:16 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201011191756.oAJHuGIg083781@svn.freebsd.org> From: John Baldwin Date: Fri, 19 Nov 2010 17:56:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215540 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 17:56:17 -0000 Author: jhb Date: Fri Nov 19 17:56:16 2010 New Revision: 215540 URL: http://svn.freebsd.org/changeset/base/215540 Log: Set various POSIX capability sysctls to the version of the API that is supported rather than 1. They are supposed to return a suitable value for sysconf(3). While here, make the fsync sysctl match . MFC after: 1 week Modified: head/sys/kern/p1003_1b.c head/sys/kern/posix4_mib.c Modified: head/sys/kern/p1003_1b.c ============================================================================== --- head/sys/kern/p1003_1b.c Fri Nov 19 17:49:16 2010 (r215539) +++ head/sys/kern/p1003_1b.c Fri Nov 19 17:56:16 2010 (r215540) @@ -102,7 +102,7 @@ sched_attach(void) int ret = ksched_attach(&ksched); if (ret == 0) - p31b_setcfg(CTL_P1003_1B_PRIORITY_SCHEDULING, 1); + p31b_setcfg(CTL_P1003_1B_PRIORITY_SCHEDULING, 200112L); return ret; } Modified: head/sys/kern/posix4_mib.c ============================================================================== --- head/sys/kern/posix4_mib.c Fri Nov 19 17:49:16 2010 (r215539) +++ head/sys/kern/posix4_mib.c Fri Nov 19 17:56:16 2010 (r215540) @@ -164,9 +164,10 @@ p31b_iscfg(int num) static void p31b_set_standard(void *dummy) { - /* ??? p31b_setcfg(CTL_P1003_1B_FSYNC, 1); */ - p31b_setcfg(CTL_P1003_1B_MAPPED_FILES, 1); - p31b_setcfg(CTL_P1003_1B_SHARED_MEMORY_OBJECTS, 1); + + p31b_setcfg(CTL_P1003_1B_FSYNC, 200112L); + p31b_setcfg(CTL_P1003_1B_MAPPED_FILES, 200112L); + p31b_setcfg(CTL_P1003_1B_SHARED_MEMORY_OBJECTS, 200112L); p31b_setcfg(CTL_P1003_1B_PAGESIZE, PAGE_SIZE); if (!p31b_iscfg(CTL_P1003_1B_AIO_LISTIO_MAX)) p31b_setcfg(CTL_P1003_1B_AIO_LISTIO_MAX, -1); From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 17:57:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31D6E106564A; Fri, 19 Nov 2010 17:57:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 221538FC12; Fri, 19 Nov 2010 17:57:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJHvp0O083886; Fri, 19 Nov 2010 17:57:51 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJHvpvH083884; Fri, 19 Nov 2010 17:57:51 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201011191757.oAJHvpvH083884@svn.freebsd.org> From: John Baldwin Date: Fri, 19 Nov 2010 17:57:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215541 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 17:57:51 -0000 Author: jhb Date: Fri Nov 19 17:57:50 2010 New Revision: 215541 URL: http://svn.freebsd.org/changeset/base/215541 Log: Set the POSIX semaphore capability when the semaphore module is enabled. This is ignored in HEAD where semaphores are marked as always enabled in . MFC after: 1 week Modified: head/sys/kern/uipc_sem.c Modified: head/sys/kern/uipc_sem.c ============================================================================== --- head/sys/kern/uipc_sem.c Fri Nov 19 17:56:16 2010 (r215540) +++ head/sys/kern/uipc_sem.c Fri Nov 19 17:57:50 2010 (r215541) @@ -949,6 +949,7 @@ ksem_module_init(void) mtx_init(&ksem_count_lock, "ksem count", NULL, MTX_DEF); sx_init(&ksem_dict_lock, "ksem dictionary"); ksem_dictionary = hashinit(1024, M_KSEM, &ksem_hash); + p31b_setcfg(CTL_P1003_1B_SEMAPHORES, 200112L); p31b_setcfg(CTL_P1003_1B_SEM_NSEMS_MAX, SEM_MAX); p31b_setcfg(CTL_P1003_1B_SEM_VALUE_MAX, SEM_VALUE_MAX); @@ -972,6 +973,7 @@ ksem_module_destroy(void) #endif syscall_helper_unregister(ksem_syscalls); + p31b_setcfg(CTL_P1003_1B_SEMAPHORES, 0); hashdestroy(ksem_dictionary, M_KSEM, ksem_hash); sx_destroy(&ksem_dict_lock); mtx_destroy(&ksem_count_lock); From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 18:36:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EA831065675; Fri, 19 Nov 2010 18:36:51 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id B143F8FC1A; Fri, 19 Nov 2010 18:36:50 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id oAJIan4T031632; Fri, 19 Nov 2010 19:36:49 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id oAJIam7T031631; Fri, 19 Nov 2010 19:36:48 +0100 (CET) (envelope-from marius) Date: Fri, 19 Nov 2010 19:36:48 +0100 From: Marius Strobl To: Ryan Stone Message-ID: <20101119183648.GC9966@alchemy.franken.de> References: <201011190347.oAJ3lBSx056245@svn.freebsd.org> <20101119165620.GB9966@alchemy.franken.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101119165620.GB9966@alchemy.franken.de> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, ken@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, emaste@freebsd.org Subject: Re: svn commit: r215507 - head/sbin/camcontrol X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 18:36:51 -0000 On Fri, Nov 19, 2010 at 05:56:20PM +0100, Marius Strobl wrote: > On Fri, Nov 19, 2010 at 03:47:11AM +0000, Ryan Stone wrote: > > Author: rstone > > Date: Fri Nov 19 03:47:10 2010 > > New Revision: 215507 > > URL: http://svn.freebsd.org/changeset/base/215507 > > > > Log: > > When doing a camcontrol rescan all or a camcontrol reset all, use the wildcard > > path id for enumerating the available busses. Previously camcontrol was > > implicitly passing 0 as the first path id, which meant that if bus 0 was not > > present camcontrol would fail with EINVAL instead of rescanning/resetting any > > busses that were present. > > > > Approved by: emaste (mentor) > > MFC after: 1 week > > > > Modified: > > head/sbin/camcontrol/camcontrol.c > > > > Modified: head/sbin/camcontrol/camcontrol.c > > ============================================================================== > > --- head/sbin/camcontrol/camcontrol.c Fri Nov 19 01:58:11 2010 (r215506) > > +++ head/sbin/camcontrol/camcontrol.c Fri Nov 19 03:47:10 2010 (r215507) > > @@ -1526,6 +1526,7 @@ rescan_or_reset_bus(int bus, int rescan) > > bzero(&(&matchccb.ccb_h)[1], > > sizeof(struct ccb_dev_match) - sizeof(struct ccb_hdr)); > > matchccb.ccb_h.func_code = XPT_DEV_MATCH; > > + matchccb.ccb_h.path_id = CAM_BUS_WILDCARD; > > bufsize = sizeof(struct dev_match_result) * 20; > > matchccb.cdm.match_buf_len = bufsize; > > matchccb.cdm.matches=(struct dev_match_result *)malloc(bufsize); > > Hrm, shouldn't that use CAM_XPT_PATH_ID instead of CAM_BUS_WILDCARD > as XPT_DEV_MATCH is marked XPT_FC_XPT_ONLY and supply a complete > Connect ID (i.e. the triple of Path ID, Target ID and LUN)? At least > that's what ken@ changed a similar patch of mine to in r126514: > http://svn.freebsd.org/viewvc/base/head/sbin/camcontrol/camcontrol.c?r1=126514&r2=126513&pathrev=126514&diff_format=u > > In any case it's unfortunate that both CAM_BUS_WILDCARD and > CAM_XPT_PATH_ID are defined as ~0. According to the last CAM draft [1] With a 32-bit ~0 that is ... > the XPT Path ID should be 0xff. > > Marius > > 1: http://www.t10.org/ftp/t10/drafts/cam/cam-r12b.pdf > Marius From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 19:29:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0A0E106566C; Fri, 19 Nov 2010 19:29:42 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 42F098FC15; Fri, 19 Nov 2010 19:29:41 +0000 (UTC) Received: by ewy3 with SMTP id 3so2938121ewy.13 for ; Fri, 19 Nov 2010 11:29:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=TfLdx3IF/x41rKLOyuzjC+uSq1lh30ExCp4P6d/a3z0=; b=Nd03Jc4ble2KKqaPL45DZihPLSouFYC694kRYnz/7vD0o6OuI34x/nhxgdnELE9PBn P3rECeA7ZgZM8kUbqj5usVMFQ/KtaJb3nyr+KQNqmgKZAS7sgcmAlMGIGiw3cdvJ2FOd 1iQUIv64ouR6ZZfEBFM2W7s5V7daOB24cf7w8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=kSieYD0X97t2fl8nAZTYVwRlSd5gpiE2pmkbs+eEzdX81xoMyML0/ldktm1UGUI25p tHC7iRTMZAWmkpNVxsu57IttGFcnfS86DGj5ViDWff8gNZ8gysCqGoRuhb3pG843+cCV mMZDGAY51E+ID+6975vjnkAs9bCfXFi27DgzE= MIME-Version: 1.0 Received: by 10.213.114.75 with SMTP id d11mr2028150ebq.74.1290193528735; Fri, 19 Nov 2010 11:05:28 -0800 (PST) Received: by 10.213.14.138 with HTTP; Fri, 19 Nov 2010 11:05:28 -0800 (PST) In-Reply-To: <20101119165620.GB9966@alchemy.franken.de> References: <201011190347.oAJ3lBSx056245@svn.freebsd.org> <20101119165620.GB9966@alchemy.franken.de> Date: Fri, 19 Nov 2010 14:05:28 -0500 Message-ID: From: Ryan Stone To: Marius Strobl Content-Type: text/plain; charset=ISO-8859-1 Cc: scottl@samsco.org, src-committers@freebsd.org, emaste@freebsd.org, Ryan Stone , ken@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r215507 - head/sbin/camcontrol X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 19:29:42 -0000 I asked about this on freebsd-scsi and CAM_BUS_WILDCARD was what was suggested to me. I'm happy to make the change if the other way is correct. From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 19:43:57 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E7C7106564A; Fri, 19 Nov 2010 19:43:57 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E6FA8FC0C; Fri, 19 Nov 2010 19:43:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJJhvlp087207; Fri, 19 Nov 2010 19:43:57 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJJhv3i087205; Fri, 19 Nov 2010 19:43:57 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201011191943.oAJJhv3i087205@svn.freebsd.org> From: Attilio Rao Date: Fri, 19 Nov 2010 19:43:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 19:43:57 -0000 Author: attilio Date: Fri Nov 19 19:43:56 2010 New Revision: 215544 URL: http://svn.freebsd.org/changeset/base/215544 Log: Scan the list in reverse order for the shutdown handlers of loaded modules. This way, when there is a dependency between two modules, the handler of the latter probed runs first. This is a similar approach as the modules are unloaded in the same linkerfile. Sponsored by: Sandvine Incorporated Submitted by: Nima Misaghian MFC after: 1 week Modified: head/sys/kern/kern_module.c Modified: head/sys/kern/kern_module.c ============================================================================== --- head/sys/kern/kern_module.c Fri Nov 19 18:59:35 2010 (r215543) +++ head/sys/kern/kern_module.c Fri Nov 19 19:43:56 2010 (r215544) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_MODULE, "module", "module data structures"); -typedef TAILQ_HEAD(, module) modulelist_t; +typedef TAILQ_HEAD(modulelst, module) modulelist_t; struct module { TAILQ_ENTRY(module) link; /* chain together all modules */ TAILQ_ENTRY(module) flink; /* all modules in a file */ @@ -101,7 +101,7 @@ module_shutdown(void *arg1, int arg2) return; mtx_lock(&Giant); MOD_SLOCK; - TAILQ_FOREACH(mod, &modules, link) + TAILQ_FOREACH_REVERSE(mod, &modules, modulelst, link) MOD_EVENT(mod, MOD_SHUTDOWN); MOD_SUNLOCK; mtx_unlock(&Giant); From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 19:47:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4574D106564A; Fri, 19 Nov 2010 19:47:11 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id C40BE8FC0A; Fri, 19 Nov 2010 19:47:10 +0000 (UTC) Received: by qwi4 with SMTP id 4so214113qwi.13 for ; Fri, 19 Nov 2010 11:47:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=RLPKHxPkpYBifkLOZT89hOClfEaNHYo/Y62cBO8NWrg=; b=OHDAaqPomAqiCxA42nxf4DFdkcgfWxvSwPB+u14ssiFY2pWPxg2Nk1UmIiPVBcgWbq gXBbTTfD/kL6YoAHC891MOPxIE5LIFLR85Lu427+JUxS3qz2er/9VMARq3l2p2XhWG+a IpilfVDyTWQSERDLqoE+me7A4BJQ6lJNuZ56A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=DblK4wLO74RMm35Md6IQqR+zjK1F08Xupvr0T4noB31ElLGlse1ahO81U+jJFIwdv9 gX3u7V2T19PTcq3r+d3jsEQSwLWCHxt/T+/hqRqmHvbLJ/+FiVZNZ6/EuRmJIAgtIivc 7he1tSyQlp8mWbJ/16lCLVnmrmP4Qxp7dcONQ= MIME-Version: 1.0 Received: by 10.229.191.130 with SMTP id dm2mr2076358qcb.256.1290196029826; Fri, 19 Nov 2010 11:47:09 -0800 (PST) Sender: asmrookie@gmail.com Received: by 10.229.31.9 with HTTP; Fri, 19 Nov 2010 11:47:09 -0800 (PST) In-Reply-To: <201011191943.oAJJhv3i087205@svn.freebsd.org> References: <201011191943.oAJJhv3i087205@svn.freebsd.org> Date: Fri, 19 Nov 2010 14:47:09 -0500 X-Google-Sender-Auth: Top57HeJKSFfj_xJ-RFT9DIvcak Message-ID: From: Attilio Rao To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 19:47:11 -0000 2010/11/19 Attilio Rao : > Author: attilio > Date: Fri Nov 19 19:43:56 2010 > New Revision: 215544 > URL: http://svn.freebsd.org/changeset/base/215544 > > Log: > =C2=A0Scan the list in reverse order for the shutdown handlers of loaded = modules. > =C2=A0This way, when there is a dependency between two modules, the handl= er of the > =C2=A0latter probed runs first. > > =C2=A0This is a similar approach as the modules are unloaded in the same > =C2=A0linkerfile. > > =C2=A0Sponsored by: Sandvine Incorporated > =C2=A0Submitted by: Nima Misaghian > =C2=A0MFC after: =C2=A0 =C2=A01 week Forgot to mention: PR kern/135485. Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 21:09:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 75EE01065672; Fri, 19 Nov 2010 21:09:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: src-committers@FreeBSD.org Date: Fri, 19 Nov 2010 16:09:28 -0500 User-Agent: KMail/1.6.2 References: <201011191943.oAJJhv3i087205@svn.freebsd.org> In-Reply-To: <201011191943.oAJJhv3i087205@svn.freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_Leu5M/2XJcMyOAp" Message-Id: <201011191609.31308.jkim@FreeBSD.org> Cc: Attilio Rao , svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 21:09:42 -0000 --Boundary-00=_Leu5M/2XJcMyOAp Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Friday 19 November 2010 02:43 pm, Attilio Rao wrote: > Author: attilio > Date: Fri Nov 19 19:43:56 2010 > New Revision: 215544 > URL: http://svn.freebsd.org/changeset/base/215544 > > Log: > Scan the list in reverse order for the shutdown handlers of > loaded modules. This way, when there is a dependency between two > modules, the handler of the latter probed runs first. > > This is a similar approach as the modules are unloaded in the > same linkerfile. > > Sponsored by: Sandvine Incorporated > Submitted by: Nima Misaghian > MFC after: 1 week Hmm... It is not directly related but I was thinking about doing similar things for sys/kern/subr_bus.c. What do you think about the attached patch? Jung-uk Kim --Boundary-00=_Leu5M/2XJcMyOAp Content-Type: text/plain; charset="iso-8859-1"; name="subr_bus.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="subr_bus.diff" Index: sys/kern/subr_bus.c =================================================================== --- sys/kern/subr_bus.c (revision 215542) +++ sys/kern/subr_bus.c (working copy) @@ -1847,7 +1847,7 @@ device_delete_child(device_t dev, device_t child) PDEBUG(("%s from %s", DEVICENAME(child), DEVICENAME(dev))); /* remove children first */ - while ( (grandchild = TAILQ_FIRST(&child->children)) ) { + while ( (grandchild = TAILQ_LAST(&child->children, device_list)) ) { error = device_delete_child(child, grandchild); if (error) return (error); @@ -3381,7 +3381,7 @@ bus_generic_detach(device_t dev) if (dev->state != DS_ATTACHED) return (EBUSY); - TAILQ_FOREACH(child, &dev->children, link) { + TAILQ_FOREACH_REVERSE(child, &dev->children, device_list, link) { if ((error = device_detach(child)) != 0) return (error); } @@ -3401,7 +3401,7 @@ bus_generic_shutdown(device_t dev) { device_t child; - TAILQ_FOREACH(child, &dev->children, link) { + TAILQ_FOREACH_REVERSE(child, &dev->children, device_list, link) { device_shutdown(child); } @@ -3423,7 +3423,7 @@ bus_generic_suspend(device_t dev) int error; device_t child, child2; - TAILQ_FOREACH(child, &dev->children, link) { + TAILQ_FOREACH_REVERSE(child, &dev->children, device_list, link) { error = DEVICE_SUSPEND(child); if (error) { for (child2 = TAILQ_FIRST(&dev->children); --Boundary-00=_Leu5M/2XJcMyOAp-- From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 21:15:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6235C1065672; Fri, 19 Nov 2010 21:15:07 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 51C278FC1C; Fri, 19 Nov 2010 21:15:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJLF6aF089745; Fri, 19 Nov 2010 21:15:06 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJLF6d1089743; Fri, 19 Nov 2010 21:15:06 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011192115.oAJLF6d1089743@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 19 Nov 2010 21:15:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215547 - head/tools/regression/bin/sh/builtins X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 21:15:07 -0000 Author: jilles Date: Fri Nov 19 21:15:06 2010 New Revision: 215547 URL: http://svn.freebsd.org/changeset/base/215547 Log: sh: Add another simple test for the wait builtin. Added: head/tools/regression/bin/sh/builtins/wait3.0 (contents, props changed) Added: head/tools/regression/bin/sh/builtins/wait3.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/wait3.0 Fri Nov 19 21:15:06 2010 (r215547) @@ -0,0 +1,21 @@ +# $FreeBSD$ + +failures= +failure() { + echo "Error at line $1" >&2 + failures=x$failures +} + +T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX) +trap 'rm -rf $T' 0 +cd $T || exit 3 +mkfifo fifo1 +for i in 1 2 3 4 5 6 7 8 9 10; do + exit $i 4fifo1 +wait || failure $LINENO +(echo >&3) 2>/dev/null && failure $LINENO +wait || failure $LINENO + +test -z "$failures" From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 21:17:34 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DC2C106566C; Fri, 19 Nov 2010 21:17:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8AD428FC0C; Fri, 19 Nov 2010 21:17:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJLHYCi089871; Fri, 19 Nov 2010 21:17:34 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJLHYEP089858; Fri, 19 Nov 2010 21:17:34 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201011192117.oAJLHYEP089858@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 19 Nov 2010 21:17:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215548 - in head/sys: fs/cd9660 fs/coda fs/ext2fs fs/hpfs fs/msdosfs fs/nfsclient fs/ntfs gnu/fs/reiserfs kern nfsclient sys ufs/ufs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 21:17:34 -0000 Author: kib Date: Fri Nov 19 21:17:34 2010 New Revision: 215548 URL: http://svn.freebsd.org/changeset/base/215548 Log: Remove prtactive variable and related printf()s in the vop_inactive and vop_reclaim() methods. They seems to be unused, and the reported situation is normal for the forced unmount. MFC after: 1 week X-MFC-note: keep prtactive symbol in vfs_subr.c Modified: head/sys/fs/cd9660/cd9660_node.c head/sys/fs/coda/coda_vnops.c head/sys/fs/ext2fs/ext2_inode.c head/sys/fs/hpfs/hpfs_vnops.c head/sys/fs/msdosfs/msdosfs_denode.c head/sys/fs/nfsclient/nfs_clnode.c head/sys/fs/ntfs/ntfs_vnops.c head/sys/gnu/fs/reiserfs/reiserfs_inode.c head/sys/kern/vfs_subr.c head/sys/nfsclient/nfs_node.c head/sys/sys/vnode.h head/sys/ufs/ufs/ufs_inode.c Modified: head/sys/fs/cd9660/cd9660_node.c ============================================================================== --- head/sys/fs/cd9660/cd9660_node.c Fri Nov 19 21:15:06 2010 (r215547) +++ head/sys/fs/cd9660/cd9660_node.c Fri Nov 19 21:17:34 2010 (r215548) @@ -69,9 +69,6 @@ cd9660_inactive(ap) struct iso_node *ip = VTOI(vp); int error = 0; - if (prtactive && vrefcnt(vp) != 0) - vprint("cd9660_inactive: pushing active", vp); - /* * If we are done with the inode, reclaim it * so that it can be reused immediately. @@ -93,8 +90,6 @@ cd9660_reclaim(ap) { struct vnode *vp = ap->a_vp; - if (prtactive && vrefcnt(vp) != 0) - vprint("cd9660_reclaim: pushing active", vp); /* * Destroy the vm object and flush associated pages. */ Modified: head/sys/fs/coda/coda_vnops.c ============================================================================== --- head/sys/fs/coda/coda_vnops.c Fri Nov 19 21:15:06 2010 (r215547) +++ head/sys/fs/coda/coda_vnops.c Fri Nov 19 21:17:34 2010 (r215548) @@ -1549,9 +1549,6 @@ coda_reclaim(struct vop_reclaim_args *ap "%p, cp %p\n", vp, cp); } #endif - } else { - if (prtactive && vp->v_usecount != 0) - vprint("coda_reclaim: pushing active", vp); } cache_purge(vp); coda_free(VTOC(vp)); Modified: head/sys/fs/ext2fs/ext2_inode.c ============================================================================== --- head/sys/fs/ext2fs/ext2_inode.c Fri Nov 19 21:15:06 2010 (r215547) +++ head/sys/fs/ext2fs/ext2_inode.c Fri Nov 19 21:17:34 2010 (r215548) @@ -481,9 +481,6 @@ ext2_inactive(ap) struct thread *td = ap->a_td; int mode, error = 0; - if (prtactive && vrefcnt(vp) != 0) - vprint("ext2_inactive: pushing active", vp); - /* * Ignore inodes related to stale file handles. */ @@ -522,8 +519,6 @@ ext2_reclaim(ap) struct inode *ip; struct vnode *vp = ap->a_vp; - if (prtactive && vrefcnt(vp) != 0) - vprint("ufs_reclaim: pushing active", vp); ip = VTOI(vp); if (ip->i_flag & IN_LAZYMOD) { ip->i_flag |= IN_MODIFIED; Modified: head/sys/fs/hpfs/hpfs_vnops.c ============================================================================== --- head/sys/fs/hpfs/hpfs_vnops.c Fri Nov 19 21:15:06 2010 (r215547) +++ head/sys/fs/hpfs/hpfs_vnops.c Fri Nov 19 21:17:34 2010 (r215548) @@ -575,9 +575,6 @@ hpfs_inactive(ap) return (error); } - if (prtactive && vrefcnt(vp) != 0) - vprint("hpfs_inactive: pushing active", vp); - if (hp->h_flag & H_INVAL) { vrecycle(vp, ap->a_td); return (0); Modified: head/sys/fs/msdosfs/msdosfs_denode.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_denode.c Fri Nov 19 21:15:06 2010 (r215547) +++ head/sys/fs/msdosfs/msdosfs_denode.c Fri Nov 19 21:17:34 2010 (r215548) @@ -548,8 +548,6 @@ msdosfs_reclaim(ap) dep, dep->de_Name, dep->de_refcnt); #endif - if (prtactive && vrefcnt(vp) != 0) - vprint("msdosfs_reclaim(): pushing active", vp); /* * Destroy the vm object and flush associated pages. */ @@ -586,9 +584,6 @@ msdosfs_inactive(ap) printf("msdosfs_inactive(): dep %p, de_Name[0] %x\n", dep, dep->de_Name[0]); #endif - if (prtactive && vrefcnt(vp) != 0) - vprint("msdosfs_inactive(): pushing active", vp); - /* * Ignore denodes related to stale file handles. */ Modified: head/sys/fs/nfsclient/nfs_clnode.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clnode.c Fri Nov 19 21:15:06 2010 (r215547) +++ head/sys/fs/nfsclient/nfs_clnode.c Fri Nov 19 21:17:34 2010 (r215548) @@ -190,8 +190,6 @@ ncl_inactive(struct vop_inactive_args *a struct vnode *vp = ap->a_vp; np = VTONFS(vp); - if (prtactive && vrefcnt(vp) != 0) - vprint("ncl_inactive: pushing active", vp); if (NFS_ISV4(vp) && vp->v_type == VREG) { /* @@ -233,9 +231,6 @@ ncl_reclaim(struct vop_reclaim_args *ap) struct nfsnode *np = VTONFS(vp); struct nfsdmap *dp, *dp2; - if (prtactive && vrefcnt(vp) != 0) - vprint("ncl_reclaim: pushing active", vp); - if (NFS_ISV4(vp) && vp->v_type == VREG) /* * Since mmap()'d files do I/O after VOP_CLOSE(), the NFSv4 Modified: head/sys/fs/ntfs/ntfs_vnops.c ============================================================================== --- head/sys/fs/ntfs/ntfs_vnops.c Fri Nov 19 21:15:06 2010 (r215547) +++ head/sys/fs/ntfs/ntfs_vnops.c Fri Nov 19 21:17:34 2010 (r215548) @@ -82,8 +82,6 @@ static vop_fsync_t ntfs_fsync; static vop_pathconf_t ntfs_pathconf; static vop_vptofh_t ntfs_vptofh; -int ntfs_prtactive = 1; /* 1 => print out reclaim of active vnodes */ - /* * This is a noop, simply returning what one has been given. */ @@ -214,15 +212,12 @@ ntfs_inactive(ap) struct vnode *a_vp; } */ *ap; { - register struct vnode *vp = ap->a_vp; #ifdef NTFS_DEBUG - register struct ntnode *ip = VTONT(vp); + register struct ntnode *ip = VTONT(ap->a_vp); #endif - dprintf(("ntfs_inactive: vnode: %p, ntnode: %d\n", vp, ip->i_number)); - - if (ntfs_prtactive && vrefcnt(vp) != 0) - vprint("ntfs_inactive: pushing active", vp); + dprintf(("ntfs_inactive: vnode: %p, ntnode: %d\n", ap->a_vp, + ip->i_number)); /* XXX since we don't support any filesystem changes * right now, nothing more needs to be done @@ -246,9 +241,6 @@ ntfs_reclaim(ap) dprintf(("ntfs_reclaim: vnode: %p, ntnode: %d\n", vp, ip->i_number)); - if (ntfs_prtactive && vrefcnt(vp) != 0) - vprint("ntfs_reclaim: pushing active", vp); - /* * Destroy the vm object and flush associated pages. */ Modified: head/sys/gnu/fs/reiserfs/reiserfs_inode.c ============================================================================== --- head/sys/gnu/fs/reiserfs/reiserfs_inode.c Fri Nov 19 21:15:06 2010 (r215547) +++ head/sys/gnu/fs/reiserfs/reiserfs_inode.c Fri Nov 19 21:17:34 2010 (r215548) @@ -114,8 +114,6 @@ reiserfs_inactive(struct vop_inactive_ar reiserfs_log(LOG_DEBUG, "deactivating inode used %d times\n", vp->v_usecount); - if (prtactive && vrefcnt(vp) != 0) - vprint("ReiserFS/reclaim: pushing active", vp); #if 0 /* Ignore inodes related to stale file handles. */ @@ -147,8 +145,6 @@ reiserfs_reclaim(struct vop_reclaim_args reiserfs_log(LOG_DEBUG, "reclaiming inode used %d times\n", vp->v_usecount); - if (prtactive && vrefcnt(vp) != 0) - vprint("ReiserFS/reclaim: pushing active", vp); ip = VTOI(vp); /* XXX Update this node (write to the disk) */ Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Fri Nov 19 21:15:06 2010 (r215547) +++ head/sys/kern/vfs_subr.c Fri Nov 19 21:17:34 2010 (r215548) @@ -191,9 +191,6 @@ struct nfs_public nfs_pub; static uma_zone_t vnode_zone; static uma_zone_t vnodepoll_zone; -/* Set to 1 to print out reclaim of active vnodes */ -int prtactive; - /* * The workitem queue. * Modified: head/sys/nfsclient/nfs_node.c ============================================================================== --- head/sys/nfsclient/nfs_node.c Fri Nov 19 21:15:06 2010 (r215547) +++ head/sys/nfsclient/nfs_node.c Fri Nov 19 21:17:34 2010 (r215548) @@ -193,8 +193,6 @@ nfs_inactive(struct vop_inactive_args *a struct thread *td = curthread; /* XXX */ np = VTONFS(ap->a_vp); - if (prtactive && vrefcnt(ap->a_vp) != 0) - vprint("nfs_inactive: pushing active", ap->a_vp); mtx_lock(&np->n_mtx); if (ap->a_vp->v_type != VDIR) { sp = np->n_sillyrename; @@ -228,9 +226,6 @@ nfs_reclaim(struct vop_reclaim_args *ap) struct nfsnode *np = VTONFS(vp); struct nfsdmap *dp, *dp2; - if (prtactive && vrefcnt(vp) != 0) - vprint("nfs_reclaim: pushing active", vp); - /* * If the NLM is running, give it a chance to abort pending * locks. Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Fri Nov 19 21:15:06 2010 (r215547) +++ head/sys/sys/vnode.h Fri Nov 19 21:17:34 2010 (r215548) @@ -410,7 +410,6 @@ extern struct vnode *rootvnode; /* root extern int async_io_version; /* 0 or POSIX version of AIO i'face */ extern int desiredvnodes; /* number of vnodes desired */ extern struct uma_zone *namei_zone; -extern int prtactive; /* nonzero to call vprint() */ extern struct vattr va_null; /* predefined null vattr structure */ #define VI_LOCK(vp) mtx_lock(&(vp)->v_interlock) Modified: head/sys/ufs/ufs/ufs_inode.c ============================================================================== --- head/sys/ufs/ufs/ufs_inode.c Fri Nov 19 21:15:06 2010 (r215547) +++ head/sys/ufs/ufs/ufs_inode.c Fri Nov 19 21:17:34 2010 (r215548) @@ -80,8 +80,6 @@ ufs_inactive(ap) struct mount *mp; mp = NULL; - if (prtactive && vp->v_usecount != 0) - vprint("ufs_inactive: pushing active", vp); /* * Ignore inodes related to stale file handles. */ @@ -191,8 +189,6 @@ ufs_reclaim(ap) int i; #endif - if (prtactive && vp->v_usecount != 0) - vprint("ufs_reclaim: pushing active", vp); /* * Destroy the vm object and flush associated pages. */ From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 21:21:27 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A15261065672; Fri, 19 Nov 2010 21:21:27 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 7395B8FC17; Fri, 19 Nov 2010 21:21:27 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 1132046B0C; Fri, 19 Nov 2010 16:21:27 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 175F98A009; Fri, 19 Nov 2010 16:21:26 -0500 (EST) From: John Baldwin To: Attilio Rao Date: Fri, 19 Nov 2010 16:17:51 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20101102; KDE/4.4.5; amd64; ; ) References: <201011191943.oAJJhv3i087205@svn.freebsd.org> In-Reply-To: <201011191943.oAJJhv3i087205@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201011191617.51552.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Fri, 19 Nov 2010 16:21:26 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 21:21:27 -0000 On Friday, November 19, 2010 2:43:57 pm Attilio Rao wrote: > Author: attilio > Date: Fri Nov 19 19:43:56 2010 > New Revision: 215544 > URL: http://svn.freebsd.org/changeset/base/215544 > > Log: > Scan the list in reverse order for the shutdown handlers of loaded modules. > This way, when there is a dependency between two modules, the handler of the > latter probed runs first. > > This is a similar approach as the modules are unloaded in the same > linkerfile. > > Sponsored by: Sandvine Incorporated > Submitted by: Nima Misaghian > MFC after: 1 week > > Modified: > head/sys/kern/kern_module.c > > Modified: head/sys/kern/kern_module.c > ============================================================================== > --- head/sys/kern/kern_module.c Fri Nov 19 18:59:35 2010 (r215543) > +++ head/sys/kern/kern_module.c Fri Nov 19 19:43:56 2010 (r215544) > @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); > > static MALLOC_DEFINE(M_MODULE, "module", "module data structures"); > > -typedef TAILQ_HEAD(, module) modulelist_t; > +typedef TAILQ_HEAD(modulelst, module) modulelist_t; Is modulelist already taken? If not, we should probably just retire 'modulelist_t' and replace it with 'struct modulelist'. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 21:21:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B82A106564A; Fri, 19 Nov 2010 21:21:29 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id E333C8FC18; Fri, 19 Nov 2010 21:21:28 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 9FC2546B03; Fri, 19 Nov 2010 16:21:28 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id AFA5A8A01D; Fri, 19 Nov 2010 16:21:27 -0500 (EST) From: John Baldwin To: "Jung-uk Kim" Date: Fri, 19 Nov 2010 16:21:25 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20101102; KDE/4.4.5; amd64; ; ) References: <201011191943.oAJJhv3i087205@svn.freebsd.org> <201011191609.31308.jkim@FreeBSD.org> In-Reply-To: <201011191609.31308.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201011191621.25520.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Fri, 19 Nov 2010 16:21:27 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: Attilio Rao , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 21:21:29 -0000 On Friday, November 19, 2010 4:09:28 pm Jung-uk Kim wrote: > On Friday 19 November 2010 02:43 pm, Attilio Rao wrote: > > Author: attilio > > Date: Fri Nov 19 19:43:56 2010 > > New Revision: 215544 > > URL: http://svn.freebsd.org/changeset/base/215544 > > > > Log: > > Scan the list in reverse order for the shutdown handlers of > > loaded modules. This way, when there is a dependency between two > > modules, the handler of the latter probed runs first. > > > > This is a similar approach as the modules are unloaded in the > > same linkerfile. > > > > Sponsored by: Sandvine Incorporated > > Submitted by: Nima Misaghian > > MFC after: 1 week > > Hmm... It is not directly related but I was thinking about doing > similar things for sys/kern/subr_bus.c. What do you think about the > attached patch? Hmm, the patches for suspend and resume that I had for this took the opposite order, they did suspend in forward order, but resume in backwards order. Like so: --- //depot/vendor/freebsd/src/sys/kern/subr_bus.c 2010-11-17 22:30:24.000000000 0000 +++ //depot/user/jhb/acpipci/kern/subr_bus.c 2010-11-19 17:19:02.000000000 00 @@ -3426,9 +3429,9 @@ TAILQ_FOREACH(child, &dev->children, link) { error = DEVICE_SUSPEND(child); if (error) { - for (child2 = TAILQ_FIRST(&dev->children); - child2 && child2 != child; - child2 = TAILQ_NEXT(child2, link)) + for (child2 = TAILQ_PREV(child, device_list, link); + child2 != NULL; + child2 = TAILQ_PREV(child2, device_list, link)) DEVICE_RESUME(child2); return (error); } @@ -3447,7 +3450,7 @@ { device_t child; - TAILQ_FOREACH(child, &dev->children, link) { + TAILQ_FOREACH_REVERSE(child, &dev->children, device_list, link) { DEVICE_RESUME(child); /* if resume fails, there's nothing we can usefully do... */ } (Likely mangled whitespace.) I couldn't convince myself which order was "more" correct for suspend and resume. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 21:27:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39266106567A; Fri, 19 Nov 2010 21:27:29 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id A780E8FC0C; Fri, 19 Nov 2010 21:27:28 +0000 (UTC) Received: by qyk8 with SMTP id 8so105274qyk.13 for ; Fri, 19 Nov 2010 13:27:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=Kvqa2XbWDw+KpaxEUfkEsjSIT5vOCa4s/CSS9arBWME=; b=ccWyTnaI5wAsoYSS8wRC14DygqBkNDZz7O8oJXp42sbCYKrEPBpRSRhyQiO9oLI/ku x/xswi98hOTIGoImwrn+tN/e9Jvn6sD7KHGQUDUwIeHjaUfsEw1iLEBpBINSvG9tPpXp RFvtgbk2vhBWmn0qmsmuFwqGIq7p80IXBqBuw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=FTG6IWh1Yw44EEWjyviSktfybMAqiZfssr5n5SrEJhutCEJS9hohpx5v8fGWWHqis+ 3O67yC/U5JP01wJaHag7B4OTwvw4E1ldzg+V20etA1PqgV6Jj3nmmSn0Hi6VZnVHTUwC ORXL09eR6GddG/dBOeI5Cd5oO5vrR9qPvpoC4= MIME-Version: 1.0 Received: by 10.229.190.204 with SMTP id dj12mr2208872qcb.66.1290202047858; Fri, 19 Nov 2010 13:27:27 -0800 (PST) Sender: asmrookie@gmail.com Received: by 10.229.31.9 with HTTP; Fri, 19 Nov 2010 13:27:27 -0800 (PST) In-Reply-To: <201011191617.51552.jhb@freebsd.org> References: <201011191943.oAJJhv3i087205@svn.freebsd.org> <201011191617.51552.jhb@freebsd.org> Date: Fri, 19 Nov 2010 16:27:27 -0500 X-Google-Sender-Auth: 6JuuWjj4sgvpEHr-MRlc53qx_Uc Message-ID: From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 21:27:29 -0000 2010/11/19 John Baldwin : > On Friday, November 19, 2010 2:43:57 pm Attilio Rao wrote: >> Author: attilio >> Date: Fri Nov 19 19:43:56 2010 >> New Revision: 215544 >> URL: http://svn.freebsd.org/changeset/base/215544 >> >> Log: >> =C2=A0 Scan the list in reverse order for the shutdown handlers of loade= d modules. >> =C2=A0 This way, when there is a dependency between two modules, the han= dler of the >> =C2=A0 latter probed runs first. >> >> =C2=A0 This is a similar approach as the modules are unloaded in the sam= e >> =C2=A0 linkerfile. >> >> =C2=A0 Sponsored by: =C2=A0 =C2=A0 =C2=A0 Sandvine Incorporated >> =C2=A0 Submitted by: =C2=A0 =C2=A0 =C2=A0 Nima Misaghian >> =C2=A0 MFC after: =C2=A01 week >> >> Modified: >> =C2=A0 head/sys/kern/kern_module.c >> >> Modified: head/sys/kern/kern_module.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/kern/kern_module.c =C2=A0 =C2=A0 =C2=A0 Fri Nov 19 18:59:35= 2010 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r215543) >> +++ head/sys/kern/kern_module.c =C2=A0 =C2=A0 =C2=A0 Fri Nov 19 19:43:56= 2010 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r215544) >> @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); >> >> =C2=A0static MALLOC_DEFINE(M_MODULE, "module", "module data structures")= ; >> >> -typedef TAILQ_HEAD(, module) modulelist_t; >> +typedef TAILQ_HEAD(modulelst, module) modulelist_t; > > Is modulelist already taken? =C2=A0If not, we should probably just retire > 'modulelist_t' and replace it with 'struct modulelist'. Note that I used modulelst, not modulelist. Probabilly, if you think the name may be still confusing, we can pickup one another further. Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 21:31:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E870D106564A; Fri, 19 Nov 2010 21:31:45 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 464058FC1E; Fri, 19 Nov 2010 21:31:45 +0000 (UTC) Received: by qyk8 with SMTP id 8so109538qyk.13 for ; Fri, 19 Nov 2010 13:31:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=AawVLT4gA3C2EeFSPOCNPoVcrvbrQ3owNHXTqjpeQ28=; b=KAM7SSSPqJrOCNRYQI7+0FUXX2UeHjT4HAjG5k/e/J3XCyExNOVHKr6dUMmJ+D8aRJ dw0Onvp5fDgImXTw/XG+CHnRcutiyPPwAxNCaYsysNgbytJupOdhTf+MLjzcSq7V9Bd1 GS3iCjkkM0f1/Dwmt5b67fk25OzveAehIr6iY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=NccZ8bI0iJdpBR6HvBUYgBsOSnNcm/q/PaLc10rFATEbGPHUUvXfwslw0FDasaT1bB pBhlcmqdDahpWM3khCU65nYy9rW6hucW42sCBLzN/YHGDEtzk9wXS2jUxzKgNqY0AIQe s/HxO1O5e7WCDZksm0d6BI0tNGdfydTs9znvU= MIME-Version: 1.0 Received: by 10.229.215.9 with SMTP id hc9mr2203820qcb.142.1290202304619; Fri, 19 Nov 2010 13:31:44 -0800 (PST) Sender: asmrookie@gmail.com Received: by 10.229.31.9 with HTTP; Fri, 19 Nov 2010 13:31:44 -0800 (PST) In-Reply-To: <201011191621.25520.jhb@freebsd.org> References: <201011191943.oAJJhv3i087205@svn.freebsd.org> <201011191609.31308.jkim@FreeBSD.org> <201011191621.25520.jhb@freebsd.org> Date: Fri, 19 Nov 2010 16:31:44 -0500 X-Google-Sender-Auth: 9Lf37lIBX17Z3pTtvtItK7o6vFQ Message-ID: From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Jung-uk Kim Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 21:31:46 -0000 2010/11/19 John Baldwin : > On Friday, November 19, 2010 4:09:28 pm Jung-uk Kim wrote: >> On Friday 19 November 2010 02:43 pm, Attilio Rao wrote: >> > Author: attilio >> > Date: Fri Nov 19 19:43:56 2010 >> > New Revision: 215544 >> > URL: http://svn.freebsd.org/changeset/base/215544 >> > >> > Log: >> > =C2=A0 Scan the list in reverse order for the shutdown handlers of >> > loaded modules. This way, when there is a dependency between two >> > modules, the handler of the latter probed runs first. >> > >> > =C2=A0 This is a similar approach as the modules are unloaded in the >> > same linkerfile. >> > >> > =C2=A0 Sponsored by: =C2=A0 =C2=A0 Sandvine Incorporated >> > =C2=A0 Submitted by: =C2=A0 =C2=A0 Nima Misaghian >> > =C2=A0 MFC after: =C2=A0 =C2=A0 =C2=A0 =C2=A01 week >> >> Hmm... =C2=A0It is not directly related but I was thinking about doing >> similar things for sys/kern/subr_bus.c. =C2=A0What do you think about th= e >> attached patch? > > Hmm, the patches for suspend and resume that I had for this took the oppo= site > order, they did suspend in forward order, but resume in backwards order. > Like so: > > --- //depot/vendor/freebsd/src/sys/kern/subr_bus.c =C2=A0 =C2=A0 =C2=A020= 10-11-17 22:30:24.000000000 0000 > +++ //depot/user/jhb/acpipci/kern/subr_bus.c =C2=A0 =C2=A02010-11-19 17:1= 9:02.000000000 00 > @@ -3426,9 +3429,9 @@ > =C2=A0 =C2=A0 =C2=A0 =C2=A0TAILQ_FOREACH(child, &dev->children, link) { > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0error =3D DEVICE_S= USPEND(child); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (error) { > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 for (child2 =3D TAILQ_FIRST(&dev->children); > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0child2 && child2 !=3D child; > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0child2 =3D TAILQ_NEXT(child2, link)) > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 for (child2 =3D TAILQ_PREV(child, device_list, link); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0child2 !=3D NULL; > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0child2 =3D TAILQ_PREV(child2, device_list, link)= ) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0DEVICE_RESUME(child2); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0return (error); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0} > @@ -3447,7 +3450,7 @@ > =C2=A0{ > =C2=A0 =C2=A0 =C2=A0 =C2=A0device_t =C2=A0 =C2=A0 =C2=A0 =C2=A0child; > > - =C2=A0 =C2=A0 =C2=A0 TAILQ_FOREACH(child, &dev->children, link) { > + =C2=A0 =C2=A0 =C2=A0 TAILQ_FOREACH_REVERSE(child, &dev->children, devic= e_list, link) { > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0DEVICE_RESUME(chil= d); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* if resume fails= , there's nothing we can usefully do... */ > =C2=A0 =C2=A0 =C2=A0 =C2=A0} > > (Likely mangled whitespace.) > > I couldn't convince myself which order was "more" correct for suspend and= resume. Considering loading in starting point, I think suspend should go in reverse logic and resume in the same module load logic. So that dependent modules are suspended first and resumed after. Don't you agree? Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 21:46:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3379C106564A; Fri, 19 Nov 2010 21:46:14 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 048388FC08; Fri, 19 Nov 2010 21:46:14 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id AEC1A46B23; Fri, 19 Nov 2010 16:46:13 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B405B8A01D; Fri, 19 Nov 2010 16:46:12 -0500 (EST) From: John Baldwin To: Attilio Rao Date: Fri, 19 Nov 2010 16:42:00 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20101102; KDE/4.4.5; amd64; ; ) References: <201011191943.oAJJhv3i087205@svn.freebsd.org> <201011191617.51552.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201011191642.00761.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Fri, 19 Nov 2010 16:46:12 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 21:46:14 -0000 On Friday, November 19, 2010 4:27:27 pm Attilio Rao wrote: > 2010/11/19 John Baldwin : > > On Friday, November 19, 2010 2:43:57 pm Attilio Rao wrote: > >> Author: attilio > >> Date: Fri Nov 19 19:43:56 2010 > >> New Revision: 215544 > >> URL: http://svn.freebsd.org/changeset/base/215544 > >> > >> Log: > >> Scan the list in reverse order for the shutdown handlers of loaded modules. > >> This way, when there is a dependency between two modules, the handler of the > >> latter probed runs first. > >> > >> This is a similar approach as the modules are unloaded in the same > >> linkerfile. > >> > >> Sponsored by: Sandvine Incorporated > >> Submitted by: Nima Misaghian > >> MFC after: 1 week > >> > >> Modified: > >> head/sys/kern/kern_module.c > >> > >> Modified: head/sys/kern/kern_module.c > >> ============================================================================== > >> --- head/sys/kern/kern_module.c Fri Nov 19 18:59:35 2010 (r215543) > >> +++ head/sys/kern/kern_module.c Fri Nov 19 19:43:56 2010 (r215544) > >> @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); > >> > >> static MALLOC_DEFINE(M_MODULE, "module", "module data structures"); > >> > >> -typedef TAILQ_HEAD(, module) modulelist_t; > >> +typedef TAILQ_HEAD(modulelst, module) modulelist_t; > > > > Is modulelist already taken? If not, we should probably just retire > > 'modulelist_t' and replace it with 'struct modulelist'. > > Note that I used modulelst, not modulelist. > Probabilly, if you think the name may be still confusing, we can > pickup one another further. Yes, I'd much prefer 'modulelist' with the extra 'i' as it is more readable. If you go that route, I think you can drop modulelist_t since style(9) discourages foo_t types unless they are required by a standard. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 21:46:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35B861065672; Fri, 19 Nov 2010 21:46:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id E83DB8FC0C; Fri, 19 Nov 2010 21:46:14 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 84F6B46B2E; Fri, 19 Nov 2010 16:46:14 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A79658A027; Fri, 19 Nov 2010 16:46:13 -0500 (EST) From: John Baldwin To: Attilio Rao Date: Fri, 19 Nov 2010 16:46:11 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20101102; KDE/4.4.5; amd64; ; ) References: <201011191943.oAJJhv3i087205@svn.freebsd.org> <201011191621.25520.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201011191646.12106.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Fri, 19 Nov 2010 16:46:13 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Jung-uk Kim Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 21:46:15 -0000 On Friday, November 19, 2010 4:31:44 pm Attilio Rao wrote: > 2010/11/19 John Baldwin : > > On Friday, November 19, 2010 4:09:28 pm Jung-uk Kim wrote: > >> On Friday 19 November 2010 02:43 pm, Attilio Rao wrote: > >> > Author: attilio > >> > Date: Fri Nov 19 19:43:56 2010 > >> > New Revision: 215544 > >> > URL: http://svn.freebsd.org/changeset/base/215544 > >> > > >> > Log: > >> > Scan the list in reverse order for the shutdown handlers of > >> > loaded modules. This way, when there is a dependency between two > >> > modules, the handler of the latter probed runs first. > >> > > >> > This is a similar approach as the modules are unloaded in the > >> > same linkerfile. > >> > > >> > Sponsored by: Sandvine Incorporated > >> > Submitted by: Nima Misaghian > >> > MFC after: 1 week > >> > >> Hmm... It is not directly related but I was thinking about doing > >> similar things for sys/kern/subr_bus.c. What do you think about the > >> attached patch? > > > > Hmm, the patches for suspend and resume that I had for this took the opposite > > order, they did suspend in forward order, but resume in backwards order. > > Like so: > > > > --- //depot/vendor/freebsd/src/sys/kern/subr_bus.c 2010-11-17 22:30:24.000000000 0000 > > +++ //depot/user/jhb/acpipci/kern/subr_bus.c 2010-11-19 17:19:02.000000000 00 > > @@ -3426,9 +3429,9 @@ > > TAILQ_FOREACH(child, &dev->children, link) { > > error = DEVICE_SUSPEND(child); > > if (error) { > > - for (child2 = TAILQ_FIRST(&dev->children); > > - child2 && child2 != child; > > - child2 = TAILQ_NEXT(child2, link)) > > + for (child2 = TAILQ_PREV(child, device_list, link); > > + child2 != NULL; > > + child2 = TAILQ_PREV(child2, device_list, link)) > > DEVICE_RESUME(child2); > > return (error); > > } > > @@ -3447,7 +3450,7 @@ > > { > > device_t child; > > > > - TAILQ_FOREACH(child, &dev->children, link) { > > + TAILQ_FOREACH_REVERSE(child, &dev->children, device_list, link) { > > DEVICE_RESUME(child); > > /* if resume fails, there's nothing we can usefully do... */ > > } > > > > (Likely mangled whitespace.) > > > > I couldn't convince myself which order was "more" correct for suspend and resume. > > Considering loading in starting point, I think suspend should go in > reverse logic and resume in the same module load logic. > So that dependent modules are suspended first and resumed after. > Don't you agree? These are devices, and the ordering here is the order of sibling devices on a given bus. That is, if you have a PCI bus with two em interfaces, does it really matter if em0 suspends before em1 vs after em1? I think it actually doesn't matter. The passes from the multipass boot probe might make some sense to order on. However, I don't think the order of siblings on a bus is meaningful for suspend and resume (which is why I've never committed the above patches). Specifically, there is no dependency relationship between siblings on a bus. Certain buses may in fact have a dependency order of sorts (vgapci0 comes to mind), but those buses should manage that. There is no generic dependency between siblings that should be encoded into subr_bus.c -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 21:46:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 1AF1B1065907; Fri, 19 Nov 2010 21:46:35 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Attilio Rao Date: Fri, 19 Nov 2010 16:46:17 -0500 User-Agent: KMail/1.6.2 References: <201011191943.oAJJhv3i087205@svn.freebsd.org> <201011191621.25520.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Message-Id: <201011191646.20048.jkim@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 21:46:42 -0000 On Friday 19 November 2010 04:31 pm, Attilio Rao wrote: > 2010/11/19 John Baldwin : > > On Friday, November 19, 2010 4:09:28 pm Jung-uk Kim wrote: > >> On Friday 19 November 2010 02:43 pm, Attilio Rao wrote: > >> > Author: attilio > >> > Date: Fri Nov 19 19:43:56 2010 > >> > New Revision: 215544 > >> > URL: http://svn.freebsd.org/changeset/base/215544 > >> > > >> > Log: > >> >   Scan the list in reverse order for the shutdown handlers of > >> > loaded modules. This way, when there is a dependency between > >> > two modules, the handler of the latter probed runs first. > >> > > >> >   This is a similar approach as the modules are unloaded in > >> > the same linkerfile. > >> > > >> >   Sponsored by:     Sandvine Incorporated > >> >   Submitted by:     Nima Misaghian >> > com> MFC after:        1 week > >> > >> Hmm...  It is not directly related but I was thinking about > >> doing similar things for sys/kern/subr_bus.c.  What do you think > >> about the attached patch? > > > > Hmm, the patches for suspend and resume that I had for this took > > the opposite order, they did suspend in forward order, but resume > > in backwards order. Like so: > > > > --- //depot/vendor/freebsd/src/sys/kern/subr_bus.c     > >  2010-11-17 22:30:24.000000000 0000 +++ > > //depot/user/jhb/acpipci/kern/subr_bus.c    2010-11-19 > > 17:19:02.000000000 00 @@ -3426,9 +3429,9 @@ > >        TAILQ_FOREACH(child, &dev->children, link) { > >                error = DEVICE_SUSPEND(child); > >                if (error) { > > -                       for (child2 = > > TAILQ_FIRST(&dev->children); -                            child2 > > && child2 != child; > > -                            child2 = TAILQ_NEXT(child2, link)) > > +                       for (child2 = TAILQ_PREV(child, > > device_list, link); +                            child2 != NULL; > > +                            child2 = TAILQ_PREV(child2, > > device_list, link)) DEVICE_RESUME(child2); > >                        return (error); > >                } > > @@ -3447,7 +3450,7 @@ > >  { > >        device_t        child; > > > > -       TAILQ_FOREACH(child, &dev->children, link) { > > +       TAILQ_FOREACH_REVERSE(child, &dev->children, device_list, > > link) { DEVICE_RESUME(child); > >                /* if resume fails, there's nothing we can > > usefully do... */ } > > > > (Likely mangled whitespace.) > > > > I couldn't convince myself which order was "more" correct for > > suspend and resume. > > Considering loading in starting point, I think suspend should go in > reverse logic and resume in the same module load logic. > So that dependent modules are suspended first and resumed after. > Don't you agree? That's exactly what I was thinking. :-) Jung-uk Kim From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 22:03:34 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id C25311065679; Fri, 19 Nov 2010 22:03:34 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: John Baldwin Date: Fri, 19 Nov 2010 17:03:25 -0500 User-Agent: KMail/1.6.2 References: <201011191943.oAJJhv3i087205@svn.freebsd.org> <201011191646.12106.jhb@freebsd.org> In-Reply-To: <201011191646.12106.jhb@freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201011191703.26742.jkim@FreeBSD.org> Cc: Attilio Rao , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 22:03:35 -0000 On Friday 19 November 2010 04:46 pm, John Baldwin wrote: > On Friday, November 19, 2010 4:31:44 pm Attilio Rao wrote: > > 2010/11/19 John Baldwin : > > > On Friday, November 19, 2010 4:09:28 pm Jung-uk Kim wrote: > > >> On Friday 19 November 2010 02:43 pm, Attilio Rao wrote: > > >> > Author: attilio > > >> > Date: Fri Nov 19 19:43:56 2010 > > >> > New Revision: 215544 > > >> > URL: http://svn.freebsd.org/changeset/base/215544 > > >> > > > >> > Log: > > >> > Scan the list in reverse order for the shutdown handlers > > >> > of loaded modules. This way, when there is a dependency > > >> > between two modules, the handler of the latter probed runs > > >> > first. > > >> > > > >> > This is a similar approach as the modules are unloaded in > > >> > the same linkerfile. > > >> > > > >> > Sponsored by: Sandvine Incorporated > > >> > Submitted by: Nima Misaghian > >> > dot com> MFC after: 1 week > > >> > > >> Hmm... It is not directly related but I was thinking about > > >> doing similar things for sys/kern/subr_bus.c. What do you > > >> think about the attached patch? > > > > > > Hmm, the patches for suspend and resume that I had for this > > > took the opposite order, they did suspend in forward order, but > > > resume in backwards order. Like so: > > > > > > --- //depot/vendor/freebsd/src/sys/kern/subr_bus.c > > > 2010-11-17 22:30:24.000000000 0000 +++ > > > //depot/user/jhb/acpipci/kern/subr_bus.c 2010-11-19 > > > 17:19:02.000000000 00 @@ -3426,9 +3429,9 @@ > > > TAILQ_FOREACH(child, &dev->children, link) { > > > error = DEVICE_SUSPEND(child); > > > if (error) { > > > - for (child2 = > > > TAILQ_FIRST(&dev->children); - > > > child2 && child2 != child; - child2 > > > = TAILQ_NEXT(child2, link)) + for (child2 > > > = TAILQ_PREV(child, device_list, link); + > > > child2 != NULL; > > > + child2 = TAILQ_PREV(child2, > > > device_list, link)) DEVICE_RESUME(child2); > > > return (error); > > > } > > > @@ -3447,7 +3450,7 @@ > > > { > > > device_t child; > > > > > > - TAILQ_FOREACH(child, &dev->children, link) { > > > + TAILQ_FOREACH_REVERSE(child, &dev->children, > > > device_list, link) { DEVICE_RESUME(child); > > > /* if resume fails, there's nothing we can > > > usefully do... */ } > > > > > > (Likely mangled whitespace.) > > > > > > I couldn't convince myself which order was "more" correct for > > > suspend and resume. > > > > Considering loading in starting point, I think suspend should go > > in reverse logic and resume in the same module load logic. > > So that dependent modules are suspended first and resumed after. > > Don't you agree? > > These are devices, and the ordering here is the order of sibling > devices on a given bus. That is, if you have a PCI bus with two em > interfaces, does it really matter if em0 suspends before em1 vs > after em1? I think it actually doesn't matter. The passes from > the multipass boot probe might make some sense to order on. > However, I don't think the order of siblings on a bus is meaningful > for suspend and resume (which is why I've never committed the above > patches). > > Specifically, there is no dependency relationship between siblings > on a bus. Certain buses may in fact have a dependency order of > sorts (vgapci0 comes to mind), but those buses should manage that. > There is no generic dependency between siblings that should be > encoded into subr_bus.c Generally siblings don't interact with each other directly, no. However, some modern chipsets *do* have strong relationship. For example, some chipsets reference SMB controller to get current configuration, e.g., function A depends on function B on the same chip. Jung-uk Kim From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 22:25:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC17C106564A; Fri, 19 Nov 2010 22:25:32 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BB3768FC17; Fri, 19 Nov 2010 22:25:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJMPWXr091370; Fri, 19 Nov 2010 22:25:32 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJMPWLW091369; Fri, 19 Nov 2010 22:25:32 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011192225.oAJMPWLW091369@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 19 Nov 2010 22:25:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215550 - head/tools/regression/bin/sh/expansion X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 22:25:32 -0000 Author: jilles Date: Fri Nov 19 22:25:32 2010 New Revision: 215550 URL: http://svn.freebsd.org/changeset/base/215550 Log: sh: Add a test that manipulates various long strings. It is quite effective at detecting mistakes in memalloc.c and code using it. It is somewhat slow, but some of the patches in my queue improve it. Added: head/tools/regression/bin/sh/expansion/arith6.0 (contents, props changed) Added: head/tools/regression/bin/sh/expansion/arith6.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/arith6.0 Fri Nov 19 22:25:32 2010 (r215550) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +v1=1\ +\ 1 +v2=D +v3=C123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 +f() { v4="$*"; } + +while [ ${#v2} -lt 1250 ]; do + eval $v2=$((3+${#v2})) $v3=$((4-${#v2})) + eval f $(($v2+ $v1 +$v3)) + if [ $v4 -ne 9 ]; then + echo bad: $v4 -ne 9 at ${#v2} + fi + v2=x$v2 + v3=y$v3 +done From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 22:26:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6466C1065697; Fri, 19 Nov 2010 22:26:10 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 321B48FC22; Fri, 19 Nov 2010 22:26:10 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id B9CFF46B29; Fri, 19 Nov 2010 17:26:09 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A5A8E8A009; Fri, 19 Nov 2010 17:25:48 -0500 (EST) From: John Baldwin To: "Jung-uk Kim" Date: Fri, 19 Nov 2010 17:16:03 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20101102; KDE/4.4.5; amd64; ; ) References: <201011191943.oAJJhv3i087205@svn.freebsd.org> <201011191646.12106.jhb@freebsd.org> <201011191703.26742.jkim@FreeBSD.org> In-Reply-To: <201011191703.26742.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201011191716.03279.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Fri, 19 Nov 2010 17:25:48 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: Attilio Rao , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 22:26:10 -0000 On Friday, November 19, 2010 5:03:25 pm Jung-uk Kim wrote: > On Friday 19 November 2010 04:46 pm, John Baldwin wrote: > > On Friday, November 19, 2010 4:31:44 pm Attilio Rao wrote: > > > 2010/11/19 John Baldwin : > > > > On Friday, November 19, 2010 4:09:28 pm Jung-uk Kim wrote: > > > >> On Friday 19 November 2010 02:43 pm, Attilio Rao wrote: > > > >> > Author: attilio > > > >> > Date: Fri Nov 19 19:43:56 2010 > > > >> > New Revision: 215544 > > > >> > URL: http://svn.freebsd.org/changeset/base/215544 > > > >> > > > > >> > Log: > > > >> > Scan the list in reverse order for the shutdown handlers > > > >> > of loaded modules. This way, when there is a dependency > > > >> > between two modules, the handler of the latter probed runs > > > >> > first. > > > >> > > > > >> > This is a similar approach as the modules are unloaded in > > > >> > the same linkerfile. > > > >> > > > > >> > Sponsored by: Sandvine Incorporated > > > >> > Submitted by: Nima Misaghian > > >> > dot com> MFC after: 1 week > > > >> > > > >> Hmm... It is not directly related but I was thinking about > > > >> doing similar things for sys/kern/subr_bus.c. What do you > > > >> think about the attached patch? > > > > > > > > Hmm, the patches for suspend and resume that I had for this > > > > took the opposite order, they did suspend in forward order, but > > > > resume in backwards order. Like so: > > > > > > > > --- //depot/vendor/freebsd/src/sys/kern/subr_bus.c > > > > 2010-11-17 22:30:24.000000000 0000 +++ > > > > //depot/user/jhb/acpipci/kern/subr_bus.c 2010-11-19 > > > > 17:19:02.000000000 00 @@ -3426,9 +3429,9 @@ > > > > TAILQ_FOREACH(child, &dev->children, link) { > > > > error = DEVICE_SUSPEND(child); > > > > if (error) { > > > > - for (child2 = > > > > TAILQ_FIRST(&dev->children); - > > > > child2 && child2 != child; - child2 > > > > = TAILQ_NEXT(child2, link)) + for (child2 > > > > = TAILQ_PREV(child, device_list, link); + > > > > child2 != NULL; > > > > + child2 = TAILQ_PREV(child2, > > > > device_list, link)) DEVICE_RESUME(child2); > > > > return (error); > > > > } > > > > @@ -3447,7 +3450,7 @@ > > > > { > > > > device_t child; > > > > > > > > - TAILQ_FOREACH(child, &dev->children, link) { > > > > + TAILQ_FOREACH_REVERSE(child, &dev->children, > > > > device_list, link) { DEVICE_RESUME(child); > > > > /* if resume fails, there's nothing we can > > > > usefully do... */ } > > > > > > > > (Likely mangled whitespace.) > > > > > > > > I couldn't convince myself which order was "more" correct for > > > > suspend and resume. > > > > > > Considering loading in starting point, I think suspend should go > > > in reverse logic and resume in the same module load logic. > > > So that dependent modules are suspended first and resumed after. > > > Don't you agree? > > > > These are devices, and the ordering here is the order of sibling > > devices on a given bus. That is, if you have a PCI bus with two em > > interfaces, does it really matter if em0 suspends before em1 vs > > after em1? I think it actually doesn't matter. The passes from > > the multipass boot probe might make some sense to order on. > > However, I don't think the order of siblings on a bus is meaningful > > for suspend and resume (which is why I've never committed the above > > patches). > > > > Specifically, there is no dependency relationship between siblings > > on a bus. Certain buses may in fact have a dependency order of > > sorts (vgapci0 comes to mind), but those buses should manage that. > > There is no generic dependency between siblings that should be > > encoded into subr_bus.c > > Generally siblings don't interact with each other directly, no. > However, some modern chipsets *do* have strong relationship. For > example, some chipsets reference SMB controller to get current > configuration, e.g., function A depends on function B on the same > chip. That may be true, but that is not generic to all buses and devices. That isn't even really generic to PCI. If there are specific instances where there are dependencies, the drivers for that hardware should manage that. If specific buses have specific orders, then they can manage that order explicitly in their own suspend and resume routines. However, I don't see a valid reason for enforcing a particular order among siblings for all devices. We certainly do enforce some orders with respect to children and parents (parents attach first and resume first, children detach first and suspend first, PCI even mandates this for powering down a bus), but the same is not true for siblings. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 22:32:01 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D10DC106564A; Fri, 19 Nov 2010 22:32:01 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 379B18FC14; Fri, 19 Nov 2010 22:32:00 +0000 (UTC) Received: by qwi4 with SMTP id 4so377431qwi.13 for ; Fri, 19 Nov 2010 14:32:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=7frISmsVwNx+6Esee14fFwDlzDu3keEmd5+vgN74SWQ=; b=ZJlq5REm+S+mP+XIOIKy8LvnUBx4e78VqqMsBoWlSubPEvYF/RDGKmrig/FvV4VJXM 6LKJDNZHtPIYek/Np8l7cQxzdoJ4szzKGE12ERnUDR82Iaj6gg6wWyNr0UjybxJkrmNW wJ4WF9MisTOnfNdR13E0yNWFwB1dUnK2i85uU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=j6zOpb1tGAfOup/Dxcfhlay7LEMOpJrBDhb7NYjUXWZqV7djQcxE3Z6wJiTM1CtctX GxDIdHqPlxRNFtUjXmZfO2UWkvjG+eruYA7Q4NELQzTWWbqxa7sLF9Xt1/utf9A2E6iJ bWWkCUo7a2kzmfH2FvWW++3KVr9qVVr5kTmws= MIME-Version: 1.0 Received: by 10.229.191.130 with SMTP id dm2mr2216021qcb.256.1290205920263; Fri, 19 Nov 2010 14:32:00 -0800 (PST) Sender: asmrookie@gmail.com Received: by 10.229.31.9 with HTTP; Fri, 19 Nov 2010 14:32:00 -0800 (PST) In-Reply-To: <201011191642.00761.jhb@freebsd.org> References: <201011191943.oAJJhv3i087205@svn.freebsd.org> <201011191617.51552.jhb@freebsd.org> <201011191642.00761.jhb@freebsd.org> Date: Fri, 19 Nov 2010 23:32:00 +0100 X-Google-Sender-Auth: upgcOOZLbIrz_zJ1UxOksVtobMk Message-ID: From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 22:32:01 -0000 2010/11/19 John Baldwin : > On Friday, November 19, 2010 4:27:27 pm Attilio Rao wrote: >> 2010/11/19 John Baldwin : >> > On Friday, November 19, 2010 2:43:57 pm Attilio Rao wrote: >> >> Author: attilio >> >> Date: Fri Nov 19 19:43:56 2010 >> >> New Revision: 215544 >> >> URL: http://svn.freebsd.org/changeset/base/215544 >> >> >> >> Log: >> >> =C2=A0 Scan the list in reverse order for the shutdown handlers of lo= aded modules. >> >> =C2=A0 This way, when there is a dependency between two modules, the = handler of the >> >> =C2=A0 latter probed runs first. >> >> >> >> =C2=A0 This is a similar approach as the modules are unloaded in the = same >> >> =C2=A0 linkerfile. >> >> >> >> =C2=A0 Sponsored by: =C2=A0 =C2=A0 =C2=A0 Sandvine Incorporated >> >> =C2=A0 Submitted by: =C2=A0 =C2=A0 =C2=A0 Nima Misaghian >> >> =C2=A0 MFC after: =C2=A01 week >> >> >> >> Modified: >> >> =C2=A0 head/sys/kern/kern_module.c >> >> >> >> Modified: head/sys/kern/kern_module.c >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >> >> --- head/sys/kern/kern_module.c =C2=A0 =C2=A0 =C2=A0 Fri Nov 19 18:59= :35 2010 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r215543) >> >> +++ head/sys/kern/kern_module.c =C2=A0 =C2=A0 =C2=A0 Fri Nov 19 19:43= :56 2010 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r215544) >> >> @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); >> >> >> >> =C2=A0static MALLOC_DEFINE(M_MODULE, "module", "module data structure= s"); >> >> >> >> -typedef TAILQ_HEAD(, module) modulelist_t; >> >> +typedef TAILQ_HEAD(modulelst, module) modulelist_t; >> > >> > Is modulelist already taken? =C2=A0If not, we should probably just ret= ire >> > 'modulelist_t' and replace it with 'struct modulelist'. >> >> Note that I used modulelst, not modulelist. >> Probabilly, if you think the name may be still confusing, we can >> pickup one another further. > > Yes, I'd much prefer 'modulelist' with the extra 'i' as it is more readab= le. > If you go that route, I think you can drop modulelist_t since style(9) > discourages foo_t types unless they are required by a standard. I think that this patch should make it? Thanks, Attilio Index: sys/kern/kern_module.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/kern/kern_module.c (revision 215544) +++ sys/kern/kern_module.c (working copy) @@ -46,7 +46,6 @@ static MALLOC_DEFINE(M_MODULE, "module", "module data structures"); -typedef TAILQ_HEAD(modulelst, module) modulelist_t; struct module { TAILQ_ENTRY(module) link; /* chain together all modules */ TAILQ_ENTRY(module) flink; /* all modules in a file */ @@ -61,7 +60,7 @@ #define MOD_EVENT(mod, type) (mod)->handler((mod), (type), (mod)->arg) -static modulelist_t modules; +static TAILQ_HEAD(modulelist, module) modules; struct sx modules_sx; static int nextid =3D 1; static void module_shutdown(void *, int); @@ -101,7 +100,7 @@ return; mtx_lock(&Giant); MOD_SLOCK; - TAILQ_FOREACH_REVERSE(mod, &modules, modulelst, link) + TAILQ_FOREACH_REVERSE(mod, &modules, modulelist, link) MOD_EVENT(mod, MOD_SHUTDOWN); MOD_SUNLOCK; mtx_unlock(&Giant); From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 22:41:01 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C74A9106566C; Fri, 19 Nov 2010 22:41:01 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 261208FC15; Fri, 19 Nov 2010 22:41:00 +0000 (UTC) Received: by qyk35 with SMTP id 35so12602qyk.13 for ; Fri, 19 Nov 2010 14:41:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=RGXYciazipDUEA69GUP6fG7Kk+BdHjnyOA3kgYQDOM4=; b=u0kYukxQm2XA9J8ugKUIuKGE6hUirnd9KmMsjkyZOkzJVT1nPro+j6o8ww+0lIFJty TmAVYRmRJuzfsI5DuDa46stl1RebyWSqpYKpF2vjOLH7cajSeeo78+CCSvrgqWWkos01 7+MqoeKBDtwnH08fR7xhi2cGg5Eo/mbAf9+KM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=DDaHHxzRw3rpFLk7tKKw8SWTrAXSkEE9UgDZl3Fl34r0VKkBxOKppZ6Qor/bDKKt84 +tp7M340RECJL6OlSapizpMcZfRa/YdpAQlaa0DDj2wl6eW5OLGHvwMZ9jrw9TvP1UKt aQcFS2EFuA5D7aOraTnQG11yfyTNqYuLBfBsg= MIME-Version: 1.0 Received: by 10.229.96.70 with SMTP id g6mr2218473qcn.294.1290206460425; Fri, 19 Nov 2010 14:41:00 -0800 (PST) Sender: asmrookie@gmail.com Received: by 10.229.31.9 with HTTP; Fri, 19 Nov 2010 14:41:00 -0800 (PST) In-Reply-To: <201011191716.03279.jhb@freebsd.org> References: <201011191943.oAJJhv3i087205@svn.freebsd.org> <201011191646.12106.jhb@freebsd.org> <201011191703.26742.jkim@FreeBSD.org> <201011191716.03279.jhb@freebsd.org> Date: Fri, 19 Nov 2010 23:41:00 +0100 X-Google-Sender-Auth: Qx-kNwqzYAIOMJlx81w_dJYXPco Message-ID: From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Jung-uk Kim Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 22:41:02 -0000 2010/11/19 John Baldwin : > On Friday, November 19, 2010 5:03:25 pm Jung-uk Kim wrote: >> On Friday 19 November 2010 04:46 pm, John Baldwin wrote: >> > On Friday, November 19, 2010 4:31:44 pm Attilio Rao wrote: >> > > 2010/11/19 John Baldwin : >> > > > On Friday, November 19, 2010 4:09:28 pm Jung-uk Kim wrote: >> > > >> On Friday 19 November 2010 02:43 pm, Attilio Rao wrote: >> > > >> > Author: attilio >> > > >> > Date: Fri Nov 19 19:43:56 2010 >> > > >> > New Revision: 215544 >> > > >> > URL: http://svn.freebsd.org/changeset/base/215544 >> > > >> > >> > > >> > Log: >> > > >> > =C2=A0 Scan the list in reverse order for the shutdown handlers >> > > >> > of loaded modules. This way, when there is a dependency >> > > >> > between two modules, the handler of the latter probed runs >> > > >> > first. >> > > >> > >> > > >> > =C2=A0 This is a similar approach as the modules are unloaded i= n >> > > >> > the same linkerfile. >> > > >> > >> > > >> > =C2=A0 Sponsored by: =C2=A0 =C2=A0 Sandvine Incorporated >> > > >> > =C2=A0 Submitted by: =C2=A0 =C2=A0 Nima Misaghian > > > >> > dot com> MFC after: =C2=A0 =C2=A0 =C2=A0 =C2=A01 week >> > > >> >> > > >> Hmm... =C2=A0It is not directly related but I was thinking about >> > > >> doing similar things for sys/kern/subr_bus.c. =C2=A0What do you >> > > >> think about the attached patch? >> > > > >> > > > Hmm, the patches for suspend and resume that I had for this >> > > > took the opposite order, they did suspend in forward order, but >> > > > resume in backwards order. Like so: >> > > > >> > > > --- //depot/vendor/freebsd/src/sys/kern/subr_bus.c >> > > > 2010-11-17 22:30:24.000000000 0000 +++ >> > > > //depot/user/jhb/acpipci/kern/subr_bus.c =C2=A0 =C2=A02010-11-19 >> > > > 17:19:02.000000000 00 @@ -3426,9 +3429,9 @@ >> > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0TAILQ_FOREACH(child, &dev->children, li= nk) { >> > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0error =3D D= EVICE_SUSPEND(child); >> > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (error) = { >> > > > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 for (child2 =3D >> > > > TAILQ_FIRST(&dev->children); - >> > > > child2 && child2 !=3D child; - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0child2 >> > > > =3D TAILQ_NEXT(child2, link)) + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 for (child2 >> > > > =3D TAILQ_PREV(child, device_list, link); + >> > > > =C2=A0 =C2=A0 =C2=A0child2 !=3D NULL; >> > > > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0child2 =3D TAILQ_PREV(child2, >> > > > device_list, link)) DEVICE_RESUME(child2); >> > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0return (error); >> > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0} >> > > > @@ -3447,7 +3450,7 @@ >> > > > =C2=A0{ >> > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0device_t =C2=A0 =C2=A0 =C2=A0 =C2=A0chi= ld; >> > > > >> > > > - =C2=A0 =C2=A0 =C2=A0 TAILQ_FOREACH(child, &dev->children, link) = { >> > > > + =C2=A0 =C2=A0 =C2=A0 TAILQ_FOREACH_REVERSE(child, &dev->children= , >> > > > device_list, link) { DEVICE_RESUME(child); >> > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* if resum= e fails, there's nothing we can >> > > > usefully do... */ } >> > > > >> > > > (Likely mangled whitespace.) >> > > > >> > > > I couldn't convince myself which order was "more" correct for >> > > > suspend and resume. >> > > >> > > Considering loading in starting point, I think suspend should go >> > > in reverse logic and resume in the same module load logic. >> > > So that dependent modules are suspended first and resumed after. >> > > Don't you agree? >> > >> > These are devices, and the ordering here is the order of sibling >> > devices on a given bus. =C2=A0That is, if you have a PCI bus with two = em >> > interfaces, does it really matter if em0 suspends before em1 vs >> > after em1? =C2=A0I think it actually doesn't matter. =C2=A0The passes = from >> > the multipass boot probe might make some sense to order on. >> > However, I don't think the order of siblings on a bus is meaningful >> > for suspend and resume (which is why I've never committed the above >> > patches). >> > >> > Specifically, there is no dependency relationship between siblings >> > on a bus. Certain buses may in fact have a dependency order of >> > sorts (vgapci0 comes to mind), but those buses should manage that. >> > There is no generic dependency between siblings that should be >> > encoded into subr_bus.c >> >> Generally siblings don't interact with each other directly, no. >> However, some modern chipsets *do* have strong relationship. =C2=A0For >> example, some chipsets reference SMB controller to get current >> configuration, e.g., function A depends on function B on the same >> chip. > > That may be true, but that is not generic to all buses and devices. > That isn't even really generic to PCI. =C2=A0If there are specific instan= ces > where there are dependencies, the drivers for that hardware should > manage that. =C2=A0If specific buses have specific orders, then they can > manage that order explicitly in their own suspend and resume routines. > However, I don't see a valid reason for enforcing a particular order > among siblings for all devices. =C2=A0We certainly do enforce some orders > with respect to children and parents (parents attach first and resume > first, children detach first and suspend first, PCI even mandates this > for powering down a bus), but the same is not true for siblings. However, it would be good if any ordering is maintained between devices linked via MODDEPEND stuff. It happens they may also be sibillings, and not havign parent-child relationship in some cases, but I'm also wondering if maybe they should ensure consistency in their code itself rather than relying strongly on ordering by the PCi/whatever subsystem? Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-head@FreeBSD.ORG Fri Nov 19 23:12:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id D30EC1065670; Fri, 19 Nov 2010 23:12:51 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: John Baldwin Date: Fri, 19 Nov 2010 18:12:30 -0500 User-Agent: KMail/1.6.2 References: <201011191943.oAJJhv3i087205@svn.freebsd.org> <201011191703.26742.jkim@FreeBSD.org> <201011191716.03279.jhb@freebsd.org> In-Reply-To: <201011191716.03279.jhb@freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201011191812.43712.jkim@FreeBSD.org> Cc: Attilio Rao , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215544 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 23:12:52 -0000 On Friday 19 November 2010 05:16 pm, John Baldwin wrote: > On Friday, November 19, 2010 5:03:25 pm Jung-uk Kim wrote: > > On Friday 19 November 2010 04:46 pm, John Baldwin wrote: > > > On Friday, November 19, 2010 4:31:44 pm Attilio Rao wrote: > > > > 2010/11/19 John Baldwin : > > > > > On Friday, November 19, 2010 4:09:28 pm Jung-uk Kim wrote: > > > > >> On Friday 19 November 2010 02:43 pm, Attilio Rao wrote: > > > > >> > Author: attilio > > > > >> > Date: Fri Nov 19 19:43:56 2010 > > > > >> > New Revision: 215544 > > > > >> > URL: http://svn.freebsd.org/changeset/base/215544 > > > > >> > > > > > >> > Log: > > > > >> > Scan the list in reverse order for the shutdown > > > > >> > handlers of loaded modules. This way, when there is a > > > > >> > dependency between two modules, the handler of the > > > > >> > latter probed runs first. > > > > >> > > > > > >> > This is a similar approach as the modules are unloaded > > > > >> > in the same linkerfile. > > > > >> > > > > > >> > Sponsored by: Sandvine Incorporated > > > > >> > Submitted by: Nima Misaghian > > > >> > sandvine dot com> MFC after: 1 week > > > > >> > > > > >> Hmm... It is not directly related but I was thinking > > > > >> about doing similar things for sys/kern/subr_bus.c. What > > > > >> do you think about the attached patch? > > > > > > > > > > Hmm, the patches for suspend and resume that I had for this > > > > > took the opposite order, they did suspend in forward order, > > > > > but resume in backwards order. Like so: > > > > > > > > > > --- //depot/vendor/freebsd/src/sys/kern/subr_bus.c > > > > > 2010-11-17 22:30:24.000000000 0000 +++ > > > > > //depot/user/jhb/acpipci/kern/subr_bus.c 2010-11-19 > > > > > 17:19:02.000000000 00 @@ -3426,9 +3429,9 @@ > > > > > TAILQ_FOREACH(child, &dev->children, link) { > > > > > error = DEVICE_SUSPEND(child); > > > > > if (error) { > > > > > - for (child2 = > > > > > TAILQ_FIRST(&dev->children); - > > > > > child2 && child2 != child; - > > > > > child2 = TAILQ_NEXT(child2, link)) + > > > > > for (child2 = TAILQ_PREV(child, device_list, link); + > > > > > child2 != NULL; > > > > > + child2 = TAILQ_PREV(child2, > > > > > device_list, link)) DEVICE_RESUME(child2); > > > > > return (error); > > > > > } > > > > > @@ -3447,7 +3450,7 @@ > > > > > { > > > > > device_t child; > > > > > > > > > > - TAILQ_FOREACH(child, &dev->children, link) { > > > > > + TAILQ_FOREACH_REVERSE(child, &dev->children, > > > > > device_list, link) { DEVICE_RESUME(child); > > > > > /* if resume fails, there's nothing we can > > > > > usefully do... */ } > > > > > > > > > > (Likely mangled whitespace.) > > > > > > > > > > I couldn't convince myself which order was "more" correct > > > > > for suspend and resume. > > > > > > > > Considering loading in starting point, I think suspend should > > > > go in reverse logic and resume in the same module load logic. > > > > So that dependent modules are suspended first and resumed > > > > after. Don't you agree? > > > > > > These are devices, and the ordering here is the order of > > > sibling devices on a given bus. That is, if you have a PCI bus > > > with two em interfaces, does it really matter if em0 suspends > > > before em1 vs after em1? I think it actually doesn't matter. > > > The passes from the multipass boot probe might make some sense > > > to order on. However, I don't think the order of siblings on a > > > bus is meaningful for suspend and resume (which is why I've > > > never committed the above patches). > > > > > > Specifically, there is no dependency relationship between > > > siblings on a bus. Certain buses may in fact have a dependency > > > order of sorts (vgapci0 comes to mind), but those buses should > > > manage that. There is no generic dependency between siblings > > > that should be encoded into subr_bus.c > > > > Generally siblings don't interact with each other directly, no. > > However, some modern chipsets *do* have strong relationship. For > > example, some chipsets reference SMB controller to get current > > configuration, e.g., function A depends on function B on the same > > chip. > > That may be true, but that is not generic to all buses and devices. > That isn't even really generic to PCI. If there are specific > instances where there are dependencies, the drivers for that > hardware should manage that. If specific buses have specific > orders, then they can manage that order explicitly in their own > suspend and resume routines. However, I don't see a valid reason > for enforcing a particular order among siblings for all devices. > We certainly do enforce some orders with respect to children and > parents (parents attach first and resume first, children detach > first and suspend first, PCI even mandates this for powering down a > bus), but the same is not true for siblings. It may be unnecessary but I like consistency. ;-) Jung-uk Kim From owner-svn-src-head@FreeBSD.ORG Sat Nov 20 07:36:44 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48A63106564A; Sat, 20 Nov 2010 07:36:44 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CFA788FC13; Sat, 20 Nov 2010 07:36:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAK7ahQ8003800; Sat, 20 Nov 2010 07:36:43 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAK7ahWK003798; Sat, 20 Nov 2010 07:36:43 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201011200736.oAK7ahWK003798@svn.freebsd.org> From: Lawrence Stewart Date: Sat, 20 Nov 2010 07:36:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215552 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 07:36:44 -0000 Author: lstewart Date: Sat Nov 20 07:36:43 2010 New Revision: 215552 URL: http://svn.freebsd.org/changeset/base/215552 Log: When enabling or disabling SIFTR with a VIMAGE kernel, ensure we add or remove the SIFTR pfil(9) hook functions to or from all network stacks. This patch allows packets inbound or outbound from a vnet to be "seen" by SIFTR. Additional work is required to allow SIFTR to actually generate log messages for all vnet related packets because the siftr_findinpcb() function does not yet search for inpcbs across all vnets. This issue will be fixed separately. Reported and tested by: David Hayes MFC after: 3 days Modified: head/sys/netinet/siftr.c Modified: head/sys/netinet/siftr.c ============================================================================== --- head/sys/netinet/siftr.c Sat Nov 20 04:54:58 2010 (r215551) +++ head/sys/netinet/siftr.c Sat Nov 20 07:36:43 2010 (r215552) @@ -1109,26 +1109,38 @@ ret6: static int siftr_pfil(int action) { - struct pfil_head *pfh_inet = pfil_head_get(PFIL_TYPE_AF, AF_INET); + struct pfil_head *pfh_inet; #ifdef SIFTR_IPV6 - struct pfil_head *pfh_inet6 = pfil_head_get(PFIL_TYPE_AF, AF_INET6); + struct pfil_head *pfh_inet6; #endif + VNET_ITERATOR_DECL(vnet_iter); - if (action == HOOK) { - pfil_add_hook(siftr_chkpkt, NULL, - PFIL_IN | PFIL_OUT | PFIL_WAITOK, pfh_inet); + VNET_LIST_RLOCK(); + VNET_FOREACH(vnet_iter) { + CURVNET_SET(vnet_iter); + pfh_inet = pfil_head_get(PFIL_TYPE_AF, AF_INET); #ifdef SIFTR_IPV6 - pfil_add_hook(siftr_chkpkt6, NULL, - PFIL_IN | PFIL_OUT | PFIL_WAITOK, pfh_inet6); + pfh_inet6 = pfil_head_get(PFIL_TYPE_AF, AF_INET6); #endif - } else if (action == UNHOOK) { - pfil_remove_hook(siftr_chkpkt, NULL, - PFIL_IN | PFIL_OUT | PFIL_WAITOK, pfh_inet); + + if (action == HOOK) { + pfil_add_hook(siftr_chkpkt, NULL, + PFIL_IN | PFIL_OUT | PFIL_WAITOK, pfh_inet); +#ifdef SIFTR_IPV6 + pfil_add_hook(siftr_chkpkt6, NULL, + PFIL_IN | PFIL_OUT | PFIL_WAITOK, pfh_inet6); +#endif + } else if (action == UNHOOK) { + pfil_remove_hook(siftr_chkpkt, NULL, + PFIL_IN | PFIL_OUT | PFIL_WAITOK, pfh_inet); #ifdef SIFTR_IPV6 - pfil_remove_hook(siftr_chkpkt6, NULL, - PFIL_IN | PFIL_OUT | PFIL_WAITOK, pfh_inet6); + pfil_remove_hook(siftr_chkpkt6, NULL, + PFIL_IN | PFIL_OUT | PFIL_WAITOK, pfh_inet6); #endif + } + CURVNET_RESTORE(); } + VNET_LIST_RUNLOCK(); return (0); } From owner-svn-src-head@FreeBSD.ORG Sat Nov 20 08:40:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A46F1065674; Sat, 20 Nov 2010 08:40:37 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A49D8FC18; Sat, 20 Nov 2010 08:40:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAK8ebut005086; Sat, 20 Nov 2010 08:40:37 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAK8ebJd005084; Sat, 20 Nov 2010 08:40:37 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201011200840.oAK8ebJd005084@svn.freebsd.org> From: Lawrence Stewart Date: Sat, 20 Nov 2010 08:40:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215553 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 08:40:37 -0000 Author: lstewart Date: Sat Nov 20 08:40:37 2010 New Revision: 215553 URL: http://svn.freebsd.org/changeset/base/215553 Log: Fix a minor code redundancy nit. MFC after: 3 days Modified: head/sys/netinet/siftr.c Modified: head/sys/netinet/siftr.c ============================================================================== --- head/sys/netinet/siftr.c Sat Nov 20 07:36:43 2010 (r215552) +++ head/sys/netinet/siftr.c Sat Nov 20 08:40:37 2010 (r215553) @@ -736,14 +736,12 @@ siftr_findinpcb(int ipver, struct ip *ip ss->nskip_in_inpcb++; else ss->nskip_out_inpcb++; - - INP_INFO_RUNLOCK(&V_tcbinfo); } else { /* Acquire the inpcb lock. */ INP_UNLOCK_ASSERT(inp); INP_RLOCK(inp); - INP_INFO_RUNLOCK(&V_tcbinfo); } + INP_INFO_RUNLOCK(&V_tcbinfo); return (inp); } From owner-svn-src-head@FreeBSD.ORG Sat Nov 20 12:27:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AFC710656A3; Sat, 20 Nov 2010 12:27:40 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6AA008FC41; Sat, 20 Nov 2010 12:27:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKCRe3f011732; Sat, 20 Nov 2010 12:27:40 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKCRemT011730; Sat, 20 Nov 2010 12:27:40 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201011201227.oAKCRemT011730@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 20 Nov 2010 12:27:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215559 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 12:27:40 -0000 Author: bz Date: Sat Nov 20 12:27:40 2010 New Revision: 215559 URL: http://svn.freebsd.org/changeset/base/215559 Log: In case of an early return from the function there is no need to zero the route upfront, so defer as long as we can. MFC after: 3 days Modified: head/sys/netinet6/nd6_nbr.c Modified: head/sys/netinet6/nd6_nbr.c ============================================================================== --- head/sys/netinet6/nd6_nbr.c Sat Nov 20 12:26:31 2010 (r215558) +++ head/sys/netinet6/nd6_nbr.c Sat Nov 20 12:27:40 2010 (r215559) @@ -390,8 +390,6 @@ nd6_ns_output(struct ifnet *ifp, const s caddr_t mac; struct route_in6 ro; - bzero(&ro, sizeof(ro)); - if (IN6_IS_ADDR_MULTICAST(taddr6)) return; @@ -418,6 +416,8 @@ nd6_ns_output(struct ifnet *ifp, const s return; m->m_pkthdr.rcvif = NULL; + bzero(&ro, sizeof(ro)); + if (daddr6 == NULL || IN6_IS_ADDR_MULTICAST(daddr6)) { m->m_flags |= M_MCAST; im6o.im6o_multicast_ifp = ifp; From owner-svn-src-head@FreeBSD.ORG Sat Nov 20 14:14:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 963351065696; Sat, 20 Nov 2010 14:14:52 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 84A7C8FC0A; Sat, 20 Nov 2010 14:14:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKEEqHF014687; Sat, 20 Nov 2010 14:14:52 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKEEqEE014679; Sat, 20 Nov 2010 14:14:52 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011201414.oAKEEqEE014679@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 20 Nov 2010 14:14:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215567 - head/bin/sh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 14:14:52 -0000 Author: jilles Date: Sat Nov 20 14:14:52 2010 New Revision: 215567 URL: http://svn.freebsd.org/changeset/base/215567 Log: sh: Code size optimizations to buffered output. This is mainly less use of the outc macro. No functional change is intended, but code size is about 2K less on i386. Modified: head/bin/sh/eval.c head/bin/sh/expand.c head/bin/sh/main.c head/bin/sh/options.c head/bin/sh/output.c head/bin/sh/output.h head/bin/sh/var.c Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Sat Nov 20 13:30:48 2010 (r215566) +++ head/bin/sh/eval.c Sat Nov 20 14:14:52 2010 (r215567) @@ -699,13 +699,13 @@ evalcommand(union node *cmd, int flags, for (sp = varlist.list ; sp ; sp = sp->next) { if (sep != 0) out2c(' '); - p = sp->text; - while (*p != '=' && *p != '\0') - out2c(*p++); - if (*p != '\0') { - out2c(*p++); + p = strchr(sp->text, '='); + if (p != NULL) { + p++; + outbin(sp->text, p - sp->text, out2); out2qstr(p); - } + } else + out2qstr(sp->text); sep = ' '; } for (sp = arglist.list ; sp ; sp = sp->next) { Modified: head/bin/sh/expand.c ============================================================================== --- head/bin/sh/expand.c Sat Nov 20 13:30:48 2010 (r215566) +++ head/bin/sh/expand.c Sat Nov 20 14:14:52 2010 (r215567) @@ -1592,9 +1592,7 @@ wordexpcmd(int argc, char **argv) for (i = 1, len = 0; i < argc; i++) len += strlen(argv[i]); out1fmt("%08x", (int)len); - for (i = 1; i < argc; i++) { - out1str(argv[i]); - out1c('\0'); - } + for (i = 1; i < argc; i++) + outbin(argv[i], strlen(argv[i]) + 1, out1); return (0); } Modified: head/bin/sh/main.c ============================================================================== --- head/bin/sh/main.c Sat Nov 20 13:30:48 2010 (r215566) +++ head/bin/sh/main.c Sat Nov 20 14:14:52 2010 (r215567) @@ -128,10 +128,8 @@ main(int argc, char *argv[]) exitshell(exitstatus); } reset(); - if (exception == EXINT) { - out2c('\n'); - flushout(&errout); - } + if (exception == EXINT) + out2fmt_flush("\n"); popstackmark(&smark); FORCEINTON; /* enable interrupts */ if (state == 1) Modified: head/bin/sh/options.c ============================================================================== --- head/bin/sh/options.c Sat Nov 20 13:30:48 2010 (r215566) +++ head/bin/sh/options.c Sat Nov 20 14:14:52 2010 (r215567) @@ -261,13 +261,12 @@ minus_o(char *name, int val) optlist[i].val ? "on" : "off"); } else { /* Output suitable for re-input to shell. */ - for (i = 0; i < NOPTS; i++) { - if (i % 6 == 0) - out1str(i == 0 ? "set" : "\nset"); - out1fmt(" %co %s", optlist[i].val ? '-' : '+', - optlist[i].name); - } - out1c('\n'); + for (i = 0; i < NOPTS; i++) + out1fmt("%s %co %s%s", + i % 6 == 0 ? "set" : "", + optlist[i].val ? '-' : '+', + optlist[i].name, + i % 6 == 5 || i == NOPTS - 1 ? "\n" : ""); } } else { for (i = 0; i < NOPTS; i++) Modified: head/bin/sh/output.c ============================================================================== --- head/bin/sh/output.c Sat Nov 20 13:30:48 2010 (r215566) +++ head/bin/sh/output.c Sat Nov 20 14:14:52 2010 (r215567) @@ -96,6 +96,12 @@ RESET { void +outcslow(int c, struct output *file) +{ + outc(c, file); +} + +void out1str(const char *p) { outstr(p, out1); @@ -149,19 +155,19 @@ outqstr(const char *p, struct output *fi case '\'': /* Can't quote single quotes inside single quotes. */ if (inquotes) - outc('\'', file); + outcslow('\'', file); inquotes = 0; outstr("\\'", file); break; default: if (!inquotes) - outc('\'', file); + outcslow('\'', file); inquotes = 1; outc(ch, file); } } if (inquotes) - outc('\'', file); + outcslow('\'', file); } void Modified: head/bin/sh/output.h ============================================================================== --- head/bin/sh/output.h Sat Nov 20 13:30:48 2010 (r215566) +++ head/bin/sh/output.h Sat Nov 20 14:14:52 2010 (r215567) @@ -54,6 +54,7 @@ extern struct output *out1; /* &memout i extern struct output *out2; /* &memout if backquote with 2>&1, otherwise &errout */ +void outcslow(int, struct output *); void out1str(const char *); void out1qstr(const char *); void out2str(const char *); @@ -74,7 +75,7 @@ int xwrite(int, const char *, int); #define outc(c, file) (--(file)->nleft < 0? (emptyoutbuf(file), *(file)->nextc++ = (c)) : (*(file)->nextc++ = (c))) #define out1c(c) outc(c, out1); -#define out2c(c) outc(c, out2); +#define out2c(c) outcslow(c, out2); #define OUTPUT_INCL #endif Modified: head/bin/sh/var.c ============================================================================== --- head/bin/sh/var.c Sat Nov 20 13:30:48 2010 (r215566) +++ head/bin/sh/var.c Sat Nov 20 14:14:52 2010 (r215567) @@ -633,10 +633,10 @@ showvarscmd(int argc __unused, char **ar qsort(vars, n, sizeof(*vars), var_compare); for (i = 0; i < n; i++) { - for (s = vars[i]; *s != '='; s++) - out1c(*s); - out1c('='); - out1qstr(s + 1); + s = strchr(vars[i], '='); + s++; + outbin(vars[i], s - vars[i], out1); + out1qstr(s); out1c('\n'); } ckfree(vars); @@ -710,12 +710,15 @@ found:; out1str(cmdname); out1c(' '); } - for (p = vp->text ; *p != '=' ; p++) - out1c(*p); + p = strchr(vp->text, '='); if (values && !(vp->flags & VUNSET)) { - out1c('='); - out1qstr(p + 1); - } + p++; + outbin(vp->text, p - vp->text, + out1); + out1qstr(p); + } else + outbin(vp->text, p - vp->text, + out1); out1c('\n'); } } From owner-svn-src-head@FreeBSD.ORG Sat Nov 20 14:30:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2467E106564A; Sat, 20 Nov 2010 14:30:29 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 137D98FC12; Sat, 20 Nov 2010 14:30:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKEUS37015177; Sat, 20 Nov 2010 14:30:28 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKEUSDh015175; Sat, 20 Nov 2010 14:30:28 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201011201430.oAKEUSDh015175@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 20 Nov 2010 14:30:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215568 - head/bin/sh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 14:30:29 -0000 Author: jilles Date: Sat Nov 20 14:30:28 2010 New Revision: 215568 URL: http://svn.freebsd.org/changeset/base/215568 Log: sh: Remove the check that alpha/name/in_name chars are not CTL* bytes. Since is_alpha/is_name/is_in_name were made ASCII-only, this can no longer happen. Additionally, the check was wrong because it did not include the new CTLQUOTEEND. Modified: head/bin/sh/mksyntax.c Modified: head/bin/sh/mksyntax.c ============================================================================== --- head/bin/sh/mksyntax.c Sat Nov 20 14:14:52 2010 (r215567) +++ head/bin/sh/mksyntax.c Sat Nov 20 14:30:28 2010 (r215568) @@ -342,9 +342,9 @@ print(const char *name) static const char *macro[] = { "#define is_digit(c)\t((is_type+SYNBASE)[(int)c] & ISDIGIT)", "#define is_eof(c)\t((c) == PEOF)", - "#define is_alpha(c)\t(((c) < CTLESC || (c) > CTLQUOTEMARK) && (is_type+SYNBASE)[(int)c] & (ISUPPER|ISLOWER))", - "#define is_name(c)\t(((c) < CTLESC || (c) > CTLQUOTEMARK) && (is_type+SYNBASE)[(int)c] & (ISUPPER|ISLOWER|ISUNDER))", - "#define is_in_name(c)\t(((c) < CTLESC || (c) > CTLQUOTEMARK) && (is_type+SYNBASE)[(int)c] & (ISUPPER|ISLOWER|ISUNDER|ISDIGIT))", + "#define is_alpha(c)\t((is_type+SYNBASE)[(int)c] & (ISUPPER|ISLOWER))", + "#define is_name(c)\t((is_type+SYNBASE)[(int)c] & (ISUPPER|ISLOWER|ISUNDER))", + "#define is_in_name(c)\t((is_type+SYNBASE)[(int)c] & (ISUPPER|ISLOWER|ISUNDER|ISDIGIT))", "#define is_special(c)\t((is_type+SYNBASE)[(int)c] & (ISSPECL|ISDIGIT))", NULL }; From owner-svn-src-head@FreeBSD.ORG Sat Nov 20 15:22:17 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 070B8106564A; Sat, 20 Nov 2010 15:22:17 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CFD878FC19; Sat, 20 Nov 2010 15:22:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKFMGGh016692; Sat, 20 Nov 2010 15:22:16 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKFMGTD016690; Sat, 20 Nov 2010 15:22:16 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201011201522.oAKFMGTD016690@svn.freebsd.org> From: Kevin Lo Date: Sat, 20 Nov 2010 15:22:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215569 - head/usr.bin/vmstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 15:22:17 -0000 Author: kevlo Date: Sat Nov 20 15:22:16 2010 New Revision: 215569 URL: http://svn.freebsd.org/changeset/base/215569 Log: Remove unused variable Modified: head/usr.bin/vmstat/vmstat.c Modified: head/usr.bin/vmstat/vmstat.c ============================================================================== --- head/usr.bin/vmstat/vmstat.c Sat Nov 20 14:30:28 2010 (r215568) +++ head/usr.bin/vmstat/vmstat.c Sat Nov 20 15:22:16 2010 (r215569) @@ -428,7 +428,7 @@ fill_pcpu(struct pcpu ***pcpup, int* max { struct pcpu **pcpu; - int maxcpu, size, i; + int maxcpu, i; *pcpup = NULL; From owner-svn-src-head@FreeBSD.ORG Sat Nov 20 16:03:53 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A6C2106566C; Sat, 20 Nov 2010 16:03:53 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7815A8FC12; Sat, 20 Nov 2010 16:03:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKG3rSi017859; Sat, 20 Nov 2010 16:03:53 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKG3rED017856; Sat, 20 Nov 2010 16:03:53 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201011201603.oAKG3rED017856@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Sat, 20 Nov 2010 16:03:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215570 - head/sbin/geom/class/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 16:03:53 -0000 Author: ae Date: Sat Nov 20 16:03:53 2010 New Revision: 215570 URL: http://svn.freebsd.org/changeset/base/215570 Log: Add to gpart(8) an ability to backup partition table and restore it from given backup. Discussed with: geom@ Approved by: kib (mentor) MFC after: 1 week Modified: head/sbin/geom/class/part/geom_part.c head/sbin/geom/class/part/gpart.8 Modified: head/sbin/geom/class/part/geom_part.c ============================================================================== --- head/sbin/geom/class/part/geom_part.c Sat Nov 20 15:22:16 2010 (r215569) +++ head/sbin/geom/class/part/geom_part.c Sat Nov 20 16:03:53 2010 (r215570) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -85,6 +86,8 @@ static int gpart_show_hasopt(struct gctl static void gpart_write_partcode(struct ggeom *, int, void *, ssize_t); static void gpart_write_partcode_vtoc8(struct ggeom *, int, void *); static void gpart_print_error(const char *); +static void gpart_backup(struct gctl_req *, unsigned int); +static void gpart_restore(struct gctl_req *, unsigned int); struct g_command PUBSYM(class_commands)[] = { { "add", 0, gpart_issue, { @@ -97,6 +100,11 @@ struct g_command PUBSYM(class_commands)[ G_OPT_SENTINEL }, "[-b start] [-s size] -t type [-i index] [-l label] [-f flags] geom" }, + { "backup", 0, gpart_backup, { + { 'l', "backup_labels", NULL, G_TYPE_BOOL}, + G_OPT_SENTINEL }, + "[-l] geom" + }, { "bootcode", 0, gpart_bootcode, { { 'b', GPART_PARAM_BOOTCODE, G_VAL_OPTIONAL, G_TYPE_STRING }, { 'p', GPART_PARAM_PARTCODE, G_VAL_OPTIONAL, G_TYPE_STRING }, @@ -165,6 +173,12 @@ struct g_command PUBSYM(class_commands)[ G_OPT_SENTINEL }, "[-s size] -i index [-f flags] geom" }, + { "restore", 0, gpart_restore, { + { 'F', "force", NULL, G_TYPE_BOOL }, + { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, + G_OPT_SENTINEL }, + "[-F] [-f flags] provider [...]" + }, { "recover", 0, gpart_issue, { { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, @@ -654,6 +668,295 @@ gpart_show(struct gctl_req *req, unsigne geom_deletetree(&mesh); } +static void +gpart_backup(struct gctl_req *req, unsigned int fl __unused) +{ + struct gmesh mesh; + struct gclass *classp; + struct gprovider *pp; + struct ggeom *gp; + const char *s, *scheme; + off_t sector, end; + off_t length, secsz; + int error, labels, i, windex, wblocks, wtype; + + if (gctl_get_int(req, "nargs") != 1) + errx(EXIT_FAILURE, "Invalid number of arguments."); + error = geom_gettree(&mesh); + if (error != 0) + errc(EXIT_FAILURE, error, "Cannot get GEOM tree"); + s = gctl_get_ascii(req, "class"); + if (s == NULL) + abort(); + classp = find_class(&mesh, s); + if (classp == NULL) { + geom_deletetree(&mesh); + errx(EXIT_FAILURE, "Class %s not found.", s); + } + s = gctl_get_ascii(req, "arg0"); + if (s == NULL) + abort(); + labels = gctl_get_int(req, "backup_labels"); + gp = find_geom(classp, s); + if (gp == NULL) + errx(EXIT_FAILURE, "No such geom: %s.", s); + scheme = find_geomcfg(gp, "scheme"); + if (scheme == NULL) + abort(); + pp = LIST_FIRST(&gp->lg_consumer)->lg_provider; + secsz = pp->lg_sectorsize; + s = find_geomcfg(gp, "last"); + wblocks = strlen(s); + wtype = 0; + LIST_FOREACH(pp, &gp->lg_provider, lg_provider) { + s = find_provcfg(pp, "type"); + i = strlen(s); + if (i > wtype) + wtype = i; + } + s = find_geomcfg(gp, "entries"); + windex = strlen(s); + printf("%s %s\n", scheme, s); + LIST_FOREACH(pp, &gp->lg_provider, lg_provider) { + s = find_provcfg(pp, "start"); + if (s == NULL) { + s = find_provcfg(pp, "offset"); + sector = (off_t)strtoimax(s, NULL, 0) / secsz; + } else + sector = (off_t)strtoimax(s, NULL, 0); + + s = find_provcfg(pp, "end"); + if (s == NULL) { + s = find_provcfg(pp, "length"); + length = (off_t)strtoimax(s, NULL, 0) / secsz; + } else { + end = (off_t)strtoimax(s, NULL, 0); + length = end - sector + 1; + } + s = find_provcfg(pp, "label"); + printf("%-*s %*s %*jd %*jd", + windex, find_provcfg(pp, "index"), + wtype, find_provcfg(pp, "type"), + wblocks, (intmax_t)sector, + wblocks, (intmax_t)length); + if (labels && s != NULL) + printf(" %s", s); + printf(" %s\n", fmtattrib(pp)); + } + geom_deletetree(&mesh); +} + +static int +skip_line(const char *p) +{ + + while (*p != '\0') { + if (*p == '#') + return (1); + if (isspace(*p) == 0) + return (0); + p++; + } + return (1); +} + +static void +gpart_restore(struct gctl_req *req, unsigned int fl __unused) +{ + struct gmesh mesh; + struct gclass *classp; + struct gctl_req *r; + struct ggeom *gp; + const char *s, *flags, *errstr, *label; + char **ap, *argv[6], line[BUFSIZ], *pline; + int error, forced, i, l, nargs, created; + intmax_t n; + + nargs = gctl_get_int(req, "nargs"); + if (nargs < 1) + errx(EXIT_FAILURE, "Invalid number of arguments."); + + forced = gctl_get_int(req, "force"); + flags = gctl_get_ascii(req, "flags"); + s = gctl_get_ascii(req, "class"); + if (s == NULL) + abort(); + error = geom_gettree(&mesh); + if (error != 0) + errc(EXIT_FAILURE, error, "Cannot get GEOM tree"); + classp = find_class(&mesh, s); + if (classp == NULL) { + geom_deletetree(&mesh); + errx(EXIT_FAILURE, "Class %s not found.", s); + } + if (forced) { + /* destroy existent partition table before restore */ + for (i = 0; i < nargs; i++) { + s = gctl_get_ascii(req, "arg%d", i); + gp = find_geom(classp, s); + if (gp != NULL) { + r = gctl_get_handle(); + gctl_ro_param(r, "class", -1, + classp->lg_name); + gctl_ro_param(r, "verb", -1, "destroy"); + gctl_ro_param(r, "flags", -1, "restore"); + gctl_ro_param(r, "force", sizeof(forced), + &forced); + gctl_ro_param(r, "arg0", -1, s); + errstr = gctl_issue(r); + if (errstr != NULL && errstr[0] != '\0') { + gpart_print_error(errstr); + gctl_free(r); + goto backout; + } + gctl_free(r); + } + } + } + created = 0; + while (fgets(line, sizeof(line) - 1, stdin)) { + /* Format of backup entries: + * + * [label] ['['attrib[,attrib]']'] + */ + pline = (char *)line; + pline[strlen(line) - 1] = 0; + if (skip_line(pline)) + continue; + for (ap = argv; + (*ap = strsep(&pline, " \t")) != NULL;) + if (**ap != '\0' && ++ap >= &argv[6]) + break; + l = ap - &argv[0]; + label = pline = NULL; + if (l == 2) { /* create table */ + if (created) + errx(EXIT_FAILURE, "Incorrect backup format."); + n = atoi(argv[1]); + for (i = 0; i < nargs; i++) { + s = gctl_get_ascii(req, "arg%d", i); + r = gctl_get_handle(); + n = strtoimax(argv[1], NULL, 0); + gctl_ro_param(r, "class", -1, + classp->lg_name); + gctl_ro_param(r, "verb", -1, "create"); + gctl_ro_param(r, "scheme", -1, argv[0]); + gctl_ro_param(r, "entries", sizeof(n), &n); + gctl_ro_param(r, "flags", -1, "restore"); + gctl_ro_param(r, "arg0", -1, s); + errstr = gctl_issue(r); + if (errstr != NULL && errstr[0] != '\0') { + gpart_print_error(errstr); + gctl_free(r); + goto backout; + } + gctl_free(r); + } + created = 1; + continue; + } else if (l < 4 || created == 0) + errx(EXIT_FAILURE, "Incorrect backup format."); + else if (l == 5) { + if (strchr(argv[4], '[') == NULL) + label = argv[4]; + else + pline = argv[4]; + } else if (l == 6) { + label = argv[4]; + pline = argv[5]; + } + /* Add partitions to each table */ + for (i = 0; i < nargs; i++) { + s = gctl_get_ascii(req, "arg%d", i); + r = gctl_get_handle(); + n = strtoimax(argv[0], NULL, 0); + gctl_ro_param(r, "class", -1, classp->lg_name); + gctl_ro_param(r, "verb", -1, "add"); + gctl_ro_param(r, "flags", -1, "restore"); + gctl_ro_param(r, GPART_PARAM_INDEX, sizeof(n), &n); + gctl_ro_param(r, "type", -1, argv[1]); + gctl_ro_param(r, "start", -1, argv[2]); + gctl_ro_param(r, "size", -1, argv[3]); + if (label != NULL) + gctl_ro_param(r, "label", -1, argv[4]); + gctl_ro_param(r, "arg0", -1, s); + error = gpart_autofill(r); + if (error != 0) + errc(EXIT_FAILURE, error, "autofill"); + errstr = gctl_issue(r); + if (errstr != NULL && errstr[0] != '\0') { + gpart_print_error(errstr); + gctl_free(r); + goto backout; + } + gctl_free(r); + } + if (pline == NULL || *pline != '[') + continue; + /* set attributes */ + pline++; + for (ap = argv; + (*ap = strsep(&pline, ",]")) != NULL;) + if (**ap != '\0' && ++ap >= &argv[6]) + break; + for (i = 0; i < nargs; i++) { + l = ap - &argv[0]; + s = gctl_get_ascii(req, "arg%d", i); + while (l > 0) { + r = gctl_get_handle(); + gctl_ro_param(r, "class", -1, classp->lg_name); + gctl_ro_param(r, "verb", -1, "set"); + gctl_ro_param(r, "flags", -1, "restore"); + gctl_ro_param(r, GPART_PARAM_INDEX, + sizeof(n), &n); + gctl_ro_param(r, "attrib", -1, argv[--l]); + gctl_ro_param(r, "arg0", -1, s); + errstr = gctl_issue(r); + if (errstr != NULL && errstr[0] != '\0') { + gpart_print_error(errstr); + gctl_free(r); + goto backout; + } + gctl_free(r); + } + } + } + /* commit changes if needed */ + if (strchr(flags, 'C') != NULL) { + for (i = 0; i < nargs; i++) { + s = gctl_get_ascii(req, "arg%d", i); + r = gctl_get_handle(); + gctl_ro_param(r, "class", -1, classp->lg_name); + gctl_ro_param(r, "verb", -1, "commit"); + gctl_ro_param(r, "arg0", -1, s); + errstr = gctl_issue(r); + if (errstr != NULL && errstr[0] != '\0') { + gpart_print_error(errstr); + gctl_free(r); + goto backout; + } + gctl_free(r); + } + } + gctl_free(req); + geom_deletetree(&mesh); + exit(EXIT_SUCCESS); + +backout: + for (i = 0; i < nargs; i++) { + s = gctl_get_ascii(req, "arg%d", i); + r = gctl_get_handle(); + gctl_ro_param(r, "class", -1, classp->lg_name); + gctl_ro_param(r, "verb", -1, "undo"); + gctl_ro_param(r, "arg0", -1, s); + gctl_issue(r); + gctl_free(r); + } + gctl_free(req); + geom_deletetree(&mesh); + exit(EXIT_FAILURE); +} + static void * gpart_bootfile_read(const char *bootfile, ssize_t *size) { Modified: head/sbin/geom/class/part/gpart.8 ============================================================================== --- head/sbin/geom/class/part/gpart.8 Sat Nov 20 15:22:16 2010 (r215569) +++ head/sbin/geom/class/part/gpart.8 Sat Nov 20 16:03:53 2010 (r215570) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 25, 2010 +.Dd November 20, 2010 .Dt GPART 8 .Os .Sh NAME @@ -91,6 +91,11 @@ utility: .Op Fl l Ar label .Op Fl f Ar flags .Ar geom +.\" ==== BACKUP ==== +.Nm +.Cm backup +.Op Fl l +.Ar geom .\" ==== BOOTCODE ==== .Nm .Cm bootcode @@ -141,6 +146,13 @@ utility: .Op Fl s Ar size .Op Fl f Ar flags .Ar geom +.\" ==== RESTORE ==== +.Nm +.Cm restore +.Op Fl F +.Op Fl f Ar flags +.Ar provider +.Op Ar ... .\" ==== SET ==== .Nm .Cm set @@ -208,6 +220,17 @@ See the section entitled below for a discussion about its use. .El +.\" ==== BACKUP ==== +.It Cm backup +Dump a partition table to standard output in special format used by +.Cm restore +action. +.Pp +Additional options include: +.Bl -tag -width 10n +.It Fl l +Dump partition labels for partitioning schemes that support them. +.El .\" ==== BOOTCODE ==== .It Cm bootcode Embed bootstrap code into the partitioning scheme's metadata on the @@ -401,6 +424,28 @@ See the section entitled below for a discussion about its use. .El +.\" ==== RESTORE ==== +.It Cm restore +Restore the partition table from backup previously created by +.Cm backup +action and given from standard input. Only partition table +may be restored. This action does not affect content of partitions. +This mean that you should copy your data from backup after restoring +partition table and write bootcode again if it is needed. +.Pp +Additional options include: +.Bl -tag -width 10n +.It Fl F +Destroy partition table on the given +.Ar provider +before doing restore. +.It Fl f Ar flags +Additional operational flags. +See the section entitled +.Sx "OPERATIONAL FLAGS" +below for a discussion +about its use. +.El .\" ==== SET ==== .It Cm set Set the named attribute on the partition entry. @@ -770,6 +815,28 @@ After having created all required partit .Bd -literal -offset indent /sbin/gpart bootcode -p /boot/boot1 da0 .Ed +.Pp +Create backup of partition table from +.Pa da0 +.Bd -literal -offset indent +/sbin/gpart backup -l da0 > da0.backup +.Ed +.Pp +Restore partition table from backup to +.Pa da0 +.Bd -literal -offset indent +/sbin/gpart restore da0 < /mnt/da0.backup +.Ed +.Pp +Clone partition table from +.Pa ada0 +to +.Pa ada1 +and +.Pa ada2 +.Bd -literal -offset indent +/sbin/gpart backup ada0 | /sbin/gpart restore -F ada1 ada2 +.Ed .Sh SEE ALSO .Xr dd 1 , .Xr geom 4 , From owner-svn-src-head@FreeBSD.ORG Sat Nov 20 17:27:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD87E106566C; Sat, 20 Nov 2010 17:27:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ACE2F8FC12; Sat, 20 Nov 2010 17:27:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKHRcD5020182; Sat, 20 Nov 2010 17:27:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKHRcCi020180; Sat, 20 Nov 2010 17:27:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201011201727.oAKHRcCi020180@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 20 Nov 2010 17:27:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215574 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 17:27:38 -0000 Author: kib Date: Sat Nov 20 17:27:38 2010 New Revision: 215574 URL: http://svn.freebsd.org/changeset/base/215574 Log: The runlen returned from vm_pageout_flush() might be zero legitimately, when mreq page has status VM_PAGER_AGAIN. MFC after: 5 days Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Sat Nov 20 16:56:39 2010 (r215573) +++ head/sys/vm/vm_object.c Sat Nov 20 17:27:38 2010 (r215574) @@ -820,7 +820,6 @@ rescan: continue; n = vm_object_page_collect_flush(object, p, pagerflags); - KASSERT(n > 0, ("vm_object_page_collect_flush failed")); if (object->generation != curgeneration) goto rescan; np = vm_page_find_least(object, pi + n); From owner-svn-src-head@FreeBSD.ORG Sat Nov 20 18:40:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1B98106566B; Sat, 20 Nov 2010 18:40:50 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E0B5D8FC1D; Sat, 20 Nov 2010 18:40:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKIeoXH021855; Sat, 20 Nov 2010 18:40:50 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKIeoOH021853; Sat, 20 Nov 2010 18:40:50 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201011201840.oAKIeoOH021853@svn.freebsd.org> From: Kirk McKusick Date: Sat, 20 Nov 2010 18:40:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215576 - in head: sbin/mount sys/ufs/ffs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 18:40:51 -0000 Author: mckusick Date: Sat Nov 20 18:40:50 2010 New Revision: 215576 URL: http://svn.freebsd.org/changeset/base/215576 Log: Delete /sys/ufs/ffs/README.snapshot as it is no longer relevant. Drop reference to it in mount(8). MFC: 3 days Deleted: head/sys/ufs/ffs/README.snapshot Modified: head/sbin/mount/mount.8 Modified: head/sbin/mount/mount.8 ============================================================================== --- head/sbin/mount/mount.8 Sat Nov 20 18:24:09 2010 (r215575) +++ head/sbin/mount/mount.8 Sat Nov 20 18:40:50 2010 (r215576) @@ -305,9 +305,6 @@ When you are done with the mounted snaps umount /mnt mdconfig -d -u 4 .Ed -.Pp -Further details can be found in the file at -.Pa /usr/src/sys/ufs/ffs/README.snapshot . .El .It Cm suiddir A directory on the mounted file system will respond to the SUID bit From owner-svn-src-head@FreeBSD.ORG Sat Nov 20 19:23:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75544106566B; Sat, 20 Nov 2010 19:23:16 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6420A8FC15; Sat, 20 Nov 2010 19:23:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKJNGkw022984; Sat, 20 Nov 2010 19:23:16 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKJNG2t022982; Sat, 20 Nov 2010 19:23:16 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201011201923.oAKJNG2t022982@svn.freebsd.org> From: Andreas Tobler Date: Sat, 20 Nov 2010 19:23:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215577 - head/sys/boot/ofw/libofw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 19:23:16 -0000 Author: andreast Date: Sat Nov 20 19:23:16 2010 New Revision: 215577 URL: http://svn.freebsd.org/changeset/base/215577 Log: Check the OF_getprop() return value before proceeding. Allocate only as much space as needed for the mode buffer. Use strcmp, relying on OF giving back NULL terminated strings. Submitted by: marius Approved by: nwhitehorn (mentor) Modified: head/sys/boot/ofw/libofw/openfirm.c Modified: head/sys/boot/ofw/libofw/openfirm.c ============================================================================== --- head/sys/boot/ofw/libofw/openfirm.c Sat Nov 20 18:40:50 2010 (r215576) +++ head/sys/boot/ofw/libofw/openfirm.c Sat Nov 20 19:23:16 2010 (r215577) @@ -77,7 +77,7 @@ void OF_init(int (*openfirm)(void *)) { phandle_t options; - char mode[8]; + char mode[sizeof("true")]; openfirmware = openfirm; @@ -93,13 +93,13 @@ OF_init(int (*openfirm)(void *)) if (OF_getprop(chosen, "mmu", &mmu, sizeof(mmu)) == -1) OF_exit(); - /* + /* * Check if we run in real mode. If so, we do not need to map * memory later on. */ options = OF_finddevice("/options"); - OF_getprop(options, "real-mode?", mode, sizeof(mode)); - if (strncmp(mode, "true", 4) == 0) + if (OF_getprop(options, "real-mode?", mode, sizeof(mode)) > 0 && + strcmp(mode, "true") == 0) real_mode = 1; } From owner-svn-src-head@FreeBSD.ORG Sat Nov 20 20:04:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBB9D106566C; Sat, 20 Nov 2010 20:04:29 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C969F8FC13; Sat, 20 Nov 2010 20:04:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKK4TFd024373; Sat, 20 Nov 2010 20:04:29 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKK4Tik024368; Sat, 20 Nov 2010 20:04:29 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201011202004.oAKK4Tik024368@svn.freebsd.org> From: Colin Percival Date: Sat, 20 Nov 2010 20:04:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215587 - in head/sys/i386: include xen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 20:04:30 -0000 Author: cperciva Date: Sat Nov 20 20:04:29 2010 New Revision: 215587 URL: http://svn.freebsd.org/changeset/base/215587 Log: Add VTOM(va) macro as xpmap_ptom(VTOP(va)) to convert to machine addresses. Clean up the code by converting xpmap_ptom(VTOP(...)) to VTOM(...) and converting xpmap_ptom(VM_PAGE_TO_PHYS(...)) to VM_PAGE_TO_MACH(...). In a few places we take advantage of the fact that xpmap_ptom can commute with setting PG_* flags. This commit should have no net effect save to improve the readability of this code. Modified: head/sys/i386/include/pmap.h head/sys/i386/xen/mp_machdep.c head/sys/i386/xen/pmap.c head/sys/i386/xen/xen_machdep.c Modified: head/sys/i386/include/pmap.h ============================================================================== --- head/sys/i386/include/pmap.h Sat Nov 20 19:39:12 2010 (r215586) +++ head/sys/i386/include/pmap.h Sat Nov 20 20:04:29 2010 (r215587) @@ -221,6 +221,8 @@ extern pt_entry_t pg_nx; #define MACH_TO_VM_PAGE(ma) PHYS_TO_VM_PAGE(xpmap_mtop((ma))) #define VM_PAGE_TO_MACH(m) xpmap_ptom(VM_PAGE_TO_PHYS((m))) +#define VTOM(va) xpmap_ptom(VTOP(va)) + static __inline vm_paddr_t pmap_kextract_ma(vm_offset_t va) { Modified: head/sys/i386/xen/mp_machdep.c ============================================================================== --- head/sys/i386/xen/mp_machdep.c Sat Nov 20 19:39:12 2010 (r215586) +++ head/sys/i386/xen/mp_machdep.c Sat Nov 20 20:04:29 2010 (r215587) @@ -749,7 +749,7 @@ start_all_aps(void) gdt_segs[GPRIV_SEL].ssd_base = (int) pc; gdt_segs[GPROC0_SEL].ssd_base = (int) &pc->pc_common_tss; - PT_SET_MA(bootAPgdt, xpmap_ptom(VTOP(bootAPgdt)) | PG_V | PG_RW); + PT_SET_MA(bootAPgdt, VTOM(bootAPgdt) | PG_V | PG_RW); bzero(bootAPgdt, PAGE_SIZE); for (x = 0; x < NGDT; x++) ssdtosd(&gdt_segs[x], &bootAPgdt[x].sd); @@ -833,14 +833,13 @@ cpu_initialize_context(unsigned int cpu) } boot_stack = kmem_alloc_nofault(kernel_map, 1); newPTD = kmem_alloc_nofault(kernel_map, NPGPTD); - ma[0] = xpmap_ptom(VM_PAGE_TO_PHYS(m[0]))|PG_V; + ma[0] = VM_PAGE_TO_MACH(m[0])|PG_V; #ifdef PAE pmap_kenter(boot_stack, VM_PAGE_TO_PHYS(m[NPGPTD + 1])); for (i = 0; i < NPGPTD; i++) { ((vm_paddr_t *)boot_stack)[i] = - ma[i] = - xpmap_ptom(VM_PAGE_TO_PHYS(m[i]))|PG_V; + ma[i] = VM_PAGE_TO_MACH(m[i])|PG_V; } #endif @@ -862,7 +861,7 @@ cpu_initialize_context(unsigned int cpu) pmap_kenter(boot_stack, VM_PAGE_TO_PHYS(m[NPGPTD])); - xen_pgdpt_pin(xpmap_ptom(VM_PAGE_TO_PHYS(m[NPGPTD + 1]))); + xen_pgdpt_pin(VM_PAGE_TO_MACH(m[NPGPTD + 1])); vm_page_lock_queues(); for (i = 0; i < 4; i++) { int pdir = (PTDPTDI + i) / NPDEPG; @@ -905,7 +904,7 @@ cpu_initialize_context(unsigned int cpu) ctxt.failsafe_callback_cs = GSEL(GCODE_SEL, SEL_KPL); ctxt.failsafe_callback_eip = (unsigned long)failsafe_callback; - ctxt.ctrlreg[3] = xpmap_ptom(VM_PAGE_TO_PHYS(m[NPGPTD + 1])); + ctxt.ctrlreg[3] = VM_PAGE_TO_MACH(m[NPGPTD + 1]); #else /* __x86_64__ */ ctxt.user_regs.esp = idle->thread.rsp0 - sizeof(struct pt_regs); ctxt.kernel_ss = GSEL(GDATA_SEL, SEL_KPL); Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Sat Nov 20 19:39:12 2010 (r215586) +++ head/sys/i386/xen/pmap.c Sat Nov 20 20:04:29 2010 (r215587) @@ -1355,7 +1355,7 @@ pmap_qenter(vm_offset_t sva, vm_page_t * pte = vtopte(sva); endpte = pte + count; while (pte < endpte) { - pa = xpmap_ptom(VM_PAGE_TO_PHYS(*ma)) | pgeflag | PG_RW | PG_V | PG_M | PG_A; + pa = VM_PAGE_TO_MACH(*ma) | pgeflag | PG_RW | PG_V | PG_M | PG_A; mclp->op = __HYPERVISOR_update_va_mapping; mclp->args[0] = va; @@ -1589,7 +1589,7 @@ pmap_pinit(pmap_t pmap) for (i = 0; i < NPGPTD; i++) { vm_paddr_t ma; - ma = xpmap_ptom(VM_PAGE_TO_PHYS(ptdpg[i])); + ma = VM_PAGE_TO_MACH(ptdpg[i]); pmap->pm_pdpt[i] = ma | PG_V; } @@ -1599,7 +1599,7 @@ pmap_pinit(pmap_t pmap) pt_entry_t *pd; vm_paddr_t ma; - ma = xpmap_ptom(VM_PAGE_TO_PHYS(ptdpg[i])); + ma = VM_PAGE_TO_MACH(ptdpg[i]); pd = pmap->pm_pdir + (i * NPDEPG); PT_SET_MA(pd, *vtopte((vm_offset_t)pd) & ~(PG_M|PG_A|PG_U|PG_RW)); #if 0 @@ -1612,9 +1612,9 @@ pmap_pinit(pmap_t pmap) #endif vm_page_lock_queues(); xen_flush_queue(); - xen_pgdpt_pin(xpmap_ptom(VM_PAGE_TO_PHYS(ptdpg[NPGPTD]))); + xen_pgdpt_pin(VM_PAGE_TO_MACH(ptdpg[NPGPTD])); for (i = 0; i < NPGPTD; i++) { - vm_paddr_t ma = xpmap_ptom(VM_PAGE_TO_PHYS(ptdpg[i])); + vm_paddr_t ma = VM_PAGE_TO_MACH(ptdpg[i]); PT_SET_VA_MA(&pmap->pm_pdir[PTDPTDI + i], ma | PG_V | PG_A, FALSE); } xen_flush_queue(); @@ -1669,7 +1669,7 @@ _pmap_allocpte(pmap_t pmap, unsigned int */ pmap->pm_stats.resident_count++; - ptema = xpmap_ptom(VM_PAGE_TO_PHYS(m)); + ptema = VM_PAGE_TO_MACH(m); xen_pt_pin(ptema); PT_SET_VA_MA(&pmap->pm_pdir[ptepindex], (ptema | PG_U | PG_RW | PG_V | PG_A | PG_M), TRUE); @@ -1873,7 +1873,7 @@ pmap_release(pmap_t pmap) for (i = 0; i < npgptd; i++) { m = ptdpg[i]; - ma = xpmap_ptom(VM_PAGE_TO_PHYS(m)); + ma = VM_PAGE_TO_MACH(m); /* unpinning L1 and L2 treated the same */ #if 0 xen_pgd_unpin(ma); @@ -1883,7 +1883,7 @@ pmap_release(pmap_t pmap) #endif #ifdef PAE if (i < NPGPTD) - KASSERT(xpmap_ptom(VM_PAGE_TO_PHYS(m)) == (pmap->pm_pdpt[i] & PG_FRAME), + KASSERT(VM_PAGE_TO_MACH(m) == (pmap->pm_pdpt[i] & PG_FRAME), ("pmap_release: got wrong ptd page")); #endif m->wire_count--; @@ -2673,7 +2673,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, boolean_t invlva; CTR6(KTR_PMAP, "pmap_enter: pmap=%08p va=0x%08x access=0x%x ma=0x%08x prot=0x%x wired=%d", - pmap, va, access, xpmap_ptom(VM_PAGE_TO_PHYS(m)), prot, wired); + pmap, va, access, VM_PAGE_TO_MACH(m), prot, wired); va = trunc_page(va); KASSERT(va <= VM_MAX_KERNEL_ADDRESS, ("pmap_enter: toobig")); KASSERT(va < UPT_MIN_ADDRESS || va >= UPT_MAX_ADDRESS, @@ -3364,7 +3364,7 @@ pmap_zero_page(vm_page_t m) if (*sysmaps->CMAP2) panic("pmap_zero_page: CMAP2 busy"); sched_pin(); - PT_SET_MA(sysmaps->CADDR2, PG_V | PG_RW | xpmap_ptom(VM_PAGE_TO_PHYS(m)) | PG_A | PG_M); + PT_SET_MA(sysmaps->CADDR2, PG_V | PG_RW | VM_PAGE_TO_MACH(m) | PG_A | PG_M); pagezero(sysmaps->CADDR2); PT_SET_MA(sysmaps->CADDR2, 0); sched_unpin(); @@ -3387,7 +3387,7 @@ pmap_zero_page_area(vm_page_t m, int off if (*sysmaps->CMAP2) panic("pmap_zero_page: CMAP2 busy"); sched_pin(); - PT_SET_MA(sysmaps->CADDR2, PG_V | PG_RW | xpmap_ptom(VM_PAGE_TO_PHYS(m)) | PG_A | PG_M); + PT_SET_MA(sysmaps->CADDR2, PG_V | PG_RW | VM_PAGE_TO_MACH(m) | PG_A | PG_M); if (off == 0 && size == PAGE_SIZE) pagezero(sysmaps->CADDR2); @@ -3411,7 +3411,7 @@ pmap_zero_page_idle(vm_page_t m) if (*CMAP3) panic("pmap_zero_page: CMAP3 busy"); sched_pin(); - PT_SET_MA(CADDR3, PG_V | PG_RW | xpmap_ptom(VM_PAGE_TO_PHYS(m)) | PG_A | PG_M); + PT_SET_MA(CADDR3, PG_V | PG_RW | VM_PAGE_TO_MACH(m) | PG_A | PG_M); pagezero(CADDR3); PT_SET_MA(CADDR3, 0); sched_unpin(); @@ -3435,8 +3435,8 @@ pmap_copy_page(vm_page_t src, vm_page_t if (*sysmaps->CMAP2) panic("pmap_copy_page: CMAP2 busy"); sched_pin(); - PT_SET_MA(sysmaps->CADDR1, PG_V | xpmap_ptom(VM_PAGE_TO_PHYS(src)) | PG_A); - PT_SET_MA(sysmaps->CADDR2, PG_V | PG_RW | xpmap_ptom(VM_PAGE_TO_PHYS(dst)) | PG_A | PG_M); + PT_SET_MA(sysmaps->CADDR1, PG_V | VM_PAGE_TO_MACH(src) | PG_A); + PT_SET_MA(sysmaps->CADDR2, PG_V | PG_RW | VM_PAGE_TO_MACH(dst) | PG_A | PG_M); bcopy(sysmaps->CADDR1, sysmaps->CADDR2, PAGE_SIZE); PT_SET_MA(sysmaps->CADDR1, 0); PT_SET_MA(sysmaps->CADDR2, 0); @@ -4063,7 +4063,7 @@ pmap_page_set_memattr(vm_page_t m, vm_me panic("pmap_page_set_memattr: CMAP2 busy"); sched_pin(); PT_SET_MA(sysmaps->CADDR2, PG_V | PG_RW | - xpmap_ptom(VM_PAGE_TO_PHYS(m)) | PG_A | PG_M | + VM_PAGE_TO_MACH(m) | PG_A | PG_M | pmap_cache_bits(m->md.pat_mode, 0)); invlcaddr(sysmaps->CADDR2); sva = (vm_offset_t)sysmaps->CADDR2; Modified: head/sys/i386/xen/xen_machdep.c ============================================================================== --- head/sys/i386/xen/xen_machdep.c Sat Nov 20 19:39:12 2010 (r215586) +++ head/sys/i386/xen/xen_machdep.c Sat Nov 20 20:04:29 2010 (r215587) @@ -917,7 +917,7 @@ initvalues(start_info_t *startinfo) l3_pages = 1; l2_pages = 0; IdlePDPT = (pd_entry_t *)startinfo->pt_base; - IdlePDPTma = xpmap_ptom(VTOP(startinfo->pt_base)); + IdlePDPTma = VTOM(startinfo->pt_base); for (i = (KERNBASE >> 30); (i < 4) && (IdlePDPT[i] != 0); i++) l2_pages++; @@ -926,7 +926,7 @@ initvalues(start_info_t *startinfo) * Thus, if KERNBASE */ for (i = 0; i < l2_pages; i++) - IdlePTDma[i] = xpmap_ptom(VTOP(IdlePTD + i*PAGE_SIZE)); + IdlePTDma[i] = VTOM(IdlePTD + i*PAGE_SIZE); l2_pages = (l2_pages == 0) ? 1 : l2_pages; #else @@ -966,13 +966,12 @@ initvalues(start_info_t *startinfo) IdlePDPTnew = (pd_entry_t *)cur_space; cur_space += PAGE_SIZE; bzero(IdlePDPTnew, PAGE_SIZE); - IdlePDPTnewma = xpmap_ptom(VTOP(IdlePDPTnew)); + IdlePDPTnewma = VTOM(IdlePDPTnew); IdlePTDnew = (pd_entry_t *)cur_space; cur_space += 4*PAGE_SIZE; bzero(IdlePTDnew, 4*PAGE_SIZE); for (i = 0; i < 4; i++) - IdlePTDnewma[i] = - xpmap_ptom(VTOP((uint8_t *)IdlePTDnew + i*PAGE_SIZE)); + IdlePTDnewma[i] = VTOM((uint8_t *)IdlePTDnew + i*PAGE_SIZE); /* * L3 * @@ -1040,7 +1039,7 @@ initvalues(start_info_t *startinfo) IdlePTDnewma[i] | PG_V); } xen_load_cr3(VTOP(IdlePDPTnew)); - xen_pgdpt_pin(xpmap_ptom(VTOP(IdlePDPTnew))); + xen_pgdpt_pin(VTOM(IdlePDPTnew)); /* allocate remainder of nkpt pages */ cur_space_pt = cur_space; @@ -1055,14 +1054,13 @@ initvalues(start_info_t *startinfo) * make sure that all the initial page table pages * have been zeroed */ - PT_SET_MA(cur_space, - xpmap_ptom(VTOP(cur_space)) | PG_V | PG_RW); + PT_SET_MA(cur_space, VTOM(cur_space) | PG_V | PG_RW); bzero((char *)cur_space, PAGE_SIZE); PT_SET_MA(cur_space, (vm_paddr_t)0); - xen_pt_pin(xpmap_ptom(VTOP(cur_space))); + xen_pt_pin(VTOM(cur_space)); xen_queue_pt_update((vm_paddr_t)(IdlePTDnewma[pdir] + curoffset*sizeof(vm_paddr_t)), - xpmap_ptom(VTOP(cur_space)) | PG_KERNEL); + VTOM(cur_space) | PG_KERNEL); PT_UPDATES_FLUSH(); } @@ -1113,14 +1111,14 @@ initvalues(start_info_t *startinfo) #if 0 /* add page table for KERNBASE */ xen_queue_pt_update(IdlePTDma + KPTDI*sizeof(vm_paddr_t), - xpmap_ptom(VTOP(cur_space) | PG_KERNEL)); + VTOM(cur_space) | PG_KERNEL); xen_flush_queue(); #ifdef PAE xen_queue_pt_update(pdir_shadow_ma[3] + KPTDI*sizeof(vm_paddr_t), - xpmap_ptom(VTOP(cur_space) | PG_V | PG_A)); + VTOM(cur_space) | PG_V | PG_A); #else xen_queue_pt_update(pdir_shadow_ma + KPTDI*sizeof(vm_paddr_t), - xpmap_ptom(VTOP(cur_space) | PG_V | PG_A)); + VTOM(cur_space) | PG_V | PG_A); #endif xen_flush_queue(); cur_space += PAGE_SIZE; @@ -1140,7 +1138,7 @@ initvalues(start_info_t *startinfo) */ for (i = (((vm_offset_t)&btext) & ~PAGE_MASK); i < (((vm_offset_t)&etext) & ~PAGE_MASK); i += PAGE_SIZE) - PT_SET_MA(i, xpmap_ptom(VTOP(i)) | PG_V | PG_A); + PT_SET_MA(i, VTOM(i) | PG_V | PG_A); printk("#7\n"); physfree = VTOP(cur_space); From owner-svn-src-head@FreeBSD.ORG Sat Nov 20 21:36:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3573C1065672; Sat, 20 Nov 2010 21:36:13 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 23FF08FC13; Sat, 20 Nov 2010 21:36:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKLaDC0027137; Sat, 20 Nov 2010 21:36:13 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKLaDn4027135; Sat, 20 Nov 2010 21:36:13 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201011202136.oAKLaDn4027135@svn.freebsd.org> From: Colin Percival Date: Sat, 20 Nov 2010 21:36:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215593 - head/sys/i386/xen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 21:36:13 -0000 Author: cperciva Date: Sat Nov 20 21:36:12 2010 New Revision: 215593 URL: http://svn.freebsd.org/changeset/base/215593 Log: Unifdef XEN. This file is only compiled with the XEN kernel option set, and the !XEN bits get in the way of understanding the code. Modified: head/sys/i386/xen/pmap.c Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Sat Nov 20 21:24:17 2010 (r215592) +++ head/sys/i386/xen/pmap.c Sat Nov 20 21:36:12 2010 (r215593) @@ -218,9 +218,6 @@ extern u_int32_t KERNend; #ifdef PAE pt_entry_t pg_nx; -#if !defined(XEN) -static uma_zone_t pdptzone; -#endif #endif static int pat_works; /* Is page attribute table sane? */ @@ -322,13 +319,6 @@ static void pmap_kenter_attr(vm_offset_t static __inline void pagezero(void *page); -#if defined(PAE) && !defined(XEN) -static void *pmap_pdpt_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int wait); -#endif -#ifndef XEN -static void pmap_set_pg(void); -#endif - CTASSERT(1 << PDESHIFT == sizeof(pd_entry_t)); CTASSERT(1 << PTESHIFT == sizeof(pt_entry_t)); @@ -559,47 +549,6 @@ pmap_init_pat(void) wrmsr(MSR_PAT, pat_msr); } -#ifndef XEN -/* - * Set PG_G on kernel pages. Only the BSP calls this when SMP is turned on. - */ -static void -pmap_set_pg(void) -{ - pd_entry_t pdir; - pt_entry_t *pte; - vm_offset_t va, endva; - int i; - - if (pgeflag == 0) - return; - - i = KERNLOAD/NBPDR; - endva = KERNBASE + KERNend; - - if (pseflag) { - va = KERNBASE + KERNLOAD; - while (va < endva) { - pdir = kernel_pmap->pm_pdir[KPTDI+i]; - pdir |= pgeflag; - kernel_pmap->pm_pdir[KPTDI+i] = PTD[KPTDI+i] = pdir; - invltlb(); /* Play it safe, invltlb() every time */ - i++; - va += NBPDR; - } - } else { - va = (vm_offset_t)btext; - while (va < endva) { - pte = vtopte(va); - if (*pte & PG_V) - *pte |= pgeflag; - invltlb(); /* Play it safe, invltlb() every time */ - va += PAGE_SIZE; - } - } -} -#endif - /* * Initialize a vm_page's machine-dependent fields. */ @@ -611,18 +560,6 @@ pmap_page_init(vm_page_t m) m->md.pat_mode = PAT_WRITE_BACK; } -#if defined(PAE) && !defined(XEN) -static void * -pmap_pdpt_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) -{ - - /* Inform UMA that this allocator uses kernel_map/object. */ - *flags = UMA_SLAB_KERNEL; - return ((void *)kmem_alloc_contig(kernel_map, bytes, wait, 0x0ULL, - 0xffffffffULL, 1, 0, VM_MEMATTR_DEFAULT)); -} -#endif - /* * ABuse the pte nodes for unmapped kva to thread a kva freelist through. * Requirements: @@ -745,12 +682,6 @@ pmap_init(void) if (pv_chunkbase == NULL) panic("pmap_init: not enough kvm for pv chunks"); pmap_ptelist_init(&pv_vafree, pv_chunkbase, pv_maxchunks); -#if defined(PAE) && !defined(XEN) - pdptzone = uma_zcreate("PDPT", NPGPTD * sizeof(pdpt_entry_t), NULL, - NULL, NULL, NULL, (NPGPTD * sizeof(pdpt_entry_t)) - 1, - UMA_ZONE_VM | UMA_ZONE_NOFREE); - uma_zone_set_allocf(pdptzone, pmap_pdpt_allocf); -#endif } @@ -1541,18 +1472,9 @@ pmap_pinit(pmap_t pmap) PMAP_LOCK_DESTROY(pmap); return (0); } -#if defined(XEN) && defined(PAE) +#ifdef PAE pmap->pm_pdpt = (pd_entry_t *)kmem_alloc_nofault(kernel_map, 1); #endif - -#if defined(PAE) && !defined(XEN) - pmap->pm_pdpt = uma_zalloc(pdptzone, M_WAITOK | M_ZERO); - KASSERT(((vm_offset_t)pmap->pm_pdpt & - ((NPGPTD * sizeof(pdpt_entry_t)) - 1)) == 0, - ("pmap_pinit: pdpt misaligned")); - KASSERT(pmap_kextract((vm_offset_t)pmap->pm_pdpt) < (4ULL<<30), - ("pmap_pinit: pdpt above 4g")); -#endif } /* @@ -1581,11 +1503,9 @@ pmap_pinit(pmap_t pmap) bcopy(PTD + KPTDI, pmap->pm_pdir + KPTDI, nkpt * sizeof(pd_entry_t)); #ifdef PAE -#ifdef XEN pmap_qenter((vm_offset_t)pmap->pm_pdpt, &ptdpg[NPGPTD], 1); if ((ptdpg[NPGPTD]->flags & PG_ZERO) == 0) bzero(pmap->pm_pdpt, PAGE_SIZE); -#endif for (i = 0; i < NPGPTD; i++) { vm_paddr_t ma; @@ -1594,7 +1514,6 @@ pmap_pinit(pmap_t pmap) } #endif -#ifdef XEN for (i = 0; i < NPGPTD; i++) { pt_entry_t *pd; vm_paddr_t ma; @@ -1619,7 +1538,6 @@ pmap_pinit(pmap_t pmap) } xen_flush_queue(); vm_page_unlock_queues(); -#endif pmap->pm_active = 0; TAILQ_INIT(&pmap->pm_pvchunk); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); @@ -1845,15 +1763,11 @@ pmap_release(pmap_t pmap) vm_page_t m, ptdpg[2*NPGPTD+1]; vm_paddr_t ma; int i; -#ifdef XEN #ifdef PAE int npgptd = NPGPTD + 1; #else int npgptd = NPGPTD; #endif -#else - int npgptd = NPGPTD; -#endif KASSERT(pmap->pm_stats.resident_count == 0, ("pmap_release: pmap resident count %ld != 0", pmap->pm_stats.resident_count)); @@ -1867,7 +1781,7 @@ pmap_release(pmap_t pmap) for (i = 0; i < NPGPTD; i++) ptdpg[i] = PHYS_TO_VM_PAGE(vtophys(pmap->pm_pdir + (i*NPDEPG)) & PG_FRAME); pmap_qremove((vm_offset_t)pmap->pm_pdir, NPGPTD); -#if defined(PAE) && defined(XEN) +#ifdef PAE ptdpg[NPGPTD] = PHYS_TO_VM_PAGE(vtophys(pmap->pm_pdpt)); #endif @@ -2616,21 +2530,10 @@ retry: #endif if (pbits != obits) { -#ifdef XEN obits = *pte; PT_SET_VA_MA(pte, pbits, TRUE); if (*pte != pbits) goto retry; -#else -#ifdef PAE - if (!atomic_cmpset_64(pte, obits, pbits)) - goto retry; -#else - if (!atomic_cmpset_int((u_int *)pte, obits, - pbits)) - goto retry; -#endif -#endif if (obits & PG_G) pmap_invalidate_page(pmap, sva); else @@ -4242,8 +4145,6 @@ pmap_align_superpage(vm_object_t object, *addr = ((*addr + PDRMASK) & ~PDRMASK) + superpage_offset; } -#ifdef XEN - void pmap_suspend() { @@ -4306,8 +4207,6 @@ pmap_resume() } } -#endif - #if defined(PMAP_DEBUG) pmap_pid_dump(int pid) { From owner-svn-src-head@FreeBSD.ORG Sat Nov 20 22:30:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F8A6106566B; Sat, 20 Nov 2010 22:30:10 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 24B968FC08; Sat, 20 Nov 2010 22:30:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAKMUAhd028485; Sat, 20 Nov 2010 22:30:10 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAKMUA5s028483; Sat, 20 Nov 2010 22:30:10 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201011202230.oAKMUA5s028483@svn.freebsd.org> From: Alan Cox Date: Sat, 20 Nov 2010 22:30:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215597 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 22:30:10 -0000 Author: alc Date: Sat Nov 20 22:30:09 2010 New Revision: 215597 URL: http://svn.freebsd.org/changeset/base/215597 Log: Optimize vm_object_terminate(). Reviewed by: kib MFC after: 1 week Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Sat Nov 20 21:44:18 2010 (r215596) +++ head/sys/vm/vm_object.c Sat Nov 20 22:30:09 2010 (r215597) @@ -661,7 +661,7 @@ vm_object_destroy(vm_object_t object) void vm_object_terminate(vm_object_t object) { - vm_page_t p; + vm_page_t p, p_next; VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); @@ -701,22 +701,41 @@ vm_object_terminate(vm_object_t object) object->ref_count)); /* - * Now free any remaining pages. For internal objects, this also - * removes them from paging queues. Don't free wired pages, just - * remove them from the object. + * Free any remaining pageable pages. This also removes them from the + * paging queues. However, don't free wired pages, just remove them + * from the object. Rather than incrementally removing each page from + * the object, the page and object are reset to any empty state. */ - while ((p = TAILQ_FIRST(&object->memq)) != NULL) { + TAILQ_FOREACH_SAFE(p, &object->memq, listq, p_next) { KASSERT(!p->busy && (p->oflags & VPO_BUSY) == 0, - ("vm_object_terminate: freeing busy page %p " - "p->busy = %d, p->oflags %x\n", p, p->busy, p->oflags)); + ("vm_object_terminate: freeing busy page %p", p)); vm_page_lock(p); + /* + * Optimize the page's removal from the object by resetting + * its "object" field. Specifically, if the page is not + * wired, then the effect of this assignment is that + * vm_page_free()'s call to vm_page_remove() will return + * immediately without modifying the page or the object. + */ + p->object = NULL; if (p->wire_count == 0) { vm_page_free(p); PCPU_INC(cnt.v_pfree); - } else - vm_page_remove(p); + } vm_page_unlock(p); } + /* + * If the object contained any pages, then reset it to an empty state. + * None of the object's fields, including "resident_page_count", were + * modified by the preceding loop. + */ + if (object->resident_page_count != 0) { + object->root = NULL; + TAILQ_INIT(&object->memq); + object->resident_page_count = 0; + if (object->type == OBJT_VNODE) + vdrop(object->handle); + } #if VM_NRESERVLEVEL > 0 if (__predict_false(!LIST_EMPTY(&object->rvq)))