From owner-svn-src-head@FreeBSD.ORG Sun Jan 9 00:35:59 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 469C61065673; Sun, 9 Jan 2011 00:35:59 +0000 (UTC) Date: Sun, 9 Jan 2011 00:35:59 +0000 From: Alexander Best To: Warner Losh Message-ID: <20110109003559.GA6112@freebsd.org> References: <201101072036.p07KaRCe065105@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201101072036.p07KaRCe065105@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r217125 - 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, 09 Jan 2011 00:35:59 -0000 On Fri Jan 7 11, Warner Losh wrote: > Author: imp > Date: Fri Jan 7 20:36:27 2011 > New Revision: 217125 > URL: http://svn.freebsd.org/changeset/base/217125 > > Log: > make targets > > This produces a list of currently supported targets. Here "supported" > means "built in make universe" on the theory that those targets are > more supported than any that might work in 'make buildworld TARGET=x > TARGET_ARCH=y' since the latter are less tested. > > Suggested by: rwatson maybe the following patch would be nice to have in order to make it clear that not all user-driven targets are actually implemented in Makefile.inc1: diff --git a/Makefile b/Makefile index a674c90..3f76c7e 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,8 @@ # tree. This makefile executes a child make process, forcing it to use # the mk files from the source tree which are supposed to DTRT. # -# The user-driven targets (as listed above) are implemented in Makefile.inc1. +# Some of the user-driven targets (as listed above) are implemented in +# Makefile.inc1. # # If you want to build your system from source be sure that /usr/obj has # at least 800MB of diskspace available. cheers. alex p.s.: also just noticed that there's no description for target 'showconfig'. this should be explained, since it is very useful for reporting 'buildworld'- failures. > > Modified: > head/Makefile > > Modified: head/Makefile > ============================================================================== > --- head/Makefile Fri Jan 7 20:31:47 2011 (r217124) > +++ head/Makefile Fri Jan 7 20:36:27 2011 (r217125) > @@ -26,6 +26,7 @@ > # delete-old-dirs - Delete obsolete directories. > # delete-old-files - Delete obsolete files. > # delete-old-libs - Delete obsolete libraries. > +# targets - Print a list of supported TARGET/TARGET_ARCH pairs. > # > # This makefile is simple by design. The FreeBSD make automatically reads > # the /usr/share/mk/sys.mk unless the -m argument is specified on the > @@ -280,7 +281,7 @@ tinderbox: > # with a reasonable chance of success, regardless of how old your > # existing system is. > # > -.if make(universe) || make(universe_kernels) || make(tinderbox) > +.if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets) > TARGETS?=amd64 arm i386 ia64 mips pc98 powerpc sparc64 sun4v > TARGET_ARCHES_arm?= arm armeb > TARGET_ARCHES_mips?= mipsel mipseb mips64el mips64eb > @@ -291,6 +292,14 @@ TARGET_ARCHES_sun4v?= sparc64 > TARGET_ARCHES_${target}?= ${target} > .endfor > > +targets: > + @echo "Supported TARGET/TARGET_ARCH pairs" > +.for target in ${TARGETS} > +.for target_arch in ${TARGET_ARCHES_${target}} > + @echo " ${target}/${target_arch}" > +.endfor > +.endfor > + > .if defined(DOING_TINDERBOX) > FAILFILE=tinderbox.failed > MAKEFAIL=tee -a ${FAILFILE} -- a13x From owner-svn-src-head@FreeBSD.ORG Sun Jan 9 02:10:54 2011 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 75516106566B; Sun, 9 Jan 2011 02:10:54 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A5548FC0C; Sun, 9 Jan 2011 02:10: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 p092AspD023877; Sun, 9 Jan 2011 02:10:54 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p092AsOn023875; Sun, 9 Jan 2011 02:10:54 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201101090210.p092AsOn023875@svn.freebsd.org> From: Rick Macklem Date: Sun, 9 Jan 2011 02:10: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: r217176 - head/sys/fs/nfsserver 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, 09 Jan 2011 02:10:54 -0000 Author: rmacklem Date: Sun Jan 9 02:10:54 2011 New Revision: 217176 URL: http://svn.freebsd.org/changeset/base/217176 Log: Modify readdirplus in the experimental NFS server in a manner analogous to r216633 for the regular server. This change busies the file system so that VFS_VGET() is guaranteed to be using the correct mount point even during a forced dismount attempt. Since nfsd_fhtovp() is not called immediately before readdirplus, the patch is actually a clone of pjd@'s nfs_serv.c.4.patch instead of the one committed in r216633. Reviewed by: kib MFC after: 10 days Modified: head/sys/fs/nfsserver/nfs_nfsdport.c Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Sat Jan 8 23:08:13 2011 (r217175) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Sun Jan 9 02:10:54 2011 (r217176) @@ -1685,6 +1685,7 @@ nfsrvd_readdirplus(struct nfsrv_descript struct iovec iv; struct componentname cn; int not_zfs; + struct mount *mp; if (nd->nd_repstat) { nfsrv_postopattr(nd, getret, &at); @@ -1854,7 +1855,24 @@ again: toff = off; goto again; } + + /* + * Busy the file system so that the mount point won't go away + * and, as such, VFS_VGET() can be used safely. + */ + mp = vp->v_mount; + vfs_ref(mp); VOP_UNLOCK(vp, 0); + nd->nd_repstat = vfs_busy(mp, 0); + vfs_rel(mp); + if (nd->nd_repstat != 0) { + vrele(vp); + free(cookies, M_TEMP); + free(rbuf, M_TEMP); + if (nd->nd_flag & ND_NFSV3) + nfsrv_postopattr(nd, getret, &at); + return (0); + } /* * Save this position, in case there is an error before one entry @@ -1914,9 +1932,8 @@ again: vp, dp->d_fileno); if (refp == NULL) { if (usevget) - r = VFS_VGET(vp->v_mount, - dp->d_fileno, LK_SHARED, - &nvp); + r = VFS_VGET(mp, dp->d_fileno, + LK_SHARED, &nvp); else r = EOPNOTSUPP; if (r == EOPNOTSUPP) { @@ -2035,6 +2052,7 @@ again: ncookies--; } vrele(vp); + vfs_unbusy(mp); /* * If dirlen > cnt, we must strip off the last entry. If that From owner-svn-src-head@FreeBSD.ORG Sun Jan 9 04:34:03 2011 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 57C89106564A; Sun, 9 Jan 2011 04:34:03 +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 481938FC14; Sun, 9 Jan 2011 04:34: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 p094Y3V8027661; Sun, 9 Jan 2011 04:34:03 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p094Y3uV027659; Sun, 9 Jan 2011 04:34:03 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201101090434.p094Y3uV027659@svn.freebsd.org> From: Alan Cox Date: Sun, 9 Jan 2011 04:34: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: r217177 - 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, 09 Jan 2011 04:34:03 -0000 Author: alc Date: Sun Jan 9 04:34:02 2011 New Revision: 217177 URL: http://svn.freebsd.org/changeset/base/217177 Log: Eliminate a redundant alignment directive on the page locks array. Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sun Jan 9 02:10:54 2011 (r217176) +++ head/sys/vm/vm_page.c Sun Jan 9 04:34:02 2011 (r217177) @@ -141,7 +141,7 @@ struct vpgqueues vm_page_queues[PQ_COUNT struct vpglocks vm_page_queue_lock; struct vpglocks vm_page_queue_free_lock; -struct vpglocks pa_lock[PA_LOCK_COUNT] __aligned(CACHE_LINE_SIZE); +struct vpglocks pa_lock[PA_LOCK_COUNT]; vm_page_t vm_page_array = 0; int vm_page_array_size = 0; From owner-svn-src-head@FreeBSD.ORG Sun Jan 9 06:05:02 2011 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 8F96B106566C; Sun, 9 Jan 2011 06:05:02 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B5118FC12; Sun, 9 Jan 2011 06:05: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 p096527Y031374; Sun, 9 Jan 2011 06:05:02 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p09652p0031372; Sun, 9 Jan 2011 06:05:02 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201101090605.p09652p0031372@svn.freebsd.org> From: David Schultz Date: Sun, 9 Jan 2011 06:05: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: r217180 - head/sys/ia64/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: Sun, 09 Jan 2011 06:05:02 -0000 Author: das Date: Sun Jan 9 06:05:02 2011 New Revision: 217180 URL: http://svn.freebsd.org/changeset/base/217180 Log: The highest-precision floating point type on ia64 has 64 bits of precision, so DECIMAL_DIG should be 21, as on i386/amd64. Modified: head/sys/ia64/include/float.h Modified: head/sys/ia64/include/float.h ============================================================================== --- head/sys/ia64/include/float.h Sun Jan 9 04:48:50 2011 (r217179) +++ head/sys/ia64/include/float.h Sun Jan 9 06:05:02 2011 (r217180) @@ -43,7 +43,7 @@ __END_DECLS #define FLT_ROUNDS __flt_rounds() #if __ISO_C_VISIBLE >= 1999 #define FLT_EVAL_METHOD 0 /* no promotions */ -#define DECIMAL_DIG 35 /* max precision in decimal digits */ +#define DECIMAL_DIG 21 /* max precision in decimal digits */ #endif #define FLT_MANT_DIG 24 /* p */ From owner-svn-src-head@FreeBSD.ORG Sun Jan 9 06:05:23 2011 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 43F001065670; Sun, 9 Jan 2011 06:05:23 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 341A68FC19; Sun, 9 Jan 2011 06:05: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 p0965N22031419; Sun, 9 Jan 2011 06:05:23 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0965NBH031417; Sun, 9 Jan 2011 06:05:23 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201101090605.p0965NBH031417@svn.freebsd.org> From: David Schultz Date: Sun, 9 Jan 2011 06:05:23 +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: r217181 - head/sys/powerpc/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: Sun, 09 Jan 2011 06:05:23 -0000 Author: das Date: Sun Jan 9 06:05:22 2011 New Revision: 217181 URL: http://svn.freebsd.org/changeset/base/217181 Log: We don't support any floating point types larger than double on powerpc, so DECIMAL_DIG should be 17. Modified: head/sys/powerpc/include/float.h Modified: head/sys/powerpc/include/float.h ============================================================================== --- head/sys/powerpc/include/float.h Sun Jan 9 06:05:02 2011 (r217180) +++ head/sys/powerpc/include/float.h Sun Jan 9 06:05:22 2011 (r217181) @@ -48,7 +48,7 @@ __END_DECLS #define FLT_RADIX 2 /* b */ #if __ISO_C_VISIBLE >= 1999 #define FLT_EVAL_METHOD 1 /* operands promoted to double */ -#define DECIMAL_DIG 35 /* max precision in decimal digits */ +#define DECIMAL_DIG 17 /* max precision in decimal digits */ #endif #define FLT_MANT_DIG 24 /* p */ From owner-svn-src-head@FreeBSD.ORG Sun Jan 9 06:05:48 2011 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 72C4C106564A; Sun, 9 Jan 2011 06:05:48 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 62C7B8FC08; Sun, 9 Jan 2011 06:05: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 p0965mK6031465; Sun, 9 Jan 2011 06:05:48 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0965m5u031462; Sun, 9 Jan 2011 06:05:48 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201101090605.p0965m5u031462@svn.freebsd.org> From: David Schultz Date: Sun, 9 Jan 2011 06:05: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: r217182 - in head/sys: sparc64/include sun4v/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: Sun, 09 Jan 2011 06:05:48 -0000 Author: das Date: Sun Jan 9 06:05:48 2011 New Revision: 217182 URL: http://svn.freebsd.org/changeset/base/217182 Log: Fix the value for DECIMAL_DIG on UltraSparcs. The previous value of 35 wasn't quite big enough to ensure correct rounding for very-close- to-halfway cases. Modified: head/sys/sparc64/include/float.h head/sys/sun4v/include/float.h Modified: head/sys/sparc64/include/float.h ============================================================================== --- head/sys/sparc64/include/float.h Sun Jan 9 06:05:22 2011 (r217181) +++ head/sys/sparc64/include/float.h Sun Jan 9 06:05:48 2011 (r217182) @@ -48,7 +48,7 @@ __END_DECLS #define FLT_ROUNDS __flt_rounds() #if __ISO_C_VISIBLE >= 1999 #define FLT_EVAL_METHOD 0 /* no promotion */ -#define DECIMAL_DIG 35 /* max precision in decimal digits */ +#define DECIMAL_DIG 36 /* max precision in decimal digits */ #endif #define FLT_MANT_DIG 24 /* p */ Modified: head/sys/sun4v/include/float.h ============================================================================== --- head/sys/sun4v/include/float.h Sun Jan 9 06:05:22 2011 (r217181) +++ head/sys/sun4v/include/float.h Sun Jan 9 06:05:48 2011 (r217182) @@ -48,7 +48,7 @@ __END_DECLS #define FLT_ROUNDS __flt_rounds() #if __ISO_C_VISIBLE >= 1999 #define FLT_EVAL_METHOD 0 /* no promotion */ -#define DECIMAL_DIG 35 /* max precision in decimal digits */ +#define DECIMAL_DIG 36 /* max precision in decimal digits */ #endif #define FLT_MANT_DIG 24 /* p */ From owner-svn-src-head@FreeBSD.ORG Sun Jan 9 06:17:46 2011 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 B41291065670; Sun, 9 Jan 2011 06:17:46 +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 A42DA8FC17; Sun, 9 Jan 2011 06:17: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 p096Hkef031842; Sun, 9 Jan 2011 06:17:46 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p096HkWd031840; Sun, 9 Jan 2011 06:17:46 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201101090617.p096HkWd031840@svn.freebsd.org> From: Adrian Chadd Date: Sun, 9 Jan 2011 06:17: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: r217184 - head/sys/mips/atheros 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, 09 Jan 2011 06:17:46 -0000 Author: adrian Date: Sun Jan 9 06:17:46 2011 New Revision: 217184 URL: http://svn.freebsd.org/changeset/base/217184 Log: Add missing ar91xx definition for the WMAC reset control. Modified: head/sys/mips/atheros/ar91xxreg.h Modified: head/sys/mips/atheros/ar91xxreg.h ============================================================================== --- head/sys/mips/atheros/ar91xxreg.h Sun Jan 9 06:12:33 2011 (r217183) +++ head/sys/mips/atheros/ar91xxreg.h Sun Jan 9 06:17:46 2011 (r217184) @@ -35,6 +35,7 @@ #define AR91XX_RESET_REG_RESET_MODULE AR71XX_RST_BLOCK_BASE + 0x1c #define AR91XX_RST_RESET_MODULE_USBSUS_OVERRIDE (1 << 10) +#define AR91XX_RST_RESET_MODULE_AMBA2WMAC (1 << 22) /* PLL block */ #define AR91XX_PLL_REG_CPU_CONFIG AR71XX_PLL_CPU_BASE + 0x00 From owner-svn-src-head@FreeBSD.ORG Sun Jan 9 09:21:12 2011 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 0EC171065672; Sun, 9 Jan 2011 09:21:12 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F26D78FC0C; Sun, 9 Jan 2011 09:21: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 p099LBXL036522; Sun, 9 Jan 2011 09:21:11 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p099LBuw036520; Sun, 9 Jan 2011 09:21:11 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201101090921.p099LBuw036520@svn.freebsd.org> From: Jaakko Heinonen Date: Sun, 9 Jan 2011 09:21: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: r217187 - head/etc/defaults 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, 09 Jan 2011 09:21:12 -0000 Author: jh Date: Sun Jan 9 09:21:11 2011 New Revision: 217187 URL: http://svn.freebsd.org/changeset/base/217187 Log: Replace nfs4 with newnfs in netfs_types. nfs4 was removed in r192578 and mount(8) has supported newnfs since r192930. PR: conf/153655 Submitted by: Anonymous MFC after: 3 weeks Modified: head/etc/defaults/rc.conf Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Sun Jan 9 08:54:57 2011 (r217186) +++ head/etc/defaults/rc.conf Sun Jan 9 09:21:11 2011 (r217187) @@ -89,7 +89,7 @@ fsck_y_enable="NO" # Set to YES to do fs fsck_y_flags="" # Additional flags for fsck -y background_fsck="YES" # Attempt to run fsck in the background where possible. background_fsck_delay="60" # Time to wait (seconds) before starting the fsck. -netfs_types="nfs:NFS nfs4:NFS4 smbfs:SMB portalfs:PORTAL nwfs:NWFS" # Net filesystems. +netfs_types="nfs:NFS newnfs:NEWNFS smbfs:SMB portalfs:PORTAL nwfs:NWFS" # Net filesystems. extra_netfs_types="NO" # List of network extra filesystem types for delayed # mount at startup (or NO). From owner-svn-src-head@FreeBSD.ORG Sun Jan 9 12:38:40 2011 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 EBBBF1065672; Sun, 9 Jan 2011 12:38:40 +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 DAB888FC18; Sun, 9 Jan 2011 12:38: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 p09Cce2t042908; Sun, 9 Jan 2011 12:38:40 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p09CceMj042902; Sun, 9 Jan 2011 12:38:40 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201101091238.p09CceMj042902@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 9 Jan 2011 12:38: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: r217191 - in head/lib/libthr: . thread 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, 09 Jan 2011 12:38:41 -0000 Author: kib Date: Sun Jan 9 12:38:40 2011 New Revision: 217191 URL: http://svn.freebsd.org/changeset/base/217191 Log: Implement the __pthread_map_stacks_exec() for libthr. Stack creation code is changed to call _rtld_get_stack_prot() to get the stack protection right. There is a race where thread is created during dlopen() of dso that requires executable stacks. Then, _rtld_get_stack_prot() may return PROT_READ | PROT_WRITE, but thread is still not linked into the thread list. In this case, the callback misses the thread stack, and rechecks the required protection afterward. Reviewed by: davidxu Modified: head/lib/libthr/pthread.map head/lib/libthr/thread/thr_create.c head/lib/libthr/thread/thr_private.h head/lib/libthr/thread/thr_rtld.c head/lib/libthr/thread/thr_stack.c Modified: head/lib/libthr/pthread.map ============================================================================== --- head/lib/libthr/pthread.map Sun Jan 9 11:52:23 2011 (r217190) +++ head/lib/libthr/pthread.map Sun Jan 9 12:38:40 2011 (r217191) @@ -382,6 +382,8 @@ FBSDprivate_1.0 { _thread_size_key; _thread_state_running; _thread_state_zoombie; + + __pthread_map_stacks_exec; }; FBSD_1.1 { Modified: head/lib/libthr/thread/thr_create.c ============================================================================== --- head/lib/libthr/thread/thr_create.c Sun Jan 9 11:52:23 2011 (r217190) +++ head/lib/libthr/thread/thr_create.c Sun Jan 9 12:38:40 2011 (r217191) @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -58,6 +59,7 @@ _pthread_create(pthread_t * thread, cons sigset_t set, oset; cpuset_t *cpusetp = NULL; int cpusetsize = 0; + int old_stack_prot; _thr_check_init(); @@ -96,6 +98,7 @@ _pthread_create(pthread_t * thread, cons new_thread->tid = TID_TERMINATED; + old_stack_prot = _rtld_get_stack_prot(); if (create_stack(&new_thread->attr) != 0) { /* Insufficient memory to create a stack: */ _thr_free(curthread, new_thread); @@ -130,6 +133,14 @@ _pthread_create(pthread_t * thread, cons /* Add the new thread. */ new_thread->refcount = 1; _thr_link(curthread, new_thread); + + /* + * Handle the race between __pthread_map_stacks_exec and + * thread linkage. + */ + if (old_stack_prot != _rtld_get_stack_prot()) + _thr_stack_fix_protection(new_thread); + /* Return thread pointer eariler so that new thread can use it. */ (*thread) = new_thread; if (SHOULD_REPORT_EVENT(curthread, TD_CREATE) || cpusetp != NULL) { Modified: head/lib/libthr/thread/thr_private.h ============================================================================== --- head/lib/libthr/thread/thr_private.h Sun Jan 9 11:52:23 2011 (r217190) +++ head/lib/libthr/thread/thr_private.h Sun Jan 9 12:38:40 2011 (r217191) @@ -898,6 +898,7 @@ struct dl_phdr_info; void __pthread_cxa_finalize(struct dl_phdr_info *phdr_info); void _thr_tsd_unload(struct dl_phdr_info *phdr_info) __hidden; void _thr_sigact_unload(struct dl_phdr_info *phdr_info) __hidden; +void _thr_stack_fix_protection(struct pthread *thrd); __END_DECLS Modified: head/lib/libthr/thread/thr_rtld.c ============================================================================== --- head/lib/libthr/thread/thr_rtld.c Sun Jan 9 11:52:23 2011 (r217190) +++ head/lib/libthr/thread/thr_rtld.c Sun Jan 9 12:38:40 2011 (r217191) @@ -31,6 +31,8 @@ * A lockless rwlock for rtld. */ #include +#include +#include #include #include @@ -194,6 +196,9 @@ _thr_rtld_init(void) /* force to resolve memcpy PLT */ memcpy(&dummy, &dummy, sizeof(dummy)); + mprotect(NULL, 0, 0); + _rtld_get_stack_prot(); + li.lock_create = _thr_rtld_lock_create; li.lock_destroy = _thr_rtld_lock_destroy; li.rlock_acquire = _thr_rtld_rlock_acquire; Modified: head/lib/libthr/thread/thr_stack.c ============================================================================== --- head/lib/libthr/thread/thr_stack.c Sun Jan 9 11:52:23 2011 (r217190) +++ head/lib/libthr/thread/thr_stack.c Sun Jan 9 12:38:40 2011 (r217191) @@ -32,6 +32,7 @@ #include #include #include +#include #include "thr_private.h" @@ -128,6 +129,38 @@ round_up(size_t size) return size; } +void +_thr_stack_fix_protection(struct pthread *thrd) +{ + + mprotect((char *)thrd->attr.stackaddr_attr + + round_up(thrd->attr.guardsize_attr), + round_up(thrd->attr.stacksize_attr), + _rtld_get_stack_prot()); +} + +void __pthread_map_stacks_exec(void); +void +__pthread_map_stacks_exec(void) +{ + struct pthread *curthread, *thrd; + struct stack *st; + + curthread = _get_curthread(); + THREAD_LIST_RDLOCK(curthread); + LIST_FOREACH(st, &mstackq, qe) + mprotect((char *)st->stackaddr + st->guardsize, st->stacksize, + _rtld_get_stack_prot()); + LIST_FOREACH(st, &dstackq, qe) + mprotect((char *)st->stackaddr + st->guardsize, st->stacksize, + _rtld_get_stack_prot()); + TAILQ_FOREACH(thrd, &_thread_gc_list, gcle) + _thr_stack_fix_protection(thrd); + TAILQ_FOREACH(thrd, &_thread_list, tle) + _thr_stack_fix_protection(thrd); + THREAD_LIST_UNLOCK(curthread); +} + int _thr_stack_alloc(struct pthread_attr *attr) { @@ -210,7 +243,7 @@ _thr_stack_alloc(struct pthread_attr *at /* Map the stack and guard page together, and split guard page from allocated space: */ if ((stackaddr = mmap(stackaddr, stacksize+guardsize, - PROT_READ | PROT_WRITE, MAP_STACK, + _rtld_get_stack_prot(), MAP_STACK, -1, 0)) != MAP_FAILED && (guardsize == 0 || mprotect(stackaddr, guardsize, PROT_NONE) == 0)) { From owner-svn-src-head@FreeBSD.ORG Sun Jan 9 12:50:45 2011 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 26F4D10656A9; Sun, 9 Jan 2011 12:50:45 +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 12EC18FC22; Sun, 9 Jan 2011 12:50: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 p09CoifZ043266; Sun, 9 Jan 2011 12:50:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p09CoiTI043253; Sun, 9 Jan 2011 12:50:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201101091250.p09CoiTI043253@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 9 Jan 2011 12:50: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: r217192 - in head: bin/ps sys/amd64/include sys/arm/include sys/i386/include sys/ia64/include sys/mips/include sys/powerpc/include sys/sparc64/include sys/sun4v/include sys/sys 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, 09 Jan 2011 12:50:45 -0000 Author: kib Date: Sun Jan 9 12:50:44 2011 New Revision: 217192 URL: http://svn.freebsd.org/changeset/base/217192 Log: Move repeated MAXSLP definition from machine/vmparam.h to sys/vmmeter.h. Update the outdated comments describing MAXSLP and the process selection algorithm for swap out. Comments wording and reviewed by: alc Modified: head/bin/ps/print.c head/sys/amd64/include/vmparam.h head/sys/arm/include/vmparam.h head/sys/i386/include/vmparam.h head/sys/ia64/include/vmparam.h head/sys/mips/include/vmparam.h head/sys/powerpc/include/vmparam.h head/sys/sparc64/include/vmparam.h head/sys/sun4v/include/vmparam.h head/sys/sys/vmmeter.h head/sys/vm/vm_glue.c head/sys/vm/vm_meter.c Modified: head/bin/ps/print.c ============================================================================== --- head/bin/ps/print.c Sun Jan 9 12:38:40 2011 (r217191) +++ head/bin/ps/print.c Sun Jan 9 12:50:44 2011 (r217192) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/amd64/include/vmparam.h ============================================================================== --- head/sys/amd64/include/vmparam.h Sun Jan 9 12:38:40 2011 (r217191) +++ head/sys/amd64/include/vmparam.h Sun Jan 9 12:50:44 2011 (r217192) @@ -70,17 +70,6 @@ #endif /* - * The time for a process to be blocked before being very swappable. - * This is a number of seconds which the system takes as being a non-trivial - * amount of real time. You probably shouldn't change this; - * it is used in subtle ways (fractions and multiples of it are, that is, like - * half of a ``long time'', almost a long time, etc.) - * It is related to human patience and other factors which don't really - * change over time. - */ -#define MAXSLP 20 - -/* * We provide a machine specific single page allocator through the use * of the direct mapped segment. This uses 2MB pages for reduced * TLB pressure. Modified: head/sys/arm/include/vmparam.h ============================================================================== --- head/sys/arm/include/vmparam.h Sun Jan 9 12:38:40 2011 (r217191) +++ head/sys/arm/include/vmparam.h Sun Jan 9 12:50:44 2011 (r217192) @@ -146,7 +146,6 @@ #define DFLSSIZ (2*1024*1024) #define MAXSSIZ (8*1024*1024) #define SGROWSIZ (128*1024) -#define MAXSLP 20 #ifdef ARM_USE_SMALL_ALLOC #define UMA_MD_SMALL_ALLOC Modified: head/sys/i386/include/vmparam.h ============================================================================== --- head/sys/i386/include/vmparam.h Sun Jan 9 12:38:40 2011 (r217191) +++ head/sys/i386/include/vmparam.h Sun Jan 9 12:50:44 2011 (r217192) @@ -64,18 +64,6 @@ #endif /* - * The time for a process to be blocked before being very swappable. - * This is a number of seconds which the system takes as being a non-trivial - * amount of real time. You probably shouldn't change this; - * it is used in subtle ways (fractions and multiples of it are, that is, like - * half of a ``long time'', almost a long time, etc.) - * It is related to human patience and other factors which don't really - * change over time. - */ -#define MAXSLP 20 - - -/* * The physical address space is densely populated. */ #define VM_PHYSSEG_DENSE Modified: head/sys/ia64/include/vmparam.h ============================================================================== --- head/sys/ia64/include/vmparam.h Sun Jan 9 12:38:40 2011 (r217191) +++ head/sys/ia64/include/vmparam.h Sun Jan 9 12:50:44 2011 (r217192) @@ -70,17 +70,6 @@ #endif /* - * The time for a process to be blocked before being very swappable. - * This is a number of seconds which the system takes as being a non-trivial - * amount of real time. You probably shouldn't change this; - * it is used in subtle ways (fractions and multiples of it are, that is, like - * half of a ``long time'', almost a long time, etc.) - * It is related to human patience and other factors which don't really - * change over time. - */ -#define MAXSLP 20 - -/* * We need region 7 virtual addresses for pagetables. */ #define UMA_MD_SMALL_ALLOC Modified: head/sys/mips/include/vmparam.h ============================================================================== --- head/sys/mips/include/vmparam.h Sun Jan 9 12:38:40 2011 (r217191) +++ head/sys/mips/include/vmparam.h Sun Jan 9 12:50:44 2011 (r217192) @@ -69,17 +69,6 @@ #define SGROWSIZ (128UL*1024) /* amount to grow stack */ #endif -/* - * The time for a process to be blocked before being very swappable. - * This is a number of seconds which the system takes as being a non-trivial - * amount of real time. You probably shouldn't change this; - * it is used in subtle ways (fractions and multiples of it are, that is, like - * half of a ``long time'', almost a long time, etc.) - * It is related to human patience and other factors which don't really - * change over time. - */ -#define MAXSLP 20 - /* * Mach derived constants */ Modified: head/sys/powerpc/include/vmparam.h ============================================================================== --- head/sys/powerpc/include/vmparam.h Sun Jan 9 12:38:40 2011 (r217191) +++ head/sys/powerpc/include/vmparam.h Sun Jan 9 12:50:44 2011 (r217192) @@ -58,17 +58,6 @@ #endif /* - * The time for a process to be blocked before being very swappable. - * This is a number of seconds which the system takes as being a non-trivial - * amount of real time. You probably shouldn't change this; - * it is used in subtle ways (fractions and multiples of it are, that is, like - * half of a ``long time'', almost a long time, etc.) - * It is related to human patience and other factors which don't really - * change over time. - */ -#define MAXSLP 20 - -/* * Would like to have MAX addresses = 0, but this doesn't (currently) work */ #if !defined(LOCORE) Modified: head/sys/sparc64/include/vmparam.h ============================================================================== --- head/sys/sparc64/include/vmparam.h Sun Jan 9 12:38:40 2011 (r217191) +++ head/sys/sparc64/include/vmparam.h Sun Jan 9 12:50:44 2011 (r217192) @@ -66,17 +66,6 @@ #endif /* - * The time for a process to be blocked before being very swappable. - * This is a number of seconds which the system takes as being a non-trivial - * amount of real time. You probably shouldn't change this; - * it is used in subtle ways (fractions and multiples of it are, that is, like - * half of a ``long time'', almost a long time, etc.) - * It is related to human patience and other factors which don't really - * change over time. - */ -#define MAXSLP 20 - -/* * The physical address space is sparsely populated. */ #define VM_PHYSSEG_SPARSE Modified: head/sys/sun4v/include/vmparam.h ============================================================================== --- head/sys/sun4v/include/vmparam.h Sun Jan 9 12:38:40 2011 (r217191) +++ head/sys/sun4v/include/vmparam.h Sun Jan 9 12:50:44 2011 (r217192) @@ -66,17 +66,6 @@ #endif /* - * The time for a process to be blocked before being very swappable. - * This is a number of seconds which the system takes as being a non-trivial - * amount of real time. You probably shouldn't change this; - * it is used in subtle ways (fractions and multiples of it are, that is, like - * half of a ``long time'', almost a long time, etc.) - * It is related to human patience and other factors which don't really - * change over time. - */ -#define MAXSLP 20 - -/* * The physical address space is densely populated. */ #define VM_PHYSSEG_DENSE Modified: head/sys/sys/vmmeter.h ============================================================================== --- head/sys/sys/vmmeter.h Sun Jan 9 12:38:40 2011 (r217191) +++ head/sys/sys/vmmeter.h Sun Jan 9 12:50:44 2011 (r217192) @@ -34,6 +34,12 @@ #define _SYS_VMMETER_H_ /* + * This value is used by ps(1) to change sleep state flag from 'S' to + * 'I' and by the sched process to set the alarm clock. + */ +#define MAXSLP 20 + +/* * System wide statistics counters. * Locking: * a - locked by atomic operations Modified: head/sys/vm/vm_glue.c ============================================================================== --- head/sys/vm/vm_glue.c Sun Jan 9 12:38:40 2011 (r217191) +++ head/sys/vm/vm_glue.c Sun Jan 9 12:50:44 2011 (r217192) @@ -94,8 +94,6 @@ __FBSDID("$FreeBSD$"); #include #include -extern int maxslp; - /* * System initialization * @@ -770,7 +768,7 @@ loop: * Nothing to do, back to sleep. */ if ((p = pp) == NULL) { - tsleep(&proc0, PVM, "sched", maxslp * hz / 2); + tsleep(&proc0, PVM, "sched", MAXSLP * hz / 2); goto loop; } PROC_LOCK(p); @@ -819,12 +817,12 @@ SYSCTL_INT(_vm, OID_AUTO, swap_idle_thre &swap_idle_threshold2, 0, "Time before a process will be swapped out"); /* - * Swapout is driven by the pageout daemon. Very simple, we find eligible - * procs and swap out their stacks. We try to always "swap" at least one - * process in case we need the room for a swapin. - * If any procs have been sleeping/stopped for at least maxslp seconds, - * they are swapped. Else, we swap the longest-sleeping or stopped process, - * if any, otherwise the longest-resident process. + * First, if any processes have been sleeping or stopped for at least + * "swap_idle_threshold1" seconds, they are swapped out. If, however, + * no such processes exist, then the longest-sleeping or stopped + * process is swapped out. Finally, and only as a last resort, if + * there are no sleeping or stopped processes, the longest-resident + * process is swapped out. */ void swapout_procs(action) Modified: head/sys/vm/vm_meter.c ============================================================================== --- head/sys/vm/vm_meter.c Sun Jan 9 12:38:40 2011 (r217191) +++ head/sys/vm/vm_meter.c Sun Jan 9 12:50:44 2011 (r217192) @@ -54,8 +54,6 @@ __FBSDID("$FreeBSD$"); struct vmmeter cnt; -int maxslp = MAXSLP; - SYSCTL_UINT(_vm, VM_V_FREE_MIN, v_free_min, CTLFLAG_RW, &cnt.v_free_min, 0, ""); SYSCTL_UINT(_vm, VM_V_FREE_TARGET, v_free_target, From owner-svn-src-head@FreeBSD.ORG Sun Jan 9 12:55:08 2011 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 6A88F106564A; Sun, 9 Jan 2011 12:55:08 +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 EBBCF8FC1B; Sun, 9 Jan 2011 12:55:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id F0FFC41C7AB; Sun, 9 Jan 2011 13:55:06 +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 K9qWPeXfAEcj; Sun, 9 Jan 2011 13:55:06 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 3582941C7AA; Sun, 9 Jan 2011 13:55: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 99C8A4448F3; Sun, 9 Jan 2011 12:54:44 +0000 (UTC) Date: Sun, 9 Jan 2011 12:54:44 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Alfred Perlstein In-Reply-To: <200812010045.mB10jpmX007146@svn.freebsd.org> Message-ID: <20110109125302.J14966@maildrop.int.zabbadoz.net> References: <200812010045.mB10jpmX007146@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: r185499 - 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, 09 Jan 2011 12:55:08 -0000 On Mon, 1 Dec 2008, Alfred Perlstein wrote: > Author: alfred > Date: Mon Dec 1 00:45:51 2008 > New Revision: 185499 > URL: http://svn.freebsd.org/changeset/base/185499 > > Log: > Provide a 'tinderbox' target that compiles enough of FreeBSD that > a developer can rest reasonably assured that the tinderbox will not > be broken. This target leverages most of 'universe' but will exit > non-zero and output a summary at the end. > > "make tinderbox" Hi, I noticed that the file always grew but was never displayed automatically nor removed on a new run. I guess it's because I have MAKEOBJDIRPREFIX set in the environment and `pwd` is not ${.CURDIR} for the two operations. Anyone see any problems with this? Index: Makefile =================================================================== --- Makefile (revision 217191) +++ Makefile (working copy) @@ -301,7 +301,7 @@ targets: .endfor .if defined(DOING_TINDERBOX) -FAILFILE=tinderbox.failed +FAILFILE=${.CURDIR}/tinderbox.failed MAKEFAIL=tee -a ${FAILFILE} .else MAKEFAIL=cat > Modified: > head/Makefile > > Modified: head/Makefile > ============================================================================== > --- head/Makefile Mon Dec 1 00:23:12 2008 (r185498) > +++ head/Makefile Mon Dec 1 00:45:51 2008 (r185499) > @@ -267,6 +267,10 @@ make: .PHONY > ${MMAKE} all && \ > ${MMAKE} install DESTDIR=${MAKEPATH} BINDIR= > > +tinderbox: > + cd ${.CURDIR} && \ > + DOING_TINDERBOX=YES ${MAKE} ${JFLAG} universe > + > # > # universe > # > @@ -274,14 +278,24 @@ make: .PHONY > # with a reasonable chance of success, regardless of how old your > # existing system is. > # > -.if make(universe) > +.if make(universe) || make(tinderbox) > TARGETS?=amd64 arm i386 ia64 pc98 powerpc sparc64 sun4v > > +.if defined(DOING_TINDERBOX) > +FAILFILE=tinderbox.failed > +MAKEFAIL=tee -a ${FAILFILE} > +.else > +MAKEFAIL=cat > +.endif > + > universe: universe_prologue > universe_prologue: > @echo "--------------------------------------------------------------" > @echo ">>> make universe started on ${STARTTIME}" > @echo "--------------------------------------------------------------" > +.if defined(DOING_TINDERBOX) > + rm -f ${FAILFILE} > +.endif > .for target in ${TARGETS} > KERNCONFS!= cd ${.CURDIR}/sys/${target}/conf && \ > find [A-Z]*[A-Z] -type f -maxdepth 0 \ > @@ -296,15 +310,15 @@ universe_${target}: > ${MAKE} ${JFLAG} buildworld \ > TARGET=${target} \ > > _.${target}.buildworld 2>&1 || \ > - echo "${target} world failed," \ > - "check _.${target}.buildworld for details") > + (echo "${target} world failed," \ > + "check _.${target}.buildworld for details" | ${MAKEFAIL})) > @echo ">> ${target} buildworld completed on `LC_ALL=C date`" > .endif > .if exists(${.CURDIR}/sys/${target}/conf/NOTES) > @(cd ${.CURDIR}/sys/${target}/conf && env __MAKE_CONF=/dev/null \ > ${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \ > - echo "${target} 'make LINT' failed," \ > - "check _.${target}.makeLINT for details") > + (echo "${target} 'make LINT' failed," \ > + "check _.${target}.makeLINT for details"| ${MAKEFAIL})) > .endif > .for kernel in ${KERNCONFS} > @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ > @@ -312,8 +326,8 @@ universe_${target}: > TARGET=${target} \ > KERNCONF=${kernel} \ > > _.${target}.${kernel} 2>&1 || \ > - echo "${target} ${kernel} kernel failed," \ > - "check _.${target}.${kernel} for details") > + (echo "${target} ${kernel} kernel failed," \ > + "check _.${target}.${kernel} for details"| ${MAKEFAIL})) > .endfor > @echo ">> ${target} completed on `LC_ALL=C date`" > .endfor > @@ -323,4 +337,11 @@ universe_epilogue: > @echo ">>> make universe completed on `LC_ALL=C date`" > @echo " (started ${STARTTIME})" > @echo "--------------------------------------------------------------" > +.if defined(DOING_TINDERBOX) > + @if [ -e ${FAILFILE} ] ; then \ > + echo "Tinderbox failed:" ;\ > + cat ${FAILFILE} ;\ > + exit 1 ;\ > + fi > +.endif > .endif > -- Bjoern A. Zeeb You have to have visions! 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 Sun Jan 9 14:18:26 2011 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 DF1381065782; Sun, 9 Jan 2011 14:18:26 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 7078E8FC1C; Sun, 9 Jan 2011 14:18:26 +0000 (UTC) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id p09EIPAS080840 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 9 Jan 2011 15:18:25 +0100 (CET) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1294582705; bh=i2MbE00U15u4fPXLnS7OHLf2KL85wk5TG05yqGmZz9A=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=oEBP1Zh+pCfByDYjJ2ziZOH/bS/YmtdKr2lZcYOUFNWk79T68pYaasrtDoexEXMw5 5AcWb9A6xrHERJvJKv6KjIH/vXNYEnLP0TgUbOIOqZ5yFk5PdWKyTWZoxiXaUn77D/ oO+2whBZK2ecaTx6QSwMcAn0Zlpf80klGDTgfdPg= Date: Sun, 9 Jan 2011 15:18:25 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Warner Losh Message-ID: <20110109141825.GF23329@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: <201101062109.p06L9Mdg028557@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201101062109.p06L9Mdg028557@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: r217073 - head/etc/rc.d 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, 09 Jan 2011 14:18:27 -0000 On Thu, 06.01.2011 at 21:09:22 +0000, Warner Losh wrote: > Author: imp > Date: Thu Jan 6 21:09:22 2011 > New Revision: 217073 > URL: http://svn.freebsd.org/changeset/base/217073 > > Log: > Don't require /usr/lib/aout to be on the system. Test for its > existance since we don't generally need it. > > MFC after: 1 week > > Modified: > head/etc/rc.d/ldconfig Umm, Would someone object if the aout stuff get's ripped out with prejudice? Regards, Uli From owner-svn-src-head@FreeBSD.ORG Sun Jan 9 14:34:57 2011 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 3FA34106564A; Sun, 9 Jan 2011 14:34:57 +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 155C98FC08; Sun, 9 Jan 2011 14:34: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 p09EYu7S045952; Sun, 9 Jan 2011 14:34:56 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p09EYuDF045950; Sun, 9 Jan 2011 14:34:56 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201101091434.p09EYuDF045950@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 9 Jan 2011 14:34: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: r217195 - 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, 09 Jan 2011 14:34:57 -0000 Author: bz Date: Sun Jan 9 14:34:56 2011 New Revision: 217195 URL: http://svn.freebsd.org/changeset/base/217195 Log: Improve style and wording of comments and sysctl descriptions [1]. Move machdep.ct_debug to debug.clocktime as there was no reason to actually put it under machdep in r216340. Submitted by: bde [1] MFC after: 3 days Modified: head/sys/kern/subr_clock.c Modified: head/sys/kern/subr_clock.c ============================================================================== --- head/sys/kern/subr_clock.c Sun Jan 9 14:18:16 2011 (r217194) +++ head/sys/kern/subr_clock.c Sun Jan 9 14:34:56 2011 (r217195) @@ -49,22 +49,14 @@ __FBSDID("$FreeBSD$"); #include #include -static int ct_debug; -static int adjkerntz; /* local offset from UTC in seconds */ -static int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */ - int tz_minuteswest; int tz_dsttime; /* - * This have traditionally been in machdep, but should probably be moved to - * kern. + * The adjkerntz and wall_cmos_clock sysctls are in the "machdep" sysctl + * namespace because they were misplaced there originally. */ -SYSCTL_INT(_machdep, OID_AUTO, ct_debug, - CTLFLAG_RW, &ct_debug, 0, "Print ct debug if enabled."); -SYSCTL_INT(_machdep, OID_AUTO, wall_cmos_clock, - CTLFLAG_RW, &wall_cmos_clock, 0, "CMOS clock keeps wall time"); - +static int adjkerntz; static int sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ARGS) { @@ -74,11 +66,18 @@ sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ resettodr(); return (error); } - SYSCTL_PROC(_machdep, OID_AUTO, adjkerntz, CTLTYPE_INT|CTLFLAG_RW, &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", "Local offset from UTC in seconds"); +static int ct_debug; +SYSCTL_INT(_debug, OID_AUTO, clocktime, CTLFLAG_RW, + &ct_debug, 0, "Enable printing of clocktime debugging"); + +static int wall_cmos_clock; +SYSCTL_INT(_machdep, OID_AUTO, wall_cmos_clock, CTLFLAG_RW, + &wall_cmos_clock, 0, "Enables application of machdep.adjkerntz"); + /*--------------------------------------------------------------------* * Generic routines to convert between a POSIX date * (seconds since 1/1/1970) and yr/mo/day/hr/min/sec From owner-svn-src-head@FreeBSD.ORG Sun Jan 9 14:45:17 2011 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 093F8106566C; Sun, 9 Jan 2011 14:45:17 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay009.isp.belgacom.be (mailrelay009.isp.belgacom.be [195.238.6.176]) by mx1.freebsd.org (Postfix) with ESMTP id EDDF28FC08; Sun, 9 Jan 2011 14:45:15 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEABZXKU1bsZXL/2dsb2JhbACkRnS7B4VMBA Received: from 203.149-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.149.203]) by relay.skynet.be with ESMTP; 09 Jan 2011 15:45:14 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.4/8.14.4) with ESMTP id p09EjDdO003310; Sun, 9 Jan 2011 15:45:13 +0100 (CET) (envelope-from tijl@freebsd.org) From: Tijl Coosemans To: Juli Mallett Date: Sun, 9 Jan 2011 15:45:04 +0100 User-Agent: KMail/1.13.5 (FreeBSD/9.0-CURRENT; KDE/4.5.2; i386; ; ) References: <201101081243.p08Ch5vR092295@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart5487643.9KjrX2DFoP"; protocol="application/pgp-signature"; micalg=pgp-sha256 Content-Transfer-Encoding: 7bit Message-Id: <201101091545.11754.tijl@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r217147 - in head/sys: amd64/include arm/include i386/include ia64/include mips/include powerpc/include sparc64/include sun4v/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: Sun, 09 Jan 2011 14:45:17 -0000 --nextPart5487643.9KjrX2DFoP Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Saturday 08 January 2011 21:30:49 Juli Mallett wrote: > On Sat, Jan 8, 2011 at 04:43, Tijl Coosemans wrote: >> Author: tijl >> Date: Sat Jan 8 12:43:05 2011 >> New Revision: 217147 >> URL: http://svn.freebsd.org/changeset/base/217147 >> >> Log: >> On mixed 32/64 bit architectures (mips, powerpc) use __LP64__ rather th= an >> architecture macros (__mips_n64, __powerpc64__) when 64 bit types (and >> corresponding macros) are different from 32 bit. [1] >=20 > I don't know why you didn't talk with MIPS people at all about these > changes. That they were reviewed by Bruce is very reassuring in > aesthetic terms, but that's hardly sufficient. >=20 > This and other changes have made it harder to support common MIPS > configurations and compilation options on FreeBSD. I'm glad you're at > least aware of n32 (as indicated in another message) and its > implications, but the use of ABI-specific names was deliberate. Have > you thought about -n32 with -mlong64? It isn't the same kind of dirty > hack as Bruce talks about when he talks about 64-bit longs on x86. >=20 > I understand that __LP64__ and the idea that there are two reasonable > ABIs most (one 32-bit and one 64-bit) is appealing, but it's not true. > In the case of PowerPC, it does look like they weren't ABI-specific > macros, but MIPS's were. If nothing else, you make MIPS headers more > inconsistent with themselves, where most of them are > ABI-conditionalized and now some are instead LP64-centric. >=20 > It seems like your end goal is probably consolidating these headers, > which I would like, too, but please attempt to allow for more > variation than just "longs are 32-bit and pointers are 32-bit, > otherwise longs are 64-bit and pointers are 64-bit." We're trying to > do the right thing with MIPS in terms of supporting multiple valid > ABIs on a single port, something which is a lot harder when people > restructure these critical headers without even asking us whether > there are any evident problems; even if 'make universe', for instance, > were enough, it leaves out some ABIs, and it certainly leaves out > future plans wrt ABIs. My main goal is to compile 32 bit code on amd64. To do that i386 and amd64 headers need to be merged as much as possible and I'm looking at mips and powerpc headers as examples. As I'm going through each of the machine headers however and as people review my patches several issues have come up. These are mostly generic in nature and spread over all architectures, not just mips. There are more problems in the mips and powerpc headers however because of the complexity of supporting both 32 bit and 64 bit ABIs. If you consider the mips headers too delicate to be changed without approval from mips@ I'll make sure to send patches there before committing from now on. As for 64 bit longs on 32 bit ABIs I would advise against spending your time on that. It's something that sounds nice in theory, but it's just not practical. You don't gain anything from it because there's another 64 bit type already (long long) and there's too much code out there that relies on long and pointer types having the same size or that assumes long is different between 32 bit and 64 bit ABIs, also in our own tree. So yes, in practice there's only ILP32 and LP64 and nothing in between. About the use of __LP64__. It's essentially cosmetic and can easily be changed back. However, if you can agree with me on mlong64 I would like to keep it (for type definitions). What the patches (committed + upcoming) show is that _inttypes.h, _limits.h and _stdint.h (_types.h needs more work) are exactly the same for mips, powerpc and x86 indicating that they aren't architecture specific. Changing __LP64__ back to __mips_n64 would introduce a difference that isn't any. Moreover, those headers would also work on pure ILP32 (arm) and LP64 (ia64, sparc64) architectures, so personally I would like to move them to sys/, because as the patches show, duplicated code starts to diverge, bugs creep in and are subsequently copy-pasted. Whenever I suggested this to someone however I never really got a positive response so the headers will stay under machine/ for now. I would still like to get a clear yes or no on this though. If you would still like to support mlong64, I think it should be possible to do this for all 32 bit architectures because the size of long isn't architecture dependent. But like I said, in my opinion it requires a lot of effort to get right for no gain at all. --nextPart5487643.9KjrX2DFoP Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iF4EABEIAAYFAk0pyfcACgkQfoCS2CCgtisQCgD+JpivGdKHMVojasPXYx1EGp9C GUlYrc5W/4hPc1/F1UwA+gKN+8xgtQLPd4A+sqg41rNpGD7NeyuNUSYRA7zXij5w =c5kQ -----END PGP SIGNATURE----- --nextPart5487643.9KjrX2DFoP-- From owner-svn-src-head@FreeBSD.ORG Sun Jan 9 17:10:07 2011 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 7C53C1065694; Sun, 9 Jan 2011 17:10:07 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6BA3B8FC24; Sun, 9 Jan 2011 17:10: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 p09HA7nu050185; Sun, 9 Jan 2011 17:10:07 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p09HA7RK050182; Sun, 9 Jan 2011 17:10:07 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201101091710.p09HA7RK050182@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 9 Jan 2011 17:10: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: r217200 - 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, 09 Jan 2011 17:10:07 -0000 Author: gavin Date: Sun Jan 9 17:10:06 2011 New Revision: 217200 URL: http://svn.freebsd.org/changeset/base/217200 Log: Sync the list of devices supported by uslcom(4) with Linux, bringing in all new devices added between our r211022 and their git revision 93ad03d60b5b18897030038234aa2ebae8234748 Also correct a Foxconn entry. MFC after: 1 week Modified: head/sys/dev/usb/serial/uslcom.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/uslcom.c ============================================================================== --- head/sys/dev/usb/serial/uslcom.c Sun Jan 9 16:58:38 2011 (r217199) +++ head/sys/dev/usb/serial/uslcom.c Sun Jan 9 17:10:06 2011 (r217200) @@ -186,6 +186,7 @@ static const struct usb_device_id uslcom USLCOM_DEV(DYNASTREAM, ANT2USB), USLCOM_DEV(ELV, USBI2C), USLCOM_DEV(FOXCONN, PIRELLI_DP_L10), + USLCOM_DEV(FOXCONN, TCOM_TC_300), USLCOM_DEV(GEMALTO, PROXPU), USLCOM_DEV(JABLOTRON, PC60B), USLCOM_DEV(MEI, CASHFLOW_SC), @@ -194,6 +195,7 @@ static const struct usb_device_id uslcom USLCOM_DEV(OWEN, AC4), USLCOM_DEV(PHILIPS, ACE1001), USLCOM_DEV(PLX, CA42), + USLCOM_DEV(RENESAS, RX610), USLCOM_DEV(SILABS, AEROCOMM), USLCOM_DEV(SILABS, AMBER_AMB2560), USLCOM_DEV(SILABS, ARGUSISP), @@ -201,6 +203,8 @@ static const struct usb_device_id uslcom USLCOM_DEV(SILABS, ARKHAM_DS101_M), USLCOM_DEV(SILABS, ARYGON_MIFARE), USLCOM_DEV(SILABS, AVIT_USB_TTL), + USLCOM_DEV(SILABS, B_G_H3000), + USLCOM_DEV(SILABS, BALLUFF_RFID), USLCOM_DEV(SILABS, BEI_VCP), USLCOM_DEV(SILABS, BSM7DUSB), USLCOM_DEV(SILABS, BURNSIDE), @@ -248,7 +252,12 @@ static const struct usb_device_id uslcom USLCOM_DEV(SYNTECH, CYPHERLAB100), USLCOM_DEV(USI, MC60), USLCOM_DEV(VAISALA, CABLE), + USLCOM_DEV(WAGO, SERVICECABLE), USLCOM_DEV(WAVESENSE, JAZZ), + USLCOM_DEV(WIENERPLEINBAUS, PL512), + USLCOM_DEV(WIENERPLEINBAUS, RCM), + USLCOM_DEV(WIENERPLEINBAUS, MPOD), + USLCOM_DEV(WIENERPLEINBAUS, CML), #undef USLCOM_DEV }; Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sun Jan 9 16:58:38 2011 (r217199) +++ head/sys/dev/usb/usbdevs Sun Jan 9 17:10:06 2011 (r217200) @@ -642,6 +642,7 @@ vendor GLOBALSUN 0x16ab Global Sun Techn vendor ANYDATA 0x16d5 AnyDATA Corporation vendor JABLOTRON 0x16d6 Jablotron vendor CMOTECH 0x16d8 C-motech +vendor WIENERPLEINBAUS 0x16dc WIENER Plein & Baus GmbH. vendor AXESSTEL 0x1726 Axesstel Co., Ltd. vendor LINKSYS4 0x1737 Linksys vendor SENAO 0x1740 Senao @@ -661,6 +662,7 @@ vendor STELERA 0x1a8d Stelera Wireless vendor MATRIXORBITAL 0x1b3d Matrix Orbital vendor OVISLINK 0x1b75 OvisLink vendor TCTMOBILE 0x1bbb TCT Mobile +vendor WAGO 0x1be3 WAGO Kontakttechnik GmbH. vendor TELIT 0x1bc7 Telit vendor LONGCHEER 0x1c9e Longcheer Holdings, Ltd. vendor MPMAN 0x1cae MpMan @@ -1567,7 +1569,8 @@ product FIBERLINE WL430U 0x6003 WL-430U product FOSSIL WRISTPDA 0x0002 Wrist PDA /* Foxconn products */ -product FOXCONN PIRELLI_DP_L10 0xe000 Pirelli DP-L10 +product FOXCONN TCOM_TC_300 0xe000 T-Com TC 300 +product FOXCONN PIRELLI_DP_L10 0xe003 Pirelli DP-L10 /* Freecom products */ product FREECOM DVD 0xfc01 DVD drive @@ -2751,6 +2754,9 @@ product REALTEK RTL8187B_0 0x8189 RTL818 product REALTEK RTL8187B_1 0x8197 RTL8187B Wireless Adapter product REALTEK RTL8187B_2 0x8198 RTL8187B Wireless Adapter +/* Renesas products */ +product RENESAS RX610 0x0053 RX610 RX-Stick + /* Ricoh products */ product RICOH VGPVCC2 0x1830 VGP-VCC2 Camera product RICOH VGPVCC3 0x1832 VGP-VCC3 Camera @@ -2967,6 +2973,7 @@ product SILABS TAMSMASTER 0x813f Tams Ma product SILABS WMRBATT 0x814a WMR RIGblaster Plug&Play product SILABS WMRRIGBLASTER 0x814a WMR RIGblaster Plug&Play product SILABS WMRRIGTALK 0x814b WMR RIGtalk RT1 +product SILABS B_G_H3000 0x8156 B&G H3000 Data Cable product SILABS HELICOM 0x815e Helicomm IP-Link 1220-DVM product SILABS AVIT_USB_TTL 0x818b AVIT Research USB-TTL product SILABS MJS_TOSLINK 0x819f MJS USB-TOSLINk @@ -2988,6 +2995,7 @@ product SILABS CYGNAL 0x8382 Cygnal product SILABS AMBER_AMB2560 0x83a8 Amber Wireless AMB2560 product SILABS KYOCERA_GPS 0x8411 Kyocera GPS product SILABS BEI_VCP 0x846e BEI USB Sensor (VCP) +product SILABS BALLUFF_RFID 0x8477 Balluff RFID reader product SILABS CP2102 0xea60 SILABS USB UART product SILABS CP210X_2 0xea61 CP210x Serial product SILABS INFINITY_MIC 0xea71 Infinity GPS-MIC-1 Radio Monophone @@ -3321,6 +3329,9 @@ product WACOM GRAPHIRE3_4X5 0x0013 Graph product WACOM INTUOSA5 0x0021 Intuos A5 product WACOM GD0912U 0x0022 Intuos 9x12 Graphics Tablet +/* WAGO Kontakttechnik GmbH products */ +product WAGO SERVICECABLE 0x07a6 USB Service Cable 750-923 + /* WaveSense products */ product WAVESENSE JAZZ 0xaaaa Jazz blood glucose meter @@ -3335,6 +3346,12 @@ product WESTERN HUB 0x0500 USB HUB product WESTERN MYBOOK 0x0901 MyBook External HDD product WESTERN MYPASSWORD 0x0704 MyPassword External HDD +/* WIENER Plein & Baus GmbH products */ +product WIENERPLEINBAUS PL512 0x0010 PL512 PSU +product WIENERPLEINBAUS RCM 0x0011 RCM Remote Control +product WIENERPLEINBAUS MPOD 0x0012 MPOD PSU +product WIENERPLEINBAUS CML 0x0015 CML Data Logger + /* Windbond Electronics */ product WINBOND UH104 0x5518 4-port USB Hub From owner-svn-src-head@FreeBSD.ORG Sun Jan 9 17:40:04 2011 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 B7171106566B; Sun, 9 Jan 2011 17:40:04 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A235C8FC1C; Sun, 9 Jan 2011 17:40: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 p09He49X051009; Sun, 9 Jan 2011 17:40:04 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p09He4Lo051006; Sun, 9 Jan 2011 17:40:04 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201101091740.p09He4Lo051006@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 9 Jan 2011 17:40: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: r217202 - 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, 09 Jan 2011 17:40:04 -0000 Author: gavin Date: Sun Jan 9 17:40:04 2011 New Revision: 217202 URL: http://svn.freebsd.org/changeset/base/217202 Log: Add support for the Zeagle N2iTion3 Dive Computer to uplcom(4). This brings the list of supported devices in sync with kernel.org git revision f36ecd5de93e4c85a9e3d25100c6e233155b12e5, and OpenBSD uplcom.c r1.54 Modified: head/sys/dev/usb/serial/uplcom.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/uplcom.c ============================================================================== --- head/sys/dev/usb/serial/uplcom.c Sun Jan 9 17:19:04 2011 (r217201) +++ head/sys/dev/usb/serial/uplcom.c Sun Jan 9 17:40:04 2011 (r217202) @@ -258,6 +258,7 @@ static const struct usb_device_id uplcom UPLCOM_DEV(BELKIN, F5U257), /* Belkin F5U257 */ UPLCOM_DEV(COREGA, CGUSBRS232R), /* Corega CG-USBRS232R */ UPLCOM_DEV(EPSON, CRESSI_EDY), /* Cressi Edy diving computer */ + UPLCOM_DEV(EPSON, N2ITION3), /* Zeagle N2iTion3 diving computer */ UPLCOM_DEV(ELECOM, UCSGT), /* ELECOM UC-SGT */ UPLCOM_DEV(ELECOM, UCSGT0), /* ELECOM UC-SGT */ UPLCOM_DEV(HAL, IMR001), /* HAL Corporation Crossam2+USB */ Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sun Jan 9 17:19:04 2011 (r217201) +++ head/sys/dev/usb/usbdevs Sun Jan 9 17:40:04 2011 (r217202) @@ -1532,6 +1532,7 @@ product EPSON 2480 0x0121 Perfection 24 product EPSON 3590 0x0122 Perfection 3590 scanner product EPSON 4990 0x012a Perfection 4990 Photo scanner product EPSON CRESSI_EDY 0x0521 Cressi Edy diving computer +product EPSON N2ITION3 0x0522 Zeagle N2iTion3 diving computer product EPSON STYLUS_875DC 0x0601 Stylus Photo 875DC Card Reader product EPSON STYLUS_895 0x0602 Stylus Photo 895 Card Reader product EPSON CX5400 0x0808 CX5400 scanner From owner-svn-src-head@FreeBSD.ORG Sun Jan 9 17:58:34 2011 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 2C5301065672; Sun, 9 Jan 2011 17:58:34 +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 E0B2B8FC19; Sun, 9 Jan 2011 17:58:33 +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 p09HpvlW071273; Sun, 9 Jan 2011 10:51:58 -0700 (MST) (envelope-from imp@bsdimp.com) Message-ID: <4D29F5BC.4050203@bsdimp.com> Date: Sun, 09 Jan 2011 10:51:56 -0700 From: Warner Losh User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Thunderbird/3.1.6 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: <201101062109.p06L9Mdg028557@svn.freebsd.org> <20110109141825.GF23329@acme.spoerlein.net> In-Reply-To: <20110109141825.GF23329@acme.spoerlein.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: Subject: Re: svn commit: r217073 - head/etc/rc.d 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, 09 Jan 2011 17:58:34 -0000 On 01/09/2011 07:18, Ulrich Spörlein wrote: > On Thu, 06.01.2011 at 21:09:22 +0000, Warner Losh wrote: >> Author: imp >> Date: Thu Jan 6 21:09:22 2011 >> New Revision: 217073 >> URL: http://svn.freebsd.org/changeset/base/217073 >> >> Log: >> Don't require /usr/lib/aout to be on the system. Test for its >> existance since we don't generally need it. >> >> MFC after: 1 week >> >> Modified: >> head/etc/rc.d/ldconfig > Umm, > > Would someone object if the aout stuff get's ripped out with prejudice? yes. When this has come up in the past, people are still using binaries they built ages ago and no longer have sources to. There's no treason to rip it out unless it can be shown to not be working. This just removes one mandatory directory from startup (and even then, it is just a warning that's fixed). Warner From owner-svn-src-head@FreeBSD.ORG Sun Jan 9 20:40:22 2011 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 1569B106564A; Sun, 9 Jan 2011 20:40:22 +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 0528F8FC17; Sun, 9 Jan 2011 20:40:22 +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 p09KeLW5055698; Sun, 9 Jan 2011 20:40:21 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p09KeLMa055696; Sun, 9 Jan 2011 20:40:21 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201101092040.p09KeLMa055696@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 9 Jan 2011 20:40: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: r217203 - head/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, 09 Jan 2011 20:40:22 -0000 Author: bz Date: Sun Jan 9 20:40:21 2011 New Revision: 217203 URL: http://svn.freebsd.org/changeset/base/217203 Log: MfP4 CH=185246 [1]: Add FEATURE() to announce optional VIMAGE. MFC after: 3 days [1] for the moment put it in vnet.c. Modified: head/sys/net/vnet.c Modified: head/sys/net/vnet.c ============================================================================== --- head/sys/net/vnet.c Sun Jan 9 17:40:04 2011 (r217202) +++ head/sys/net/vnet.c Sun Jan 9 20:40:21 2011 (r217203) @@ -80,6 +80,8 @@ __FBSDID("$FreeBSD$"); * stack instance. */ +FEATURE(vimage, "VIMAGE kernel virtualization"); + MALLOC_DEFINE(M_VNET, "vnet", "network stack control block"); /* From owner-svn-src-head@FreeBSD.ORG Sun Jan 9 21:07:30 2011 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 A8D10106564A; Sun, 9 Jan 2011 21:07:30 +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 96DF98FC16; Sun, 9 Jan 2011 21:07:30 +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 p09L7UFq056612; Sun, 9 Jan 2011 21:07:30 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p09L7UG2056609; Sun, 9 Jan 2011 21:07:30 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201101092107.p09L7UG2056609@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 9 Jan 2011 21:07:30 +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: r217206 - in head: bin/sh tools/regression/bin/sh/execution 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, 09 Jan 2011 21:07:30 -0000 Author: jilles Date: Sun Jan 9 21:07:30 2011 New Revision: 217206 URL: http://svn.freebsd.org/changeset/base/217206 Log: sh: Remove special %builtin PATH entry. All builtins are now always found before a PATH search. Most ash derivatives have an undocumented feature where the presence of an entry "%builtin" in $PATH will cause builtins to be checked at that point of the PATH search, rather than before looking at any directories as documented in the man page (very old versions do document this feature). I am removing this feature from sh, as it complicates the code, may violate expectations (for example, /usr/bin/alias is very close to a forkbomb with PATH=/usr/bin:%builtin, only /usr/bin/builtin not being another link saves it) and appears to be unused (all the %builtin google code search finds is in some sort of ash source code). Note that aliases and functions took and take precedence above builtins. Because aliases work on a lexical level they can only ever be overridden on a lexical level (quoting or preceding 'builtin' or 'command'). Allowing override of functions via PATH does not really fit in the model of sh and it would work differently from %builtin if implemented. Note: POSIX says special builtins are found before functions. We comply to this because we do not allow functions with the same name as a special builtin. Silence from: freebsd-hackers@ (message sent 20101225) Discussed with: dougb Added: head/tools/regression/bin/sh/execution/path1.0 (contents, props changed) Modified: head/bin/sh/exec.c Modified: head/bin/sh/exec.c ============================================================================== --- head/bin/sh/exec.c Sun Jan 9 21:02:11 2011 (r217205) +++ head/bin/sh/exec.c Sun Jan 9 21:07:30 2011 (r217206) @@ -92,7 +92,6 @@ struct tblentry { static struct tblentry *cmdtable[CMDTABLESIZE]; -static int builtinloc = -1; /* index in path of %builtin, or -1 */ int exerrno = 0; /* Last exec error */ @@ -244,8 +243,7 @@ hashcmd(int argc __unused, char **argv _ } while ((name = *argptr) != NULL) { if ((cmdp = cmdlookup(name, 0)) != NULL - && (cmdp->cmdtype == CMDNORMAL - || (cmdp->cmdtype == CMDBUILTIN && builtinloc >= 0))) + && cmdp->cmdtype == CMDNORMAL) delete_cmd_entry(); find_command(name, &entry, DO_ERR, pathval()); if (verbose) { @@ -336,8 +334,8 @@ find_command(const char *name, struct cm goto success; } - /* If %builtin not in path, check for builtin next */ - if (builtinloc < 0 && (i = find_builtin(name, &spec)) >= 0) { + /* Check for builtin next */ + if ((i = find_builtin(name, &spec)) >= 0) { INTOFF; cmdp = cmdlookup(name, 1); if (cmdp->cmdtype == CMDFUNCTION) @@ -353,7 +351,7 @@ find_command(const char *name, struct cm prev = -1; /* where to start */ if (cmdp) { /* doing a rehash */ if (cmdp->cmdtype == CMDBUILTIN) - prev = builtinloc; + prev = -1; else prev = cmdp->param.index; } @@ -365,19 +363,7 @@ loop: stunalloc(fullname); idx++; if (pathopt) { - if (prefix("builtin", pathopt)) { - if ((i = find_builtin(name, &spec)) < 0) - goto loop; - INTOFF; - cmdp = cmdlookup(name, 1); - if (cmdp->cmdtype == CMDFUNCTION) - cmdp = &loc_cmd; - cmdp->cmdtype = CMDBUILTIN; - cmdp->param.index = i; - cmdp->special = spec; - INTON; - goto success; - } else if (prefix("func", pathopt)) { + if (prefix("func", pathopt)) { /* handled below */ } else { goto loop; /* ignore unimplemented options */ @@ -484,8 +470,7 @@ hashcd(void) for (pp = cmdtable ; pp < &cmdtable[CMDTABLESIZE] ; pp++) { for (cmdp = *pp ; cmdp ; cmdp = cmdp->next) { - if (cmdp->cmdtype == CMDNORMAL - || (cmdp->cmdtype == CMDBUILTIN && builtinloc >= 0)) + if (cmdp->cmdtype == CMDNORMAL) cmdp->rehash = 1; } } @@ -505,13 +490,11 @@ changepath(const char *newval) const char *old, *new; int idx; int firstchange; - int bltin; old = pathval(); new = newval; firstchange = 9999; /* assume no change */ idx = 0; - bltin = -1; for (;;) { if (*old != *new) { firstchange = idx; @@ -522,19 +505,12 @@ changepath(const char *newval) } if (*new == '\0') break; - if (*new == '%' && bltin < 0 && prefix("builtin", new + 1)) - bltin = idx; if (*new == ':') { idx++; } new++, old++; } - if (builtinloc < 0 && bltin >= 0) - builtinloc = bltin; /* zap builtins */ - if (builtinloc >= 0 && bltin < 0) - firstchange = 0; clearcmdentry(firstchange); - builtinloc = bltin; } @@ -555,9 +531,7 @@ clearcmdentry(int firstchange) pp = tblp; while ((cmdp = *pp) != NULL) { if ((cmdp->cmdtype == CMDNORMAL && - cmdp->param.index >= firstchange) - || (cmdp->cmdtype == CMDBUILTIN && - builtinloc >= firstchange)) { + cmdp->param.index >= firstchange)) { *pp = cmdp->next; ckfree(cmdp); } else { Added: head/tools/regression/bin/sh/execution/path1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/execution/path1.0 Sun Jan 9 21:07:30 2011 (r217206) @@ -0,0 +1,15 @@ +# $FreeBSD$ +# Some builtins should not be overridable via PATH. + +set -e +T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX) +trap 'rm -rf ${T}' 0 +echo '#!/bin/sh +echo bad' >"$T/cd" +chmod 755 "$T/cd" +cd /bin +oPATH=$PATH +PATH=$T:$PATH:%builtin +cd / +PATH=$oPATH +[ "$(pwd)" = / ] From owner-svn-src-head@FreeBSD.ORG Sun Jan 9 21:39:47 2011 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 1EA0F106566B; Sun, 9 Jan 2011 21:39:47 +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 0E1948FC08; Sun, 9 Jan 2011 21:39: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 p09Ldk31057423; Sun, 9 Jan 2011 21:39:46 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p09Ldkpo057421; Sun, 9 Jan 2011 21:39:46 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201101092139.p09Ldkpo057421@svn.freebsd.org> From: Ed Schouten Date: Sun, 9 Jan 2011 21:39: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: r217207 - head/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: Sun, 09 Jan 2011 21:39:47 -0000 Author: ed Date: Sun Jan 9 21:39:46 2011 New Revision: 217207 URL: http://svn.freebsd.org/changeset/base/217207 Log: Add missing __dead2 to __assert(). __assert() is called when an assertion fails. After printing an error message, it will call abort(). abort() never returns, hence it has the __dead2 attribute. Also add this attribute to __assert(). MFC after: 3 weeks Modified: head/include/assert.h Modified: head/include/assert.h ============================================================================== --- head/include/assert.h Sun Jan 9 21:07:30 2011 (r217206) +++ head/include/assert.h Sun Jan 9 21:39:46 2011 (r217207) @@ -58,6 +58,6 @@ #ifndef _ASSERT_H_ #define _ASSERT_H_ __BEGIN_DECLS -void __assert(const char *, const char *, int, const char *); +void __assert(const char *, const char *, int, const char *) __dead2; __END_DECLS #endif /* !_ASSERT_H_ */ From owner-svn-src-head@FreeBSD.ORG Sun Jan 9 22:05:10 2011 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 0D34F106566C; Sun, 9 Jan 2011 22:05:10 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F02988FC15; Sun, 9 Jan 2011 22: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 p09M59ed058108; Sun, 9 Jan 2011 22:05:09 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p09M59mm058106; Sun, 9 Jan 2011 22:05:09 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <201101092205.p09M59mm058106@svn.freebsd.org> From: Giorgos Keramidas Date: Sun, 9 Jan 2011 22: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: r217208 - head/tools/regression/bin/date 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, 09 Jan 2011 22:05:10 -0000 Author: keramida (doc committer) Date: Sun Jan 9 22:05:09 2011 New Revision: 217208 URL: http://svn.freebsd.org/changeset/base/217208 Log: regression/date: unset all LC_xxx vars and set LANG/LC_ALL When running with a custom locale setup, it's easy to confuse the date regression tests and cause them to fail, e.g. when LANG='C' but LC_ALL='el_GR.UTF-8'. Set LC_ALL to 'C', which overrides all other LC_xxx options, to avoid this sort of problem. Reviewed by: uqs, edwin Modified: head/tools/regression/bin/date/regress.sh Modified: head/tools/regression/bin/date/regress.sh ============================================================================== --- head/tools/regression/bin/date/regress.sh Sun Jan 9 21:39:46 2011 (r217207) +++ head/tools/regression/bin/date/regress.sh Sun Jan 9 22:05:09 2011 (r217208) @@ -19,7 +19,7 @@ TEST1=3222243 # 1970-02-07 07:04:03 TEST2=1005600000 # 2001-11-12 21:11:12 -export LANG=C +export LC_ALL=C export TZ=UTC count=0 From owner-svn-src-head@FreeBSD.ORG Sun Jan 9 22:47:58 2011 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 A6D181065679; Sun, 9 Jan 2011 22:47:58 +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 95F3D8FC0C; Sun, 9 Jan 2011 22:47: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 p09MlwrK059394; Sun, 9 Jan 2011 22:47:58 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p09MlwPw059391; Sun, 9 Jan 2011 22:47:58 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201101092247.p09MlwPw059391@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 9 Jan 2011 22:47: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: r217209 - 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: Sun, 09 Jan 2011 22:47:58 -0000 Author: jilles Date: Sun Jan 9 22:47:58 2011 New Revision: 217209 URL: http://svn.freebsd.org/changeset/base/217209 Log: sh: Follow-up to r216743, grabstackblock() can be replaced with stalloc(). grabstackblock() was used only once (but it is a very often executed piece of code). Modified: head/bin/sh/memalloc.c head/bin/sh/memalloc.h Modified: head/bin/sh/memalloc.c ============================================================================== --- head/bin/sh/memalloc.c Sun Jan 9 22:05:09 2011 (r217208) +++ head/bin/sh/memalloc.c Sun Jan 9 22:47:58 2011 (r217209) @@ -277,16 +277,6 @@ growstackblock(int min) -void -grabstackblock(int len) -{ - len = ALIGN(len); - stacknxt += len; - stacknleft -= len; -} - - - /* * The following routines are somewhat easier to use that the above. * The user declares a variable of type STACKSTR, which may be declared Modified: head/bin/sh/memalloc.h ============================================================================== --- head/bin/sh/memalloc.h Sun Jan 9 22:05:09 2011 (r217208) +++ head/bin/sh/memalloc.h Sun Jan 9 22:47:58 2011 (r217209) @@ -55,7 +55,6 @@ pointer stalloc(int); void stunalloc(pointer); void setstackmark(struct stackmark *); void popstackmark(struct stackmark *); -void grabstackblock(int); char *growstackstr(void); char *makestrspace(int, char *); char *stputbin(const char *data, int len, char *p); @@ -65,6 +64,7 @@ char *stputs(const char *data, char *p); #define stackblock() stacknxt #define stackblocksize() stacknleft +#define grabstackblock(n) stalloc(n) #define STARTSTACKSTR(p) p = stackblock() #define STPUTC(c, p) do { if (p == sstrend) p = growstackstr(); *p++ = (c); } while(0) #define CHECKSTRSPACE(n, p) { if (sstrend - p < n) p = makestrspace(n, p); } From owner-svn-src-head@FreeBSD.ORG Sun Jan 9 23:05:46 2011 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 C1DFF1065696; Sun, 9 Jan 2011 23:05:46 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 96A3A8FC08; Sun, 9 Jan 2011 23:05: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 p09N5kuS059877; Sun, 9 Jan 2011 23:05:46 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p09N5ktu059874; Sun, 9 Jan 2011 23:05:46 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201101092305.p09N5ktu059874@svn.freebsd.org> From: Juli Mallett Date: Sun, 9 Jan 2011 23:05: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: r217210 - head/sys/mips/cavium/octe 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, 09 Jan 2011 23:05:46 -0000 Author: jmallett Date: Sun Jan 9 23:05:46 2011 New Revision: 217210 URL: http://svn.freebsd.org/changeset/base/217210 Log: o) Remove some unused local definitions of IP protocol numbers. o) Use CPU_FOREACH rather than a miscrafted for loop with an off-by-one to enable workq interrupts on all cores. Modified: head/sys/mips/cavium/octe/ethernet-defines.h head/sys/mips/cavium/octe/ethernet.c Modified: head/sys/mips/cavium/octe/ethernet-defines.h ============================================================================== --- head/sys/mips/cavium/octe/ethernet-defines.h Sun Jan 9 22:47:58 2011 (r217209) +++ head/sys/mips/cavium/octe/ethernet-defines.h Sun Jan 9 23:05:46 2011 (r217210) @@ -79,8 +79,6 @@ AND WITH ALL FAULTS AND CAVIUM NETWORKS #define USE_MULTICORE_RECEIVE 0 #endif -#define IP_PROTOCOL_TCP 6 -#define IP_PROTOCOL_UDP 0x11 #define FAU_NUM_PACKET_BUFFERS_TO_FREE (CVMX_FAU_REG_END - sizeof(uint32_t)) #define TOTAL_NUMBER_OF_PORTS (CVMX_PIP_NUM_INPUT_PORTS+1) Modified: head/sys/mips/cavium/octe/ethernet.c ============================================================================== --- head/sys/mips/cavium/octe/ethernet.c Sun Jan 9 22:47:58 2011 (r217209) +++ head/sys/mips/cavium/octe/ethernet.c Sun Jan 9 23:05:46 2011 (r217210) @@ -235,15 +235,16 @@ static void cvm_oct_configure_common_hw( if (USE_MULTICORE_RECEIVE) { critical_enter(); { - int cpu; - for (cpu = 0; cpu < mp_maxid; cpu++) { - if (!CPU_ABSENT(cpu) && - (cpu != PCPU_GET(cpuid))) { - cvmx_ciu_intx0_t en; - en.u64 = cvmx_read_csr(CVMX_CIU_INTX_EN0(cpu*2)); - en.s.workq |= (1< 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 9ADB7106564A; Sun, 9 Jan 2011 23:46:24 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F77A8FC0A; Sun, 9 Jan 2011 23:46:24 +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 p09NkOxI060753; Sun, 9 Jan 2011 23:46:24 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p09NkOqp060751; Sun, 9 Jan 2011 23:46:24 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201101092346.p09NkOqp060751@svn.freebsd.org> From: Juli Mallett Date: Sun, 9 Jan 2011 23:46:24 +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: r217212 - head/sys/mips/cavium/octe 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, 09 Jan 2011 23:46:24 -0000 Author: jmallett Date: Sun Jan 9 23:46:24 2011 New Revision: 217212 URL: http://svn.freebsd.org/changeset/base/217212 Log: Now that we correctly enable rx interrupts on all cores, performance has gotten quite awful, because e.g. 4 packets will come in and get processed on 4 different cores at the same time, really battling with the TCP stack quite painfully. For now, just run one task at a time. This gets performance up in most cases to where it was before the correctness fixes that got interrupts to run on all cores (except in high-load TCP transmit cases where all we're handling receive for is ACKs) and in some cases it's better now. What would be ideal would be to use a more advanced interrupt mitigation strategy and possibly to use different workqueue groups per port for multi-port systems, and so on, but this is a fine stopgap. Modified: head/sys/mips/cavium/octe/ethernet-rx.c Modified: head/sys/mips/cavium/octe/ethernet-rx.c ============================================================================== --- head/sys/mips/cavium/octe/ethernet-rx.c Sun Jan 9 23:20:01 2011 (r217211) +++ head/sys/mips/cavium/octe/ethernet-rx.c Sun Jan 9 23:46:24 2011 (r217212) @@ -54,6 +54,8 @@ extern struct ifnet *cvm_oct_device[]; static struct task cvm_oct_task; static struct taskqueue *cvm_oct_taskq; +static int cvm_oct_rx_active; + /** * Interrupt handler. The interrupt occurs whenever the POW * transitions from 0->1 packets in our group. @@ -70,7 +72,13 @@ int cvm_oct_do_interrupt(void *dev_id) cvmx_write_csr(CVMX_POW_WQ_INT, 1< 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 057D5106564A; Sun, 9 Jan 2011 23:47:12 +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 E93698FC1A; Sun, 9 Jan 2011 23: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 p09NlBlL060804; Sun, 9 Jan 2011 23:47:11 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p09NlB4M060802; Sun, 9 Jan 2011 23:47:11 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201101092347.p09NlB4M060802@svn.freebsd.org> From: Doug Barton Date: Sun, 9 Jan 2011 23: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: r217213 - head/lib/bind 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, 09 Jan 2011 23:47:12 -0000 Author: dougb Date: Sun Jan 9 23:47:11 2011 New Revision: 217213 URL: http://svn.freebsd.org/changeset/base/217213 Log: Revert part of r217071 so that us mere mortals can clearly see what this bit of code is intended to do. :) Approved by: imp Modified: head/lib/bind/config.mk Modified: head/lib/bind/config.mk ============================================================================== --- head/lib/bind/config.mk Sun Jan 9 23:46:24 2011 (r217212) +++ head/lib/bind/config.mk Sun Jan 9 23:47:11 2011 (r217213) @@ -65,7 +65,11 @@ CFLAGS+= -I${LIB_BIND_DIR} .endif # Use the right version of the atomic.h file from lib/isc -ISC_ATOMIC_ARCH=${MACHINE_CPUARCH:S/i386/x86_32/:S/amd64/x86_32/} +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +ISC_ATOMIC_ARCH= x86_32 +.else +ISC_ATOMIC_ARCH= ${MACHINE_CPUARCH} +.endif # Optional features .if ${MK_BIND_LARGE_FILE} == "yes" From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 00:00:23 2011 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 AB18C106566B for ; Mon, 10 Jan 2011 00:00:23 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id F3A078FC1C for ; Mon, 10 Jan 2011 00:00:19 +0000 (UTC) Received: (qmail 27344 invoked by uid 399); 10 Jan 2011 00:00:19 -0000 Received: from localhost (HELO doug-optiplex.ka9q.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 10 Jan 2011 00:00:19 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4D2A4C11.9010108@FreeBSD.org> Date: Sun, 09 Jan 2011 16:00:17 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.13) Gecko/20101210 Thunderbird/3.1.7 MIME-Version: 1.0 To: Warner Losh References: <201101062107.p06L7p9o028440@svn.freebsd.org> <4D27F295.1030609@FreeBSD.org> <4D28EBFE.10004@bsdimp.com> In-Reply-To: <4D28EBFE.10004@bsdimp.com> X-Enigmail-Version: 1.1.2 OpenPGP: id=1A1ABC84 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, Warner Losh Subject: Re: svn commit: r217071 - head/lib/bind 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, 10 Jan 2011 00:00:23 -0000 On 01/08/2011 14:58, Warner Losh wrote: > On 01/07/2011 22:13, Doug Barton wrote: >> I've said before that I like to have the opportunity to pre-commit >> review patches in this area because at minimum it helps me to be aware >> of them for potential MFC purposes. > > Thanks for the reminder Doug. Hope there's no hard feelings... Of course not. A waste of time and energy. :) > I think that bsd.endian.mk is -current only, but there's no reason it > can't be MFC'd. I'll merge it to 7 and 8 here in a few minutes and let > you know. That'd be awesome, thanks. I plan to update BIND in RELENG_7 after the release and it would be great to have the bmake stuff consistent between branches to the extent possible. >>> @@ -64,11 +65,7 @@ CFLAGS+= -I${LIB_BIND_DIR} >>> .endif >>> >>> # Use the right version of the atomic.h file from lib/isc >>> -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" >>> -ISC_ATOMIC_ARCH= x86_32 >>> -.else >>> -ISC_ATOMIC_ARCH= ${MACHINE_CPUARCH} >>> -.endif >>> +ISC_ATOMIC_ARCH=${MACHINE_CPUARCH:S/i386/x86_32/:S/amd64/x86_32/} >> >> This change I am less enthusiastic about. It seems to me that it does >> the exact same thing, but while admittedly quite a bit more clever >> than I am capable of I find it less readable. Unless this is doing >> something more or better than the previous code I will likely revert >> this. > > Damn. I missed that in my pre-commit review, or I'd have mentioned it in > the commit log. Feel free to revert it if you don't like it, or I'd be > happy to revert it if you wanted me to clean up my own mess. Np, I took care of it. FWIW, I should have been more clear about why I'm more interested in keeping the file readable. BIND updates come in 2 main flavors, planned, and unplanned. :) The latter are generally related to security updates, and therefore of a more urgent nature. So far we've had very good luck with my being available when updates of a more urgent nature are required, in addition to good luck in the sense that we haven't had a _truly_ urgent BIND update in some years now. Also, the bmake glue for BIND isn't all _that_ complex (thanks in large part to des) however ... My nightmare scenario is that we _do_ end up with a truly urgent BIND update, I'm not available for whatever reason, and some poor bastard is stuck with the job of having to enter the labyrinth without the benefit of the bits of the map that exist only in my head. For this reason I've tried to keep the FREEBSD-Update files both up to date and more detailed than is usually the case, but I am the last person to believe that I have done it all correctly. This particular bit of arcana (the x86_32 stuff) took me a non-trivial amount of time to decipher, so I am particularly interested in having the intention of the code to be very clear here. In any case, thanks again for your help on the endian stuff, and your fast response. Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 03:48:42 2011 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 3161A106564A; Mon, 10 Jan 2011 03:48:42 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E9978FC0A; Mon, 10 Jan 2011 03:48: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 p0A3mgBl066046; Mon, 10 Jan 2011 03:48:42 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0A3mgGo066037; Mon, 10 Jan 2011 03:48:42 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201101100348.p0A3mgGo066037@svn.freebsd.org> From: Juli Mallett Date: Mon, 10 Jan 2011 03:48: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: r217214 - in head/sys: contrib/octeon-sdk mips/cavium mips/conf 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, 10 Jan 2011 03:48:42 -0000 Author: jmallett Date: Mon Jan 10 03:48:41 2011 New Revision: 217214 URL: http://svn.freebsd.org/changeset/base/217214 Log: o) Expand the CIU driver to be aware of newly-allocated parts of the IRQ range. o) Add 'octm', a trivial driver for the 10/100 management ports found on some Octeon systems. o) Make the Simple Executive's management port helper routines compile on FreeBSD (namely by not doing math on void pointers.) o) Add a cvmx_mgmt_port_sendm routine to the Simple Executive to send an mbuf so there is only one copy in the transmit path, rather than having to first copy the mbuf to an intermediate buffer and then copy that to the Simple Executive's transmit ring. o) Properly work out MII addresses of management ports on the Lanner MR-730. XXX The MR-730 also needs some patches to the MII read/write routines, but this is sufficient for now. Media detection will be fixed in the future when I can spend more time reading the vendor-supplied patches. Added: head/sys/mips/cavium/if_octm.c (contents, props changed) Modified: head/sys/contrib/octeon-sdk/cvmx-helper-board.c head/sys/contrib/octeon-sdk/cvmx-mgmt-port.c head/sys/contrib/octeon-sdk/cvmx-mgmt-port.h head/sys/mips/cavium/ciu.c head/sys/mips/cavium/cvmx_config.h head/sys/mips/cavium/files.octeon1 head/sys/mips/conf/OCTEON1 Modified: head/sys/contrib/octeon-sdk/cvmx-helper-board.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-helper-board.c Sun Jan 9 23:47:11 2011 (r217213) +++ head/sys/contrib/octeon-sdk/cvmx-helper-board.c Mon Jan 10 03:48:41 2011 (r217214) @@ -272,6 +272,8 @@ int cvmx_helper_board_get_mii_address(in return ipd_port - 16; return -1; case CVMX_BOARD_TYPE_CUST_LANNER_MR730: + if ((ipd_port >= CVMX_HELPER_BOARD_MGMT_IPD_PORT) && (ipd_port < (CVMX_HELPER_BOARD_MGMT_IPD_PORT + 2))) + return (ipd_port - CVMX_HELPER_BOARD_MGMT_IPD_PORT) + 0x81; if ((ipd_port >= 0) && (ipd_port < 4)) return ipd_port; return -1; Modified: head/sys/contrib/octeon-sdk/cvmx-mgmt-port.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-mgmt-port.c Sun Jan 9 23:47:11 2011 (r217213) +++ head/sys/contrib/octeon-sdk/cvmx-mgmt-port.c Mon Jan 10 03:48:41 2011 (r217214) @@ -112,7 +112,7 @@ CVMX_SHARED cvmx_mgmt_port_state_t *cvmx * * @return Number of ports */ -int __cvmx_mgmt_port_num_ports(void) +static int __cvmx_mgmt_port_num_ports(void) { if (OCTEON_IS_MODEL(OCTEON_CN56XX)) return 1; @@ -554,6 +554,62 @@ cvmx_mgmt_port_result_t cvmx_mgmt_port_s } +#if defined(__FreeBSD__) +/** + * Send a packet out the management port. The packet is copied so + * the input mbuf isn't used after this call. + * + * @param port Management port + * @param m Packet mbuf (with pkthdr) + * + * @return CVMX_MGMT_PORT_SUCCESS or an error code + */ +cvmx_mgmt_port_result_t cvmx_mgmt_port_sendm(int port, const struct mbuf *m) +{ + cvmx_mgmt_port_state_t *state; + cvmx_mixx_oring2_t mix_oring2; + + if ((port < 0) || (port >= __cvmx_mgmt_port_num_ports())) + return CVMX_MGMT_PORT_INVALID_PARAM; + + /* Max sure the packet size is valid */ + if ((m->m_pkthdr.len < 1) || (m->m_pkthdr.len > CVMX_MGMT_PORT_TX_BUFFER_SIZE)) + return CVMX_MGMT_PORT_INVALID_PARAM; + + state = cvmx_mgmt_port_state_ptr + port; + + cvmx_spinlock_lock(&state->lock); + + mix_oring2.u64 = cvmx_read_csr(CVMX_MIXX_ORING2(port)); + if (mix_oring2.s.odbell >= CVMX_MGMT_PORT_NUM_TX_BUFFERS - 1) + { + /* No room for another packet */ + cvmx_spinlock_unlock(&state->lock); + return CVMX_MGMT_PORT_NO_MEMORY; + } + else + { + /* Copy the packet into the output buffer */ + m_copydata(m, 0, m->m_pkthdr.len, state->tx_buffers[state->tx_write_index]); + /* Update the TX ring buffer entry size */ + state->tx_ring[state->tx_write_index].s.len = m->m_pkthdr.len; + /* This code doesn't support TX timestamps */ + state->tx_ring[state->tx_write_index].s.tstamp = 0; + /* Increment our TX index */ + state->tx_write_index = (state->tx_write_index + 1) % CVMX_MGMT_PORT_NUM_TX_BUFFERS; + /* Ring the doorbell, sending the packet */ + CVMX_SYNCWS; + cvmx_write_csr(CVMX_MIXX_ORING2(port), 1); + if (cvmx_read_csr(CVMX_MIXX_ORCNT(port))) + cvmx_write_csr(CVMX_MIXX_ORCNT(port), cvmx_read_csr(CVMX_MIXX_ORCNT(port))); + + cvmx_spinlock_unlock(&state->lock); + return CVMX_MGMT_PORT_SUCCESS; + } +} +#endif + + /** * Receive a packet from the management port. * @@ -564,7 +620,7 @@ cvmx_mgmt_port_result_t cvmx_mgmt_port_s * @return The size of the packet, or a negative erorr code on failure. Zero * means that no packets were available. */ -int cvmx_mgmt_port_receive(int port, int buffer_len, void *buffer) +int cvmx_mgmt_port_receive(int port, int buffer_len, uint8_t *buffer) { cvmx_mixx_ircnt_t mix_ircnt; cvmx_mgmt_port_state_t *state; @@ -588,13 +644,13 @@ int cvmx_mgmt_port_receive(int port, int mix_ircnt.u64 = cvmx_read_csr(CVMX_MIXX_IRCNT(port)); if (mix_ircnt.s.ircnt) { - void *source = state->rx_buffers[state->rx_read_index]; - uint64_t *zero_check = source; + uint64_t *source = (void *)state->rx_buffers[state->rx_read_index]; + uint64_t *zero_check = source; /* CN56XX pass 1 has an errata where packets might start 8 bytes into the buffer instead of at their correct lcoation. If the first 8 bytes is zero we assume this has happened */ if (OCTEON_IS_MODEL(OCTEON_CN56XX_PASS1_X) && (*zero_check == 0)) - source += 8; + source++; /* Start off with zero bytes received */ result = 0; /* While the completion code signals more data, copy the buffers @@ -621,7 +677,7 @@ int cvmx_mgmt_port_receive(int port, int CVMX_SYNCWS; /* Increment the number of RX buffers */ cvmx_write_csr(CVMX_MIXX_IRING2(port), 1); - source = state->rx_buffers[state->rx_read_index]; + source = (void *)state->rx_buffers[state->rx_read_index]; zero_check = source; } Modified: head/sys/contrib/octeon-sdk/cvmx-mgmt-port.h ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-mgmt-port.h Sun Jan 9 23:47:11 2011 (r217213) +++ head/sys/contrib/octeon-sdk/cvmx-mgmt-port.h Mon Jan 10 03:48:41 2011 (r217214) @@ -134,6 +134,19 @@ extern cvmx_mgmt_port_result_t cvmx_mgmt */ extern cvmx_mgmt_port_result_t cvmx_mgmt_port_send(int port, int packet_len, void *buffer); +#if defined(__FreeBSD__) +/** + * Send a packet out the management port. The packet is copied so + * the input mbuf isn't used after this call. + * + * @param port Management port + * @param m Packet mbuf (with pkthdr) + * + * @return CVMX_MGMT_PORT_SUCCESS or an error code + */ +extern cvmx_mgmt_port_result_t cvmx_mgmt_port_sendm(int port, const struct mbuf *m); +#endif + /** * Receive a packet from the management port. * @@ -144,7 +157,7 @@ extern cvmx_mgmt_port_result_t cvmx_mgmt * @return The size of the packet, or a negative erorr code on failure. Zero * means that no packets were available. */ -extern int cvmx_mgmt_port_receive(int port, int buffer_len, void *buffer); +extern int cvmx_mgmt_port_receive(int port, int buffer_len, uint8_t *buffer); /** * Set the MAC address for a management port Modified: head/sys/mips/cavium/ciu.c ============================================================================== --- head/sys/mips/cavium/ciu.c Sun Jan 9 23:47:11 2011 (r217213) +++ head/sys/mips/cavium/ciu.c Mon Jan 10 03:48:41 2011 (r217214) @@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$"); #define CIU_IRQ_EN0_COUNT ((CIU_IRQ_EN0_END - CIU_IRQ_EN0_BEGIN) + 1) #define CIU_IRQ_EN1_BEGIN CVMX_IRQ_WDOG0 -#define CIU_IRQ_EN1_END CVMX_IRQ_WDOG15 +#define CIU_IRQ_EN1_END CVMX_IRQ_DFM #define CIU_IRQ_EN1_COUNT ((CIU_IRQ_EN1_END - CIU_IRQ_EN1_BEGIN) + 1) struct ciu_softc { Modified: head/sys/mips/cavium/cvmx_config.h ============================================================================== --- head/sys/mips/cavium/cvmx_config.h Sun Jan 9 23:47:11 2011 (r217213) +++ head/sys/mips/cavium/cvmx_config.h Mon Jan 10 03:48:41 2011 (r217214) @@ -45,6 +45,7 @@ #include #include #include +#include #include #include Modified: head/sys/mips/cavium/files.octeon1 ============================================================================== --- head/sys/mips/cavium/files.octeon1 Sun Jan 9 23:47:11 2011 (r217213) +++ head/sys/mips/cavium/files.octeon1 Mon Jan 10 03:48:41 2011 (r217214) @@ -37,6 +37,10 @@ mips/cavium/octe/mv88e61xxphy.c option mips/cavium/octe/octe.c optional octe mips/cavium/octe/octebus.c optional octe +mips/cavium/if_octm.c optional octm + +contrib/octeon-sdk/cvmx-mgmt-port.c optional octm + mips/cavium/octopci.c optional pci mips/cavium/octopci_bus_space.c optional pci Added: head/sys/mips/cavium/if_octm.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/cavium/if_octm.c Mon Jan 10 03:48:41 2011 (r217214) @@ -0,0 +1,519 @@ +/*- + * Copyright (c) 2010-2011 Juli Mallett + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * Cavium Octeon management port Ethernet devices. + */ + +#include "opt_inet.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef INET +#include +#include +#endif + +#include +#include +#include + +struct octm_softc { + struct ifnet *sc_ifp; + device_t sc_dev; + unsigned sc_port; + int sc_flags; + struct ifmedia sc_ifmedia; + struct resource *sc_intr; + void *sc_intr_cookie; +}; + +static void octm_identify(driver_t *, device_t); +static int octm_probe(device_t); +static int octm_attach(device_t); +static int octm_detach(device_t); +static int octm_shutdown(device_t); + +static void octm_init(void *); +static int octm_transmit(struct ifnet *, struct mbuf *); + +static int octm_medchange(struct ifnet *); +static void octm_medstat(struct ifnet *, struct ifmediareq *); + +static int octm_ioctl(struct ifnet *, u_long, caddr_t); + +static void octm_rx_intr(void *); + +static device_method_t octm_methods[] = { + /* Device interface */ + DEVMETHOD(device_identify, octm_identify), + DEVMETHOD(device_probe, octm_probe), + DEVMETHOD(device_attach, octm_attach), + DEVMETHOD(device_detach, octm_detach), + DEVMETHOD(device_shutdown, octm_shutdown), + + { 0, 0 } +}; + +static driver_t octm_driver = { + "octm", + octm_methods, + sizeof (struct octm_softc), +}; + +static devclass_t octm_devclass; + +DRIVER_MODULE(octm, ciu, octm_driver, octm_devclass, 0, 0); + +static void +octm_identify(driver_t *drv, device_t parent) +{ + unsigned i; + + if (!octeon_has_feature(OCTEON_FEATURE_MGMT_PORT)) + return; + + for (i = 0; i < CVMX_MGMT_PORT_NUM_PORTS; i++) + BUS_ADD_CHILD(parent, 0, "octm", i); +} + +static int +octm_probe(device_t dev) +{ + cvmx_mgmt_port_result_t result; + + result = cvmx_mgmt_port_initialize(device_get_unit(dev)); + switch (result) { + case CVMX_MGMT_PORT_SUCCESS: + break; + case CVMX_MGMT_PORT_NO_MEMORY: + return (ENOBUFS); + case CVMX_MGMT_PORT_INVALID_PARAM: + return (ENXIO); + case CVMX_MGMT_PORT_INIT_ERROR: + return (EIO); + } + + device_set_desc(dev, "Cavium Octeon Management Ethernet"); + + return (0); +} + +static int +octm_attach(device_t dev) +{ + struct ifnet *ifp; + struct octm_softc *sc; + cvmx_mixx_irhwm_t mixx_irhwm; + cvmx_mixx_intena_t mixx_intena; + uint64_t mac; + int error; + int irq; + int rid; + + sc = device_get_softc(dev); + sc->sc_dev = dev; + sc->sc_port = device_get_unit(dev); + + switch (sc->sc_port) { + case 0: + irq = CVMX_IRQ_MII; + break; + case 1: + irq = CVMX_IRQ_MII1; + break; + default: + device_printf(dev, "unsupported management port %u.\n", sc->sc_port); + return (ENXIO); + } + + mac = cvmx_mgmt_port_get_mac(sc->sc_port); + if (mac == CVMX_MGMT_PORT_GET_MAC_ERROR) { + device_printf(dev, "unable to read MAC.\n"); + return (ENXIO); + } + + /* No watermark for input ring. */ + mixx_irhwm.u64 = 0; + cvmx_write_csr(CVMX_MIXX_IRHWM(sc->sc_port), mixx_irhwm.u64); + + /* Enable input ring interrupts. */ + mixx_intena.u64 = 0; + mixx_intena.s.ithena = 1; + cvmx_write_csr(CVMX_MIXX_INTENA(sc->sc_port), mixx_intena.u64); + + /* Allocate and establish interrupt. */ + rid = 0; + sc->sc_intr = bus_alloc_resource(sc->sc_dev, SYS_RES_IRQ, &rid, + irq, irq, 1, RF_ACTIVE); + if (sc->sc_intr == NULL) { + device_printf(dev, "unable to allocate IRQ.\n"); + return (ENXIO); + } + + error = bus_setup_intr(sc->sc_dev, sc->sc_intr, INTR_TYPE_NET, NULL, + octm_rx_intr, sc, &sc->sc_intr_cookie); + if (error != 0) { + device_printf(dev, "unable to setup interrupt.\n"); + bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_intr); + return (ENXIO); + } + + bus_describe_intr(sc->sc_dev, sc->sc_intr, sc->sc_intr_cookie, "rx"); + + /* XXX Possibly should enable TX interrupts. */ + + ifp = if_alloc(IFT_ETHER); + if (ifp == NULL) { + device_printf(dev, "cannot allocate ifnet.\n"); + bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_intr); + return (ENOMEM); + } + + if_initname(ifp, device_get_name(dev), device_get_unit(dev)); + ifp->if_mtu = ETHERMTU; + ifp->if_init = octm_init; + ifp->if_softc = sc; + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST | IFF_ALLMULTI; + ifp->if_ioctl = octm_ioctl; + + sc->sc_ifp = ifp; + sc->sc_flags = ifp->if_flags; + + ifmedia_init(&sc->sc_ifmedia, 0, octm_medchange, octm_medstat); + + ifmedia_add(&sc->sc_ifmedia, IFM_ETHER | IFM_AUTO, 0, NULL); + ifmedia_set(&sc->sc_ifmedia, IFM_ETHER | IFM_AUTO); + + ether_ifattach(ifp, (const u_int8_t *)&mac + 2); + + ifp->if_transmit = octm_transmit; + + ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); + ifp->if_capabilities = IFCAP_VLAN_MTU; + ifp->if_capenable = ifp->if_capabilities; + + IFQ_SET_MAXLEN(&ifp->if_snd, CVMX_MGMT_PORT_NUM_TX_BUFFERS); + ifp->if_snd.ifq_drv_maxlen = CVMX_MGMT_PORT_NUM_TX_BUFFERS; + IFQ_SET_READY(&ifp->if_snd); + + return (bus_generic_attach(dev)); +} + +static int +octm_detach(device_t dev) +{ + struct octm_softc *sc; + cvmx_mgmt_port_result_t result; + + sc = device_get_softc(dev); + + result = cvmx_mgmt_port_initialize(sc->sc_port); + switch (result) { + case CVMX_MGMT_PORT_SUCCESS: + break; + case CVMX_MGMT_PORT_NO_MEMORY: + return (ENOBUFS); + case CVMX_MGMT_PORT_INVALID_PARAM: + return (ENXIO); + case CVMX_MGMT_PORT_INIT_ERROR: + return (EIO); + } + + bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_intr); + /* XXX Incomplete. */ + + return (0); +} + +static int +octm_shutdown(device_t dev) +{ + return (octm_detach(dev)); +} + +static void +octm_init(void *arg) +{ + struct ifnet *ifp; + struct octm_softc *sc; + cvmx_mgmt_port_netdevice_flags_t flags; + uint64_t mac; + + sc = arg; + ifp = sc->sc_ifp; + + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + cvmx_mgmt_port_disable(sc->sc_port); + + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + } + + if (((ifp->if_flags ^ sc->sc_flags) & (IFF_ALLMULTI | IFF_MULTICAST | IFF_PROMISC)) != 0) { + flags = 0; + if ((ifp->if_flags & IFF_ALLMULTI) != 0) + flags |= CVMX_IFF_ALLMULTI; + if ((ifp->if_flags & IFF_PROMISC) != 0) + flags |= CVMX_IFF_PROMISC; + cvmx_mgmt_port_set_multicast_list(sc->sc_port, flags); + } + + mac = 0; + memcpy((u_int8_t *)&mac + 2, IF_LLADDR(ifp), 6); + cvmx_mgmt_port_set_mac(sc->sc_port, mac); + + /* XXX link state? */ + + if ((ifp->if_flags & IFF_UP) != 0) + cvmx_mgmt_port_enable(sc->sc_port); + + ifp->if_drv_flags |= IFF_DRV_RUNNING; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; +} + +static int +octm_transmit(struct ifnet *ifp, struct mbuf *m) +{ + struct octm_softc *sc; + cvmx_mgmt_port_result_t result; + + sc = ifp->if_softc; + + if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != + IFF_DRV_RUNNING) { + m_freem(m); + return (0); + } + + result = cvmx_mgmt_port_sendm(sc->sc_port, m); + + if (result == CVMX_MGMT_PORT_SUCCESS) + ETHER_BPF_MTAP(ifp, m); + else + ifp->if_oerrors++; + + m_freem(m); + + switch (result) { + case CVMX_MGMT_PORT_SUCCESS: + return (0); + case CVMX_MGMT_PORT_NO_MEMORY: + return (ENOBUFS); + case CVMX_MGMT_PORT_INVALID_PARAM: + return (ENXIO); + case CVMX_MGMT_PORT_INIT_ERROR: + return (EIO); + default: + return (EDOOFUS); + } +} + +static int +octm_medchange(struct ifnet *ifp) +{ + return (ENOTSUP); +} + +static void +octm_medstat(struct ifnet *ifp, struct ifmediareq *ifm) +{ + struct octm_softc *sc; + cvmx_helper_link_info_t link_info; + + sc = ifp->if_softc; + + ifm->ifm_status = IFM_AVALID; + ifm->ifm_active = IFT_ETHER; + + link_info = cvmx_mgmt_port_link_get(sc->sc_port); + if (!link_info.s.link_up) + return; + + ifm->ifm_status |= IFM_ACTIVE; + + switch (link_info.s.speed) { + case 10: + ifm->ifm_active |= IFM_10_T; + break; + case 100: + ifm->ifm_active |= IFM_100_TX; + break; + case 1000: + ifm->ifm_active |= IFM_1000_T; + break; + case 10000: + ifm->ifm_active |= IFM_10G_T; + break; + } + + if (link_info.s.full_duplex) + ifm->ifm_active |= IFM_FDX; + else + ifm->ifm_active |= IFM_HDX; +} + +static int +octm_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +{ + struct octm_softc *sc; + struct ifreq *ifr; +#ifdef INET + struct ifaddr *ifa; +#endif + int error; + + sc = ifp->if_softc; + ifr = (struct ifreq *)data; +#ifdef INET + ifa = (struct ifaddr *)data; +#endif + + switch (cmd) { + case SIOCSIFADDR: +#ifdef INET + /* + * Avoid reinitialization unless it's necessary. + */ + if (ifa->ifa_addr->sa_family == AF_INET) { + ifp->if_flags |= IFF_UP; + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + octm_init(sc); + arp_ifinit(ifp, ifa); + + return (0); + } +#endif + error = ether_ioctl(ifp, cmd, data); + if (error != 0) + return (error); + return (0); + + case SIOCSIFFLAGS: + if (ifp->if_flags == sc->sc_flags) + return (0); + if ((ifp->if_flags & IFF_UP) != 0) { + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + octm_init(sc); + } else { + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + cvmx_mgmt_port_disable(sc->sc_port); + + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + } + } + sc->sc_flags = ifp->if_flags; + return (0); + + case SIOCSIFCAP: + /* + * Just change the capabilities in software, currently none + * require reprogramming hardware, they just toggle whether we + * make use of already-present facilities in software. + */ + ifp->if_capenable = ifr->ifr_reqcap; + return (0); + + case SIOCSIFMTU: + cvmx_mgmt_port_set_max_packet_size(sc->sc_port, ifr->ifr_mtu + ifp->if_data.ifi_hdrlen); + return (0); + + case SIOCSIFMEDIA: + case SIOCGIFMEDIA: + error = ifmedia_ioctl(ifp, ifr, &sc->sc_ifmedia, cmd); + if (error != 0) + return (error); + return (0); + + default: + error = ether_ioctl(ifp, cmd, data); + if (error != 0) + return (error); + return (0); + } +} + +static void +octm_rx_intr(void *arg) +{ + struct octm_softc *sc = arg; + cvmx_mixx_isr_t mixx_isr; + int len; + + mixx_isr.u64 = cvmx_read_csr(CVMX_MIXX_ISR(sc->sc_port)); + if (!mixx_isr.s.irthresh) { + device_printf(sc->sc_dev, "stray interrupt.\n"); + return; + } + + for (;;) { + struct mbuf *m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + if (m == NULL) { + device_printf(sc->sc_dev, "no memory for receive mbuf.\n"); + return; + } + + + len = cvmx_mgmt_port_receive(sc->sc_port, MCLBYTES, m->m_data); + if (len > 0) { + m->m_pkthdr.rcvif = sc->sc_ifp; + m->m_pkthdr.len = m->m_len = len; + + sc->sc_ifp->if_ipackets++; + + (*sc->sc_ifp->if_input)(sc->sc_ifp, m); + + continue; + } + + if (len == 0) + break; + + sc->sc_ifp->if_ierrors++; + } +} Modified: head/sys/mips/conf/OCTEON1 ============================================================================== --- head/sys/mips/conf/OCTEON1 Sun Jan 9 23:47:11 2011 (r217213) +++ head/sys/mips/conf/OCTEON1 Mon Jan 10 03:48:41 2011 (r217214) @@ -178,6 +178,9 @@ device uart # Generic UART driver # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device octe +# Cavium Octeon management Ethernet. +device octm + # Switch PHY support for the octe driver. These currently present a VLAN per # physical port, but may eventually provide support for DSA or similar instead. #device mv88e61xxphy # Marvell 88E61XX From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 05:13:06 2011 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 BBA16106566B; Mon, 10 Jan 2011 05:13:06 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AAA2F8FC1A; Mon, 10 Jan 2011 05:13: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 p0A5D66a068058; Mon, 10 Jan 2011 05:13:06 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0A5D6wX068056; Mon, 10 Jan 2011 05:13:06 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201101100513.p0A5D6wX068056@svn.freebsd.org> From: "Jayachandran C." Date: Mon, 10 Jan 2011 05:13: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: r217220 - head/sys/conf 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, 10 Jan 2011 05:13:06 -0000 Author: jchandra Date: Mon Jan 10 05:13:06 2011 New Revision: 217220 URL: http://svn.freebsd.org/changeset/base/217220 Log: Remove unnecessary 'cat'. Modified: head/sys/conf/Makefile.mips Modified: head/sys/conf/Makefile.mips ============================================================================== --- head/sys/conf/Makefile.mips Mon Jan 10 04:48:18 2011 (r217219) +++ head/sys/conf/Makefile.mips Mon Jan 10 05:13:06 2011 (r217220) @@ -86,7 +86,7 @@ CLEAN+= ${LDSCRIPT_NAME} ${LDSCRIPT_NAME ${KERNEL_KO}.tramp.noheader ${KERNEL_KO}.tramp.bin ${LDSCRIPT_NAME}: $S/conf/${LDSCRIPT_NAME} - cat $S/conf/${LDSCRIPT_NAME}|sed s/KERNLOADADDR/${KERNLOADADDR}/g \ + sed s/KERNLOADADDR/${KERNLOADADDR}/g $S/conf/${LDSCRIPT_NAME} \ > ${LDSCRIPT_NAME} %RULES From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 06:12:02 2011 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 2E918106566C; Mon, 10 Jan 2011 06:12:02 +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 1D63A8FC0C; Mon, 10 Jan 2011 06:12: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 p0A6C2nG069247; Mon, 10 Jan 2011 06:12:02 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0A6C1Fq069245; Mon, 10 Jan 2011 06:12:01 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201101100612.p0A6C1Fq069245@svn.freebsd.org> From: Lawrence Stewart Date: Mon, 10 Jan 2011 06:12: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: r217221 - 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: Mon, 10 Jan 2011 06:12:02 -0000 Author: lstewart Date: Mon Jan 10 06:12:01 2011 New Revision: 217221 URL: http://svn.freebsd.org/changeset/base/217221 Log: Reset the last_sack_ack SACK hint for TCP input processing to ensure that the hint is 0 when no SACK data is received to update the hint with. This was accidentally omitted from r216753. Sponsored by: FreeBSD Foundation MFC after: 10 weeks X-MFC with: 216753 Modified: head/sys/netinet/tcp_input.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Mon Jan 10 05:13:06 2011 (r217220) +++ head/sys/netinet/tcp_input.c Mon Jan 10 06:12:01 2011 (r217221) @@ -1291,6 +1291,7 @@ tcp_do_segment(struct mbuf *m, struct tc short ostate = 0; #endif thflags = th->th_flags; + tp->sackhint.last_sack_ack = 0; /* * If this is either a state-changing packet or current state isn't From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 06:46:19 2011 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 23F74106566B; Mon, 10 Jan 2011 06:46:19 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 12E118FC0C; Mon, 10 Jan 2011 06:46: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 p0A6kI53070001; Mon, 10 Jan 2011 06:46:18 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0A6kIEj069999; Mon, 10 Jan 2011 06:46:18 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201101100646.p0A6kIEj069999@svn.freebsd.org> From: Juli Mallett Date: Mon, 10 Jan 2011 06:46: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: r217222 - head/sys/mips/cavium 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, 10 Jan 2011 06:46:19 -0000 Author: jmallett Date: Mon Jan 10 06:46:18 2011 New Revision: 217222 URL: http://svn.freebsd.org/changeset/base/217222 Log: o) Free mbufs in error cases. o) Clear/acknowledge receive interrupt at end of thread. This gives the management interfaces performance on the order of 100Mbps rather than the previous level of 10Mbps on my MR-730. Modified: head/sys/mips/cavium/if_octm.c Modified: head/sys/mips/cavium/if_octm.c ============================================================================== --- head/sys/mips/cavium/if_octm.c Mon Jan 10 06:12:01 2011 (r217221) +++ head/sys/mips/cavium/if_octm.c Mon Jan 10 06:46:18 2011 (r217222) @@ -511,9 +511,15 @@ octm_rx_intr(void *arg) continue; } + m_freem(m); + if (len == 0) break; sc->sc_ifp->if_ierrors++; } + + /* Acknowledge interrupts. */ + cvmx_write_csr(CVMX_MIXX_ISR(sc->sc_port), mixx_isr.u64); + cvmx_read_csr(CVMX_MIXX_ISR(sc->sc_port)); } From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 16:09:36 2011 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 E64BD1065670; Mon, 10 Jan 2011 16:09:35 +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 D41CC8FC0A; Mon, 10 Jan 2011 16:09: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 p0AG9Zuj085352; Mon, 10 Jan 2011 16:09:35 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0AG9ZFI085350; Mon, 10 Jan 2011 16:09:35 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201101101609.p0AG9ZFI085350@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 10 Jan 2011 16:09: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: r217223 - head/libexec/rtld-elf 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, 10 Jan 2011 16:09:36 -0000 Author: kib Date: Mon Jan 10 16:09:35 2011 New Revision: 217223 URL: http://svn.freebsd.org/changeset/base/217223 Log: get_program_var_addr() must prefer the strong symbol to the weak one. Search global objects, together with main object and dependencies, for the requested symbol. Move the common code from symlook_default() into new helper symlook_global(), and use it both in symlook_global() and get_program_var_addr(). Supply lock state to get_program_var_addr(). Reviewed by: kan Tested by: Mykola Dzham Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Mon Jan 10 06:46:18 2011 (r217222) +++ head/libexec/rtld-elf/rtld.c Mon Jan 10 16:09:35 2011 (r217223) @@ -103,7 +103,7 @@ static void unload_filtees(Obj_Entry *); static int load_needed_objects(Obj_Entry *, int); static int load_preload_objects(void); static Obj_Entry *load_object(const char *, const Obj_Entry *, int); -static void map_stacks_exec(void); +static void map_stacks_exec(RtldLockState *); static Obj_Entry *obj_from_addr(const void *); static void objlist_call_fini(Objlist *, Obj_Entry *, RtldLockState *); static void objlist_call_init(Objlist *, RtldLockState *); @@ -119,9 +119,10 @@ static int rtld_dirname(const char *, ch static int rtld_dirname_abs(const char *, char *); static void rtld_exit(void); static char *search_library_path(const char *, const char *); -static const void **get_program_var_addr(const char *); +static const void **get_program_var_addr(const char *, RtldLockState *); static void set_program_var(const char *, const void *); static int symlook_default(SymLook *, const Obj_Entry *refobj); +static int symlook_global(SymLook *, DoneList *); static void symlook_init_from_req(SymLook *, const SymLook *); static int symlook_list(SymLook *, const Objlist *, DoneList *); static int symlook_needed(SymLook *, const Needed_Entry *, DoneList *); @@ -528,7 +529,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ r_debug_state(NULL, &obj_main->linkmap); /* say hello to gdb! */ - map_stacks_exec(); + map_stacks_exec(NULL); wlock_acquire(rtld_bind_lock, &lockstate); objlist_call_init(&initlist, &lockstate); @@ -2129,12 +2130,18 @@ dllockinit(void *context, void * dlopen(const char *name, int mode) { + RtldLockState lockstate; int lo_flags; LD_UTRACE(UTRACE_DLOPEN_START, NULL, NULL, 0, mode, name); ld_tracing = (mode & RTLD_TRACE) == 0 ? NULL : "1"; - if (ld_tracing != NULL) - environ = (char **)*get_program_var_addr("environ"); + if (ld_tracing != NULL) { + rlock_acquire(rtld_bind_lock, &lockstate); + if (setjmp(lockstate.env) != 0) + lock_upgrade(rtld_bind_lock, &lockstate); + environ = (char **)*get_program_var_addr("environ", &lockstate); + lock_release(rtld_bind_lock, &lockstate); + } lo_flags = RTLD_LO_DLOPEN; if (mode & RTLD_NODELETE) lo_flags |= RTLD_LO_NODELETE; @@ -2220,7 +2227,7 @@ dlopen_object(const char *name, Obj_Entr name); GDB_STATE(RT_CONSISTENT,obj ? &obj->linkmap : NULL); - map_stacks_exec(); + map_stacks_exec(&lockstate); /* Call the init functions. */ objlist_call_init(&initlist, &lockstate); @@ -2779,21 +2786,20 @@ r_debug_state(struct r_debug* rd, struct /* * Get address of the pointer variable in the main program. + * Prefer non-weak symbol over the weak one. */ static const void ** -get_program_var_addr(const char *name) +get_program_var_addr(const char *name, RtldLockState *lockstate) { - const Obj_Entry *obj; SymLook req; + DoneList donelist; symlook_init(&req, name); - for (obj = obj_main; obj != NULL; obj = obj->next) { - if (symlook_obj(&req, obj) == 0) { - return ((const void **)(req.defobj_out->relocbase + - req.sym_out->st_value)); - } - } - return (NULL); + req.lockstate = lockstate; + donelist_init(&donelist); + if (symlook_global(&req, &donelist) != 0) + return (NULL); + return ((const void **)(req.defobj_out->relocbase + req.sym_out->st_value)); } /* @@ -2806,13 +2812,55 @@ set_program_var(const char *name, const { const void **addr; - if ((addr = get_program_var_addr(name)) != NULL) { + if ((addr = get_program_var_addr(name, NULL)) != NULL) { dbg("\"%s\": *%p <-- %p", name, addr, value); *addr = value; } } /* + * Search the global objects, including dependencies and main object, + * for the given symbol. + */ +static int +symlook_global(SymLook *req, DoneList *donelist) +{ + SymLook req1; + const Objlist_Entry *elm; + int res; + + symlook_init_from_req(&req1, req); + + /* Search all objects loaded at program start up. */ + if (req->defobj_out == NULL || + ELF_ST_BIND(req->sym_out->st_info) == STB_WEAK) { + res = symlook_list(&req1, &list_main, donelist); + if (res == 0 && (req->defobj_out == NULL || + ELF_ST_BIND(req1.sym_out->st_info) != STB_WEAK)) { + req->sym_out = req1.sym_out; + req->defobj_out = req1.defobj_out; + assert(req->defobj_out != NULL); + } + } + + /* Search all DAGs whose roots are RTLD_GLOBAL objects. */ + STAILQ_FOREACH(elm, &list_global, link) { + if (req->defobj_out != NULL && + ELF_ST_BIND(req->sym_out->st_info) != STB_WEAK) + break; + res = symlook_list(&req1, &elm->obj->dagmembers, donelist); + if (res == 0 && (req->defobj_out == NULL || + ELF_ST_BIND(req1.sym_out->st_info) != STB_WEAK)) { + req->sym_out = req1.sym_out; + req->defobj_out = req1.defobj_out; + assert(req->defobj_out != NULL); + } + } + + return (req->sym_out != NULL ? 0 : ESRCH); +} + +/* * Given a symbol name in a referencing object, find the corresponding * definition of the symbol. Returns a pointer to the symbol, or NULL if * no definition was found. Returns a pointer to the Obj_Entry of the @@ -2822,13 +2870,10 @@ static int symlook_default(SymLook *req, const Obj_Entry *refobj) { DoneList donelist; - const Elf_Sym *def; - const Obj_Entry *defobj; const Objlist_Entry *elm; SymLook req1; int res; - def = NULL; - defobj = NULL; + donelist_init(&donelist); symlook_init_from_req(&req1, req); @@ -2836,46 +2881,25 @@ symlook_default(SymLook *req, const Obj_ if (refobj->symbolic && !donelist_check(&donelist, refobj)) { res = symlook_obj(&req1, refobj); if (res == 0) { - def = req1.sym_out; - defobj = req1.defobj_out; - assert(defobj != NULL); + req->sym_out = req1.sym_out; + req->defobj_out = req1.defobj_out; + assert(req->defobj_out != NULL); } } - /* Search all objects loaded at program start up. */ - if (def == NULL || ELF_ST_BIND(def->st_info) == STB_WEAK) { - res = symlook_list(&req1, &list_main, &donelist); - if (res == 0 && - (def == NULL || ELF_ST_BIND(req1.sym_out->st_info) != STB_WEAK)) { - def = req1.sym_out; - defobj = req1.defobj_out; - assert(defobj != NULL); - } - } - - /* Search all DAGs whose roots are RTLD_GLOBAL objects. */ - STAILQ_FOREACH(elm, &list_global, link) { - if (def != NULL && ELF_ST_BIND(def->st_info) != STB_WEAK) - break; - res = symlook_list(&req1, &elm->obj->dagmembers, &donelist); - if (res == 0 && - (def == NULL || ELF_ST_BIND(req1.sym_out->st_info) != STB_WEAK)) { - def = req1.sym_out; - defobj = req1.defobj_out; - assert(defobj != NULL); - } - } + symlook_global(req, &donelist); /* Search all dlopened DAGs containing the referencing object. */ STAILQ_FOREACH(elm, &refobj->dldags, link) { - if (def != NULL && ELF_ST_BIND(def->st_info) != STB_WEAK) + if (req->sym_out != NULL && + ELF_ST_BIND(req->sym_out->st_info) != STB_WEAK) break; res = symlook_list(&req1, &elm->obj->dagmembers, &donelist); - if (res == 0 && - (def == NULL || ELF_ST_BIND(req1.sym_out->st_info) != STB_WEAK)) { - def = req1.sym_out; - defobj = req1.defobj_out; - assert(defobj != NULL); + if (res == 0 && (req->sym_out == NULL || + ELF_ST_BIND(req1.sym_out->st_info) != STB_WEAK)) { + req->sym_out = req1.sym_out; + req->defobj_out = req1.defobj_out; + assert(req->defobj_out != NULL); } } @@ -2884,22 +2908,17 @@ symlook_default(SymLook *req, const Obj_ * symbol from there. This is how the application links to * dynamic linker services such as dlopen. */ - if (def == NULL || ELF_ST_BIND(def->st_info) == STB_WEAK) { + if (req->sym_out == NULL || + ELF_ST_BIND(req->sym_out->st_info) == STB_WEAK) { res = symlook_obj(&req1, &obj_rtld); if (res == 0) { - def = req1.sym_out; - defobj = req1.defobj_out; - assert(defobj != NULL); + req->sym_out = req1.sym_out; + req->defobj_out = req1.defobj_out; + assert(req->defobj_out != NULL); } } - if (def != NULL) { - assert(defobj != NULL); - req->defobj_out = defobj; - req->sym_out = def; - return (0); - } - return (ESRCH); + return (req->sym_out != NULL ? 0 : ESRCH); } static int @@ -3900,14 +3919,14 @@ _rtld_get_stack_prot(void) } static void -map_stacks_exec(void) +map_stacks_exec(RtldLockState *lockstate) { void (*thr_map_stacks_exec)(void); if ((max_stack_flags & PF_X) == 0 || (stack_prot & PROT_EXEC) != 0) return; thr_map_stacks_exec = (void (*)(void))(uintptr_t) - get_program_var_addr("__pthread_map_stacks_exec"); + get_program_var_addr("__pthread_map_stacks_exec", lockstate); if (thr_map_stacks_exec != NULL) { stack_prot |= PROT_EXEC; thr_map_stacks_exec(); From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 16:10:25 2011 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 56E5E1065672; Mon, 10 Jan 2011 16:10:25 +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 45E308FC1C; Mon, 10 Jan 2011 16:10: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 p0AGAPjq085412; Mon, 10 Jan 2011 16:10:25 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0AGAPpW085410; Mon, 10 Jan 2011 16:10:25 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201101101610.p0AGAPpW085410@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 10 Jan 2011 16:10: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: r217224 - head/lib/libthr/thread 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, 10 Jan 2011 16:10:25 -0000 Author: kib Date: Mon Jan 10 16:10:25 2011 New Revision: 217224 URL: http://svn.freebsd.org/changeset/base/217224 Log: For the process that already loaded libthr but still not initialized threading, fall back to libc method of performing __pthread_map_stacks_exec() job. Reported and tested by: Mykola Dzham Modified: head/lib/libthr/thread/thr_stack.c Modified: head/lib/libthr/thread/thr_stack.c ============================================================================== --- head/lib/libthr/thread/thr_stack.c Mon Jan 10 16:09:35 2011 (r217223) +++ head/lib/libthr/thread/thr_stack.c Mon Jan 10 16:10:25 2011 (r217224) @@ -30,6 +30,8 @@ #include #include #include +#include +#include #include #include #include @@ -139,6 +141,26 @@ _thr_stack_fix_protection(struct pthread _rtld_get_stack_prot()); } +static void +singlethread_map_stacks_exec(void) +{ + int mib[2]; + struct rlimit rlim; + u_long usrstack; + size_t len; + + mib[0] = CTL_KERN; + mib[1] = KERN_USRSTACK; + len = sizeof(usrstack); + if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), &usrstack, &len, NULL, 0) + == -1) + return; + if (getrlimit(RLIMIT_STACK, &rlim) == -1) + return; + mprotect((void *)(uintptr_t)(usrstack - rlim.rlim_cur), + rlim.rlim_cur, _rtld_get_stack_prot()); +} + void __pthread_map_stacks_exec(void); void __pthread_map_stacks_exec(void) @@ -146,6 +168,10 @@ __pthread_map_stacks_exec(void) struct pthread *curthread, *thrd; struct stack *st; + if (!_thr_is_inited()) { + singlethread_map_stacks_exec(); + return; + } curthread = _get_curthread(); THREAD_LIST_RDLOCK(curthread); LIST_FOREACH(st, &mstackq, qe) From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 16:23:34 2011 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 36D2C106566C; Mon, 10 Jan 2011 16:23:34 +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 D92EB8FC12; Mon, 10 Jan 2011 16:23:33 +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 p0AGHgoL097069; Mon, 10 Jan 2011 09:17:42 -0700 (MST) (envelope-from imp@bsdimp.com) Message-ID: <4D2B3124.30800@bsdimp.com> Date: Mon, 10 Jan 2011 09:17:40 -0700 From: Warner Losh User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Thunderbird/3.1.6 MIME-Version: 1.0 To: Tijl Coosemans References: <201101081243.p08Ch5vR092295@svn.freebsd.org> <201101091545.11754.tijl@freebsd.org> In-Reply-To: <201101091545.11754.tijl@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Juli Mallett , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r217147 - in head/sys: amd64/include arm/include i386/include ia64/include mips/include powerpc/include sparc64/include sun4v/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: Mon, 10 Jan 2011 16:23:34 -0000 On 01/09/2011 07:45, Tijl Coosemans wrote: > My main goal is to compile 32 bit code on amd64. To do that i386 and > amd64 headers need to be merged as much as possible and I'm looking at > mips and powerpc headers as examples. As I'm going through each of the > machine headers however and as people review my patches several issues > have come up. These are mostly generic in nature and spread over all > architectures, not just mips. There are more problems in the mips and > powerpc headers however because of the complexity of supporting both 32 > bit and 64 bit ABIs. If you consider the mips headers too delicate to > be changed without approval from mips@ I'll make sure to send patches > there before committing from now on. Please do so. Mips' ABIs are complex enough for the experts to understand the subtle implications of, let alone someone who thinks they behave exactly like all the other APIs out there. While the assumption that they are the same is generally true, it isn't universally true since n32 makes a hash of a lot of assumptions around the edges. > As for 64 bit longs on 32 bit ABIs I would advise against spending your > time on that. It's something that sounds nice in theory, but it's just > not practical. You don't gain anything from it because there's another > 64 bit type already (long long) and there's too much code out there > that relies on long and pointer types having the same size or that > assumes long is different between 32 bit and 64 bit ABIs, also in our > own tree. So yes, in practice there's only ILP32 and LP64 and nothing > in between. Except n32 is only mostly ILP32, not totally ILP32. ILP32 tends to imply, for example, 32-bit registers. I've had to fix some code in the tree that assumed ILP32 meant 32-bit registers and LP64 meant 64-bit registers. Hence my comments above about n32 being an oddball. Same goes for stack alignment: n32 has 64-bit stack alignment, while o32 (and most other ILP32 ABIs) have only 32-bit stack alignment requirements. > About the use of __LP64__. It's essentially cosmetic and can easily be > changed back. However, if you can agree with me on mlong64 I would like > to keep it (for type definitions). What the patches (committed + > upcoming) show is that _inttypes.h, _limits.h and _stdint.h (_types.h > needs more work) are exactly the same for mips, powerpc and x86 > indicating that they aren't architecture specific. Changing __LP64__ > back to __mips_n64 would introduce a difference that isn't any. Please change it back for now. The n32 support in the tree is mostly complete, but still has a few issues that I'm trying to iron out with Juli. Having more churn in this area makes it more difficult to sort things out (and patch if things are actually wrong). > Moreover, those headers would also work on pure ILP32 (arm) and LP64 > (ia64, sparc64) architectures, so personally I would like to move them > to sys/, because as the patches show, duplicated code starts to > diverge, bugs creep in and are subsequently copy-pasted. Whenever I > suggested this to someone however I never really got a positive > response so the headers will stay under machine/ for now. I would still > like to get a clear yes or no on this though. Create a sys/_foo.h. Have all those architectures include it. That gives you the best of both worlds: for those that can use the standard foo.h, we provide one. For the oddballs, or ones where the standard one doesn't match the warts of history or current innovation, they can be overriden to cope. Warner From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 17:37:49 2011 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 67A981065670; Mon, 10 Jan 2011 17:37:49 +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 568168FC1C; Mon, 10 Jan 2011 17:37: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 p0AHbnhI087996; Mon, 10 Jan 2011 17:37:49 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0AHbne7087994; Mon, 10 Jan 2011 17:37:49 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201101101737.p0AHbne7087994@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 10 Jan 2011 17:37: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: r217225 - head/sys/dev/bge 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, 10 Jan 2011 17:37:49 -0000 Author: yongari Date: Mon Jan 10 17:37:49 2011 New Revision: 217225 URL: http://svn.freebsd.org/changeset/base/217225 Log: Backout r216973 and r216970. r216973 didn't solve watchdog timeout issue seen on PCIX BCM5704 controller. r216970 fixed the issue but the DMA address space restriction was applied to all bge(4) controllers such that it caused unnecessary performance degradation for controllers that have no such issues. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Mon Jan 10 16:10:25 2011 (r217224) +++ head/sys/dev/bge/if_bge.c Mon Jan 10 17:37:49 2011 (r217225) @@ -2475,18 +2475,8 @@ bge_dma_alloc(struct bge_softc *sc) boundary = 0; if ((sc->bge_flags & BGE_FLAG_4G_BNDRY_BUG) != 0) boundary = BGE_DMA_BNDRY; - /* - * XXX - * It seems bus_dma(9) still has issue on dealing with boundary - * restriction for dynamic buffers so disable the boundary - * restriction and limit DMA address space to 32bit. It's not - * clear whether there is another hardware issue here. - */ - lowaddr = BUS_SPACE_MAXADDR; - if ((sc->bge_flags & BGE_FLAG_40BIT_BUG) != 0) - lowaddr = BUS_SPACE_MAXADDR_32BIT; error = bus_dma_tag_create(bus_get_dma_tag(sc->bge_dev), - 1, 0, lowaddr, BUS_SPACE_MAXADDR, NULL, + 1, boundary, lowaddr, BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE_32BIT, 0, BUS_SPACE_MAXSIZE_32BIT, 0, NULL, NULL, &sc->bge_cdata.bge_buffer_tag); if (error != 0) { From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 17:45:09 2011 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 F18C8106566C; Mon, 10 Jan 2011 17:45:09 +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 E05A48FC08; Mon, 10 Jan 2011 17:45: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 p0AHj9ss088193; Mon, 10 Jan 2011 17:45:09 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0AHj9Sl088191; Mon, 10 Jan 2011 17:45:09 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201101101745.p0AHj9Sl088191@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 10 Jan 2011 17:45: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: r217226 - head/sys/dev/bge 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, 10 Jan 2011 17:45:10 -0000 Author: yongari Date: Mon Jan 10 17:45:09 2011 New Revision: 217226 URL: http://svn.freebsd.org/changeset/base/217226 Log: Apply DMA address space restriction to controllers that have 4GB DMA boundary bug and runs with PCI-X mode. watchdog timeout was observed on BCM5704 which lives behind certain PCI-X bridge(e.g. AMD 8131 PCI-X bridge). It's still not clear whether the root cause came from that PCI-X bridge or not. The watchdog timeout indicates the issue is in TX path. If the bridge reorders TX mailbox write accesses it would generate all kinds of problems but I'm not sure. This should be revisited. Tested by: Michael L. Squires (mikes <> siralan dot org) Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Mon Jan 10 17:37:49 2011 (r217225) +++ head/sys/dev/bge/if_bge.c Mon Jan 10 17:45:09 2011 (r217226) @@ -2473,8 +2473,18 @@ bge_dma_alloc(struct bge_softc *sc) /* Create parent tag for buffers. */ boundary = 0; - if ((sc->bge_flags & BGE_FLAG_4G_BNDRY_BUG) != 0) + if ((sc->bge_flags & BGE_FLAG_4G_BNDRY_BUG) != 0) { boundary = BGE_DMA_BNDRY; + /* + * XXX + * watchdog timeout issue was observed on BCM5704 which + * lives behind PCI-X bridge(e.g AMD 8131 PCI-X bridge). + * Limiting DMA address space to 32bits seems to address + * it. + */ + if (sc->bge_flags & BGE_FLAG_PCIX) + lowaddr = BUS_SPACE_MAXADDR_32BIT; + } error = bus_dma_tag_create(bus_get_dma_tag(sc->bge_dev), 1, boundary, lowaddr, BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE_32BIT, 0, BUS_SPACE_MAXSIZE_32BIT, From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 19:11:26 2011 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 2342C106564A; Mon, 10 Jan 2011 19:11:26 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1148A8FC08; Mon, 10 Jan 2011 19:11: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 p0AJBQng090313; Mon, 10 Jan 2011 19:11:26 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0AJBQKG090310; Mon, 10 Jan 2011 19:11:26 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201101101911.p0AJBQKG090310@svn.freebsd.org> From: Josh Paetzel Date: Mon, 10 Jan 2011 19:11:26 +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: r217229 - head/usr.sbin/pc-sysinstall/backend 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, 10 Jan 2011 19:11:26 -0000 Author: jpaetzel (ports committer) Date: Mon Jan 10 19:11:25 2011 New Revision: 217229 URL: http://svn.freebsd.org/changeset/base/217229 Log: Patch pc-sysinstall to deal with 4k sector size drives PR: bin/151967 Submitted by: kmoore Approved by: imp Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Mon Jan 10 18:15:34 2011 (r217228) +++ head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Mon Jan 10 19:11:25 2011 (r217229) @@ -158,227 +158,29 @@ gen_glabel_name() export VAL }; -# Function to setup / stamp a legacy MBR bsdlabel -setup_mbr_partitions() +# Function to setup partitions using gpart +setup_gpart_partitions() { - DISKTAG="$1" - WRKSLICE="$2" + local _dTag="$1" + local _pDisk="$2" + local _wSlice="$3" + local _sNum="$4" + local _pType="$5" FOUNDPARTS="1" - # Lets setup the BSDLABEL - BSDLABEL="${TMPDIR}/bsdLabel-${WRKSLICE}" - export BSDLABEL - rm $BSDLABEL >/dev/null 2>/dev/null - echo "# /dev/${WRKSLICE}" >>$BSDLABEL - echo "8 partitions:" >>$BSDLABEL - echo "# size offset fstype bsize bps/cpg" >>$BSDLABEL - - PARTLETTER="a" - - # Lets read in the config file now and populate this - while read line - do - # Check for data on this slice - echo $line | grep "^${DISKTAG}-part=" >/dev/null 2>/dev/null - if [ "$?" = "0" ] - then - # Found a slice- entry, lets get the slice info - get_value_from_string "${line}" - STRING="$VAL" - FOUNDPARTS="0" - - # We need to split up the string now, and pick out the variables - FS=`echo $STRING | tr -s '\t' ' ' | cut -d ' ' -f 1` - SIZE=`echo $STRING | tr -s '\t' ' ' | cut -d ' ' -f 2` - MNT=`echo $STRING | tr -s '\t' ' ' | cut -d ' ' -f 3` - - if echo $STRING | grep -E '^/.+' >/dev/null 2>&1 - then - IMAGE=`echo ${STRING} | cut -f1 -d' '` - fi - - # Check if we have a .eli extension on this FS - echo ${FS} | grep ".eli" >/dev/null 2>/dev/null - if [ "$?" = "0" ] - then - FS="`echo ${FS} | cut -d '.' -f 1`" - ENC="ON" - check_for_enc_pass "${line}" - if [ "${VAL}" != "" ] ; then - # We have a user supplied password, save it for later - ENCPASS="${VAL}" - fi - else - ENC="OFF" - fi - - # Check if the user tried to setup / as an encrypted partition - check_for_mount "${MNT}" "/" - if [ "${?}" = "0" -a "${ENC}" = "ON" ] - then - USINGENCROOT="0" ; export USINGENCROOT - fi - - if [ -n "${IMAGE}" ] - then - FS="IMAGE" - SIZE=`ls -l "${IMAGE}" | awk '{ print $5 }'` - MNT=`echo $STRING | tr -s '\t' ' ' | cut -d ' ' -f 2` - SIZE=`convert_byte_to_megabyte $SIZE` - fi - - # Now check that these values are sane - case $FS in - UFS|UFS+S|UFS+J|UFS+SUJ|ZFS|SWAP|IMAGE) ;; - *) exit_err "ERROR: Invalid file system specified on $line" ;; - esac - - # Check that we have a valid size number - expr $SIZE + 1 >/dev/null 2>/dev/null - if [ "$?" != "0" ]; then - exit_err "ERROR: The size specified on $line is invalid" - fi - - # Check that the mount-point starts with / - echo "$MNT" | grep -e "^/" -e "^none" >/dev/null 2>/dev/null - if [ "$?" != "0" ]; then - exit_err "ERROR: The mount-point specified on $line is invalid" - fi - - if [ "$SIZE" = "0" ] - then - SOUT="*" - else - SOUT="${SIZE}M" - fi - - # OK, we passed all tests, now lets put these values into a config - # If the part - if [ "${PARTLETTER}" = "a" ] - then - if [ "$FS" = "SWAP" ] - then - echo "a: ${SOUT} * swap 0 0" >>${BSDLABEL} - else - echo "a: ${SOUT} 0 4.2BSD 0 0" >>${BSDLABEL} - fi - - # Check if we found a valid root partition - check_for_mount "${MNT}" "/" - if [ "$?" = "0" ] ; then - FOUNDROOT="0" ; export FOUNDROOT - fi - - # Check if we have a "/boot" instead - check_for_mount "${MNT}" "/boot" - if [ "${?}" = "0" ] ; then - USINGBOOTPART="0" ; export USINGBOOTPART - if [ "${FS}" != "UFS" -a "${FS}" != "UFS+S" -a "${FS}" != "UFS+J" -a "${FS}" != "UFS+SUJ" ] - then - exit_err "/boot partition must be formatted with UFS" - fi - fi - - else - # Done with the a: partitions - - # Check if we found a valid root partition not on a: - check_for_mount "${MNT}" "/" - if [ "${?}" = "0" ] ; then - FOUNDROOT="1" ; export FOUNDROOT - fi - - # Check if we have a /boot partition, and fail since its not first - check_for_mount "${MNT}" "/boot" - if [ "${?}" = "0" ] ; then - exit_err "/boot partition must be first partition" - fi - - - if [ "$FS" = "SWAP" ] - then - echo "${PARTLETTER}: ${SOUT} * swap" >>${BSDLABEL} - else - echo "${PARTLETTER}: ${SOUT} * 4.2BSD" >>${BSDLABEL} - fi - fi - - # Generate a unique label name for this mount - gen_glabel_name "${MNT}" "${FS}" - PLABEL="${VAL}" - - # Get any extra options for this fs / line - get_fs_line_xvars "${WRKSLICE}${PARTLETTER}" "${STRING}" - XTRAOPTS="${VAR}" - - # Check if using zfs mirror - echo ${XTRAOPTS} | grep "mirror" >/dev/null 2>/dev/null - if [ "$?" = "0" ] ; then - XTRAOPTS=$(setup_zfs_mirror_parts "$XTRAOPTS" "${WRKSLICE}${PARTLETTER}") - fi - - # Save this data to our partition config dir - echo "${FS}:${MNT}:${ENC}:${PLABEL}:MBR:${XTRAOPTS}:${IMAGE}" >${PARTDIR}/${WRKSLICE}${PARTLETTER} - - # If we have a enc password, save it as well - if [ ! -z "${ENCPASS}" ] ; then - echo "${ENCPASS}" >${PARTDIR}-enc/${WRKSLICE}${PARTLETTER}-encpass - fi - - # This partition letter is used, get the next one - case ${PARTLETTER} in - a) PARTLETTER="b" ;; - b) # When we hit b, add the special c: setup for bsdlabel - echo "c: * * unused" >>${BSDLABEL} - PARTLETTER="d" ;; - d) PARTLETTER="e" ;; - e) PARTLETTER="f" ;; - f) PARTLETTER="g" ;; - g) PARTLETTER="h" ;; - h) PARTLETTER="ERR" ;; - *) exit_err "ERROR: bsdlabel only supports up to letter h for partitions." ;; - esac - - unset IMAGE - - fi # End of subsection locating a slice in config - - echo $line | grep "^commitDiskLabel" >/dev/null 2>/dev/null - if [ "$?" = "0" -a "${FOUNDPARTS}" = "0" ] - then - # Found our flag to commit this label setup, check that we found at least 1 partition and do it - if [ "${PARTLETTER}" != "a" ] - then - # Check if we only had 1 partition, and make sure we add "c:" section to label - if [ "${PARTLETTER}" = "b" ] - then - echo "c: * * unused" >>${BSDLABEL} - fi - - echo "bsdlabel -R -B /dev/${WRKSLICE} ${BSDLABEL}" - bsdlabel -R -B ${WRKSLICE} ${BSDLABEL} - - break - else - exit_err "ERROR: commitDiskLabel was called without any partition entries for it!" - fi - fi - done <${CFGF} -}; - -# Function to setup partitions using gpt -setup_gpt_partitions() -{ - DISKTAG="$1" - DISK="$2" - FOUNDPARTS="1" + # Lets read in the config file now and setup our partitions + if [ "${_pType}" = "gpt" ] ; then + CURPART="2" + else + PARTLETTER="a" + CURPART="1" + rc_halt "gpart create -s BSD ${_wSlice}" + fi - # Lets read in the config file now and setup our GPT partitions - CURPART="2" while read line do # Check for data on this slice - echo $line | grep "^${DISKTAG}-part=" >/dev/null 2>/dev/null + echo $line | grep "^${_dTag}-part=" >/dev/null 2>/dev/null if [ "$?" = "0" ] then FOUNDPARTS="0" @@ -441,24 +243,28 @@ setup_gpt_partitions() # Check if we found a valid root partition check_for_mount "${MNT}" "/" if [ "${?}" = "0" ] ; then - if [ "${CURPART}" = "2" ] ; then + FOUNDROOT="1" ; export FOUNDROOT + if [ "${CURPART}" = "2" -a "$_pType" = "gpt" ] ; then + FOUNDROOT="0" ; export FOUNDROOT + fi + if [ "${CURPART}" = "1" -a "$_pType" = "mbr" ] ; then FOUNDROOT="0" ; export FOUNDROOT - else - FOUNDROOT="1" ; export FOUNDROOT fi fi check_for_mount "${MNT}" "/boot" if [ "${?}" = "0" ] ; then - if [ "${CURPART}" = "2" ] ; then - USINGBOOTPART="0" ; export USINGBOOTPART - if [ "${FS}" != "UFS" -a "${FS}" != "UFS+S" -a "${FS}" != "UFS+J" -a "${FS}" != "UFS+SUJ" ] - then - exit_err "/boot partition must be formatted with UFS" - fi - else + USINGBOOTPART="0" ; export USINGBOOTPART + if [ "${CURPART}" != "2" -a "${_pType}" = "gpt" ] ; then + exit_err "/boot partition must be first partition" + fi + if [ "${CURPART}" != "1" -a "${_pType}" = "mbr" ] ; then exit_err "/boot partition must be first partition" fi + + if [ "${FS}" != "UFS" -a "${FS}" != "UFS+S" -a "${FS}" != "UFS+J" -a "${FS}" != "UFS+SUJ" ] ; then + exit_err "/boot partition must be formatted with UFS" + fi fi # Generate a unique label name for this mount @@ -466,13 +272,21 @@ setup_gpt_partitions() PLABEL="${VAL}" # Get any extra options for this fs / line - get_fs_line_xvars "${DISK}p${CURPART}" "${STRING}" + if [ "${_pType}" = "gpt" ] ; then + get_fs_line_xvars "${_pDisk}p${CURPART}" "${STRING}" + else + get_fs_line_xvars "${_wSlice}" "${STRING}" + fi XTRAOPTS="${VAR}" # Check if using zfs mirror echo ${XTRAOPTS} | grep "mirror" >/dev/null 2>/dev/null if [ "$?" = "0" ] ; then - XTRAOPTS=$(setup_zfs_mirror_parts "$XTRAOPTS" "${DISK}p${CURPART}") + if [ "${_pType}" = "gpt" ] ; then + XTRAOPTS=$(setup_zfs_mirror_parts "$XTRAOPTS" "${_pDisk}p${CURPART}") + else + XTRAOPTS=$(setup_zfs_mirror_parts "$XTRAOPTS" "${_wSlice}") + fi fi # Figure out the gpart type to use @@ -483,7 +297,16 @@ setup_gpt_partitions() esac # Create the partition - rc_halt "gpart add ${SOUT} -t ${PARTYPE} ${DISK}" + if [ "${_pType}" = "gpt" ] ; then + if [ "$CURPART" = "2" ] ; then + # If this is GPT, make sure first partition is aligned to 4k + rc_halt "gpart add -b 2016 ${SOUT} -t ${PARTYPE} ${_pDisk}" + else + rc_halt "gpart add ${SOUT} -t ${PARTYPE} ${_pDisk}" + fi + else + rc_halt "gpart add ${SOUT} -t ${PARTYPE} -i ${CURPART} ${_wSlice}" + fi # Check if this is a root / boot partition, and stamp the right loader for TESTMNT in `echo ${MNT} | sed 's|,| |g'` @@ -497,19 +320,53 @@ setup_gpt_partitions() done # Save this data to our partition config dir - echo "${FS}:${MNT}:${ENC}:${PLABEL}:GPT:${XTRAOPTS}" >${PARTDIR}/${DISK}p${CURPART} + if [ "${_pType}" = "gpt" ] ; then + echo "${FS}:${MNT}:${ENC}:${PLABEL}:GPT:${XTRAOPTS}" >${PARTDIR}/${_pDisk}p${CURPART} - # Clear out any headers - sleep 2 - dd if=/dev/zero of=${DISK}p${CURPART} count=2048 >/dev/null 2>/dev/null - - # If we have a enc password, save it as well - if [ ! -z "${ENCPASS}" ] ; then - echo "${ENCPASS}" >${PARTDIR}-enc/${DISK}p${CURPART}-encpass + # Clear out any headers + sleep 2 + dd if=/dev/zero of=${_pDisk}p${CURPART} count=2048 >/dev/null 2>/dev/null + + # If we have a enc password, save it as well + if [ ! -z "${ENCPASS}" ] ; then + echo "${ENCPASS}" >${PARTDIR}-enc/${_pDisk}p${CURPART}-encpass + fi + else + # MBR Partition + echo "${FS}:${MNT}:${ENC}:${PLABEL}:MBR:${XTRAOPTS}:${IMAGE}" >${PARTDIR}/${_wSlice}${PARTLETTER} + # Clear out any headers + sleep 2 + dd if=/dev/zero of=${_wSlice}${PARTLETTER} count=2048 >/dev/null 2>/dev/null + + # If we have a enc password, save it as well + if [ ! -z "${ENCPASS}" ] ; then + echo "${ENCPASS}" >${PARTDIR}-enc/${_wSlice}${PARTLETTER}-encpass + fi fi + # Increment our parts counter - CURPART="`expr ${CURPART} + 1`" + if [ "$_pType" = "gpt" ] ; then + CURPART="`expr ${CURPART} + 1`" + # If this is a gpt partition, we can continue and skip the MBR part letter stuff + continue + else + CURPART="`expr ${CURPART} + 1`" + if [ "$CURPART" = "3" ] ; then CURPART="4" ; fi + fi + + + # This partition letter is used, get the next one + case ${PARTLETTER} in + a) PARTLETTER="b" ;; + b) PARTLETTER="d" ;; + d) PARTLETTER="e" ;; + e) PARTLETTER="f" ;; + f) PARTLETTER="g" ;; + g) PARTLETTER="h" ;; + h) PARTLETTER="ERR" ;; + *) exit_err "ERROR: bsdlabel only supports up to letter h for partitions." ;; + esac fi # End of subsection locating a slice in config @@ -518,13 +375,17 @@ setup_gpt_partitions() then # If this is the boot disk, stamp the right gptboot - if [ ! -z "${BOOTTYPE}" ] ; then + if [ ! -z "${BOOTTYPE}" -a "$_pType" = "gpt" ] ; then case ${BOOTTYPE} in - freebsd-ufs) rc_halt "gpart bootcode -p /boot/gptboot -i 1 ${DISK}" ;; - freebsd-zfs) rc_halt "gpart bootcode -p /boot/gptzfsboot -i 1 ${DISK}" ;; + freebsd-ufs) rc_halt "gpart bootcode -p /boot/gptboot -i 1 ${_pDisk}" ;; + freebsd-zfs) rc_halt "gpart bootcode -p /boot/gptzfsboot -i 1 ${_pDisk}" ;; esac fi + # Make sure to stamp the MBR loader + if [ "$_pType" = "mbr" ] ; then + rc_halt "gpart bootcode -b /boot/boot ${_wSlice}" + fi # Found our flag to commit this label setup, check that we found at least 1 partition if [ "${CURPART}" = "2" ] ; then @@ -564,15 +425,9 @@ populate_disk_label() exit_err "ERROR: Missing SLICETAG data. This shouldn't happen - please let the developers know" fi - # Using Traditional MBR for dual-booting - if [ "$type" = "mbr" ] ; then - setup_mbr_partitions "${disktag}" "${wrkslice}" - fi - # Using entire disk mode, use GPT for this - if [ "$type" = "gpt" ] ; then - setup_gpt_partitions "${disktag}" "${disk}" - fi + # Setup the partitions with gpart + setup_gpart_partitions "${disktag}" "${disk}" "${wrkslice}" "${slicenum}" "${type}" }; Modified: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Mon Jan 10 18:15:34 2011 (r217228) +++ head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Mon Jan 10 19:11:25 2011 (r217229) @@ -243,7 +243,7 @@ export_all_zpools() delete_all_gpart() { echo_log "Deleting all gparts" - DISK="$1" + local DISK="$1" # Check for any swaps to stop for i in `gpart show ${DISK} 2>/dev/null | grep 'freebsd-swap' | tr -s ' ' | cut -d ' ' -f 4` @@ -260,6 +260,13 @@ delete_all_gpart() fi done + # Destroy the disk geom + rc_nohalt "gpart destroy ${DISK}" + + # Make sure we clear any hidden gpt tables + clear_backup_gpt_table "${DISK}" + + # Wipe out front of disk rc_nohalt "dd if=/dev/zero of=/dev/${DISK} count=3000" }; @@ -553,6 +560,24 @@ stop_gjournal() fi } ; + +# Function to wipe the potential backup gpt table from a disk +clear_backup_gpt_table() +{ + # Get the disk block size + local dSize="`gpart show $1 | grep $1 | tr -s ' ' | cut -d ' ' -f 3`" + + # Make sure this is a valid number + is_num "${dSize}" >/dev/null 2>/dev/null + if [ "$?" != "0" ] ; then return ; fi + + # Die backup label, DIE + echo_log "Clearing gpt backup table location on disk" + rc_nohalt "dd if=/dev/zero of=${1} bs=512 seek=${dSize}" + +} ; + + # Function which runs gpart and creates a single large GPT partition scheme init_gpt_full_disk() { @@ -567,15 +592,11 @@ init_gpt_full_disk() # Remove any existing partitions delete_all_gpart "${_intDISK}" - #Erase any existing bootloader - echo_log "Cleaning up ${_intDISK}" - rc_halt "dd if=/dev/zero of=/dev/${_intDISK} count=2048" - sleep 2 echo_log "Running gpart on ${_intDISK}" rc_halt "gpart create -s GPT ${_intDISK}" - rc_halt "gpart add -b 34 -s 128 -t freebsd-boot ${_intDISK}" + rc_halt "gpart add -b 34 -s 64 -t freebsd-boot ${_intDISK}" echo_log "Stamping boot sector on ${_intDISK}" rc_halt "gpart bootcode -b /boot/pmbr ${_intDISK}" @@ -588,7 +609,7 @@ init_mbr_full_disk() _intDISK=$1 _intBOOT=$2 - startblock="63" + startblock="2016" # Set our sysctl so we can overwrite any geom using drives sysctl kern.geom.debugflags=16 >>${LOGOUT} 2>>${LOGOUT} @@ -599,10 +620,6 @@ init_mbr_full_disk() # Remove any existing partitions delete_all_gpart "${_intDISK}" - #Erase any existing bootloader - echo_log "Cleaning up ${_intDISK}" - rc_halt "dd if=/dev/zero of=/dev/${_intDISK} count=2048" - sleep 2 echo_log "Running gpart on ${_intDISK}" From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 19:57:19 2011 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 0AE4C1065672; Mon, 10 Jan 2011 19:57:19 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ED3BB8FC0A; Mon, 10 Jan 2011 19:57: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 p0AJvI75091708; Mon, 10 Jan 2011 19:57:18 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0AJvIqQ091704; Mon, 10 Jan 2011 19:57:18 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201101101957.p0AJvIqQ091704@svn.freebsd.org> From: Josh Paetzel Date: Mon, 10 Jan 2011 19:57: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: r217234 - in head/usr.sbin/pc-sysinstall: backend examples 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, 10 Jan 2011 19:57:19 -0000 Author: jpaetzel (ports committer) Date: Mon Jan 10 19:57:18 2011 New Revision: 217234 URL: http://svn.freebsd.org/changeset/base/217234 Log: Add support for using encrypted password strings when setting the root / user passwords PR: bin/152868 Submitted by: kmoore Approved by: imp Modified: head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh head/usr.sbin/pc-sysinstall/backend/functions-users.sh head/usr.sbin/pc-sysinstall/examples/README Modified: head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh Mon Jan 10 19:55:30 2011 (r217233) +++ head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh Mon Jan 10 19:57:18 2011 (r217234) @@ -371,19 +371,32 @@ setup_gjournal() # Function which sets the root password from the install config set_root_pw() { + # Get the plaintext string get_value_from_cfg_with_spaces rootPass - PW="${VAL}" + local PW="${VAL}" + + # Get the encrypted string + get_value_from_cfg_with_spaces rootEncPass + local ENCPW="${VAL}" # If we don't have a root pass, return - if [ -z "${PW}" ] - then - return 0 - fi + if [ -z "${PW}" -a -z "${ENCPW}" ] ; then return 0 ; fi echo_log "Setting root password" - echo "${PW}" > ${FSMNT}/.rootpw - run_chroot_cmd "cat /.rootpw | pw usermod root -h 0" - rc_halt "rm ${FSMNT}/.rootpw" + + # Check if setting plaintext password + if [ ! -z "${PW}" ] ; then + echo "${PW}" > ${FSMNT}/.rootpw + run_chroot_cmd "cat /.rootpw | pw usermod root -h 0" + rc_halt "rm ${FSMNT}/.rootpw" + fi + + # Check if setting encrypted password + if [ ! -z "${ENCPW}" ] ; then + echo "${ENCPW}" > ${FSMNT}/.rootpw + run_chroot_cmd "cat /.rootpw | pw usermod root -H 0" + rc_halt "rm ${FSMNT}/.rootpw" + fi }; Modified: head/usr.sbin/pc-sysinstall/backend/functions-users.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-users.sh Mon Jan 10 19:55:30 2011 (r217233) +++ head/usr.sbin/pc-sysinstall/backend/functions-users.sh Mon Jan 10 19:57:18 2011 (r217234) @@ -93,6 +93,13 @@ setup_users() USERPASS="$VAL" fi + echo $line | grep "^userEncPass=" >/dev/null 2>/dev/null + if [ "$?" = "0" ] + then + get_value_from_string "${line}" + USERENCPASS="$VAL" + fi + echo $line | grep "^userShell=" >/dev/null 2>/dev/null if [ "$?" = "0" ] then @@ -135,6 +142,10 @@ setup_users() then ARGS="${ARGS} -h 0" echo "${USERPASS}" >${FSMNT}/.tmpPass + elif [ ! -z "${USERENCPASS}" ] + then + ARGS="${ARGS} -H 0" + echo "${USERENCPASS}" >${FSMNT}/.tmpPass else ARGS="${ARGS} -h -" rm ${FSMNT}/.tmpPass 2>/dev/null 2>/dev/null @@ -160,7 +171,7 @@ setup_users() add_user "${ARGS}" # Unset our vars before looking for any more users - unset USERNAME USERCOMMENT USERPASS USERSHELL USERHOME USERGROUPS + unset USERNAME USERCOMMENT USERPASS USERENCPASS USERSHELL USERHOME USERGROUPS else exit_err "ERROR: commitUser was called without any userName= entry!!!" fi Modified: head/usr.sbin/pc-sysinstall/examples/README ============================================================================== --- head/usr.sbin/pc-sysinstall/examples/README Mon Jan 10 19:55:30 2011 (r217233) +++ head/usr.sbin/pc-sysinstall/examples/README Mon Jan 10 19:57:18 2011 (r217234) @@ -286,7 +286,11 @@ Options for setting up usernames and pas # rootPass=root -Set the root password of the installed system to the specified string +Set the root password of the installed system to the specified plaintext string + +# rootEncPass= + +Set the root password of the installed system to the specified encrypted string The below variables are used to setup a user on the installed system Be sure to call commitUser after after adding these values, and before @@ -295,6 +299,8 @@ starting another user block # userName=kris # userComment=Kris Moore # userPass=mypass +or +# userEncPass= # userShell=/bin/csh # userHome=/home/kris # userGroups=wheel,operator From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 20:03:25 2011 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 7DF09106566C; Mon, 10 Jan 2011 20:03:25 +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 51E2D8FC08; Mon, 10 Jan 2011 20:03:25 +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 0DE4D46B4C; Mon, 10 Jan 2011 15:03:25 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D9EEC8A01D; Mon, 10 Jan 2011 15:03:22 -0500 (EST) From: John Baldwin To: Doug Barton Date: Mon, 10 Jan 2011 14:33:18 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.4-CBSD-20110107; KDE/4.4.5; amd64; ; ) References: <201101092347.p09NlB4M060802@svn.freebsd.org> In-Reply-To: <201101092347.p09NlB4M060802@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201101101433.18847.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 10 Jan 2011 15:03:23 -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: r217213 - head/lib/bind 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, 10 Jan 2011 20:03:25 -0000 On Sunday, January 09, 2011 6:47:11 pm Doug Barton wrote: > Author: dougb > Date: Sun Jan 9 23:47:11 2011 > New Revision: 217213 > URL: http://svn.freebsd.org/changeset/base/217213 > > Log: > Revert part of r217071 so that us mere mortals can clearly see > what this bit of code is intended to do. :) > > Approved by: imp > > Modified: > head/lib/bind/config.mk > > Modified: head/lib/bind/config.mk > ============================================================================== > --- head/lib/bind/config.mk Sun Jan 9 23:46:24 2011 (r217212) > +++ head/lib/bind/config.mk Sun Jan 9 23:47:11 2011 (r217213) > @@ -65,7 +65,11 @@ CFLAGS+= -I${LIB_BIND_DIR} > .endif > > # Use the right version of the atomic.h file from lib/isc > -ISC_ATOMIC_ARCH=${MACHINE_CPUARCH:S/i386/x86_32/:S/amd64/x86_32/} > +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" This should use MACHINE_CPUARCH instead of MACHINE_ARCH? > +ISC_ATOMIC_ARCH= x86_32 > +.else > +ISC_ATOMIC_ARCH= ${MACHINE_CPUARCH} > +.endif > > # Optional features > .if ${MK_BIND_LARGE_FILE} == "yes" > -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 20:26:36 2011 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 BD70E106564A; Mon, 10 Jan 2011 20:26:36 +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 AC6D78FC1A; Mon, 10 Jan 2011 20:26: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 p0AKQa8M092463; Mon, 10 Jan 2011 20:26:36 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0AKQaqG092461; Mon, 10 Jan 2011 20:26:36 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201101102026.p0AKQaqG092461@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 10 Jan 2011 20:26: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: r217236 - head/sys/dev/acpica/Osd 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, 10 Jan 2011 20:26:36 -0000 Author: jkim Date: Mon Jan 10 20:26:36 2011 New Revision: 217236 URL: http://svn.freebsd.org/changeset/base/217236 Log: Prefer KASSERT(9) over panic(9) as it was never seen in reality. Modified: head/sys/dev/acpica/Osd/OsdSchedule.c Modified: head/sys/dev/acpica/Osd/OsdSchedule.c ============================================================================== --- head/sys/dev/acpica/Osd/OsdSchedule.c Mon Jan 10 19:59:20 2011 (r217235) +++ head/sys/dev/acpica/Osd/OsdSchedule.c Mon Jan 10 20:26:36 2011 (r217236) @@ -245,8 +245,7 @@ AcpiOsGetTimer(void) UINT64 t; /* XXX During early boot there is no (decent) timer available yet. */ - if (cold) - panic("acpi: timer op not yet supported during boot"); + KASSERT(cold == 0, ("acpi: timer op not yet supported during boot")); binuptime(&bt); t = ((UINT64)10000000 * (uint32_t)(bt.frac >> 32)) >> 32; From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 20:48:11 2011 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 564E9106564A; Mon, 10 Jan 2011 20:48:11 +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 45BEB8FC22; Mon, 10 Jan 2011 20:48: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 p0AKmBkH093020; Mon, 10 Jan 2011 20:48:11 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0AKmB9r093018; Mon, 10 Jan 2011 20:48:11 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201101102048.p0AKmB9r093018@svn.freebsd.org> From: John Baldwin Date: Mon, 10 Jan 2011 20:48: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: r217237 - 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, 10 Jan 2011 20:48:11 -0000 Author: jhb Date: Mon Jan 10 20:48:10 2011 New Revision: 217237 URL: http://svn.freebsd.org/changeset/base/217237 Log: Fix two harmless off-by-one errors. Reviewed by: jeff MFC after: 2 weeks Modified: head/sys/kern/sched_ule.c Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Mon Jan 10 20:26:36 2011 (r217236) +++ head/sys/kern/sched_ule.c Mon Jan 10 20:48:10 2011 (r217237) @@ -149,7 +149,7 @@ static struct td_sched td_sched0; #define SCHED_PRI_NHALF (SCHED_PRI_NRESV / 2) #define SCHED_PRI_MIN (PRI_MIN_TIMESHARE + SCHED_PRI_NHALF) #define SCHED_PRI_MAX (PRI_MAX_TIMESHARE - SCHED_PRI_NHALF) -#define SCHED_PRI_RANGE (SCHED_PRI_MAX - SCHED_PRI_MIN) +#define SCHED_PRI_RANGE (SCHED_PRI_MAX - SCHED_PRI_MIN + 1) #define SCHED_PRI_TICKS(ts) \ (SCHED_TICK_HZ((ts)) / \ (roundup(SCHED_TICK_TOTAL((ts)), SCHED_PRI_RANGE) / SCHED_PRI_RANGE)) @@ -1406,8 +1406,8 @@ sched_priority(struct thread *td) score = imax(0, sched_interact_score(td) + td->td_proc->p_nice); if (score < sched_interact) { pri = PRI_MIN_REALTIME; - pri += ((PRI_MAX_REALTIME - PRI_MIN_REALTIME) / sched_interact) - * score; + pri += ((PRI_MAX_REALTIME - PRI_MIN_REALTIME + 1) / + sched_interact) * score; KASSERT(pri >= PRI_MIN_REALTIME && pri <= PRI_MAX_REALTIME, ("sched_priority: invalid interactive priority %d score %d", pri, score)); From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 20:56:59 2011 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 7CFDC106566B; Mon, 10 Jan 2011 20:56:59 +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 6AF808FC14; Mon, 10 Jan 2011 20:56: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 p0AKuxL5093233; Mon, 10 Jan 2011 20:56:59 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0AKuxqd093230; Mon, 10 Jan 2011 20:56:59 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201101102056.p0AKuxqd093230@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 10 Jan 2011 20:56: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: r217238 - in head/sys/dev/acpica: . Osd 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, 10 Jan 2011 20:56:59 -0000 Author: jkim Date: Mon Jan 10 20:56:59 2011 New Revision: 217238 URL: http://svn.freebsd.org/changeset/base/217238 Log: Allow AcpiOsInstallInterruptHandler() and AcpiOsRemoveInterruptHandler() to install or remove non-SCI interrupt handlers per ACPI Component Architecture User Guide and Programmer Reference. ACPICA may install such interrupt handler when a GPE block device is found, for example. Add a wrapper for ACPI_OSD_HANDLER, convert its return values to ours, and make it a filter. Prefer KASSERT(9) over panic(9) as we have never seen those in reality. Clean up some style(9) nits and add my copyright. Modified: head/sys/dev/acpica/Osd/OsdInterrupt.c head/sys/dev/acpica/acpivar.h Modified: head/sys/dev/acpica/Osd/OsdInterrupt.c ============================================================================== --- head/sys/dev/acpica/Osd/OsdInterrupt.c Mon Jan 10 20:48:10 2011 (r217237) +++ head/sys/dev/acpica/Osd/OsdInterrupt.c Mon Jan 10 20:56:59 2011 (r217238) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2000 Michael Smith * Copyright (c) 2000 BSDi + * Copyright (c) 2011 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,10 +36,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include #include #include #include - + #include #include @@ -47,101 +51,166 @@ __FBSDID("$FreeBSD$"); #define _COMPONENT ACPI_OS_SERVICES ACPI_MODULE_NAME("INTERRUPT") -static UINT32 InterruptOverride = 0; +MALLOC_DEFINE(M_ACPIINTR, "acpiintr", "ACPI interrupt"); -ACPI_STATUS -AcpiOsInstallInterruptHandler(UINT32 InterruptNumber, - ACPI_OSD_HANDLER ServiceRoutine, void *Context) -{ - struct acpi_softc *sc; +struct acpi_intr { + SLIST_ENTRY(acpi_intr) ai_link; + struct resource *ai_irq; + int ai_rid; + void *ai_handle; + int ai_number; + ACPI_OSD_HANDLER ai_handler; + void *ai_context; +}; +static SLIST_HEAD(, acpi_intr) acpi_intr_list = + SLIST_HEAD_INITIALIZER(acpi_intr_list); +static struct mtx acpi_intr_lock; - ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); +static UINT32 InterruptOverride; - if ((sc = devclass_get_softc(devclass_find("acpi"), 0)) == NULL) - panic("can't find ACPI device to register interrupt"); - if (sc->acpi_dev == NULL) - panic("acpi softc has invalid device"); - - if (InterruptNumber < 0 || InterruptNumber > 255) - return_ACPI_STATUS (AE_BAD_PARAMETER); - if (ServiceRoutine == NULL) - return_ACPI_STATUS (AE_BAD_PARAMETER); - - /* - * If the MADT contained an interrupt override directive for the SCI, - * we use that value instead of the one from the FADT. - */ - if (InterruptOverride != 0) { - device_printf(sc->acpi_dev, - "Overriding SCI Interrupt from IRQ %u to IRQ %u\n", - InterruptNumber, InterruptOverride); - InterruptNumber = InterruptOverride; - } - - /* Set up the interrupt resource. */ - sc->acpi_irq_rid = 0; - bus_set_resource(sc->acpi_dev, SYS_RES_IRQ, 0, InterruptNumber, 1); - sc->acpi_irq = bus_alloc_resource_any(sc->acpi_dev, SYS_RES_IRQ, - &sc->acpi_irq_rid, RF_SHAREABLE | RF_ACTIVE); - if (sc->acpi_irq == NULL) { - device_printf(sc->acpi_dev, "could not allocate interrupt\n"); - goto error; - } - if (bus_setup_intr(sc->acpi_dev, sc->acpi_irq, INTR_TYPE_MISC|INTR_MPSAFE, - NULL, (driver_intr_t *)ServiceRoutine, Context, &sc->acpi_irq_handle)) { - device_printf(sc->acpi_dev, "could not set up interrupt\n"); - goto error; - } +static void +acpi_intr_init(struct mtx *lock) +{ - return_ACPI_STATUS (AE_OK); + mtx_init(lock, "ACPI interrupt lock", NULL, MTX_DEF); +} -error: - if (sc->acpi_irq_handle) - bus_teardown_intr(sc->acpi_dev, sc->acpi_irq, sc->acpi_irq_handle); - sc->acpi_irq_handle = NULL; - if (sc->acpi_irq) - bus_release_resource(sc->acpi_dev, SYS_RES_IRQ, 0, sc->acpi_irq); - sc->acpi_irq = NULL; - bus_delete_resource(sc->acpi_dev, SYS_RES_IRQ, 0); +SYSINIT(acpi_intr, SI_SUB_DRIVERS, SI_ORDER_FIRST, acpi_intr_init, + &acpi_intr_lock); + +static int +acpi_intr_handler(void *arg) +{ + struct acpi_intr *ai; - return_ACPI_STATUS (AE_ALREADY_EXISTS); + ai = arg; + KASSERT(ai != NULL && ai->ai_handler != NULL, + ("invalid ACPI interrupt handler")); + if (ai->ai_handler(ai->ai_context) == ACPI_INTERRUPT_HANDLED) + return (FILTER_HANDLED); + return (FILTER_STRAY); } ACPI_STATUS -AcpiOsRemoveInterruptHandler(UINT32 InterruptNumber, ACPI_OSD_HANDLER ServiceRoutine) +AcpiOsInstallInterruptHandler(UINT32 InterruptNumber, + ACPI_OSD_HANDLER ServiceRoutine, void *Context) { - struct acpi_softc *sc; - - ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + struct acpi_softc *sc; + struct acpi_intr *ai, *ap; - if (InterruptNumber < 0 || InterruptNumber > 255) - return_ACPI_STATUS (AE_BAD_PARAMETER); - if (ServiceRoutine == NULL) - return_ACPI_STATUS (AE_BAD_PARAMETER); + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); - if ((sc = devclass_get_softc(devclass_find("acpi"), 0)) == NULL) - panic("can't find ACPI device to deregister interrupt"); + sc = devclass_get_softc(devclass_find("acpi"), 0); + KASSERT(sc != NULL && sc->acpi_dev != NULL, + ("can't find ACPI device to register interrupt")); + + if (InterruptNumber < 0 || InterruptNumber > 255 || + ServiceRoutine == NULL) + return_ACPI_STATUS (AE_BAD_PARAMETER); + + ai = malloc(sizeof(*ai), M_ACPIINTR, M_WAITOK | M_ZERO); + mtx_lock(&acpi_intr_lock); + SLIST_FOREACH(ap, &acpi_intr_list, ai_link) { + if (InterruptNumber == ap->ai_number || + (InterruptNumber == InterruptOverride && + InterruptNumber != AcpiGbl_FADT.SciInterrupt)) { + mtx_unlock(&acpi_intr_lock); + return_ACPI_STATUS (AE_ALREADY_EXISTS); + } + if (ai->ai_rid <= ap->ai_rid) + ai->ai_rid = ap->ai_rid + 1; + } + ai->ai_number = InterruptNumber; + ai->ai_handler = ServiceRoutine; + ai->ai_context = Context; + + /* + * If the MADT contained an interrupt override directive for the SCI, + * we use that value instead of the one from the FADT. + */ + if (InterruptOverride != 0 && + InterruptNumber == AcpiGbl_FADT.SciInterrupt) { + device_printf(sc->acpi_dev, + "Overriding SCI from IRQ %u to IRQ %u\n", + InterruptNumber, InterruptOverride); + InterruptNumber = InterruptOverride; + } + + /* Set up the interrupt resource. */ + bus_set_resource(sc->acpi_dev, SYS_RES_IRQ, ai->ai_rid, + InterruptNumber, 1); + ai->ai_irq = bus_alloc_resource_any(sc->acpi_dev, SYS_RES_IRQ, + &ai->ai_rid, RF_SHAREABLE | RF_ACTIVE); + if (ai->ai_irq == NULL) { + device_printf(sc->acpi_dev, "could not allocate interrupt\n"); + goto error; + } + if (bus_setup_intr(sc->acpi_dev, ai->ai_irq, + INTR_TYPE_MISC | INTR_MPSAFE, acpi_intr_handler, NULL, ai, + &ai->ai_handle) != 0) { + device_printf(sc->acpi_dev, "could not set up interrupt\n"); + goto error; + } + SLIST_INSERT_HEAD(&acpi_intr_list, ai, ai_link); + mtx_unlock(&acpi_intr_lock); + return_ACPI_STATUS (AE_OK); - if (sc->acpi_irq == NULL) - return_ACPI_STATUS (AE_NOT_EXIST); +error: + mtx_unlock(&acpi_intr_lock); + if (ai->ai_handle != NULL) + bus_teardown_intr(sc->acpi_dev, ai->ai_irq, ai->ai_handle); + if (ai->ai_irq != NULL) + bus_release_resource(sc->acpi_dev, SYS_RES_IRQ, ai->ai_rid, + ai->ai_irq); + bus_delete_resource(sc->acpi_dev, SYS_RES_IRQ, ai->ai_rid); + free(ai, M_ACPIINTR); + return_ACPI_STATUS (AE_ALREADY_EXISTS); +} - bus_teardown_intr(sc->acpi_dev, sc->acpi_irq, sc->acpi_irq_handle); - bus_release_resource(sc->acpi_dev, SYS_RES_IRQ, 0, sc->acpi_irq); - bus_delete_resource(sc->acpi_dev, SYS_RES_IRQ, 0); +ACPI_STATUS +AcpiOsRemoveInterruptHandler(UINT32 InterruptNumber, + ACPI_OSD_HANDLER ServiceRoutine) +{ + struct acpi_softc *sc; + struct acpi_intr *ai; - sc->acpi_irq = NULL; + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); - return_ACPI_STATUS (AE_OK); + sc = devclass_get_softc(devclass_find("acpi"), 0); + KASSERT(sc != NULL && sc->acpi_dev != NULL, + ("can't find ACPI device to deregister interrupt")); + + if (InterruptNumber < 0 || InterruptNumber > 255 || + ServiceRoutine == NULL) + return_ACPI_STATUS (AE_BAD_PARAMETER); + mtx_lock(&acpi_intr_lock); + SLIST_FOREACH(ai, &acpi_intr_list, ai_link) + if (InterruptNumber == ai->ai_number) { + if (ServiceRoutine != ai->ai_handler) { + mtx_unlock(&acpi_intr_lock); + return_ACPI_STATUS (AE_BAD_PARAMETER); + } + SLIST_REMOVE(&acpi_intr_list, ai, acpi_intr, ai_link); + break; + } + mtx_unlock(&acpi_intr_lock); + if (ai == NULL) + return_ACPI_STATUS (AE_NOT_EXIST); + bus_teardown_intr(sc->acpi_dev, ai->ai_irq, ai->ai_handle); + bus_release_resource(sc->acpi_dev, SYS_RES_IRQ, ai->ai_rid, ai->ai_irq); + bus_delete_resource(sc->acpi_dev, SYS_RES_IRQ, ai->ai_rid); + free(ai, M_ACPIINTR); + return_ACPI_STATUS (AE_OK); } ACPI_STATUS acpi_OverrideInterruptLevel(UINT32 InterruptNumber) { - ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); - if (InterruptOverride != 0) - return_ACPI_STATUS (AE_ALREADY_EXISTS); - InterruptOverride = InterruptNumber; - return_ACPI_STATUS (AE_OK); + if (InterruptOverride != 0) + return_ACPI_STATUS (AE_ALREADY_EXISTS); + InterruptOverride = InterruptNumber; + return_ACPI_STATUS (AE_OK); } Modified: head/sys/dev/acpica/acpivar.h ============================================================================== --- head/sys/dev/acpica/acpivar.h Mon Jan 10 20:48:10 2011 (r217237) +++ head/sys/dev/acpica/acpivar.h Mon Jan 10 20:56:59 2011 (r217238) @@ -51,10 +51,6 @@ struct acpi_softc { device_t acpi_dev; struct cdev *acpi_dev_t; - struct resource *acpi_irq; - int acpi_irq_rid; - void *acpi_irq_handle; - int acpi_enabled; int acpi_sstate; int acpi_sleep_disabled; From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 20:59:20 2011 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 42E781065672; Mon, 10 Jan 2011 20:59: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 328758FC08; Mon, 10 Jan 2011 20:59: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 p0AKxKau093311; Mon, 10 Jan 2011 20:59:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0AKxKK3093309; Mon, 10 Jan 2011 20:59:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201101102059.p0AKxKK3093309@svn.freebsd.org> From: John Baldwin Date: Mon, 10 Jan 2011 20:59: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: r217239 - head/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, 10 Jan 2011 20:59:20 -0000 Author: jhb Date: Mon Jan 10 20:59:19 2011 New Revision: 217239 URL: http://svn.freebsd.org/changeset/base/217239 Log: Add a nested include of to make the sysctl(9) manpage accurate. is one of the very few headers similar to for which nested includes is allowed. PR: docs/153654 Reviewed by: bde MFC after: 1 month Modified: head/sys/sys/sysctl.h Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Mon Jan 10 20:56:59 2011 (r217238) +++ head/sys/sys/sysctl.h Mon Jan 10 20:59:19 2011 (r217239) @@ -115,6 +115,8 @@ struct ctlname { #define CTL_AUTO_START 0x100 #ifdef _KERNEL +#include + #define SYSCTL_HANDLER_ARGS struct sysctl_oid *oidp, void *arg1, int arg2, \ struct sysctl_req *req From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 21:01:41 2011 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 7EEDE106566B; Mon, 10 Jan 2011 21:01:41 +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 6E3458FC15; Mon, 10 Jan 2011 21: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 p0AL1fja093422; Mon, 10 Jan 2011 21:01:41 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0AL1fw9093420; Mon, 10 Jan 2011 21:01:41 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201101102101.p0AL1fw9093420@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 10 Jan 2011 21: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: r217240 - head/sys/dev/acpica/Osd 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, 10 Jan 2011 21:01:41 -0000 Author: jkim Date: Mon Jan 10 21:01:41 2011 New Revision: 217240 URL: http://svn.freebsd.org/changeset/base/217240 Log: Add forgotten free(9) in the previous commit for an error case. Modified: head/sys/dev/acpica/Osd/OsdInterrupt.c Modified: head/sys/dev/acpica/Osd/OsdInterrupt.c ============================================================================== --- head/sys/dev/acpica/Osd/OsdInterrupt.c Mon Jan 10 20:59:19 2011 (r217239) +++ head/sys/dev/acpica/Osd/OsdInterrupt.c Mon Jan 10 21:01:41 2011 (r217240) @@ -115,6 +115,7 @@ AcpiOsInstallInterruptHandler(UINT32 Int (InterruptNumber == InterruptOverride && InterruptNumber != AcpiGbl_FADT.SciInterrupt)) { mtx_unlock(&acpi_intr_lock); + free(ai, M_ACPIINTR); return_ACPI_STATUS (AE_ALREADY_EXISTS); } if (ai->ai_rid <= ap->ai_rid) From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 21:09:38 2011 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 90106106566B; Mon, 10 Jan 2011 21:09:38 +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 7F5BF8FC12; Mon, 10 Jan 2011 21:09: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 p0AL9csI093645; Mon, 10 Jan 2011 21:09:38 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0AL9cn4093643; Mon, 10 Jan 2011 21:09:38 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201101102109.p0AL9cn4093643@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 10 Jan 2011 21:09: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: r217241 - head/sys/dev/acpica/Osd 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, 10 Jan 2011 21:09:38 -0000 Author: jkim Date: Mon Jan 10 21:09:38 2011 New Revision: 217241 URL: http://svn.freebsd.org/changeset/base/217241 Log: Remove impossible error conditions. Modified: head/sys/dev/acpica/Osd/OsdInterrupt.c Modified: head/sys/dev/acpica/Osd/OsdInterrupt.c ============================================================================== --- head/sys/dev/acpica/Osd/OsdInterrupt.c Mon Jan 10 21:01:41 2011 (r217240) +++ head/sys/dev/acpica/Osd/OsdInterrupt.c Mon Jan 10 21:09:38 2011 (r217241) @@ -104,8 +104,7 @@ AcpiOsInstallInterruptHandler(UINT32 Int KASSERT(sc != NULL && sc->acpi_dev != NULL, ("can't find ACPI device to register interrupt")); - if (InterruptNumber < 0 || InterruptNumber > 255 || - ServiceRoutine == NULL) + if (InterruptNumber > 255 || ServiceRoutine == NULL) return_ACPI_STATUS (AE_BAD_PARAMETER); ai = malloc(sizeof(*ai), M_ACPIINTR, M_WAITOK | M_ZERO); @@ -181,8 +180,7 @@ AcpiOsRemoveInterruptHandler(UINT32 Inte KASSERT(sc != NULL && sc->acpi_dev != NULL, ("can't find ACPI device to deregister interrupt")); - if (InterruptNumber < 0 || InterruptNumber > 255 || - ServiceRoutine == NULL) + if (InterruptNumber > 255 || ServiceRoutine == NULL) return_ACPI_STATUS (AE_BAD_PARAMETER); mtx_lock(&acpi_intr_lock); SLIST_FOREACH(ai, &acpi_intr_list, ai_link) From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 21:19:15 2011 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 BC94810656A4; Mon, 10 Jan 2011 21:19:15 +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 7C57A8FC26; Mon, 10 Jan 2011 21:19:15 +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 p0ALDFS2000421; Mon, 10 Jan 2011 14:13:15 -0700 (MST) (envelope-from imp@bsdimp.com) Message-ID: <4D2B7669.5030601@bsdimp.com> Date: Mon, 10 Jan 2011 14:13:13 -0700 From: Warner Losh User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Thunderbird/3.1.6 MIME-Version: 1.0 To: John Baldwin References: <201101092347.p09NlB4M060802@svn.freebsd.org> <201101101433.18847.jhb@freebsd.org> In-Reply-To: <201101101433.18847.jhb@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Doug Barton , src-committers@FreeBSD.org Subject: Re: svn commit: r217213 - head/lib/bind 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, 10 Jan 2011 21:19:15 -0000 On 01/10/2011 12:33, John Baldwin wrote: > On Sunday, January 09, 2011 6:47:11 pm Doug Barton wrote: >> Author: dougb >> Date: Sun Jan 9 23:47:11 2011 >> New Revision: 217213 >> URL: http://svn.freebsd.org/changeset/base/217213 >> >> Log: >> Revert part of r217071 so that us mere mortals can clearly see >> what this bit of code is intended to do. :) >> >> Approved by: imp >> >> Modified: >> head/lib/bind/config.mk >> >> Modified: head/lib/bind/config.mk >> > ============================================================================== >> --- head/lib/bind/config.mk Sun Jan 9 23:46:24 2011 (r217212) >> +++ head/lib/bind/config.mk Sun Jan 9 23:47:11 2011 (r217213) >> @@ -65,7 +65,11 @@ CFLAGS+= -I${LIB_BIND_DIR} >> .endif >> >> # Use the right version of the atomic.h file from lib/isc >> -ISC_ATOMIC_ARCH=${MACHINE_CPUARCH:S/i386/x86_32/:S/amd64/x86_32/} >> +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" > This should use MACHINE_CPUARCH instead of MACHINE_ARCH? To be pedantically correct, yes. Practically, it currently makes no difference. Warner From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 21:35:10 2011 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 9DE52106566C; Mon, 10 Jan 2011 21:35:10 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CBA98FC17; Mon, 10 Jan 2011 21:35: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 p0ALZAkA095084; Mon, 10 Jan 2011 21:35:10 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0ALZAhV095080; Mon, 10 Jan 2011 21:35:10 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201101102135.p0ALZAhV095080@svn.freebsd.org> From: Rick Macklem Date: Mon, 10 Jan 2011 21:35: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: r217242 - head/sys/rpc 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, 10 Jan 2011 21:35:10 -0000 Author: rmacklem Date: Mon Jan 10 21:35:10 2011 New Revision: 217242 URL: http://svn.freebsd.org/changeset/base/217242 Log: Fix a bug in the client side krpc where it was, sometimes erroneously, assumed that 4 bytes of data were in the first mbuf of a list by replacing the bcopy() with m_copydata(). Also, replace the uses of m_pullup(), which can fail for reasons other than not enough data, with m_copydata(). For the cases where it isn't known that there is enough data in the mbuf list, check first via m_len and m_length(). This is believed to fix a problem reported by dpd at dpdtech.com and george+freebsd at m5p.com. Reviewed by: jhb MFC after: 8 days Modified: head/sys/rpc/clnt_dg.c head/sys/rpc/clnt_vc.c head/sys/rpc/svc_vc.c Modified: head/sys/rpc/clnt_dg.c ============================================================================== --- head/sys/rpc/clnt_dg.c Mon Jan 10 21:09:38 2011 (r217241) +++ head/sys/rpc/clnt_dg.c Mon Jan 10 21:35:10 2011 (r217242) @@ -1089,15 +1089,14 @@ clnt_dg_soupcall(struct socket *so, void /* * The XID is in the first uint32_t of the reply. */ - if (m->m_len < sizeof(xid)) - m = m_pullup(m, sizeof(xid)); - if (!m) + if (m->m_len < sizeof(xid) && m_length(m, NULL) < sizeof(xid)) /* * Should never happen. */ continue; - xid = ntohl(*mtod(m, uint32_t *)); + m_copydata(m, 0, sizeof(xid), (char *)&xid); + xid = ntohl(xid); /* * Attempt to match this reply with a pending request. Modified: head/sys/rpc/clnt_vc.c ============================================================================== --- head/sys/rpc/clnt_vc.c Mon Jan 10 21:09:38 2011 (r217241) +++ head/sys/rpc/clnt_vc.c Mon Jan 10 21:35:10 2011 (r217242) @@ -916,7 +916,7 @@ clnt_vc_soupcall(struct socket *so, void mtx_unlock(&ct->ct_lock); break; } - bcopy(mtod(m, uint32_t *), &header, sizeof(uint32_t)); + m_copydata(m, 0, sizeof(uint32_t), (char *)&header); header = ntohl(header); ct->ct_record = NULL; ct->ct_record_resid = header & 0x7fffffff; @@ -975,14 +975,11 @@ clnt_vc_soupcall(struct socket *so, void * The XID is in the first uint32_t of * the reply. */ - if (ct->ct_record->m_len < sizeof(xid)) - ct->ct_record = - m_pullup(ct->ct_record, - sizeof(xid)); - if (!ct->ct_record) + if (ct->ct_record->m_len < sizeof(xid) && + m_length(ct->ct_record, NULL) < sizeof(xid)) break; - bcopy(mtod(ct->ct_record, uint32_t *), - &xid, sizeof(uint32_t)); + m_copydata(ct->ct_record, 0, sizeof(xid), + (char *)&xid); xid = ntohl(xid); mtx_lock(&ct->ct_lock); Modified: head/sys/rpc/svc_vc.c ============================================================================== --- head/sys/rpc/svc_vc.c Mon Jan 10 21:09:38 2011 (r217241) +++ head/sys/rpc/svc_vc.c Mon Jan 10 21:35:10 2011 (r217242) @@ -559,11 +559,8 @@ svc_vc_recv(SVCXPRT *xprt, struct rpc_ms } if (n < sizeof(uint32_t)) goto readmore; - if (cd->mpending->m_len < sizeof(uint32_t)) - cd->mpending = m_pullup(cd->mpending, - sizeof(uint32_t)); - memcpy(&header, mtod(cd->mpending, uint32_t *), - sizeof(header)); + m_copydata(cd->mpending, 0, sizeof(header), + (char *)&header); header = ntohl(header); cd->eor = (header & 0x80000000) != 0; cd->resid = header & 0x7fffffff; From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 22:10:12 2011 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 1165B106566C; Mon, 10 Jan 2011 22:10:12 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id A07998FC12; Mon, 10 Jan 2011 22:10:11 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id DF02345B36; Mon, 10 Jan 2011 23:10:09 +0100 (CET) Received: from localhost (89-73-192-49.dynamic.chello.pl [89.73.192.49]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 9DEA445CA6; Mon, 10 Jan 2011 23:10:04 +0100 (CET) Date: Mon, 10 Jan 2011 23:09:57 +0100 From: Pawel Jakub Dawidek To: Josh Paetzel Message-ID: <20110110220957.GB1923@garage.freebsd.pl> References: <201101101911.p0AJBQKG090310@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CUfgB8w4ZwR/yMy5" Content-Disposition: inline In-Reply-To: <201101101911.p0AJBQKG090310@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=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r217229 - head/usr.sbin/pc-sysinstall/backend 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, 10 Jan 2011 22:10:12 -0000 --CUfgB8w4ZwR/yMy5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 10, 2011 at 07:11:26PM +0000, Josh Paetzel wrote: [...] > while read line > do > # Check for data on this slice > - echo $line | grep "^${DISKTAG}-part=3D" >/dev/null 2>/dev/null > + echo $line | grep "^${_dTag}-part=3D" >/dev/null 2>/dev/null You can just use 'grep -q' instead of redirecting grep's output to /dev/null. > if [ "$?" =3D "0" ] This will work, but more elegant way is [ $? -eq 0 ] - there is no need to convert exit code to string. > + FOUNDROOT=3D"1" ; export FOUNDROOT 'export FOUNDROOT=3D"1"' should work too. > + if [ "${FS}" !=3D "UFS" -a "${FS}" !=3D "UFS+S" -a "${FS}" !=3D = "UFS+J" -a "${FS}" !=3D "UFS+SUJ" ] ; then Something like this should work too: if [ "${FS%+*}" !=3D "UFS" ]; then > + dd if=3D/dev/zero of=3D${_pDisk}p${CURPART} count=3D2048 >/dev/n= ull 2>/dev/null If you specify 'of=3D' there is no need to redirect standard output to /dev/null, as it is already redirected somewhere else. > + if [ ! -z "${ENCPASS}" ] ; then '[ ! -z "{str}" ]' is equivalent of '[ -n "${str}" ]'. > + CURPART=3D"`expr ${CURPART} + 1`" Simpler: CURPART=3D$((CURPART+1)) > + if [ "$?" !=3D "0" ] ; then return ; fi [ $? -eq 0 ] || return > - rc_halt "gpart add -b 34 -s 128 -t freebsd-boot ${_intDISK}" > + rc_halt "gpart add -b 34 -s 64 -t freebsd-boot ${_intDISK}" Gptzfsboot in HEAD is 27463 bytes. Gptzfsboot in ZFSv28 is 29659, so using 64 sectors leaves only 3109 bytes for it to grow. Note that, eg. RAIDZ3 support is not yet implemented and I expect it might be not be enough place left to implement it if you do that. PS. Only because those are shell scripts doesn't mean style is not important. They could really be easier to read if they follow style used in rcNG. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --CUfgB8w4ZwR/yMy5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk0rg7UACgkQForvXbEpPzQAOgCgxqx2Mbs+nkaEdtO/vNLOhMAJ WZ0AmwTKQ0JCHWwhA8Mb+glo9u3X053x =Ikjz -----END PGP SIGNATURE----- --CUfgB8w4ZwR/yMy5-- From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 22:14:08 2011 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 BBCDD106566C; Mon, 10 Jan 2011 22:14:08 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB0C28FC15; Mon, 10 Jan 2011 22:14: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 p0AME8q9096972; Mon, 10 Jan 2011 22:14:08 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0AME83Y096970; Mon, 10 Jan 2011 22:14:08 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201101102214.p0AME83Y096970@svn.freebsd.org> From: Juli Mallett Date: Mon, 10 Jan 2011 22:14: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: r217243 - head/sys/mips/cavium 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, 10 Jan 2011 22:14:08 -0000 Author: jmallett Date: Mon Jan 10 22:14:08 2011 New Revision: 217243 URL: http://svn.freebsd.org/changeset/base/217243 Log: Shorten device name so it fits into vmstat -i. Modified: head/sys/mips/cavium/octeon_wdog.c Modified: head/sys/mips/cavium/octeon_wdog.c ============================================================================== --- head/sys/mips/cavium/octeon_wdog.c Mon Jan 10 21:35:10 2011 (r217242) +++ head/sys/mips/cavium/octeon_wdog.c Mon Jan 10 22:14:08 2011 (r217243) @@ -254,7 +254,7 @@ static void octeon_wdog_identify(driver_t *drv, device_t parent) { - BUS_ADD_CHILD(parent, 0, "octeon_wdog", 0); + BUS_ADD_CHILD(parent, 0, "owdog", 0); } static device_method_t octeon_wdog_methods[] = { @@ -266,10 +266,10 @@ static device_method_t octeon_wdog_metho }; static driver_t octeon_wdog_driver = { - "octeon_wdog", + "owdog", octeon_wdog_methods, sizeof(struct octeon_wdog_softc), }; static devclass_t octeon_wdog_devclass; -DRIVER_MODULE(octeon_wdog, ciu, octeon_wdog_driver, octeon_wdog_devclass, 0, 0); +DRIVER_MODULE(owdog, ciu, octeon_wdog_driver, octeon_wdog_devclass, 0, 0); From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 22:14:31 2011 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 1443C10657AF; Mon, 10 Jan 2011 22:14:31 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 034B78FC15; Mon, 10 Jan 2011 22:14:31 +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 p0AMEUpw097020; Mon, 10 Jan 2011 22:14:30 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0AMEUKs097017; Mon, 10 Jan 2011 22:14:30 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201101102214.p0AMEUKs097017@svn.freebsd.org> From: Juli Mallett Date: Mon, 10 Jan 2011 22:14:30 +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: r217244 - in head/sys/mips/cavium: . octe 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, 10 Jan 2011 22:14:31 -0000 Author: jmallett Date: Mon Jan 10 22:14:30 2011 New Revision: 217244 URL: http://svn.freebsd.org/changeset/base/217244 Log: Count output bytes and packets. Modified: head/sys/mips/cavium/if_octm.c head/sys/mips/cavium/octe/ethernet-tx.c Modified: head/sys/mips/cavium/if_octm.c ============================================================================== --- head/sys/mips/cavium/if_octm.c Mon Jan 10 22:14:08 2011 (r217243) +++ head/sys/mips/cavium/if_octm.c Mon Jan 10 22:14:30 2011 (r217244) @@ -333,9 +333,12 @@ octm_transmit(struct ifnet *ifp, struct result = cvmx_mgmt_port_sendm(sc->sc_port, m); - if (result == CVMX_MGMT_PORT_SUCCESS) + if (result == CVMX_MGMT_PORT_SUCCESS) { ETHER_BPF_MTAP(ifp, m); - else + + ifp->if_opackets++; + ifp->if_obytes += m->m_pkthdr.len; + } else ifp->if_oerrors++; m_freem(m); Modified: head/sys/mips/cavium/octe/ethernet-tx.c ============================================================================== --- head/sys/mips/cavium/octe/ethernet-tx.c Mon Jan 10 22:14:08 2011 (r217243) +++ head/sys/mips/cavium/octe/ethernet-tx.c Mon Jan 10 22:14:30 2011 (r217244) @@ -247,6 +247,9 @@ int cvm_oct_xmit(struct mbuf *m, struct /* Pass it to any BPF listeners. */ ETHER_BPF_MTAP(ifp, m); + + ifp->if_opackets++; + ifp->if_obytes += m->m_pkthdr.len; } /* Free mbufs not in use by the hardware */ From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 22:22:53 2011 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 EEEF6106566B; Mon, 10 Jan 2011 22:22:53 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 751468FC18; Mon, 10 Jan 2011 22:22:53 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aq8FABMOK02DaFvO/2dsb2JhbACECJIzjwOtTY4GgSGDN3QEhGeGIw X-IronPort-AV: E=Sophos;i="4.60,303,1291611600"; d="scan'208";a="104876587" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 10 Jan 2011 16:53:26 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 62E7BB3FBA; Mon, 10 Jan 2011 16:53:26 -0500 (EST) Date: Mon, 10 Jan 2011 16:53:26 -0500 (EST) From: Rick Macklem To: john.gemignani@isilon.com Message-ID: <569448948.110324.1294696406344.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <201101102135.p0ALZAhV095080@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.202] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE8 (Win)/6.0.10_GA_2692) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r217242 - head/sys/rpc 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, 10 Jan 2011 22:22:54 -0000 ----- Original Message ----- > Author: rmacklem > Date: Mon Jan 10 21:35:10 2011 > New Revision: 217242 > URL: http://svn.freebsd.org/changeset/base/217242 > > Log: > Fix a bug in the client side krpc where it was, sometimes > erroneously, assumed that 4 bytes of data were in the first > mbuf of a list by replacing the bcopy() with m_copydata(). > Also, replace the uses of m_pullup(), which can fail for > reasons other than not enough data, with m_copydata(). > For the cases where it isn't known that there is enough > data in the mbuf list, check first via m_len and m_length(). > This is believed to fix a problem reported by dpd at dpdtech.com > and george+freebsd at m5p.com. > > Reviewed by: jhb > MFC after: 8 days > Oops, I forgot to mention that john.gemignani at isilon.com spotted and reported this bug via email. Thanks go to him for that. rick From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 22:27:52 2011 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 C4E261065679; Mon, 10 Jan 2011 22:27:52 +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 B47A58FC15; Mon, 10 Jan 2011 22:27: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 p0AMRqSk097436; Mon, 10 Jan 2011 22:27:52 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0AMRqKc097434; Mon, 10 Jan 2011 22:27:52 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201101102227.p0AMRqKc097434@svn.freebsd.org> From: Alexander Motin Date: Mon, 10 Jan 2011 22:27: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: r217245 - head/sys/dev/ahci 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, 10 Jan 2011 22:27:52 -0000 Author: mav Date: Mon Jan 10 22:27:52 2011 New Revision: 217245 URL: http://svn.freebsd.org/changeset/base/217245 Log: Add IDs for HighPoint RocketRAID 64x controllers. These controllers consist of two Marvell 88SE9128 6Gbps SATA chips and PLX PCIe bridge. As result, they seem to be agree to work with ahci(4) as usual HBAs. The only noticed issue is that RAID BIOS disables all drive caches during boot, though `camcontrol cmd ...` is able to fix that. Those who wants RAID functionality can still use closed proprietary driver from HighPoint site. MFC after: 1 week Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Mon Jan 10 22:14:30 2011 (r217244) +++ head/sys/dev/ahci/ahci.c Mon Jan 10 22:27:52 2011 (r217245) @@ -176,6 +176,8 @@ static struct { {0x06201b4b, 0x00, "HighPoint RocketRAID 620", AHCI_Q_NOBSYRES}, {0x06221103, 0x00, "HighPoint RocketRAID 622", AHCI_Q_NOBSYRES}, {0x06221b4b, 0x00, "HighPoint RocketRAID 622", AHCI_Q_NOBSYRES}, + {0x06401103, 0x00, "HighPoint RocketRAID 640", AHCI_Q_NOBSYRES}, + {0x06441103, 0x00, "HighPoint RocketRAID 644", AHCI_Q_NOBSYRES}, {0x044c10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, {0x044d10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, {0x044e10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 23:28:46 2011 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 5F107106564A; Mon, 10 Jan 2011 23:28:46 +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 4E0C08FC12; Mon, 10 Jan 2011 23: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 p0ANSkEp098936; Mon, 10 Jan 2011 23:28:46 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0ANSkaR098933; Mon, 10 Jan 2011 23:28:46 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201101102328.p0ANSkaR098933@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 10 Jan 2011 23: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: r217246 - in head/sys: dev/re 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, 10 Jan 2011 23:28:46 -0000 Author: yongari Date: Mon Jan 10 23:28:46 2011 New Revision: 217246 URL: http://svn.freebsd.org/changeset/base/217246 Log: Implement TSO on RealTek RTL8168/8111 C or later controllers. RealTek changed TX descriptor format for later controllers so these controllers require MSS configuration in different location of TX descriptor. TSO is enabled by default for controllers that use new descriptor format. For old controllers, TSO is still disabled by default due to broken frames under certain conditions but users can enable it. Special thanks to Hayes Wang at RealTek. MFC after: 2 weeks Modified: head/sys/dev/re/if_re.c head/sys/pci/if_rlreg.h Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Mon Jan 10 22:27:52 2011 (r217245) +++ head/sys/dev/re/if_re.c Mon Jan 10 23:28:46 2011 (r217246) @@ -1460,8 +1460,8 @@ re_attach(device_t dev) ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = re_ioctl; ifp->if_start = re_start; - ifp->if_hwassist = RE_CSUM_FEATURES; - ifp->if_capabilities = IFCAP_HWCSUM; + ifp->if_hwassist = RE_CSUM_FEATURES | CSUM_TSO; + ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_TSO4; ifp->if_capenable = ifp->if_capabilities; ifp->if_init = re_init; IFQ_SET_MAXLEN(&ifp->if_snd, RL_IFQ_MAXLEN); @@ -1472,16 +1472,6 @@ re_attach(device_t dev) TASK_INIT(&sc->rl_inttask, 0, re_int_task, sc); /* - * XXX - * Still have no idea how to make TSO work on 8168C, 8168CP, - * 8111C and 8111CP. - */ - if ((sc->rl_flags & RL_FLAG_DESCV2) == 0) { - ifp->if_hwassist |= CSUM_TSO; - ifp->if_capabilities |= IFCAP_TSO4 | IFCAP_VLAN_HWTSO; - } - - /* * Call MI attach routine. */ ether_ifattach(ifp, eaddr); @@ -1495,12 +1485,14 @@ re_attach(device_t dev) ifp->if_capabilities |= IFCAP_WOL; ifp->if_capenable = ifp->if_capabilities; /* - * Don't enable TSO by default. Under certain - * circumtances the controller generated corrupted + * Don't enable TSO by default for old controllers. Under + * certain circumtances the controller generated corrupted * packets in TSO size. */ - ifp->if_hwassist &= ~CSUM_TSO; - ifp->if_capenable &= ~(IFCAP_TSO4 | IFCAP_VLAN_HWTSO); + if ((sc->rl_flags & RL_FLAG_DESCV2) == 0) { + ifp->if_hwassist &= ~CSUM_TSO; + ifp->if_capenable &= ~(IFCAP_TSO4 | IFCAP_VLAN_HWTSO); + } #ifdef DEVICE_POLLING ifp->if_capabilities |= IFCAP_POLLING; #endif @@ -2413,11 +2405,17 @@ re_encap(struct rl_softc *sc, struct mbu */ vlanctl = 0; csum_flags = 0; - if (((*m_head)->m_pkthdr.csum_flags & CSUM_TSO) != 0) - csum_flags = RL_TDESC_CMD_LGSEND | - ((uint32_t)(*m_head)->m_pkthdr.tso_segsz << - RL_TDESC_CMD_MSSVAL_SHIFT); - else { + if (((*m_head)->m_pkthdr.csum_flags & CSUM_TSO) != 0) { + if ((sc->rl_flags & RL_FLAG_DESCV2) != 0) { + csum_flags |= RL_TDESC_CMD_LGSEND; + vlanctl |= ((uint32_t)(*m_head)->m_pkthdr.tso_segsz << + RL_TDESC_CMD_MSSVALV2_SHIFT); + } else { + csum_flags |= RL_TDESC_CMD_LGSEND | + ((uint32_t)(*m_head)->m_pkthdr.tso_segsz << + RL_TDESC_CMD_MSSVAL_SHIFT); + } + } else { /* * Unconditionally enable IP checksum if TCP or UDP * checksum is required. Otherwise, TCP/UDP checksum Modified: head/sys/pci/if_rlreg.h ============================================================================== --- head/sys/pci/if_rlreg.h Mon Jan 10 22:27:52 2011 (r217245) +++ head/sys/pci/if_rlreg.h Mon Jan 10 23:28:46 2011 (r217246) @@ -657,6 +657,8 @@ struct rl_desc { #define RL_TDESC_CMD_UDPCSUMV2 0x80000000 #define RL_TDESC_CMD_TCPCSUMV2 0x40000000 #define RL_TDESC_CMD_IPCSUMV2 0x20000000 +#define RL_TDESC_CMD_MSSVALV2 0x1FFC0000 +#define RL_TDESC_CMD_MSSVALV2_SHIFT 18 /* * Error bits are valid only on the last descriptor of a frame From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 23:47:11 2011 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 9384E106566B; Mon, 10 Jan 2011 23:47:11 +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 82F528FC13; Mon, 10 Jan 2011 23: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 p0ANlBtd099357; Mon, 10 Jan 2011 23:47:11 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0ANlBR1099355; Mon, 10 Jan 2011 23:47:11 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201101102347.p0ANlBR1099355@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 10 Jan 2011 23: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: r217247 - 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, 10 Jan 2011 23:47:11 -0000 Author: yongari Date: Mon Jan 10 23:47:11 2011 New Revision: 217247 URL: http://svn.freebsd.org/changeset/base/217247 Log: When driver is not running, do not send DUMP command to controller and just show old (cached) values. Controller will not respond to the command unless MAC is enabled so DUMP request for down interface caused request timeout. Modified: head/sys/dev/re/if_re.c Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Mon Jan 10 23:28:46 2011 (r217246) +++ head/sys/dev/re/if_re.c Mon Jan 10 23:47:11 2011 (r217247) @@ -3278,6 +3278,10 @@ re_sysctl_stats(SYSCTL_HANDLER_ARGS) if (result == 1) { sc = (struct rl_softc *)arg1; RL_LOCK(sc); + if ((sc->rl_ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { + RL_UNLOCK(sc); + goto done; + } bus_dmamap_sync(sc->rl_ldata.rl_stag, sc->rl_ldata.rl_smap, BUS_DMASYNC_PREREAD); CSR_WRITE_4(sc, RL_DUMPSTATS_HI, @@ -3301,6 +3305,7 @@ re_sysctl_stats(SYSCTL_HANDLER_ARGS) "DUMP statistics request timedout\n"); return (ETIMEDOUT); } +done: stats = sc->rl_ldata.rl_stats; printf("%s statistics:\n", device_get_nameunit(sc->rl_dev)); printf("Tx frames : %ju\n", From owner-svn-src-head@FreeBSD.ORG Mon Jan 10 23:52:15 2011 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 EF2DE106566C; Mon, 10 Jan 2011 23:52:14 +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 DF2B68FC08; Mon, 10 Jan 2011 23:52:13 +0000 (UTC) Received: by wyf19 with SMTP id 19so20314904wyf.13 for ; Mon, 10 Jan 2011 15:52:12 -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=a4xEFsDNmeGro190UH6vNgWe4jMEAtyK3bnggjgXYzM=; b=W3hbqwin7bjtTpd3znty3Hx37lx//5ZFy4ROowr64BGwigrNsuZvkd0g03RgEHup8v yb/782wAn43EpGZfQ+ifO0i59sPL4CBwlaiiprFZKaH/siZnHH5oGrsIsoHrdgqpPDzA d48heE9WudxYc7NV5VY1WA2dVueTR631PJ0Wk= 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=ZsOBb9p11qpUK5BU507Zyj6oW1F+ubCA/Sgla6jLJCTNuv2Vm+2JV0tB7RsYE4mlwX Bx6AhRnAvk3DAMAhoAov48Pt9CnVfKgHMb649STNP8g3/aNHQnRfD68p7NRWBMhT9LoB vGgbroxOf9tz8KShN5lFkc6mfIkajG2RX0f+E= MIME-Version: 1.0 Received: by 10.216.49.15 with SMTP id w15mr322105web.1.1294703532754; Mon, 10 Jan 2011 15:52:12 -0800 (PST) Sender: yanegomi@gmail.com Received: by 10.216.254.226 with HTTP; Mon, 10 Jan 2011 15:52:12 -0800 (PST) In-Reply-To: <20110110220957.GB1923@garage.freebsd.pl> References: <201101101911.p0AJBQKG090310@svn.freebsd.org> <20110110220957.GB1923@garage.freebsd.pl> Date: Mon, 10 Jan 2011 15:52:12 -0800 X-Google-Sender-Auth: JIaPwvjwNu2BovUPf_ejYPguxqs Message-ID: From: Garrett Cooper To: Pawel Jakub Dawidek Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Josh Paetzel , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r217229 - head/usr.sbin/pc-sysinstall/backend 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, 10 Jan 2011 23:52:15 -0000 On Mon, Jan 10, 2011 at 2:09 PM, Pawel Jakub Dawidek wrot= e: > On Mon, Jan 10, 2011 at 07:11:26PM +0000, Josh Paetzel wrote: > [...] >> =A0 =A0while read line >> =A0 =A0do >> =A0 =A0 =A0# Check for data on this slice >> - =A0 =A0echo $line | grep "^${DISKTAG}-part=3D" >/dev/null 2>/dev/null >> + =A0 =A0echo $line | grep "^${_dTag}-part=3D" >/dev/null 2>/dev/null > > You can just use 'grep -q' instead of redirecting grep's output to > /dev/null. > >> =A0 =A0 =A0if [ "$?" =3D "0" ] > > This will work, but more elegant way is [ $? -eq 0 ] - there is no need > to convert exit code to string. I've seen people claim that the two items above are to make shell code `more accessible' and `more portable' to developers, but I agree that in this case you're not gaining much but instead just dumbing down your audience. >> + =A0 =A0 =A0 =A0FOUNDROOT=3D"1" ; export FOUNDROOT > > 'export FOUNDROOT=3D"1"' should work too. `export FOUNDROOT=3D1' will do. >> + =A0 =A0 =A0 =A0if [ "${FS}" !=3D "UFS" -a "${FS}" !=3D "UFS+S" -a "${F= S}" !=3D "UFS+J" -a "${FS}" !=3D "UFS+SUJ" ] ; then > > Something like this should work too: > > =A0 =A0 =A0 =A0if [ "${FS%+*}" !=3D "UFS" ]; then Except they're catching less than that: $ FS=3DUFS+FOO $ echo ${FS%+*} UFS $ A case statement would be easier to digest: case "$FS" in UFS|UFS+J|UFS+S|UFS+SUJ) # Do something here. ;; esac >> + =A0 =A0 =A0 =A0dd if=3D/dev/zero of=3D${_pDisk}p${CURPART} count=3D204= 8 >/dev/null 2>/dev/null > > If you specify 'of=3D' there is no need to redirect standard output to > /dev/null, as it is already redirected somewhere else. +1. Please keep the 2>/dev/null though because that's noise from the summary output. >> + =A0 =A0 =A0 =A0if [ ! -z "${ENCPASS}" ] ; then > > '[ ! -z "{str}" ]' is equivalent of '[ -n "${str}" ]'. > >> + =A0 =A0 =A0 =A0CURPART=3D"`expr ${CURPART} + 1`" > > Simpler: CURPART=3D$((CURPART+1)) Or `: $(( CURPART +=3D 1 ))' >> + =A0if [ "$?" !=3D "0" ] ; then return ; fi > > [ $? -eq 0 ] || return if [ $? -eq 0 ]; then return fi is easier to follow for me because more people go buckwild with the one-liners (and in some cases have introduced bugs that way because they didn't properly think about precedence of the operations, etc). The one-line above if ... fi above is ugly though. >> - =A0rc_halt "gpart add -b 34 -s 128 -t freebsd-boot ${_intDISK}" >> + =A0rc_halt "gpart add -b 34 -s 64 -t freebsd-boot ${_intDISK}" > > Gptzfsboot in HEAD is 27463 bytes. Gptzfsboot in ZFSv28 is 29659, so > using 64 sectors leaves only 3109 bytes for it to grow. > Note that, eg. RAIDZ3 support is not yet implemented and I expect it > might be not be enough place left to implement it if you do that. > > PS. Only because those are shell scripts doesn't mean style is not > important. They could really be easier to read if they follow style used > in rcNG. Thanks, -Garrett From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 00:29:17 2011 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 A6DA01065674; Tue, 11 Jan 2011 00:29:17 +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 965E48FC17; Tue, 11 Jan 2011 00:29: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 p0B0THoZ000384; Tue, 11 Jan 2011 00:29:17 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0B0THRK000382; Tue, 11 Jan 2011 00:29:17 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201101110029.p0B0THRK000382@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 11 Jan 2011 00:29: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: r217248 - 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, 11 Jan 2011 00:29:17 -0000 Author: lstewart Date: Tue Jan 11 00:29:17 2011 New Revision: 217248 URL: http://svn.freebsd.org/changeset/base/217248 Log: Fix some minor style/readability nits in hhook. Sponsored by: FreeBSD Foundation Submitted by: pjd MFC after: 9 weeks X-MFC with: r216615 Modified: head/sys/kern/kern_hhook.c Modified: head/sys/kern/kern_hhook.c ============================================================================== --- head/sys/kern/kern_hhook.c Mon Jan 10 23:47:11 2011 (r217247) +++ head/sys/kern/kern_hhook.c Tue Jan 11 00:29:17 2011 (r217248) @@ -156,8 +156,7 @@ hhook_add_hook(struct hhook_head *hhh, s if (!error) { STAILQ_INSERT_TAIL(&hhh->hhh_hooks, hhk, hhk_next); hhh->hhh_nhooks++; - } - else + } else free(hhk, M_HHOOK); HHH_WUNLOCK(hhh); @@ -332,7 +331,6 @@ hhook_head_deregister_lookup(int32_t hho struct hhook_head *hhh; int error; - error = 0; hhh = hhook_head_get(hhook_type, hhook_id); error = hhook_head_deregister(hhh); @@ -356,13 +354,12 @@ hhook_head_get(int32_t hhook_type, int32 LIST_FOREACH(hhh, &V_hhook_head_list, hhh_next) { if (hhh->hhh_type == hhook_type && hhh->hhh_id == hhook_id) { refcount_acquire(&hhh->hhh_refcount); - HHHLIST_UNLOCK(); - return (hhh); + break; } } HHHLIST_UNLOCK(); - return (NULL); + return (hhh); } void From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 01:11:07 2011 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 C5A2B106564A; Tue, 11 Jan 2011 01:11:07 +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 B544A8FC0C; Tue, 11 Jan 2011 01:11: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 p0B1B7m7001501; Tue, 11 Jan 2011 01:11:07 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0B1B7WJ001499; Tue, 11 Jan 2011 01:11:07 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201101110111.p0B1B7WJ001499@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 11 Jan 2011 01:11: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: r217250 - 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, 11 Jan 2011 01:11:07 -0000 Author: lstewart Date: Tue Jan 11 01:11:07 2011 New Revision: 217250 URL: http://svn.freebsd.org/changeset/base/217250 Log: Fix hhook_head_is_virtualised() so that "ret" can't be used uninitialised. Sponsored by: FreeBSD Foundation Submitted by: pjd MFC after: 9 weeks X-MFC with: r216615 Modified: head/sys/kern/kern_hhook.c Modified: head/sys/kern/kern_hhook.c ============================================================================== --- head/sys/kern/kern_hhook.c Tue Jan 11 00:58:49 2011 (r217249) +++ head/sys/kern/kern_hhook.c Tue Jan 11 01:11:07 2011 (r217250) @@ -380,11 +380,12 @@ hhook_head_is_virtualised(struct hhook_h { uint32_t ret; - if (hhh == NULL) - return (0); + ret = 0; - if (hhh->hhh_flags & HHH_ISINVNET) - ret = HHOOK_HEADISINVNET; + if (hhh != NULL) { + if (hhh->hhh_flags & HHH_ISINVNET) + ret = HHOOK_HEADISINVNET; + } return (ret); } From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 01:32:09 2011 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 24B85106564A; Tue, 11 Jan 2011 01:32:09 +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 143878FC13; Tue, 11 Jan 2011 01:32: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 p0B1W82x001982; Tue, 11 Jan 2011 01:32:08 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0B1W8sK001980; Tue, 11 Jan 2011 01:32:08 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201101110132.p0B1W8sK001980@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 11 Jan 2011 01:32: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: r217252 - 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, 11 Jan 2011 01:32:09 -0000 Author: lstewart Date: Tue Jan 11 01:32:08 2011 New Revision: 217252 URL: http://svn.freebsd.org/changeset/base/217252 Log: Fixe some whitespace nits that were introduced in r216758. Sponsored by: FreeBSD Foundation Submitted by: pjd MFC after: 10 weeks X-MFC with: r216758 Modified: head/sys/netinet/tcp_var.h Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Tue Jan 11 01:12:50 2011 (r217251) +++ head/sys/netinet/tcp_var.h Tue Jan 11 01:32:08 2011 (r217252) @@ -511,12 +511,12 @@ void kmod_tcpstat_inc(int statnum); #define HHOOK_TCP_LAST HHOOK_TCP_EST_OUT struct tcp_hhook_data { - struct tcpcb *tp; - struct tcphdr *th; - struct tcpopt *to; - long len; - int tso; - tcp_seq curack; + struct tcpcb *tp; + struct tcphdr *th; + struct tcpopt *to; + long len; + int tso; + tcp_seq curack; }; #endif @@ -625,7 +625,7 @@ VNET_DECLARE(int, tcp_ecn_maxretries); #define V_tcp_do_ecn VNET(tcp_do_ecn) #define V_tcp_ecn_maxretries VNET(tcp_ecn_maxretries) -VNET_DECLARE(struct hhook_head *, tcp_hhh[HHOOK_TCP_LAST+1]); +VNET_DECLARE(struct hhook_head *, tcp_hhh[HHOOK_TCP_LAST + 1]); #define V_tcp_hhh VNET(tcp_hhh) int tcp_addoptions(struct tcpopt *, u_char *); From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 01:57:02 2011 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 9F8CA106564A; Tue, 11 Jan 2011 01:57:02 +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 8DB728FC08; Tue, 11 Jan 2011 01:57: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 p0B1v299002524; Tue, 11 Jan 2011 01:57:02 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0B1v2Fc002522; Tue, 11 Jan 2011 01:57:02 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201101110157.p0B1v2Fc002522@svn.freebsd.org> From: David Xu Date: Tue, 11 Jan 2011 01:57: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: r217253 - head/lib/libthr/thread 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, 11 Jan 2011 01:57:02 -0000 Author: davidxu Date: Tue Jan 11 01:57:02 2011 New Revision: 217253 URL: http://svn.freebsd.org/changeset/base/217253 Log: Fix a typo. Submitted by: avg Modified: head/lib/libthr/thread/thr_sig.c Modified: head/lib/libthr/thread/thr_sig.c ============================================================================== --- head/lib/libthr/thread/thr_sig.c Tue Jan 11 01:32:08 2011 (r217252) +++ head/lib/libthr/thread/thr_sig.c Tue Jan 11 01:57:02 2011 (r217253) @@ -321,7 +321,7 @@ check_deferred_signal(struct pthread *cu if (__predict_true(curthread->deferred_siginfo.si_signo == 0)) return; getcontext(&uc); - if (curthread->deferred_siginfo.si_signo == 0) { + if (curthread->deferred_siginfo.si_signo != 0) { act = curthread->deferred_sigact; uc.uc_sigmask = curthread->deferred_sigmask; memcpy(&info, &curthread->deferred_siginfo, sizeof(siginfo_t)); From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 02:37:58 2011 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 B4F56106566C; Tue, 11 Jan 2011 02:37:58 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A2B808FC13; Tue, 11 Jan 2011 02:37: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 p0B2bwMT003456; Tue, 11 Jan 2011 02:37:58 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0B2bwUC003454; Tue, 11 Jan 2011 02:37:58 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201101110237.p0B2bwUC003454@svn.freebsd.org> From: Juli Mallett Date: Tue, 11 Jan 2011 02:37: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: r217254 - head/sys/mips/cavium 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, 11 Jan 2011 02:37:58 -0000 Author: jmallett Date: Tue Jan 11 02:37:58 2011 New Revision: 217254 URL: http://svn.freebsd.org/changeset/base/217254 Log: Initialize PCIe buses and add preliminary support for 64-bit BARs. Modified: head/sys/mips/cavium/octopci.c Modified: head/sys/mips/cavium/octopci.c ============================================================================== --- head/sys/mips/cavium/octopci.c Tue Jan 11 01:57:02 2011 (r217253) +++ head/sys/mips/cavium/octopci.c Tue Jan 11 02:37:58 2011 (r217254) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Juli Mallett + * Copyright (c) 2010-2011 Juli Mallett * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -70,9 +71,11 @@ struct octopci_softc { unsigned sc_domain; unsigned sc_bus; + bus_addr_t sc_io_base; unsigned sc_io_next; struct rman sc_io; + bus_addr_t sc_mem1_base; unsigned sc_mem1_next; struct rman sc_mem1; }; @@ -92,25 +95,33 @@ static void octopci_write_config(device_ uint32_t, int); static int octopci_route_interrupt(device_t, device_t, int); -static void octopci_init_bar(device_t, unsigned, unsigned, unsigned, unsigned, uint8_t *); +static unsigned octopci_init_bar(device_t, unsigned, unsigned, unsigned, unsigned, uint8_t *); static unsigned octopci_init_device(device_t, unsigned, unsigned, unsigned, unsigned); static unsigned octopci_init_bus(device_t, unsigned); +static void octopci_init_pci(device_t); static uint64_t octopci_cs_addr(unsigned, unsigned, unsigned, unsigned); static void octopci_identify(driver_t *drv, device_t parent) { + /* XXX Check sysinfo flag. */ + BUS_ADD_CHILD(parent, 0, "pcib", 0); + if (octeon_has_feature(OCTEON_FEATURE_PCIE)) + BUS_ADD_CHILD(parent, 0, "pcib", 1); } static int octopci_probe(device_t dev) { + if (octeon_has_feature(OCTEON_FEATURE_PCIE)) { + device_set_desc(dev, "Cavium Octeon PCIe bridge"); + return (0); + } + if (device_get_unit(dev) != 0) return (ENXIO); - if (octeon_has_feature(OCTEON_FEATURE_PCIE)) - return (ENXIO); - /* XXX Check sysinfo flag. */ + device_set_desc(dev, "Cavium Octeon PCI bridge"); return (0); } @@ -119,214 +130,47 @@ static int octopci_attach(device_t dev) { struct octopci_softc *sc; - cvmx_npi_mem_access_subid_t npi_mem_access_subid; - cvmx_npi_pci_int_arb_cfg_t npi_pci_int_arb_cfg; - cvmx_npi_ctl_status_t npi_ctl_status; - cvmx_pci_ctl_status_2_t pci_ctl_status_2; - cvmx_pci_cfg56_t pci_cfg56; - cvmx_pci_cfg22_t pci_cfg22; - cvmx_pci_cfg16_t pci_cfg16; - cvmx_pci_cfg19_t pci_cfg19; - cvmx_pci_cfg01_t pci_cfg01; unsigned subbus; - unsigned i; int error; - /* - * Reset the PCI bus. - */ - cvmx_write_csr(CVMX_CIU_SOFT_PRST, 0x1); - cvmx_read_csr(CVMX_CIU_SOFT_PRST); - - DELAY(2000); - - npi_ctl_status.u64 = 0; - npi_ctl_status.s.max_word = 1; - npi_ctl_status.s.timer = 1; - cvmx_write_csr(CVMX_NPI_CTL_STATUS, npi_ctl_status.u64); - - /* - * Set host mode. - */ - switch (cvmx_sysinfo_get()->board_type) { -#if defined(OCTEON_VENDOR_LANNER) - case CVMX_BOARD_TYPE_CUST_LANNER_MR320: - case CVMX_BOARD_TYPE_CUST_LANNER_MR955: - /* 32-bit PCI-X */ - cvmx_write_csr(CVMX_CIU_SOFT_PRST, 0x0); - break; -#endif - default: - /* 64-bit PCI-X */ - cvmx_write_csr(CVMX_CIU_SOFT_PRST, 0x4); - break; - } - cvmx_read_csr(CVMX_CIU_SOFT_PRST); - - DELAY(2000); - - /* - * Enable BARs and configure big BAR mode. - */ - pci_ctl_status_2.u32 = 0; - pci_ctl_status_2.s.bb1_hole = 5; /* 256MB hole in BAR1 */ - pci_ctl_status_2.s.bb1_siz = 1; /* BAR1 is 2GB */ - pci_ctl_status_2.s.bb_ca = 1; /* Bypass cache for big BAR */ - pci_ctl_status_2.s.bb_es = 1; /* Do big BAR byte-swapping */ - pci_ctl_status_2.s.bb1 = 1; /* BAR1 is big */ - pci_ctl_status_2.s.bb0 = 1; /* BAR0 is big */ - pci_ctl_status_2.s.bar2pres = 1; /* BAR2 present */ - pci_ctl_status_2.s.pmo_amod = 1; /* Round-robin priority */ - pci_ctl_status_2.s.tsr_hwm = 1; - pci_ctl_status_2.s.bar2_enb = 1; /* Enable BAR2 */ - pci_ctl_status_2.s.bar2_esx = 1; /* Do BAR2 byte-swapping */ - pci_ctl_status_2.s.bar2_cax = 1; /* Bypass cache for BAR2 */ + sc = device_get_softc(dev); + sc->sc_dev = dev; - NPI_WRITE(CVMX_NPI_PCI_CTL_STATUS_2, pci_ctl_status_2.u32); + if (octeon_has_feature(OCTEON_FEATURE_PCIE)) { + sc->sc_domain = device_get_unit(dev); - DELAY(2000); + error = cvmx_pcie_rc_initialize(sc->sc_domain); + if (error != 0) { + device_printf(dev, "Failed to put PCIe bus in host mode.\n"); + return (ENXIO); + } - pci_ctl_status_2.u32 = NPI_READ(CVMX_NPI_PCI_CTL_STATUS_2); + /* + * In RC mode, the Simple Executive programs the first bus to + * be numbered as bus 1, because some IDT bridges used in + * Octeon systems object to being attached to bus 0. + */ + sc->sc_bus = 1; - device_printf(dev, "%u-bit PCI%s bus.\n", - pci_ctl_status_2.s.ap_64ad ? 64 : 32, - pci_ctl_status_2.s.ap_pcix ? "-X" : ""); + sc->sc_io_base = CVMX_ADD_IO_SEG(cvmx_pcie_get_io_base_address(sc->sc_domain)); + sc->sc_io.rm_descr = "Cavium Octeon PCIe I/O Ports"; - /* - * Set up transaction splitting, etc., parameters. - */ - pci_cfg19.u32 = 0; - pci_cfg19.s.mrbcm = 1; - if (pci_ctl_status_2.s.ap_pcix) { - pci_cfg19.s.mdrrmc = 0; - pci_cfg19.s.tdomc = 4; + sc->sc_mem1_base = CVMX_ADD_IO_SEG(cvmx_pcie_get_mem_base_address(sc->sc_domain)); + sc->sc_mem1.rm_descr = "Cavium Octeon PCIe Memory"; } else { - pci_cfg19.s.mdrrmc = 2; - pci_cfg19.s.tdomc = 1; - } - NPI_WRITE(CVMX_NPI_PCI_CFG19, pci_cfg19.u32); - NPI_READ(CVMX_NPI_PCI_CFG19); + octopci_init_pci(dev); - /* - * Set up PCI error handling and memory access. - */ - pci_cfg01.u32 = 0; - pci_cfg01.s.fbbe = 1; - pci_cfg01.s.see = 1; - pci_cfg01.s.pee = 1; - pci_cfg01.s.me = 1; - pci_cfg01.s.msae = 1; - if (pci_ctl_status_2.s.ap_pcix) { - pci_cfg01.s.fbb = 0; - } else { - pci_cfg01.s.fbb = 1; - } - NPI_WRITE(CVMX_NPI_PCI_CFG01, pci_cfg01.u32); - NPI_READ(CVMX_NPI_PCI_CFG01); - - /* - * Enable the Octeon bus arbiter. - */ - npi_pci_int_arb_cfg.u64 = 0; - npi_pci_int_arb_cfg.s.en = 1; - cvmx_write_csr(CVMX_NPI_PCI_INT_ARB_CFG, npi_pci_int_arb_cfg.u64); - - /* - * Disable master latency timer. - */ - pci_cfg16.u32 = 0; - pci_cfg16.s.mltd = 1; - NPI_WRITE(CVMX_NPI_PCI_CFG16, pci_cfg16.u32); - NPI_READ(CVMX_NPI_PCI_CFG16); - - /* - * Configure master arbiter. - */ - pci_cfg22.u32 = 0; - pci_cfg22.s.flush = 1; - pci_cfg22.s.mrv = 255; - NPI_WRITE(CVMX_NPI_PCI_CFG22, pci_cfg22.u32); - NPI_READ(CVMX_NPI_PCI_CFG22); - - /* - * Set up PCI-X capabilities. - */ - if (pci_ctl_status_2.s.ap_pcix) { - pci_cfg56.u32 = 0; - pci_cfg56.s.most = 3; - pci_cfg56.s.roe = 1; /* Enable relaxed ordering */ - pci_cfg56.s.dpere = 1; - pci_cfg56.s.ncp = 0xe8; - pci_cfg56.s.pxcid = 7; - NPI_WRITE(CVMX_NPI_PCI_CFG56, pci_cfg56.u32); - NPI_READ(CVMX_NPI_PCI_CFG56); - } - - NPI_WRITE(CVMX_NPI_PCI_READ_CMD_6, 0x22); - NPI_READ(CVMX_NPI_PCI_READ_CMD_6); - NPI_WRITE(CVMX_NPI_PCI_READ_CMD_C, 0x33); - NPI_READ(CVMX_NPI_PCI_READ_CMD_C); - NPI_WRITE(CVMX_NPI_PCI_READ_CMD_E, 0x33); - NPI_READ(CVMX_NPI_PCI_READ_CMD_E); - - /* - * Configure MEM1 sub-DID access. - */ - npi_mem_access_subid.u64 = 0; - npi_mem_access_subid.s.esr = 1; /* Byte-swap on read */ - npi_mem_access_subid.s.esw = 1; /* Byte-swap on write */ - switch (cvmx_sysinfo_get()->board_type) { -#if defined(OCTEON_VENDOR_LANNER) - case CVMX_BOARD_TYPE_CUST_LANNER_MR955: - npi_mem_access_subid.s.shortl = 1; - break; -#endif - default: - break; - } - cvmx_write_csr(CVMX_NPI_MEM_ACCESS_SUBID3, npi_mem_access_subid.u64); + sc->sc_domain = 0; + sc->sc_bus = 0; - /* - * Configure BAR2. Linux says this has to come first. - */ - NPI_WRITE(CVMX_NPI_PCI_CFG08, 0x00000000); - NPI_READ(CVMX_NPI_PCI_CFG08); - NPI_WRITE(CVMX_NPI_PCI_CFG09, 0x00000080); - NPI_READ(CVMX_NPI_PCI_CFG09); + sc->sc_io_base = CVMX_ADDR_DID(CVMX_FULL_DID(CVMX_OCT_DID_PCI, CVMX_OCT_SUBDID_PCI_IO)); + sc->sc_io.rm_descr = "Cavium Octeon PCI I/O Ports"; - /* - * Disable BAR1 IndexX. - */ - for (i = 0; i < 32; i++) { - NPI_WRITE(CVMX_NPI_PCI_BAR1_INDEXX(i), 0); - NPI_READ(CVMX_NPI_PCI_BAR1_INDEXX(i)); + sc->sc_mem1_base = CVMX_ADDR_DID(CVMX_FULL_DID(CVMX_OCT_DID_PCI, CVMX_OCT_SUBDID_PCI_MEM1)); + sc->sc_mem1.rm_descr = "Cavium Octeon PCI Memory"; } - /* - * Configure BAR0 and BAR1. - */ - NPI_WRITE(CVMX_NPI_PCI_CFG04, 0x00000000); - NPI_READ(CVMX_NPI_PCI_CFG04); - NPI_WRITE(CVMX_NPI_PCI_CFG05, 0x00000000); - NPI_READ(CVMX_NPI_PCI_CFG05); - - NPI_WRITE(CVMX_NPI_PCI_CFG06, 0x80000000); - NPI_READ(CVMX_NPI_PCI_CFG06); - NPI_WRITE(CVMX_NPI_PCI_CFG07, 0x00000000); - NPI_READ(CVMX_NPI_PCI_CFG07); - - /* - * Clear PCI interrupts. - */ - cvmx_write_csr(CVMX_NPI_PCI_INT_SUM2, 0xffffffffffffffffull); - - sc = device_get_softc(dev); - sc->sc_dev = dev; - sc->sc_domain = 0; - sc->sc_bus = 0; - sc->sc_io.rm_type = RMAN_ARRAY; - sc->sc_io.rm_descr = "Cavium Octeon PCI I/O Ports"; error = rman_init(&sc->sc_io); if (error != 0) return (error); @@ -337,7 +181,6 @@ octopci_attach(device_t dev) return (error); sc->sc_mem1.rm_type = RMAN_ARRAY; - sc->sc_mem1.rm_descr = "Cavium Octeon PCI Memory"; error = rman_init(&sc->sc_mem1); if (error != 0) return (error); @@ -356,11 +199,11 @@ octopci_attach(device_t dev) /* * Configure devices. */ - octopci_write_config(dev, 0, 0, 0, PCIR_SUBBUS_1, 0xff, 1); - subbus = octopci_init_bus(dev, 0); - octopci_write_config(dev, 0, 0, 0, PCIR_SUBBUS_1, subbus, 1); + octopci_write_config(dev, sc->sc_bus, 0, 0, PCIR_SUBBUS_1, 0xff, 1); + subbus = octopci_init_bus(dev, sc->sc_bus); + octopci_write_config(dev, sc->sc_bus, 0, 0, PCIR_SUBBUS_1, subbus, 1); - device_add_child(dev, "pci", 0); + device_add_child(dev, "pci", device_get_unit(dev)); return (bus_generic_attach(dev)); } @@ -421,10 +264,10 @@ octopci_alloc_resource(device_t bus, dev switch (type) { case SYS_RES_MEMORY: - rman_set_bushandle(res, CVMX_ADDR_DID(CVMX_FULL_DID(CVMX_OCT_DID_PCI, CVMX_OCT_SUBDID_PCI_MEM1)) + rman_get_start(res)); + rman_set_bushandle(res, sc->sc_mem1_base + rman_get_start(res)); break; case SYS_RES_IOPORT: - rman_set_bushandle(res, CVMX_ADDR_DID(CVMX_FULL_DID(CVMX_OCT_DID_PCI, CVMX_OCT_SUBDID_PCI_IO)) + rman_get_start(res)); + rman_set_bushandle(res, sc->sc_io_base + rman_get_start(res)); #if __mips_n64 rman_set_virtual(res, (void *)rman_get_bushandle(res)); #else @@ -496,6 +339,22 @@ octopci_read_config(device_t dev, u_int sc = device_get_softc(dev); + if (octeon_has_feature(OCTEON_FEATURE_PCIE)) { + if (bus == 0 && slot == 0 && func == 0) + return ((uint32_t)-1); + + switch (bytes) { + case 4: + return (cvmx_pcie_config_read32(sc->sc_domain, bus, slot, func, reg)); + case 2: + return (cvmx_pcie_config_read16(sc->sc_domain, bus, slot, func, reg)); + case 1: + return (cvmx_pcie_config_read8(sc->sc_domain, bus, slot, func, reg)); + default: + return ((uint32_t)-1); + } + } + addr = octopci_cs_addr(bus, slot, func, reg); switch (bytes) { @@ -522,6 +381,22 @@ octopci_write_config(device_t dev, u_int sc = device_get_softc(dev); + if (octeon_has_feature(OCTEON_FEATURE_PCIE)) { + switch (bytes) { + case 4: + cvmx_pcie_config_write32(sc->sc_domain, bus, slot, func, reg, data); + return; + case 2: + cvmx_pcie_config_write16(sc->sc_domain, bus, slot, func, reg, data); + return; + case 1: + cvmx_pcie_config_write8(sc->sc_domain, bus, slot, func, reg, data); + return; + default: + return; + } + } + addr = octopci_cs_addr(bus, slot, func, reg); switch (bytes) { @@ -548,6 +423,9 @@ octopci_route_interrupt(device_t dev, de sc = device_get_softc(dev); + if (octeon_has_feature(OCTEON_FEATURE_PCIE)) + return (CVMX_IRQ_PCI_INT0 + pin - 1); + bus = pci_get_bus(child); slot = pci_get_slot(child); func = pci_get_function(child); @@ -586,12 +464,13 @@ octopci_route_interrupt(device_t dev, de return (CVMX_IRQ_PCI_INT0 + (irq & 3)); } -static void +static unsigned octopci_init_bar(device_t dev, unsigned b, unsigned s, unsigned f, unsigned barnum, uint8_t *commandp) { struct octopci_softc *sc; - uint32_t bar; + uint64_t bar; unsigned size; + int barsize; sc = device_get_softc(dev); @@ -599,12 +478,10 @@ octopci_init_bar(device_t dev, unsigned bar = octopci_read_config(dev, b, s, f, PCIR_BAR(barnum), 4); if (bar == 0) { - /* Bar not implemented. */ - return; + /* Bar not implemented; got to next bar. */ + return (barnum + 1); } - /* XXX Some of this is wrong for 64-bit busses. */ - if (PCI_BAR_IO(bar)) { size = ~(bar & PCIM_BAR_IO_BASE) + 1; @@ -612,7 +489,7 @@ octopci_init_bar(device_t dev, unsigned if (sc->sc_io_next + size > CVMX_OCT_PCI_IO_SIZE) { device_printf(dev, "%02x.%02x:%02x: no ports for BAR%u.\n", b, s, f, barnum); - return; + return (barnum + 1); } octopci_write_config(dev, b, s, f, PCIR_BAR(barnum), CVMX_OCT_PCI_IO_BASE + sc->sc_io_next, 4); @@ -622,14 +499,37 @@ octopci_init_bar(device_t dev, unsigned * Enable I/O ports. */ *commandp |= PCIM_CMD_PORTEN; + + return (barnum + 1); } else { + if (PCIR_BAR(barnum) == PCIR_BIOS) { + /* + * ROM BAR is always 32-bit. + */ + barsize = 1; + } else { + switch (bar & PCIM_BAR_MEM_TYPE) { + case PCIM_BAR_MEM_64: + /* + * XXX + * High 32 bits are all zeroes for now. + */ + octopci_write_config(dev, b, s, f, PCIR_BAR(barnum + 1), 0, 4); + barsize = 2; + break; + default: + barsize = 1; + break; + } + } + size = ~(bar & (uint32_t)PCIM_BAR_MEM_BASE) + 1; sc->sc_mem1_next = (sc->sc_mem1_next + size - 1) & ~(size - 1); if (sc->sc_mem1_next + size > CVMX_OCT_PCI_MEM1_SIZE) { device_printf(dev, "%02x.%02x:%02x: no memory for BAR%u.\n", b, s, f, barnum); - return; + return (barnum + barsize); } octopci_write_config(dev, b, s, f, PCIR_BAR(barnum), CVMX_OCT_PCI_MEM1_BASE + sc->sc_mem1_next, 4); @@ -639,6 +539,8 @@ octopci_init_bar(device_t dev, unsigned * Enable memory access. */ *commandp |= PCIM_CMD_MEMEN; + + return (barnum + barsize); } } @@ -680,8 +582,9 @@ octopci_init_device(device_t dev, unsign return (secbus); } - for (barnum = 0; barnum < bars; barnum++) - octopci_init_bar(dev, b, s, f, barnum, &command); + barnum = 0; + while (barnum < bars) + barnum = octopci_init_bar(dev, b, s, f, barnum, &command); /* Enable bus mastering. */ command |= PCIM_CMD_BUSMASTEREN; @@ -848,6 +751,209 @@ octopci_cs_addr(unsigned bus, unsigned s return (pci_addr.u64); } +static void +octopci_init_pci(device_t dev) +{ + cvmx_npi_mem_access_subid_t npi_mem_access_subid; + cvmx_npi_pci_int_arb_cfg_t npi_pci_int_arb_cfg; + cvmx_npi_ctl_status_t npi_ctl_status; + cvmx_pci_ctl_status_2_t pci_ctl_status_2; + cvmx_pci_cfg56_t pci_cfg56; + cvmx_pci_cfg22_t pci_cfg22; + cvmx_pci_cfg16_t pci_cfg16; + cvmx_pci_cfg19_t pci_cfg19; + cvmx_pci_cfg01_t pci_cfg01; + unsigned i; + + /* + * Reset the PCI bus. + */ + cvmx_write_csr(CVMX_CIU_SOFT_PRST, 0x1); + cvmx_read_csr(CVMX_CIU_SOFT_PRST); + + DELAY(2000); + + npi_ctl_status.u64 = 0; + npi_ctl_status.s.max_word = 1; + npi_ctl_status.s.timer = 1; + cvmx_write_csr(CVMX_NPI_CTL_STATUS, npi_ctl_status.u64); + + /* + * Set host mode. + */ + switch (cvmx_sysinfo_get()->board_type) { +#if defined(OCTEON_VENDOR_LANNER) + case CVMX_BOARD_TYPE_CUST_LANNER_MR320: + case CVMX_BOARD_TYPE_CUST_LANNER_MR955: + /* 32-bit PCI-X */ + cvmx_write_csr(CVMX_CIU_SOFT_PRST, 0x0); + break; +#endif + default: + /* 64-bit PCI-X */ + cvmx_write_csr(CVMX_CIU_SOFT_PRST, 0x4); + break; + } + cvmx_read_csr(CVMX_CIU_SOFT_PRST); + + DELAY(2000); + + /* + * Enable BARs and configure big BAR mode. + */ + pci_ctl_status_2.u32 = 0; + pci_ctl_status_2.s.bb1_hole = 5; /* 256MB hole in BAR1 */ + pci_ctl_status_2.s.bb1_siz = 1; /* BAR1 is 2GB */ + pci_ctl_status_2.s.bb_ca = 1; /* Bypass cache for big BAR */ + pci_ctl_status_2.s.bb_es = 1; /* Do big BAR byte-swapping */ + pci_ctl_status_2.s.bb1 = 1; /* BAR1 is big */ + pci_ctl_status_2.s.bb0 = 1; /* BAR0 is big */ + pci_ctl_status_2.s.bar2pres = 1; /* BAR2 present */ + pci_ctl_status_2.s.pmo_amod = 1; /* Round-robin priority */ + pci_ctl_status_2.s.tsr_hwm = 1; + pci_ctl_status_2.s.bar2_enb = 1; /* Enable BAR2 */ + pci_ctl_status_2.s.bar2_esx = 1; /* Do BAR2 byte-swapping */ + pci_ctl_status_2.s.bar2_cax = 1; /* Bypass cache for BAR2 */ + + NPI_WRITE(CVMX_NPI_PCI_CTL_STATUS_2, pci_ctl_status_2.u32); + + DELAY(2000); + + pci_ctl_status_2.u32 = NPI_READ(CVMX_NPI_PCI_CTL_STATUS_2); + + device_printf(dev, "%u-bit PCI%s bus.\n", + pci_ctl_status_2.s.ap_64ad ? 64 : 32, + pci_ctl_status_2.s.ap_pcix ? "-X" : ""); + + /* + * Set up transaction splitting, etc., parameters. + */ + pci_cfg19.u32 = 0; + pci_cfg19.s.mrbcm = 1; + if (pci_ctl_status_2.s.ap_pcix) { + pci_cfg19.s.mdrrmc = 0; + pci_cfg19.s.tdomc = 4; + } else { + pci_cfg19.s.mdrrmc = 2; + pci_cfg19.s.tdomc = 1; + } + NPI_WRITE(CVMX_NPI_PCI_CFG19, pci_cfg19.u32); + NPI_READ(CVMX_NPI_PCI_CFG19); + + /* + * Set up PCI error handling and memory access. + */ + pci_cfg01.u32 = 0; + pci_cfg01.s.fbbe = 1; + pci_cfg01.s.see = 1; + pci_cfg01.s.pee = 1; + pci_cfg01.s.me = 1; + pci_cfg01.s.msae = 1; + if (pci_ctl_status_2.s.ap_pcix) { + pci_cfg01.s.fbb = 0; + } else { + pci_cfg01.s.fbb = 1; + } + NPI_WRITE(CVMX_NPI_PCI_CFG01, pci_cfg01.u32); + NPI_READ(CVMX_NPI_PCI_CFG01); + + /* + * Enable the Octeon bus arbiter. + */ + npi_pci_int_arb_cfg.u64 = 0; + npi_pci_int_arb_cfg.s.en = 1; + cvmx_write_csr(CVMX_NPI_PCI_INT_ARB_CFG, npi_pci_int_arb_cfg.u64); + + /* + * Disable master latency timer. + */ + pci_cfg16.u32 = 0; + pci_cfg16.s.mltd = 1; + NPI_WRITE(CVMX_NPI_PCI_CFG16, pci_cfg16.u32); + NPI_READ(CVMX_NPI_PCI_CFG16); + + /* + * Configure master arbiter. + */ + pci_cfg22.u32 = 0; + pci_cfg22.s.flush = 1; + pci_cfg22.s.mrv = 255; + NPI_WRITE(CVMX_NPI_PCI_CFG22, pci_cfg22.u32); + NPI_READ(CVMX_NPI_PCI_CFG22); + + /* + * Set up PCI-X capabilities. + */ + if (pci_ctl_status_2.s.ap_pcix) { + pci_cfg56.u32 = 0; + pci_cfg56.s.most = 3; + pci_cfg56.s.roe = 1; /* Enable relaxed ordering */ + pci_cfg56.s.dpere = 1; + pci_cfg56.s.ncp = 0xe8; + pci_cfg56.s.pxcid = 7; + NPI_WRITE(CVMX_NPI_PCI_CFG56, pci_cfg56.u32); + NPI_READ(CVMX_NPI_PCI_CFG56); + } + + NPI_WRITE(CVMX_NPI_PCI_READ_CMD_6, 0x22); + NPI_READ(CVMX_NPI_PCI_READ_CMD_6); + NPI_WRITE(CVMX_NPI_PCI_READ_CMD_C, 0x33); + NPI_READ(CVMX_NPI_PCI_READ_CMD_C); + NPI_WRITE(CVMX_NPI_PCI_READ_CMD_E, 0x33); + NPI_READ(CVMX_NPI_PCI_READ_CMD_E); + + /* + * Configure MEM1 sub-DID access. + */ + npi_mem_access_subid.u64 = 0; + npi_mem_access_subid.s.esr = 1; /* Byte-swap on read */ + npi_mem_access_subid.s.esw = 1; /* Byte-swap on write */ + switch (cvmx_sysinfo_get()->board_type) { +#if defined(OCTEON_VENDOR_LANNER) + case CVMX_BOARD_TYPE_CUST_LANNER_MR955: + npi_mem_access_subid.s.shortl = 1; + break; +#endif + default: + break; + } + cvmx_write_csr(CVMX_NPI_MEM_ACCESS_SUBID3, npi_mem_access_subid.u64); + + /* + * Configure BAR2. Linux says this has to come first. + */ + NPI_WRITE(CVMX_NPI_PCI_CFG08, 0x00000000); + NPI_READ(CVMX_NPI_PCI_CFG08); + NPI_WRITE(CVMX_NPI_PCI_CFG09, 0x00000080); + NPI_READ(CVMX_NPI_PCI_CFG09); + + /* + * Disable BAR1 IndexX. + */ + for (i = 0; i < 32; i++) { + NPI_WRITE(CVMX_NPI_PCI_BAR1_INDEXX(i), 0); + NPI_READ(CVMX_NPI_PCI_BAR1_INDEXX(i)); + } + + /* + * Configure BAR0 and BAR1. + */ + NPI_WRITE(CVMX_NPI_PCI_CFG04, 0x00000000); + NPI_READ(CVMX_NPI_PCI_CFG04); + NPI_WRITE(CVMX_NPI_PCI_CFG05, 0x00000000); + NPI_READ(CVMX_NPI_PCI_CFG05); + + NPI_WRITE(CVMX_NPI_PCI_CFG06, 0x80000000); + NPI_READ(CVMX_NPI_PCI_CFG06); + NPI_WRITE(CVMX_NPI_PCI_CFG07, 0x00000000); + NPI_READ(CVMX_NPI_PCI_CFG07); + + /* + * Clear PCI interrupts. + */ + cvmx_write_csr(CVMX_NPI_PCI_INT_SUM2, 0xffffffffffffffffull); +} + static device_method_t octopci_methods[] = { /* Device interface */ DEVMETHOD(device_identify, octopci_identify), From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 05:04:59 2011 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 18A681065675 for ; Tue, 11 Jan 2011 05:04:59 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id B85598FC1C for ; Tue, 11 Jan 2011 05:04:58 +0000 (UTC) Received: (qmail 22733 invoked by uid 399); 11 Jan 2011 05:04:57 -0000 Received: from localhost (HELO doug-optiplex.ka9q.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 11 Jan 2011 05:04:57 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4D2BE4F8.3030902@FreeBSD.org> Date: Mon, 10 Jan 2011 21:04:56 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.13) Gecko/20101210 Thunderbird/3.1.7 MIME-Version: 1.0 To: John Baldwin References: <201101092347.p09NlB4M060802@svn.freebsd.org> <201101101433.18847.jhb@freebsd.org> In-Reply-To: <201101101433.18847.jhb@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: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r217213 - head/lib/bind 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, 11 Jan 2011 05:04:59 -0000 On 01/10/2011 11:33, John Baldwin wrote: > On Sunday, January 09, 2011 6:47:11 pm Doug Barton wrote: >> # Use the right version of the atomic.h file from lib/isc >> -ISC_ATOMIC_ARCH=${MACHINE_CPUARCH:S/i386/x86_32/:S/amd64/x86_32/} >> +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" > > This should use MACHINE_CPUARCH instead of MACHINE_ARCH? When this block was first written I don't think _CPUARCH existed at all, and/or had not been MFC'ed. Subsequently, nwhitehorn made the change in r209886 to use _CPUARCH in both places, however the diff from Warner's commit in r217071 (which is what I based my change on) clearly showed _ARCH (http://svn.freebsd.org/viewvc/base/head/lib/bind/config.mk?r1=209886&r2=217071). So, I'm not sure where svn went sideways there, but it's definitely "odd." I have no objection to putting it back to the state that it was in at r209886, although frankly less diffs to RELENG_[78] without good reason make my life easier. Doug PS, this is just another reason why I prefer pre-commit review when convenient ... >> +ISC_ATOMIC_ARCH= x86_32 >> +.else >> +ISC_ATOMIC_ARCH= ${MACHINE_CPUARCH} >> +.endif >> >> # Optional features >> .if ${MK_BIND_LARGE_FILE} == "yes" >> > -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 07:27:09 2011 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 24F041065694; Tue, 11 Jan 2011 07:27:09 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id B0ED78FC18; Tue, 11 Jan 2011 07:27:07 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 45DEC45C9B; Tue, 11 Jan 2011 08:27:06 +0100 (CET) Received: from localhost (89-73-192-49.dynamic.chello.pl [89.73.192.49]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 2C40145684; Tue, 11 Jan 2011 08:27:01 +0100 (CET) Date: Tue, 11 Jan 2011 08:26:53 +0100 From: Pawel Jakub Dawidek To: Garrett Cooper Message-ID: <20110111072653.GD1923@garage.freebsd.pl> References: <201101101911.p0AJBQKG090310@svn.freebsd.org> <20110110220957.GB1923@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6zdv2QT/q3FMhpsV" Content-Disposition: inline In-Reply-To: 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=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: Josh Paetzel , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r217229 - head/usr.sbin/pc-sysinstall/backend 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, 11 Jan 2011 07:27:09 -0000 --6zdv2QT/q3FMhpsV Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 10, 2011 at 03:52:12PM -0800, Garrett Cooper wrote: > >> + =A0 =A0 =A0 =A0if [ "${FS}" !=3D "UFS" -a "${FS}" !=3D "UFS+S" -a "$= {FS}" !=3D "UFS+J" -a "${FS}" !=3D "UFS+SUJ" ] ; then > > > > Something like this should work too: > > > > =A0 =A0 =A0 =A0if [ "${FS%+*}" !=3D "UFS" ]; then >=20 > Except they're catching less than that: >=20 > $ FS=3DUFS+FOO > $ echo ${FS%+*} > UFS > $ You mean that invalid ${FS} values are catched? The code as it is don't handle them too. I expect those are handled somewhere earlier. From my understanding the code wants to dected if this is any configuration of UFS, so in my opinion my version is better as there are no modifications needed if some other UFS variant will appear in the future. > >> + =A0if [ "$?" !=3D "0" ] ; then return ; fi > > > > [ $? -eq 0 ] || return >=20 > if [ $? -eq 0 ]; then > return > fi In that case -ne, as you reverted the logic. > is easier to follow for me because more people go buckwild with the > one-liners (and in some cases have introduced bugs that way because > they didn't properly think about precedence of the operations, etc). I kinda started to like very simple and obvious one-liners in sh(1), but this is just a matter of taste. > The one-line above if ... fi above is ugly though. Agreed. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --6zdv2QT/q3FMhpsV Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk0sBj0ACgkQForvXbEpPzQtPQCgo80xCU4yjvu4GxWqUSKwMlQQ GmsAoNBz8dnXOtwfM4acA9/Kp/MB1U+8 =CLtd -----END PGP SIGNATURE----- --6zdv2QT/q3FMhpsV-- From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 07:59:54 2011 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 7D2E7106566C; Tue, 11 Jan 2011 07:59:54 +0000 (UTC) (envelope-from yanegomi@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 BAA5B8FC0C; Tue, 11 Jan 2011 07:59:53 +0000 (UTC) Received: by iwn39 with SMTP id 39so20295896iwn.13 for ; Mon, 10 Jan 2011 23:59:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=XNi4djoeCWqphcyEX2DJDmn5Lu3rWwk0YM+O4oR7KY4=; b=HD54mXStiJ5SQ/juTyOKoCG767k2ZROyYAG5lI2ZZ/Xby337OKo/afbV2D51tt7b8V tu3TBf07pQPcPSmB4sQ23t4AJlirTtXv0hZ1MJz6hTaJ3W67K9nFAEFNBDa7cXLoQkNe T1dosbRjG+UVMXeyDSZifIi89phupu+nCDdS4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=tFzXeFYKx+2qwymrsNuActwNELpz5T7X7i1EI/bfYSVZQLoaSWrtuZjw4eQQ+NEroN H7tf4fFllwTa1oKekycwT+TeM13vqbspnStfRwx+RGc0gZj2KzNivyEbMq4WsPHbSGKV 1Dv5GV+ta8CptXWyuRdtQ7x9ppSEEI6RjpDoM= Received: by 10.42.174.200 with SMTP id w8mr5397524icz.376.1294732793398; Mon, 10 Jan 2011 23:59:53 -0800 (PST) Received: from [192.168.20.5] (c-24-130-151-210.hsd1.ca.comcast.net [24.130.151.210]) by mx.google.com with ESMTPS id y8sm4316862ica.2.2011.01.10.23.59.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 10 Jan 2011 23:59:52 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: Garrett Cooper In-Reply-To: <20110111072653.GD1923@garage.freebsd.pl> Date: Mon, 10 Jan 2011 23:59:47 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <7533FEDE-01C5-4939-85B9-35289A1BD95B@gmail.com> References: <201101101911.p0AJBQKG090310@svn.freebsd.org> <20110110220957.GB1923@garage.freebsd.pl> <20110111072653.GD1923@garage.freebsd.pl> To: Pawel Jakub Dawidek X-Mailer: Apple Mail (2.1082) Cc: Josh Paetzel , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Garrett Cooper Subject: Re: svn commit: r217229 - head/usr.sbin/pc-sysinstall/backend 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, 11 Jan 2011 07:59:54 -0000 On Jan 10, 2011, at 11:26 PM, Pawel Jakub Dawidek wrote: > On Mon, Jan 10, 2011 at 03:52:12PM -0800, Garrett Cooper wrote: >>>> + if [ "${FS}" !=3D "UFS" -a "${FS}" !=3D "UFS+S" -a "${FS}" = !=3D "UFS+J" -a "${FS}" !=3D "UFS+SUJ" ] ; then >>>=20 >>> Something like this should work too: >>>=20 >>> if [ "${FS%+*}" !=3D "UFS" ]; then >>=20 >> Except they're catching less than that: >>=20 >> $ FS=3DUFS+FOO >> $ echo ${FS%+*} >> UFS >> $ >=20 > You mean that invalid ${FS} values are catched? The code as it is = don't > handle them too. I expect those are handled somewhere earlier. =46rom = my > understanding the code wants to dected if this is any configuration of > UFS, so in my opinion my version is better as there are no = modifications > needed if some other UFS variant will appear in the future. Better for reducing churn, not better for user input; user input = will always ding you in the long run because users can do interesting = things :/... >>>> + if [ "$?" !=3D "0" ] ; then return ; fi >>>=20 >>> [ $? -eq 0 ] || return >>=20 >> if [ $? -eq 0 ]; then >> return >> fi >=20 > In that case -ne, as you reverted the logic. Yeah, what you said :}... >> is easier to follow for me because more people go buckwild with the >> one-liners (and in some cases have introduced bugs that way because >> they didn't properly think about precedence of the operations, etc). >=20 > I kinda started to like very simple and obvious one-liners in sh(1), = but > this is just a matter of taste. I used to like one-liners in perl, but that gets nasty too after = a while. It's much easier to trace indentations and track down what's = going on IMO than it is to trace down one-liners. python I live with = just because their one-liners can also be used for assignment purposes = (which is the only case I use it with). Thanks! -Garrett= From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 11:42:22 2011 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 81B22106564A; Tue, 11 Jan 2011 11:42:22 +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 7152D8FC13; Tue, 11 Jan 2011 11:42:22 +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 p0BBgM9q019151; Tue, 11 Jan 2011 11:42:22 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0BBgMjc019149; Tue, 11 Jan 2011 11:42:22 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201101111142.p0BBgMjc019149@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 11 Jan 2011 11:42: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: r217262 - head/sys/geom/nop 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, 11 Jan 2011 11:42:22 -0000 Author: ae Date: Tue Jan 11 11:42:22 2011 New Revision: 217262 URL: http://svn.freebsd.org/changeset/base/217262 Log: Round GNOP provider's mediasize to its sectorsize. This prevents KASSERT in g_io_request when geom classes doing tasting. PR: kern/147852 MFC after: 1 week Modified: head/sys/geom/nop/g_nop.c Modified: head/sys/geom/nop/g_nop.c ============================================================================== --- head/sys/geom/nop/g_nop.c Tue Jan 11 11:01:29 2011 (r217261) +++ head/sys/geom/nop/g_nop.c Tue Jan 11 11:42:22 2011 (r217262) @@ -176,6 +176,8 @@ g_nop_create(struct gctl_req *req, struc gctl_error(req, "Invalid secsize for provider %s.", pp->name); return (EINVAL); } + if (size % secsize != 0) + size -= size % secsize; snprintf(name, sizeof(name), "%s%s", pp->name, G_NOP_SUFFIX); LIST_FOREACH(gp, &mp->geom, geom) { if (strcmp(gp->name, name) == 0) { From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 13:12:37 2011 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 86C091065673; Tue, 11 Jan 2011 13:12:37 +0000 (UTC) (envelope-from giovanni.trematerra@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 97F938FC1E; Tue, 11 Jan 2011 13:12:35 +0000 (UTC) Received: by fxm16 with SMTP id 16so19931182fxm.13 for ; Tue, 11 Jan 2011 05:12:34 -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 :content-transfer-encoding; bh=D2prUlPbXnGU6f5LJz79QGHgrQcL+lig6rSKZ7qRsBQ=; b=pLvT9xvvBkIwiL51DBnGW3evme+o/rmsEFv09C5MZTTO+ok0AfRoNn1dGoLarvAntP 0jF6EIrI5WdvI0xGBUJXrxcddjH3VU38FNvCY7KCuvhS6WJS2FlQlIjQsccyO0a95rHH U8EKdTNWrpDyxu7cCQ6sEb6jvy3DtXtCMU/pg= 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:content-transfer-encoding; b=X1T7TtQj1F8a+AXAeYZzuv+gdzjv5MRrIeILOmghAXKzi6/LdnUT5fkQsjfX6sNAWi f2cQtoXtuaAC268BIVwdzL2hb1DDVVJ+ZGO7H8Gw7gVcKeh3OBKa9NzAhz8MWPc2oTp6 5VA1REEcLkAu4/jYep/z8ohAtwm24oLo6jNDM= MIME-Version: 1.0 Received: by 10.223.95.200 with SMTP id e8mr3184652fan.18.1294749923630; Tue, 11 Jan 2011 04:45:23 -0800 (PST) Received: by 10.223.100.6 with HTTP; Tue, 11 Jan 2011 04:45:23 -0800 (PST) In-Reply-To: <201101111142.p0BBgMjc019149@svn.freebsd.org> References: <201101111142.p0BBgMjc019149@svn.freebsd.org> Date: Tue, 11 Jan 2011 13:45:23 +0100 Message-ID: From: Giovanni Trematerra To: "Andrey V. Elsukov" 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: r217262 - head/sys/geom/nop 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, 11 Jan 2011 13:12:37 -0000 On Tue, Jan 11, 2011 at 12:42 PM, Andrey V. Elsukov wrote: > Author: ae > Date: Tue Jan 11 11:42:22 2011 > New Revision: 217262 > URL: http://svn.freebsd.org/changeset/base/217262 > > Log: > =A0Round GNOP provider's mediasize to its sectorsize. This prevents KASSE= RT > =A0in g_io_request when geom classes doing tasting. > > =A0PR: =A0 =A0 =A0 =A0 =A0 kern/147852 > =A0MFC after: =A0 =A01 week > > Modified: > =A0head/sys/geom/nop/g_nop.c > > Modified: head/sys/geom/nop/g_nop.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/geom/nop/g_nop.c =A0 Tue Jan 11 11:01:29 2011 =A0 =A0 =A0 = =A0(r217261) > +++ head/sys/geom/nop/g_nop.c =A0 Tue Jan 11 11:42:22 2011 =A0 =A0 =A0 = =A0(r217262) > @@ -176,6 +176,8 @@ g_nop_create(struct gctl_req *req, struc > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0gctl_error(req, "Invalid secsize for provi= der %s.", pp->name); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return (EINVAL); > =A0 =A0 =A0 =A0} > + =A0 =A0 =A0 if (size % secsize !=3D 0) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 size -=3D size % secsize; It seems to me that the if statement is redundant and you might use parenthesis around "size % secsize" just to have a better readability of the statement IMHO. -- Gianni From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 13:22:20 2011 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 E5F561065670; Tue, 11 Jan 2011 13:22:20 +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 D44CE8FC12; Tue, 11 Jan 2011 13:22: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 p0BDMKAt021517; Tue, 11 Jan 2011 13:22:20 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0BDMKVN021515; Tue, 11 Jan 2011 13:22:20 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201101111322.p0BDMKVN021515@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 11 Jan 2011 13:22: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: r217263 - head/sys/geom/nop 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, 11 Jan 2011 13:22:21 -0000 Author: ae Date: Tue Jan 11 13:22:20 2011 New Revision: 217263 URL: http://svn.freebsd.org/changeset/base/217263 Log: Remove redundant check. MFC after: 1 week Modified: head/sys/geom/nop/g_nop.c Modified: head/sys/geom/nop/g_nop.c ============================================================================== --- head/sys/geom/nop/g_nop.c Tue Jan 11 11:42:22 2011 (r217262) +++ head/sys/geom/nop/g_nop.c Tue Jan 11 13:22:20 2011 (r217263) @@ -176,8 +176,7 @@ g_nop_create(struct gctl_req *req, struc gctl_error(req, "Invalid secsize for provider %s.", pp->name); return (EINVAL); } - if (size % secsize != 0) - size -= size % secsize; + size -= size % secsize; snprintf(name, sizeof(name), "%s%s", pp->name, G_NOP_SUFFIX); LIST_FOREACH(gp, &mp->geom, geom) { if (strcmp(gp->name, name) == 0) { From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 13:33:42 2011 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 6AD9C1065697; Tue, 11 Jan 2011 13:33:42 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A73D8FC31; Tue, 11 Jan 2011 13:33: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 p0BDXgws021805; Tue, 11 Jan 2011 13:33:42 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0BDXgYE021803; Tue, 11 Jan 2011 13:33:42 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201101111333.p0BDXgYE021803@svn.freebsd.org> From: Gavin Atkinson Date: Tue, 11 Jan 2011 13:33: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: r217264 - head/share/man/man3 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, 11 Jan 2011 13:33:42 -0000 Author: gavin Date: Tue Jan 11 13:33:42 2011 New Revision: 217264 URL: http://svn.freebsd.org/changeset/base/217264 Log: Remove a bullet point that appears to have been accidentally inserted twice. It has also been included within the feature lists to which it is relevant. Submitted by: tobez MFC after: 1 week Modified: head/share/man/man3/queue.3 Modified: head/share/man/man3/queue.3 ============================================================================== --- head/share/man/man3/queue.3 Tue Jan 11 13:22:20 2011 (r217263) +++ head/share/man/man3/queue.3 Tue Jan 11 13:33:42 2011 (r217264) @@ -186,7 +186,6 @@ O(1) removal of an entry from the head o Forward traversal through the list. .El .Pp -O(n) removal of any entry in the list. Singly-linked lists are the simplest of the four data structures and support only the above functionality. Singly-linked lists are ideal for applications with large datasets From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 13:59:07 2011 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 B0C4E1065673; Tue, 11 Jan 2011 13:59:07 +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 9BB718FC08; Tue, 11 Jan 2011 13:59: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 p0BDx7g2022470; Tue, 11 Jan 2011 13:59:07 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0BDx6n1022368; Tue, 11 Jan 2011 13:59:06 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201101111359.p0BDx6n1022368@svn.freebsd.org> From: John Baldwin Date: Tue, 11 Jan 2011 13:59: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: r217265 - in head/sys: arm/econa cam dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/misc dev/usb/net dev/usb/quirk dev/usb/serial dev/usb/storage dev/usb/template ia64/a... 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, 11 Jan 2011 13:59:07 -0000 Author: jhb Date: Tue Jan 11 13:59:06 2011 New Revision: 217265 URL: http://svn.freebsd.org/changeset/base/217265 Log: Remove unneeded includes of . Other headers that use it internally contain nested includes. Reviewed by: bde Modified: head/sys/arm/econa/ehci_ebus.c head/sys/arm/econa/ohci_ec.c head/sys/cam/cam_periph.c head/sys/dev/sound/usb/uaudio.c head/sys/dev/usb/controller/at91dci.c head/sys/dev/usb/controller/at91dci_atmelarm.c head/sys/dev/usb/controller/atmegadci.c head/sys/dev/usb/controller/atmegadci_atmelarm.c head/sys/dev/usb/controller/avr32dci.c head/sys/dev/usb/controller/ehci.c head/sys/dev/usb/controller/ehci_ixp4xx.c head/sys/dev/usb/controller/ehci_mv.c head/sys/dev/usb/controller/ehci_pci.c head/sys/dev/usb/controller/musb_otg.c head/sys/dev/usb/controller/musb_otg_atmelarm.c head/sys/dev/usb/controller/ohci.c head/sys/dev/usb/controller/ohci_atmelarm.c head/sys/dev/usb/controller/ohci_pci.c head/sys/dev/usb/controller/ohci_s3c24x0.c head/sys/dev/usb/controller/uhci.c head/sys/dev/usb/controller/uhci_pci.c head/sys/dev/usb/controller/usb_controller.c head/sys/dev/usb/controller/uss820dci.c head/sys/dev/usb/controller/uss820dci_atmelarm.c head/sys/dev/usb/controller/xhci.c head/sys/dev/usb/controller/xhci_pci.c head/sys/dev/usb/input/uhid.c head/sys/dev/usb/input/ukbd.c head/sys/dev/usb/input/ums.c head/sys/dev/usb/misc/udbp.c head/sys/dev/usb/misc/ufm.c head/sys/dev/usb/net/if_aue.c head/sys/dev/usb/net/if_axe.c head/sys/dev/usb/net/if_cdce.c head/sys/dev/usb/net/if_cue.c head/sys/dev/usb/net/if_ipheth.c head/sys/dev/usb/net/if_kue.c head/sys/dev/usb/net/if_rue.c head/sys/dev/usb/net/if_udav.c head/sys/dev/usb/net/usb_ethernet.c head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/serial/uark.c head/sys/dev/usb/serial/ubsa.c head/sys/dev/usb/serial/ubser.c head/sys/dev/usb/serial/uchcom.c head/sys/dev/usb/serial/ucycom.c head/sys/dev/usb/serial/ufoma.c head/sys/dev/usb/serial/uftdi.c head/sys/dev/usb/serial/ugensa.c head/sys/dev/usb/serial/uipaq.c head/sys/dev/usb/serial/ulpt.c head/sys/dev/usb/serial/umct.c head/sys/dev/usb/serial/umodem.c head/sys/dev/usb/serial/umoscom.c head/sys/dev/usb/serial/uplcom.c head/sys/dev/usb/serial/usb_serial.c head/sys/dev/usb/serial/uslcom.c head/sys/dev/usb/serial/uvisor.c head/sys/dev/usb/serial/uvscom.c head/sys/dev/usb/storage/umass.c head/sys/dev/usb/storage/urio.c head/sys/dev/usb/storage/ustorage_fs.c head/sys/dev/usb/template/usb_template.c head/sys/dev/usb/template/usb_template_cdce.c head/sys/dev/usb/template/usb_template_msc.c head/sys/dev/usb/template/usb_template_mtp.c head/sys/dev/usb/usb_busdma.c head/sys/dev/usb/usb_compat_linux.c head/sys/dev/usb/usb_core.c head/sys/dev/usb/usb_debug.c head/sys/dev/usb/usb_dev.c head/sys/dev/usb/usb_device.c head/sys/dev/usb/usb_dynamic.c head/sys/dev/usb/usb_error.c head/sys/dev/usb/usb_generic.c head/sys/dev/usb/usb_handle_request.c head/sys/dev/usb/usb_hid.c head/sys/dev/usb/usb_hub.c head/sys/dev/usb/usb_lookup.c head/sys/dev/usb/usb_mbuf.c head/sys/dev/usb/usb_msctest.c head/sys/dev/usb/usb_parse.c head/sys/dev/usb/usb_process.c head/sys/dev/usb/usb_request.c head/sys/dev/usb/usb_transfer.c head/sys/dev/usb/usb_util.c head/sys/ia64/acpica/OsdEnvironment.c head/sys/kern/kern_lock.c head/sys/kern/kern_sx.c head/sys/kern/subr_lock.c head/sys/kern/subr_pcpu.c head/sys/mips/cavium/usb/octusb.c head/sys/mips/cavium/usb/octusb_octeon.c head/sys/mips/rmi/xls_ehci.c head/sys/net/vnet.c head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c head/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c head/sys/powerpc/ps3/ehci_ps3.c head/sys/sparc64/sparc64/db_trace.c head/sys/sparc64/sparc64/tlb.c head/sys/sparc64/sparc64/tsb.c head/sys/sparc64/sparc64/vm_machdep.c head/sys/sun4v/sun4v/db_interface.c head/sys/sun4v/sun4v/db_trace.c head/sys/sun4v/sun4v/vm_machdep.c head/sys/vm/phys_pager.c head/sys/vm/vm_contig.c head/sys/x86/acpica/OsdEnvironment.c Modified: head/sys/arm/econa/ehci_ebus.c ============================================================================== --- head/sys/arm/econa/ehci_ebus.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/arm/econa/ehci_ebus.c Tue Jan 11 13:59:06 2011 (r217265) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/arm/econa/ohci_ec.c ============================================================================== --- head/sys/arm/econa/ohci_ec.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/arm/econa/ohci_ec.c Tue Jan 11 13:59:06 2011 (r217265) @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/cam/cam_periph.c Tue Jan 11 13:59:06 2011 (r217265) @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/sound/usb/uaudio.c Tue Jan 11 13:59:06 2011 (r217265) @@ -53,7 +53,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/controller/at91dci.c ============================================================================== --- head/sys/dev/usb/controller/at91dci.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/controller/at91dci.c Tue Jan 11 13:59:06 2011 (r217265) @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/controller/at91dci_atmelarm.c ============================================================================== --- head/sys/dev/usb/controller/at91dci_atmelarm.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/controller/at91dci_atmelarm.c Tue Jan 11 13:59:06 2011 (r217265) @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/controller/atmegadci.c ============================================================================== --- head/sys/dev/usb/controller/atmegadci.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/controller/atmegadci.c Tue Jan 11 13:59:06 2011 (r217265) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/controller/atmegadci_atmelarm.c ============================================================================== --- head/sys/dev/usb/controller/atmegadci_atmelarm.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/controller/atmegadci_atmelarm.c Tue Jan 11 13:59:06 2011 (r217265) @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/controller/avr32dci.c ============================================================================== --- head/sys/dev/usb/controller/avr32dci.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/controller/avr32dci.c Tue Jan 11 13:59:06 2011 (r217265) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/controller/ehci.c ============================================================================== --- head/sys/dev/usb/controller/ehci.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/controller/ehci.c Tue Jan 11 13:59:06 2011 (r217265) @@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/controller/ehci_ixp4xx.c ============================================================================== --- head/sys/dev/usb/controller/ehci_ixp4xx.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/controller/ehci_ixp4xx.c Tue Jan 11 13:59:06 2011 (r217265) @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/controller/ehci_mv.c ============================================================================== --- head/sys/dev/usb/controller/ehci_mv.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/controller/ehci_mv.c Tue Jan 11 13:59:06 2011 (r217265) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- head/sys/dev/usb/controller/ehci_pci.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/controller/ehci_pci.c Tue Jan 11 13:59:06 2011 (r217265) @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/controller/musb_otg.c ============================================================================== --- head/sys/dev/usb/controller/musb_otg.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/controller/musb_otg.c Tue Jan 11 13:59:06 2011 (r217265) @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/controller/musb_otg_atmelarm.c ============================================================================== --- head/sys/dev/usb/controller/musb_otg_atmelarm.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/controller/musb_otg_atmelarm.c Tue Jan 11 13:59:06 2011 (r217265) @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/controller/ohci.c ============================================================================== --- head/sys/dev/usb/controller/ohci.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/controller/ohci.c Tue Jan 11 13:59:06 2011 (r217265) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/controller/ohci_atmelarm.c ============================================================================== --- head/sys/dev/usb/controller/ohci_atmelarm.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/controller/ohci_atmelarm.c Tue Jan 11 13:59:06 2011 (r217265) @@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/controller/ohci_pci.c ============================================================================== --- head/sys/dev/usb/controller/ohci_pci.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/controller/ohci_pci.c Tue Jan 11 13:59:06 2011 (r217265) @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/controller/ohci_s3c24x0.c ============================================================================== --- head/sys/dev/usb/controller/ohci_s3c24x0.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/controller/ohci_s3c24x0.c Tue Jan 11 13:59:06 2011 (r217265) @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/controller/uhci.c ============================================================================== --- head/sys/dev/usb/controller/uhci.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/controller/uhci.c Tue Jan 11 13:59:06 2011 (r217265) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/controller/uhci_pci.c ============================================================================== --- head/sys/dev/usb/controller/uhci_pci.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/controller/uhci_pci.c Tue Jan 11 13:59:06 2011 (r217265) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/controller/usb_controller.c ============================================================================== --- head/sys/dev/usb/controller/usb_controller.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/controller/usb_controller.c Tue Jan 11 13:59:06 2011 (r217265) @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/controller/uss820dci.c ============================================================================== --- head/sys/dev/usb/controller/uss820dci.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/controller/uss820dci.c Tue Jan 11 13:59:06 2011 (r217265) @@ -40,7 +40,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/controller/uss820dci_atmelarm.c ============================================================================== --- head/sys/dev/usb/controller/uss820dci_atmelarm.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/controller/uss820dci_atmelarm.c Tue Jan 11 13:59:06 2011 (r217265) @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/controller/xhci.c ============================================================================== --- head/sys/dev/usb/controller/xhci.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/controller/xhci.c Tue Jan 11 13:59:06 2011 (r217265) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- head/sys/dev/usb/controller/xhci_pci.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/controller/xhci_pci.c Tue Jan 11 13:59:06 2011 (r217265) @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/input/uhid.c ============================================================================== --- head/sys/dev/usb/input/uhid.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/input/uhid.c Tue Jan 11 13:59:06 2011 (r217265) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/input/ukbd.c Tue Jan 11 13:59:06 2011 (r217265) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/input/ums.c ============================================================================== --- head/sys/dev/usb/input/ums.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/input/ums.c Tue Jan 11 13:59:06 2011 (r217265) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/misc/udbp.c ============================================================================== --- head/sys/dev/usb/misc/udbp.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/misc/udbp.c Tue Jan 11 13:59:06 2011 (r217265) @@ -65,7 +65,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/misc/ufm.c ============================================================================== --- head/sys/dev/usb/misc/ufm.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/misc/ufm.c Tue Jan 11 13:59:06 2011 (r217265) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/net/if_aue.c ============================================================================== --- head/sys/dev/usb/net/if_aue.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/net/if_aue.c Tue Jan 11 13:59:06 2011 (r217265) @@ -76,7 +76,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/net/if_axe.c ============================================================================== --- head/sys/dev/usb/net/if_axe.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/net/if_axe.c Tue Jan 11 13:59:06 2011 (r217265) @@ -84,7 +84,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/net/if_cdce.c ============================================================================== --- head/sys/dev/usb/net/if_cdce.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/net/if_cdce.c Tue Jan 11 13:59:06 2011 (r217265) @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/net/if_cue.c ============================================================================== --- head/sys/dev/usb/net/if_cue.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/net/if_cue.c Tue Jan 11 13:59:06 2011 (r217265) @@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/net/if_ipheth.c ============================================================================== --- head/sys/dev/usb/net/if_ipheth.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/net/if_ipheth.c Tue Jan 11 13:59:06 2011 (r217265) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/net/if_kue.c ============================================================================== --- head/sys/dev/usb/net/if_kue.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/net/if_kue.c Tue Jan 11 13:59:06 2011 (r217265) @@ -73,7 +73,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/net/if_rue.c ============================================================================== --- head/sys/dev/usb/net/if_rue.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/net/if_rue.c Tue Jan 11 13:59:06 2011 (r217265) @@ -73,7 +73,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/net/if_udav.c ============================================================================== --- head/sys/dev/usb/net/if_udav.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/net/if_udav.c Tue Jan 11 13:59:06 2011 (r217265) @@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/net/usb_ethernet.c ============================================================================== --- head/sys/dev/usb/net/usb_ethernet.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/net/usb_ethernet.c Tue Jan 11 13:59:06 2011 (r217265) @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/quirk/usb_quirk.c Tue Jan 11 13:59:06 2011 (r217265) @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/serial/u3g.c Tue Jan 11 13:59:06 2011 (r217265) @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/serial/uark.c ============================================================================== --- head/sys/dev/usb/serial/uark.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/serial/uark.c Tue Jan 11 13:59:06 2011 (r217265) @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/serial/ubsa.c ============================================================================== --- head/sys/dev/usb/serial/ubsa.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/serial/ubsa.c Tue Jan 11 13:59:06 2011 (r217265) @@ -70,7 +70,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/serial/ubser.c ============================================================================== --- head/sys/dev/usb/serial/ubser.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/serial/ubser.c Tue Jan 11 13:59:06 2011 (r217265) @@ -84,7 +84,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/serial/uchcom.c ============================================================================== --- head/sys/dev/usb/serial/uchcom.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/serial/uchcom.c Tue Jan 11 13:59:06 2011 (r217265) @@ -78,7 +78,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/serial/ucycom.c ============================================================================== --- head/sys/dev/usb/serial/ucycom.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/serial/ucycom.c Tue Jan 11 13:59:06 2011 (r217265) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/serial/ufoma.c ============================================================================== --- head/sys/dev/usb/serial/ufoma.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/serial/ufoma.c Tue Jan 11 13:59:06 2011 (r217265) @@ -90,7 +90,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/serial/uftdi.c ============================================================================== --- head/sys/dev/usb/serial/uftdi.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/serial/uftdi.c Tue Jan 11 13:59:06 2011 (r217265) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/serial/ugensa.c ============================================================================== --- head/sys/dev/usb/serial/ugensa.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/serial/ugensa.c Tue Jan 11 13:59:06 2011 (r217265) @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/serial/uipaq.c ============================================================================== --- head/sys/dev/usb/serial/uipaq.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/serial/uipaq.c Tue Jan 11 13:59:06 2011 (r217265) @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/serial/ulpt.c ============================================================================== --- head/sys/dev/usb/serial/ulpt.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/serial/ulpt.c Tue Jan 11 13:59:06 2011 (r217265) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/serial/umct.c ============================================================================== --- head/sys/dev/usb/serial/umct.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/serial/umct.c Tue Jan 11 13:59:06 2011 (r217265) @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/serial/umodem.c ============================================================================== --- head/sys/dev/usb/serial/umodem.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/serial/umodem.c Tue Jan 11 13:59:06 2011 (r217265) @@ -88,7 +88,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/serial/umoscom.c ============================================================================== --- head/sys/dev/usb/serial/umoscom.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/serial/umoscom.c Tue Jan 11 13:59:06 2011 (r217265) @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/serial/uplcom.c ============================================================================== --- head/sys/dev/usb/serial/uplcom.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/serial/uplcom.c Tue Jan 11 13:59:06 2011 (r217265) @@ -92,7 +92,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/serial/usb_serial.c ============================================================================== --- head/sys/dev/usb/serial/usb_serial.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/serial/usb_serial.c Tue Jan 11 13:59:06 2011 (r217265) @@ -75,7 +75,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/serial/uslcom.c ============================================================================== --- head/sys/dev/usb/serial/uslcom.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/serial/uslcom.c Tue Jan 11 13:59:06 2011 (r217265) @@ -27,7 +27,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/serial/uvisor.c ============================================================================== --- head/sys/dev/usb/serial/uvisor.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/serial/uvisor.c Tue Jan 11 13:59:06 2011 (r217265) @@ -55,7 +55,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/serial/uvscom.c ============================================================================== --- head/sys/dev/usb/serial/uvscom.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/serial/uvscom.c Tue Jan 11 13:59:06 2011 (r217265) @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/storage/umass.c ============================================================================== --- head/sys/dev/usb/storage/umass.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/storage/umass.c Tue Jan 11 13:59:06 2011 (r217265) @@ -110,7 +110,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/storage/urio.c ============================================================================== --- head/sys/dev/usb/storage/urio.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/storage/urio.c Tue Jan 11 13:59:06 2011 (r217265) @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/storage/ustorage_fs.c ============================================================================== --- head/sys/dev/usb/storage/ustorage_fs.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/storage/ustorage_fs.c Tue Jan 11 13:59:06 2011 (r217265) @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/template/usb_template.c ============================================================================== --- head/sys/dev/usb/template/usb_template.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/template/usb_template.c Tue Jan 11 13:59:06 2011 (r217265) @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/template/usb_template_cdce.c ============================================================================== --- head/sys/dev/usb/template/usb_template_cdce.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/template/usb_template_cdce.c Tue Jan 11 13:59:06 2011 (r217265) @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/template/usb_template_msc.c ============================================================================== --- head/sys/dev/usb/template/usb_template_msc.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/template/usb_template_msc.c Tue Jan 11 13:59:06 2011 (r217265) @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/template/usb_template_mtp.c ============================================================================== --- head/sys/dev/usb/template/usb_template_mtp.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/template/usb_template_mtp.c Tue Jan 11 13:59:06 2011 (r217265) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/usb_busdma.c ============================================================================== --- head/sys/dev/usb/usb_busdma.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/usb_busdma.c Tue Jan 11 13:59:06 2011 (r217265) @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/usb_compat_linux.c ============================================================================== --- head/sys/dev/usb/usb_compat_linux.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/usb_compat_linux.c Tue Jan 11 13:59:06 2011 (r217265) @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/usb_core.c ============================================================================== --- head/sys/dev/usb/usb_core.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/usb_core.c Tue Jan 11 13:59:06 2011 (r217265) @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/usb_debug.c ============================================================================== --- head/sys/dev/usb/usb_debug.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/usb_debug.c Tue Jan 11 13:59:06 2011 (r217265) @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/usb_dev.c ============================================================================== --- head/sys/dev/usb/usb_dev.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/usb_dev.c Tue Jan 11 13:59:06 2011 (r217265) @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/usb_device.c ============================================================================== --- head/sys/dev/usb/usb_device.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/usb_device.c Tue Jan 11 13:59:06 2011 (r217265) @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/usb_dynamic.c ============================================================================== --- head/sys/dev/usb/usb_dynamic.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/usb_dynamic.c Tue Jan 11 13:59:06 2011 (r217265) @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/usb_error.c ============================================================================== --- head/sys/dev/usb/usb_error.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/usb_error.c Tue Jan 11 13:59:06 2011 (r217265) @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/usb_generic.c ============================================================================== --- head/sys/dev/usb/usb_generic.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/usb_generic.c Tue Jan 11 13:59:06 2011 (r217265) @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/usb_handle_request.c ============================================================================== --- head/sys/dev/usb/usb_handle_request.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/usb_handle_request.c Tue Jan 11 13:59:06 2011 (r217265) @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/usb_hid.c ============================================================================== --- head/sys/dev/usb/usb_hid.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/usb_hid.c Tue Jan 11 13:59:06 2011 (r217265) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/usb_hub.c ============================================================================== --- head/sys/dev/usb/usb_hub.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/usb_hub.c Tue Jan 11 13:59:06 2011 (r217265) @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/usb_lookup.c ============================================================================== --- head/sys/dev/usb/usb_lookup.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/usb_lookup.c Tue Jan 11 13:59:06 2011 (r217265) @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/usb_mbuf.c ============================================================================== --- head/sys/dev/usb/usb_mbuf.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/usb_mbuf.c Tue Jan 11 13:59:06 2011 (r217265) @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/usb_msctest.c ============================================================================== --- head/sys/dev/usb/usb_msctest.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/usb_msctest.c Tue Jan 11 13:59:06 2011 (r217265) @@ -40,7 +40,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/usb_parse.c ============================================================================== --- head/sys/dev/usb/usb_parse.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/usb_parse.c Tue Jan 11 13:59:06 2011 (r217265) @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/usb_process.c ============================================================================== --- head/sys/dev/usb/usb_process.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/usb_process.c Tue Jan 11 13:59:06 2011 (r217265) @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/usb_request.c ============================================================================== --- head/sys/dev/usb/usb_request.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/usb_request.c Tue Jan 11 13:59:06 2011 (r217265) @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/usb_transfer.c ============================================================================== --- head/sys/dev/usb/usb_transfer.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/usb_transfer.c Tue Jan 11 13:59:06 2011 (r217265) @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/dev/usb/usb_util.c ============================================================================== --- head/sys/dev/usb/usb_util.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/dev/usb/usb_util.c Tue Jan 11 13:59:06 2011 (r217265) @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/ia64/acpica/OsdEnvironment.c ============================================================================== --- head/sys/ia64/acpica/OsdEnvironment.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/ia64/acpica/OsdEnvironment.c Tue Jan 11 13:59:06 2011 (r217265) @@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include Modified: head/sys/kern/kern_lock.c ============================================================================== --- head/sys/kern/kern_lock.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/kern/kern_lock.c Tue Jan 11 13:59:06 2011 (r217265) @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/kern/kern_sx.c Tue Jan 11 13:59:06 2011 (r217265) @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/sys/kern/subr_lock.c ============================================================================== --- head/sys/kern/subr_lock.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/kern/subr_lock.c Tue Jan 11 13:59:06 2011 (r217265) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/kern/subr_pcpu.c ============================================================================== --- head/sys/kern/subr_pcpu.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/kern/subr_pcpu.c Tue Jan 11 13:59:06 2011 (r217265) @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/mips/cavium/usb/octusb.c ============================================================================== --- head/sys/mips/cavium/usb/octusb.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/mips/cavium/usb/octusb.c Tue Jan 11 13:59:06 2011 (r217265) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/mips/cavium/usb/octusb_octeon.c ============================================================================== --- head/sys/mips/cavium/usb/octusb_octeon.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/mips/cavium/usb/octusb_octeon.c Tue Jan 11 13:59:06 2011 (r217265) @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/mips/rmi/xls_ehci.c ============================================================================== --- head/sys/mips/rmi/xls_ehci.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/mips/rmi/xls_ehci.c Tue Jan 11 13:59:06 2011 (r217265) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/net/vnet.c ============================================================================== --- head/sys/net/vnet.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/net/vnet.c Tue Jan 11 13:59:06 2011 (r217265) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c ============================================================================== --- head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Tue Jan 11 13:59:06 2011 (r217265) @@ -100,7 +100,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c ============================================================================== --- head/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c Tue Jan 11 13:59:06 2011 (r217265) @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/powerpc/ps3/ehci_ps3.c ============================================================================== --- head/sys/powerpc/ps3/ehci_ps3.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/powerpc/ps3/ehci_ps3.c Tue Jan 11 13:59:06 2011 (r217265) @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/sparc64/sparc64/db_trace.c ============================================================================== --- head/sys/sparc64/sparc64/db_trace.c Tue Jan 11 13:33:42 2011 (r217264) +++ head/sys/sparc64/sparc64/db_trace.c Tue Jan 11 13:59:06 2011 (r217265) @@ -30,7 +30,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 14:58:42 2011 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 B601B1065679; Tue, 11 Jan 2011 14:58:42 +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 86E908FC14; Tue, 11 Jan 2011 14:58:42 +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 38F6546B1A; Tue, 11 Jan 2011 09:58:42 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 74E588A01D; Tue, 11 Jan 2011 09:58:41 -0500 (EST) From: John Baldwin To: Doug Barton Date: Tue, 11 Jan 2011 08:47:24 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.4-CBSD-20110107; KDE/4.4.5; amd64; ; ) References: <201101092347.p09NlB4M060802@svn.freebsd.org> <201101101433.18847.jhb@freebsd.org> <4D2BE4F8.3030902@FreeBSD.org> In-Reply-To: <4D2BE4F8.3030902@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201101110847.24284.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 11 Jan 2011 09:58:41 -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: r217213 - head/lib/bind 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, 11 Jan 2011 14:58:42 -0000 On Tuesday, January 11, 2011 12:04:56 am Doug Barton wrote: > On 01/10/2011 11:33, John Baldwin wrote: > > On Sunday, January 09, 2011 6:47:11 pm Doug Barton wrote: > > >> # Use the right version of the atomic.h file from lib/isc > >> -ISC_ATOMIC_ARCH=${MACHINE_CPUARCH:S/i386/x86_32/:S/amd64/x86_32/} > >> +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" > > > > This should use MACHINE_CPUARCH instead of MACHINE_ARCH? > > When this block was first written I don't think _CPUARCH existed at all, > and/or had not been MFC'ed. Subsequently, nwhitehorn made the change in > r209886 to use _CPUARCH in both places, however the diff from Warner's > commit in r217071 (which is what I based my change on) clearly showed > _ARCH > (http://svn.freebsd.org/viewvc/base/head/lib/bind/config.mk?r1=209886&r2=217071). > So, I'm not sure where svn went sideways there, but it's definitely "odd." Huh? Warner's change only used MACHINE_CPUARCH: ISC_ATOMIC_ARCH=${MACHINE_CPUARCH:S/i386/x86_32/:S/amd64/x86_32/} Nowhere in that line is MACHINE_ARCH used. Only MACHINE_CPUARCH is used. > I have no objection to putting it back to the state that it was in at > r209886, although frankly less diffs to RELENG_[78] without good reason > make my life easier. 209886 did not use MACHINE_CPUARCH for ISC_ATOMIC_ARCH, and in fact the file is now back to the 209886 state (nwhitehorn did not change ISC_ATOMIC_ARCH to use MACHINE_CPUARCH). Fixing this does create diffs to [78] because MACHINE_CPUARCH is not present at all in [78], but that is because [78]'s handling of different endians for mips, arm, etc. is deficient. You are likely stuck with using MACHINE_CPUARCH for 9+ and MACHINE_ARCH for <= 8. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 18:32:06 2011 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 2B9C3106564A; Tue, 11 Jan 2011 18:32:06 +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 1B7708FC08; Tue, 11 Jan 2011 18:32: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 p0BIW6ad030723; Tue, 11 Jan 2011 18:32:06 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0BIW5bN030721; Tue, 11 Jan 2011 18:32:05 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201101111832.p0BIW5bN030721@svn.freebsd.org> From: Warner Losh Date: Tue, 11 Jan 2011 18:32: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: r217273 - 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: Tue, 11 Jan 2011 18:32:06 -0000 Author: imp Date: Tue Jan 11 18:32:05 2011 New Revision: 217273 URL: http://svn.freebsd.org/changeset/base/217273 Log: Minor improvements in the wording of a comment. Document tinderbox target. Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Tue Jan 11 17:33:29 2011 (r217272) +++ head/Makefile Tue Jan 11 18:32:05 2011 (r217273) @@ -5,6 +5,7 @@ # # universe - *Really* build *everything* (buildworld and # all kernels on all architectures). +# tinderbox - Same as universe, but stop on first failure. # buildworld - Rebuild *everything*, including glue to help do # upgrades. # installworld - Install everything built by "buildworld". @@ -35,7 +36,8 @@ # tree. This makefile executes a child make process, forcing it to use # the mk files from the source tree which are supposed to DTRT. # -# The user-driven targets (as listed above) are implemented in Makefile.inc1. +# Most of the user-driven targets (as listed above) are implemented in +# Makefile.inc1. The exceptions are universe, tingerbox and targets. # # If you want to build your system from source be sure that /usr/obj has # at least 800MB of diskspace available. From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 18:49:14 2011 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 885531065674 for ; Tue, 11 Jan 2011 18:49:14 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id D93958FC14 for ; Tue, 11 Jan 2011 18:49:13 +0000 (UTC) Received: (qmail 9785 invoked by uid 399); 11 Jan 2011 18:49:11 -0000 Received: from localhost (HELO doug-optiplex.ka9q.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 11 Jan 2011 18:49:11 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4D2CA626.4030207@FreeBSD.org> Date: Tue, 11 Jan 2011 10:49:10 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.13) Gecko/20101210 Thunderbird/3.1.7 MIME-Version: 1.0 To: John Baldwin References: <201101092347.p09NlB4M060802@svn.freebsd.org> <201101101433.18847.jhb@freebsd.org> <4D2BE4F8.3030902@FreeBSD.org> <201101110847.24284.jhb@freebsd.org> In-Reply-To: <201101110847.24284.jhb@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: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r217213 - head/lib/bind 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, 11 Jan 2011 18:49:14 -0000 On 01/11/2011 05:47, John Baldwin wrote: > On Tuesday, January 11, 2011 12:04:56 am Doug Barton wrote: >> On 01/10/2011 11:33, John Baldwin wrote: >>> On Sunday, January 09, 2011 6:47:11 pm Doug Barton wrote: >> >>>> # Use the right version of the atomic.h file from lib/isc >>>> -ISC_ATOMIC_ARCH=${MACHINE_CPUARCH:S/i386/x86_32/:S/amd64/x86_32/} >>>> +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" >>> >>> This should use MACHINE_CPUARCH instead of MACHINE_ARCH? >> >> When this block was first written I don't think _CPUARCH existed at all, >> and/or had not been MFC'ed. Subsequently, nwhitehorn made the change in >> r209886 to use _CPUARCH in both places, however the diff from Warner's >> commit in r217071 (which is what I based my change on) clearly showed >> _ARCH >> > (http://svn.freebsd.org/viewvc/base/head/lib/bind/config.mk?r1=209886&r2=217071). >> So, I'm not sure where svn went sideways there, but it's definitely "odd." > > Huh? Warner's change only used MACHINE_CPUARCH: That's not what I said at all. I took a lot of time to research and document what I wrote, the least you could do is take a few minutes to read it carefully. This is the diff from the previous version to nwhitehorn's version: --- head/lib/bind/config.mk 2009/06/01 21:58:59 193280 +++ head/lib/bind/config.mk 2010/07/10 17:46:53 209886 @@ -45,7 +45,7 @@ CFLAGS+= -DUSE_MD5 # Endianness -.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "sparc64" CFLAGS+= -DWORDS_BIGENDIAN .endif @@ -67,7 +67,7 @@ .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" ISC_ATOMIC_ARCH= x86_32 .else -ISC_ATOMIC_ARCH= ${MACHINE_ARCH} +ISC_ATOMIC_ARCH= ${MACHINE_CPUARCH} .endif # Optional features This is the diff from what should have been Nathan's version to Warner's: --- head/lib/bind/config.mk 2010/07/10 17:46:53 209886 +++ head/lib/bind/config.mk 2011/01/06 21:07:51 217071 @@ -1,6 +1,7 @@ # $FreeBSD$ .include +.include # BIND version number .if defined(BIND_DIR) && exists(${BIND_DIR}/version) @@ -45,7 +46,7 @@ CFLAGS+= -DUSE_MD5 # Endianness -.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "sparc64" +.if ${TARGET_ENDIANNESS} == 4321 CFLAGS+= -DWORDS_BIGENDIAN .endif @@ -64,11 +65,7 @@ .endif # Use the right version of the atomic.h file from lib/isc -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" -ISC_ATOMIC_ARCH= x86_32 -.else -ISC_ATOMIC_ARCH= ${MACHINE_CPUARCH} -.endif +ISC_ATOMIC_ARCH=${MACHINE_CPUARCH:S/i386/x86_32/:S/amd64/x86_32/} # Optional features .if ${MK_BIND_LARGE_FILE} == "yes" @@ -121,4 +118,3 @@ PTHREAD_DPADD= ${LIBPTHREAD} PTHREAD_LDADD= -lpthread Please note that the code Warner removed had the following line: -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" I have no idea how svn managed to fsck that up, but that is what I reverted back to when I made the commit in r217213. If you're still confused, please review the svn history yourself. Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 19:00:17 2011 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 E57F7106564A; Tue, 11 Jan 2011 19:00:16 +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 4145C8FC2B; Tue, 11 Jan 2011 19:00: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 E218146B0D; Tue, 11 Jan 2011 14:00:09 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E504A8A009; Tue, 11 Jan 2011 14:00:08 -0500 (EST) From: John Baldwin To: Doug Barton Date: Tue, 11 Jan 2011 14:00:07 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.4-CBSD-20110107; KDE/4.4.5; amd64; ; ) References: <201101092347.p09NlB4M060802@svn.freebsd.org> <201101110847.24284.jhb@freebsd.org> <4D2CA626.4030207@FreeBSD.org> In-Reply-To: <4D2CA626.4030207@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201101111400.08224.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 11 Jan 2011 14:00:09 -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: r217213 - head/lib/bind 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, 11 Jan 2011 19:00:17 -0000 On Tuesday, January 11, 2011 1:49:10 pm Doug Barton wrote: > On 01/11/2011 05:47, John Baldwin wrote: > > On Tuesday, January 11, 2011 12:04:56 am Doug Barton wrote: > >> On 01/10/2011 11:33, John Baldwin wrote: > >>> On Sunday, January 09, 2011 6:47:11 pm Doug Barton wrote: > >> > >>>> # Use the right version of the atomic.h file from lib/isc > >>>> -ISC_ATOMIC_ARCH=${MACHINE_CPUARCH:S/i386/x86_32/:S/amd64/x86_32/} > >>>> +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" > >>> > >>> This should use MACHINE_CPUARCH instead of MACHINE_ARCH? > >> > >> When this block was first written I don't think _CPUARCH existed at all, > >> and/or had not been MFC'ed. Subsequently, nwhitehorn made the change in > >> r209886 to use _CPUARCH in both places, however the diff from Warner's > >> commit in r217071 (which is what I based my change on) clearly showed > >> _ARCH > >> > > (http://svn.freebsd.org/viewvc/base/head/lib/bind/config.mk?r1=209886&r2=217071). > >> So, I'm not sure where svn went sideways there, but it's definitely "odd." > > > > Huh? Warner's change only used MACHINE_CPUARCH: > > That's not what I said at all. I took a lot of time to research and > document what I wrote, the least you could do is take a few minutes to > read it carefully. > > This is the diff from the previous version to nwhitehorn's version: > > --- head/lib/bind/config.mk 2009/06/01 21:58:59 193280 > +++ head/lib/bind/config.mk 2010/07/10 17:46:53 209886 > @@ -45,7 +45,7 @@ > CFLAGS+= -DUSE_MD5 > > # Endianness > -.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64" > +.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "sparc64" > CFLAGS+= -DWORDS_BIGENDIAN > .endif > > @@ -67,7 +67,7 @@ > .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" And _this_ line is still MACHINE_ARCH here, which is wrong. This should use MACHINE_CPUARCH. That is the only line I have been talking about the entire time. > ISC_ATOMIC_ARCH= x86_32 > .else > -ISC_ATOMIC_ARCH= ${MACHINE_ARCH} > +ISC_ATOMIC_ARCH= ${MACHINE_CPUARCH} > .endif > > # Optional features > > > This is the diff from what should have been Nathan's version to Warner's: > > --- head/lib/bind/config.mk 2010/07/10 17:46:53 209886 > +++ head/lib/bind/config.mk 2011/01/06 21:07:51 217071 > @@ -1,6 +1,7 @@ > # $FreeBSD$ > > .include > +.include > > # BIND version number > .if defined(BIND_DIR) && exists(${BIND_DIR}/version) > @@ -45,7 +46,7 @@ > CFLAGS+= -DUSE_MD5 > > # Endianness > -.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "sparc64" > +.if ${TARGET_ENDIANNESS} == 4321 > CFLAGS+= -DWORDS_BIGENDIAN > .endif > > @@ -64,11 +65,7 @@ > .endif > > # Use the right version of the atomic.h file from lib/isc > -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" > -ISC_ATOMIC_ARCH= x86_32 > -.else > -ISC_ATOMIC_ARCH= ${MACHINE_CPUARCH} > -.endif > +ISC_ATOMIC_ARCH=${MACHINE_CPUARCH:S/i386/x86_32/:S/amd64/x86_32/} Note here how in the Warner's diff, he replaced one use of MACHINE_ARCH (the amd64 and i386 comparisons) and one use of MACHINE_CPUARCH (the other cases) with always using MACHINE_CPUARCH. > > # Optional features > .if ${MK_BIND_LARGE_FILE} == "yes" > @@ -121,4 +118,3 @@ > > PTHREAD_DPADD= ${LIBPTHREAD} > PTHREAD_LDADD= -lpthread > > > Please note that the code Warner removed had the following line: > -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" > > I have no idea how svn managed to fsck that up, but that is what I > reverted back to when I made the commit in r217213. If you're still > confused, please review the svn history yourself. svn did the right thing. The code was broken before Warner's fix. To be clear, this is all I think needs to change: Index: head/lib/bind/config.mk =================================================================== --- head/lib/bind/config.mk (revision 217272) +++ head/lib/bind/config.mk (working copy) @@ -65,7 +65,7 @@ .endif # Use the right version of the atomic.h file from lib/isc -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" ISC_ATOMIC_ARCH= x86_32 .else ISC_ATOMIC_ARCH= ${MACHINE_CPUARCH} -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 19:05:56 2011 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 DF3B3106564A; Tue, 11 Jan 2011 19:05:55 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C46448FC15; Tue, 11 Jan 2011 19:05: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 p0BJ5tKU031606; Tue, 11 Jan 2011 19:05:55 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0BJ5tij031604; Tue, 11 Jan 2011 19:05:55 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201101111905.p0BJ5tij031604@svn.freebsd.org> From: Gavin Atkinson Date: Tue, 11 Jan 2011 19:05: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: r217274 - 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: Tue, 11 Jan 2011 19:05:56 -0000 Author: gavin Date: Tue Jan 11 19:05:55 2011 New Revision: 217274 URL: http://svn.freebsd.org/changeset/base/217274 Log: Improve or fix some comments. No functional change. MFC after: 1 week Modified: head/sys/dev/usb/serial/uplcom.c Modified: head/sys/dev/usb/serial/uplcom.c ============================================================================== --- head/sys/dev/usb/serial/uplcom.c Tue Jan 11 18:32:05 2011 (r217273) +++ head/sys/dev/usb/serial/uplcom.c Tue Jan 11 19:05:55 2011 (r217274) @@ -254,12 +254,12 @@ static const struct usb_device_id uplcom UPLCOM_DEV(ALCOR, AU9720), /* Alcor AU9720 USB 2.0-RS232 */ UPLCOM_DEV(ANCHOR, SERIAL), /* Anchor Serial adapter */ UPLCOM_DEV(ATEN, UC232A), /* PLANEX USB-RS232 URS-03 */ - UPLCOM_DEV(BELKIN, F5U257), /* Belkin F5U257 */ + UPLCOM_DEV(BELKIN, F5U257), /* Belkin F5U257 USB to Serial */ UPLCOM_DEV(COREGA, CGUSBRS232R), /* Corega CG-USBRS232R */ UPLCOM_DEV(EPSON, CRESSI_EDY), /* Cressi Edy diving computer */ UPLCOM_DEV(EPSON, N2ITION3), /* Zeagle N2iTion3 diving computer */ - UPLCOM_DEV(ELECOM, UCSGT), /* ELECOM UC-SGT */ - UPLCOM_DEV(ELECOM, UCSGT0), /* ELECOM UC-SGT */ + UPLCOM_DEV(ELECOM, UCSGT), /* ELECOM UC-SGT Serial Adapter */ + UPLCOM_DEV(ELECOM, UCSGT0), /* ELECOM UC-SGT Serial Adapter */ UPLCOM_DEV(HAL, IMR001), /* HAL Corporation Crossam2+USB */ UPLCOM_DEV(HP, LD220), /* HP LD220 POS Display */ UPLCOM_DEV(IODATA, USBRSAQ), /* I/O DATA USB-RSAQ */ @@ -285,17 +285,17 @@ static const struct usb_device_id uplcom UPLCOM_DEV(PROLIFIC, RSAQ3), /* I/O DATA USB-RSAQ3 */ UPLCOM_DEV(PROLIFIC, UIC_MSR206), /* UIC MSR206 Card Reader */ UPLCOM_DEV(PROLIFIC2, PL2303), /* Prolific adapter */ - UPLCOM_DEV(RADIOSHACK, USBCABLE), + UPLCOM_DEV(RADIOSHACK, USBCABLE), /* Radio Shack USB Adapter */ UPLCOM_DEV(RATOC, REXUSB60), /* RATOC REX-USB60 */ UPLCOM_DEV(SAGEM, USBSERIAL), /* Sagem USB-Serial Controller */ UPLCOM_DEV(SAMSUNG, I330), /* Samsung I330 phone cradle */ UPLCOM_DEV(SANWA, KB_USB2), /* Sanwa KB-USB2 Multimeter cable */ - UPLCOM_DEV(SIEMENS3, EF81), /* Seimens EF81 */ - UPLCOM_DEV(SIEMENS3, SX1), /* Seimens SX1 */ - UPLCOM_DEV(SIEMENS3, X65), /* Seimens X65 */ - UPLCOM_DEV(SIEMENS3, X75), /* Seimens X75 */ + UPLCOM_DEV(SIEMENS3, EF81), /* Siemens EF81 */ + UPLCOM_DEV(SIEMENS3, SX1), /* Siemens SX1 */ + UPLCOM_DEV(SIEMENS3, X65), /* Siemens X65 */ + UPLCOM_DEV(SIEMENS3, X75), /* Siemens X75 */ UPLCOM_DEV(SITECOM, SERIAL), /* Sitecom USB to Serial */ - UPLCOM_DEV(SMART, PL2303), /* SMART Technologies */ + UPLCOM_DEV(SMART, PL2303), /* SMART Technologies USB to Serial */ UPLCOM_DEV(SONY, QN3), /* Sony QN3 phone cable */ UPLCOM_DEV(SONYERICSSON, DATAPILOT), /* Sony Ericsson Datapilot */ UPLCOM_DEV(SONYERICSSON, DCU10), /* Sony Ericsson DCU-10 Cable */ @@ -305,7 +305,7 @@ static const struct usb_device_id uplcom UPLCOM_DEV(SYNTECH, CPT8001C), /* Syntech CPT-8001C Barcode scanner */ UPLCOM_DEV(TDK, UHA6400), /* TDK USB-PHS Adapter UHA6400 */ UPLCOM_DEV(TDK, UPA9664), /* TDK USB-PHS Adapter UPA9664 */ - UPLCOM_DEV(TRIPPLITE, U209), /* Tripp-Lite U209-000-R */ + UPLCOM_DEV(TRIPPLITE, U209), /* Tripp-Lite U209-000-R USB to Serial */ UPLCOM_DEV(YCCABLE, PL2303), /* YC Cable USB-Serial */ }; #undef UPLCOM_DEV From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 19:07:34 2011 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 680E9106564A; Tue, 11 Jan 2011 19:07:34 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4BEA48FC12; Tue, 11 Jan 2011 19:07: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 p0BJ7Yxm031693; Tue, 11 Jan 2011 19:07:34 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0BJ7Y65031691; Tue, 11 Jan 2011 19:07:34 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201101111907.p0BJ7Y65031691@svn.freebsd.org> From: Gavin Atkinson Date: Tue, 11 Jan 2011 19:07: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: r217275 - 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: Tue, 11 Jan 2011 19:07:34 -0000 Author: gavin Date: Tue Jan 11 19:07:34 2011 New Revision: 217275 URL: http://svn.freebsd.org/changeset/base/217275 Log: Update the uplcom(4) man page to reflect the devices currently supported by uplcom(4). MFC after: 1 week Modified: head/share/man/man4/uplcom.4 Modified: head/share/man/man4/uplcom.4 ============================================================================== --- head/share/man/man4/uplcom.4 Tue Jan 11 19:05:55 2011 (r217274) +++ head/share/man/man4/uplcom.4 Tue Jan 11 19:07:34 2011 (r217275) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 10, 2010 +.Dd January 11, 2011 .Dt UPLCOM 4 .Os .Sh NAME @@ -63,19 +63,35 @@ driver which makes it behave like a .Sh HARDWARE The .Nm -driver supports the following adapters: +driver supports the following devices and adapters: .Pp .Bl -bullet -compact .It -ATEN UC-232A +ADLINK ND-6530 USB-Serial Adapter +.It +Alcatel One Touch 535/735 Phone +.It +Alcor AU9720 USB-RS232 Serial Adapter .It -BAFO BF-800 +AlDiga AL-11U Modem .It -BAFO BF-810 +Alltronix ACM003U00 Modem +.It +Anchor Serial adapter +.It +ATEN UC-232A +.It +BAFO BF-800 and BF-810 .It Belkin F5U257 .It -ELECOM UC-SGT +BenQ S81 Phone +.It +Corega CG-USBRS232R Serial Adapter +.It +Cressi Edy (Seiko) Diving Computer +.It +ELECOM UC-SGT Serial Adapter .It HAL Corporation Crossam2+USB IR commander .It @@ -83,31 +99,83 @@ Hama USB RS-232 Serial Adapter .It Hamlet exagerate XURS232 .It +HP LD220 Point-Of-Sale (POS) Display +.It IOGEAR UC-232A .It -I/O DATA USB-RSAQ +I/O DATA USB-RSAQ, USB-RSAQ2, USB-RSAQ3 and USB-RSAQ5 +.It +iTegno WM1080A GSM/GFPRS Modem +.It +iTegno WM2080A CDMA Modem +.It +Leadtek 9531 GPS .It -I/O DATA USB-RSAQ2 +Micromax 610U Modem .It -I/O DATA USB-RSAQ3 +Microsoft Palm 700WX .It Mobile Action MA-620 Infrared Adapter .It +Nokia CA-42 Cable +.It +OTI DKU-5 cable +.It +Panasonic TY-TP50P6-S flat screen +.It +PLX CA-42 Phone Cable +.It PLANEX USB-RS232 URS-03 .It +Prolific Generic USB-Serial Adapters +.It +Prolific Pharos USB-Serial Adapter +.It RATOC REX-USB60 .It Radio Shack USB Serial Cable .It +Sagem USB-Serial Adapter +.It +Samsung I330 Phone Cradle +.It Sandberg USB to Serial Link (model number 133-08) .It +Sanwa KB-USB2 Multimeter cable +.It +Siemens/BenQ EF81, SX1, X65 and X75 Mobile Phones +.It +Sitecom USB-Serial Adapter +.It +SMART Technologies USB-Serial Adapter +.It +Sony QN3 Phone Cable +.It +Sony Ericsson Datapilot +.It +Sony Ericsson DCU-10 and DCU-11 (Susteen) USB Cables +.It SOURCENEXT KeikaiDenwa 8 (with and without charger) .It -Sony Ericsson USB Cable (Susteen USB Data Cable) +Speed Dragon USB-Serial Cable +.It +Syntech CPT-8001C Barcode Scanner +.It +TDK UHA6400 and UPA9664 USB-PHS Adapters .It TRENDnet USB to Serial Converter (TU-S9) .It +Tripp-Lite U209-000-R USB-Serial Adapter +.It +UIC HCR331 Magnetic Stripe Card Reader +.It +UIC MSR206 Magnetic Stripe Card Reader +.It Willcom W-SIM DD PHS terminal.(WS002IN) +.It +YC-Cable USB-Serial Adapter +.It +Zeagle N2iTion3 Diving Computer .El .Sh SEE ALSO .Xr tty 4 , From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 19:11:55 2011 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 C6A0D106564A for ; Tue, 11 Jan 2011 19:11:55 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id 14E728FC13 for ; Tue, 11 Jan 2011 19:11:54 +0000 (UTC) Received: (qmail 9446 invoked by uid 399); 11 Jan 2011 19:11:54 -0000 Received: from localhost (HELO doug-optiplex.ka9q.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 11 Jan 2011 19:11:54 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4D2CAB78.8070707@FreeBSD.org> Date: Tue, 11 Jan 2011 11:11:52 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.13) Gecko/20101210 Thunderbird/3.1.7 MIME-Version: 1.0 To: John Baldwin References: <201101092347.p09NlB4M060802@svn.freebsd.org> <201101110847.24284.jhb@freebsd.org> <4D2CA626.4030207@FreeBSD.org> <201101111400.08224.jhb@freebsd.org> In-Reply-To: <201101111400.08224.jhb@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: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r217213 - head/lib/bind 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, 11 Jan 2011 19:11:55 -0000 On 01/11/2011 11:00, John Baldwin wrote: >> .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" > And_this_ line is still MACHINE_ARCH here, which is wrong. This should use > MACHINE_CPUARCH. That is the only line I have been talking about the entire > time. Yep, sorry, I wasn't kidding when I said I like to keep things simple because I'm easily confused. :) Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 19:20:02 2011 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 CBACB1065672; Tue, 11 Jan 2011 19:20:01 +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 9D40B8FC0A; Tue, 11 Jan 2011 19:20: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 p0BJK1lt032098; Tue, 11 Jan 2011 19:20:01 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0BJK1VT032096; Tue, 11 Jan 2011 19:20:01 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201101111920.p0BJK1VT032096@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 11 Jan 2011 19:20: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: r217278 - head/sys/dev/acpica/Osd 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, 11 Jan 2011 19:20:02 -0000 Author: jkim Date: Tue Jan 11 19:20:01 2011 New Revision: 217278 URL: http://svn.freebsd.org/changeset/base/217278 Log: Fix a witness(4) warning introduced in r217238. Modified: head/sys/dev/acpica/Osd/OsdInterrupt.c Modified: head/sys/dev/acpica/Osd/OsdInterrupt.c ============================================================================== --- head/sys/dev/acpica/Osd/OsdInterrupt.c Tue Jan 11 19:17:13 2011 (r217277) +++ head/sys/dev/acpica/Osd/OsdInterrupt.c Tue Jan 11 19:20:01 2011 (r217278) @@ -91,6 +91,18 @@ acpi_intr_handler(void *arg) return (FILTER_STRAY); } +static void +acpi_intr_destroy(device_t dev, struct acpi_intr *ai) +{ + + if (ai->ai_handle != NULL) + bus_teardown_intr(dev, ai->ai_irq, ai->ai_handle); + if (ai->ai_irq != NULL) + bus_release_resource(dev, SYS_RES_IRQ, ai->ai_rid, ai->ai_irq); + bus_delete_resource(dev, SYS_RES_IRQ, ai->ai_rid); + free(ai, M_ACPIINTR); +} + ACPI_STATUS AcpiOsInstallInterruptHandler(UINT32 InterruptNumber, ACPI_OSD_HANDLER ServiceRoutine, void *Context) @@ -123,6 +135,8 @@ AcpiOsInstallInterruptHandler(UINT32 Int ai->ai_number = InterruptNumber; ai->ai_handler = ServiceRoutine; ai->ai_context = Context; + SLIST_INSERT_HEAD(&acpi_intr_list, ai, ai_link); + mtx_unlock(&acpi_intr_lock); /* * If the MADT contained an interrupt override directive for the SCI, @@ -151,19 +165,13 @@ AcpiOsInstallInterruptHandler(UINT32 Int device_printf(sc->acpi_dev, "could not set up interrupt\n"); goto error; } - SLIST_INSERT_HEAD(&acpi_intr_list, ai, ai_link); - mtx_unlock(&acpi_intr_lock); return_ACPI_STATUS (AE_OK); error: + mtx_lock(&acpi_intr_lock); + SLIST_REMOVE(&acpi_intr_list, ai, acpi_intr, ai_link); mtx_unlock(&acpi_intr_lock); - if (ai->ai_handle != NULL) - bus_teardown_intr(sc->acpi_dev, ai->ai_irq, ai->ai_handle); - if (ai->ai_irq != NULL) - bus_release_resource(sc->acpi_dev, SYS_RES_IRQ, ai->ai_rid, - ai->ai_irq); - bus_delete_resource(sc->acpi_dev, SYS_RES_IRQ, ai->ai_rid); - free(ai, M_ACPIINTR); + acpi_intr_destroy(sc->acpi_dev, ai); return_ACPI_STATUS (AE_ALREADY_EXISTS); } @@ -195,10 +203,7 @@ AcpiOsRemoveInterruptHandler(UINT32 Inte mtx_unlock(&acpi_intr_lock); if (ai == NULL) return_ACPI_STATUS (AE_NOT_EXIST); - bus_teardown_intr(sc->acpi_dev, ai->ai_irq, ai->ai_handle); - bus_release_resource(sc->acpi_dev, SYS_RES_IRQ, ai->ai_rid, ai->ai_irq); - bus_delete_resource(sc->acpi_dev, SYS_RES_IRQ, ai->ai_rid); - free(ai, M_ACPIINTR); + acpi_intr_destroy(sc->acpi_dev, ai); return_ACPI_STATUS (AE_OK); } From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 19:26:39 2011 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 A5A671065673; Tue, 11 Jan 2011 19:26:39 +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 7AB058FC13; Tue, 11 Jan 2011 19:26: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 p0BJQdco032361; Tue, 11 Jan 2011 19:26:39 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0BJQdcX032359; Tue, 11 Jan 2011 19:26:39 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201101111926.p0BJQdcX032359@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 11 Jan 2011 19:26: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: r217279 - head/sys/dev/acpica 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, 11 Jan 2011 19:26:39 -0000 Author: jkim Date: Tue Jan 11 19:26:39 2011 New Revision: 217279 URL: http://svn.freebsd.org/changeset/base/217279 Log: Work around a witness(4) panic introduced in r217238. Reported by: jh Modified: head/sys/dev/acpica/acpi.c Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Tue Jan 11 19:20:01 2011 (r217278) +++ head/sys/dev/acpica/acpi.c Tue Jan 11 19:26:39 2011 (r217279) @@ -3044,6 +3044,20 @@ acpi_system_eventhandler_wakeup(void *ar /* * ACPICA Event Handlers (FixedEvent, also called from button notify handler) */ +static void +acpi_invoke_sleep_eventhandler(void *context) +{ + + EVENTHANDLER_INVOKE(acpi_sleep_event, *(int *)context); +} + +static void +acpi_invoke_wake_eventhandler(void *context) +{ + + EVENTHANDLER_INVOKE(acpi_wakeup_event, *(int *)context); +} + UINT32 acpi_event_power_button_sleep(void *context) { @@ -3051,8 +3065,9 @@ acpi_event_power_button_sleep(void *cont ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); - EVENTHANDLER_INVOKE(acpi_sleep_event, sc->acpi_power_button_sx); - + if (ACPI_FAILURE(AcpiOsExecute(OSL_NOTIFY_HANDLER, + acpi_invoke_sleep_eventhandler, &sc->acpi_power_button_sx))) + return_VALUE (ACPI_INTERRUPT_NOT_HANDLED); return_VALUE (ACPI_INTERRUPT_HANDLED); } @@ -3063,8 +3078,9 @@ acpi_event_power_button_wake(void *conte ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); - EVENTHANDLER_INVOKE(acpi_wakeup_event, sc->acpi_power_button_sx); - + if (ACPI_FAILURE(AcpiOsExecute(OSL_NOTIFY_HANDLER, + acpi_invoke_wake_eventhandler, &sc->acpi_power_button_sx))) + return_VALUE (ACPI_INTERRUPT_NOT_HANDLED); return_VALUE (ACPI_INTERRUPT_HANDLED); } @@ -3075,8 +3091,9 @@ acpi_event_sleep_button_sleep(void *cont ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); - EVENTHANDLER_INVOKE(acpi_sleep_event, sc->acpi_sleep_button_sx); - + if (ACPI_FAILURE(AcpiOsExecute(OSL_NOTIFY_HANDLER, + acpi_invoke_sleep_eventhandler, &sc->acpi_sleep_button_sx))) + return_VALUE (ACPI_INTERRUPT_NOT_HANDLED); return_VALUE (ACPI_INTERRUPT_HANDLED); } @@ -3087,8 +3104,9 @@ acpi_event_sleep_button_wake(void *conte ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); - EVENTHANDLER_INVOKE(acpi_wakeup_event, sc->acpi_sleep_button_sx); - + if (ACPI_FAILURE(AcpiOsExecute(OSL_NOTIFY_HANDLER, + acpi_invoke_wake_eventhandler, &sc->acpi_sleep_button_sx))) + return_VALUE (ACPI_INTERRUPT_NOT_HANDLED); return_VALUE (ACPI_INTERRUPT_HANDLED); } From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 19:30:54 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 3E7C71065679; Tue, 11 Jan 2011 19:30:54 +0000 (UTC) Date: Tue, 11 Jan 2011 19:30:54 +0000 From: Alexander Best To: Warner Losh Message-ID: <20110111193054.GA33391@freebsd.org> References: <201101111832.p0BIW5bN030721@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201101111832.p0BIW5bN030721@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r217273 - 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: Tue, 11 Jan 2011 19:30:54 -0000 On Tue Jan 11 11, Warner Losh wrote: > Author: imp > Date: Tue Jan 11 18:32:05 2011 > New Revision: 217273 > URL: http://svn.freebsd.org/changeset/base/217273 > > Log: > Minor improvements in the wording of a comment. Document tinderbox target. > > Modified: > head/Makefile > > Modified: head/Makefile > ============================================================================== > --- head/Makefile Tue Jan 11 17:33:29 2011 (r217272) > +++ head/Makefile Tue Jan 11 18:32:05 2011 (r217273) > @@ -5,6 +5,7 @@ > # > # universe - *Really* build *everything* (buildworld and > # all kernels on all architectures). > +# tinderbox - Same as universe, but stop on first failure. > # buildworld - Rebuild *everything*, including glue to help do > # upgrades. > # installworld - Install everything built by "buildworld". > @@ -35,7 +36,8 @@ > # tree. This makefile executes a child make process, forcing it to use > # the mk files from the source tree which are supposed to DTRT. > # > -# The user-driven targets (as listed above) are implemented in Makefile.inc1. > +# Most of the user-driven targets (as listed above) are implemented in > +# Makefile.inc1. The exceptions are universe, tingerbox and targets. ^^ typo > # > # If you want to build your system from source be sure that /usr/obj has > # at least 800MB of diskspace available. -- a13x From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 20:55:13 2011 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 6FB851065697; Tue, 11 Jan 2011 20:55:13 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 890FE8FC21; Tue, 11 Jan 2011 20:55:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 8D22141C7C8; Tue, 11 Jan 2011 21:55:06 +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 HayUnncVzgh0; Tue, 11 Jan 2011 21:55:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id BB75241C7C7; Tue, 11 Jan 2011 21:55:05 +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 B27834448F3; Tue, 11 Jan 2011 20:50:59 +0000 (UTC) Date: Tue, 11 Jan 2011 20:50:59 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Warner Losh In-Reply-To: <201101111832.p0BIW5bN030721@svn.freebsd.org> Message-ID: <20110111204912.L14966@maildrop.int.zabbadoz.net> References: <201101111832.p0BIW5bN030721@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: r217273 - 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: Tue, 11 Jan 2011 20:55:13 -0000 On Tue, 11 Jan 2011, Warner Losh wrote: > Author: imp > Date: Tue Jan 11 18:32:05 2011 > New Revision: 217273 > URL: http://svn.freebsd.org/changeset/base/217273 > > Log: > Minor improvements in the wording of a comment. Document tinderbox target. > > Modified: > head/Makefile > > Modified: head/Makefile > ============================================================================== > --- head/Makefile Tue Jan 11 17:33:29 2011 (r217272) > +++ head/Makefile Tue Jan 11 18:32:05 2011 (r217273) > @@ -5,6 +5,7 @@ > # > # universe - *Really* build *everything* (buildworld and > # all kernels on all architectures). > +# tinderbox - Same as universe, but stop on first failure. heh? since when? - Same as universe. In addition prints failed builds at the end and returns with an error if there was at least one. > # buildworld - Rebuild *everything*, including glue to help do > # upgrades. > # installworld - Install everything built by "buildworld". > @@ -35,7 +36,8 @@ > # tree. This makefile executes a child make process, forcing it to use > # the mk files from the source tree which are supposed to DTRT. > # > -# The user-driven targets (as listed above) are implemented in Makefile.inc1. > +# Most of the user-driven targets (as listed above) are implemented in > +# Makefile.inc1. The exceptions are universe, tingerbox and targets. > # > # If you want to build your system from source be sure that /usr/obj has > # at least 800MB of diskspace available. > -- Bjoern A. Zeeb You have to have visions! 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 Tue Jan 11 21:18:30 2011 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 EEEB91065673; Tue, 11 Jan 2011 21:18:29 +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 DC3588FC1B; Tue, 11 Jan 2011 21:18: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 p0BLITRC036047; Tue, 11 Jan 2011 21:18:29 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0BLITne036045; Tue, 11 Jan 2011 21:18:29 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201101112118.p0BLITne036045@svn.freebsd.org> From: Andreas Tobler Date: Tue, 11 Jan 2011 21:18: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: r217286 - head/sys/powerpc/powermac 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, 11 Jan 2011 21:18:30 -0000 Author: andreast Date: Tue Jan 11 21:18:29 2011 New Revision: 217286 URL: http://svn.freebsd.org/changeset/base/217286 Log: Add new functions, fcu_fan_set_pwm and fcu_fan_get_pwm, to set and get the pwm values. We can now set the fan's speed of a PWM controlled fan with % numbers between 30 and 100 % instead of trying to model a % number based on rpm. The fcu chip offers both, the dutycycle and the rpm value of the PWM controlled fans. I added the rpm value to the list of information available via sysctl(8). Tested by: Paul Mather Approved by: nwhitehorn (mentor) Modified: head/sys/powerpc/powermac/fcu.c Modified: head/sys/powerpc/powermac/fcu.c ============================================================================== --- head/sys/powerpc/powermac/fcu.c Tue Jan 11 21:05:21 2011 (r217285) +++ head/sys/powerpc/powermac/fcu.c Tue Jan 11 21:18:29 2011 (r217286) @@ -62,19 +62,20 @@ __FBSDID("$FreeBSD$"); #define FCU_PWM_FAIL 0x2b #define FCU_PWM_AVAILABLE 0x2c #define FCU_PWM_ACTIVE 0x2d -#define FCU_PWM_READ(x) 0x31 + (x) * 2 -#define FCU_PWM_SET(x) 0x30 + (x) * 2 +#define FCU_PWM_RPM(x) 0x31 + (x) * 2 /* Get RPM. */ +#define FCU_PWM_SGET(x) 0x30 + (x) * 2 /* Set or get PWM. */ struct fcu_fan { int id; - cell_t min_rpm; - cell_t max_rpm; + cell_t min; + cell_t max; char location[32]; enum { FCU_FAN_RPM, FCU_FAN_PWM } type; int setpoint; + int rpm; }; struct fcu_softc { @@ -85,6 +86,14 @@ struct fcu_softc { int sc_nfans; }; +/* We can read the PWM and the RPM from a PWM controlled fan. + * Offer both values via sysctl. + */ +enum { + FCU_PWM_SYSCTL_PWM = 1 << 8, + FCU_PWM_SYSCTL_RPM = 2 << 8 +}; + static int fcu_rpm_shift; /* Regular bus attachment functions */ @@ -96,6 +105,9 @@ static void fcu_attach_fans(device_t dev static int fcu_fill_fan_prop(device_t dev); static int fcu_fan_set_rpm(device_t dev, struct fcu_fan *fan, int rpm); static int fcu_fan_get_rpm(device_t dev, struct fcu_fan *fan, int *rpm); +static int fcu_fan_set_pwm(device_t dev, struct fcu_fan *fan, int pwm); +static int fcu_fan_get_pwm(device_t dev, struct fcu_fan *fan, int *pwm, + int *rpm); static int fcu_fanrpm_sysctl(SYSCTL_HANDLER_ARGS); static void fcu_start(void *xdev); static int fcu_write(device_t dev, uint32_t addr, uint8_t reg, uint8_t *buf, @@ -246,34 +258,21 @@ fcu_fan_set_rpm(device_t dev, struct fcu sc = device_get_softc(dev); /* Clamp to allowed range */ - rpm = max(fan->min_rpm, rpm); - rpm = min(fan->max_rpm, rpm); + rpm = max(fan->min, rpm); + rpm = min(fan->max, rpm); if (fan->type == FCU_FAN_RPM) { reg = FCU_RPM_SET(fan->id); fan->setpoint = rpm; - } else if (fan->type == FCU_FAN_PWM) { - reg = FCU_PWM_SET(fan->id); - if (rpm > 3500) - rpm = 3500; - if (rpm < 500) - rpm = 500; - fan->setpoint = rpm; - /* PWM 30: 550 rpm, PWM 255: 3400 rpm. */ - rpm = (rpm * 255) / 3500; } else { device_printf(dev, "Unknown fan type: %d\n", fan->type); return (EIO); } - if (fan->type == FCU_FAN_RPM) { - buf[0] = rpm >> (8 - fcu_rpm_shift); - buf[1] = rpm << fcu_rpm_shift; - fcu_write(sc->sc_dev, sc->sc_addr, reg, buf, 2); - } else { - buf[0] = rpm; - fcu_write(sc->sc_dev, sc->sc_addr, reg, buf, 1); - } + buf[0] = rpm >> (8 - fcu_rpm_shift); + buf[1] = rpm << fcu_rpm_shift; + + fcu_write(sc->sc_dev, sc->sc_addr, reg, buf, 2); return (0); } @@ -313,7 +312,63 @@ fcu_fan_get_rpm(device_t dev, struct fcu return (ENXIO); } reg = FCU_RPM_READ(fan->id); - } else if (fan->type == FCU_FAN_PWM) { + + } else { + device_printf(dev, "Unknown fan type: %d\n", fan->type); + return (EIO); + } + + /* It seems that we can read the fans rpm. */ + fcu_read_1(sc->sc_dev, sc->sc_addr, reg, buff); + + *rpm = (buff[0] << (8 - fcu_rpm_shift)) | buff[1] >> fcu_rpm_shift; + + return (0); +} + +static int +fcu_fan_set_pwm(device_t dev, struct fcu_fan *fan, int pwm) +{ + uint8_t reg; + struct fcu_softc *sc; + uint8_t buf[2]; + + sc = device_get_softc(dev); + + /* Clamp to allowed range */ + pwm = max(fan->min, pwm); + pwm = min(fan->max, pwm); + + if (fan->type == FCU_FAN_PWM) { + reg = FCU_PWM_SGET(fan->id); + if (pwm > 100) + pwm = 100; + if (pwm < 30) + pwm = 30; + fan->setpoint = pwm; + } else { + device_printf(dev, "Unknown fan type: %d\n", fan->type); + return (EIO); + } + + buf[0] = (pwm * 2550) / 1000; + + fcu_write(sc->sc_dev, sc->sc_addr, reg, buf, 1); + + return (0); +} + +static int +fcu_fan_get_pwm(device_t dev, struct fcu_fan *fan, int *pwm, int *rpm) +{ + uint8_t reg; + struct fcu_softc *sc; + uint8_t buf[2]; + uint8_t active = 0, avail = 0, fail = 0; + + sc = device_get_softc(dev); + + if (fan->type == FCU_FAN_PWM) { /* Check if the fan is available. */ reg = FCU_PWM_AVAILABLE; fcu_read_1(sc->sc_dev, sc->sc_addr, reg, &avail); @@ -337,16 +392,21 @@ fcu_fan_get_rpm(device_t dev, struct fcu fan->id); return (ENXIO); } - reg = FCU_PWM_READ(fan->id); + reg = FCU_PWM_SGET(fan->id); } else { device_printf(dev, "Unknown fan type: %d\n", fan->type); return (EIO); } - /* It seems that we can read the fans rpm. */ - fcu_read_1(sc->sc_dev, sc->sc_addr, reg, buff); + /* It seems that we can read the fans pwm. */ + fcu_read_1(sc->sc_dev, sc->sc_addr, reg, buf); - *rpm = (buff[0] << (8 - fcu_rpm_shift)) | buff[1] >> fcu_rpm_shift; + *pwm = (buf[0] * 1000) / 2550; + + /* Now read the rpm. */ + reg = FCU_PWM_RPM(fan->id); + fcu_read_1(sc->sc_dev, sc->sc_addr, reg, buf); + *rpm = (buf[0] << (8 - fcu_rpm_shift)) | buf[1] >> fcu_rpm_shift; return (0); } @@ -412,18 +472,41 @@ fcu_fanrpm_sysctl(SYSCTL_HANDLER_ARGS) device_t fcu; struct fcu_softc *sc; struct fcu_fan *fan; - int rpm = 0, error; + int rpm = 0, pwm = 0, error; fcu = arg1; sc = device_get_softc(fcu); - fan = &sc->sc_fans[arg2]; - fcu_fan_get_rpm(fcu, fan, &rpm); - error = sysctl_handle_int(oidp, &rpm, 0, req); + fan = &sc->sc_fans[arg2 & 0x00ff]; + if (fan->type == FCU_FAN_RPM) { + fcu_fan_get_rpm(fcu, fan, &rpm); + error = sysctl_handle_int(oidp, &rpm, 0, req); + } else { + fcu_fan_get_pwm(fcu, fan, &pwm, &rpm); + + switch (arg2 & 0xff00) { + case FCU_PWM_SYSCTL_PWM: + error = sysctl_handle_int(oidp, &pwm, 0, req); + break; + case FCU_PWM_SYSCTL_RPM: + error = sysctl_handle_int(oidp, &rpm, 0, req); + break; + default: + /* This should never happen */ + error = -1; + }; + } + + /* We can only read the RPM from a PWM controlled fan, so return. */ + if ((arg2 & 0xff00) == FCU_PWM_SYSCTL_RPM) + return (0); if (error || !req->newptr) return (error); - return (fcu_fan_set_rpm(fcu, fan, rpm)); + if (fan->type == FCU_FAN_RPM) + return (fcu_fan_set_rpm(fcu, fan, rpm)); + else + return (fcu_fan_set_pwm(fcu, fan, pwm)); } static void @@ -432,7 +515,6 @@ fcu_attach_fans(device_t dev) struct fcu_softc *sc; struct sysctl_oid *oid, *fanroot_oid; struct sysctl_ctx_list *ctx; - phandle_t child; char sysctl_name[32]; int i, j; @@ -440,8 +522,6 @@ fcu_attach_fans(device_t dev) sc->sc_nfans = 0; - child = ofw_bus_get_node(dev); - /* Count the actual number of fans. */ sc->sc_nfans = fcu_fill_fan_prop(dev); @@ -472,35 +552,69 @@ fcu_attach_fans(device_t dev) } sysctl_name[j] = 0; - sc->sc_fans[i].min_rpm = 2400 >> fcu_rpm_shift; - sc->sc_fans[i].max_rpm = 56000 >> fcu_rpm_shift; - fcu_fan_get_rpm(dev, &sc->sc_fans[i], &sc->sc_fans[i].setpoint); - - oid = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(fanroot_oid), - OID_AUTO, sysctl_name, CTLFLAG_RD, 0, - "Fan Information"); - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "minrpm", - CTLTYPE_INT | CTLFLAG_RD, - &(sc->sc_fans[i].min_rpm), sizeof(cell_t), - "Minimum allowed RPM"); - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "maxrpm", - CTLTYPE_INT | CTLFLAG_RD, - &(sc->sc_fans[i].max_rpm), sizeof(cell_t), - "Maximum allowed RPM"); - /* I use i to pass the fan id. */ - SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "rpm", - CTLTYPE_INT | CTLFLAG_RW, dev, i, - fcu_fanrpm_sysctl, "I", "Fan RPM"); + if (sc->sc_fans[i].type == FCU_FAN_RPM) { + sc->sc_fans[i].min = 2400 >> fcu_rpm_shift; + sc->sc_fans[i].max = 56000 >> fcu_rpm_shift; + fcu_fan_get_rpm(dev, &sc->sc_fans[i], + &sc->sc_fans[i].setpoint); + + oid = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(fanroot_oid), + OID_AUTO, sysctl_name, + CTLFLAG_RD, 0, "Fan Information"); + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "minrpm", CTLTYPE_INT | CTLFLAG_RD, + &(sc->sc_fans[i].min), sizeof(cell_t), + "Minimum allowed RPM"); + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "maxrpm", CTLTYPE_INT | CTLFLAG_RD, + &(sc->sc_fans[i].max), sizeof(cell_t), + "Maximum allowed RPM"); + /* I use i to pass the fan id. */ + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "rpm", CTLTYPE_INT | CTLFLAG_RW, dev, i, + fcu_fanrpm_sysctl, "I", "Fan RPM"); + } else { + sc->sc_fans[i].min = 30; + sc->sc_fans[i].max = 100; + fcu_fan_get_pwm(dev, &sc->sc_fans[i], + &sc->sc_fans[i].setpoint, + &sc->sc_fans[i].rpm); + + oid = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(fanroot_oid), + OID_AUTO, sysctl_name, + CTLFLAG_RD, 0, "Fan Information"); + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "minpwm", CTLTYPE_INT | CTLFLAG_RD, + &(sc->sc_fans[i].min), sizeof(cell_t), + "Minimum allowed PWM in %"); + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "maxpwm", CTLTYPE_INT | CTLFLAG_RD, + &(sc->sc_fans[i].max), sizeof(cell_t), + "Maximum allowed PWM in %"); + /* I use i to pass the fan id or'ed with the type + * of info I want to display/modify. + */ + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "pwm", CTLTYPE_INT | CTLFLAG_RW, dev, + FCU_PWM_SYSCTL_PWM | i, + fcu_fanrpm_sysctl, "I", "Fan PWM in %"); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "rpm", CTLTYPE_INT | CTLFLAG_RD, dev, + FCU_PWM_SYSCTL_RPM | i, + fcu_fanrpm_sysctl, "I", "Fan RPM"); + } } /* Dump fan location, type & RPM. */ if (bootverbose) { device_printf(dev, "Fans\n"); for (i = 0; i < sc->sc_nfans; i++) { - device_printf(dev, "Location: %s type: %d ID: %d RPM: %d\n", - sc->sc_fans[i].location, + device_printf(dev, "Location: %s type: %d ID: %d " + "RPM: %d\n", sc->sc_fans[i].location, sc->sc_fans[i].type, sc->sc_fans[i].id, - sc->sc_fans[i].setpoint); + (sc->sc_fans[i].type == FCU_FAN_RPM) ? + sc->sc_fans[i].setpoint : + sc->sc_fans[i].rpm ); } } } From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 21:46:30 2011 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 359B0106564A; Tue, 11 Jan 2011 21:46:30 +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 246E38FC15; Tue, 11 Jan 2011 21:46:30 +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 p0BLkUF8036875; Tue, 11 Jan 2011 21:46:30 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0BLkUK4036873; Tue, 11 Jan 2011 21:46:30 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201101112146.p0BLkUK4036873@svn.freebsd.org> From: Andrew Thompson Date: Tue, 11 Jan 2011 21:46:30 +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: r217288 - head/sys/conf 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, 11 Jan 2011 21:46:30 -0000 Author: thompsa Date: Tue Jan 11 21:46:29 2011 New Revision: 217288 URL: http://svn.freebsd.org/changeset/base/217288 Log: Allow runfw(4) to be compiled in to the kernel. Submitted by: Akinori Furukoshi Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Jan 11 21:43:35 2011 (r217287) +++ head/sys/conf/files Tue Jan 11 21:46:29 2011 (r217288) @@ -1812,6 +1812,20 @@ dev/usb/net/uhso.c optional uhso # dev/usb/wlan/if_rum.c optional rum dev/usb/wlan/if_run.c optional run +runfw.c optional runfw \ + compile-with "${AWK} -f $S/tools/fw_stub.awk runfw:runfw -mrunfw -c${.TARGET}" \ + no-implicit-rule before-depend local \ + clean "runfw.c" +runfw.fwo optional runfw \ + dependency "runfw" \ + compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} runfw" \ + no-implicit-rule \ + clean "runfw.fwo" +runfw optional runfw \ + dependency "$S/contrib/dev/run/rt2870.fw.uu" \ + compile-with "uudecode -o ${.TARGET} $S/contrib/dev/run/rt2870.fw.uu" \ + no-obj no-implicit-rule \ + clean "runfw" dev/usb/wlan/if_uath.c optional uath dev/usb/wlan/if_upgt.c optional upgt dev/usb/wlan/if_ural.c optional ural From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 21:51:46 2011 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 8DD81106566B; Tue, 11 Jan 2011 21:51:46 +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 7BFDF8FC17; Tue, 11 Jan 2011 21:51: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 p0BLpko0037038; Tue, 11 Jan 2011 21:51:46 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0BLpkaf037034; Tue, 11 Jan 2011 21:51:46 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201101112151.p0BLpkaf037034@svn.freebsd.org> From: Andrew Thompson Date: Tue, 11 Jan 2011 21:51: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: r217289 - 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: Tue, 11 Jan 2011 21:51:46 -0000 Author: thompsa Date: Tue Jan 11 21:51:46 2011 New Revision: 217289 URL: http://svn.freebsd.org/changeset/base/217289 Log: Add manpage for runfw, the Ralink RT2700U, RT2800U and RT3000U firmware module. Also fix a few nits in run.4. Submitted by: Akinori Furukoshi Added: head/share/man/man4/runfw.4 (contents, props changed) Modified: head/share/man/man4/Makefile head/share/man/man4/run.4 Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Tue Jan 11 21:46:29 2011 (r217288) +++ head/share/man/man4/Makefile Tue Jan 11 21:51:46 2011 (r217289) @@ -344,6 +344,7 @@ MAN= aac.4 \ rue.4 \ rum.4 \ run.4 \ + runfw.4 \ sa.4 \ safe.4 \ sbp.4 \ Modified: head/share/man/man4/run.4 ============================================================================== --- head/share/man/man4/run.4 Tue Jan 11 21:46:29 2011 (r217288) +++ head/share/man/man4/run.4 Tue Jan 11 21:51:46 2011 (r217289) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 29, 2010 +.Dd January 12, 2011 .Dt RUN 4 .Os .Sh NAME @@ -36,11 +36,17 @@ kernel configuration file: .Cd "device wlan_amrr" .Ed .Pp +Firmware is also needed, and provided by: +.Bd -ragged -offset indent +.Cd "device runfw" +.Ed +.Pp Alternatively, to load the driver as a -module at boot time, place the following line in +module at boot time, place the following lines in .Xr loader.conf 5 : .Bd -literal -offset indent if_run_load="YES" +runfw_load="YES" .Ed .Sh DESCRIPTION The @@ -68,6 +74,9 @@ Also known as mode, this is used when associating with an access point, through which all traffic passes. This mode is the default. +.It Host AP mode +In this mode the driver acts as an access point (base station) +for other cards. .It monitor mode In this mode the driver is able to receive packets without associating with an access point. @@ -94,9 +103,7 @@ hardware for the WEP40, WEP104, TKIP(+MI The .Nm driver can be configured at runtime with -.Xr ifconfig 8 -or on boot with -.Xr hostname.if 5 . +.Xr ifconfig 8 . .Sh HARDWARE The .Nm @@ -175,7 +182,7 @@ ifconfig wlan create wlandev run0 wlanmo .Ed .Sh DIAGNOSTICS .Bl -diag -.It "run%d: error %d, could not read firmware %s" +.It "run%d: faild load firmware of file runfw" For some reason, the driver was unable to read the microcode file from the filesystem. The file might be missing or corrupted. @@ -188,6 +195,7 @@ The driver will reset the hardware. This should not happen. .El .Sh SEE ALSO +.Xr runfw 4 , .Xr intro 4 , .Xr netintro 4 , .Xr usb 4 , Added: head/share/man/man4/runfw.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/runfw.4 Tue Jan 11 21:51:46 2011 (r217289) @@ -0,0 +1,50 @@ +.\" Copyright (c) 2010 Akinori Furukoshi +.\" Copyright (c) 2010 Warren Block +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 12, 2011 +.Dt RUNFW 4 +.Os +.Sh NAME +.Nm runfw +.Nd "Firmware Module for Ralink driver" +.Sh SYNOPSIS +To compile this module into the kernel, place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device runfw" +.Ed +.Pp +This will include two firmware images, RT2870 and RT3071, inside the kernel. +.Xr run 4 +will load the appropriate image into the chip. +.Pp +Alternatively, to load the firmware images as a module at boot time, place +the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +runfw_load="YES" +.Ed +.Sh DESCRIPTION +This module provides firmware sets for the Ralink RT2700U, +RT2800U and RT3000U chip based USB WiFi adapters. +Please read Ralink's license, src/sys/contrib/dev/run/LICENSE. +.Sh SEE ALSO +.Xr run 4 , +.Xr firmware 9 From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 22:07:39 2011 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 DC5D5106566C; Tue, 11 Jan 2011 22:07:39 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB6048FC0C; Tue, 11 Jan 2011 22:07: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 p0BM7dZd037632; Tue, 11 Jan 2011 22:07:39 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0BM7duG037630; Tue, 11 Jan 2011 22:07:39 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201101112207.p0BM7duG037630@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 11 Jan 2011 22:07: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: r217290 - head/sys/arm/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: Tue, 11 Jan 2011 22:07:40 -0000 Author: marcel Date: Tue Jan 11 22:07:39 2011 New Revision: 217290 URL: http://svn.freebsd.org/changeset/base/217290 Log: Don't re-use MODINFOMD_BOOTINFO as MODINFOMD_DTBP. It breaks compatibility without any means for the kernel to work with an older loader. Modified: head/sys/arm/include/metadata.h Modified: head/sys/arm/include/metadata.h ============================================================================== --- head/sys/arm/include/metadata.h Tue Jan 11 21:51:46 2011 (r217289) +++ head/sys/arm/include/metadata.h Tue Jan 11 22:07:39 2011 (r217290) @@ -29,6 +29,7 @@ #ifndef _MACHINE_METADATA_H_ #define _MACHINE_METADATA_H_ -#define MODINFOMD_DTBP 0x1001 +#define MODINFOMD_BOOTINFO 0x1001 +#define MODINFOMD_DTBP 0x1002 #endif /* !_MACHINE_METADATA_H_ */ From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 22:13:19 2011 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 91C981065675; Tue, 11 Jan 2011 22:13: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 80F528FC0A; Tue, 11 Jan 2011 22:13: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 p0BMDJ1P038108; Tue, 11 Jan 2011 22:13:19 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0BMDJSq038106; Tue, 11 Jan 2011 22:13:19 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201101112213.p0BMDJSq038106@svn.freebsd.org> From: John Baldwin Date: Tue, 11 Jan 2011 22:13: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: r217291 - 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, 11 Jan 2011 22:13:19 -0000 Author: jhb Date: Tue Jan 11 22:13:19 2011 New Revision: 217291 URL: http://svn.freebsd.org/changeset/base/217291 Log: Always use PRI_BASE() when checking the base type of a thread's priority class. MFC after: 2 weeks Modified: head/sys/kern/sched_ule.c Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Tue Jan 11 22:07:39 2011 (r217290) +++ head/sys/kern/sched_ule.c Tue Jan 11 22:13:19 2011 (r217291) @@ -1388,7 +1388,7 @@ sched_priority(struct thread *td) int score; int pri; - if (td->td_pri_class != PRI_TIMESHARE) + if (PRI_BASE(td->td_pri_class) != PRI_TIMESHARE) return; /* * If the score is interactive we place the thread in the realtime @@ -2124,7 +2124,7 @@ sched_clock(struct thread *td) ts = td->td_sched; if (td->td_pri_class & PRI_FIFO_BIT) return; - if (td->td_pri_class == PRI_TIMESHARE) { + if (PRI_BASE(td->td_pri_class) == PRI_TIMESHARE) { /* * We used a tick; charge it to the thread so * that we can compute our interactivity. From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 22:15:31 2011 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 690B11065670; Tue, 11 Jan 2011 22:15:31 +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 3D26A8FC12; Tue, 11 Jan 2011 22:15:31 +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 p0BMFVeW038318; Tue, 11 Jan 2011 22:15:31 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0BMFVKb038315; Tue, 11 Jan 2011 22:15:31 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201101112215.p0BMFVKb038315@svn.freebsd.org> From: John Baldwin Date: Tue, 11 Jan 2011 22:15: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: r217292 - 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: Tue, 11 Jan 2011 22:15:31 -0000 Author: jhb Date: Tue Jan 11 22:15:30 2011 New Revision: 217292 URL: http://svn.freebsd.org/changeset/base/217292 Log: - Retire some unused ithread priorities: PI_TTYHIGH, PI_TAPE, and PI_DISKLOW. While here, rename PI_TTYLOW to PI_TTY. - Add a macro PI_SWI() that takes a SWI_* constant as an argument and returns the suitable thread priority. Modified: head/sys/kern/kern_intr.c head/sys/sys/priority.h Modified: head/sys/kern/kern_intr.c ============================================================================== --- head/sys/kern/kern_intr.c Tue Jan 11 22:13:19 2011 (r217291) +++ head/sys/kern/kern_intr.c Tue Jan 11 22:15:30 2011 (r217292) @@ -130,22 +130,18 @@ intr_priority(enum intr_type flags) INTR_TYPE_CAM | INTR_TYPE_MISC | INTR_TYPE_CLK | INTR_TYPE_AV); switch (flags) { case INTR_TYPE_TTY: - pri = PI_TTYLOW; + pri = PI_TTY; break; case INTR_TYPE_BIO: - /* - * XXX We need to refine this. BSD/OS distinguishes - * between tape and disk priorities. - */ pri = PI_DISK; break; case INTR_TYPE_NET: pri = PI_NET; break; case INTR_TYPE_CAM: - pri = PI_DISK; /* XXX or PI_CAM? */ + pri = PI_DISK; break; - case INTR_TYPE_AV: /* Audio/video */ + case INTR_TYPE_AV: pri = PI_AV; break; case INTR_TYPE_CLK: @@ -1082,7 +1078,7 @@ swi_add(struct intr_event **eventp, cons *eventp = ie; } error = intr_event_add_handler(ie, name, NULL, handler, arg, - (pri * RQ_PPQ) + PI_SOFT, flags, cookiep); + PI_SWI(pri), flags, cookiep); if (error) return (error); if (pri == SWI_CLOCK) { @@ -1656,18 +1652,13 @@ db_dump_intrhand(struct intr_handler *ih case PI_AV: db_printf("AV "); break; - case PI_TTYHIGH: - case PI_TTYLOW: + case PI_TTY: db_printf("TTY "); break; - case PI_TAPE: - db_printf("TAPE"); - break; case PI_NET: db_printf("NET "); break; case PI_DISK: - case PI_DISKLOW: db_printf("DISK"); break; case PI_DULL: Modified: head/sys/sys/priority.h ============================================================================== --- head/sys/sys/priority.h Tue Jan 11 22:13:19 2011 (r217291) +++ head/sys/sys/priority.h Tue Jan 11 22:15:30 2011 (r217292) @@ -85,14 +85,12 @@ #define PI_REALTIME (PRI_MIN_ITHD + 0) #define PI_AV (PRI_MIN_ITHD + 4) -#define PI_TTYHIGH (PRI_MIN_ITHD + 8) -#define PI_TAPE (PRI_MIN_ITHD + 12) -#define PI_NET (PRI_MIN_ITHD + 16) -#define PI_DISK (PRI_MIN_ITHD + 20) -#define PI_TTYLOW (PRI_MIN_ITHD + 24) -#define PI_DISKLOW (PRI_MIN_ITHD + 28) -#define PI_DULL (PRI_MIN_ITHD + 32) -#define PI_SOFT (PRI_MIN_ITHD + 36) +#define PI_NET (PRI_MIN_ITHD + 8) +#define PI_DISK (PRI_MIN_ITHD + 12) +#define PI_TTY (PRI_MIN_ITHD + 16) +#define PI_DULL (PRI_MIN_ITHD + 20) +#define PI_SOFT (PRI_MIN_ITHD + 24) +#define PI_SWI(x) (PI_SOFT + (x) * RQ_PPQ) #define PRI_MIN_KERN (64) #define PRI_MAX_KERN (PRI_MIN_REALTIME - 1) From owner-svn-src-head@FreeBSD.ORG Tue Jan 11 22:57:41 2011 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 A25DE1065674; Tue, 11 Jan 2011 22:57: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 91B988FC18; Tue, 11 Jan 2011 22:57: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 p0BMvfwC041991; Tue, 11 Jan 2011 22:57:41 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0BMvflf041989; Tue, 11 Jan 2011 22:57:41 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201101112257.p0BMvflf041989@svn.freebsd.org> From: Warner Losh Date: Tue, 11 Jan 2011 22:57: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: r217294 - 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: Tue, 11 Jan 2011 22:57:41 -0000 Author: imp Date: Tue Jan 11 22:57:41 2011 New Revision: 217294 URL: http://svn.freebsd.org/changeset/base/217294 Log: Proving once again, I can't typo: fix a type. Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Tue Jan 11 22:40:18 2011 (r217293) +++ head/Makefile Tue Jan 11 22:57:41 2011 (r217294) @@ -37,7 +37,7 @@ # the mk files from the source tree which are supposed to DTRT. # # Most of the user-driven targets (as listed above) are implemented in -# Makefile.inc1. The exceptions are universe, tingerbox and targets. +# Makefile.inc1. The exceptions are universe, tinderbox and targets. # # If you want to build your system from source be sure that /usr/obj has # at least 800MB of diskspace available. From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 00:05:18 2011 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 CF63A1065670; Wed, 12 Jan 2011 00:05:18 +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 6EDEF8FC1C; Wed, 12 Jan 2011 00:05:18 +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 p0BIPGVV029097; Tue, 11 Jan 2011 11:25:16 -0700 (MST) (envelope-from imp@bsdimp.com) Message-ID: <4D2CA08A.906@bsdimp.com> Date: Tue, 11 Jan 2011 11:25:14 -0700 From: Warner Losh User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Thunderbird/3.1.6 MIME-Version: 1.0 To: Doug Barton References: <201101092347.p09NlB4M060802@svn.freebsd.org> <201101101433.18847.jhb@freebsd.org> <4D2BE4F8.3030902@FreeBSD.org> In-Reply-To: <4D2BE4F8.3030902@FreeBSD.org> 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, John Baldwin Subject: Re: svn commit: r217213 - head/lib/bind 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, 12 Jan 2011 00:05:19 -0000 On 01/10/2011 22:04, Doug Barton wrote: > On 01/10/2011 11:33, John Baldwin wrote: >> On Sunday, January 09, 2011 6:47:11 pm Doug Barton wrote: > >>> # Use the right version of the atomic.h file from lib/isc >>> -ISC_ATOMIC_ARCH=${MACHINE_CPUARCH:S/i386/x86_32/:S/amd64/x86_32/} >>> +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" >> >> This should use MACHINE_CPUARCH instead of MACHINE_ARCH? > > When this block was first written I don't think _CPUARCH existed at > all, and/or had not been MFC'ed. Subsequently, nwhitehorn made the > change in r209886 to use _CPUARCH in both places, however the diff > from Warner's commit in r217071 (which is what I based my change on) > clearly showed _ARCH > (http://svn.freebsd.org/viewvc/base/head/lib/bind/config.mk?r1=209886&r2=217071). > So, I'm not sure where svn went sideways there, but it's definitely > "odd." > > I have no objection to putting it back to the state that it was in at > r209886, although frankly less diffs to RELENG_[78] without good > reason make my life easier. yea, that's the right bias. I did MFC the CPUARCH stuff to 8, but not to 7. Warner > > > Doug > > PS, this is just another reason why I prefer pre-commit review when > convenient ... > > >>> +ISC_ATOMIC_ARCH= x86_32 >>> +.else >>> +ISC_ATOMIC_ARCH= ${MACHINE_CPUARCH} >>> +.endif >>> >>> # Optional features >>> .if ${MK_BIND_LARGE_FILE} == "yes" >>> >> > > > From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 00:05:20 2011 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 73ECC106566B; Wed, 12 Jan 2011 00:05:20 +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 9E82F8FC1D; Wed, 12 Jan 2011 00:05:19 +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 p0BIeIqu029138; Tue, 11 Jan 2011 11:40:18 -0700 (MST) (envelope-from imp@bsdimp.com) Message-ID: <4D2CA410.108@bsdimp.com> Date: Tue, 11 Jan 2011 11:40:16 -0700 From: Warner Losh User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Thunderbird/3.1.6 MIME-Version: 1.0 To: John Baldwin References: <201101092347.p09NlB4M060802@svn.freebsd.org> <201101101433.18847.jhb@freebsd.org> <4D2BE4F8.3030902@FreeBSD.org> <201101110847.24284.jhb@freebsd.org> In-Reply-To: <201101110847.24284.jhb@freebsd.org> 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, Doug Barton , src-committers@freebsd.org Subject: Re: svn commit: r217213 - head/lib/bind 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, 12 Jan 2011 00:05:20 -0000 On 01/11/2011 06:47, John Baldwin wrote: > On Tuesday, January 11, 2011 12:04:56 am Doug Barton wrote: >> I have no objection to putting it back to the state that it was in at >> r209886, although frankly less diffs to RELENG_[78] without good reason >> make my life easier. > 209886 did not use MACHINE_CPUARCH for ISC_ATOMIC_ARCH, and in fact the file > is now back to the 209886 state (nwhitehorn did not change ISC_ATOMIC_ARCH > to use MACHINE_CPUARCH). > > Fixing this does create diffs to [78] because MACHINE_CPUARCH is not present > at all in [78], but that is because [78]'s handling of different endians for > mips, arm, etc. is deficient. You are likely stuck with using MACHINE_CPUARCH > for 9+ and MACHINE_ARCH for<= 8. I've created compatibility shims for MACHINE_CPUARCH in RELENG_8, but not for RELENG_7 (at least in some places, now that I go looking for it). I'm thinking seriously of MFCing it to make future MFCs easier, especially for some MIPS work that I've been doing. In -current, Doug's likely will operate correctly for quite some time. We're not going to change MACHINE_ARCH of i386 or amd64. At most, we'll change MACHINE_CPUARCH to x86, but that would be a lot of work to undertake in the whole tree... The only down-side is that it increases by two the number of MACHINE_ARCH instances that I need to audit when I sweep the tree looking for problems. If there's no good reason for the chaff, I change it. If there is, like this case, I note it as good and move on. While I'd prefer to have everything converted, I'm willing to be flexible when necessary... Warner From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 00:23:47 2011 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 E1C61106564A; Wed, 12 Jan 2011 00:23:47 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D0F6D8FC0A; Wed, 12 Jan 2011 00:23: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 p0C0NlPI045009; Wed, 12 Jan 2011 00:23:47 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0C0Nl3J045007; Wed, 12 Jan 2011 00:23:47 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201101120023.p0C0Nl3J045007@svn.freebsd.org> From: Jack F Vogel Date: Wed, 12 Jan 2011 00:23: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: r217295 - head/sys/dev/e1000 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, 12 Jan 2011 00:23:48 -0000 Author: jfv Date: Wed Jan 12 00:23:47 2011 New Revision: 217295 URL: http://svn.freebsd.org/changeset/base/217295 Log: A couple problems discovered by Andrew Boyer: - failure code in em_xmit got mangled along the way and was not properly handling errors. - local timer code had a leftover UNLOCK call that should be removed. MFC after 3 days Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Tue Jan 11 22:57:41 2011 (r217294) +++ head/sys/dev/e1000/if_em.c Wed Jan 12 00:23:47 2011 (r217295) @@ -93,7 +93,7 @@ int em_display_debug_stats = 0; /********************************************************************* * Driver version: *********************************************************************/ -char em_driver_version[] = "7.1.8"; +char em_driver_version[] = "7.1.9"; /********************************************************************* * PCI Device ID Table @@ -1909,14 +1909,23 @@ em_xmit(struct tx_ring *txr, struct mbuf error = bus_dmamap_load_mbuf_sg(txr->txtag, map, *m_headp, segs, &nsegs, BUS_DMA_NOWAIT); - if (error) { + if (error == ENOMEM) { + adapter->no_tx_dma_setup++; + return (error); + } else if (error != 0) { adapter->no_tx_dma_setup++; m_freem(*m_headp); *m_headp = NULL; return (error); } + + } else if (error == ENOMEM) { + adapter->no_tx_dma_setup++; + return (error); } else if (error != 0) { adapter->no_tx_dma_setup++; + m_freem(*m_headp); + *m_headp = NULL; return (error); } @@ -2206,7 +2215,6 @@ hung: txr->me, txr->tx_avail, txr->next_to_clean); ifp->if_drv_flags &= ~IFF_DRV_RUNNING; adapter->watchdog_events++; - EM_TX_UNLOCK(txr); em_init_locked(adapter); } From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 03:43:47 2011 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 AB59E106566B; Wed, 12 Jan 2011 03:43:47 +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 9A6B78FC0C; Wed, 12 Jan 2011 03:43: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 p0C3hll0050760; Wed, 12 Jan 2011 03:43:47 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0C3hlWh050758; Wed, 12 Jan 2011 03:43:47 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201101120343.p0C3hlWh050758@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 12 Jan 2011 03:43: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: r217296 - 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: Wed, 12 Jan 2011 03:43:47 -0000 Author: yongari Date: Wed Jan 12 03:43:47 2011 New Revision: 217296 URL: http://svn.freebsd.org/changeset/base/217296 Log: For re(4) controllers that uses new jumbo frame scheme(RTL8168C/D/E), limit maximum RX buffer size to RE_RX_DESC_BUFLEN instead of blindly configuring it to 16KB. Due to lack of documentation, re(4) didn't allow jumbo frame on these controllers. However it seems controller is confused with jumbo frame such that it can DMA the received frame to wrong address instead of splitting it into multiple RX buffers. Of course, this caused panic. Since re(4) does not support jumbo frames on these controllers, make controller drop frame that is longer than RE_RX_DESC_BUFLEN sized frame. Fortunately RTL810x controllers, which do not support jumbo frame, have no such issues but this change also limited maximum RX buffer size allowed to RTL810x controllers. Allowing 16KB RX buffer for controllers that have no such capability is meaningless. MFC after: 3 days Modified: head/sys/dev/re/if_re.c Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Wed Jan 12 00:23:47 2011 (r217295) +++ head/sys/dev/re/if_re.c Wed Jan 12 03:43:47 2011 (r217296) @@ -2777,8 +2777,13 @@ re_init_locked(struct rl_softc *sc) * For 8169 gigE NICs, set the max allowed RX packet * size so we can receive jumbo frames. */ - if (sc->rl_type == RL_8169) - CSR_WRITE_2(sc, RL_MAXRXPKTLEN, 16383); + if (sc->rl_type == RL_8169) { + if ((sc->rl_flags & (RL_FLAG_PCIE | RL_FLAG_NOJUMBO)) == + (RL_FLAG_PCIE | RL_FLAG_NOJUMBO)) + CSR_WRITE_2(sc, RL_MAXRXPKTLEN, RE_RX_DESC_BUFLEN); + else + CSR_WRITE_2(sc, RL_MAXRXPKTLEN, 16383); + } if (sc->rl_testmode) return; From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 04:59:29 2011 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 C91EA1065670; Wed, 12 Jan 2011 04:59:29 +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 B8B088FC19; Wed, 12 Jan 2011 04:59: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 p0C4xTQt052441; Wed, 12 Jan 2011 04:59:29 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0C4xTt4052439; Wed, 12 Jan 2011 04:59:29 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201101120459.p0C4xTt4052439@svn.freebsd.org> From: Warner Losh Date: Wed, 12 Jan 2011 04:59: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: r217297 - 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: Wed, 12 Jan 2011 04:59:29 -0000 Author: imp Date: Wed Jan 12 04:59:29 2011 New Revision: 217297 URL: http://svn.freebsd.org/changeset/base/217297 Log: Provide up-to-date estimates that are pessimal today... Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Wed Jan 12 03:43:47 2011 (r217296) +++ head/Makefile Wed Jan 12 04:59:29 2011 (r217297) @@ -40,7 +40,8 @@ # Makefile.inc1. The exceptions are universe, tinderbox and targets. # # If you want to build your system from source be sure that /usr/obj has -# at least 800MB of diskspace available. +# at least 1GB of diskspace available. A complete 'universe' build requires +# about 15GB of space. # # For individuals wanting to build from the sources currently on their # system, the simple instructions are: From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 12:26:10 2011 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 C4C781065673; Wed, 12 Jan 2011 12:26:10 +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 B439F8FC14; Wed, 12 Jan 2011 12: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 p0CCQAWD088922; Wed, 12 Jan 2011 12:26:10 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CCQA1J088920; Wed, 12 Jan 2011 12:26:10 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201101121226.p0CCQA1J088920@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 12 Jan 2011 12: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: r217303 - head/sys/geom/nop 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, 12 Jan 2011 12:26:10 -0000 Author: ae Date: Wed Jan 12 12:26:10 2011 New Revision: 217303 URL: http://svn.freebsd.org/changeset/base/217303 Log: Sector size can not be greater than MAXPHYS. MFC after: 1 week Modified: head/sys/geom/nop/g_nop.c Modified: head/sys/geom/nop/g_nop.c ============================================================================== --- head/sys/geom/nop/g_nop.c Wed Jan 12 10:12:32 2011 (r217302) +++ head/sys/geom/nop/g_nop.c Wed Jan 12 12:26:10 2011 (r217303) @@ -176,6 +176,10 @@ g_nop_create(struct gctl_req *req, struc gctl_error(req, "Invalid secsize for provider %s.", pp->name); return (EINVAL); } + if (secsize > MAXPHYS) { + gctl_error(req, "secsize is too big."); + return (EINVAL); + } size -= size % secsize; snprintf(name, sizeof(name), "%s%s", pp->name, G_NOP_SUFFIX); LIST_FOREACH(gp, &mp->geom, geom) { From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 13:16:35 2011 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 C72BC106564A; Wed, 12 Jan 2011 13:16:35 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B584D8FC14; Wed, 12 Jan 2011 13:16: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 p0CDGZUU090084; Wed, 12 Jan 2011 13:16:35 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CDGZ3X090082; Wed, 12 Jan 2011 13:16:35 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201101121316.p0CDGZ3X090082@svn.freebsd.org> From: "Jayachandran C." Date: Wed, 12 Jan 2011 13:16: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: r217304 - head/sys/mips/rmi 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, 12 Jan 2011 13:16:35 -0000 Author: jchandra Date: Wed Jan 12 13:16:35 2011 New Revision: 217304 URL: http://svn.freebsd.org/changeset/base/217304 Log: The message ring interrupt needs to be enabled for all cpus, not just the ones which run the message ring handler. Some bits of the interrupt mask are part of the status register which is saved with the process context, and these bits are initialized from the cpu on which the process is created. This means that all the processes should have the same value for these interrupt mask bits, so that the interrupt mask remains the same regardless of what thread is scheduled on the cpu. Submitted by: Sriram Gorti (srgorti at netlogicmicro dot com) Modified: head/sys/mips/rmi/xlr_machdep.c Modified: head/sys/mips/rmi/xlr_machdep.c ============================================================================== --- head/sys/mips/rmi/xlr_machdep.c Wed Jan 12 12:26:10 2011 (r217303) +++ head/sys/mips/rmi/xlr_machdep.c Wed Jan 12 13:16:35 2011 (r217304) @@ -341,67 +341,63 @@ xlr_mem_init(void) boot_map = (struct xlr_boot1_mem_map *) (unsigned long)xlr_boot1_info.psb_mem_map; for (i = 0, j = 0; i < boot_map->num_entries; i++, j += 2) { - if (boot_map->physmem_map[i].type == BOOT1_MEM_RAM) { - if (j == 14) { - printf("*** ERROR *** memory map too large ***\n"); - break; + if (boot_map->physmem_map[i].type != BOOT1_MEM_RAM) + continue; + if (j == 14) { + printf("*** ERROR *** memory map too large ***\n"); + break; + } + if (j == 0) { + /* start after kernel end */ + phys_avail[0] = (vm_paddr_t) + MIPS_KSEG0_TO_PHYS(&_end) + 0x20000; + /* boot loader start */ + /* HACK to Use bootloaders memory region */ + if (boot_map->physmem_map[0].size == 0x0c000000) { + boot_map->physmem_map[0].size = 0x0ff00000; } - if (j == 0) { - /* TODO FIXME */ - /* start after kernel end */ - phys_avail[0] = (vm_paddr_t) - MIPS_KSEG0_TO_PHYS(&_end) + 0x20000; - /* boot loader start */ - /* HACK to Use bootloaders memory region */ - /* TODO FIXME */ - if (boot_map->physmem_map[0].size == 0x0c000000) { - boot_map->physmem_map[0].size = 0x0ff00000; - } - phys_avail[1] = boot_map->physmem_map[0].addr + - boot_map->physmem_map[0].size; - printf("First segment: addr:%p -> %p \n", - (void *)phys_avail[0], - (void *)phys_avail[1]); - - dump_avail[0] = phys_avail[0]; - dump_avail[1] = phys_avail[1]; - - } else { -/* - * Can't use this code yet, because most of the fixed allocations happen from - * the biggest physical area. If we have more than 512M memory the kernel will try - * to map from the second are which is not in KSEG0 and not mapped - */ - phys_avail[j] = (vm_paddr_t) + phys_avail[1] = boot_map->physmem_map[0].addr + + boot_map->physmem_map[0].size; + printf("First segment: addr:%p -> %p \n", + (void *)phys_avail[0], + (void *)phys_avail[1]); + + dump_avail[0] = phys_avail[0]; + dump_avail[1] = phys_avail[1]; + } else { + /* + * In 32 bit physical address mode we cannot use + * mem > 0xffffffff + */ + if (boot_map->physmem_map[i].addr > 0xfffff000U) { + printf("Memory: start %#jx size %#jx ignored" + "(>4GB)\n", + (intmax_t)boot_map->physmem_map[i].addr, + (intmax_t)boot_map->physmem_map[i].size); + continue; + } + if (boot_map->physmem_map[i].addr + + boot_map->physmem_map[i].size > 0xfffff000U) { + boot_map->physmem_map[i].size = 0xfffff000U - boot_map->physmem_map[i].addr; - phys_avail[j + 1] = phys_avail[j] + - boot_map->physmem_map[i].size; - if (phys_avail[j + 1] < phys_avail[j] ) { - /* Houston we have an issue. Memory is - * larger than possible. Its probably in - * 64 bit > 4Gig and we are in 32 bit mode. - */ - phys_avail[j + 1] = 0xfffff000; - printf("boot map size was %jx\n", - (intmax_t)boot_map->physmem_map[i].size); - boot_map->physmem_map[i].size = phys_avail[j + 1] - - phys_avail[j]; - printf("reduced to %jx\n", - (intmax_t)boot_map->physmem_map[i].size); - } - printf("Next segment : addr:%p -> %p \n", - (void *)phys_avail[j], - (void *)phys_avail[j+1]); + printf("Memory: start %#jx limited to 4GB\n", + (intmax_t)boot_map->physmem_map[i].addr); } + phys_avail[j] = (vm_paddr_t) + boot_map->physmem_map[i].addr; + phys_avail[j + 1] = phys_avail[j] + + boot_map->physmem_map[i].size; + printf("Next segment : addr:%#jx -> %#jx\n", + (uintmax_t)phys_avail[j], + (uintmax_t)phys_avail[j+1]); + } - dump_avail[j] = phys_avail[j]; - dump_avail[j+1] = phys_avail[j+1]; + dump_avail[j] = phys_avail[j]; + dump_avail[j+1] = phys_avail[j+1]; - physsz += boot_map->physmem_map[i].size; - } + physsz += boot_map->physmem_map[i].size; } - /* FIXME XLR TODO */ phys_avail[j] = phys_avail[j + 1] = 0; realmem = physmem = btoc(physsz); } @@ -418,7 +414,6 @@ platform_start(__register_t a0 __unused, void (*wakeup) (void *, void *, unsigned int); #endif - /* XXX FIXME the code below is not 64 bit clean */ /* Save boot loader and other stuff from scratch regs */ xlr_boot1_info = *(struct boot1_info *)(intptr_t)(int)read_c0_register32(MIPS_COP_0_OSSCRATCH, 0); cpu_mask_info = read_c0_register64(MIPS_COP_0_OSSCRATCH, 1); @@ -431,9 +426,6 @@ platform_start(__register_t a0 __unused, xlr_argv = (int32_t *)(intptr_t)(int)read_c0_register32(MIPS_COP_0_OSSCRATCH, 5); xlr_envp = (int32_t *)(intptr_t)(int)read_c0_register32(MIPS_COP_0_OSSCRATCH, 6); - /* TODO: Verify the magic number here */ - /* FIXMELATER: xlr_boot1_info.magic_number */ - /* Initialize pcpu stuff */ mips_pcpu0_init(); @@ -530,10 +522,6 @@ platform_identify(void) (int)xlr_boot1_info.board_minor_version, mips_rd_prid()); } -/* - * XXX Maybe return the state of the watchdog in enter, and pass it to - * exit? Like spl(). - */ void platform_trap_enter(void) { @@ -591,10 +579,9 @@ platform_init_ap(int cpuid) write_c0_eimr64(0ULL); xlr_enable_irq(IRQ_IPI); xlr_enable_irq(IRQ_TIMER); - if (xlr_thr_id() == 0) { + if (xlr_thr_id() == 0) xlr_msgring_cpu_init(); - xlr_enable_irq(IRQ_MSGRING); - } + xlr_enable_irq(IRQ_MSGRING); return; } From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 13:55:02 2011 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 31ADB106564A; Wed, 12 Jan 2011 13:55:02 +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 1A2B58FC18; Wed, 12 Jan 2011 13:55: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 p0CDt1BV090890; Wed, 12 Jan 2011 13:55:01 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CDt1ct090888; Wed, 12 Jan 2011 13:55:01 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201101121355.p0CDt1ct090888@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 12 Jan 2011 13:55: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: r217305 - in head: sbin/geom/class/raid3 sys/geom/raid3 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, 12 Jan 2011 13:55:02 -0000 Author: ae Date: Wed Jan 12 13:55:01 2011 New Revision: 217305 URL: http://svn.freebsd.org/changeset/base/217305 Log: Sector size can not be greater than MAXPHYS. Since GRAID3 calculates sector size from user-specified block size, report to user about big blocksize. PR: kern/147851 MFC after: 1 week Modified: head/sbin/geom/class/raid3/geom_raid3.c head/sys/geom/raid3/g_raid3.c Modified: head/sbin/geom/class/raid3/geom_raid3.c ============================================================================== --- head/sbin/geom/class/raid3/geom_raid3.c Wed Jan 12 13:16:35 2011 (r217304) +++ head/sbin/geom/class/raid3/geom_raid3.c Wed Jan 12 13:55:01 2011 (r217305) @@ -213,6 +213,11 @@ raid3_label(struct gctl_req *req) md.md_sectorsize = sectorsize * (nargs - 2); md.md_mediasize -= (md.md_mediasize % md.md_sectorsize); + if (md.md_sectorsize > MAXPHYS) { + gctl_error(req, "The blocksize is too big."); + return; + } + /* * Clear last sector first, to spoil all components if device exists. */ Modified: head/sys/geom/raid3/g_raid3.c ============================================================================== --- head/sys/geom/raid3/g_raid3.c Wed Jan 12 13:16:35 2011 (r217304) +++ head/sys/geom/raid3/g_raid3.c Wed Jan 12 13:55:01 2011 (r217305) @@ -2913,6 +2913,10 @@ g_raid3_read_metadata(struct g_consumer cp->provider->name); return (error); } + if (md->md_sectorsize > MAXPHYS) { + G_RAID3_DEBUG(0, "The blocksize is too big."); + return (EINVAL); + } return (0); } From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 14:35:30 2011 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 438FF106564A; Wed, 12 Jan 2011 14:35:30 +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 328D68FC1A; Wed, 12 Jan 2011 14:35:30 +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 p0CEZUtC092040; Wed, 12 Jan 2011 14:35:30 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CEZUkM092038; Wed, 12 Jan 2011 14:35:30 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201101121435.p0CEZUkM092038@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 12 Jan 2011 14:35:30 +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: r217307 - 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: Wed, 12 Jan 2011 14:35:30 -0000 Author: pjd Date: Wed Jan 12 14:35:29 2011 New Revision: 217307 URL: http://svn.freebsd.org/changeset/base/217307 Log: Install default signal handlers before masking signals we want to handle. It is possible that the parent process ignores some of them and sigtimedwait() will never see them, eventhough they are masked. The most common situation for this to happen is boot process where init(8) ignores SIGHUP before starting to execute /etc/rc. This in turn caused hastd(8) to ignore SIGHUP. Reported by: trasz Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com MFC after: 3 days Modified: head/sbin/hastd/hastd.c Modified: head/sbin/hastd/hastd.c ============================================================================== --- head/sbin/hastd/hastd.c Wed Jan 12 14:13:50 2011 (r217306) +++ head/sbin/hastd/hastd.c Wed Jan 12 14:35:29 2011 (r217307) @@ -754,10 +754,18 @@ main(int argc, char *argv[]) assert(cfg != NULL); /* + * Restore default actions for interesting signals in case parent + * process (like init(8)) decided to ignore some of them (like SIGHUP). + */ + PJDLOG_VERIFY(signal(SIGHUP, SIG_DFL) != SIG_ERR); + PJDLOG_VERIFY(signal(SIGINT, SIG_DFL) != SIG_ERR); + PJDLOG_VERIFY(signal(SIGTERM, SIG_DFL) != SIG_ERR); + /* * Because SIGCHLD is ignored by default, setup dummy handler for it, * so we can mask it. */ PJDLOG_VERIFY(signal(SIGCHLD, dummy_sighandler) != SIG_ERR); + PJDLOG_VERIFY(sigemptyset(&mask) == 0); PJDLOG_VERIFY(sigaddset(&mask, SIGHUP) == 0); PJDLOG_VERIFY(sigaddset(&mask, SIGINT) == 0); From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 14:38:17 2011 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 970DC1065693; Wed, 12 Jan 2011 14:38:17 +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 8629E8FC0C; Wed, 12 Jan 2011 14:38: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 p0CEcHIm092157; Wed, 12 Jan 2011 14:38:17 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CEcHWW092155; Wed, 12 Jan 2011 14:38:17 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201101121438.p0CEcHWW092155@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 12 Jan 2011 14:38: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: r217308 - 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: Wed, 12 Jan 2011 14:38:17 -0000 Author: pjd Date: Wed Jan 12 14:38:17 2011 New Revision: 217308 URL: http://svn.freebsd.org/changeset/base/217308 Log: Add a note that when custom signal handler is installed for a signal, signal action is restored to default in child after fork(2). In this case there is no need to do anything with dummy SIGCHLD handler, because after fork(2) it will be automatically reverted to SIG_IGN. Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com MFC after: 3 days Modified: head/sbin/hastd/hooks.c Modified: head/sbin/hastd/hooks.c ============================================================================== --- head/sbin/hastd/hooks.c Wed Jan 12 14:35:29 2011 (r217307) +++ head/sbin/hastd/hooks.c Wed Jan 12 14:38:17 2011 (r217308) @@ -372,6 +372,11 @@ hook_execv(const char *path, va_list ap) descriptors(); PJDLOG_VERIFY(sigemptyset(&mask) == 0); PJDLOG_VERIFY(sigprocmask(SIG_SETMASK, &mask, NULL) == 0); + /* + * Dummy handler set for SIGCHLD in the parent should be + * changed after fork(2) automatically to the default SIG_IGN, + * so there is no need to do anything with it. + */ execv(path, args); pjdlog_errno(LOG_ERR, "Unable to execute %s", path); exit(EX_SOFTWARE); From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 14:55:03 2011 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 56D48106564A; Wed, 12 Jan 2011 14:55:03 +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 3631A8FC13; Wed, 12 Jan 2011 14:55: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 p0CEt334092665; Wed, 12 Jan 2011 14:55:03 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CEt3PD092660; Wed, 12 Jan 2011 14:55:03 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201101121455.p0CEt3PD092660@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 12 Jan 2011 14:55: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: r217309 - in head: . contrib/dialog contrib/dialog/po contrib/dialog/samples contrib/dialog/samples/copifuncs contrib/dialog/samples/install gnu/lib gnu/lib/libdialog gnu/lib/libdialog/... 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, 12 Jan 2011 14:55:03 -0000 Author: nwhitehorn Date: Wed Jan 12 14:55:02 2011 New Revision: 217309 URL: http://svn.freebsd.org/changeset/base/217309 Log: Update dialog to version 20100428. This changes the license under which dialog is distributed from GPLv2 to LGPLv2 and introduces a number of new features and a new and better libdialog API. The existing libdialog will be kept temporarily as libodialog for compatibility purposes until sade, sysinstall and tzsetup have been either updated or replaced. __FreeBSD_version is now 900030. Discussed on: -current Approved by: core Obtained from: http://invisible-island.net/dialog Added: head/contrib/dialog/ head/contrib/dialog/CHANGES head/contrib/dialog/COPYING head/contrib/dialog/README head/contrib/dialog/VERSION head/contrib/dialog/aclocal.m4 head/contrib/dialog/arrows.c head/contrib/dialog/buttons.c head/contrib/dialog/calendar.c head/contrib/dialog/checklist.c head/contrib/dialog/columns.c head/contrib/dialog/config.guess (contents, props changed) head/contrib/dialog/config.hin head/contrib/dialog/config.sub (contents, props changed) head/contrib/dialog/configure (contents, props changed) head/contrib/dialog/configure.in head/contrib/dialog/dialog-config.in head/contrib/dialog/dialog.1 head/contrib/dialog/dialog.3 head/contrib/dialog/dialog.c head/contrib/dialog/dialog.h head/contrib/dialog/dialog.lsm head/contrib/dialog/dialog.pl head/contrib/dialog/dlg_colors.h head/contrib/dialog/dlg_keys.c head/contrib/dialog/dlg_keys.h head/contrib/dialog/editbox.c head/contrib/dialog/formbox.c head/contrib/dialog/fselect.c head/contrib/dialog/guage.c head/contrib/dialog/headers-sh.in (contents, props changed) head/contrib/dialog/inputbox.c head/contrib/dialog/inputstr.c head/contrib/dialog/install-sh (contents, props changed) head/contrib/dialog/makefile.in head/contrib/dialog/menubox.c head/contrib/dialog/mixedform.c head/contrib/dialog/mixedgauge.c head/contrib/dialog/mouse.c head/contrib/dialog/mousewget.c head/contrib/dialog/msgbox.c head/contrib/dialog/pause.c head/contrib/dialog/po/ head/contrib/dialog/po/POTFILES.in (contents, props changed) head/contrib/dialog/po/ar.po (contents, props changed) head/contrib/dialog/po/be@latin.po head/contrib/dialog/po/bg.po (contents, props changed) head/contrib/dialog/po/ca.po (contents, props changed) head/contrib/dialog/po/cs.po (contents, props changed) head/contrib/dialog/po/cy.po (contents, props changed) head/contrib/dialog/po/da.po (contents, props changed) head/contrib/dialog/po/de.po (contents, props changed) head/contrib/dialog/po/dialog.pot (contents, props changed) head/contrib/dialog/po/el.po (contents, props changed) head/contrib/dialog/po/eo.po (contents, props changed) head/contrib/dialog/po/es.po (contents, props changed) head/contrib/dialog/po/et.po (contents, props changed) head/contrib/dialog/po/eu.po (contents, props changed) head/contrib/dialog/po/fi.po (contents, props changed) head/contrib/dialog/po/fr.po (contents, props changed) head/contrib/dialog/po/ga.po (contents, props changed) head/contrib/dialog/po/gl.po (contents, props changed) head/contrib/dialog/po/hi.po (contents, props changed) head/contrib/dialog/po/hr.po (contents, props changed) head/contrib/dialog/po/hu.po (contents, props changed) head/contrib/dialog/po/id.po (contents, props changed) head/contrib/dialog/po/is.po (contents, props changed) head/contrib/dialog/po/it.po (contents, props changed) head/contrib/dialog/po/ja.po (contents, props changed) head/contrib/dialog/po/ku.po (contents, props changed) head/contrib/dialog/po/lt.po (contents, props changed) head/contrib/dialog/po/lv.po (contents, props changed) head/contrib/dialog/po/makefile.inn (contents, props changed) head/contrib/dialog/po/mg.po (contents, props changed) head/contrib/dialog/po/mk.po (contents, props changed) head/contrib/dialog/po/ms.po (contents, props changed) head/contrib/dialog/po/nb.po (contents, props changed) head/contrib/dialog/po/nl.po (contents, props changed) head/contrib/dialog/po/pl.po (contents, props changed) head/contrib/dialog/po/pt.po (contents, props changed) head/contrib/dialog/po/pt_BR.po (contents, props changed) head/contrib/dialog/po/rm.po (contents, props changed) head/contrib/dialog/po/ro.po (contents, props changed) head/contrib/dialog/po/ru.po (contents, props changed) head/contrib/dialog/po/rw.po (contents, props changed) head/contrib/dialog/po/sq.po (contents, props changed) head/contrib/dialog/po/sr.po (contents, props changed) head/contrib/dialog/po/sv.po (contents, props changed) head/contrib/dialog/po/sw.po (contents, props changed) head/contrib/dialog/po/th.po (contents, props changed) head/contrib/dialog/po/tr.po (contents, props changed) head/contrib/dialog/po/uk.po (contents, props changed) head/contrib/dialog/po/vi.po (contents, props changed) head/contrib/dialog/po/wa.po (contents, props changed) head/contrib/dialog/po/zh_CN.po (contents, props changed) head/contrib/dialog/po/zh_TW.po (contents, props changed) head/contrib/dialog/progressbox.c head/contrib/dialog/rc.c head/contrib/dialog/samples/ head/contrib/dialog/samples/README head/contrib/dialog/samples/calendar (contents, props changed) head/contrib/dialog/samples/calendar-stdout (contents, props changed) head/contrib/dialog/samples/calendar2 (contents, props changed) head/contrib/dialog/samples/calendar2-stdout (contents, props changed) head/contrib/dialog/samples/calendar3 (contents, props changed) head/contrib/dialog/samples/calendar3-stdout (contents, props changed) head/contrib/dialog/samples/checklist (contents, props changed) head/contrib/dialog/samples/checklist-8bit (contents, props changed) head/contrib/dialog/samples/checklist-utf8 (contents, props changed) head/contrib/dialog/samples/checklist1 (contents, props changed) head/contrib/dialog/samples/checklist10 (contents, props changed) head/contrib/dialog/samples/checklist11 (contents, props changed) head/contrib/dialog/samples/checklist2 (contents, props changed) head/contrib/dialog/samples/checklist3 (contents, props changed) head/contrib/dialog/samples/checklist4 (contents, props changed) head/contrib/dialog/samples/checklist5 (contents, props changed) head/contrib/dialog/samples/checklist6 (contents, props changed) head/contrib/dialog/samples/checklist7 (contents, props changed) head/contrib/dialog/samples/checklist8 (contents, props changed) head/contrib/dialog/samples/checklist9 (contents, props changed) head/contrib/dialog/samples/checklist9.txt head/contrib/dialog/samples/copifuncs/ head/contrib/dialog/samples/copifuncs/admin.funcs (contents, props changed) head/contrib/dialog/samples/copifuncs/common.funcs (contents, props changed) head/contrib/dialog/samples/copifuncs/copi.funcs (contents, props changed) head/contrib/dialog/samples/copifuncs/copi.ifman1 (contents, props changed) head/contrib/dialog/samples/copifuncs/copi.ifman2 (contents, props changed) head/contrib/dialog/samples/copifuncs/copi.ifmcfg2 (contents, props changed) head/contrib/dialog/samples/copifuncs/copi.ifmcfg4 (contents, props changed) head/contrib/dialog/samples/copifuncs/copi.ifmcfg5 (contents, props changed) head/contrib/dialog/samples/copifuncs/copi.ifpoll1 (contents, props changed) head/contrib/dialog/samples/copifuncs/copi.ifpoll2 (contents, props changed) head/contrib/dialog/samples/copifuncs/copi.ifreq1 (contents, props changed) head/contrib/dialog/samples/copifuncs/copi.ifreq2 (contents, props changed) head/contrib/dialog/samples/copifuncs/copi.rcnews (contents, props changed) head/contrib/dialog/samples/copifuncs/copi.sendifm1 (contents, props changed) head/contrib/dialog/samples/copifuncs/copi.sendifm2 (contents, props changed) head/contrib/dialog/samples/copifuncs/copi.trnrc head/contrib/dialog/samples/copifuncs/copi.wheel (contents, props changed) head/contrib/dialog/samples/copifuncs/ifpatch head/contrib/dialog/samples/copismall (contents, props changed) head/contrib/dialog/samples/debian.rc head/contrib/dialog/samples/dialog.py head/contrib/dialog/samples/dselect (contents, props changed) head/contrib/dialog/samples/editbox (contents, props changed) head/contrib/dialog/samples/editbox-utf8 (contents, props changed) head/contrib/dialog/samples/editbox2 (contents, props changed) head/contrib/dialog/samples/editbox3 (contents, props changed) head/contrib/dialog/samples/editbox4 (contents, props changed) head/contrib/dialog/samples/form1 (contents, props changed) head/contrib/dialog/samples/form1-both (contents, props changed) head/contrib/dialog/samples/form1-extra (contents, props changed) head/contrib/dialog/samples/form1-help (contents, props changed) head/contrib/dialog/samples/form1-utf8 (contents, props changed) head/contrib/dialog/samples/form2 (contents, props changed) head/contrib/dialog/samples/form3 (contents, props changed) head/contrib/dialog/samples/form4 (contents, props changed) head/contrib/dialog/samples/form5 (contents, props changed) head/contrib/dialog/samples/form6 (contents, props changed) head/contrib/dialog/samples/fselect (contents, props changed) head/contrib/dialog/samples/fselect-stdout (contents, props changed) head/contrib/dialog/samples/fselect1 (contents, props changed) head/contrib/dialog/samples/fselect1-stdout (contents, props changed) head/contrib/dialog/samples/fselect2 (contents, props changed) head/contrib/dialog/samples/fselect2-stdout (contents, props changed) head/contrib/dialog/samples/gauge (contents, props changed) head/contrib/dialog/samples/gauge0 (contents, props changed) head/contrib/dialog/samples/gauge0-input-fd (contents, props changed) head/contrib/dialog/samples/gauge2 (contents, props changed) head/contrib/dialog/samples/infobox (contents, props changed) head/contrib/dialog/samples/infobox1 (contents, props changed) head/contrib/dialog/samples/infobox2 (contents, props changed) head/contrib/dialog/samples/infobox3 (contents, props changed) head/contrib/dialog/samples/infobox4 (contents, props changed) head/contrib/dialog/samples/infobox5 (contents, props changed) head/contrib/dialog/samples/infobox6 (contents, props changed) head/contrib/dialog/samples/inputbox (contents, props changed) head/contrib/dialog/samples/inputbox-both (contents, props changed) head/contrib/dialog/samples/inputbox-extra (contents, props changed) head/contrib/dialog/samples/inputbox-help (contents, props changed) head/contrib/dialog/samples/inputbox1 (contents, props changed) head/contrib/dialog/samples/inputbox2 (contents, props changed) head/contrib/dialog/samples/inputbox3 (contents, props changed) head/contrib/dialog/samples/inputbox4 (contents, props changed) head/contrib/dialog/samples/inputbox5 (contents, props changed) head/contrib/dialog/samples/inputbox6-8bit (contents, props changed) head/contrib/dialog/samples/inputbox6-utf8 (contents, props changed) head/contrib/dialog/samples/inputbox7 (contents, props changed) head/contrib/dialog/samples/inputmenu (contents, props changed) head/contrib/dialog/samples/inputmenu-stdout (contents, props changed) head/contrib/dialog/samples/inputmenu1 (contents, props changed) head/contrib/dialog/samples/inputmenu2 (contents, props changed) head/contrib/dialog/samples/inputmenu3 (contents, props changed) head/contrib/dialog/samples/inputmenu4 (contents, props changed) head/contrib/dialog/samples/install/ head/contrib/dialog/samples/install/FDISK.TEST head/contrib/dialog/samples/install/makefile.in head/contrib/dialog/samples/install/setup.c head/contrib/dialog/samples/install/setup.help head/contrib/dialog/samples/killall (contents, props changed) head/contrib/dialog/samples/listing (contents, props changed) head/contrib/dialog/samples/menubox (contents, props changed) head/contrib/dialog/samples/menubox-8bit (contents, props changed) head/contrib/dialog/samples/menubox-utf8 (contents, props changed) head/contrib/dialog/samples/menubox1 (contents, props changed) head/contrib/dialog/samples/menubox10 (contents, props changed) head/contrib/dialog/samples/menubox2 (contents, props changed) head/contrib/dialog/samples/menubox3 (contents, props changed) head/contrib/dialog/samples/menubox4 (contents, props changed) head/contrib/dialog/samples/menubox5 (contents, props changed) head/contrib/dialog/samples/menubox6 (contents, props changed) head/contrib/dialog/samples/menubox7 (contents, props changed) head/contrib/dialog/samples/menubox8 (contents, props changed) head/contrib/dialog/samples/menubox9 (contents, props changed) head/contrib/dialog/samples/mixedform (contents, props changed) head/contrib/dialog/samples/mixedform2 (contents, props changed) head/contrib/dialog/samples/mixedgauge (contents, props changed) head/contrib/dialog/samples/msgbox (contents, props changed) head/contrib/dialog/samples/msgbox-help (contents, props changed) head/contrib/dialog/samples/msgbox1 (contents, props changed) head/contrib/dialog/samples/msgbox2 (contents, props changed) head/contrib/dialog/samples/msgbox3 (contents, props changed) head/contrib/dialog/samples/msgbox4-8bit (contents, props changed) head/contrib/dialog/samples/msgbox4-eucjp (contents, props changed) head/contrib/dialog/samples/msgbox4-utf8 (contents, props changed) head/contrib/dialog/samples/msgbox5 (contents, props changed) head/contrib/dialog/samples/msgbox6 (contents, props changed) head/contrib/dialog/samples/msgbox6a (contents, props changed) head/contrib/dialog/samples/password (contents, props changed) head/contrib/dialog/samples/password1 (contents, props changed) head/contrib/dialog/samples/password2 (contents, props changed) head/contrib/dialog/samples/passwordform1 (contents, props changed) head/contrib/dialog/samples/passwordform1-utf8 (contents, props changed) head/contrib/dialog/samples/pause (contents, props changed) head/contrib/dialog/samples/pause-help (contents, props changed) head/contrib/dialog/samples/progress (contents, props changed) head/contrib/dialog/samples/progress2 (contents, props changed) head/contrib/dialog/samples/radiolist (contents, props changed) head/contrib/dialog/samples/radiolist1 (contents, props changed) head/contrib/dialog/samples/radiolist10 (contents, props changed) head/contrib/dialog/samples/radiolist2 (contents, props changed) head/contrib/dialog/samples/radiolist3 (contents, props changed) head/contrib/dialog/samples/radiolist4 (contents, props changed) head/contrib/dialog/samples/report-button head/contrib/dialog/samples/report-edit head/contrib/dialog/samples/report-string head/contrib/dialog/samples/report-tempfile head/contrib/dialog/samples/report-yesno head/contrib/dialog/samples/rotated-data (contents, props changed) head/contrib/dialog/samples/setup-edit head/contrib/dialog/samples/setup-tempfile head/contrib/dialog/samples/setup-utf8 head/contrib/dialog/samples/setup-vars head/contrib/dialog/samples/slackware.rc head/contrib/dialog/samples/sourcemage.rc head/contrib/dialog/samples/suse.rc head/contrib/dialog/samples/tailbox (contents, props changed) head/contrib/dialog/samples/tailboxbg (contents, props changed) head/contrib/dialog/samples/tailboxbg1 (contents, props changed) head/contrib/dialog/samples/tailboxbg2 (contents, props changed) head/contrib/dialog/samples/testdata-8bit (contents, props changed) head/contrib/dialog/samples/textbox (contents, props changed) head/contrib/dialog/samples/textbox.txt head/contrib/dialog/samples/textbox2 (contents, props changed) head/contrib/dialog/samples/textbox3 (contents, props changed) head/contrib/dialog/samples/timebox (contents, props changed) head/contrib/dialog/samples/timebox-stdout (contents, props changed) head/contrib/dialog/samples/timebox2 (contents, props changed) head/contrib/dialog/samples/timebox2-stdout (contents, props changed) head/contrib/dialog/samples/wheel (contents, props changed) head/contrib/dialog/samples/whiptail.rc head/contrib/dialog/samples/yesno (contents, props changed) head/contrib/dialog/samples/yesno-both (contents, props changed) head/contrib/dialog/samples/yesno-extra (contents, props changed) head/contrib/dialog/samples/yesno-help (contents, props changed) head/contrib/dialog/samples/yesno-utf8 (contents, props changed) head/contrib/dialog/samples/yesno2 (contents, props changed) head/contrib/dialog/samples/yesno3 (contents, props changed) head/contrib/dialog/samples/yesno4 (contents, props changed) head/contrib/dialog/tailbox.c head/contrib/dialog/textbox.c head/contrib/dialog/timebox.c head/contrib/dialog/trace.c head/contrib/dialog/ui_getc.c head/contrib/dialog/util.c head/contrib/dialog/version.c head/contrib/dialog/yesno.c head/gnu/lib/libdialog/dlg_config.h (contents, props changed) head/gnu/lib/libodialog/ - copied from r216873, head/gnu/lib/libdialog/ Deleted: head/gnu/lib/libdialog/CHANGES head/gnu/lib/libdialog/COPYING head/gnu/lib/libdialog/README head/gnu/lib/libdialog/TESTS/ head/gnu/lib/libdialog/TODO head/gnu/lib/libdialog/checklist.c head/gnu/lib/libdialog/colors.h head/gnu/lib/libdialog/dialog.3 head/gnu/lib/libdialog/dialog.h head/gnu/lib/libdialog/dialog.priv.h head/gnu/lib/libdialog/dir.c head/gnu/lib/libdialog/dir.h head/gnu/lib/libdialog/fselect.c head/gnu/lib/libdialog/gauge.c head/gnu/lib/libdialog/help.c head/gnu/lib/libdialog/inputbox.c head/gnu/lib/libdialog/kernel.c head/gnu/lib/libdialog/lineedit.c head/gnu/lib/libdialog/menubox.c head/gnu/lib/libdialog/msgbox.c head/gnu/lib/libdialog/notify.c head/gnu/lib/libdialog/prgbox.c head/gnu/lib/libdialog/radiolist.c head/gnu/lib/libdialog/raw_popen.c head/gnu/lib/libdialog/rc.c head/gnu/lib/libdialog/rc.h head/gnu/lib/libdialog/textbox.c head/gnu/lib/libdialog/tree.c head/gnu/lib/libdialog/ui_objects.c head/gnu/lib/libdialog/ui_objects.h head/gnu/lib/libdialog/yesno.c head/gnu/usr.bin/dialog/COPYING head/gnu/usr.bin/dialog/README head/gnu/usr.bin/dialog/README.lib head/gnu/usr.bin/dialog/TESTS/ head/gnu/usr.bin/dialog/dialog.1 head/gnu/usr.bin/dialog/dialog.c Modified: head/ObsoleteFiles.inc head/UPDATING head/gnu/lib/Makefile head/gnu/lib/libdialog/Makefile head/gnu/lib/libodialog/Makefile head/gnu/usr.bin/dialog/Makefile head/share/mk/bsd.libnames.mk head/sys/sys/param.h head/usr.sbin/sade/Makefile head/usr.sbin/sysinstall/Makefile head/usr.sbin/tzsetup/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Jan 12 14:38:17 2011 (r217308) +++ head/ObsoleteFiles.inc Wed Jan 12 14:55:02 2011 (r217309) @@ -38,6 +38,51 @@ # xargs -n1 | sort | uniq -d; # done +# 20110112: Update dialog to new version, rename old libdialog to libodialog, +# removing associated man pages and header files. +OLD_FILES+=usr/share/man/man3/draw_shadow.3.gz \ + usr/share/man/man3/draw_box.3.gz usr/share/man/man3/line_edit.3.gz \ + usr/share/man/man3/strheight.3.gz usr/share/man/man3/strwidth.3.gz \ + usr/share/man/man3/dialog_create_rc.3.gz \ + usr/share/man/man3/dialog_yesno.3.gz usr/share/man/man3/dialog_noyes.3.gz \ + usr/share/man/man3/dialog_prgbox.3.gz \ + usr/share/man/man3/dialog_textbox.3.gz usr/share/man/man3/dialog_menu.3.gz \ + usr/share/man/man3/dialog_checklist.3.gz \ + usr/share/man/man3/dialog_radiolist.3.gz \ + usr/share/man/man3/dialog_inputbox.3.gz \ + usr/share/man/man3/dialog_clear_norefresh.3.gz \ + usr/share/man/man3/dialog_clear.3.gz usr/share/man/man3/dialog_update.3.gz \ + usr/share/man/man3/dialog_fselect.3.gz \ + usr/share/man/man3/dialog_notify.3.gz \ + usr/share/man/man3/dialog_mesgbox.3.gz \ + usr/share/man/man3/dialog_gauge.3.gz usr/share/man/man3/init_dialog.3.gz \ + usr/share/man/man3/end_dialog.3.gz usr/share/man/man3/use_helpfile.3.gz \ + usr/share/man/man3/use_helpline.3.gz usr/share/man/man3/get_helpline.3.gz \ + usr/share/man/man3/restore_helpline.3.gz \ + usr/share/man/man3/dialog_msgbox.3.gz \ + usr/share/man/man3/dialog_ftree.3.gz usr/share/man/man3/dialog_tree.3.gz \ + usr/share/examples/dialog/README usr/share/examples/dialog/checklist \ + usr/share/examples/dialog/ftreebox usr/share/examples/dialog/infobox \ + usr/share/examples/dialog/inputbox usr/share/examples/dialog/menubox \ + usr/share/examples/dialog/msgbox usr/share/examples/dialog/prgbox \ + usr/share/examples/dialog/radiolist usr/share/examples/dialog/textbox \ + usr/share/examples/dialog/treebox usr/share/examples/dialog/yesno \ + usr/share/examples/libdialog/Makefile usr/share/examples/libdialog/check1.c\ + usr/share/examples/libdialog/check2.c usr/share/examples/libdialog/check3.c\ + usr/share/examples/libdialog/dselect.c \ + usr/share/examples/libdialog/fselect.c \ + usr/share/examples/libdialog/ftree1.c \ + usr/share/examples/libdialog/ftree1.test \ + usr/share/examples/libdialog/ftree2.c \ + usr/share/examples/libdialog/ftree2.test \ + usr/share/examples/libdialog/gauge.c usr/share/examples/libdialog/input1.c \ + usr/share/examples/libdialog/input2.c usr/share/examples/libdialog/menu1.c \ + usr/share/examples/libdialog/menu2.c usr/share/examples/libdialog/menu3.c \ + usr/share/examples/libdialog/msg.c usr/share/examples/libdialog/prgbox.c \ + usr/share/examples/libdialog/radio1.c usr/share/examples/libdialog/radio2.c\ + usr/share/examples/libdialog/radio3.c usr/share/examples/libdialog/text.c \ + usr/share/examples/libdialog/tree.c usr/share/examples/libdialog/yesno.c +OLD_DIRS+=usr/share/examples/libdialog usr/share/examples/dialog # 20101114: Remove long-obsolete MAKEDEV.8 OLD_FILES+=usr/share/man/man8/MAKEDEV.8.gz # 20101112: vgonel(9) has gone to private API a while ago Modified: head/UPDATING ============================================================================== --- head/UPDATING Wed Jan 12 14:38:17 2011 (r217308) +++ head/UPDATING Wed Jan 12 14:55:02 2011 (r217309) @@ -22,6 +22,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20110112: + The system dialog(1) has been replaced with a new version previously + in ports as devel/cdialog. dialog(1) is mostly command-line compatible + with the previous version, but the libdialog associated with it has + a largely incompatible API. As such, the original version of libdialog + will be kept temporarily as libodialog, until its base system consumers + are replaced or updated. Bump __FreeBSD_version to 900030. + 20110103: If you are trying to run make universe on a -stable system, and you get the following warning: Added: head/contrib/dialog/CHANGES ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/dialog/CHANGES Wed Jan 12 14:55:02 2011 (r217309) @@ -0,0 +1,1526 @@ +-- $Id: CHANGES,v 1.300 2010/04/28 21:27:22 tom Exp $ +-- Thomas E. Dickey + +This version of dialog was originally from a Debian snapshot. I've done this +to it: + +2010/04/28 + + several improvements to configure script: + + modify CF_CURSES_TERM_H to handle cases such as cygwin where + packager has installed curses.h and term.h in different + directories, e.g., to wedge in a termcap library. + + modify CF_XOPEN_SOURCE, adding special case for OpenSolaris + + modify CF_MAKE_TAGS to add check for exctags and exetags, prefer to + ctags and etags to work around pkgsrc (NetBSD) renaming. + + correct CF_FIND_LINKAGE, setting cache variable for library_file in + the special case where no directory search is made. + + improve CF_GCC_VERSION, suppress stderr for c89 alias of gcc. + + improve CF_GCC_WARNINGS, moving -W and -Wall into the list to + check, since c89 alias for gcc complains about these options. + + modify CF_HEADER_PATH, to not search for variations of everything + in the current include-path + + use "mkdir -p", remove mkdirs.sh + + use CF_CURSES_HEADER to fill in possible subdirectory used for + ncurses header filename. + + modify CF_XOPEN_CURSES to work around current ncurse header loss of + predefinition of _XOPEN_SOURCE_EXTENDED + + add "--disable-rpath-hack" option, along with scripting to add + rpath option to libraries found in unusual places. + + modify pause widget to autosize like gauge, and to omit the area for + buttons when none are displayed. + + fix an infinite loop in dlg_button_layout() if there are no buttons + to display (Debian #579390). + + add makefile rules for generating html, etc., documentation from + nroff. + > patches by Samuel Martín Moro + + reset errors in tailbox before reading new character. + + modify dlg_draw_scrollbar(), omitting hiding percentages in boxes + when no arrows or scrollbar are needed. + + correct value of row for scrollbars in formbox. + + update es.po from + http://translationproject.org/latest/dialog/ + +2010/01/19 + + split up binding tables in inputbox and similar widgets to avoid + conflict between cursor-key use for input-string versus navigation + (report by slakmagik). + + if strftime() is available, support --time-format option for timebox + widget. + + if strftime() is available, support --date-format option for calendar + widget (request by Walter Harms). + + build-fixes for linking to intl library in /usr/local + + add --scrollbar option, use in most widgets to show a scrollbar on + the right margin of the data. That is cosmetic, does not respond to + the mouse. + + reuse functions from msgbox to allow prompt for yesno box to be + scrolled in a too-small window. + + correct mapping of button-codes with --nook option (report by Lebedev + Vadim). + + cleanup sample scripts using new utility scripts setup-* and report-*, + and allow command-line parameters to be added, for ad hoc testing. + + correct change to tailbox widget from 2009/02/22 using + dlg_button_layout(), which broke that widget. + + document some of the portability caveats. + + modify gauge widget to service callbacks (prompted by patch and + comments by Frank Sorenson). + + modify editbox to allow its input buffer to be larger than MAX_LEN + unless bounded by the --max-input option, and add limit-checks for + the buffer (report by slakmagik). + + improve manpage description of --checklist (report by Isaac Good). + + several improvements to configure script macros: CF_ADD_CFLAGS + CF_CURSES_FUNCS CF_DISABLE_ECHO CF_GCC_ATTRIBUTES CF_MATH_LIB + CF_POSIX_C_SOURCE CF_REMOVE_DEFINE CF_WITH_LIBTOOL CF_XOPEN_SOURCE + + add is.po, lv.po, sw.po from + http://translationproject.org/latest/dialog/ + + update de.po, id.po, pl.po, pt_BR.po, vi.po from + http://translationproject.org/latest/dialog/ + +2009/02/22 + + do not display top-arrows for scrolling if they would overwrite the + title (report by slakmagik) + + consistently use dlg_button_layout() when autosizing widgets (report + by slakmagik). + + add "-" and "+" bindings to timebox widget. + + add "-" and "+" bindings to calendar widget (OpenSolaris #6739031). + + review/fix other widgets to ensure that they exit on error, e.g., + editbox.c + + modify check in dlg_getc() to treat closure of either stdin or stdout + as an error, rather than both. This is more stringent than the check + added in 2007/07/04. + + modify dlg_result_key() to map curses ERR to dialog's error exit + (adapted from patch by Domagoj Pensa). + + updated several configure script macros: + + consistently append, rather then prepend, to $CFLAGS + + add cases for AIX 6, mint, and dragonfly to CF_XOPEN_SOURCE + + use $PATH_SEPARATOR rather than $PATHSEP + + improve CF_FIND_LINKAGE, use in checks for more libraries, e.g., + libutf8 and libiconv. + + update da.po, ru.po from + http://translationproject.org/latest/dialog/ + + updated config.guess, config.sub + +2008/08/19 + + amend changes to quoting; by default, the checklist widget quotes its + output except when --separate-output is used (Debian #495600). + + add eo.po from + http://translationproject.org/latest/dialog/ + +2008/07/27 + + add pointer-check when closing piped input (cf: 2007/03/25) + + use here-documents rather than echo, when passing backslashes in + strings, to accommodate the Debian shell "dash" (Debian #489563). + + recode several ".po" files to UTF-8 for consistency. + + change --separator to be an alias for --output-separator, for + compatibility with Xdialog. + + add --output-separator option to allow scripts to change the output + separator from a newline (for --separate-output) or a space. This + applies to other widgets such as forms and editboxes which normally + use a newline. + + add --column-separator option, to tell where column-aligned data for + radio/checkboxes or menus should be split into columns (request by + Ben Dibbens). + + add id.po, ku.po, lt.po, nb.po and update ca.po, fr.po, gl.po, ja.po, + th.po from + http://translationproject.org/latest/dialog/ + + add "--quoted" option, to quote values returned by formbox, etc. + + change names of EX/ES macros in dialog.1 to work around name- + pollution caused by changes in Debian #470729. + +2008/03/16 + + modify dlg_mouse_wgetch() to loop only on errors that it detects, + rather than on errors forwarded from dlg_getc(), in case those are + due to a disconnected terminal (report by Anatoli Sakhnik). + + allow "default" color in dialogrc file (request by Dashing). + + fix an indexing error in formbox (Debian #469190, report by Dmitry + Gomerman, patch by Vladimir Mezentsev). + + add bindings for CTL/N, CTL/P to checklist, fselect and menubox + widgets (prompted by discussion with John Gatewood Ham). + + add be@latin.po, th.po and update zh_TW.po from + http://translationproject.org/latest/dialog/ + > patches by Peter Astrand: + + modify dlg_auto_sizefile() to ensure the computed height and width + do not extend beyond the screen size. + + use unctrl() to make inputstr.c work with Solaris curses. + > patches by Yura Kalinichenko: + + extend pause widget to use ok/cancel buttons (the former giving the + same result as a timeout), rather than an exit-button. + + fix initialization parameter of inputbox for multibyte characters. + +2007/10/28 + + improve layout of checklist.c, menubox.c, ensuring that the list fits + within the available space (report by Gordon Schumacher). + + undo removal of redundant chunk from checklist.c in 2007/02/27, + since some scripts depend on this (Debian #443077). + + update nl.po from + http://translationproject.org/latest/dialog/ + +2007/09/30 + + correct cursor position in editbox after deleting past left margin + (report by Joe McDonagh). + + add "--no-ok" option (patch by Klaus Knopper). + + modify "--file" option to allow it to read from sources other than + a regular file (patch by Pieter van Beek). + + improved hi.po (Hindi) (from Klaus Knopper). + + fix masking of attributes in dlg_draw_shadow() which lost + line-drawing bit (report by David Everly). + + fix editbox widget to handle zero-length files (report by Joe + McDonagh). + + update "po" files eu.po ga.po it.po ms.po sv.po vi.po wa.po zh_CN.po + from + http://translationproject.org/latest/dialog/ + +2007/07/04 + + revise the resizable shadows so textbox's search dialog has text + visible in the shadow again. + + improve the prefixing of autoconf-related symbols in the installed + header files, taking into account symbols which are not mentioned in + dlg_config.h + + add a check when ERR returned from wgetch() to ensure that the + input/output streams are still valid. If that happens, force + ESC to be returned, quitting dialog (report by Reiner Huober). + + add extern "C" declarations to dlg_keys.h so the corresponding + function declarations are exported to C++ as C symbols. + + updated config.guess, config.sub + +2007/06/04 + + fix a memory leak in editbox.c + + revise change from 2007/02/27 which moved the logic for trimming + option text out of the loop because that moved it before + initialization of the "--trim" option. Put it back in the loop, but + limit the tokens which are trimmed to cover only those for the + current widget. Also ensure that all tokens for a widget are + trimmed, rather than only the first, which is usually text (report by + Lai Zit Seng). + + add _FILE_OFFSET_BITS definition in CF_LARGEFILE configure macro. + +2007/05/28 + + revise changes needed to make textbox's searchbox handle ncurses + resizing events, e.g., by handling the ERR in that code rather than + in dlg_getc() (Debian #423732). + +2007/05/14 + + supply a repaint_text() call in tailbox.c which was bypassed because + dlg_getc() now retries on ERR (Debian #423732, cf: 2007/02/27). + + modify dlg_getc() to fix regression in 2007/02/27 for use of + timeouts, broken by fixes to allow resizing of textbox (patch by + Arnaud Fontaine, Debian #418905). + + modify dlg_getc() to fix regression in use of TAB for traversal of + tailboxbg widgets due to changes for user-definable key bindings + (Debian #418917, cf: 2005/12/07). + +2007/04/09 + + add case in dlg_getc() to handle tab for traversing between widgets + as in the samples/tailboxbg1 script. Normally the key binding + overrides, except for the special case where multiple widgets are + available. + + add configure --with-libtool-opts, which passes its value to the + library creation and linkage passes, e.g., + --with-libtool-opts=-static + to force the result to be static libraries (prompted by a related + request by Santiago Vila). + > several fixes based on Coverity scan: + + fix memory leak in timebox, calendar widgets if the widget cannot + be created. + + fix memory leak in dlg_key.c if a user binding's storage cannot + be allocated. + + fix improperly delinked entry in dlg_del_window(). + +2007/03/25 + + improve mkdirs.sh to ignore error from mkdir if the target directory + happens to already exist (suggested by Harald van Dijk). + + amend documentation for --gauge to reflect longstanding quirk which + allows it to read percentage from the first line after an "XXX" + (Debian #415596). + + fix makefile dependency so "configure && make install-lib" works. + + fix resizing of msgbox; the message was not repainted (Debian + #415022, patch by Brian Rolfe). + + fix typo in makefile LIB_OBJECT symbol from 2007/02/27 changes. + + improve CF_MBSTATE_T by including stdio.h, needed on Tru64 to make + the test-compile work. + + change makefile to install dialog.3 as part of install-lib rather + than install-man (report by Thomas Klausner). + + use $(INSTALL_SCRIPT) for installing dialog-config (report by + Santiago Vila). + +2007/02/27 + + add dialog-config script, which provides applications with compile- + and link-information for using the dialog library. + + move calls to dlg_trim_string() out of loop in dialog.c, so each + string is trimmed once (report by Ivanov Makcim). + + modify textbox.c to allow resizing while the search box is presented. + This relies on bug-fix in ncurses 5.6 20070224. + + use dgettext() rather than gettext() to allow libdialog to use the + messages installed for dialog (patch by Vajna Miklos). + + modify inputbox to position the cursor initially at the end of any + initial-text (request by Klaus Knopper). + + add configure --with-valgrind for testing. + + add --trace option, for debugging. + + add --ascii-lines and --no-lines options to control the way the + line-drawing characters are rendered (request by Klaus Knopper). + + add --keep-tite option, to override suppression of smcup/rmcup + (termcap ti/te) strings which would switch to xterm's alternate + screen (Debian #380665). + + modify fselect/dselect to use space-character as a completion + operator like tab in shells (patch by Yoram Bar Haim). + + remove a redundant chunk from checklist.c which reported status a + second time if the help-button was pressed but no item-help option + was in effect (Andre C Barros). + + fix return-status from "dialog --pause" (Debian #409254). + + add --mixedform and --mixedgauge dialogs based on patch from + Kiran Cherupally. + + add some notes on compatibility to the manpage. + + add editbox dialog (compatible with Xdialog, Debian #368478). + + add dselect dialog (compatible with Xdialog). + + remove an incorrect initialization of .text_flen from 2005/12/07 + changes, which made all fields in a form editable (Debian #404045). + + report error and exit if a filename given for the --file option + cannot be opened (report by "Dog Walker"). + + make --program-prefix, etc., work in configure script, e.g., to make + program install as "cdialog". This does not alter the library name. + + add install-bin, install-man (and uninstall) rules to makefile. + + updates for configure script macros (originally vile, lynx, xterm): + AM_PATH_PROG_WITH_TEST, AM_WITH_NLS, CF_CURSES_CPPFLAGS, + CF_CURSES_LIBS, CF_INCLUDE_DIRS, CF_LARGEFILE, CF_MAKEFLAGS, + CF_PATH_SYNTAX, CF_SUBDIR_PATH, CF_SUBST, CF_WITH_DBMALLOC, + CF_WITH_DMALLOC, CF_WITH_LIBTOOL and CF_XOPEN_SOURCE. + + updated config.guess, config.sub + > adapted fixes from SuSE package (Werner Fink): + + add some limit-checks in dlg_draw_shadow(). + + make shadows resizable, using new dlg_move_window() in msgbox.c + and yesno.c + + add dialog_state.input, use this in end_dialog() to decide whether + to close pipe inputs and call _exit(), or simply call exit(). + + modify dlg_ctl_size() to check if the reason for failure is because + shadows were used; retry in that case without shadows. + + add signal catcher for SIGSEGV. + +2006/02/21 + + fix logic in split-out dlg_menu() to separate inputmenu and menu + handling (report by Auke Kok). + +2006/01/26 + + fix fselect.c to compile properly with Intel compiler and largefile + option. + + improve configure script checks for curses headers to work around + breakage in some packages, e.g., cygwin. + + amend correction to menubox, fixes normal menus (Debian #349969). + +2006/01/19 + + completed dialog.3 manpage + + modify configure script option --with-gauge to cover all flavors of + the gauge (gauge, pause, progressbox). + + add progressbox widget, a hybrid of gauge and tailbox (Reznic Valery). + + fix a comparison in checklist.c to avoid unneeded arrows when the + list happens to fit in the window (patch by Peter Postma). + + correct wrapping computation in print_line() from 2005/11/07 changes + (report by Barry Kauler). + + update sv.po (comments only). + http://www.iro.umontreal.ca/translation/maint/dialog/ + + correct logic that passes the callback for menubox to do inputmenu + operations from 2005/12/7 changes (report by Reznic Valery). + +2006/01/01 + + add a null-pointer check in dlg_register_buttons(), needed for the + tailboxbg (Debian #345524). + + fix a few memory leaks reported by valgrind. + +2005/12/19 + + correct return-values of new functions dlg_default_listitem() and + dlg_default_formitem() (Debian #344002). + + add Swedish translation (Debian #343303, by Daniel Nylander) + + begin function-summaries in dialog.3 + + update config.guess, config.sub + +2005/12/07 + + change license to LGPL. + + change naming convention in dlg_colors.h to make it easier to read, + and incidentally remove the last chunk of code preventing relicense. + + add --passwordform (request by Reznic Valery). + + modify pause.c, msgbox.c to work with --help-button. + + modify formbox.c, inputbox.c, textbox.c, yesno.c to work with extra + button (adapted from Reznic Valery patch). + + modify dlg_exit_label(), dlg_yes_labels() and dlg_ok_label() to allow + help-button (prompted by Reznic Valery patch). + + add zh_CN.po file from + http://www.iro.umontreal.ca/translation/maint/dialog/ + + provide alternate interfaces for dialog_checklist(), dialog_menu() + and dialog_form(): dlg_checklist(), dlg_menu() and dlg_form() + (discussion with Michael Gebetsroither). + + add/use dlg_result_key() to allow binding function keys to the + buttons. + + implement user-definable key bindings in the rc-file. + + modify inline cases for KEY_xxx values to use binding tables in new + module dlg_keys.c + + add several DIALOG_STATE items to the rc file: aspect, + separate_widget, tab_len and visit_links + + add a tab-adjustment to dlg_print_text() to improve solution from + 2005/10/30, e.g., in the samples/form* scripts. + + fix an off-by-one which made mouse-selection not work for menu items + past the first page (GenToo #112024, patch by Harald van Dijk). + +2005/11/07 + + extend dlg_add_result() to allow caller to pass a null pointer + for dialog_vars.input_result (Debian #336986). + + correct length used for text portion of radio/checkboxes (report by + Valentin Stoykov). + + modify msgbox, textbox and center_label() to work properly for + LANG=bg_BG.utf8 examples by Valentin Stoykov. + + modify use of freopen() to work with opaque FILE type on DragonFly + (report by Jeremy C Reed). + + modify print_line() to compute columns, use that for the call to + dlg_print_line(). Fix a few places where strlen() was used instead + of dlg_count_columns() (reports by Valentin Stoykov). + +2005/10/30 + + reviewed changes since beginning development in 1999, decided that + there are no appreciable portions of original code remaining. + Marked sources to correspond. + + improve cache performance for inputstr.c using tsearch() rather than + a linked-list search (Debian #294853). + + remove a special case for darwin in CF_XOPEN_SOURCE configure macro. + + add ms.po file from + http://www.iro.umontreal.ca/translation/maint/dialog/ + + remove an assignment that caused the cursor to appear initially on a + form field rather than button (Debian #333506). + + modify buttons.c to count columns rather than bytes, fixing case + where buttons were laid out incorrectly (report by Valentin Stoykov). + + change dlg_print_text() to count columns rather than bytes, fixing + case where fewer columns were displayed in menu than expected + (report by Valentin Stoykov). + +2005/10/05 + + improve fix for dlg_does_output(), eliminating redundant leading + separator. + + fill background color for item-help text (report by Peter Postma). + + correct interaction between --separate-output and --output-separator + broken in 2005/09/11 fix for Debian #326918 (Debian #331440). + + update config.guess, config.sub + +2005/09/11 + + undo doubled adjustment for left/right margins when wrapping text + for msgbox, gauge and pause (report by Xyba). + + correct position of scrolled text in formbox broken by 2004/12/19 + changes (report by Konrad Jelen). + + call dlg_does_output() from dlg_add_result(), ensuring that + separators are used when combining widgets such as formbox (report by + John Suykerbuyk). + + fix marker in textbox.c to make it disappear at the top of the file + (report by Patrick J. Volkerding). + + fix marker shown in arrows.c for checklists, etc., which was "(+)" + where it should have been "(-)" (report/patch by Patrick J. + Volkerding). + + fix --input-fd (changes in glibc since 2003 made dialog hang on exit + due to the way dialog updated stdin). + + restore default value (a tab) for --separator or --separate-widget + lost in 2003/11/26 changes (Debian #326918). + + make several widgets handle SIGWINCH (calendar, checklist, formbox, + fselect, inputbox, menubox, pause, tailbox, textbox, timebox). Only + msgbox and yesno had been done before. Note that some still have + fixed geometry requirements, so they cannot be shrunk below a given + threshold. Also, these changes do not address traversal, e.g., for + tailboxbg. + + make gauge widget handle SIGWINCH with ncurses (Debian #305705). + + add configure option to control whether largefile support is + compiled-in (Debian #298882). + + update eu.po (Debian #312622, patch by Piarres Egana). + + add/update po files from + http://www.iro.umontreal.ca/translation/maint/dialog/ + fi.po, rw.po, sr.po, tr.po, zh_TW.po + + fixes for configure script: + + improve script for determining gcc version + + improve checks for Intel compiler and related warning options + + improve checks for defining _XOPEN_SOURCE (or alternatives) and + _POSIX_C_SOURCE + + update config.guess, config.sub + +2005/03/06 + + add/update po files from + http://www.iro.umontreal.ca/translation/maint/dialog/ + ga.po, it.po + + revert last change for da.po; it was from an older version (report by + Morten Brix Pedersen). + +2005/02/06 + + modify makefile.in so --disable-echo applies to libtool builds. + + corrected malloc size used for editable fields in formbox widget to + match the function which updates the corresponding buffer. + + modify formbox widget's use of flen to allow negative values to be + used to limit the length of the displayed field. + + improve description in manpage of output from formbox widget + (Debian #292418). + + modify formbox widget to allow fields with flen==0 to display + (Debian #292417). + + improved configure macros CF_POSIX_C_SOURCE and CF_XOPEN_SOURCE, to + avoid redefinition warnings on cygwin. + + fix a typo in inputmenu-stdout found via "sh -n" (report by Steve + Grubb). + + add/update po files from + http://www.iro.umontreal.ca/translation/maint/dialog/ + ca.po, da.po, hu.po, nl.po, rm.po, ro.po, vi.po + +2005/01/16 + + add --args option to help with debugging scripts. + + adapted some new po files from Debian package for whiptail: ar.po, + bg.po, gl.po, hi.po, hr.po, mg.po, mk.po, ro.po, sq.po and zh_TW.po + + update da.po (Morten Brix Pedersen). + + add configure check for Intel 8.0 compiler, to set appropriate + warning options. + + update config.guess, config.sub + +2004/12/22 + + correct a typo in 2004/12/19 changes which caused width of multibyte + characters to be incorrectly computed in some locales. + + modify --version and --help options to write consistently to the + standard output (report by Santiago Vila). + + modify tailboxbg by resetting tty modes at the point where it forks a + process to update the screen, rather than waiting until that process + exits. This improves user feedback by making it apparent that dialog + is no longer processing input after that point (Redhat Bugzilla + #142538). + + minor updates to some .po files using Babel Fish, comparing with lynx. + + update es.po (Santiago Vila). + + work around bug in NetBSD 1.6 curses which seems to be confused by + reusing color pairs with different video attributes. The problem + does not appear in NetBSD 2.0 curses (but its headers do not provide + version info, so color-caching is not available for that + configuration). + + modify pause and gauge widgets to ensure that reverse-video progress + bar is visible when the background is reversed, e.g., using the + default non-color attributes. + + use chtype rather than attr_t, to build with old Solaris curses, + used in save/restore operation from 2004/09/20. + +2004/12/19 + + add pause-widget (patch by Yura Kalinichenko). + + modify exit-code returned on selecting the "Help"-button when the + --item-help option is given. Previously this returned the same code + as "OK", since it combines output for "OK" with the help status. It + now returns the help-code, but this can be overridden by setting the + environment variable $DIALOG_ITEM_HELP (reports by Erika Pacholleck + and Sebastian Muesch). + + modify formbox widget so input-length is not limited to field-length + (report by David Liebermann). + + localize the label on the search box for textbox widget (report by + Erika Pacholleck). + + correct usage message detail for fselect, which listed an extra + parameter (Debian #284008). + + add include for in ui_getc.c to build with QNX 4.25 + using Watcom 10.6 (patch by Len Meakin). + + modify behavior when no locale (or POSIX locale) is set to allow + legacy interpretation of Latin-1 character set (Debian #284795). + +2004/11/18 + + correct computation of column width for menubox/checkbox tags, for + multicolumn characters, e.g., the menubox-utf8 example. + + correct calls to wbkgdset(), which set the background attribute but + not the corresponding character (ncurses uses blank if none is given). + + improve configure script check for _XOPEN_SOURCE and _POSIX_C_SOURCE. + + improved limit-computation in show_message() to allow for scrolling + very long messages. + + adjust scrolling logic in msgbox to account for the one-line offset + used by the logic which wraps text in a box, thus avoiding leaving + an extra blank line (report by Maxim Sobolev). + +2004/09/20 + + add samples/whiptail.rc + + add samples/dialog.py (noting that a later version of this exists + as pythondialog, but this is relatively self-contained). Modified + the script to accept the $DIALOG environment variable like the other + sample scripts, to specify the path of the program to use. + + modify the install rule for header-files so the autoconf names in + dlg_config.h (and corresponding usage in dialog.h, etc), are altered + from "HAVE_xxx" to "DLG_HAVE_xxx", etc. + + add a check for getenv("HOME") in rc.c + + add a call to end_dialog() in signal_handler for tailboxbg (from + patch by Werner Fink). + + correct initialization in checklist and radiobox for --default-item, + scrolling as needed. + + modify --visit-items option so that it puts the cursor initially on + the list (in menubox, checklist and radiobox), accepts abbreviations + for the buttons when the cursor is on the button-row, and otherwise + (when --visit-items is given) abbreviations apply only to the list + (report by Erika Pacholleck). + + modify a few widgets (inputbox, textbox, yesno) to beep on unexpected + input. + + modify some msgbox widget to accept abbreviations of its button + label, for consistency with other widgets (request by Erika + Pacholleck). + + corrected logic of dlg_char_to_button(), making it check only the + first uppercase letter in each button label rather than all uppercase + letters (report by Erika Pacholleck, cf: 2003/09/10). + + improved description of --clear and --keep-window options (adapted + from Erika Pacholleck). + + move discussion of --beep and --beep-signal options to Obsolete + Options section of manpage, remove these from the help-message + (report by Erika Pacholleck). + + bracket extern's in dialog.h with C++ extern "C" declaration, in case + the library is used from a C++ application. + + modify inputmenu examples to allow ESC to cancel the script. + + modify inputmenu widget to cancel edit on a TAB or ESC. + + modify inputmenu widget to use the same color scheme for the editable + text as the inputbox widget. + + modify samples/killall to work around differences in "cut" versions. + + use the color-caching from the \Z logic when loading the ".rc" file, + thereby reducing the number of color pairs required, and making it + less likely that deriving color pairs for drawing arrows on a given + background will run out of colors. + + save/restore window attributes in dlg_draw_arrows() and similar + functions, to allow widgets to draw arrows using the widget's + background rather than a common/fixed value (request by Erika + Pacholleck). + + modify textbox widget so the down-arrow will be hidden when at the + end of the file. (Modifying the up-arrow to be hidden is harder - + will do this when implementing scrollbars). + + correct off-by-one in fselect.c which left down-arrows showing at + the bottom of directory- and file-lists (report by Erika Pacholleck). + + improve display of percentages by omitting blanks where lines should + be shown. + + modify logic for \Z escapes to make those that set video attributes + not clear the colors (report by Erika Pacholleck). + + modify logic for \Z escapes to allow foreground and background + colors to be the same, provided that bold attribute is set. + Also improved the logic for choosing a background color when the + foreground and background are the same (report by Erika Pacholleck). + + update configure script macro CF_XOPEN_SOURCE, ensuring that the + _POSIX_C_SOURCE value is defined with a specific value (bug report + originally for lynx). + + fix configure script so that po/makefile is generated properly when + the configure --srcdir --enable-nls options are used. + + modify makefile.in to allow build/install from another directory, + i.e., using configure --srcdir (patch by Mike Castle). + + updated da.po (Debian #262587, Morten Brix Pedersen). + + modify some sample scripts to avoid using grave quotes nested within + double quotes with multiple file redirection, which does not work + with Solaris /bin/sh (report/analysis by Eric Haller). + + check for end of string immediately after a \Z escape to avoid + displaying the null terminator as a ^@ (report by Erika Pacholleck). + > patches by Erika Pacholleck: + + modify calendar.c, fselect.c and timebox.c to use color scheme like + other lists, using menubox colors rather than dialog colors. + + correct charset for po/de.po, translate messages for "Help" and + "Rename". + + omit parentheses around percentage in textbox.c + + correct a few mismatched attributes, e.g., searchbox_attr in textbox.c, + percentage in msgbox.c, + + +2004/07/31 + + add test scripts to cover zero-width column case. + + remove limit checks from checklist.c and menubox.c (cf: 2004/07/28), + since some scripts use zero-width columns (Debian #262411 and report + by Kyle Sallee). + +2004/07/29 + + modify msgbox.c to only reserve space for percentage shown as part + of scrollable text for the msgbox widget. This makes infobox look + as it did before 2004/06/06 changes (report by Vinesh Christopher) + +2004/07/28 + + remove redundant calls to wtimeout() from widgets since wtimeout() + is properly called from ui_getc() where it is controlled by the + --timeout option (bug report by juanjo). + + add limit checks in checklist.c and menubox.c for very narrow screens + (prompted by Steve Grubb patch). + + initialize step in dlg_draw_buttons() in case it is used to draw + a vertical list of buttons (prompted by Steve Grubb patch). + > fixes by Steve Grubb: + + correct logic in checklist.c (cf: 2003/11/26 changes) which turned + quoting on unnecessarily for radiobox, breaking some old scripts. + + increase size of array in dlg_ok_labels() to avoid overrun if extra + and help buttons are used (cf: 2002/06/12 changes). + + initialize fkey variable in menubox.c and textbox.c (cf: 2003/07/12). + +2004/07/21 - release 1.0 + + minor updates for configure script, i.e., CF_XOPEN_SOURCE, + CF_NCURSES_LIBS macros. + + update config.guess, config.sub + + add nl.po (Jacques Weewer). + +2004/06/06 + + add --visit-items option, which allows the user to tab to the item + list in the checklist/radiobox and menubox widgets (request by + Ari Moisio). + + use wide-character line-drawing for up/down arrows when configured + for wide-characters, gives better results with uxterm. + + limit the number of times a --file option can be used, to prevent + runaway recursion if a --file option is embedded within a file which + is included. + + improve discussion of wrapping in the manpage (Debian #251937). + + modify msgbox to allow it to scroll vertically like textbox (Debian + #233276). This only works with ncurses. + + implement $DIALOGVARS environment variable to apply common options to + dialog_vars when it is reset before processing other common options. + + add --single-quoted option to control whether output is double-quoted + with '"' or single-quoted with single-quotes. + + revert the default quoting behavior of checklists to use + double-quotes (report by Mark K Post regarding Slackware scripts). + + add eu.po (Basque) (Piarres Beobide Egaa). + + add ca.po (Catalan) (Jordi Mallach). + +2004/04/21 + + add a call to flushinp() to init_dialog(), to discard any typeahead + before dialog is invoked (Debian #244746). + + correct dlg_match_char() function, which was broken during rewrite + to support wide-characters (Debian #244777). + + improved ru.po, uses UTF-8 charset (Leonid Kanter, Redhat Bugzilla + #119200). + + correct position of shadow drawn for dialogs, which appeared to work + for most versions of curses (other than NetBSD) but would have been + visible for certain color schemes (discussion with Julian Coleman). + + correct loop-exit in longest_word() (Tomas Heredia, forwarded by + Santiago Vila). + + add cy.po (Welsh) (Dafydd Harries). + +2004/03/16 + + modify quoting of results to use single-quote rather than double + quote, and ensure that results containing a quote or backslash + character are escaped (report by Florent Rougon) + + remove an incorrect comparison from checklist which made cursor + stick on the last line, from 2004/03/01 changes. + +2004/03/14 + + add a dependency to install library if "--with-libtool" is used. + + add manpage for the library. + + add "--file" + + modify formbox.c to support "--help-status" like menubox. + + modify checklist.c to add item name to the "HELP" string when + "--help-button" is used and no --item-help option is given (Debian + #236841, report/patch by Jorg Sommer). + + rename colors.h to dlg_colors.h, install that when the library is + installed. + + add copyright notice to usage ("--help") message. + + correct a missing bounds check for mouse-clicks in menubox (prompted + by Debian #233044). + + updated several configure-script macros: AM_GNU_GETTEXT, + AM_WITH_NLS, CF_OUR_MESSAGES, CF_PROG_EXT, CF_WITH_DBMALLOC, + CF_WITH_DMALLOC, CF_WITH_LIBTOOL, CF_XOPEN_SOURCE. + +2004/03/01 + + improve layout of calendar widget to allow for very long button + labels (report by Santiago Vila). + + correct logic for $DIALOG_TTY, broken in 2003/11/30. The environment + variable must evaluate to a nonzero integer (report by Florent + Rougon). + + document interaction between "--default-no" and "--no-cancel" options + in manpage (Debian #223488). + + change configure script to use autoconf 2.52+patch, to work around + issues with Estonian locale (report by Seemant Kulleen). + + add uk.po (Ukrainian) (Debian #232441). + + make --default-item apply to checklist widget (Debian #225255). + + correct a missing check for --item-help when --help-status was given + for checklist (Debian #232921). + + correct a missing bounds check for mouse-clicks in checklist (Debian + #233044). + + update config.guess, config.sub + +2003/12/07 + + correct infinite loop in yesno widget when "--defaultno" option is + combined with "--no-cancel" (Debian #223077). + +2003/11/30 + + suppress double-quotes added for "--help-status" option if the + string does not contain any special characters. + +2003/11/26 + + add samples/sourcemage.rc, for comparison with slackware.rc + + add "--insecure" option (request by Sean Mathews (DrWho@f34r.com)). + + make "--defaultno" option apply to widgets which use OK/Cancel + buttons as well (Debian #209030). + + improve documentation of exit-codes for each widget in the manpage + (Debian #217926). + + add option "--keep-window" to suppress repainting after completing + each widget (request by Ingo van Lil). + + add options "--yes-label" and "--no-label" to allow override of the + "Yes" and "No" strings (request by Christoph Zwerschke). + + add option "--help-status" to allow script to restore a checklist + or radiolist after processing an item-help string (Debian #209031). + + modify width-calculation for non-formatted text to ensure it is + wide enough for the longest word in the text (patch by Andrew Gaul). + + modify dlg_index_columns() to count a newline as a single cell rather + than 2 for the normal curses case. This fixes an off-by-one for + the text-justification, shown in screen 2 of msgbox1 sample script. + + fix dlg_char_to_button(); 2003/09/10 changes made it incorrectly + ignore case of the labels. + + change calendar's use of arrow keys so they are (as before 2002/06/22) + interpreted within the day-grid as movement within that grid (request + by David Anders). + + correct missing initialization of last_getc variable in dlg_getc() + (report/analysis by Victor Wodecki). + + modify main program to make + dialog --no-shadow --print-maxsize + work. Normally dialog prints the screen size after subtracting the + area reserved for shadows, but some applications may need the actual + screen size (Debian #213424). + + several related changes (Debian #213425): + + separate the examples using "--stdout" and "--output-fd" from the + normal usage examples. + + add "--input-fd" option, provide a sample of its use. + + modify init_dialog() to use initscr() unless a "--stdout" option + was used. Some scripts relied on the coincidence that redirecting + standard output from dialog would "work". Before this change + init_dialog() assumed that redirected standard output was + synonymous with "--stdout" option (not the intended behavior). + + modify command-line parsing to look for "--stdout" and "--stderr" + options first, allowing only one. + + add a check for an environment variable $DIALOG_TTY which provides + the older behavior, i.e., try to open the terminal directly if + stdout is redirected. + + interface changes, to make libdialog simpler to use: + + rename all of the internal functions to begin with "dlg_", but + provide compatibility with older names if the application defines + __DIALOG_OLD_NAMES__. + + add dialog_version() function, and corresponding DIALOG_VERSION and + DIALOG_PATCHDATE definitions to dlg_config.h + + eliminate remaining global variables such as screen_initialized in + favor of dialog_state and dialog_vars. + + move some data such as dialog_vars.output to dialog_state, since + they are normally not reset between widgets. + + change interfaces of dialog_yesno() and dialog_checklist() to use + dialog_state.defaultno and dialog_vars.separate_output, making it + simpler and more consistent. + + improve configure script and related definitions: + + add "--with-libtool" option to provide shared library support by + libtool. + + rename generated "config.h" to "dlg_config.h", so it can be + installed without naming conflict. Added "dlg_config.h" to + install-lib rule. + + modify configure script and makefile to use EXEEXT and OBJEXT. + + add "--enable-widec" option to control whether wide-curses features + are compiled-in, rather than check for the existence of those in + the curses library. This allows building with HPUX curses, which + has abandoned legacy features while not quite supporting X/Open + curses. + + add configure check for getbegx(), etc., which are not provided on + all platforms. + + update config.guess, config.sub + +2003/10/02 + + update hu.po (Arpad Biro). + + revert part of the 2003/08/18 change to "--stdout" option. Using + stderr for screen output does not work well on several platforms + since stdout's settings are affected (report by Kent Robotti). + +2003/09/24 + + modify tailbox to allow it to display files with arbitrarily long + lines. + + fix an infinite loop in tailbox, broken when making interface changes + to dlg_getc() (report by Ingo van Lil). + + amend fix for "--and-widget" to not treat "---" as an option (report + by Kent Robotti). + + updated es.po (Santiago Vila). + +2003/09/10 + + correct "RENAMED" result from inputmenu widget, which did not reset + the result buffer, and did not account for scroll-offset (Debian + #209336). + + modify button, menu and checklist logic that matches a character to + the beginning of a text field to support wide-characters (completes + Debian #195674). + + modify configure script to not use "head -1". + +2003/08/30 + + modify searchbox popup in textbox widget so one can simply press + return on an empty input to cancel the popup. + + modify error reporting to avoid clearing screen if a problem is + found in the ".rc" file. + + add color/attribute combinations for form widget (based on patch by + Reznic Valery). + + combine rc-file colors, attribute- and color-tables to obtain a + single table for color values, which requires less work to add new + entries. + + modify fselect widget to make back-tab work again, since it was + broken by the rewrite of dlg_edit_string(). + + modify howmany_tags() so it will quit searching when it finds any + option, not only "--and-widget" (Debian #206636). + + correct call to dlg_print_text() in print_line(), which did not + account for hidden characters (report/patch by David Poole). + + modify print_button() to display properly if locale defines ok/cancel + or yes/no buttons that contain multibyte characters. + +2003/08/20 + + correct an indexing error when deleting from the end of a line using + KEY_DC; it happened to work on Linux because malloc() clears memory + like calloc(). + + add '\r' to case statement where '\n' is translated to KEY_ENTER to + work around defect in NetBSD curses. + + modify configure check for getparyx(), etc., which are implemented + by NetBSD curses as functions rather than macros. + + correct configure check for term.h, which may be + if ncursesw development headers are installed, but not ncurses + development headers. Or they may not coincide (Debian #206287). + +2003/08/18 + + modify checklist.c and menubox.c to display tags properly if they + contain wide-characters. + + better solution for initializing curses when "--stdout" option is + used, e.g., use stderr for the output if it is a tty. Also correct + the error handling, so dialog exits with an error if it cannot + find a way to do output (Debian #205509). + + modify sample scripts to use consistent definition of $DIALOG + (Debian #205508). + + add UTF-8 examples inputbox6-utf8, inputbox6-utf8 (from Tomohiro + Kubota, Debian #195674). + + modify print_line() to work with wide-characters, e.g., so it handles + wrapping for double-width characters. + + cache results from multibyte character indices, speeds up cursor + movement. + + modify form widget to support scrolling and mouse-selection. + + add form widget (based on patch by Reznic Valery). + + correct mouse-handling for inputmenu widget. + + corrections to menu.c: location of clearing operation, and height of + rows in code for older ncurses versions (patch by Reznic Valery). + + improve logic that compensates for xterm's alternate-screen by + cancelling the rmcup/smcup strings after the rmcup has been issued. + That ensures that dialog will not clear the screen on exit (report + by Javier Kohen). + + modify initialization between widgets to retain the values for the + --aspect, --separate-widget and --tab-len options. + + add --separator as an alias for --separate-widget (compatible with + Xdialog). + + correct handling of Xdialog's --icon and --wmclass options, whose + parameter was not ignored. + + correct logic for --separate-widget so its string is written before + each output, rather than only for --and-widget option (report by + Javier Kohen). + + improve limit-check in center_label() for buttons.c (report by Tor + Vidar Havstad). + + correct layout of --menu widget, which reduced display width due to + logic for --inputmenu being applied whether or not that configuration + was used (reports by Javier Kohen, Dimitar Zhekov and MAL + ). Fixes Debian #201215. + + modify gauge widget to support --begin option (Hans-Joachim Baader). + + updated pl.po (Jaroslaw Swierczynski). + + hide cursor while painting gauge. + + add auto-sizing logic to gauge widget (reports by Javier Kohen and + Robert Schubert). + +2003/07/20 + + rewrote inputstr.c, allowing it to enter and display wide-characters. + Some nonprinting characters such as control/B can be edited as well. + + modify timebox to allow user to type numbers into the fields. + + change interfaces of dlg_getc(), mouse_wgetch(), etc., to add + parameter that returns whether the result is really a function-key. + This is needed to work with wide-character curses. + + correct computation of week-number in calendar widget (report by + Heiner Lamann). + + updated configure script macros: + + suppress -Winline with gcc 3.3, since it is broken. + + fix caching bug in CF_UTF8_LIB + + improved script for CF_BUNDLED_INTL. + + update config.guess, config.sub + +2003/03/08 + + add null-pointer checks to some malloc calls which were overlooked. + + correct logic in dlg_add_result(), which did not copy content of + non-allocated buffer to the first allocation (report by Daniel + Dupont). + +2003/03/02 + + correct an uninitialized value in dlg_add_result() (Debian #182683). + +2003/01/30 + + corrected print_line(), which subtracted the margin twice from the + right-limit, making a string wrap unnecessarily (Debian #168823). + + correct initial limit-check for arrows in checklist.c, which used + the wrong variable, showing the bottom arrow when it should not + (Debian #168823). *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 16:10:24 2011 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 81878106566B; Wed, 12 Jan 2011 16:10:24 +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 172898FC1E; Wed, 12 Jan 2011 16:10:23 +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 p0CGAJIS033277 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 12 Jan 2011 18:10:19 +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 p0CGAJRZ036127; Wed, 12 Jan 2011 18:10:19 +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 p0CGAJm8036126; Wed, 12 Jan 2011 18:10:19 +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: Wed, 12 Jan 2011 18:10:19 +0200 From: Kostik Belousov To: Pawel Jakub Dawidek Message-ID: <20110112161019.GW2518@deviant.kiev.zoral.com.ua> References: <201101121438.p0CEcHWW092155@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1Wg5Vd7si6EhrIHA" Content-Disposition: inline In-Reply-To: <201101121438.p0CEcHWW092155@svn.freebsd.org> 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: r217308 - 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: Wed, 12 Jan 2011 16:10:24 -0000 --1Wg5Vd7si6EhrIHA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 12, 2011 at 02:38:17PM +0000, Pawel Jakub Dawidek wrote: > Author: pjd > Date: Wed Jan 12 14:38:17 2011 > New Revision: 217308 > URL: http://svn.freebsd.org/changeset/base/217308 >=20 > Log: > Add a note that when custom signal handler is installed for a signal, > signal action is restored to default in child after fork(2). > In this case there is no need to do anything with dummy SIGCHLD handler, > because after fork(2) it will be automatically reverted to SIG_IGN. > =20 > Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com > MFC after: 3 days >=20 > Modified: > head/sbin/hastd/hooks.c >=20 > Modified: head/sbin/hastd/hooks.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/sbin/hastd/hooks.c Wed Jan 12 14:35:29 2011 (r217307) > +++ head/sbin/hastd/hooks.c Wed Jan 12 14:38:17 2011 (r217308) > @@ -372,6 +372,11 @@ hook_execv(const char *path, va_list ap) > descriptors(); > PJDLOG_VERIFY(sigemptyset(&mask) =3D=3D 0); > PJDLOG_VERIFY(sigprocmask(SIG_SETMASK, &mask, NULL) =3D=3D 0); > + /* > + * Dummy handler set for SIGCHLD in the parent should be > + * changed after fork(2) automatically to the default SIG_IGN, > + * so there is no need to do anything with it. > + */ > execv(path, args); > pjdlog_errno(LOG_ERR, "Unable to execute %s", path); > exit(EX_SOFTWARE); Fork does not change the disposition of the signals. Exec family of the functions indeed reset the signals with handler to default disposition. --1Wg5Vd7si6EhrIHA Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk0t0msACgkQC3+MBN1Mb4gFYwCgyqixKqUnmP4KtbIpwoZde1XH eCgAnRON+ggx3ADWSIDlI9PSwDlKyvFH =S6XP -----END PGP SIGNATURE----- --1Wg5Vd7si6EhrIHA-- From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 16:16:55 2011 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 30EAA106566B; Wed, 12 Jan 2011 16:16:55 +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 1FC458FC12; Wed, 12 Jan 2011 16:16: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 p0CGGtOL094634; Wed, 12 Jan 2011 16:16:55 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CGGtwM094632; Wed, 12 Jan 2011 16:16:55 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201101121616.p0CGGtwM094632@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 12 Jan 2011 16:16: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: r217312 - 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: Wed, 12 Jan 2011 16:16:55 -0000 Author: pjd Date: Wed Jan 12 16:16:54 2011 New Revision: 217312 URL: http://svn.freebsd.org/changeset/base/217312 Log: execve(2), not fork(2) resets signal handler to the default value (if it isn't ignored). Correct comment talking about that. Pointed out by: kib MFC after: 3 days Modified: head/sbin/hastd/hooks.c Modified: head/sbin/hastd/hooks.c ============================================================================== --- head/sbin/hastd/hooks.c Wed Jan 12 16:00:49 2011 (r217311) +++ head/sbin/hastd/hooks.c Wed Jan 12 16:16:54 2011 (r217312) @@ -373,9 +373,9 @@ hook_execv(const char *path, va_list ap) PJDLOG_VERIFY(sigemptyset(&mask) == 0); PJDLOG_VERIFY(sigprocmask(SIG_SETMASK, &mask, NULL) == 0); /* - * Dummy handler set for SIGCHLD in the parent should be - * changed after fork(2) automatically to the default SIG_IGN, - * so there is no need to do anything with it. + * Dummy handler set for SIGCHLD in the parent will be restored + * to SIG_IGN on execv(3) below, so there is no need to do + * anything with it. */ execv(path, args); pjdlog_errno(LOG_ERR, "Unable to execute %s", path); From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 16:17:14 2011 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 5ECD71065674; Wed, 12 Jan 2011 16:17:14 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 041418FC15; Wed, 12 Jan 2011 16:17:13 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 128E34569A; Wed, 12 Jan 2011 17:17:12 +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 E8EAA45683; Wed, 12 Jan 2011 17:17:06 +0100 (CET) Date: Wed, 12 Jan 2011 17:16:59 +0100 From: Pawel Jakub Dawidek To: Kostik Belousov Message-ID: <20110112161659.GD1792@garage.freebsd.pl> References: <201101121438.p0CEcHWW092155@svn.freebsd.org> <20110112161019.GW2518@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kORqDWCi7qDJ0mEj" Content-Disposition: inline In-Reply-To: <20110112161019.GW2518@deviant.kiev.zoral.com.ua> 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: r217308 - 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: Wed, 12 Jan 2011 16:17:14 -0000 --kORqDWCi7qDJ0mEj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 12, 2011 at 06:10:19PM +0200, Kostik Belousov wrote: > On Wed, Jan 12, 2011 at 02:38:17PM +0000, Pawel Jakub Dawidek wrote: > > Author: pjd > > Date: Wed Jan 12 14:38:17 2011 > > New Revision: 217308 > > URL: http://svn.freebsd.org/changeset/base/217308 > >=20 > > Log: > > Add a note that when custom signal handler is installed for a signal, > > signal action is restored to default in child after fork(2). > > In this case there is no need to do anything with dummy SIGCHLD handl= er, > > because after fork(2) it will be automatically reverted to SIG_IGN. > > =20 > > Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com > > MFC after: 3 days > >=20 > > Modified: > > head/sbin/hastd/hooks.c > >=20 > > Modified: head/sbin/hastd/hooks.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/sbin/hastd/hooks.c Wed Jan 12 14:35:29 2011 (r217307) > > +++ head/sbin/hastd/hooks.c Wed Jan 12 14:38:17 2011 (r217308) > > @@ -372,6 +372,11 @@ hook_execv(const char *path, va_list ap) > > descriptors(); > > PJDLOG_VERIFY(sigemptyset(&mask) =3D=3D 0); > > PJDLOG_VERIFY(sigprocmask(SIG_SETMASK, &mask, NULL) =3D=3D 0); > > + /* > > + * Dummy handler set for SIGCHLD in the parent should be > > + * changed after fork(2) automatically to the default SIG_IGN, > > + * so there is no need to do anything with it. > > + */ > > execv(path, args); > > pjdlog_errno(LOG_ERR, "Unable to execute %s", path); > > exit(EX_SOFTWARE); > Fork does not change the disposition of the signals. > Exec family of the functions indeed reset the signals with handler > to default disposition. You are right, thanks. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --kORqDWCi7qDJ0mEj Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk0t0/sACgkQForvXbEpPzSyIwCgk2u0EggRXYxAC5RGt4Eq/PWp 1rIAoLlYdQ8U+J9MFDstaZUkGBOGffdL =H6bO -----END PGP SIGNATURE----- --kORqDWCi7qDJ0mEj-- From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 17:52:49 2011 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 19BF2106566C; Wed, 12 Jan 2011 17:52:49 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 070D48FC13; Wed, 12 Jan 2011 17:52: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 p0CHqm4Y096828; Wed, 12 Jan 2011 17:52:48 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CHqmeO096825; Wed, 12 Jan 2011 17:52:48 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201101121752.p0CHqmeO096825@svn.freebsd.org> From: Matthew D Fleming Date: Wed, 12 Jan 2011 17:52: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: r217313 - in head: . 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: Wed, 12 Jan 2011 17:52:49 -0000 Author: mdf Date: Wed Jan 12 17:52:48 2011 New Revision: 217313 URL: http://svn.freebsd.org/changeset/base/217313 Log: Add type checking for static and dynamic sysctls using scalar types. The code is turned off until the tree is fixed up so it compiles. __FreeBSD_version was already bumped once today, so skip the bump, but add an entry to UPDATING. Note that __DESCR() is used in the SYSCTL_OID() macro and so is not needed in macros that invoke it. This use was inconsistent in the file and I have made it consistent any lines already being changed. Reviewed by: bde (previous version), -arch (previous version) Modified: head/UPDATING head/sys/sys/sysctl.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Wed Jan 12 16:16:54 2011 (r217312) +++ head/UPDATING Wed Jan 12 17:52:48 2011 (r217313) @@ -23,6 +23,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. ln -s aj /etc/malloc.conf.) 20110112: + A SYSCTL_[ADD_]UQUAD was added for unsigned uint64_t pointers, + symmetric with the existing SYSCTL_[ADD_]QUAD. Type checking + for scalar sysctls is defined but disabled. Code that needs + UQUAD to pass the type checking that must compile on older + systems where the define is not present can check against + __FreeBSD_version >= 900030. + The system dialog(1) has been replaced with a new version previously in ports as devel/cdialog. dialog(1) is mostly command-line compatible with the previous version, but the libdialog associated with it has Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Wed Jan 12 16:16:54 2011 (r217312) +++ head/sys/sys/sysctl.h Wed Jan 12 17:52:48 2011 (r217313) @@ -216,6 +216,55 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e #define SYSCTL_NODE_CHILDREN(parent, name) \ sysctl_##parent##_##name##_children +/* + * These macros provide type safety for sysctls. SYSCTL_ALLOWED_TYPES() + * defines a transparent union of the allowed types. SYSCTL_ASSERT_TYPE() + * and SYSCTL_ADD_ASSERT_TYPE() use the transparent union to assert that + * the pointer matches the allowed types. + * + * The allow_0 member allows a literal 0 to be passed for ptr. + */ +#define SYSCTL_ALLOWED_TYPES(type, decls) \ + union sysctl_##type { \ + long allow_0; \ + decls \ + } __attribute__((__transparent_union__)); \ + \ + static inline void * \ + __sysctl_assert_##type(union sysctl_##type ptr) \ + { \ + return (ptr.a); \ + } \ + struct __hack + +SYSCTL_ALLOWED_TYPES(INT, int *a; ); +SYSCTL_ALLOWED_TYPES(UINT, unsigned int *a; ); +SYSCTL_ALLOWED_TYPES(XINT, unsigned int *a; int *b; ); +SYSCTL_ALLOWED_TYPES(LONG, long *a; ); +SYSCTL_ALLOWED_TYPES(ULONG, unsigned long *a; ); +SYSCTL_ALLOWED_TYPES(XLONG, unsigned long *a; long b; ); +SYSCTL_ALLOWED_TYPES(INT64, int64_t *a; long long *b; ); +SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a; unsigned long long *b; ); + +#ifdef notyet +#define SYSCTL_ADD_ASSERT_TYPE(type, ptr) \ + __sysctl_assert_ ## type (ptr) +#define SYSCTL_ASSERT_TYPE(type, ptr, parent, name) \ + _SYSCTL_ASSERT_TYPE(type, ptr, __LINE__, parent##_##name) +#else +#define SYSCTL_ADD_ASSERT_TYPE(type, ptr) ptr +#define SYSCTL_ASSERT_TYPE(type, ptr, parent, name) +#endif +#define _SYSCTL_ASSERT_TYPE(t, p, l, id) \ + __SYSCTL_ASSERT_TYPE(t, p, l, id) +#define __SYSCTL_ASSERT_TYPE(type, ptr, line, id) \ + static inline void \ + sysctl_assert_##line##_##id(void) \ + { \ + (void)__sysctl_assert_##type(ptr); \ + } \ + struct __hack + #ifndef NO_SYSCTL_DESCR #define __DESCR(d) d #else @@ -252,65 +301,106 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e arg, len, sysctl_handle_string, "A", __DESCR(descr)) /* Oid for an int. If ptr is NULL, val is returned. */ -#define SYSCTL_INT(parent, nbr, name, access, ptr, val, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_INT|CTLFLAG_MPSAFE|(access), \ - ptr, val, sysctl_handle_int, "I", descr) - -#define SYSCTL_ADD_INT(ctx, parent, nbr, name, access, ptr, val, descr) \ - sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_INT|CTLFLAG_MPSAFE|(access), \ - ptr, val, sysctl_handle_int, "I", __DESCR(descr)) +#define SYSCTL_INT(parent, nbr, name, access, ptr, val, descr) \ + SYSCTL_ASSERT_TYPE(INT, ptr, parent, name); \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_INT | CTLFLAG_MPSAFE | (access), \ + ptr, val, sysctl_handle_int, "I", descr) + +#define SYSCTL_ADD_INT(ctx, parent, nbr, name, access, ptr, val, descr) \ + sysctl_add_oid(ctx, parent, nbr, name, \ + CTLTYPE_INT | CTLFLAG_MPSAFE | (access), \ + SYSCTL_ADD_ASSERT_TYPE(INT, ptr), val, \ + sysctl_handle_int, "I", __DESCR(descr)) /* Oid for an unsigned int. If ptr is NULL, val is returned. */ -#define SYSCTL_UINT(parent, nbr, name, access, ptr, val, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_UINT|CTLFLAG_MPSAFE|(access), \ - ptr, val, sysctl_handle_int, "IU", descr) - -#define SYSCTL_ADD_UINT(ctx, parent, nbr, name, access, ptr, val, descr) \ - sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_UINT|CTLFLAG_MPSAFE|(access), \ - ptr, val, sysctl_handle_int, "IU", __DESCR(descr)) - -#define SYSCTL_XINT(parent, nbr, name, access, ptr, val, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_UINT|CTLFLAG_MPSAFE|(access), \ - ptr, val, sysctl_handle_int, "IX", descr) - -#define SYSCTL_ADD_XINT(ctx, parent, nbr, name, access, ptr, val, descr) \ - sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_UINT|CTLFLAG_MPSAFE|(access), \ - ptr, val, sysctl_handle_int, "IX", __DESCR(descr)) +#define SYSCTL_UINT(parent, nbr, name, access, ptr, val, descr) \ + SYSCTL_ASSERT_TYPE(UINT, ptr, parent, name); \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_UINT | CTLFLAG_MPSAFE | (access), \ + ptr, val, sysctl_handle_int, "IU", descr) + +#define SYSCTL_ADD_UINT(ctx, parent, nbr, name, access, ptr, val, descr) \ + sysctl_add_oid(ctx, parent, nbr, name, \ + CTLTYPE_UINT | CTLFLAG_MPSAFE | (access), \ + SYSCTL_ADD_ASSERT_TYPE(UINT, ptr), val, \ + sysctl_handle_int, "IU", __DESCR(descr)) + +#define SYSCTL_XINT(parent, nbr, name, access, ptr, val, descr) \ + SYSCTL_ASSERT_TYPE(XINT, ptr, parent, name); \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_UINT | CTLFLAG_MPSAFE | (access), \ + ptr, val, sysctl_handle_int, "IX", descr) + +#define SYSCTL_ADD_XINT(ctx, parent, nbr, name, access, ptr, val, descr) \ + sysctl_add_oid(ctx, parent, nbr, name, \ + CTLTYPE_UINT | CTLFLAG_MPSAFE | (access), \ + SYSCTL_ADD_ASSERT_TYPE(XINT, ptr), val, \ + sysctl_handle_int, "IX", __DESCR(descr)) /* Oid for a long. The pointer must be non NULL. */ -#define SYSCTL_LONG(parent, nbr, name, access, ptr, val, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_LONG|CTLFLAG_MPSAFE|(access), \ - ptr, val, sysctl_handle_long, "L", descr) - -#define SYSCTL_ADD_LONG(ctx, parent, nbr, name, access, ptr, descr) \ - sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_LONG|CTLFLAG_MPSAFE|(access), \ - ptr, 0, sysctl_handle_long, "L", __DESCR(descr)) +#define SYSCTL_LONG(parent, nbr, name, access, ptr, val, descr) \ + SYSCTL_ASSERT_TYPE(LONG, ptr, parent, name); \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_LONG | CTLFLAG_MPSAFE | (access), \ + ptr, val, sysctl_handle_long, "L", descr) + +#define SYSCTL_ADD_LONG(ctx, parent, nbr, name, access, ptr, descr) \ + sysctl_add_oid(ctx, parent, nbr, name, \ + CTLTYPE_LONG | CTLFLAG_MPSAFE | (access), \ + SYSCTL_ADD_ASSERT_TYPE(LONG, ptr), 0, \ + sysctl_handle_long, "L", __DESCR(descr)) /* Oid for an unsigned long. The pointer must be non NULL. */ -#define SYSCTL_ULONG(parent, nbr, name, access, ptr, val, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_ULONG|CTLFLAG_MPSAFE|(access), \ - ptr, val, sysctl_handle_long, "LU", __DESCR(descr)) - -#define SYSCTL_ADD_ULONG(ctx, parent, nbr, name, access, ptr, descr) \ - sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_ULONG|CTLFLAG_MPSAFE|(access), \ - ptr, 0, sysctl_handle_long, "LU", __DESCR(descr)) - -#define SYSCTL_XLONG(parent, nbr, name, access, ptr, val, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_ULONG|CTLFLAG_MPSAFE|(access), \ - ptr, val, sysctl_handle_long, "LX", __DESCR(descr)) - -#define SYSCTL_ADD_XLONG(ctx, parent, nbr, name, access, ptr, descr) \ - sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_ULONG|CTLFLAG_MPSAFE|(access), \ - ptr, 0, sysctl_handle_long, "LX", __DESCR(descr)) +#define SYSCTL_ULONG(parent, nbr, name, access, ptr, val, descr) \ + SYSCTL_ASSERT_TYPE(ULONG, ptr, parent, name); \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_ULONG | CTLFLAG_MPSAFE | (access), \ + ptr, val, sysctl_handle_long, "LU", descr) + +#define SYSCTL_ADD_ULONG(ctx, parent, nbr, name, access, ptr, descr) \ + sysctl_add_oid(ctx, parent, nbr, name, \ + CTLTYPE_ULONG | CTLFLAG_MPSAFE | (access), \ + SYSCTL_ADD_ASSERT_TYPE(ULONG, ptr), 0, \ + sysctl_handle_long, "LU", __DESCR(descr)) + +#define SYSCTL_XLONG(parent, nbr, name, access, ptr, val, descr) \ + SYSCTL_ASSERT_TYPE(XLONG, ptr, parent, name); \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_ULONG | CTLFLAG_MPSAFE | (access), \ + ptr, val, sysctl_handle_long, "LX", descr) + +#define SYSCTL_ADD_XLONG(ctx, parent, nbr, name, access, ptr, descr) \ + sysctl_add_oid(ctx, parent, nbr, name, \ + CTLTYPE_ULONG | CTLFLAG_MPSAFE | (access), \ + SYSCTL_ADD_ASSERT_TYPE(XLONG, ptr), 0, \ + sysctl_handle_long, "LX", __DESCR(descr)) + +/* Oid for a quad. The pointer must be non NULL. */ +#define SYSCTL_QUAD(parent, nbr, name, access, ptr, val, descr) \ + SYSCTL_ASSERT_TYPE(INT64, ptr, parent, name); \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_QUAD | CTLFLAG_MPSAFE | (access), \ + ptr, val, sysctl_handle_quad, "Q", descr) + +#define SYSCTL_ADD_QUAD(ctx, parent, nbr, name, access, ptr, descr) \ + sysctl_add_oid(ctx, parent, nbr, name, \ + CTLTYPE_QUAD | CTLFLAG_MPSAFE | (access), \ + SYSCTL_ADD_ASSERT_TYPE(INT64, ptr), 0, \ + sysctl_handle_quad, "Q", __DESCR(descr)) /* Oid for a quad. The pointer must be non NULL. */ -#define SYSCTL_QUAD(parent, nbr, name, access, ptr, val, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_QUAD|CTLFLAG_MPSAFE|(access), \ - ptr, val, sysctl_handle_quad, "Q", __DESCR(descr)) - -#define SYSCTL_ADD_QUAD(ctx, parent, nbr, name, access, ptr, descr) \ - sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_QUAD|CTLFLAG_MPSAFE|(access), \ - ptr, 0, sysctl_handle_quad, "Q", __DESCR(descr)) +#define SYSCTL_UQUAD(parent, nbr, name, access, ptr, val, descr) \ + SYSCTL_ASSERT_TYPE(UINT64, ptr, parent, name); \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_QUAD | CTLFLAG_MPSAFE | (access), \ + ptr, val, sysctl_handle_quad, "QU", descr) + +#define SYSCTL_ADD_UQUAD(ctx, parent, nbr, name, access, ptr, descr) \ + sysctl_add_oid(ctx, parent, nbr, name, \ + CTLTYPE_QUAD | CTLFLAG_MPSAFE | (access), \ + SYSCTL_ADD_ASSERT_TYPE(UINT64, ptr), 0, \ + sysctl_handle_quad, "QU", __DESCR(descr)) /* Oid for an opaque object. Specified by a pointer and a length. */ #define SYSCTL_OPAQUE(parent, nbr, name, access, ptr, len, fmt, descr) \ From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 19:07:00 2011 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 189FD1065670; Wed, 12 Jan 2011 19:07:00 +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 07BF08FC15; Wed, 12 Jan 2011 19:07: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 p0CJ6xg9000717; Wed, 12 Jan 2011 19:06:59 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CJ6xew000715; Wed, 12 Jan 2011 19:06:59 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201101121906.p0CJ6xew000715@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 12 Jan 2011 19:06: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: r217314 - 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: Wed, 12 Jan 2011 19:07:00 -0000 Author: ae Date: Wed Jan 12 19:06:59 2011 New Revision: 217314 URL: http://svn.freebsd.org/changeset/base/217314 Log: Fix up the grammar. PR: docs/153933 MFC after: 3 days Modified: head/sbin/geom/class/part/gpart.8 Modified: head/sbin/geom/class/part/gpart.8 ============================================================================== --- head/sbin/geom/class/part/gpart.8 Wed Jan 12 17:52:48 2011 (r217313) +++ head/sbin/geom/class/part/gpart.8 Wed Jan 12 19:06:59 2011 (r217314) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2010 +.Dd January 12, 2011 .Dt GPART 8 .Os .Sh NAME @@ -759,8 +759,8 @@ device. .Pp .Pa NOTE : The GEOM class PART can detect the same partition table on different GEOM -providers and some of them will marked as corrupt. Be careful when choising -a provider for recovering. If you did incorrect choise you can destroy +providers and some of them will marked as corrupt. Be careful when choosing +a provider for recovering. If you choose incorrectly you can destroy the metadata of another GEOM class, e.g. GEOM MIRROR or GEOM LABEL. .Sh EXIT STATUS Exit status is 0 on success, and 1 if the command fails. From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 19:11:18 2011 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 387F91065673; Wed, 12 Jan 2011 19:11:18 +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 273FF8FC18; Wed, 12 Jan 2011 19: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 p0CJBIh4001159; Wed, 12 Jan 2011 19:11:18 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CJBIKG001157; Wed, 12 Jan 2011 19:11:18 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201101121911.p0CJBIKG001157@svn.freebsd.org> From: "George V. Neville-Neil" Date: Wed, 12 Jan 2011 19: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: r217315 - 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: Wed, 12 Jan 2011 19:11:18 -0000 Author: gnn Date: Wed Jan 12 19:11:17 2011 New Revision: 217315 URL: http://svn.freebsd.org/changeset/base/217315 Log: Fix several bugs in the ARP code related to improperly formatted packets. *) Reject requests with a protocol length not equal to 4. This is IPv4 and there is no reason to accept anything else. *) Reject packets that have a multicast source hardware address. *) Drop requests where the hardware address length is not equal to the hardware address length of the interface. Pointed out by: Rozhuk Ivan MFC after: 1 week Modified: head/sys/netinet/if_ether.c Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Wed Jan 12 19:06:59 2011 (r217314) +++ head/sys/netinet/if_ether.c Wed Jan 12 19:11:17 2011 (r217315) @@ -531,6 +531,21 @@ in_arpinput(struct mbuf *m) } ah = mtod(m, struct arphdr *); + /* + * ARP is only for IPv4 so we can reject packets with + * a protocol length not equal to an IPv4 address. + */ + if (ah->ar_pln != sizeof(struct in_addr)) { + log(LOG_ERR, "in_arp: requested protocol length != %ld\n", + sizeof(struct in_addr)); + return; + } + + if (ETHER_IS_MULTICAST(ar_sha(ah))) { + log(LOG_ERR, "in_arp: source hardware address is multicast."); + return; + } + op = ntohs(ah->ar_op); (void)memcpy(&isaddr, ar_spa(ah), sizeof (isaddr)); (void)memcpy(&itaddr, ar_tpa(ah), sizeof (itaddr)); @@ -702,7 +717,7 @@ match: "arp from %*D: addr len: new %d, i/f %d (ignored)", ifp->if_addrlen, (u_char *) ar_sha(ah), ":", ah->ar_hln, ifp->if_addrlen); - goto reply; + goto drop; } (void)memcpy(&la->ll_addr, ar_sha(ah), ifp->if_addrlen); la->la_flags |= LLE_VALID; From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 19:20:31 2011 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 0156A1065698; Wed, 12 Jan 2011 19:20:31 +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 CABBD8FC1F; Wed, 12 Jan 2011 19:20:30 +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 p0CJKUJg002022; Wed, 12 Jan 2011 19:20:30 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CJKUTF002020; Wed, 12 Jan 2011 19:20:30 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201101121920.p0CJKUTF002020@svn.freebsd.org> From: Bruce Cran Date: Wed, 12 Jan 2011 19:20:30 +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: r217316 - head/sbin/geom/class/raid3 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, 12 Jan 2011 19:20:31 -0000 Author: brucec Date: Wed Jan 12 19:20:30 2011 New Revision: 217316 URL: http://svn.freebsd.org/changeset/base/217316 Log: Fix cross-reference to gvinum(8). Modified: head/sbin/geom/class/raid3/graid3.8 Modified: head/sbin/geom/class/raid3/graid3.8 ============================================================================== --- head/sbin/geom/class/raid3/graid3.8 Wed Jan 12 19:11:17 2011 (r217315) +++ head/sbin/geom/class/raid3/graid3.8 Wed Jan 12 19:20:30 2011 (r217316) @@ -239,7 +239,7 @@ graid3 insert -n 0 data da5 .Xr mount 8 , .Xr newfs 8 , .Xr umount 8 , -.Xr vinum 8 +.Xr gvinum 8 .Sh HISTORY The .Nm From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 19:28:53 2011 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 050FE106566B; Wed, 12 Jan 2011 19:28:53 +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 E8A968FC13; Wed, 12 Jan 2011 19:28: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 p0CJSqW9002778; Wed, 12 Jan 2011 19:28:52 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CJSqFE002776; Wed, 12 Jan 2011 19:28:52 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201101121928.p0CJSqFE002776@svn.freebsd.org> From: Bruce Cran Date: Wed, 12 Jan 2011 19:28: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: r217317 - 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: Wed, 12 Jan 2011 19:28:53 -0000 Author: brucec Date: Wed Jan 12 19:28:52 2011 New Revision: 217317 URL: http://svn.freebsd.org/changeset/base/217317 Log: Fix wrapping of 20110103 entry. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Wed Jan 12 19:20:30 2011 (r217316) +++ head/UPDATING Wed Jan 12 19:28:52 2011 (r217317) @@ -40,7 +40,8 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. 20110103: If you are trying to run make universe on a -stable system, and you get the following warning: -"Makefile", line 356: "Target architecture for i386/conf/GENERIC unknown. config(8) likely too old." + "Makefile", line 356: "Target architecture for i386/conf/GENERIC + unknown. config(8) likely too old." or something similar to it, then you must upgrade your -stable system to 8.2-Release or newer (really, any time after r210146 7/15/2010 in stable/8) or build the config from the latest stable/8 branch and @@ -48,8 +49,8 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. Prior to this date, building a current universe on 8-stable system from between 7/15/2010 and 1/2/2011 would result in a weird shell parsing - error in the first kernel build phase. A new config on those old systems - will fix that problem for older versions of -current. + error in the first kernel build phase. A new config on those old + systems will fix that problem for older versions of -current. 20101228: The TCP stack has been modified to allow Khelp modules to interact with From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 19:35:23 2011 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 5542A1065679; Wed, 12 Jan 2011 19:35:23 +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 260258FC0C; Wed, 12 Jan 2011 19:35:23 +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 D625046B38; Wed, 12 Jan 2011 14:35:22 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id F261F8A01D; Wed, 12 Jan 2011 14:35:21 -0500 (EST) From: John Baldwin To: Nathan Whitehorn Date: Wed, 12 Jan 2011 11:33:34 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.4-CBSD-20110107; KDE/4.4.5; amd64; ; ) References: <201101121455.p0CEt3PD092660@svn.freebsd.org> In-Reply-To: <201101121455.p0CEt3PD092660@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201101121133.34607.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Wed, 12 Jan 2011 14:35:22 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-0.3 required=4.2 tests=BAYES_00,DATE_IN_PAST_03_06 autolearn=no 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: r217309 - in head: . contrib/dialog contrib/dialog/po contrib/dialog/samples contrib/dialog/samples/copifuncs contrib/dialog/samples/install gnu/lib gnu/lib/libdialog gnu/lib/libdialog/... 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, 12 Jan 2011 19:35:23 -0000 On Wednesday, January 12, 2011 9:55:03 am Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Wed Jan 12 14:55:02 2011 > New Revision: 217309 > URL: http://svn.freebsd.org/changeset/base/217309 > > Log: > Update dialog to version 20100428. This changes the license under which > dialog is distributed from GPLv2 to LGPLv2 and introduces a number of new > features and a new and better libdialog API. The existing libdialog will > be kept temporarily as libodialog for compatibility purposes until sade, > sysinstall and tzsetup have been either updated or replaced. > > __FreeBSD_version is now 900030. Hmm, did you import this to the vendor area first or did you just add it directly to contrib? -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 19:53:23 2011 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 BD3A1106566B; Wed, 12 Jan 2011 19:53:23 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A9E758FC12; Wed, 12 Jan 2011 19:53: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 p0CJrNIh004878; Wed, 12 Jan 2011 19:53:23 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CJrNJB004873; Wed, 12 Jan 2011 19:53:23 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201101121953.p0CJrNJB004873@svn.freebsd.org> From: Matthew D Fleming Date: Wed, 12 Jan 2011 19:53:23 +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: r217318 - in head/sys/dev: e1000 ixgbe 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, 12 Jan 2011 19:53:23 -0000 Author: mdf Date: Wed Jan 12 19:53:23 2011 New Revision: 217318 URL: http://svn.freebsd.org/changeset/base/217318 Log: sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly. Commit the Intel drivers. Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_igb.c head/sys/dev/e1000/if_lem.c head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Wed Jan 12 19:28:52 2011 (r217317) +++ head/sys/dev/e1000/if_em.c Wed Jan 12 19:53:23 2011 (r217318) @@ -5059,8 +5059,8 @@ em_add_hw_stats(struct adapter *adapter) char namebuf[QUEUE_NAME_LEN]; /* Driver Statistics */ - SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "link_irq", - CTLFLAG_RD, &adapter->link_irq, 0, + SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "link_irq", + CTLFLAG_RD, &adapter->link_irq, "Link MSIX IRQ Handled"); SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "mbuf_alloc_fail", CTLFLAG_RD, &adapter->mbuf_alloc_failed, @@ -5136,147 +5136,147 @@ em_add_hw_stats(struct adapter *adapter) CTLFLAG_RD, NULL, "Statistics"); stat_list = SYSCTL_CHILDREN(stat_node); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "excess_coll", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "excess_coll", CTLFLAG_RD, &stats->ecol, "Excessive collisions"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "single_coll", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "single_coll", CTLFLAG_RD, &stats->scc, "Single collisions"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "multiple_coll", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "multiple_coll", CTLFLAG_RD, &stats->mcc, "Multiple collisions"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "late_coll", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "late_coll", CTLFLAG_RD, &stats->latecol, "Late collisions"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "collision_count", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "collision_count", CTLFLAG_RD, &stats->colc, "Collision Count"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "symbol_errors", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "symbol_errors", CTLFLAG_RD, &adapter->stats.symerrs, "Symbol Errors"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "sequence_errors", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "sequence_errors", CTLFLAG_RD, &adapter->stats.sec, "Sequence Errors"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "defer_count", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "defer_count", CTLFLAG_RD, &adapter->stats.dc, "Defer Count"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "missed_packets", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "missed_packets", CTLFLAG_RD, &adapter->stats.mpc, "Missed Packets"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_no_buff", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_no_buff", CTLFLAG_RD, &adapter->stats.rnbc, "Receive No Buffers"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_undersize", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_undersize", CTLFLAG_RD, &adapter->stats.ruc, "Receive Undersize"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_fragmented", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_fragmented", CTLFLAG_RD, &adapter->stats.rfc, "Fragmented Packets Received "); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_oversize", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_oversize", CTLFLAG_RD, &adapter->stats.roc, "Oversized Packets Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_jabber", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_jabber", CTLFLAG_RD, &adapter->stats.rjc, "Recevied Jabber"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_errs", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_errs", CTLFLAG_RD, &adapter->stats.rxerrc, "Receive Errors"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "crc_errs", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "crc_errs", CTLFLAG_RD, &adapter->stats.crcerrs, "CRC errors"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "alignment_errs", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "alignment_errs", CTLFLAG_RD, &adapter->stats.algnerrc, "Alignment Errors"); /* On 82575 these are collision counts */ - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "coll_ext_errs", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "coll_ext_errs", CTLFLAG_RD, &adapter->stats.cexterr, "Collision/Carrier extension errors"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "xon_recvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xon_recvd", CTLFLAG_RD, &adapter->stats.xonrxc, "XON Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "xon_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xon_txd", CTLFLAG_RD, &adapter->stats.xontxc, "XON Transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "xoff_recvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xoff_recvd", CTLFLAG_RD, &adapter->stats.xoffrxc, "XOFF Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "xoff_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xoff_txd", CTLFLAG_RD, &adapter->stats.xofftxc, "XOFF Transmitted"); /* Packet Reception Stats */ - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "total_pkts_recvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "total_pkts_recvd", CTLFLAG_RD, &adapter->stats.tpr, "Total Packets Received "); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_pkts_recvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_pkts_recvd", CTLFLAG_RD, &adapter->stats.gprc, "Good Packets Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "bcast_pkts_recvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "bcast_pkts_recvd", CTLFLAG_RD, &adapter->stats.bprc, "Broadcast Packets Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_recvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_recvd", CTLFLAG_RD, &adapter->stats.mprc, "Multicast Packets Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_64", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_64", CTLFLAG_RD, &adapter->stats.prc64, "64 byte frames received "); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_65_127", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_65_127", CTLFLAG_RD, &adapter->stats.prc127, "65-127 byte frames received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_128_255", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_128_255", CTLFLAG_RD, &adapter->stats.prc255, "128-255 byte frames received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_256_511", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_256_511", CTLFLAG_RD, &adapter->stats.prc511, "256-511 byte frames received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_512_1023", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_512_1023", CTLFLAG_RD, &adapter->stats.prc1023, "512-1023 byte frames received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_1024_1522", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_1024_1522", CTLFLAG_RD, &adapter->stats.prc1522, "1023-1522 byte frames received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_octets_recvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_octets_recvd", CTLFLAG_RD, &adapter->stats.gorc, "Good Octets Received"); /* Packet Transmission Stats */ - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_octets_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_octets_txd", CTLFLAG_RD, &adapter->stats.gotc, "Good Octets Transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "total_pkts_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "total_pkts_txd", CTLFLAG_RD, &adapter->stats.tpt, "Total Packets Transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_pkts_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_pkts_txd", CTLFLAG_RD, &adapter->stats.gptc, "Good Packets Transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "bcast_pkts_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "bcast_pkts_txd", CTLFLAG_RD, &adapter->stats.bptc, "Broadcast Packets Transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_txd", CTLFLAG_RD, &adapter->stats.mptc, "Multicast Packets Transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tx_frames_64", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_64", CTLFLAG_RD, &adapter->stats.ptc64, "64 byte frames transmitted "); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tx_frames_65_127", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_65_127", CTLFLAG_RD, &adapter->stats.ptc127, "65-127 byte frames transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tx_frames_128_255", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_128_255", CTLFLAG_RD, &adapter->stats.ptc255, "128-255 byte frames transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tx_frames_256_511", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_256_511", CTLFLAG_RD, &adapter->stats.ptc511, "256-511 byte frames transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tx_frames_512_1023", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_512_1023", CTLFLAG_RD, &adapter->stats.ptc1023, "512-1023 byte frames transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tx_frames_1024_1522", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_1024_1522", CTLFLAG_RD, &adapter->stats.ptc1522, "1024-1522 byte frames transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tso_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tso_txd", CTLFLAG_RD, &adapter->stats.tsctc, "TSO Contexts Transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tso_ctx_fail", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tso_ctx_fail", CTLFLAG_RD, &adapter->stats.tsctfc, "TSO Contexts Failed"); @@ -5287,39 +5287,39 @@ em_add_hw_stats(struct adapter *adapter) CTLFLAG_RD, NULL, "Interrupt Statistics"); int_list = SYSCTL_CHILDREN(int_node); - SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "asserts", + SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "asserts", CTLFLAG_RD, &adapter->stats.iac, "Interrupt Assertion Count"); - SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "rx_pkt_timer", + SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "rx_pkt_timer", CTLFLAG_RD, &adapter->stats.icrxptc, "Interrupt Cause Rx Pkt Timer Expire Count"); - SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "rx_abs_timer", + SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "rx_abs_timer", CTLFLAG_RD, &adapter->stats.icrxatc, "Interrupt Cause Rx Abs Timer Expire Count"); - SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "tx_pkt_timer", + SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "tx_pkt_timer", CTLFLAG_RD, &adapter->stats.ictxptc, "Interrupt Cause Tx Pkt Timer Expire Count"); - SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "tx_abs_timer", + SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "tx_abs_timer", CTLFLAG_RD, &adapter->stats.ictxatc, "Interrupt Cause Tx Abs Timer Expire Count"); - SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "tx_queue_empty", + SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "tx_queue_empty", CTLFLAG_RD, &adapter->stats.ictxqec, "Interrupt Cause Tx Queue Empty Count"); - SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "tx_queue_min_thresh", + SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "tx_queue_min_thresh", CTLFLAG_RD, &adapter->stats.ictxqmtc, "Interrupt Cause Tx Queue Min Thresh Count"); - SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "rx_desc_min_thresh", + SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "rx_desc_min_thresh", CTLFLAG_RD, &adapter->stats.icrxdmtc, "Interrupt Cause Rx Desc Min Thresh Count"); - SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "rx_overrun", + SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "rx_overrun", CTLFLAG_RD, &adapter->stats.icrxoc, "Interrupt Cause Receiver Overrun Count"); } Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Wed Jan 12 19:28:52 2011 (r217317) +++ head/sys/dev/e1000/if_igb.c Wed Jan 12 19:53:23 2011 (r217318) @@ -5070,7 +5070,7 @@ igb_add_hw_stats(struct adapter *adapter char namebuf[QUEUE_NAME_LEN]; /* Driver Statistics */ - SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "link_irq", + SYSCTL_ADD_INT(ctx, child, OID_AUTO, "link_irq", CTLFLAG_RD, &adapter->link_irq, 0, "Link MSIX IRQ Handled"); SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "dropped", @@ -5133,10 +5133,10 @@ igb_add_hw_stats(struct adapter *adapter CTLFLAG_RD, adapter, E1000_TDT(txr->me), igb_sysctl_reg_handler, "IU", "Transmit Descriptor Tail"); - SYSCTL_ADD_QUAD(ctx, queue_list, OID_AUTO, "no_desc_avail", + SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "no_desc_avail", CTLFLAG_RD, &txr->no_desc_avail, "Queue No Descriptor Available"); - SYSCTL_ADD_QUAD(ctx, queue_list, OID_AUTO, "tx_packets", + SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "tx_packets", CTLFLAG_RD, &txr->tx_packets, "Queue Packets Transmitted"); @@ -5148,16 +5148,16 @@ igb_add_hw_stats(struct adapter *adapter CTLFLAG_RD, adapter, E1000_RDT(rxr->me), igb_sysctl_reg_handler, "IU", "Receive Descriptor Tail"); - SYSCTL_ADD_QUAD(ctx, queue_list, OID_AUTO, "rx_packets", + SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "rx_packets", CTLFLAG_RD, &rxr->rx_packets, "Queue Packets Received"); - SYSCTL_ADD_QUAD(ctx, queue_list, OID_AUTO, "rx_bytes", + SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "rx_bytes", CTLFLAG_RD, &rxr->rx_bytes, "Queue Bytes Received"); - SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "lro_queued", + SYSCTL_ADD_INT(ctx, queue_list, OID_AUTO, "lro_queued", CTLFLAG_RD, &lro->lro_queued, 0, "LRO Queued"); - SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "lro_flushed", + SYSCTL_ADD_INT(ctx, queue_list, OID_AUTO, "lro_flushed", CTLFLAG_RD, &lro->lro_flushed, 0, "LRO Flushed"); } @@ -5173,164 +5173,164 @@ igb_add_hw_stats(struct adapter *adapter ** since its not managing the metal, so to speak. */ if (adapter->hw.mac.type == e1000_vfadapt) { - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_pkts_recvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_pkts_recvd", CTLFLAG_RD, &stats->gprc, "Good Packets Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_pkts_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_pkts_txd", CTLFLAG_RD, &stats->gptc, "Good Packets Transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_octets_recvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_octets_recvd", CTLFLAG_RD, &stats->gorc, "Good Octets Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_octets_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_octets_txd", CTLFLAG_RD, &stats->gotc, "Good Octets Transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_recvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_recvd", CTLFLAG_RD, &stats->mprc, "Multicast Packets Received"); return; } - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "excess_coll", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "excess_coll", CTLFLAG_RD, &stats->ecol, "Excessive collisions"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "single_coll", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "single_coll", CTLFLAG_RD, &stats->scc, "Single collisions"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "multiple_coll", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "multiple_coll", CTLFLAG_RD, &stats->mcc, "Multiple collisions"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "late_coll", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "late_coll", CTLFLAG_RD, &stats->latecol, "Late collisions"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "collision_count", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "collision_count", CTLFLAG_RD, &stats->colc, "Collision Count"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "symbol_errors", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "symbol_errors", CTLFLAG_RD, &stats->symerrs, "Symbol Errors"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "sequence_errors", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "sequence_errors", CTLFLAG_RD, &stats->sec, "Sequence Errors"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "defer_count", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "defer_count", CTLFLAG_RD, &stats->dc, "Defer Count"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "missed_packets", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "missed_packets", CTLFLAG_RD, &stats->mpc, "Missed Packets"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_no_buff", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_no_buff", CTLFLAG_RD, &stats->rnbc, "Receive No Buffers"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_undersize", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_undersize", CTLFLAG_RD, &stats->ruc, "Receive Undersize"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_fragmented", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_fragmented", CTLFLAG_RD, &stats->rfc, "Fragmented Packets Received "); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_oversize", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_oversize", CTLFLAG_RD, &stats->roc, "Oversized Packets Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_jabber", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_jabber", CTLFLAG_RD, &stats->rjc, "Recevied Jabber"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_errs", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_errs", CTLFLAG_RD, &stats->rxerrc, "Receive Errors"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "crc_errs", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "crc_errs", CTLFLAG_RD, &stats->crcerrs, "CRC errors"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "alignment_errs", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "alignment_errs", CTLFLAG_RD, &stats->algnerrc, "Alignment Errors"); /* On 82575 these are collision counts */ - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "coll_ext_errs", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "coll_ext_errs", CTLFLAG_RD, &stats->cexterr, "Collision/Carrier extension errors"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "xon_recvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xon_recvd", CTLFLAG_RD, &stats->xonrxc, "XON Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "xon_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xon_txd", CTLFLAG_RD, &stats->xontxc, "XON Transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "xoff_recvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xoff_recvd", CTLFLAG_RD, &stats->xoffrxc, "XOFF Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "xoff_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xoff_txd", CTLFLAG_RD, &stats->xofftxc, "XOFF Transmitted"); /* Packet Reception Stats */ - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "total_pkts_recvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "total_pkts_recvd", CTLFLAG_RD, &stats->tpr, "Total Packets Received "); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_pkts_recvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_pkts_recvd", CTLFLAG_RD, &stats->gprc, "Good Packets Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "bcast_pkts_recvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "bcast_pkts_recvd", CTLFLAG_RD, &stats->bprc, "Broadcast Packets Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_recvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_recvd", CTLFLAG_RD, &stats->mprc, "Multicast Packets Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_64", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_64", CTLFLAG_RD, &stats->prc64, "64 byte frames received "); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_65_127", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_65_127", CTLFLAG_RD, &stats->prc127, "65-127 byte frames received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_128_255", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_128_255", CTLFLAG_RD, &stats->prc255, "128-255 byte frames received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_256_511", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_256_511", CTLFLAG_RD, &stats->prc511, "256-511 byte frames received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_512_1023", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_512_1023", CTLFLAG_RD, &stats->prc1023, "512-1023 byte frames received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_1024_1522", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_1024_1522", CTLFLAG_RD, &stats->prc1522, "1023-1522 byte frames received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_octets_recvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_octets_recvd", CTLFLAG_RD, &stats->gorc, "Good Octets Received"); /* Packet Transmission Stats */ - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_octets_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_octets_txd", CTLFLAG_RD, &stats->gotc, "Good Octets Transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "total_pkts_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "total_pkts_txd", CTLFLAG_RD, &stats->tpt, "Total Packets Transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_pkts_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_pkts_txd", CTLFLAG_RD, &stats->gptc, "Good Packets Transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "bcast_pkts_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "bcast_pkts_txd", CTLFLAG_RD, &stats->bptc, "Broadcast Packets Transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_txd", CTLFLAG_RD, &stats->mptc, "Multicast Packets Transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tx_frames_64", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_64", CTLFLAG_RD, &stats->ptc64, "64 byte frames transmitted "); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tx_frames_65_127", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_65_127", CTLFLAG_RD, &stats->ptc127, "65-127 byte frames transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tx_frames_128_255", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_128_255", CTLFLAG_RD, &stats->ptc255, "128-255 byte frames transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tx_frames_256_511", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_256_511", CTLFLAG_RD, &stats->ptc511, "256-511 byte frames transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tx_frames_512_1023", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_512_1023", CTLFLAG_RD, &stats->ptc1023, "512-1023 byte frames transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tx_frames_1024_1522", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_1024_1522", CTLFLAG_RD, &stats->ptc1522, "1024-1522 byte frames transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tso_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tso_txd", CTLFLAG_RD, &stats->tsctc, "TSO Contexts Transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tso_ctx_fail", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tso_ctx_fail", CTLFLAG_RD, &stats->tsctfc, "TSO Contexts Failed"); @@ -5341,39 +5341,39 @@ igb_add_hw_stats(struct adapter *adapter CTLFLAG_RD, NULL, "Interrupt Statistics"); int_list = SYSCTL_CHILDREN(int_node); - SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "asserts", + SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "asserts", CTLFLAG_RD, &stats->iac, "Interrupt Assertion Count"); - SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "rx_pkt_timer", + SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "rx_pkt_timer", CTLFLAG_RD, &stats->icrxptc, "Interrupt Cause Rx Pkt Timer Expire Count"); - SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "rx_abs_timer", + SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "rx_abs_timer", CTLFLAG_RD, &stats->icrxatc, "Interrupt Cause Rx Abs Timer Expire Count"); - SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "tx_pkt_timer", + SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "tx_pkt_timer", CTLFLAG_RD, &stats->ictxptc, "Interrupt Cause Tx Pkt Timer Expire Count"); - SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "tx_abs_timer", + SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "tx_abs_timer", CTLFLAG_RD, &stats->ictxatc, "Interrupt Cause Tx Abs Timer Expire Count"); - SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "tx_queue_empty", + SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "tx_queue_empty", CTLFLAG_RD, &stats->ictxqec, "Interrupt Cause Tx Queue Empty Count"); - SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "tx_queue_min_thresh", + SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "tx_queue_min_thresh", CTLFLAG_RD, &stats->ictxqmtc, "Interrupt Cause Tx Queue Min Thresh Count"); - SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "rx_desc_min_thresh", + SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "rx_desc_min_thresh", CTLFLAG_RD, &stats->icrxdmtc, "Interrupt Cause Rx Desc Min Thresh Count"); - SYSCTL_ADD_QUAD(ctx, int_list, OID_AUTO, "rx_overrun", + SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "rx_overrun", CTLFLAG_RD, &stats->icrxoc, "Interrupt Cause Receiver Overrun Count"); @@ -5385,51 +5385,51 @@ igb_add_hw_stats(struct adapter *adapter host_list = SYSCTL_CHILDREN(host_node); - SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "breaker_tx_pkt", + SYSCTL_ADD_UQUAD(ctx, host_list, OID_AUTO, "breaker_tx_pkt", CTLFLAG_RD, &stats->cbtmpc, "Circuit Breaker Tx Packet Count"); - SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "host_tx_pkt_discard", + SYSCTL_ADD_UQUAD(ctx, host_list, OID_AUTO, "host_tx_pkt_discard", CTLFLAG_RD, &stats->htdpmc, "Host Transmit Discarded Packets"); - SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "rx_pkt", + SYSCTL_ADD_UQUAD(ctx, host_list, OID_AUTO, "rx_pkt", CTLFLAG_RD, &stats->rpthc, "Rx Packets To Host"); - SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "breaker_rx_pkts", + SYSCTL_ADD_UQUAD(ctx, host_list, OID_AUTO, "breaker_rx_pkts", CTLFLAG_RD, &stats->cbrmpc, "Circuit Breaker Rx Packet Count"); - SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "breaker_rx_pkt_drop", + SYSCTL_ADD_UQUAD(ctx, host_list, OID_AUTO, "breaker_rx_pkt_drop", CTLFLAG_RD, &stats->cbrdpc, "Circuit Breaker Rx Dropped Count"); - SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "tx_good_pkt", + SYSCTL_ADD_UQUAD(ctx, host_list, OID_AUTO, "tx_good_pkt", CTLFLAG_RD, &stats->hgptc, "Host Good Packets Tx Count"); - SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "breaker_tx_pkt_drop", + SYSCTL_ADD_UQUAD(ctx, host_list, OID_AUTO, "breaker_tx_pkt_drop", CTLFLAG_RD, &stats->htcbdpc, "Host Tx Circuit Breaker Dropped Count"); - SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "rx_good_bytes", + SYSCTL_ADD_UQUAD(ctx, host_list, OID_AUTO, "rx_good_bytes", CTLFLAG_RD, &stats->hgorc, "Host Good Octets Received Count"); - SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "tx_good_bytes", + SYSCTL_ADD_UQUAD(ctx, host_list, OID_AUTO, "tx_good_bytes", CTLFLAG_RD, &stats->hgotc, "Host Good Octets Transmit Count"); - SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "length_errors", + SYSCTL_ADD_UQUAD(ctx, host_list, OID_AUTO, "length_errors", CTLFLAG_RD, &stats->lenerrs, "Length Errors"); - SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "serdes_violation_pkt", + SYSCTL_ADD_UQUAD(ctx, host_list, OID_AUTO, "serdes_violation_pkt", CTLFLAG_RD, &stats->scvpc, "SerDes/SGMII Code Violation Pkt Count"); - SYSCTL_ADD_QUAD(ctx, host_list, OID_AUTO, "header_redir_missed", + SYSCTL_ADD_UQUAD(ctx, host_list, OID_AUTO, "header_redir_missed", CTLFLAG_RD, &stats->hrmpc, "Header Redirection Missed Packet Count"); } Modified: head/sys/dev/e1000/if_lem.c ============================================================================== --- head/sys/dev/e1000/if_lem.c Wed Jan 12 19:28:52 2011 (r217317) +++ head/sys/dev/e1000/if_lem.c Wed Jan 12 19:53:23 2011 (r217318) @@ -4310,10 +4310,10 @@ lem_add_hw_stats(struct adapter *adapter SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "fc_low_water", CTLFLAG_RD, &adapter->hw.fc.low_water, 0, "Flow Control Low Watermark"); - SYSCTL_ADD_QUAD(ctx, child, OID_AUTO, "fifo_workaround", + SYSCTL_ADD_UQUAD(ctx, child, OID_AUTO, "fifo_workaround", CTLFLAG_RD, &adapter->tx_fifo_wrk_cnt, "TX FIFO workaround events"); - SYSCTL_ADD_QUAD(ctx, child, OID_AUTO, "fifo_reset", + SYSCTL_ADD_UQUAD(ctx, child, OID_AUTO, "fifo_reset", CTLFLAG_RD, &adapter->tx_fifo_reset_cnt, "TX FIFO resets"); @@ -4341,146 +4341,146 @@ lem_add_hw_stats(struct adapter *adapter CTLFLAG_RD, NULL, "Statistics"); stat_list = SYSCTL_CHILDREN(stat_node); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "excess_coll", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "excess_coll", CTLFLAG_RD, &stats->ecol, "Excessive collisions"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "single_coll", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "single_coll", CTLFLAG_RD, &stats->scc, "Single collisions"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "multiple_coll", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "multiple_coll", CTLFLAG_RD, &stats->mcc, "Multiple collisions"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "late_coll", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "late_coll", CTLFLAG_RD, &stats->latecol, "Late collisions"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "collision_count", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "collision_count", CTLFLAG_RD, &stats->colc, "Collision Count"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "symbol_errors", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "symbol_errors", CTLFLAG_RD, &adapter->stats.symerrs, "Symbol Errors"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "sequence_errors", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "sequence_errors", CTLFLAG_RD, &adapter->stats.sec, "Sequence Errors"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "defer_count", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "defer_count", CTLFLAG_RD, &adapter->stats.dc, "Defer Count"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "missed_packets", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "missed_packets", CTLFLAG_RD, &adapter->stats.mpc, "Missed Packets"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_no_buff", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_no_buff", CTLFLAG_RD, &adapter->stats.rnbc, "Receive No Buffers"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_undersize", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_undersize", CTLFLAG_RD, &adapter->stats.ruc, "Receive Undersize"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_fragmented", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_fragmented", CTLFLAG_RD, &adapter->stats.rfc, "Fragmented Packets Received "); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_oversize", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_oversize", CTLFLAG_RD, &adapter->stats.roc, "Oversized Packets Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_jabber", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_jabber", CTLFLAG_RD, &adapter->stats.rjc, "Recevied Jabber"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_errs", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_errs", CTLFLAG_RD, &adapter->stats.rxerrc, "Receive Errors"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "crc_errs", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "crc_errs", CTLFLAG_RD, &adapter->stats.crcerrs, "CRC errors"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "alignment_errs", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "alignment_errs", CTLFLAG_RD, &adapter->stats.algnerrc, "Alignment Errors"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "coll_ext_errs", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "coll_ext_errs", CTLFLAG_RD, &adapter->stats.cexterr, "Collision/Carrier extension errors"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "xon_recvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xon_recvd", CTLFLAG_RD, &adapter->stats.xonrxc, "XON Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "xon_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xon_txd", CTLFLAG_RD, &adapter->stats.xontxc, "XON Transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "xoff_recvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xoff_recvd", CTLFLAG_RD, &adapter->stats.xoffrxc, "XOFF Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "xoff_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xoff_txd", CTLFLAG_RD, &adapter->stats.xofftxc, "XOFF Transmitted"); /* Packet Reception Stats */ - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "total_pkts_recvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "total_pkts_recvd", CTLFLAG_RD, &adapter->stats.tpr, "Total Packets Received "); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_pkts_recvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_pkts_recvd", CTLFLAG_RD, &adapter->stats.gprc, "Good Packets Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "bcast_pkts_recvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "bcast_pkts_recvd", CTLFLAG_RD, &adapter->stats.bprc, "Broadcast Packets Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_recvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_recvd", CTLFLAG_RD, &adapter->stats.mprc, "Multicast Packets Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_64", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_64", CTLFLAG_RD, &adapter->stats.prc64, "64 byte frames received "); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_65_127", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_65_127", CTLFLAG_RD, &adapter->stats.prc127, "65-127 byte frames received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_128_255", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_128_255", CTLFLAG_RD, &adapter->stats.prc255, "128-255 byte frames received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_256_511", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_256_511", CTLFLAG_RD, &adapter->stats.prc511, "256-511 byte frames received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_512_1023", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_512_1023", CTLFLAG_RD, &adapter->stats.prc1023, "512-1023 byte frames received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_1024_1522", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_1024_1522", CTLFLAG_RD, &adapter->stats.prc1522, "1023-1522 byte frames received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_octets_recvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_octets_recvd", CTLFLAG_RD, &adapter->stats.gorc, "Good Octets Received"); /* Packet Transmission Stats */ - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_octets_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_octets_txd", CTLFLAG_RD, &adapter->stats.gotc, "Good Octets Transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "total_pkts_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "total_pkts_txd", CTLFLAG_RD, &adapter->stats.tpt, "Total Packets Transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_pkts_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_pkts_txd", CTLFLAG_RD, &adapter->stats.gptc, "Good Packets Transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "bcast_pkts_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "bcast_pkts_txd", CTLFLAG_RD, &adapter->stats.bptc, "Broadcast Packets Transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_txd", CTLFLAG_RD, &adapter->stats.mptc, "Multicast Packets Transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tx_frames_64", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_64", CTLFLAG_RD, &adapter->stats.ptc64, "64 byte frames transmitted "); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tx_frames_65_127", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_65_127", CTLFLAG_RD, &adapter->stats.ptc127, "65-127 byte frames transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tx_frames_128_255", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_128_255", CTLFLAG_RD, &adapter->stats.ptc255, "128-255 byte frames transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tx_frames_256_511", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_256_511", CTLFLAG_RD, &adapter->stats.ptc511, "256-511 byte frames transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tx_frames_512_1023", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_512_1023", CTLFLAG_RD, &adapter->stats.ptc1023, "512-1023 byte frames transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tx_frames_1024_1522", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_1024_1522", CTLFLAG_RD, &adapter->stats.ptc1522, "1024-1522 byte frames transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tso_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tso_txd", CTLFLAG_RD, &adapter->stats.tsctc, "TSO Contexts Transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "tso_ctx_fail", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tso_ctx_fail", CTLFLAG_RD, &adapter->stats.tsctfc, "TSO Contexts Failed"); } Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Wed Jan 12 19:28:52 2011 (r217317) +++ head/sys/dev/ixgbe/ixgbe.c Wed Jan 12 19:53:23 2011 (r217318) @@ -5055,10 +5055,10 @@ ixgbe_add_hw_stats(struct adapter *adapt CTLFLAG_RD, txr, sizeof(txr), ixgbe_sysctl_tdt_handler, "IU", "Transmit Descriptor Tail"); - SYSCTL_ADD_QUAD(ctx, queue_list, OID_AUTO, "no_desc_avail", + SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "no_desc_avail", CTLFLAG_RD, &txr->no_desc_avail, "Queue No Descriptor Available"); - SYSCTL_ADD_QUAD(ctx, queue_list, OID_AUTO, "tx_packets", + SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "tx_packets", CTLFLAG_RD, &txr->total_packets, "Queue Packets Transmitted"); } @@ -5084,16 +5084,16 @@ ixgbe_add_hw_stats(struct adapter *adapt CTLFLAG_RD, rxr, sizeof(rxr), ixgbe_sysctl_rdt_handler, "IU", "Receive Descriptor Tail"); - SYSCTL_ADD_QUAD(ctx, queue_list, OID_AUTO, "rx_packets", + SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "rx_packets", CTLFLAG_RD, &rxr->rx_packets, "Queue Packets Received"); - SYSCTL_ADD_QUAD(ctx, queue_list, OID_AUTO, "rx_bytes", + SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "rx_bytes", CTLFLAG_RD, &rxr->rx_bytes, "Queue Bytes Received"); - SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "lro_queued", + SYSCTL_ADD_INT(ctx, queue_list, OID_AUTO, "lro_queued", CTLFLAG_RD, &lro->lro_queued, 0, "LRO Queued"); - SYSCTL_ADD_UINT(ctx, queue_list, OID_AUTO, "lro_flushed", + SYSCTL_ADD_INT(ctx, queue_list, OID_AUTO, "lro_flushed", CTLFLAG_RD, &lro->lro_flushed, 0, "LRO Flushed"); } @@ -5104,157 +5104,157 @@ ixgbe_add_hw_stats(struct adapter *adapt CTLFLAG_RD, NULL, "MAC Statistics"); stat_list = SYSCTL_CHILDREN(stat_node); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "crc_errs", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "crc_errs", CTLFLAG_RD, &stats->crcerrs, "CRC Errors"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "ill_errs", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "ill_errs", CTLFLAG_RD, &stats->illerrc, "Illegal Byte Errors"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "byte_errs", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "byte_errs", CTLFLAG_RD, &stats->errbc, "Byte Errors"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "short_discards", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "short_discards", CTLFLAG_RD, &stats->mspdc, "MAC Short Packets Discarded"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "local_faults", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "local_faults", CTLFLAG_RD, &stats->mlfc, "MAC Local Faults"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "remote_faults", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "remote_faults", CTLFLAG_RD, &stats->mrfc, "MAC Remote Faults"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rec_len_errs", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rec_len_errs", CTLFLAG_RD, &stats->rlec, "Receive Length Errors"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "link_xon_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "link_xon_txd", CTLFLAG_RD, &stats->lxontxc, "Link XON Transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "link_xon_rcvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "link_xon_rcvd", CTLFLAG_RD, &stats->lxonrxc, "Link XON Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "link_xoff_txd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "link_xoff_txd", CTLFLAG_RD, &stats->lxofftxc, "Link XOFF Transmitted"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "link_xoff_rcvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "link_xoff_rcvd", CTLFLAG_RD, &stats->lxoffrxc, "Link XOFF Received"); /* Packet Reception Stats */ - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "total_octets_rcvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "total_octets_rcvd", CTLFLAG_RD, &stats->tor, "Total Octets Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_octets_rcvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_octets_rcvd", CTLFLAG_RD, &stats->gorc, "Good Octets Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "total_pkts_rcvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "total_pkts_rcvd", CTLFLAG_RD, &stats->tpr, "Total Packets Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_pkts_rcvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_pkts_rcvd", CTLFLAG_RD, &stats->gprc, "Good Packets Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_rcvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_rcvd", CTLFLAG_RD, &stats->mprc, "Multicast Packets Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "bcast_pkts_rcvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "bcast_pkts_rcvd", CTLFLAG_RD, &stats->bprc, "Broadcast Packets Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_64", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_64", CTLFLAG_RD, &stats->prc64, "64 byte frames received "); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_65_127", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_65_127", CTLFLAG_RD, &stats->prc127, "65-127 byte frames received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_128_255", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_128_255", CTLFLAG_RD, &stats->prc255, "128-255 byte frames received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_256_511", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_256_511", CTLFLAG_RD, &stats->prc511, "256-511 byte frames received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_512_1023", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_512_1023", CTLFLAG_RD, &stats->prc1023, "512-1023 byte frames received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "rx_frames_1024_1522", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_1024_1522", CTLFLAG_RD, &stats->prc1522, "1023-1522 byte frames received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_undersized", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_undersized", CTLFLAG_RD, &stats->ruc, "Receive Undersized"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_fragmented", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_fragmented", CTLFLAG_RD, &stats->rfc, "Fragmented Packets Received "); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_oversized", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_oversized", CTLFLAG_RD, &stats->roc, "Oversized Packets Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "recv_jabberd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_jabberd", CTLFLAG_RD, &stats->rjc, "Received Jabber"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "management_pkts_rcvd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "management_pkts_rcvd", CTLFLAG_RD, &stats->mngprc, "Management Packets Received"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "management_pkts_drpd", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "management_pkts_drpd", CTLFLAG_RD, &stats->mngptc, "Management Packets Dropped"); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "checksum_errs", + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "checksum_errs", CTLFLAG_RD, &stats->xec, "Checksum Errors"); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 19:53:30 2011 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 EBD061065770; Wed, 12 Jan 2011 19:53:30 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8F258FC0C; Wed, 12 Jan 2011 19:53:30 +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 p0CJrU70004930; Wed, 12 Jan 2011 19:53:30 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CJrUmQ004926; Wed, 12 Jan 2011 19:53:30 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201101121953.p0CJrUmQ004926@svn.freebsd.org> From: Matthew D Fleming Date: Wed, 12 Jan 2011 19:53:30 +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: r217319 - 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: Wed, 12 Jan 2011 19:53:31 -0000 Author: mdf Date: Wed Jan 12 19:53:30 2011 New Revision: 217319 URL: http://svn.freebsd.org/changeset/base/217319 Log: sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly. Commit the zfs piece. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Jan 12 19:53:23 2011 (r217318) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Jan 12 19:53:30 2011 (r217319) @@ -188,9 +188,9 @@ TUNABLE_QUAD("vfs.zfs.arc_min", &zfs_arc TUNABLE_QUAD("vfs.zfs.arc_meta_limit", &zfs_arc_meta_limit); TUNABLE_INT("vfs.zfs.mdcomp_disable", &zfs_mdcomp_disable); SYSCTL_DECL(_vfs_zfs); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_max, CTLFLAG_RDTUN, &zfs_arc_max, 0, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_max, CTLFLAG_RDTUN, &zfs_arc_max, 0, "Maximum ARC size"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_min, CTLFLAG_RDTUN, &zfs_arc_min, 0, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_min, CTLFLAG_RDTUN, &zfs_arc_min, 0, "Minimum ARC size"); SYSCTL_INT(_vfs_zfs, OID_AUTO, mdcomp_disable, CTLFLAG_RDTUN, &zfs_mdcomp_disable, 0, "Disable metadata compression"); @@ -466,9 +466,9 @@ static uint64_t arc_loaned_bytes; static uint64_t arc_meta_used; static uint64_t arc_meta_limit; static uint64_t arc_meta_max = 0; -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_meta_used, CTLFLAG_RDTUN, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_meta_used, CTLFLAG_RDTUN, &arc_meta_used, 0, "ARC metadata used"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_meta_limit, CTLFLAG_RDTUN, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_meta_limit, CTLFLAG_RDTUN, &arc_meta_limit, 0, "ARC metadata limit"); typedef struct l2arc_buf_hdr l2arc_buf_hdr_t; @@ -638,15 +638,15 @@ boolean_t l2arc_noprefetch = B_FALSE; / boolean_t l2arc_feed_again = B_TRUE; /* turbo warmup */ boolean_t l2arc_norw = B_TRUE; /* no reads during writes */ -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2arc_write_max, CTLFLAG_RW, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_write_max, CTLFLAG_RW, &l2arc_write_max, 0, "max write size"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2arc_write_boost, CTLFLAG_RW, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_write_boost, CTLFLAG_RW, &l2arc_write_boost, 0, "extra write during warmup"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2arc_headroom, CTLFLAG_RW, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_headroom, CTLFLAG_RW, &l2arc_headroom, 0, "number of dev writes"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2arc_feed_secs, CTLFLAG_RW, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_feed_secs, CTLFLAG_RW, &l2arc_feed_secs, 0, "interval seconds"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2arc_feed_min_ms, CTLFLAG_RW, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_feed_min_ms, CTLFLAG_RW, &l2arc_feed_min_ms, 0, "min interval milliseconds"); SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_noprefetch, CTLFLAG_RW, @@ -656,46 +656,46 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_fee SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_norw, CTLFLAG_RW, &l2arc_norw, 0, "no reads during writes"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, anon_size, CTLFLAG_RD, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, anon_size, CTLFLAG_RD, &ARC_anon.arcs_size, 0, "size of anonymous state"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, anon_metadata_lsize, CTLFLAG_RD, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, anon_metadata_lsize, CTLFLAG_RD, &ARC_anon.arcs_lsize[ARC_BUFC_METADATA], 0, "size of anonymous state"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, anon_data_lsize, CTLFLAG_RD, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, anon_data_lsize, CTLFLAG_RD, &ARC_anon.arcs_lsize[ARC_BUFC_DATA], 0, "size of anonymous state"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mru_size, CTLFLAG_RD, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_size, CTLFLAG_RD, &ARC_mru.arcs_size, 0, "size of mru state"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mru_metadata_lsize, CTLFLAG_RD, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_metadata_lsize, CTLFLAG_RD, &ARC_mru.arcs_lsize[ARC_BUFC_METADATA], 0, "size of metadata in mru state"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mru_data_lsize, CTLFLAG_RD, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_data_lsize, CTLFLAG_RD, &ARC_mru.arcs_lsize[ARC_BUFC_DATA], 0, "size of data in mru state"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mru_ghost_size, CTLFLAG_RD, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_ghost_size, CTLFLAG_RD, &ARC_mru_ghost.arcs_size, 0, "size of mru ghost state"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mru_ghost_metadata_lsize, CTLFLAG_RD, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_ghost_metadata_lsize, CTLFLAG_RD, &ARC_mru_ghost.arcs_lsize[ARC_BUFC_METADATA], 0, "size of metadata in mru ghost state"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mru_ghost_data_lsize, CTLFLAG_RD, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_ghost_data_lsize, CTLFLAG_RD, &ARC_mru_ghost.arcs_lsize[ARC_BUFC_DATA], 0, "size of data in mru ghost state"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mfu_size, CTLFLAG_RD, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_size, CTLFLAG_RD, &ARC_mfu.arcs_size, 0, "size of mfu state"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mfu_metadata_lsize, CTLFLAG_RD, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_metadata_lsize, CTLFLAG_RD, &ARC_mfu.arcs_lsize[ARC_BUFC_METADATA], 0, "size of metadata in mfu state"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mfu_data_lsize, CTLFLAG_RD, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_data_lsize, CTLFLAG_RD, &ARC_mfu.arcs_lsize[ARC_BUFC_DATA], 0, "size of data in mfu state"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mfu_ghost_size, CTLFLAG_RD, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_ghost_size, CTLFLAG_RD, &ARC_mfu_ghost.arcs_size, 0, "size of mfu ghost state"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mfu_ghost_metadata_lsize, CTLFLAG_RD, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_ghost_metadata_lsize, CTLFLAG_RD, &ARC_mfu_ghost.arcs_lsize[ARC_BUFC_METADATA], 0, "size of metadata in mfu ghost state"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mfu_ghost_data_lsize, CTLFLAG_RD, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_ghost_data_lsize, CTLFLAG_RD, &ARC_mfu_ghost.arcs_lsize[ARC_BUFC_DATA], 0, "size of data in mfu ghost state"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2c_only_size, CTLFLAG_RD, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2c_only_size, CTLFLAG_RD, &ARC_l2c_only.arcs_size, 0, "size of mru state"); /* Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c Wed Jan 12 19:53:23 2011 (r217318) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c Wed Jan 12 19:53:30 2011 (r217319) @@ -61,7 +61,7 @@ TUNABLE_INT("vfs.zfs.zfetch.block_cap", SYSCTL_UINT(_vfs_zfs_zfetch, OID_AUTO, block_cap, CTLFLAG_RDTUN, &zfetch_block_cap, 0, "Max number of blocks to fetch at a time"); TUNABLE_QUAD("vfs.zfs.zfetch.array_rd_sz", &zfetch_array_rd_sz); -SYSCTL_QUAD(_vfs_zfs_zfetch, OID_AUTO, array_rd_sz, CTLFLAG_RDTUN, +SYSCTL_UQUAD(_vfs_zfs_zfetch, OID_AUTO, array_rd_sz, CTLFLAG_RDTUN, &zfetch_array_rd_sz, 0, "Number of bytes in a array_read at which we stop prefetching"); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Wed Jan 12 19:53:23 2011 (r217318) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Wed Jan 12 19:53:30 2011 (r217319) @@ -50,7 +50,7 @@ TUNABLE_INT("vfs.zfs.txg.synctime", &zfs SYSCTL_INT(_vfs_zfs_txg, OID_AUTO, synctime, CTLFLAG_RDTUN, &zfs_txg_synctime, 0, "Target seconds to sync a txg"); TUNABLE_QUAD("vfs.zfs.txg.write_limit_override", &zfs_write_limit_override); -SYSCTL_QUAD(_vfs_zfs_txg, OID_AUTO, write_limit_override, CTLFLAG_RW, +SYSCTL_UQUAD(_vfs_zfs_txg, OID_AUTO, write_limit_override, CTLFLAG_RW, &zfs_write_limit_override, 0, "Override maximum size of a txg to this size in bytes, " "value of 0 means don't override"); From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 19:53:40 2011 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 2FD1910656AA; Wed, 12 Jan 2011 19:53:40 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D2478FC1C; Wed, 12 Jan 2011 19:53: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 p0CJreCf004989; Wed, 12 Jan 2011 19:53:40 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CJrdEN004981; Wed, 12 Jan 2011 19:53:39 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201101121953.p0CJrdEN004981@svn.freebsd.org> From: Matthew D Fleming Date: Wed, 12 Jan 2011 19:53: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: r217320 - in head/sys/netgraph: . bluetooth/common bluetooth/socket 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, 12 Jan 2011 19:53:40 -0000 Author: mdf Date: Wed Jan 12 19:53:39 2011 New Revision: 217320 URL: http://svn.freebsd.org/changeset/base/217320 Log: sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly. Commit the netgraph piece. Modified: head/sys/netgraph/bluetooth/common/ng_bluetooth.c head/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c head/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c head/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c head/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c head/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c head/sys/netgraph/ng_socket.c Modified: head/sys/netgraph/bluetooth/common/ng_bluetooth.c ============================================================================== --- head/sys/netgraph/bluetooth/common/ng_bluetooth.c Wed Jan 12 19:53:30 2011 (r217319) +++ head/sys/netgraph/bluetooth/common/ng_bluetooth.c Wed Jan 12 19:53:39 2011 (r217320) @@ -114,7 +114,7 @@ SYSCTL_PROC(_net_bluetooth_hci, OID_AUTO bluetooth_set_hci_connect_timeout_value, "I", "HCI connect timeout (sec)"); -SYSCTL_INT(_net_bluetooth_hci, OID_AUTO, max_neighbor_age, CTLFLAG_RW, +SYSCTL_UINT(_net_bluetooth_hci, OID_AUTO, max_neighbor_age, CTLFLAG_RW, &bluetooth_hci_max_neighbor_age_value, 600, "Maximal HCI neighbor cache entry age (sec)"); Modified: head/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c ============================================================================== --- head/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c Wed Jan 12 19:53:30 2011 (r217319) +++ head/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c Wed Jan 12 19:53:39 2011 (r217320) @@ -125,19 +125,19 @@ static int ng_btsocket_hci_raw_curpp SYSCTL_DECL(_net_bluetooth_hci_sockets); SYSCTL_NODE(_net_bluetooth_hci_sockets, OID_AUTO, raw, CTLFLAG_RW, 0, "Bluetooth raw HCI sockets family"); -SYSCTL_INT(_net_bluetooth_hci_sockets_raw, OID_AUTO, debug_level, CTLFLAG_RW, +SYSCTL_UINT(_net_bluetooth_hci_sockets_raw, OID_AUTO, debug_level, CTLFLAG_RW, &ng_btsocket_hci_raw_debug_level, NG_BTSOCKET_WARN_LEVEL, "Bluetooth raw HCI sockets debug level"); -SYSCTL_INT(_net_bluetooth_hci_sockets_raw, OID_AUTO, ioctl_timeout, CTLFLAG_RW, +SYSCTL_UINT(_net_bluetooth_hci_sockets_raw, OID_AUTO, ioctl_timeout, CTLFLAG_RW, &ng_btsocket_hci_raw_ioctl_timeout, 5, "Bluetooth raw HCI sockets ioctl timeout"); -SYSCTL_INT(_net_bluetooth_hci_sockets_raw, OID_AUTO, queue_len, CTLFLAG_RD, +SYSCTL_UINT(_net_bluetooth_hci_sockets_raw, OID_AUTO, queue_len, CTLFLAG_RD, &ng_btsocket_hci_raw_queue.len, 0, "Bluetooth raw HCI sockets input queue length"); -SYSCTL_INT(_net_bluetooth_hci_sockets_raw, OID_AUTO, queue_maxlen, CTLFLAG_RD, +SYSCTL_UINT(_net_bluetooth_hci_sockets_raw, OID_AUTO, queue_maxlen, CTLFLAG_RD, &ng_btsocket_hci_raw_queue.maxlen, 0, "Bluetooth raw HCI sockets input queue max. length"); -SYSCTL_INT(_net_bluetooth_hci_sockets_raw, OID_AUTO, queue_drops, CTLFLAG_RD, +SYSCTL_UINT(_net_bluetooth_hci_sockets_raw, OID_AUTO, queue_drops, CTLFLAG_RD, &ng_btsocket_hci_raw_queue.drops, 0, "Bluetooth raw HCI sockets input queue drops"); Modified: head/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c ============================================================================== --- head/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c Wed Jan 12 19:53:30 2011 (r217319) +++ head/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c Wed Jan 12 19:53:39 2011 (r217320) @@ -110,19 +110,19 @@ static int ng_btsocket_l2cap_curpps; SYSCTL_DECL(_net_bluetooth_l2cap_sockets); SYSCTL_NODE(_net_bluetooth_l2cap_sockets, OID_AUTO, seq, CTLFLAG_RW, 0, "Bluetooth SEQPACKET L2CAP sockets family"); -SYSCTL_INT(_net_bluetooth_l2cap_sockets_seq, OID_AUTO, debug_level, +SYSCTL_UINT(_net_bluetooth_l2cap_sockets_seq, OID_AUTO, debug_level, CTLFLAG_RW, &ng_btsocket_l2cap_debug_level, NG_BTSOCKET_WARN_LEVEL, "Bluetooth SEQPACKET L2CAP sockets debug level"); -SYSCTL_INT(_net_bluetooth_l2cap_sockets_seq, OID_AUTO, queue_len, +SYSCTL_UINT(_net_bluetooth_l2cap_sockets_seq, OID_AUTO, queue_len, CTLFLAG_RD, &ng_btsocket_l2cap_queue.len, 0, "Bluetooth SEQPACKET L2CAP sockets input queue length"); -SYSCTL_INT(_net_bluetooth_l2cap_sockets_seq, OID_AUTO, queue_maxlen, +SYSCTL_UINT(_net_bluetooth_l2cap_sockets_seq, OID_AUTO, queue_maxlen, CTLFLAG_RD, &ng_btsocket_l2cap_queue.maxlen, 0, "Bluetooth SEQPACKET L2CAP sockets input queue max. length"); -SYSCTL_INT(_net_bluetooth_l2cap_sockets_seq, OID_AUTO, queue_drops, +SYSCTL_UINT(_net_bluetooth_l2cap_sockets_seq, OID_AUTO, queue_drops, CTLFLAG_RD, &ng_btsocket_l2cap_queue.drops, 0, "Bluetooth SEQPACKET L2CAP sockets input queue drops"); Modified: head/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c ============================================================================== --- head/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c Wed Jan 12 19:53:30 2011 (r217319) +++ head/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c Wed Jan 12 19:53:39 2011 (r217320) @@ -125,23 +125,23 @@ static int ng_btsocket_l2cap_raw_cur SYSCTL_DECL(_net_bluetooth_l2cap_sockets); SYSCTL_NODE(_net_bluetooth_l2cap_sockets, OID_AUTO, raw, CTLFLAG_RW, 0, "Bluetooth raw L2CAP sockets family"); -SYSCTL_INT(_net_bluetooth_l2cap_sockets_raw, OID_AUTO, debug_level, +SYSCTL_UINT(_net_bluetooth_l2cap_sockets_raw, OID_AUTO, debug_level, CTLFLAG_RW, &ng_btsocket_l2cap_raw_debug_level, NG_BTSOCKET_WARN_LEVEL, "Bluetooth raw L2CAP sockets debug level"); -SYSCTL_INT(_net_bluetooth_l2cap_sockets_raw, OID_AUTO, ioctl_timeout, +SYSCTL_UINT(_net_bluetooth_l2cap_sockets_raw, OID_AUTO, ioctl_timeout, CTLFLAG_RW, &ng_btsocket_l2cap_raw_ioctl_timeout, 5, "Bluetooth raw L2CAP sockets ioctl timeout"); -SYSCTL_INT(_net_bluetooth_l2cap_sockets_raw, OID_AUTO, queue_len, +SYSCTL_UINT(_net_bluetooth_l2cap_sockets_raw, OID_AUTO, queue_len, CTLFLAG_RD, &ng_btsocket_l2cap_raw_queue.len, 0, "Bluetooth raw L2CAP sockets input queue length"); -SYSCTL_INT(_net_bluetooth_l2cap_sockets_raw, OID_AUTO, queue_maxlen, +SYSCTL_UINT(_net_bluetooth_l2cap_sockets_raw, OID_AUTO, queue_maxlen, CTLFLAG_RD, &ng_btsocket_l2cap_raw_queue.maxlen, 0, "Bluetooth raw L2CAP sockets input queue max. length"); -SYSCTL_INT(_net_bluetooth_l2cap_sockets_raw, OID_AUTO, queue_drops, +SYSCTL_UINT(_net_bluetooth_l2cap_sockets_raw, OID_AUTO, queue_drops, CTLFLAG_RD, &ng_btsocket_l2cap_raw_queue.drops, 0, "Bluetooth raw L2CAP sockets input queue drops"); Modified: head/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c ============================================================================== --- head/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c Wed Jan 12 19:53:30 2011 (r217319) +++ head/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c Wed Jan 12 19:53:39 2011 (r217320) @@ -202,11 +202,11 @@ static int ng_btsocket_rfcomm_curpps SYSCTL_DECL(_net_bluetooth_rfcomm_sockets); SYSCTL_NODE(_net_bluetooth_rfcomm_sockets, OID_AUTO, stream, CTLFLAG_RW, 0, "Bluetooth STREAM RFCOMM sockets family"); -SYSCTL_INT(_net_bluetooth_rfcomm_sockets_stream, OID_AUTO, debug_level, +SYSCTL_UINT(_net_bluetooth_rfcomm_sockets_stream, OID_AUTO, debug_level, CTLFLAG_RW, &ng_btsocket_rfcomm_debug_level, NG_BTSOCKET_INFO_LEVEL, "Bluetooth STREAM RFCOMM sockets debug level"); -SYSCTL_INT(_net_bluetooth_rfcomm_sockets_stream, OID_AUTO, timeout, +SYSCTL_UINT(_net_bluetooth_rfcomm_sockets_stream, OID_AUTO, timeout, CTLFLAG_RW, &ng_btsocket_rfcomm_timo, 60, "Bluetooth STREAM RFCOMM sockets timeout"); Modified: head/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c ============================================================================== --- head/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c Wed Jan 12 19:53:30 2011 (r217319) +++ head/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c Wed Jan 12 19:53:39 2011 (r217320) @@ -109,19 +109,19 @@ static int ng_btsocket_sco_curpps; SYSCTL_DECL(_net_bluetooth_sco_sockets); SYSCTL_NODE(_net_bluetooth_sco_sockets, OID_AUTO, seq, CTLFLAG_RW, 0, "Bluetooth SEQPACKET SCO sockets family"); -SYSCTL_INT(_net_bluetooth_sco_sockets_seq, OID_AUTO, debug_level, +SYSCTL_UINT(_net_bluetooth_sco_sockets_seq, OID_AUTO, debug_level, CTLFLAG_RW, &ng_btsocket_sco_debug_level, NG_BTSOCKET_WARN_LEVEL, "Bluetooth SEQPACKET SCO sockets debug level"); -SYSCTL_INT(_net_bluetooth_sco_sockets_seq, OID_AUTO, queue_len, +SYSCTL_UINT(_net_bluetooth_sco_sockets_seq, OID_AUTO, queue_len, CTLFLAG_RD, &ng_btsocket_sco_queue.len, 0, "Bluetooth SEQPACKET SCO sockets input queue length"); -SYSCTL_INT(_net_bluetooth_sco_sockets_seq, OID_AUTO, queue_maxlen, +SYSCTL_UINT(_net_bluetooth_sco_sockets_seq, OID_AUTO, queue_maxlen, CTLFLAG_RD, &ng_btsocket_sco_queue.maxlen, 0, "Bluetooth SEQPACKET SCO sockets input queue max. length"); -SYSCTL_INT(_net_bluetooth_sco_sockets_seq, OID_AUTO, queue_drops, +SYSCTL_UINT(_net_bluetooth_sco_sockets_seq, OID_AUTO, queue_drops, CTLFLAG_RD, &ng_btsocket_sco_queue.drops, 0, "Bluetooth SEQPACKET SCO sockets input queue drops"); Modified: head/sys/netgraph/ng_socket.c ============================================================================== --- head/sys/netgraph/ng_socket.c Wed Jan 12 19:53:30 2011 (r217319) +++ head/sys/netgraph/ng_socket.c Wed Jan 12 19:53:39 2011 (r217320) @@ -150,10 +150,10 @@ NETGRAPH_INIT_ORDERED(socket, &typestruc /* Buffer space */ static u_long ngpdg_sendspace = 20 * 1024; /* really max datagram size */ -SYSCTL_INT(_net_graph, OID_AUTO, maxdgram, CTLFLAG_RW, +SYSCTL_ULONG(_net_graph, OID_AUTO, maxdgram, CTLFLAG_RW, &ngpdg_sendspace , 0, "Maximum outgoing Netgraph datagram size"); static u_long ngpdg_recvspace = 20 * 1024; -SYSCTL_INT(_net_graph, OID_AUTO, recvspace, CTLFLAG_RW, +SYSCTL_ULONG(_net_graph, OID_AUTO, recvspace, CTLFLAG_RW, &ngpdg_recvspace , 0, "Maximum space for incoming Netgraph datagrams"); /* List of all sockets (for netstat -f netgraph) */ From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 19:53:44 2011 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 9E57610657CB; Wed, 12 Jan 2011 19:53:44 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8BCC88FC14; Wed, 12 Jan 2011 19: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 p0CJriZx005037; Wed, 12 Jan 2011 19:53:44 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CJrigF005033; Wed, 12 Jan 2011 19:53:44 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201101121953.p0CJrigF005033@svn.freebsd.org> From: Matthew D Fleming Date: Wed, 12 Jan 2011 19: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: r217321 - in head/sys/dev/cxgb: . ulp/iw_cxgb 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, 12 Jan 2011 19:53:44 -0000 Author: mdf Date: Wed Jan 12 19:53:44 2011 New Revision: 217321 URL: http://svn.freebsd.org/changeset/base/217321 Log: sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly. Commit the cxgb driver piece. Modified: head/sys/dev/cxgb/cxgb_main.c head/sys/dev/cxgb/cxgb_sge.c head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Wed Jan 12 19:53:39 2011 (r217320) +++ head/sys/dev/cxgb/cxgb_main.c Wed Jan 12 19:53:44 2011 (r217321) @@ -195,7 +195,7 @@ static int msi_allowed = 2; TUNABLE_INT("hw.cxgb.msi_allowed", &msi_allowed); SYSCTL_NODE(_hw, OID_AUTO, cxgb, CTLFLAG_RD, 0, "CXGB driver parameters"); -SYSCTL_UINT(_hw_cxgb, OID_AUTO, msi_allowed, CTLFLAG_RDTUN, &msi_allowed, 0, +SYSCTL_INT(_hw_cxgb, OID_AUTO, msi_allowed, CTLFLAG_RDTUN, &msi_allowed, 0, "MSI-X, MSI, INTx selector"); /* @@ -204,7 +204,7 @@ SYSCTL_UINT(_hw_cxgb, OID_AUTO, msi_allo */ static int ofld_disable = 0; TUNABLE_INT("hw.cxgb.ofld_disable", &ofld_disable); -SYSCTL_UINT(_hw_cxgb, OID_AUTO, ofld_disable, CTLFLAG_RDTUN, &ofld_disable, 0, +SYSCTL_INT(_hw_cxgb, OID_AUTO, ofld_disable, CTLFLAG_RDTUN, &ofld_disable, 0, "disable ULP offload"); /* @@ -213,7 +213,7 @@ SYSCTL_UINT(_hw_cxgb, OID_AUTO, ofld_dis */ static int multiq = 1; TUNABLE_INT("hw.cxgb.multiq", &multiq); -SYSCTL_UINT(_hw_cxgb, OID_AUTO, multiq, CTLFLAG_RDTUN, &multiq, 0, +SYSCTL_INT(_hw_cxgb, OID_AUTO, multiq, CTLFLAG_RDTUN, &multiq, 0, "use min(ncpus/ports, 8) queue-sets per port"); /* @@ -223,7 +223,7 @@ SYSCTL_UINT(_hw_cxgb, OID_AUTO, multiq, */ static int force_fw_update = 0; TUNABLE_INT("hw.cxgb.force_fw_update", &force_fw_update); -SYSCTL_UINT(_hw_cxgb, OID_AUTO, force_fw_update, CTLFLAG_RDTUN, &force_fw_update, 0, +SYSCTL_INT(_hw_cxgb, OID_AUTO, force_fw_update, CTLFLAG_RDTUN, &force_fw_update, 0, "update firmware even if up to date"); int cxgb_use_16k_clusters = -1; @@ -236,7 +236,7 @@ SYSCTL_INT(_hw_cxgb, OID_AUTO, use_16k_c */ int cxgb_snd_queue_len = IFQ_MAXLEN; TUNABLE_INT("hw.cxgb.snd_queue_len", &cxgb_snd_queue_len); -SYSCTL_UINT(_hw_cxgb, OID_AUTO, snd_queue_len, CTLFLAG_RDTUN, +SYSCTL_INT(_hw_cxgb, OID_AUTO, snd_queue_len, CTLFLAG_RDTUN, &cxgb_snd_queue_len, 0, "send queue size "); static int nfilters = -1; Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Wed Jan 12 19:53:39 2011 (r217320) +++ head/sys/dev/cxgb/cxgb_sge.c Wed Jan 12 19:53:44 2011 (r217321) @@ -79,12 +79,12 @@ int multiq_tx_enable = 1; extern struct sysctl_oid_list sysctl__hw_cxgb_children; int cxgb_txq_buf_ring_size = TX_ETH_Q_SIZE; TUNABLE_INT("hw.cxgb.txq_mr_size", &cxgb_txq_buf_ring_size); -SYSCTL_UINT(_hw_cxgb, OID_AUTO, txq_mr_size, CTLFLAG_RDTUN, &cxgb_txq_buf_ring_size, 0, +SYSCTL_INT(_hw_cxgb, OID_AUTO, txq_mr_size, CTLFLAG_RDTUN, &cxgb_txq_buf_ring_size, 0, "size of per-queue mbuf ring"); static int cxgb_tx_coalesce_force = 0; TUNABLE_INT("hw.cxgb.tx_coalesce_force", &cxgb_tx_coalesce_force); -SYSCTL_UINT(_hw_cxgb, OID_AUTO, tx_coalesce_force, CTLFLAG_RW, +SYSCTL_INT(_hw_cxgb, OID_AUTO, tx_coalesce_force, CTLFLAG_RW, &cxgb_tx_coalesce_force, 0, "coalesce small packets into a single work request regardless of ring state"); @@ -100,17 +100,17 @@ SYSCTL_UINT(_hw_cxgb, OID_AUTO, tx_coale static int cxgb_tx_coalesce_enable_start = COALESCE_START_DEFAULT; TUNABLE_INT("hw.cxgb.tx_coalesce_enable_start", &cxgb_tx_coalesce_enable_start); -SYSCTL_UINT(_hw_cxgb, OID_AUTO, tx_coalesce_enable_start, CTLFLAG_RW, +SYSCTL_INT(_hw_cxgb, OID_AUTO, tx_coalesce_enable_start, CTLFLAG_RW, &cxgb_tx_coalesce_enable_start, 0, "coalesce enable threshold"); static int cxgb_tx_coalesce_enable_stop = COALESCE_STOP_DEFAULT; TUNABLE_INT("hw.cxgb.tx_coalesce_enable_stop", &cxgb_tx_coalesce_enable_stop); -SYSCTL_UINT(_hw_cxgb, OID_AUTO, tx_coalesce_enable_stop, CTLFLAG_RW, +SYSCTL_INT(_hw_cxgb, OID_AUTO, tx_coalesce_enable_stop, CTLFLAG_RW, &cxgb_tx_coalesce_enable_stop, 0, "coalesce disable threshold"); static int cxgb_tx_reclaim_threshold = TX_RECLAIM_DEFAULT; TUNABLE_INT("hw.cxgb.tx_reclaim_threshold", &cxgb_tx_reclaim_threshold); -SYSCTL_UINT(_hw_cxgb, OID_AUTO, tx_reclaim_threshold, CTLFLAG_RW, +SYSCTL_INT(_hw_cxgb, OID_AUTO, tx_reclaim_threshold, CTLFLAG_RW, &cxgb_tx_reclaim_threshold, 0, "tx cleaning minimum threshold"); @@ -3493,7 +3493,7 @@ t3_add_attach_sysctls(adapter_t *sc) "firmware_version", CTLFLAG_RD, &sc->fw_version, 0, "firmware version"); - SYSCTL_ADD_INT(ctx, children, OID_AUTO, + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "hw_revision", CTLFLAG_RD, &sc->params.rev, 0, "chip model"); @@ -3505,14 +3505,14 @@ t3_add_attach_sysctls(adapter_t *sc) "enable_debug", CTLFLAG_RW, &cxgb_debug, 0, "enable verbose debugging output"); - SYSCTL_ADD_QUAD(ctx, children, OID_AUTO, "tunq_coalesce", + SYSCTL_ADD_UQUAD(ctx, children, OID_AUTO, "tunq_coalesce", CTLFLAG_RD, &sc->tunq_coalesce, "#tunneled packets freed"); SYSCTL_ADD_INT(ctx, children, OID_AUTO, "txq_overrun", CTLFLAG_RD, &txq_fills, 0, "#times txq overrun"); - SYSCTL_ADD_INT(ctx, children, OID_AUTO, + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "core_clock", CTLFLAG_RD, &sc->params.vpd.cclk, 0, "core clock frequency (in KHz)"); @@ -3576,7 +3576,7 @@ t3_add_configured_sysctls(adapter_t *sc) poid = SYSCTL_ADD_NODE(ctx, children, OID_AUTO, pi->namebuf, CTLFLAG_RD, NULL, "port statistics"); poidlist = SYSCTL_CHILDREN(poid); - SYSCTL_ADD_INT(ctx, poidlist, OID_AUTO, + SYSCTL_ADD_UINT(ctx, poidlist, OID_AUTO, "nqsets", CTLFLAG_RD, &pi->nqsets, 0, "#queue sets"); @@ -3643,10 +3643,10 @@ t3_add_configured_sysctls(adapter_t *sc) CTLTYPE_STRING | CTLFLAG_RD, &qs->rspq, 0, t3_dump_rspq, "A", "dump of the response queue"); - SYSCTL_ADD_QUAD(ctx, txqpoidlist, OID_AUTO, "dropped", + SYSCTL_ADD_UQUAD(ctx, txqpoidlist, OID_AUTO, "dropped", CTLFLAG_RD, &qs->txq[TXQ_ETH].txq_mr->br_drops, "#tunneled packets dropped"); - SYSCTL_ADD_INT(ctx, txqpoidlist, OID_AUTO, "sendqlen", + SYSCTL_ADD_UINT(ctx, txqpoidlist, OID_AUTO, "sendqlen", CTLFLAG_RD, &qs->txq[TXQ_ETH].sendq.qlen, 0, "#tunneled packets waiting to be sent"); #if 0 @@ -3657,7 +3657,7 @@ t3_add_configured_sysctls(adapter_t *sc) CTLFLAG_RD, (uint32_t *)(uintptr_t)&qs->txq[TXQ_ETH].txq_mr.br_cons, 0, "#tunneled packets queue consumer index"); #endif - SYSCTL_ADD_INT(ctx, txqpoidlist, OID_AUTO, "processed", + SYSCTL_ADD_UINT(ctx, txqpoidlist, OID_AUTO, "processed", CTLFLAG_RD, &qs->txq[TXQ_ETH].processed, 0, "#tunneled packets processed by the card"); SYSCTL_ADD_UINT(ctx, txqpoidlist, OID_AUTO, "cleaned", @@ -3672,7 +3672,7 @@ t3_add_configured_sysctls(adapter_t *sc) SYSCTL_ADD_UINT(ctx, txqpoidlist, OID_AUTO, "skipped", CTLFLAG_RD, &txq->txq_skipped, 0, "#tunneled packet descriptors skipped"); - SYSCTL_ADD_QUAD(ctx, txqpoidlist, OID_AUTO, "coalesced", + SYSCTL_ADD_UQUAD(ctx, txqpoidlist, OID_AUTO, "coalesced", CTLFLAG_RD, &txq->txq_coalesced, "#tunneled packets coalesced"); SYSCTL_ADD_UINT(ctx, txqpoidlist, OID_AUTO, "enqueued", Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c ============================================================================== --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c Wed Jan 12 19:53:39 2011 (r217320) +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c Wed Jan 12 19:53:44 2011 (r217321) @@ -101,32 +101,32 @@ SYSCTL_NODE(_hw, OID_AUTO, cxgb, CTLFLAG static int ep_timeout_secs = 10; TUNABLE_INT("hw.iw_cxgb.ep_timeout_secs", &ep_timeout_secs); -SYSCTL_UINT(_hw_cxgb, OID_AUTO, ep_timeout_secs, CTLFLAG_RDTUN, &ep_timeout_secs, 0, +SYSCTL_INT(_hw_cxgb, OID_AUTO, ep_timeout_secs, CTLFLAG_RDTUN, &ep_timeout_secs, 0, "CM Endpoint operation timeout in seconds (default=10)"); static int mpa_rev = 1; TUNABLE_INT("hw.iw_cxgb.mpa_rev", &mpa_rev); -SYSCTL_UINT(_hw_cxgb, OID_AUTO, mpa_rev, CTLFLAG_RDTUN, &mpa_rev, 0, +SYSCTL_INT(_hw_cxgb, OID_AUTO, mpa_rev, CTLFLAG_RDTUN, &mpa_rev, 0, "MPA Revision, 0 supports amso1100, 1 is spec compliant. (default=1)"); static int markers_enabled = 0; TUNABLE_INT("hw.iw_cxgb.markers_enabled", &markers_enabled); -SYSCTL_UINT(_hw_cxgb, OID_AUTO, markers_enabled, CTLFLAG_RDTUN, &markers_enabled, 0, +SYSCTL_INT(_hw_cxgb, OID_AUTO, markers_enabled, CTLFLAG_RDTUN, &markers_enabled, 0, "Enable MPA MARKERS (default(0)=disabled)"); static int crc_enabled = 1; TUNABLE_INT("hw.iw_cxgb.crc_enabled", &crc_enabled); -SYSCTL_UINT(_hw_cxgb, OID_AUTO, crc_enabled, CTLFLAG_RDTUN, &crc_enabled, 0, +SYSCTL_INT(_hw_cxgb, OID_AUTO, crc_enabled, CTLFLAG_RDTUN, &crc_enabled, 0, "Enable MPA CRC (default(1)=enabled)"); static int rcv_win = 256 * 1024; TUNABLE_INT("hw.iw_cxgb.rcv_win", &rcv_win); -SYSCTL_UINT(_hw_cxgb, OID_AUTO, rcv_win, CTLFLAG_RDTUN, &rcv_win, 0, +SYSCTL_INT(_hw_cxgb, OID_AUTO, rcv_win, CTLFLAG_RDTUN, &rcv_win, 0, "TCP receive window in bytes (default=256KB)"); static int snd_win = 32 * 1024; TUNABLE_INT("hw.iw_cxgb.snd_win", &snd_win); -SYSCTL_UINT(_hw_cxgb, OID_AUTO, snd_win, CTLFLAG_RDTUN, &snd_win, 0, +SYSCTL_INT(_hw_cxgb, OID_AUTO, snd_win, CTLFLAG_RDTUN, &snd_win, 0, "TCP send window in bytes (default=32KB)"); static unsigned int nocong = 0; From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 19:53:51 2011 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 2E5CB10657B8; Wed, 12 Jan 2011 19:53:51 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B56F8FC1F; Wed, 12 Jan 2011 19:53: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 p0CJrp5C005096; Wed, 12 Jan 2011 19:53:51 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CJroO9005083; Wed, 12 Jan 2011 19:53:50 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201101121953.p0CJroO9005083@svn.freebsd.org> From: Matthew D Fleming Date: Wed, 12 Jan 2011 19:53: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: r217322 - in head/sys: net net80211 netinet netinet/cc netinet/ipfw 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, 12 Jan 2011 19:53:51 -0000 Author: mdf Date: Wed Jan 12 19:53:50 2011 New Revision: 217322 URL: http://svn.freebsd.org/changeset/base/217322 Log: sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly. Commit the net* piece. Modified: head/sys/net/if.c head/sys/net/netisr.c head/sys/net/route.c head/sys/net80211/ieee80211_amrr.c head/sys/net80211/ieee80211_freebsd.c head/sys/netinet/cc/cc_htcp.c head/sys/netinet/ipfw/ip_dn_io.c head/sys/netinet/ipfw/ip_fw_dynamic.c head/sys/netinet/tcp_hostcache.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_syncache.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Wed Jan 12 19:53:44 2011 (r217321) +++ head/sys/net/if.c Wed Jan 12 19:53:50 2011 (r217322) @@ -100,7 +100,7 @@ SYSCTL_NODE(_net, PF_LINK, link, CTLFLAG SYSCTL_NODE(_net_link, 0, generic, CTLFLAG_RW, 0, "Generic link-management"); TUNABLE_INT("net.link.ifqmaxlen", &ifqmaxlen); -SYSCTL_UINT(_net_link, OID_AUTO, ifqmaxlen, CTLFLAG_RDTUN, +SYSCTL_INT(_net_link, OID_AUTO, ifqmaxlen, CTLFLAG_RDTUN, &ifqmaxlen, 0, "max send queue size"); /* Log link state change events */ Modified: head/sys/net/netisr.c ============================================================================== --- head/sys/net/netisr.c Wed Jan 12 19:53:44 2011 (r217321) +++ head/sys/net/netisr.c Wed Jan 12 19:53:50 2011 (r217322) @@ -179,7 +179,7 @@ SYSCTL_INT(_net_isr, OID_AUTO, bindthrea #define NETISR_DEFAULT_MAXQLIMIT 10240 static u_int netisr_maxqlimit = NETISR_DEFAULT_MAXQLIMIT; TUNABLE_INT("net.isr.maxqlimit", &netisr_maxqlimit); -SYSCTL_INT(_net_isr, OID_AUTO, maxqlimit, CTLFLAG_RDTUN, +SYSCTL_UINT(_net_isr, OID_AUTO, maxqlimit, CTLFLAG_RDTUN, &netisr_maxqlimit, 0, "Maximum netisr per-protocol, per-CPU queue depth."); @@ -191,7 +191,7 @@ SYSCTL_INT(_net_isr, OID_AUTO, maxqlimit #define NETISR_DEFAULT_DEFAULTQLIMIT 256 static u_int netisr_defaultqlimit = NETISR_DEFAULT_DEFAULTQLIMIT; TUNABLE_INT("net.isr.defaultqlimit", &netisr_defaultqlimit); -SYSCTL_INT(_net_isr, OID_AUTO, defaultqlimit, CTLFLAG_RDTUN, +SYSCTL_UINT(_net_isr, OID_AUTO, defaultqlimit, CTLFLAG_RDTUN, &netisr_defaultqlimit, 0, "Default netisr per-protocol, per-CPU queue limit if not set by protocol"); @@ -201,7 +201,7 @@ SYSCTL_INT(_net_isr, OID_AUTO, defaultql * required for crashdump analysis, as it sizes netisr_proto[]. */ static u_int netisr_maxprot = NETISR_MAXPROT; -SYSCTL_INT(_net_isr, OID_AUTO, maxprot, CTLFLAG_RD, +SYSCTL_UINT(_net_isr, OID_AUTO, maxprot, CTLFLAG_RD, &netisr_maxprot, 0, "Compile-time limit on the number of protocols supported by netisr."); @@ -228,7 +228,7 @@ static u_int nws_array[MAXCPU]; * CPUs once fully started. */ static u_int nws_count; -SYSCTL_INT(_net_isr, OID_AUTO, numthreads, CTLFLAG_RD, +SYSCTL_UINT(_net_isr, OID_AUTO, numthreads, CTLFLAG_RD, &nws_count, 0, "Number of extant netisr threads."); /* Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Wed Jan 12 19:53:44 2011 (r217321) +++ head/sys/net/route.c Wed Jan 12 19:53:50 2011 (r217322) @@ -68,7 +68,7 @@ #include u_int rt_numfibs = RT_NUMFIBS; -SYSCTL_INT(_net, OID_AUTO, fibs, CTLFLAG_RD, &rt_numfibs, 0, ""); +SYSCTL_UINT(_net, OID_AUTO, fibs, CTLFLAG_RD, &rt_numfibs, 0, ""); /* * Allow the boot code to allow LESS than RT_MAXFIBS to be used. * We can't do more because storage is statically allocated for now. @@ -84,7 +84,7 @@ TUNABLE_INT("net.fibs", &rt_numfibs); * a more fine grained solution.. that will come. */ u_int rt_add_addr_allfibs = 1; -SYSCTL_INT(_net, OID_AUTO, add_addr_allfibs, CTLFLAG_RW, +SYSCTL_UINT(_net, OID_AUTO, add_addr_allfibs, CTLFLAG_RW, &rt_add_addr_allfibs, 0, ""); TUNABLE_INT("net.add_addr_allfibs", &rt_add_addr_allfibs); Modified: head/sys/net80211/ieee80211_amrr.c ============================================================================== --- head/sys/net80211/ieee80211_amrr.c Wed Jan 12 19:53:44 2011 (r217321) +++ head/sys/net80211/ieee80211_amrr.c Wed Jan 12 19:53:50 2011 (r217322) @@ -308,10 +308,10 @@ amrr_sysctlattach(struct ieee80211vap *v "amrr_rate_interval", CTLTYPE_INT | CTLFLAG_RW, vap, 0, amrr_sysctl_interval, "I", "amrr operation interval (ms)"); /* XXX bounds check values */ - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "amrr_max_sucess_threshold", CTLFLAG_RW, &amrr->amrr_max_success_threshold, 0, ""); - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "amrr_min_sucess_threshold", CTLFLAG_RW, &amrr->amrr_min_success_threshold, 0, ""); } Modified: head/sys/net80211/ieee80211_freebsd.c ============================================================================== --- head/sys/net80211/ieee80211_freebsd.c Wed Jan 12 19:53:44 2011 (r217321) +++ head/sys/net80211/ieee80211_freebsd.c Wed Jan 12 19:53:50 2011 (r217322) @@ -235,12 +235,12 @@ ieee80211_sysctl_vattach(struct ieee8021 SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "%parent", CTLFLAG_RD, vap->iv_ic, 0, ieee80211_sysctl_parent, "A", "parent device"); - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "driver_caps", CTLFLAG_RW, &vap->iv_caps, 0, "driver capabilities"); #ifdef IEEE80211_DEBUG vap->iv_debug = ieee80211_debug; - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "debug", CTLFLAG_RW, &vap->iv_debug, 0, "control debugging printfs"); #endif @@ -265,19 +265,19 @@ ieee80211_sysctl_vattach(struct ieee8021 ieee80211_sysctl_inact, "I", "station initial state timeout (sec)"); if (vap->iv_htcaps & IEEE80211_HTC_HT) { - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "ampdu_mintraffic_bk", CTLFLAG_RW, &vap->iv_ampdu_mintraffic[WME_AC_BK], 0, "BK traffic tx aggr threshold (pps)"); - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "ampdu_mintraffic_be", CTLFLAG_RW, &vap->iv_ampdu_mintraffic[WME_AC_BE], 0, "BE traffic tx aggr threshold (pps)"); - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "ampdu_mintraffic_vo", CTLFLAG_RW, &vap->iv_ampdu_mintraffic[WME_AC_VO], 0, "VO traffic tx aggr threshold (pps)"); - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "ampdu_mintraffic_vi", CTLFLAG_RW, &vap->iv_ampdu_mintraffic[WME_AC_VI], 0, "VI traffic tx aggr threshold (pps)"); Modified: head/sys/netinet/cc/cc_htcp.c ============================================================================== --- head/sys/netinet/cc/cc_htcp.c Wed Jan 12 19:53:44 2011 (r217321) +++ head/sys/netinet/cc/cc_htcp.c Wed Jan 12 19:53:50 2011 (r217322) @@ -168,8 +168,8 @@ static int htcp_rtt_ref; static int htcp_max_diff = INT_MAX / ((1 << HTCP_ALPHA_INC_SHIFT) * 10); /* Per-netstack vars. */ -static VNET_DEFINE(uint8_t, htcp_adaptive_backoff) = 0; -static VNET_DEFINE(uint8_t, htcp_rtt_scaling) = 0; +static VNET_DEFINE(u_int, htcp_adaptive_backoff) = 0; +static VNET_DEFINE(u_int, htcp_rtt_scaling) = 0; #define V_htcp_adaptive_backoff VNET(htcp_adaptive_backoff) #define V_htcp_rtt_scaling VNET(htcp_rtt_scaling) Modified: head/sys/netinet/ipfw/ip_dn_io.c ============================================================================== --- head/sys/netinet/ipfw/ip_dn_io.c Wed Jan 12 19:53:44 2011 (r217321) +++ head/sys/netinet/ipfw/ip_dn_io.c Wed Jan 12 19:53:50 2011 (r217322) @@ -144,9 +144,9 @@ SYSCTL_LONG(_net_inet_ip_dummynet, OID_A "Number of ticks coalesced by dummynet taskqueue."); /* Drain parameters */ -SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, expire, +SYSCTL_UINT(_net_inet_ip_dummynet, OID_AUTO, expire, CTLFLAG_RW, DC(expire), 0, "Expire empty queues/pipes"); -SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, expire_cycle, +SYSCTL_UINT(_net_inet_ip_dummynet, OID_AUTO, expire_cycle, CTLFLAG_RD, DC(expire_cycle), 0, "Expire cycle for queues/pipes"); /* statistics */ Modified: head/sys/netinet/ipfw/ip_fw_dynamic.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_dynamic.c Wed Jan 12 19:53:44 2011 (r217321) +++ head/sys/netinet/ipfw/ip_fw_dynamic.c Wed Jan 12 19:53:50 2011 (r217322) @@ -191,37 +191,37 @@ static VNET_DEFINE(u_int32_t, dyn_max); SYSBEGIN(f2) SYSCTL_DECL(_net_inet_ip_fw); -SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, dyn_buckets, +SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, dyn_buckets, CTLFLAG_RW, &VNET_NAME(dyn_buckets), 0, "Number of dyn. buckets"); -SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, curr_dyn_buckets, +SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, curr_dyn_buckets, CTLFLAG_RD, &VNET_NAME(curr_dyn_buckets), 0, "Current Number of dyn. buckets"); -SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, dyn_count, +SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, dyn_count, CTLFLAG_RD, &VNET_NAME(dyn_count), 0, "Number of dyn. rules"); -SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, dyn_max, +SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, dyn_max, CTLFLAG_RW, &VNET_NAME(dyn_max), 0, "Max number of dyn. rules"); -SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, dyn_ack_lifetime, +SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, dyn_ack_lifetime, CTLFLAG_RW, &VNET_NAME(dyn_ack_lifetime), 0, "Lifetime of dyn. rules for acks"); -SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, dyn_syn_lifetime, +SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, dyn_syn_lifetime, CTLFLAG_RW, &VNET_NAME(dyn_syn_lifetime), 0, "Lifetime of dyn. rules for syn"); -SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, dyn_fin_lifetime, +SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, dyn_fin_lifetime, CTLFLAG_RW, &VNET_NAME(dyn_fin_lifetime), 0, "Lifetime of dyn. rules for fin"); -SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, dyn_rst_lifetime, +SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, dyn_rst_lifetime, CTLFLAG_RW, &VNET_NAME(dyn_rst_lifetime), 0, "Lifetime of dyn. rules for rst"); -SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, dyn_udp_lifetime, +SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, dyn_udp_lifetime, CTLFLAG_RW, &VNET_NAME(dyn_udp_lifetime), 0, "Lifetime of dyn. rules for UDP"); -SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, dyn_short_lifetime, +SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, dyn_short_lifetime, CTLFLAG_RW, &VNET_NAME(dyn_short_lifetime), 0, "Lifetime of dyn. rules for other situations"); -SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, dyn_keepalive, +SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, dyn_keepalive, CTLFLAG_RW, &VNET_NAME(dyn_keepalive), 0, "Enable keepalives for dyn. rules"); Modified: head/sys/netinet/tcp_hostcache.c ============================================================================== --- head/sys/netinet/tcp_hostcache.c Wed Jan 12 19:53:44 2011 (r217321) +++ head/sys/netinet/tcp_hostcache.c Wed Jan 12 19:53:50 2011 (r217322) @@ -121,19 +121,19 @@ static void tcp_hc_purge(void *); SYSCTL_NODE(_net_inet_tcp, OID_AUTO, hostcache, CTLFLAG_RW, 0, "TCP Host cache"); -SYSCTL_VNET_INT(_net_inet_tcp_hostcache, OID_AUTO, cachelimit, CTLFLAG_RDTUN, +SYSCTL_VNET_UINT(_net_inet_tcp_hostcache, OID_AUTO, cachelimit, CTLFLAG_RDTUN, &VNET_NAME(tcp_hostcache.cache_limit), 0, "Overall entry limit for hostcache"); -SYSCTL_VNET_INT(_net_inet_tcp_hostcache, OID_AUTO, hashsize, CTLFLAG_RDTUN, +SYSCTL_VNET_UINT(_net_inet_tcp_hostcache, OID_AUTO, hashsize, CTLFLAG_RDTUN, &VNET_NAME(tcp_hostcache.hashsize), 0, "Size of TCP hostcache hashtable"); -SYSCTL_VNET_INT(_net_inet_tcp_hostcache, OID_AUTO, bucketlimit, +SYSCTL_VNET_UINT(_net_inet_tcp_hostcache, OID_AUTO, bucketlimit, CTLFLAG_RDTUN, &VNET_NAME(tcp_hostcache.bucket_limit), 0, "Per-bucket hash limit for hostcache"); -SYSCTL_VNET_INT(_net_inet_tcp_hostcache, OID_AUTO, count, CTLFLAG_RD, +SYSCTL_VNET_UINT(_net_inet_tcp_hostcache, OID_AUTO, count, CTLFLAG_RD, &VNET_NAME(tcp_hostcache.cache_count), 0, "Current number of entries in hostcache"); Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Wed Jan 12 19:53:44 2011 (r217321) +++ head/sys/netinet/tcp_subr.c Wed Jan 12 19:53:50 2011 (r217322) @@ -192,7 +192,7 @@ static int do_tcpdrain = 1; SYSCTL_INT(_net_inet_tcp, OID_AUTO, do_tcpdrain, CTLFLAG_RW, &do_tcpdrain, 0, "Enable tcp_drain routine for extra help when low on mbufs"); -SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, pcbcount, CTLFLAG_RD, +SYSCTL_VNET_UINT(_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; Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Wed Jan 12 19:53:44 2011 (r217321) +++ head/sys/netinet/tcp_syncache.c Wed Jan 12 19:53:50 2011 (r217322) @@ -148,23 +148,23 @@ static VNET_DEFINE(struct tcp_syncache, SYSCTL_NODE(_net_inet_tcp, OID_AUTO, syncache, CTLFLAG_RW, 0, "TCP SYN cache"); -SYSCTL_VNET_INT(_net_inet_tcp_syncache, OID_AUTO, bucketlimit, CTLFLAG_RDTUN, +SYSCTL_VNET_UINT(_net_inet_tcp_syncache, OID_AUTO, bucketlimit, CTLFLAG_RDTUN, &VNET_NAME(tcp_syncache.bucket_limit), 0, "Per-bucket hash limit for syncache"); -SYSCTL_VNET_INT(_net_inet_tcp_syncache, OID_AUTO, cachelimit, CTLFLAG_RDTUN, +SYSCTL_VNET_UINT(_net_inet_tcp_syncache, OID_AUTO, cachelimit, CTLFLAG_RDTUN, &VNET_NAME(tcp_syncache.cache_limit), 0, "Overall entry limit for syncache"); -SYSCTL_VNET_INT(_net_inet_tcp_syncache, OID_AUTO, count, CTLFLAG_RD, +SYSCTL_VNET_UINT(_net_inet_tcp_syncache, OID_AUTO, count, CTLFLAG_RD, &VNET_NAME(tcp_syncache.cache_count), 0, "Current number of entries in syncache"); -SYSCTL_VNET_INT(_net_inet_tcp_syncache, OID_AUTO, hashsize, CTLFLAG_RDTUN, +SYSCTL_VNET_UINT(_net_inet_tcp_syncache, OID_AUTO, hashsize, CTLFLAG_RDTUN, &VNET_NAME(tcp_syncache.hashsize), 0, "Size of TCP syncache hashtable"); -SYSCTL_VNET_INT(_net_inet_tcp_syncache, OID_AUTO, rexmtlimit, CTLFLAG_RW, +SYSCTL_VNET_UINT(_net_inet_tcp_syncache, OID_AUTO, rexmtlimit, CTLFLAG_RW, &VNET_NAME(tcp_syncache.rexmt_limit), 0, "Limit on SYN/ACK retransmissions"); From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 19:53:57 2011 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 89E111065B45; Wed, 12 Jan 2011 19:53:57 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 753CF8FC24; Wed, 12 Jan 2011 19:53: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 p0CJrvNp005165; Wed, 12 Jan 2011 19:53:57 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CJruOH005143; Wed, 12 Jan 2011 19:53:56 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201101121953.p0CJruOH005143@svn.freebsd.org> From: Matthew D Fleming Date: Wed, 12 Jan 2011 19:53: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: r217323 - in head/sys/dev: acpi_support ae alc ale ath bce bge bwi bwn ed iscsi/initiator iwi mps mpt nfe pccbb sound/pcm ste txp usb/input 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, 12 Jan 2011 19:53:57 -0000 Author: mdf Date: Wed Jan 12 19:53:56 2011 New Revision: 217323 URL: http://svn.freebsd.org/changeset/base/217323 Log: sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly. Commit the rest of the devices. Modified: head/sys/dev/acpi_support/acpi_ibm.c head/sys/dev/ae/if_ae.c head/sys/dev/alc/if_alc.c head/sys/dev/ale/if_ale.c head/sys/dev/ath/if_ath.c head/sys/dev/bce/if_bce.c head/sys/dev/bge/if_bge.c head/sys/dev/bwi/if_bwi.c head/sys/dev/bwn/if_bwn.c head/sys/dev/ed/if_ed.c head/sys/dev/iscsi/initiator/iscsi.c head/sys/dev/iwi/if_iwi.c head/sys/dev/mps/mps.c head/sys/dev/mpt/mpt.c head/sys/dev/mpt/mpt_raid.c head/sys/dev/nfe/if_nfe.c head/sys/dev/pccbb/pccbb.c head/sys/dev/sound/pcm/sound.c head/sys/dev/ste/if_ste.c head/sys/dev/txp/if_txp.c head/sys/dev/usb/input/atp.c Modified: head/sys/dev/acpi_support/acpi_ibm.c ============================================================================== --- head/sys/dev/acpi_support/acpi_ibm.c Wed Jan 12 19:53:50 2011 (r217322) +++ head/sys/dev/acpi_support/acpi_ibm.c Wed Jan 12 19:53:56 2011 (r217323) @@ -367,7 +367,7 @@ acpi_ibm_attach(device_t dev) IBM_NAME_EVENTS_MASK_GET, &sc->events_initialmask)); if (sc->events_mask_supported) { - SYSCTL_ADD_INT(sc->sysctl_ctx, + SYSCTL_ADD_UINT(sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, "initialmask", CTLFLAG_RD, &sc->events_initialmask, 0, "Initial eventmask"); @@ -377,7 +377,7 @@ acpi_ibm_attach(device_t dev) IBM_NAME_EVENTS_AVAILMASK, &sc->events_availmask))) sc->events_availmask = 0xffffffff; - SYSCTL_ADD_INT(sc->sysctl_ctx, + SYSCTL_ADD_UINT(sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, "availmask", CTLFLAG_RD, &sc->events_availmask, 0, "Mask of supported events"); Modified: head/sys/dev/ae/if_ae.c ============================================================================== --- head/sys/dev/ae/if_ae.c Wed Jan 12 19:53:50 2011 (r217322) +++ head/sys/dev/ae/if_ae.c Wed Jan 12 19:53:56 2011 (r217323) @@ -207,43 +207,6 @@ TUNABLE_INT("hw.ae.msi_disable", &msi_di #define AE_TXD_VLAN(vtag) \ (((vtag) << 4) | (((vtag) >> 13) & 0x07) | (((vtag) >> 9) & 0x08)) -/* - * ae statistics. - */ -#define STATS_ENTRY(node, desc, field) \ - { node, desc, offsetof(struct ae_stats, field) } -struct { - const char *node; - const char *desc; - intptr_t offset; -} ae_stats_tx[] = { - STATS_ENTRY("bcast", "broadcast frames", tx_bcast), - STATS_ENTRY("mcast", "multicast frames", tx_mcast), - STATS_ENTRY("pause", "PAUSE frames", tx_pause), - STATS_ENTRY("control", "control frames", tx_ctrl), - STATS_ENTRY("defers", "deferrals occuried", tx_defer), - STATS_ENTRY("exc_defers", "excessive deferrals occuried", tx_excdefer), - STATS_ENTRY("singlecols", "single collisions occuried", tx_singlecol), - STATS_ENTRY("multicols", "multiple collisions occuried", tx_multicol), - STATS_ENTRY("latecols", "late collisions occuried", tx_latecol), - STATS_ENTRY("aborts", "transmit aborts due collisions", tx_abortcol), - STATS_ENTRY("underruns", "Tx FIFO underruns", tx_underrun) -}, ae_stats_rx[] = { - STATS_ENTRY("bcast", "broadcast frames", rx_bcast), - STATS_ENTRY("mcast", "multicast frames", rx_mcast), - STATS_ENTRY("pause", "PAUSE frames", rx_pause), - STATS_ENTRY("control", "control frames", rx_ctrl), - STATS_ENTRY("crc_errors", "frames with CRC errors", rx_crcerr), - STATS_ENTRY("code_errors", "frames with invalid opcode", rx_codeerr), - STATS_ENTRY("runt", "runt frames", rx_runt), - STATS_ENTRY("frag", "fragmented frames", rx_frag), - STATS_ENTRY("align_errors", "frames with alignment errors", rx_align), - STATS_ENTRY("truncated", "frames truncated due to Rx FIFO inderrun", - rx_trunc) -}; -#define AE_STATS_RX_LEN (sizeof(ae_stats_rx) / sizeof(*ae_stats_rx)) -#define AE_STATS_TX_LEN (sizeof(ae_stats_tx) / sizeof(*ae_stats_tx)) - static int ae_probe(device_t dev) { @@ -433,13 +396,15 @@ fail: return (error); } +#define AE_SYSCTL(stx, parent, name, desc, ptr) \ + SYSCTL_ADD_UINT(ctx, parent, OID_AUTO, name, CTLFLAG_RD, ptr, 0, desc) + static void ae_init_tunables(ae_softc_t *sc) { struct sysctl_ctx_list *ctx; struct sysctl_oid *root, *stats, *stats_rx, *stats_tx; struct ae_stats *ae_stats; - unsigned int i; KASSERT(sc != NULL, ("[ae, %d]: sc is NULL", __LINE__)); ae_stats = &sc->stats; @@ -454,20 +419,54 @@ ae_init_tunables(ae_softc_t *sc) */ stats_rx = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(stats), OID_AUTO, "rx", CTLFLAG_RD, NULL, "Rx MAC statistics"); - for (i = 0; i < AE_STATS_RX_LEN; i++) - SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(stats_rx), OID_AUTO, - ae_stats_rx[i].node, CTLFLAG_RD, (char *)ae_stats + - ae_stats_rx[i].offset, 0, ae_stats_rx[i].desc); + AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_rx), "bcast", + "broadcast frames", &ae_stats->rx_bcast); + AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_rx), "mcast", + "multicast frames", &ae_stats->rx_mcast); + AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_rx), "pause", + "PAUSE frames", &ae_stats->rx_pause); + AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_rx), "control", + "control frames", &ae_stats->rx_ctrl); + AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_rx), "crc_errors", + "frames with CRC errors", &ae_stats->rx_crcerr); + AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_rx), "code_errors", + "frames with invalid opcode", &ae_stats->rx_codeerr); + AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_rx), "runt", + "runt frames", &ae_stats->rx_runt); + AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_rx), "frag", + "fragmented frames", &ae_stats->rx_frag); + AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_rx), "align_errors", + "frames with alignment errors", &ae_stats->rx_align); + AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_rx), "truncated", + "frames truncated due to Rx FIFO inderrun", &ae_stats->rx_trunc); /* * Receiver statistcics. */ stats_tx = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(stats), OID_AUTO, "tx", CTLFLAG_RD, NULL, "Tx MAC statistics"); - for (i = 0; i < AE_STATS_TX_LEN; i++) - SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(stats_tx), OID_AUTO, - ae_stats_tx[i].node, CTLFLAG_RD, (char *)ae_stats + - ae_stats_tx[i].offset, 0, ae_stats_tx[i].desc); + AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_tx), "bcast", + "broadcast frames", &ae_stats->tx_bcast); + AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_tx), "mcast", + "multicast frames", &ae_stats->tx_mcast); + AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_tx), "pause", + "PAUSE frames", &ae_stats->tx_pause); + AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_tx), "control", + "control frames", &ae_stats->tx_ctrl); + AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_tx), "defers", + "deferrals occuried", &ae_stats->tx_defer); + AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_tx), "exc_defers", + "excessive deferrals occuried", &ae_stats->tx_excdefer); + AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_tx), "singlecols", + "single collisions occuried", &ae_stats->tx_singlecol); + AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_tx), "multicols", + "multiple collisions occuried", &ae_stats->tx_multicol); + AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_tx), "latecols", + "late collisions occuried", &ae_stats->tx_latecol); + AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_tx), "aborts", + "transmit aborts due collisions", &ae_stats->tx_abortcol); + AE_SYSCTL(ctx, SYSCTL_CHILDREN(stats_tx), "underruns", + "Tx FIFO underruns", &ae_stats->tx_underrun); } static void Modified: head/sys/dev/alc/if_alc.c ============================================================================== --- head/sys/dev/alc/if_alc.c Wed Jan 12 19:53:50 2011 (r217322) +++ head/sys/dev/alc/if_alc.c Wed Jan 12 19:53:56 2011 (r217323) @@ -1106,7 +1106,7 @@ alc_detach(device_t dev) #define ALC_SYSCTL_STAT_ADD32(c, h, n, p, d) \ SYSCTL_ADD_UINT(c, h, OID_AUTO, n, CTLFLAG_RD, p, 0, d) #define ALC_SYSCTL_STAT_ADD64(c, h, n, p, d) \ - SYSCTL_ADD_QUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d) + SYSCTL_ADD_UQUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d) static void alc_sysctl_node(struct alc_softc *sc) Modified: head/sys/dev/ale/if_ale.c ============================================================================== --- head/sys/dev/ale/if_ale.c Wed Jan 12 19:53:50 2011 (r217322) +++ head/sys/dev/ale/if_ale.c Wed Jan 12 19:53:56 2011 (r217323) @@ -729,7 +729,10 @@ ale_detach(device_t dev) #define ALE_SYSCTL_STAT_ADD32(c, h, n, p, d) \ SYSCTL_ADD_UINT(c, h, OID_AUTO, n, CTLFLAG_RD, p, 0, d) -#if __FreeBSD_version > 800000 +#if __FreeBSD_version >= 900030 +#define ALE_SYSCTL_STAT_ADD64(c, h, n, p, d) \ + SYSCTL_ADD_UQUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d) +#elif __FreeBSD_version > 800000 #define ALE_SYSCTL_STAT_ADD64(c, h, n, p, d) \ SYSCTL_ADD_QUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d) #else Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Wed Jan 12 19:53:50 2011 (r217322) +++ head/sys/dev/ath/if_ath.c Wed Jan 12 19:53:56 2011 (r217323) @@ -6565,10 +6565,10 @@ ath_sysctlattach(struct ath_softc *sc) struct sysctl_oid *tree = device_get_sysctl_tree(sc->sc_dev); struct ath_hal *ah = sc->sc_ah; - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "countrycode", CTLFLAG_RD, &sc->sc_eecc, 0, "EEPROM country code"); - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "regdomain", CTLFLAG_RD, &sc->sc_eerd, 0, "EEPROM regdomain code"); #ifdef ATH_DEBUG @@ -6591,10 +6591,10 @@ ath_sysctlattach(struct ath_softc *sc) SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "ledpin", CTLTYPE_INT | CTLFLAG_RW, sc, 0, ath_sysctl_ledpin, "I", "GPIO pin connected to LED"); - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "ledon", CTLFLAG_RW, &sc->sc_ledon, 0, "setting to turn LED on"); - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "ledidle", CTLFLAG_RW, &sc->sc_ledidle, 0, "idle time for inactivity LED (ticks)"); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, @@ -6608,7 +6608,7 @@ ath_sysctlattach(struct ath_softc *sc) "diversity", CTLTYPE_INT | CTLFLAG_RW, sc, 0, ath_sysctl_diversity, "I", "antenna diversity"); sc->sc_txintrperiod = ATH_TXINTR_PERIOD; - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "txintrperiod", CTLFLAG_RW, &sc->sc_txintrperiod, 0, "tx descriptor batching"); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, @@ -6642,7 +6642,7 @@ ath_sysctlattach(struct ath_softc *sc) ath_sysctl_intmit, "I", "interference mitigation"); } sc->sc_monpass = HAL_RXERR_DECRYPT | HAL_RXERR_MIC; - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "monpass", CTLFLAG_RW, &sc->sc_monpass, 0, "mask of error frames to pass when monitoring"); #ifdef IEEE80211_SUPPORT_TDMA Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Wed Jan 12 19:53:50 2011 (r217322) +++ head/sys/dev/bce/if_bce.c Wed Jan 12 19:53:56 2011 (r217323) @@ -507,14 +507,14 @@ SYSCTL_NODE(_hw, OID_AUTO, bce, CTLFLAG_ /* Allowable values are TRUE or FALSE */ static int bce_tso_enable = TRUE; TUNABLE_INT("hw.bce.tso_enable", &bce_tso_enable); -SYSCTL_UINT(_hw_bce, OID_AUTO, tso_enable, CTLFLAG_RDTUN, &bce_tso_enable, 0, +SYSCTL_INT(_hw_bce, OID_AUTO, tso_enable, CTLFLAG_RDTUN, &bce_tso_enable, 0, "TSO Enable/Disable"); /* Allowable values are 0 (IRQ), 1 (MSI/IRQ), and 2 (MSI-X/MSI/IRQ) */ /* ToDo: Add MSI-X support. */ static int bce_msi_enable = 1; TUNABLE_INT("hw.bce.msi_enable", &bce_msi_enable); -SYSCTL_UINT(_hw_bce, OID_AUTO, msi_enable, CTLFLAG_RDTUN, &bce_msi_enable, 0, +SYSCTL_INT(_hw_bce, OID_AUTO, msi_enable, CTLFLAG_RDTUN, &bce_msi_enable, 0, "MSI-X|MSI|INTx selector"); /* ToDo: Add tunable to enable/disable strict MTU handling. */ @@ -8487,7 +8487,7 @@ bce_add_sysctls(struct bce_softc *sc) 0, "Number of simulated l2_fhdr errors"); #endif - SYSCTL_ADD_INT(ctx, children, OID_AUTO, + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "l2fhdr_error_count", CTLFLAG_RD, &sc->l2fhdr_error_count, 0, "Number of l2_fhdr errors"); @@ -8498,18 +8498,18 @@ bce_add_sysctls(struct bce_softc *sc) CTLFLAG_RW, &mbuf_alloc_failed_sim_control, 0, "Debug control to force mbuf allocation failures"); - SYSCTL_ADD_INT(ctx, children, OID_AUTO, + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "mbuf_alloc_failed_sim_count", CTLFLAG_RD, &sc->mbuf_alloc_failed_sim_count, 0, "Number of simulated mbuf cluster allocation failures"); #endif - SYSCTL_ADD_INT(ctx, children, OID_AUTO, + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "mbuf_alloc_failed_count", CTLFLAG_RD, &sc->mbuf_alloc_failed_count, 0, "Number of mbuf allocation failures"); - SYSCTL_ADD_INT(ctx, children, OID_AUTO, + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "mbuf_frag_count", CTLFLAG_RD, &sc->mbuf_frag_count, 0, "Number of fragmented mbufs"); @@ -8521,19 +8521,19 @@ bce_add_sysctls(struct bce_softc *sc) 0, "Debug control to force DMA mapping failures"); /* ToDo: Figure out how to update this value in bce_dma_map_addr(). */ - SYSCTL_ADD_INT(ctx, children, OID_AUTO, + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "dma_map_addr_failed_sim_count", CTLFLAG_RD, &sc->dma_map_addr_failed_sim_count, 0, "Number of simulated DMA mapping failures"); #endif - SYSCTL_ADD_INT(ctx, children, OID_AUTO, + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "dma_map_addr_rx_failed_count", CTLFLAG_RD, &sc->dma_map_addr_rx_failed_count, 0, "Number of RX DMA mapping failures"); - SYSCTL_ADD_INT(ctx, children, OID_AUTO, + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "dma_map_addr_tx_failed_count", CTLFLAG_RD, &sc->dma_map_addr_tx_failed_count, 0, "Number of TX DMA mapping failures"); @@ -8544,13 +8544,13 @@ bce_add_sysctls(struct bce_softc *sc) CTLFLAG_RW, &unexpected_attention_sim_control, 0, "Debug control to simulate unexpected attentions"); - SYSCTL_ADD_INT(ctx, children, OID_AUTO, + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "unexpected_attention_sim_count", CTLFLAG_RW, &sc->unexpected_attention_sim_count, 0, "Number of simulated unexpected attentions"); #endif - SYSCTL_ADD_INT(ctx, children, OID_AUTO, + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "unexpected_attention_count", CTLFLAG_RW, &sc->unexpected_attention_count, 0, "Number of unexpected attentions"); Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Wed Jan 12 19:53:50 2011 (r217322) +++ head/sys/dev/bge/if_bge.c Wed Jan 12 19:53:56 2011 (r217323) @@ -5546,7 +5546,7 @@ bge_add_sysctl_stats(struct bge_softc *s #undef BGE_SYSCTL_STAT #define BGE_SYSCTL_STAT_ADD64(c, h, n, p, d) \ - SYSCTL_ADD_QUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d) + SYSCTL_ADD_UQUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d) static void bge_add_sysctl_stats_regs(struct bge_softc *sc, struct sysctl_ctx_list *ctx, Modified: head/sys/dev/bwi/if_bwi.c ============================================================================== --- head/sys/dev/bwi/if_bwi.c Wed Jan 12 19:53:50 2011 (r217322) +++ head/sys/dev/bwi/if_bwi.c Wed Jan 12 19:53:56 2011 (r217323) @@ -537,11 +537,11 @@ bwi_attach(struct bwi_softc *sc) /* * Add sysctl nodes */ - SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "fw_version", CTLFLAG_RD, &sc->sc_fw_version, 0, "Firmware version"); - SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "led_idle", CTLFLAG_RW, &sc->sc_led_idle, 0, "# ticks before LED enters idle state"); Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Wed Jan 12 19:53:50 2011 (r217322) +++ head/sys/dev/bwn/if_bwn.c Wed Jan 12 19:53:56 2011 (r217323) @@ -14211,13 +14211,13 @@ bwn_sysctl_node(struct bwn_softc *sc) return; stats = &mac->mac_stats; - SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "linknoise", CTLFLAG_RW, &stats->rts, 0, "Noise level"); - SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "rts", CTLFLAG_RW, &stats->rts, 0, "RTS"); - SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "rtsfail", CTLFLAG_RW, &stats->rtsfail, 0, "RTS failed to send"); Modified: head/sys/dev/ed/if_ed.c ============================================================================== --- head/sys/dev/ed/if_ed.c Wed Jan 12 19:53:50 2011 (r217322) +++ head/sys/dev/ed/if_ed.c Wed Jan 12 19:53:56 2011 (r217323) @@ -323,19 +323,19 @@ ed_attach(device_t dev) sc->rx_mem = (sc->rec_page_stop - sc->rec_page_start) * ED_PAGE_SIZE; SYSCTL_ADD_STRING(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - 0, "type", CTLTYPE_STRING | CTLFLAG_RD, sc->type_str, 0, + 0, "type", CTLFLAG_RD, sc->type_str, 0, "Type of chip in card"); SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - 1, "TxMem", CTLTYPE_STRING | CTLFLAG_RD, &sc->tx_mem, 0, + 1, "TxMem", CTLFLAG_RD, &sc->tx_mem, 0, "Memory set aside for transmitting packets"); SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - 2, "RxMem", CTLTYPE_STRING | CTLFLAG_RD, &sc->rx_mem, 0, + 2, "RxMem", CTLFLAG_RD, &sc->rx_mem, 0, "Memory set aside for receiving packets"); - SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - 3, "Mem", CTLTYPE_STRING | CTLFLAG_RD, &sc->mem_size, 0, + 3, "Mem", CTLFLAG_RD, &sc->mem_size, 0, "Total Card Memory"); if (bootverbose) { if (sc->type_str && (*sc->type_str != 0)) Modified: head/sys/dev/iscsi/initiator/iscsi.c ============================================================================== --- head/sys/dev/iscsi/initiator/iscsi.c Wed Jan 12 19:53:50 2011 (r217322) +++ head/sys/dev/iscsi/initiator/iscsi.c Wed Jan 12 19:53:56 2011 (r217323) @@ -229,12 +229,9 @@ iscsi_ioctl(struct cdev *dev, u_long cmd error = sp->soc == NULL? ENOTCONN: i_fullfeature(dev, 1); if(error == 0) { sp->proc = td->td_proc; - SYSCTL_ADD_UINT(&sp->clist, - SYSCTL_CHILDREN(sp->oid), - OID_AUTO, - "pid", - CTLFLAG_RD, - &sp->proc->p_pid, sizeof(pid_t), "control process id"); + SYSCTL_ADD_INT(&sp->clist, SYSCTL_CHILDREN(sp->oid), + OID_AUTO, "pid", CTLFLAG_RD, + &sp->proc->p_pid, sizeof(pid_t), "control process id"); } break; Modified: head/sys/dev/iwi/if_iwi.c ============================================================================== --- head/sys/dev/iwi/if_iwi.c Wed Jan 12 19:53:50 2011 (r217322) +++ head/sys/dev/iwi/if_iwi.c Wed Jan 12 19:53:56 2011 (r217323) @@ -3515,14 +3515,14 @@ iwi_ledattach(struct iwi_softc *sc) SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "softled", CTLTYPE_INT | CTLFLAG_RW, sc, 0, iwi_sysctl_softled, "I", "enable/disable software LED support"); - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "ledpin", CTLFLAG_RW, &sc->sc_ledpin, 0, "pin setting to turn activity LED on"); - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "ledidle", CTLFLAG_RW, &sc->sc_ledidle, 0, "idle time for inactivity LED (ticks)"); /* XXX for debugging */ - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "nictype", CTLFLAG_RD, &sc->sc_nictype, 0, "NIC type from EEPROM"); Modified: head/sys/dev/mps/mps.c ============================================================================== --- head/sys/dev/mps/mps.c Wed Jan 12 19:53:50 2011 (r217322) +++ head/sys/dev/mps/mps.c Wed Jan 12 19:53:56 2011 (r217323) @@ -846,11 +846,11 @@ mps_attach(struct mps_softc *sc) if (sc->sysctl_tree == NULL) return (ENOMEM); - SYSCTL_ADD_INT(&sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), + SYSCTL_ADD_UINT(&sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, "debug_level", CTLFLAG_RW, &sc->mps_debug, 0, "mps debug level"); - SYSCTL_ADD_INT(&sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), + SYSCTL_ADD_UINT(&sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, "allow_multiple_tm_cmds", CTLFLAG_RW, &sc->allow_multiple_tm_cmds, 0, "allow multiple simultaneous task management cmds"); Modified: head/sys/dev/mpt/mpt.c ============================================================================== --- head/sys/dev/mpt/mpt.c Wed Jan 12 19:53:50 2011 (r217322) +++ head/sys/dev/mpt/mpt.c Wed Jan 12 19:53:56 2011 (r217323) @@ -2126,10 +2126,10 @@ mpt_sysctl_attach(struct mpt_softc *mpt) struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(mpt->dev); struct sysctl_oid *tree = device_get_sysctl_tree(mpt->dev); - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "debug", CTLFLAG_RW, &mpt->verbose, 0, "Debugging/Verbose level"); - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "role", CTLFLAG_RD, &mpt->role, 0, "HBA role"); #ifdef MPT_TEST_MULTIPATH Modified: head/sys/dev/mpt/mpt_raid.c ============================================================================== --- head/sys/dev/mpt/mpt_raid.c Wed Jan 12 19:53:50 2011 (r217322) +++ head/sys/dev/mpt/mpt_raid.c Wed Jan 12 19:53:56 2011 (r217323) @@ -1824,7 +1824,7 @@ mpt_raid_sysctl_attach(struct mpt_softc "vol_resync_rate", CTLTYPE_INT | CTLFLAG_RW, mpt, 0, mpt_raid_sysctl_vol_resync_rate, "I", "volume resync priority (0 == NC, 1 - 255)"); - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "nonoptimal_volumes", CTLFLAG_RD, &mpt->raid_nonopt_volumes, 0, "number of nonoptimal volumes"); Modified: head/sys/dev/nfe/if_nfe.c ============================================================================== --- head/sys/dev/nfe/if_nfe.c Wed Jan 12 19:53:50 2011 (r217322) +++ head/sys/dev/nfe/if_nfe.c Wed Jan 12 19:53:56 2011 (r217323) @@ -3075,7 +3075,7 @@ sysctl_hw_nfe_proc_limit(SYSCTL_HANDLER_ #define NFE_SYSCTL_STAT_ADD32(c, h, n, p, d) \ SYSCTL_ADD_UINT(c, h, OID_AUTO, n, CTLFLAG_RD, p, 0, d) #define NFE_SYSCTL_STAT_ADD64(c, h, n, p, d) \ - SYSCTL_ADD_QUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d) + SYSCTL_ADD_UQUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d) static void nfe_sysctl_node(struct nfe_softc *sc) Modified: head/sys/dev/pccbb/pccbb.c ============================================================================== --- head/sys/dev/pccbb/pccbb.c Wed Jan 12 19:53:50 2011 (r217322) +++ head/sys/dev/pccbb/pccbb.c Wed Jan 12 19:53:56 2011 (r217323) @@ -152,7 +152,7 @@ SYSCTL_ULONG(_hw_cbb, OID_AUTO, start_32 int cbb_debug = 0; TUNABLE_INT("hw.cbb.debug", &cbb_debug); -SYSCTL_ULONG(_hw_cbb, OID_AUTO, debug, CTLFLAG_RW, &cbb_debug, 0, +SYSCTL_INT(_hw_cbb, OID_AUTO, debug, CTLFLAG_RW, &cbb_debug, 0, "Verbose cardbus bridge debugging"); static void cbb_insert(struct cbb_softc *sc); Modified: head/sys/dev/sound/pcm/sound.c ============================================================================== --- head/sys/dev/sound/pcm/sound.c Wed Jan 12 19:53:50 2011 (r217322) +++ head/sys/dev/sound/pcm/sound.c Wed Jan 12 19:53:56 2011 (r217323) @@ -1068,7 +1068,7 @@ pcm_register(device_t dev, void *devinfo CTLFLAG_RD, 0, "record channels node"); /* XXX: an user should be able to set this with a control tool, the sysadmin then needs min+max sysctls for this */ - SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "buffersize", CTLFLAG_RD, &d->bufsz, 0, "allocated buffer size"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), Modified: head/sys/dev/ste/if_ste.c ============================================================================== --- head/sys/dev/ste/if_ste.c Wed Jan 12 19:53:50 2011 (r217322) +++ head/sys/dev/ste/if_ste.c Wed Jan 12 19:53:56 2011 (r217323) @@ -2180,7 +2180,7 @@ ste_resume(device_t dev) #define STE_SYSCTL_STAT_ADD32(c, h, n, p, d) \ SYSCTL_ADD_UINT(c, h, OID_AUTO, n, CTLFLAG_RD, p, 0, d) #define STE_SYSCTL_STAT_ADD64(c, h, n, p, d) \ - SYSCTL_ADD_QUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d) + SYSCTL_ADD_UQUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d) static void ste_sysctl_node(struct ste_softc *sc) Modified: head/sys/dev/txp/if_txp.c ============================================================================== --- head/sys/dev/txp/if_txp.c Wed Jan 12 19:53:50 2011 (r217322) +++ head/sys/dev/txp/if_txp.c Wed Jan 12 19:53:56 2011 (r217323) @@ -2859,7 +2859,10 @@ txp_stats_update(struct txp_softc *sc, s #define TXP_SYSCTL_STAT_ADD32(c, h, n, p, d) \ SYSCTL_ADD_UINT(c, h, OID_AUTO, n, CTLFLAG_RD, p, 0, d) -#if __FreeBSD_version > 800000 +#if __FreeBSD_version >= 900030 +#define TXP_SYSCTL_STAT_ADD64(c, h, n, p, d) \ + SYSCTL_ADD_UQUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d) +#elif __FreeBSD_version > 800000 #define TXP_SYSCTL_STAT_ADD64(c, h, n, p, d) \ SYSCTL_ADD_QUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d) #else Modified: head/sys/dev/usb/input/atp.c ============================================================================== --- head/sys/dev/usb/input/atp.c Wed Jan 12 19:53:50 2011 (r217322) +++ head/sys/dev/usb/input/atp.c Wed Jan 12 19:53:56 2011 (r217323) @@ -129,11 +129,11 @@ SYSCTL_INT(_hw_usb_atp, OID_AUTO, debug, #endif /* USB_DEBUG */ static u_int atp_touch_timeout = ATP_TOUCH_TIMEOUT; -SYSCTL_INT(_hw_usb_atp, OID_AUTO, touch_timeout, CTLFLAG_RW, &atp_touch_timeout, - 125000, "age threshold (in micros) for a touch"); +SYSCTL_UINT(_hw_usb_atp, OID_AUTO, touch_timeout, CTLFLAG_RW, + &atp_touch_timeout, 125000, "age threshold (in micros) for a touch"); static u_int atp_double_tap_threshold = ATP_DOUBLE_TAP_N_DRAG_THRESHOLD; -SYSCTL_INT(_hw_usb_atp, OID_AUTO, double_tap_threshold, CTLFLAG_RW, +SYSCTL_UINT(_hw_usb_atp, OID_AUTO, double_tap_threshold, CTLFLAG_RW, &atp_double_tap_threshold, ATP_DOUBLE_TAP_N_DRAG_THRESHOLD, "maximum time (in micros) between a double-tap"); From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 19:54:07 2011 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 B081A1065765; Wed, 12 Jan 2011 19:54:07 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 944EC8FC14; Wed, 12 Jan 2011 19:54: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 p0CJs7ZG005219; Wed, 12 Jan 2011 19:54:07 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CJs7hJ005216; Wed, 12 Jan 2011 19:54:07 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201101121954.p0CJs7hJ005216@svn.freebsd.org> From: Matthew D Fleming Date: Wed, 12 Jan 2011 19:54: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: r217324 - head/sys/geom/sched 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, 12 Jan 2011 19:54:07 -0000 Author: mdf Date: Wed Jan 12 19:54:07 2011 New Revision: 217324 URL: http://svn.freebsd.org/changeset/base/217324 Log: sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly. Commit the geom piece. Modified: head/sys/geom/sched/g_sched.c head/sys/geom/sched/gs_rr.c Modified: head/sys/geom/sched/g_sched.c ============================================================================== --- head/sys/geom/sched/g_sched.c Wed Jan 12 19:53:56 2011 (r217323) +++ head/sys/geom/sched/g_sched.c Wed Jan 12 19:54:07 2011 (r217324) @@ -189,10 +189,10 @@ SYSCTL_DECL(_kern_geom); SYSCTL_NODE(_kern_geom, OID_AUTO, sched, CTLFLAG_RW, 0, "GEOM_SCHED stuff"); -SYSCTL_INT(_kern_geom_sched, OID_AUTO, in_flight_wb, CTLFLAG_RD, +SYSCTL_UINT(_kern_geom_sched, OID_AUTO, in_flight_wb, CTLFLAG_RD, &me.gs_write_bytes_in_flight, 0, "Write bytes in flight"); -SYSCTL_INT(_kern_geom_sched, OID_AUTO, in_flight_b, CTLFLAG_RD, +SYSCTL_UINT(_kern_geom_sched, OID_AUTO, in_flight_b, CTLFLAG_RD, &me.gs_bytes_in_flight, 0, "Bytes in flight"); SYSCTL_UINT(_kern_geom_sched, OID_AUTO, in_flight_w, CTLFLAG_RD, Modified: head/sys/geom/sched/gs_rr.c ============================================================================== --- head/sys/geom/sched/gs_rr.c Wed Jan 12 19:53:56 2011 (r217323) +++ head/sys/geom/sched/gs_rr.c Wed Jan 12 19:54:07 2011 (r217324) @@ -198,25 +198,25 @@ struct g_rr_params *gs_rr_me = &me; SYSCTL_DECL(_kern_geom_sched); SYSCTL_NODE(_kern_geom_sched, OID_AUTO, rr, CTLFLAG_RW, 0, "GEOM_SCHED ROUND ROBIN stuff"); -SYSCTL_UINT(_kern_geom_sched_rr, OID_AUTO, units, CTLFLAG_RD, +SYSCTL_INT(_kern_geom_sched_rr, OID_AUTO, units, CTLFLAG_RD, &me.units, 0, "Scheduler instances"); -SYSCTL_UINT(_kern_geom_sched_rr, OID_AUTO, queues, CTLFLAG_RD, +SYSCTL_INT(_kern_geom_sched_rr, OID_AUTO, queues, CTLFLAG_RD, &me.queues, 0, "Total rr queues"); -SYSCTL_UINT(_kern_geom_sched_rr, OID_AUTO, wait_ms, CTLFLAG_RW, +SYSCTL_INT(_kern_geom_sched_rr, OID_AUTO, wait_ms, CTLFLAG_RW, &me.wait_ms.x_cur, 0, "Wait time milliseconds"); -SYSCTL_UINT(_kern_geom_sched_rr, OID_AUTO, quantum_ms, CTLFLAG_RW, +SYSCTL_INT(_kern_geom_sched_rr, OID_AUTO, quantum_ms, CTLFLAG_RW, &me.quantum_ms.x_cur, 0, "Quantum size milliseconds"); -SYSCTL_UINT(_kern_geom_sched_rr, OID_AUTO, bypass, CTLFLAG_RW, +SYSCTL_INT(_kern_geom_sched_rr, OID_AUTO, bypass, CTLFLAG_RW, &me.bypass, 0, "Bypass scheduler"); -SYSCTL_UINT(_kern_geom_sched_rr, OID_AUTO, w_anticipate, CTLFLAG_RW, +SYSCTL_INT(_kern_geom_sched_rr, OID_AUTO, w_anticipate, CTLFLAG_RW, &me.w_anticipate, 0, "Do anticipation on writes"); -SYSCTL_UINT(_kern_geom_sched_rr, OID_AUTO, quantum_kb, CTLFLAG_RW, +SYSCTL_INT(_kern_geom_sched_rr, OID_AUTO, quantum_kb, CTLFLAG_RW, &me.quantum_kb.x_cur, 0, "Quantum size Kbytes"); -SYSCTL_UINT(_kern_geom_sched_rr, OID_AUTO, queue_depth, CTLFLAG_RW, +SYSCTL_INT(_kern_geom_sched_rr, OID_AUTO, queue_depth, CTLFLAG_RW, &me.queue_depth.x_cur, 0, "Maximum simultaneous requests"); -SYSCTL_UINT(_kern_geom_sched_rr, OID_AUTO, wait_hit, CTLFLAG_RW, +SYSCTL_INT(_kern_geom_sched_rr, OID_AUTO, wait_hit, CTLFLAG_RW, &me.wait_hit, 0, "Hits in anticipation"); -SYSCTL_UINT(_kern_geom_sched_rr, OID_AUTO, wait_miss, CTLFLAG_RW, +SYSCTL_INT(_kern_geom_sched_rr, OID_AUTO, wait_miss, CTLFLAG_RW, &me.wait_miss, 0, "Misses in anticipation"); #ifdef DEBUG_QUEUES From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 19:54:14 2011 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 CEE5D106592C; Wed, 12 Jan 2011 19:54:14 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BDED68FC1E; Wed, 12 Jan 2011 19:54: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 p0CJsELH005272; Wed, 12 Jan 2011 19:54:14 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CJsExi005269; Wed, 12 Jan 2011 19:54:14 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201101121954.p0CJsExi005269@svn.freebsd.org> From: Matthew D Fleming Date: Wed, 12 Jan 2011 19:54: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: r217325 - in head/sys/security: mac mac_seeotheruids 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, 12 Jan 2011 19:54:14 -0000 Author: mdf Date: Wed Jan 12 19:54:14 2011 New Revision: 217325 URL: http://svn.freebsd.org/changeset/base/217325 Log: sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly. Commit the security directory. Modified: head/sys/security/mac/mac_framework.c head/sys/security/mac_seeotheruids/mac_seeotheruids.c Modified: head/sys/security/mac/mac_framework.c ============================================================================== --- head/sys/security/mac/mac_framework.c Wed Jan 12 19:54:07 2011 (r217324) +++ head/sys/security/mac/mac_framework.c Wed Jan 12 19:54:14 2011 (r217325) @@ -151,7 +151,7 @@ static int mac_late = 0; * for an object type at run-time. */ uint64_t mac_labeled; -SYSCTL_QUAD(_security_mac, OID_AUTO, labeled, CTLFLAG_RD, &mac_labeled, 0, +SYSCTL_UQUAD(_security_mac, OID_AUTO, labeled, CTLFLAG_RD, &mac_labeled, 0, "Mask of object types being labeled"); MALLOC_DEFINE(M_MACTEMP, "mactemp", "MAC temporary label storage"); Modified: head/sys/security/mac_seeotheruids/mac_seeotheruids.c ============================================================================== --- head/sys/security/mac_seeotheruids/mac_seeotheruids.c Wed Jan 12 19:54:07 2011 (r217324) +++ head/sys/security/mac_seeotheruids/mac_seeotheruids.c Wed Jan 12 19:54:14 2011 (r217325) @@ -98,7 +98,7 @@ SYSCTL_INT(_security_mac_seeotheruids, O "with a specific gid as their real primary group id or group set"); static gid_t specificgid = 0; -SYSCTL_INT(_security_mac_seeotheruids, OID_AUTO, specificgid, CTLFLAG_RW, +SYSCTL_UINT(_security_mac_seeotheruids, OID_AUTO, specificgid, CTLFLAG_RW, &specificgid, 0, "Specific gid to be exempt from seeotheruids policy"); static int From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 19:54:20 2011 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 3D0171065D13; Wed, 12 Jan 2011 19:54:20 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A20B8FC1A; Wed, 12 Jan 2011 19:54: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 p0CJsKAp005333; Wed, 12 Jan 2011 19:54:20 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CJsJ55005319; Wed, 12 Jan 2011 19:54:19 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201101121954.p0CJsJ55005319@svn.freebsd.org> From: Matthew D Fleming Date: Wed, 12 Jan 2011 19:54: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: r217326 - in head/sys: amd64/acpica ddb kern nlm rpc ufs/ffs x86/x86 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, 12 Jan 2011 19:54:20 -0000 Author: mdf Date: Wed Jan 12 19:54:19 2011 New Revision: 217326 URL: http://svn.freebsd.org/changeset/base/217326 Log: sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly. Commit the kernel changes. Modified: head/sys/amd64/acpica/acpi_machdep.c head/sys/ddb/db_capture.c head/sys/kern/kern_clocksource.c head/sys/kern/kern_et.c head/sys/kern/kern_mib.c head/sys/kern/kern_sx.c head/sys/kern/subr_kobj.c head/sys/kern/subr_smp.c head/sys/kern/vfs_subr.c head/sys/nlm/nlm_prot_impl.c head/sys/rpc/svc.c head/sys/ufs/ffs/ffs_softdep.c head/sys/x86/x86/busdma_machdep.c Modified: head/sys/amd64/acpica/acpi_machdep.c ============================================================================== --- head/sys/amd64/acpica/acpi_machdep.c Wed Jan 12 19:54:14 2011 (r217325) +++ head/sys/amd64/acpica/acpi_machdep.c Wed Jan 12 19:54:19 2011 (r217326) @@ -68,7 +68,7 @@ acpi_machdep_init(device_t dev) if (intr_model != ACPI_INTR_PIC) acpi_SetIntrModel(intr_model); - SYSCTL_ADD_UINT(&sc->acpi_sysctl_ctx, + SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "reset_video", CTLFLAG_RW, &acpi_reset_video, 0, "Call the VESA reset BIOS vector on the resume path"); Modified: head/sys/ddb/db_capture.c ============================================================================== --- head/sys/ddb/db_capture.c Wed Jan 12 19:54:14 2011 (r217325) +++ head/sys/ddb/db_capture.c Wed Jan 12 19:54:19 2011 (r217326) @@ -90,7 +90,7 @@ SYSCTL_UINT(_debug_ddb_capture, OID_AUTO &db_capture_maxbufsize, 0, "Maximum value for debug.ddb.capture.bufsize"); -SYSCTL_UINT(_debug_ddb_capture, OID_AUTO, inprogress, CTLFLAG_RD, +SYSCTL_INT(_debug_ddb_capture, OID_AUTO, inprogress, CTLFLAG_RD, &db_capture_inprogress, 0, "DDB output capture in progress"); /* Modified: head/sys/kern/kern_clocksource.c ============================================================================== --- head/sys/kern/kern_clocksource.c Wed Jan 12 19:54:14 2011 (r217325) +++ head/sys/kern/kern_clocksource.c Wed Jan 12 19:54:19 2011 (r217326) @@ -114,7 +114,7 @@ SYSCTL_INT(_kern_eventtimer, OID_AUTO, s static u_int idletick = 0; /* Idle mode allowed. */ TUNABLE_INT("kern.eventtimer.idletick", &idletick); -SYSCTL_INT(_kern_eventtimer, OID_AUTO, idletick, CTLFLAG_RW, &idletick, +SYSCTL_UINT(_kern_eventtimer, OID_AUTO, idletick, CTLFLAG_RW, &idletick, 0, "Run periodic events when idle"); static int periodic = 0; /* Periodic or one-shot mode. */ Modified: head/sys/kern/kern_et.c ============================================================================== --- head/sys/kern/kern_et.c Wed Jan 12 19:54:14 2011 (r217325) +++ head/sys/kern/kern_et.c Wed Jan 12 19:54:19 2011 (r217326) @@ -65,10 +65,10 @@ et_register(struct eventtimer *et) et->et_sysctl = SYSCTL_ADD_NODE(NULL, SYSCTL_STATIC_CHILDREN(_kern_eventtimer_et), OID_AUTO, et->et_name, CTLFLAG_RW, 0, "event timer description"); - SYSCTL_ADD_UINT(NULL, SYSCTL_CHILDREN(et->et_sysctl), OID_AUTO, + SYSCTL_ADD_INT(NULL, SYSCTL_CHILDREN(et->et_sysctl), OID_AUTO, "flags", CTLFLAG_RD, &(et->et_flags), 0, "Event timer capabilities"); - SYSCTL_ADD_QUAD(NULL, SYSCTL_CHILDREN(et->et_sysctl), OID_AUTO, + SYSCTL_ADD_UQUAD(NULL, SYSCTL_CHILDREN(et->et_sysctl), OID_AUTO, "frequency", CTLFLAG_RD, &(et->et_frequency), "Event timer base frequency"); SYSCTL_ADD_INT(NULL, SYSCTL_CHILDREN(et->et_sysctl), OID_AUTO, Modified: head/sys/kern/kern_mib.c ============================================================================== --- head/sys/kern/kern_mib.c Wed Jan 12 19:54:14 2011 (r217325) +++ head/sys/kern/kern_mib.c Wed Jan 12 19:54:19 2011 (r217326) @@ -203,7 +203,7 @@ sysctl_hw_usermem(SYSCTL_HANDLER_ARGS) SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_ULONG | CTLFLAG_RD, 0, 0, sysctl_hw_usermem, "LU", ""); -SYSCTL_ULONG(_hw, OID_AUTO, availpages, CTLFLAG_RD, &physmem, 0, ""); +SYSCTL_LONG(_hw, OID_AUTO, availpages, CTLFLAG_RD, &physmem, 0, ""); u_long pagesizes[MAXPAGESIZES] = { PAGE_SIZE }; Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Wed Jan 12 19:54:14 2011 (r217325) +++ head/sys/kern/kern_sx.c Wed Jan 12 19:54:19 2011 (r217326) @@ -137,8 +137,8 @@ struct lock_class lock_class_sx = { static u_int asx_retries = 10; static u_int asx_loops = 10000; SYSCTL_NODE(_debug, OID_AUTO, sx, CTLFLAG_RD, NULL, "sxlock debugging"); -SYSCTL_INT(_debug_sx, OID_AUTO, retries, CTLFLAG_RW, &asx_retries, 0, ""); -SYSCTL_INT(_debug_sx, OID_AUTO, loops, CTLFLAG_RW, &asx_loops, 0, ""); +SYSCTL_UINT(_debug_sx, OID_AUTO, retries, CTLFLAG_RW, &asx_retries, 0, ""); +SYSCTL_UINT(_debug_sx, OID_AUTO, loops, CTLFLAG_RW, &asx_loops, 0, ""); #endif void Modified: head/sys/kern/subr_kobj.c ============================================================================== --- head/sys/kern/subr_kobj.c Wed Jan 12 19:54:14 2011 (r217325) +++ head/sys/kern/subr_kobj.c Wed Jan 12 19:54:19 2011 (r217326) @@ -73,7 +73,7 @@ static int kobj_next_id = 1; #define KOBJ_UNLOCK() if (kobj_mutex_inited) mtx_unlock(&kobj_mtx); #define KOBJ_ASSERT(what) if (kobj_mutex_inited) mtx_assert(&kobj_mtx,what); -SYSCTL_UINT(_kern, OID_AUTO, kobj_methodcount, CTLFLAG_RD, +SYSCTL_INT(_kern, OID_AUTO, kobj_methodcount, CTLFLAG_RD, &kobj_next_id, 0, ""); static void Modified: head/sys/kern/subr_smp.c ============================================================================== --- head/sys/kern/subr_smp.c Wed Jan 12 19:54:14 2011 (r217325) +++ head/sys/kern/subr_smp.c Wed Jan 12 19:54:19 2011 (r217326) @@ -73,7 +73,7 @@ u_int mp_maxid; SYSCTL_NODE(_kern, OID_AUTO, smp, CTLFLAG_RD, NULL, "Kernel SMP"); -SYSCTL_INT(_kern_smp, OID_AUTO, maxid, CTLFLAG_RD, &mp_maxid, 0, +SYSCTL_UINT(_kern_smp, OID_AUTO, maxid, CTLFLAG_RD, &mp_maxid, 0, "Max CPU ID."); SYSCTL_INT(_kern_smp, OID_AUTO, maxcpus, CTLFLAG_RD, &mp_maxcpus, 0, Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Wed Jan 12 19:54:14 2011 (r217325) +++ head/sys/kern/vfs_subr.c Wed Jan 12 19:54:19 2011 (r217326) @@ -122,7 +122,7 @@ static void destroy_vpollinfo(struct vpo */ static unsigned long numvnodes; -SYSCTL_LONG(_vfs, OID_AUTO, numvnodes, CTLFLAG_RD, &numvnodes, 0, +SYSCTL_ULONG(_vfs, OID_AUTO, numvnodes, CTLFLAG_RD, &numvnodes, 0, "Number of vnodes in existence"); /* @@ -149,10 +149,10 @@ static TAILQ_HEAD(freelst, vnode) vnode_ * should be kept to avoid recreation costs. */ static u_long wantfreevnodes; -SYSCTL_LONG(_vfs, OID_AUTO, wantfreevnodes, CTLFLAG_RW, &wantfreevnodes, 0, ""); +SYSCTL_ULONG(_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_ULONG(_vfs, OID_AUTO, freevnodes, CTLFLAG_RD, &freevnodes, 0, "Number of vnodes in the free list"); static int vlru_allow_cache_src; @@ -270,7 +270,7 @@ static enum { SYNCER_RUNNING, SYNCER_SHU int desiredvnodes; SYSCTL_INT(_kern, KERN_MAXVNODES, maxvnodes, CTLFLAG_RW, &desiredvnodes, 0, "Maximum number of vnodes"); -SYSCTL_INT(_kern, OID_AUTO, minvnodes, CTLFLAG_RW, +SYSCTL_ULONG(_kern, OID_AUTO, minvnodes, CTLFLAG_RW, &wantfreevnodes, 0, "Minimum number of vnodes (legacy)"); static int vnlru_nowhere; SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhere, CTLFLAG_RW, Modified: head/sys/nlm/nlm_prot_impl.c ============================================================================== --- head/sys/nlm/nlm_prot_impl.c Wed Jan 12 19:54:14 2011 (r217325) +++ head/sys/nlm/nlm_prot_impl.c Wed Jan 12 19:54:19 2011 (r217326) @@ -862,9 +862,9 @@ nlm_create_host(const char* caller_name) OID_AUTO, host->nh_sysid_string, CTLFLAG_RD, NULL, ""); SYSCTL_ADD_STRING(&host->nh_sysctl, SYSCTL_CHILDREN(oid), OID_AUTO, "hostname", CTLFLAG_RD, host->nh_caller_name, 0, ""); - SYSCTL_ADD_INT(&host->nh_sysctl, SYSCTL_CHILDREN(oid), OID_AUTO, + SYSCTL_ADD_UINT(&host->nh_sysctl, SYSCTL_CHILDREN(oid), OID_AUTO, "version", CTLFLAG_RD, &host->nh_vers, 0, ""); - SYSCTL_ADD_INT(&host->nh_sysctl, SYSCTL_CHILDREN(oid), OID_AUTO, + SYSCTL_ADD_UINT(&host->nh_sysctl, SYSCTL_CHILDREN(oid), OID_AUTO, "monitored", CTLFLAG_RD, &host->nh_monstate, 0, ""); SYSCTL_ADD_PROC(&host->nh_sysctl, SYSCTL_CHILDREN(oid), OID_AUTO, "lock_count", CTLTYPE_INT | CTLFLAG_RD, host, 0, Modified: head/sys/rpc/svc.c ============================================================================== --- head/sys/rpc/svc.c Wed Jan 12 19:54:14 2011 (r217325) +++ head/sys/rpc/svc.c Wed Jan 12 19:54:19 2011 (r217326) @@ -138,12 +138,12 @@ svcpool_create(const char *name, struct &pool->sp_space_low, 0, "Low water mark for request space."); - SYSCTL_ADD_UINT(&pool->sp_sysctl, sysctl_base, OID_AUTO, + SYSCTL_ADD_INT(&pool->sp_sysctl, sysctl_base, OID_AUTO, "request_space_throttled", CTLFLAG_RD, &pool->sp_space_throttled, 0, "Whether nfs requests are currently throttled"); - SYSCTL_ADD_UINT(&pool->sp_sysctl, sysctl_base, OID_AUTO, + SYSCTL_ADD_INT(&pool->sp_sysctl, sysctl_base, OID_AUTO, "request_space_throttle_count", CTLFLAG_RD, &pool->sp_space_throttle_count, 0, "Count of times throttling based on request space has occurred"); Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Wed Jan 12 19:54:14 2011 (r217325) +++ head/sys/ufs/ffs/ffs_softdep.c Wed Jan 12 19:54:19 2011 (r217326) @@ -622,9 +622,9 @@ SYSCTL_NODE(_debug_softdep, OID_AUTO, cu #define SOFTDEP_TYPE(type, str, long) \ static MALLOC_DEFINE(M_ ## type, #str, long); \ - SYSCTL_LONG(_debug_softdep_total, OID_AUTO, str, CTLFLAG_RD, \ + SYSCTL_ULONG(_debug_softdep_total, OID_AUTO, str, CTLFLAG_RD, \ &dep_total[D_ ## type], 0, ""); \ - SYSCTL_LONG(_debug_softdep_current, OID_AUTO, str, CTLFLAG_RD, \ + SYSCTL_ULONG(_debug_softdep_current, OID_AUTO, str, CTLFLAG_RD, \ &dep_current[D_ ## type], 0, ""); SOFTDEP_TYPE(PAGEDEP, pagedep, "File page dependencies"); Modified: head/sys/x86/x86/busdma_machdep.c ============================================================================== --- head/sys/x86/x86/busdma_machdep.c Wed Jan 12 19:54:14 2011 (r217325) +++ head/sys/x86/x86/busdma_machdep.c Wed Jan 12 19:54:19 2011 (r217326) @@ -1060,9 +1060,9 @@ alloc_bounce_zone(bus_dma_tag_t dmat) SYSCTL_ADD_STRING(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "lowaddr", CTLFLAG_RD, bz->lowaddrid, 0, ""); - SYSCTL_ADD_INT(busdma_sysctl_tree(bz), + SYSCTL_ADD_UQUAD(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, - "alignment", CTLFLAG_RD, &bz->alignment, 0, ""); + "alignment", CTLFLAG_RD, &bz->alignment, ""); return (0); } From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 20:12:48 2011 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 83FC6106564A; Wed, 12 Jan 2011 20:12:48 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from mail.icecube.wisc.edu (trout.icecube.wisc.edu [128.104.255.119]) by mx1.freebsd.org (Postfix) with ESMTP id 54F318FC13; Wed, 12 Jan 2011 20:12:48 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.icecube.wisc.edu (Postfix) with ESMTP id A9ABE58134; Wed, 12 Jan 2011 14:12:47 -0600 (CST) X-Virus-Scanned: amavisd-new at icecube.wisc.edu Received: from mail.icecube.wisc.edu ([127.0.0.1]) by localhost (trout.icecube.wisc.edu [127.0.0.1]) (amavisd-new, port 10030) with ESMTP id jtAEFuarfZDN; Wed, 12 Jan 2011 14:12:47 -0600 (CST) Received: from wanderer.tachypleus.net (i3-dhcp-172-16-223-197.icecube.wisc.edu [172.16.223.197]) by mail.icecube.wisc.edu (Postfix) with ESMTP id 86E575811D; Wed, 12 Jan 2011 14:12:47 -0600 (CST) Message-ID: <4D2E0B3F.3010402@freebsd.org> Date: Wed, 12 Jan 2011 14:12:47 -0600 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.13) Gecko/20101227 Thunderbird/3.1.7 MIME-Version: 1.0 To: John Baldwin References: <201101121455.p0CEt3PD092660@svn.freebsd.org> <201101121133.34607.jhb@freebsd.org> In-Reply-To: <201101121133.34607.jhb@freebsd.org> Content-Type: text/plain; charset=UTF-8; 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: r217309 - in head: . contrib/dialog contrib/dialog/po contrib/dialog/samples contrib/dialog/samples/copifuncs contrib/dialog/samples/install gnu/lib gnu/lib/libdialog gnu/lib/libdialog/... 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, 12 Jan 2011 20:12:48 -0000 On 01/12/11 10:33, John Baldwin wrote: > On Wednesday, January 12, 2011 9:55:03 am Nathan Whitehorn wrote: >> Author: nwhitehorn >> Date: Wed Jan 12 14:55:02 2011 >> New Revision: 217309 >> URL: http://svn.freebsd.org/changeset/base/217309 >> >> Log: >> Update dialog to version 20100428. This changes the license under which >> dialog is distributed from GPLv2 to LGPLv2 and introduces a number of new >> features and a new and better libdialog API. The existing libdialog will >> be kept temporarily as libodialog for compatibility purposes until sade, >> sysinstall and tzsetup have been either updated or replaced. >> >> __FreeBSD_version is now 900030. > > Hmm, did you import this to the vendor area first or did you just add it > directly to contrib? I did it wrong, and put it directly into contrib. I'm not sure what is the best way to fix it. Here are the possibilities that I came up with: - Fix it when there's an update - Import it into vendor now for historical purposes - Import it into vendor and synthesize mergeinfo on contrib/dialog. -Nathan From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 20:27:14 2011 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 CD704106566C; Wed, 12 Jan 2011 20:27:14 +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 BCD758FC1C; Wed, 12 Jan 2011 20:27: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 p0CKRE2C008310; Wed, 12 Jan 2011 20:27:14 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CKRE0G008308; Wed, 12 Jan 2011 20:27:14 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201101122027.p0CKRE0G008308@svn.freebsd.org> From: Bruce Cran Date: Wed, 12 Jan 2011 20:27: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: r217327 - head/sbin/geom/class/raid3 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, 12 Jan 2011 20:27:14 -0000 Author: brucec Date: Wed Jan 12 20:27:14 2011 New Revision: 217327 URL: http://svn.freebsd.org/changeset/base/217327 Log: Fix sorting of cross-references. Modified: head/sbin/geom/class/raid3/graid3.8 Modified: head/sbin/geom/class/raid3/graid3.8 ============================================================================== --- head/sbin/geom/class/raid3/graid3.8 Wed Jan 12 19:54:19 2011 (r217326) +++ head/sbin/geom/class/raid3/graid3.8 Wed Jan 12 20:27:14 2011 (r217327) @@ -236,10 +236,10 @@ graid3 insert -n 0 data da5 .Sh SEE ALSO .Xr geom 4 , .Xr geom 8 , +.Xr gvinum 8, .Xr mount 8 , .Xr newfs 8 , .Xr umount 8 , -.Xr gvinum 8 .Sh HISTORY The .Nm From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 20:38:55 2011 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 687D91065673; Wed, 12 Jan 2011 20:38:55 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5847F8FC17; Wed, 12 Jan 2011 20:38: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 p0CKctnX009355; Wed, 12 Jan 2011 20:38:55 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CKctm7009352; Wed, 12 Jan 2011 20:38:55 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201101122038.p0CKctm7009352@svn.freebsd.org> From: Matthew D Fleming Date: Wed, 12 Jan 2011 20:38: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: r217328 - head/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: Wed, 12 Jan 2011 20:38:55 -0000 Author: mdf Date: Wed Jan 12 20:38:55 2011 New Revision: 217328 URL: http://svn.freebsd.org/changeset/base/217328 Log: Fix a typo. XLONG should allow pointers to unsigned and signed long. Submitted by: Modified: head/sys/sys/sysctl.h Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Wed Jan 12 20:27:14 2011 (r217327) +++ head/sys/sys/sysctl.h Wed Jan 12 20:38:55 2011 (r217328) @@ -242,7 +242,7 @@ SYSCTL_ALLOWED_TYPES(UINT, unsigned int SYSCTL_ALLOWED_TYPES(XINT, unsigned int *a; int *b; ); SYSCTL_ALLOWED_TYPES(LONG, long *a; ); SYSCTL_ALLOWED_TYPES(ULONG, unsigned long *a; ); -SYSCTL_ALLOWED_TYPES(XLONG, unsigned long *a; long b; ); +SYSCTL_ALLOWED_TYPES(XLONG, unsigned long *a; long *b; ); SYSCTL_ALLOWED_TYPES(INT64, int64_t *a; long long *b; ); SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a; unsigned long long *b; ); From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 20:52:14 2011 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 CA5101065679; Wed, 12 Jan 2011 20:52:14 +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 D21368FC0A; Wed, 12 Jan 2011 20:52:13 +0000 (UTC) Received: by wwf26 with SMTP id 26so990231wwf.31 for ; Wed, 12 Jan 2011 12:52:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=iKCDPtBZWd6JgkZZpoSGK3p5BP3MqQ8lgAaDvw5e2bQ=; b=NEaxF7eJJ/u5z6ywUD88lPnPnMoSxMVXqBySVYlcOvWjy9t5/SDkg8O8idoBMW9aJz 5AOQBfquY7fTPMpcxstV6IHfKBmNeMBo7mvJdBlRMBKTnPryjJzG6JGxQyNxgl/Zzwpr wj4yeLP61sfR2l42W7vynPg03tOajmgDud90s= 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=OXKNKSiTjOgqCn0iDssf52nrT80R4MR3nNDL8OIx7AXI23QtO+C1qV8qd5VcmF26aX fXhC6C7su8BEA0FTs/q0u42mFWCLNmwxT71vSCJkNkmpaWkvMWkfwg4TzepU5VLkXyIa tu0I4BuYj7vEBtdDGFvPAQ3GF6xQ8N5fk2lx0= MIME-Version: 1.0 Received: by 10.216.49.15 with SMTP id w15mr2578931web.1.1294865523160; Wed, 12 Jan 2011 12:52:03 -0800 (PST) Sender: yanegomi@gmail.com Received: by 10.216.254.226 with HTTP; Wed, 12 Jan 2011 12:52:03 -0800 (PST) In-Reply-To: <201101122027.p0CKRE0G008308@svn.freebsd.org> References: <201101122027.p0CKRE0G008308@svn.freebsd.org> Date: Wed, 12 Jan 2011 12:52:03 -0800 X-Google-Sender-Auth: G2K0mT0qHbrm164XlRaLAM53kk4 Message-ID: From: Garrett Cooper To: Bruce Cran 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: r217327 - head/sbin/geom/class/raid3 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, 12 Jan 2011 20:52:14 -0000 On Wed, Jan 12, 2011 at 12:27 PM, Bruce Cran wrote: > Author: brucec > Date: Wed Jan 12 20:27:14 2011 > New Revision: 217327 > URL: http://svn.freebsd.org/changeset/base/217327 > > Log: > =A0Fix sorting of cross-references. Thanks :). From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 21:08:50 2011 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 54A3E106564A; Wed, 12 Jan 2011 21:08:50 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4009F8FC0C; Wed, 12 Jan 2011 21:08: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 p0CL8oYl012040; Wed, 12 Jan 2011 21:08:50 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CL8o3Q012038; Wed, 12 Jan 2011 21:08:50 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201101122108.p0CL8o3Q012038@svn.freebsd.org> From: Matthew D Fleming Date: Wed, 12 Jan 2011 21:08: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: r217330 - head/sys/x86/x86 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, 12 Jan 2011 21:08:50 -0000 Author: mdf Date: Wed Jan 12 21:08:49 2011 New Revision: 217330 URL: http://svn.freebsd.org/changeset/base/217330 Log: Fix a brain fart. Since this file is shared between i386 and amd64, a bus_size_t may be 32 or 64 bits. Change the bounce_zone alignment field to explicitly be 32 bits, as I can't really imagine a DMA device that needs anything close to 2GB alignment of data. Modified: head/sys/x86/x86/busdma_machdep.c Modified: head/sys/x86/x86/busdma_machdep.c ============================================================================== --- head/sys/x86/x86/busdma_machdep.c Wed Jan 12 20:44:11 2011 (r217329) +++ head/sys/x86/x86/busdma_machdep.c Wed Jan 12 21:08:49 2011 (r217330) @@ -100,7 +100,7 @@ struct bounce_zone { int total_bounced; int total_deferred; int map_count; - bus_size_t alignment; + uint32_t alignment; bus_addr_t lowaddr; char zoneid[8]; char lowaddrid[20]; @@ -1060,9 +1060,9 @@ alloc_bounce_zone(bus_dma_tag_t dmat) SYSCTL_ADD_STRING(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "lowaddr", CTLFLAG_RD, bz->lowaddrid, 0, ""); - SYSCTL_ADD_UQUAD(busdma_sysctl_tree(bz), + SYSCTL_ADD_UINT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, - "alignment", CTLFLAG_RD, &bz->alignment, ""); + "alignment", CTLFLAG_RD, &bz->alignment, 0, ""); return (0); } From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 21:21:37 2011 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 69467106566C; Wed, 12 Jan 2011 21:21:37 +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 390118FC0A; Wed, 12 Jan 2011 21:21:37 +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 9412446B3B; Wed, 12 Jan 2011 16:21:36 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 9A6BA8A009; Wed, 12 Jan 2011 16:21:35 -0500 (EST) From: John Baldwin To: Nathan Whitehorn Date: Wed, 12 Jan 2011 15:59:42 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.4-CBSD-20110107; KDE/4.4.5; amd64; ; ) References: <201101121455.p0CEt3PD092660@svn.freebsd.org> <201101121133.34607.jhb@freebsd.org> <4D2E0B3F.3010402@freebsd.org> In-Reply-To: <4D2E0B3F.3010402@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201101121559.42808.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Wed, 12 Jan 2011 16:21:35 -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: r217309 - in head: . contrib/dialog contrib/dialog/po contrib/dialog/samples contrib/dialog/samples/copifuncs contrib/dialog/samples/install gnu/lib gnu/lib/libdialog gnu/lib/libdialog/... 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, 12 Jan 2011 21:21:37 -0000 On Wednesday, January 12, 2011 3:12:47 pm Nathan Whitehorn wrote: > On 01/12/11 10:33, John Baldwin wrote: > > On Wednesday, January 12, 2011 9:55:03 am Nathan Whitehorn wrote: > >> Author: nwhitehorn > >> Date: Wed Jan 12 14:55:02 2011 > >> New Revision: 217309 > >> URL: http://svn.freebsd.org/changeset/base/217309 > >> > >> Log: > >> Update dialog to version 20100428. This changes the license under which > >> dialog is distributed from GPLv2 to LGPLv2 and introduces a number of new > >> features and a new and better libdialog API. The existing libdialog will > >> be kept temporarily as libodialog for compatibility purposes until sade, > >> sysinstall and tzsetup have been either updated or replaced. > >> > >> __FreeBSD_version is now 900030. > > > > Hmm, did you import this to the vendor area first or did you just add it > > directly to contrib? > > I did it wrong, and put it directly into contrib. I'm not sure what is > the best way to fix it. Here are the possibilities that I came up with: > - Fix it when there's an update > - Import it into vendor now for historical purposes > - Import it into vendor and synthesize mergeinfo on contrib/dialog. The last should be fine. Just doing a merge --record-only to bootstrap the mergeinfo should be sufficient. Likely you need to flatten the vendor tree (see the page on the wiki about subversion imports). -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 21:21:38 2011 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 3DBFA1065672; Wed, 12 Jan 2011 21:21:38 +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 117418FC12; Wed, 12 Jan 2011 21:21:38 +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 C0B8746B35; Wed, 12 Jan 2011 16:21:37 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E0D618A01D; Wed, 12 Jan 2011 16:21:36 -0500 (EST) From: John Baldwin To: Matthew D Fleming Date: Wed, 12 Jan 2011 16:21:30 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.4-CBSD-20110107; KDE/4.4.5; amd64; ; ) References: <201101122108.p0CL8o3Q012038@svn.freebsd.org> In-Reply-To: <201101122108.p0CL8o3Q012038@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201101121621.30371.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Wed, 12 Jan 2011 16:21:37 -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: r217330 - head/sys/x86/x86 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, 12 Jan 2011 21:21:38 -0000 On Wednesday, January 12, 2011 4:08:50 pm Matthew D Fleming wrote: > Author: mdf > Date: Wed Jan 12 21:08:49 2011 > New Revision: 217330 > URL: http://svn.freebsd.org/changeset/base/217330 > > Log: > Fix a brain fart. Since this file is shared between i386 and amd64, a > bus_size_t may be 32 or 64 bits. Change the bounce_zone alignment field > to explicitly be 32 bits, as I can't really imagine a DMA device that > needs anything close to 2GB alignment of data. Hmm, we do have devices with 4GB boundaries though. I think I'd prefer it if you instead if you did this: #if defined(amd64) || defined(PAE) #define SYSCTL_ADD_BUS_SIZE_T SYSCTL_ADD_UQUAD #else #define SYSCTL_ADD_BUS_SIZE_T SYSCTL_ADD_UINT #endif and then just used SYSCTL_ADD_BUS_SIZE_T() in the code so we could let the members in the bounce zone retain the same types passed to bus_dma_tag_create(). -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 21:27:42 2011 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 315B9106566B; Wed, 12 Jan 2011 21:27:42 +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 C29038FC1F; Wed, 12 Jan 2011 21:27:41 +0000 (UTC) Received: by iwn39 with SMTP id 39so919915iwn.13 for ; Wed, 12 Jan 2011 13:27:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=8yFq3920KIOpvAgNwyCDpznfMCjV1NkpeU3GDJIo1dU=; b=dcRyS5kLpGUGEexRtF87934Zmx3Yz+JsHEYZApnFJPclR5WhwCsm0y+QukuGkWZHN1 nxgalwlaH9DsR7dohJC/jx/hZckAfabQiZH5CqEzkwbTCYtqxmawLaZjX42Ed0L9a09q Ll2rZtiB7kvQjb+M0zJAtwBStBHf0or3SKXRM= 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=ojCC1LFvM/8WRwROuqAUXhDWmJbx0hlbVQ4c5vh9lNP+CGRgDmAlW8lSf0IeIffBpH SB5papJ2wtF49xldt1EhRgt7uEiZM8KIlv0gOvlKOJWIJmzcXbQnhj4EKecthrH3q5kL KsU5Yc443R3rYvuw3l08LdD1sbn0csVIu2y7A= MIME-Version: 1.0 Received: by 10.231.35.141 with SMTP id p13mr1600193ibd.79.1294867660893; Wed, 12 Jan 2011 13:27:40 -0800 (PST) Sender: mdf356@gmail.com Received: by 10.231.160.147 with HTTP; Wed, 12 Jan 2011 13:27:40 -0800 (PST) In-Reply-To: <201101121621.30371.jhb@freebsd.org> References: <201101122108.p0CL8o3Q012038@svn.freebsd.org> <201101121621.30371.jhb@freebsd.org> Date: Wed, 12 Jan 2011 13:27:40 -0800 X-Google-Sender-Auth: Fq2LgD6VFBd-Z-eiNR0IJFvj1Kw Message-ID: From: mdf@FreeBSD.org To: John Baldwin 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: r217330 - head/sys/x86/x86 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, 12 Jan 2011 21:27:42 -0000 On Wed, Jan 12, 2011 at 1:21 PM, John Baldwin wrote: > On Wednesday, January 12, 2011 4:08:50 pm Matthew D Fleming wrote: >> Author: mdf >> Date: Wed Jan 12 21:08:49 2011 >> New Revision: 217330 >> URL: http://svn.freebsd.org/changeset/base/217330 >> >> Log: >> =A0 Fix a brain fart. =A0Since this file is shared between i386 and amd6= 4, a >> =A0 bus_size_t may be 32 or 64 bits. =A0Change the bounce_zone alignment= field >> =A0 to explicitly be 32 bits, as I can't really imagine a DMA device tha= t >> =A0 needs anything close to 2GB alignment of data. > > Hmm, we do have devices with 4GB boundaries though. =A0I think I'd prefer= it if > you instead if you did this: > > #if defined(amd64) || defined(PAE) > #define SYSCTL_ADD_BUS_SIZE_T =A0 =A0 =A0 =A0 =A0 SYSCTL_ADD_UQUAD > #else > #define SYSCTL_ADD_BUS_SIZE_T =A0 =A0 =A0 =A0 =A0 SYSCTL_ADD_UINT > #endif > > and then just used SYSCTL_ADD_BUS_SIZE_T() in the code so we could let th= e > members in the bounce zone retain the same types passed to > bus_dma_tag_create(). But would there be a device that can't start DMA except on a 4GB boundary? I thought that's what this member was for. Thanks, matthew From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 21:55:37 2011 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 2EB7A1065670; Wed, 12 Jan 2011 21:55:37 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id B7FFC8FC13; Wed, 12 Jan 2011 21:55:34 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 6BFC845B36; Wed, 12 Jan 2011 22:55:32 +0100 (CET) Received: from localhost (89-73-192-49.dynamic.chello.pl [89.73.192.49]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 5EEC945683; Wed, 12 Jan 2011 22:55:27 +0100 (CET) Date: Wed, 12 Jan 2011 22:55:19 +0100 From: Pawel Jakub Dawidek To: Bruce Cran Message-ID: <20110112215519.GA1940@garage.freebsd.pl> References: <201101122027.p0CKRE0G008308@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tThc/1wpZn/ma/RB" Content-Disposition: inline In-Reply-To: <201101122027.p0CKRE0G008308@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=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r217327 - head/sbin/geom/class/raid3 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, 12 Jan 2011 21:55:37 -0000 --tThc/1wpZn/ma/RB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 12, 2011 at 08:27:14PM +0000, Bruce Cran wrote: > Author: brucec > Date: Wed Jan 12 20:27:14 2011 > New Revision: 217327 > URL: http://svn.freebsd.org/changeset/base/217327 >=20 > Log: > Fix sorting of cross-references. >=20 > Modified: > head/sbin/geom/class/raid3/graid3.8 >=20 > Modified: head/sbin/geom/class/raid3/graid3.8 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/sbin/geom/class/raid3/graid3.8 Wed Jan 12 19:54:19 2011 (r217326) > +++ head/sbin/geom/class/raid3/graid3.8 Wed Jan 12 20:27:14 2011 (r217327) > @@ -236,10 +236,10 @@ graid3 insert -n 0 data da5 > .Sh SEE ALSO > .Xr geom 4 , > .Xr geom 8 , > +.Xr gvinum 8, There is a space missing after 8. > .Xr mount 8 , > .Xr newfs 8 , > .Xr umount 8 , > -.Xr gvinum 8 Coma can now be removed after 'umount 8'. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --tThc/1wpZn/ma/RB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk0uI0cACgkQForvXbEpPzQgoACfX3+62kjaR/ABkqkmls6mNrGP Ru8AnibbgNvoj4ECnG+Jc1aNIdqfSNCl =HADN -----END PGP SIGNATURE----- --tThc/1wpZn/ma/RB-- From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 22:20:52 2011 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 1DB52106566C; Wed, 12 Jan 2011 22:20:52 +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 E3F438FC13; Wed, 12 Jan 2011 22:20:51 +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 470ED46B38; Wed, 12 Jan 2011 17:20:51 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 731F98A009; Wed, 12 Jan 2011 17:20:50 -0500 (EST) From: John Baldwin To: mdf@freebsd.org Date: Wed, 12 Jan 2011 17:06:28 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.4-CBSD-20110107; KDE/4.4.5; amd64; ; ) References: <201101122108.p0CL8o3Q012038@svn.freebsd.org> <201101121621.30371.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201101121706.28930.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Wed, 12 Jan 2011 17:20:50 -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: r217330 - head/sys/x86/x86 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, 12 Jan 2011 22:20:52 -0000 On Wednesday, January 12, 2011 4:27:40 pm mdf@freebsd.org wrote: > On Wed, Jan 12, 2011 at 1:21 PM, John Baldwin wrote: > > On Wednesday, January 12, 2011 4:08:50 pm Matthew D Fleming wrote: > >> Author: mdf > >> Date: Wed Jan 12 21:08:49 2011 > >> New Revision: 217330 > >> URL: http://svn.freebsd.org/changeset/base/217330 > >> > >> Log: > >> Fix a brain fart. Since this file is shared between i386 and amd64, a > >> bus_size_t may be 32 or 64 bits. Change the bounce_zone alignment field > >> to explicitly be 32 bits, as I can't really imagine a DMA device that > >> needs anything close to 2GB alignment of data. > > > > Hmm, we do have devices with 4GB boundaries though. I think I'd prefer it if > > you instead if you did this: > > > > #if defined(amd64) || defined(PAE) > > #define SYSCTL_ADD_BUS_SIZE_T SYSCTL_ADD_UQUAD > > #else > > #define SYSCTL_ADD_BUS_SIZE_T SYSCTL_ADD_UINT > > #endif > > > > and then just used SYSCTL_ADD_BUS_SIZE_T() in the code so we could let the > > members in the bounce zone retain the same types passed to > > bus_dma_tag_create(). > > But would there be a device that can't start DMA except on a 4GB > boundary? I thought that's what this member was for. Probably not today, but I'd still prefer the types to be the real types. :) If this wasn't in x86 I'd imagine we'd be leaving the types as the real types and that other platforms that use bounce zones probably use the real types here as well. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 22:24:07 2011 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 6228D1065766; Wed, 12 Jan 2011 22:24:07 +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 519B98FC13; Wed, 12 Jan 2011 22:24: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 p0CMO7Lw018911; Wed, 12 Jan 2011 22:24:07 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CMO7si018909; Wed, 12 Jan 2011 22:24:07 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201101122224.p0CMO7si018909@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 12 Jan 2011 22:24: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: r217331 - head/sys/dev/alc 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, 12 Jan 2011 22:24:07 -0000 Author: yongari Date: Wed Jan 12 22:24:07 2011 New Revision: 217331 URL: http://svn.freebsd.org/changeset/base/217331 Log: Make sure to invoke unlocked foo_start since the taskqueue does not hold a driver lock. This should fix a regression introduced in r216925. PR: kern/153769 Modified: head/sys/dev/alc/if_alc.c Modified: head/sys/dev/alc/if_alc.c ============================================================================== --- head/sys/dev/alc/if_alc.c Wed Jan 12 21:08:49 2011 (r217330) +++ head/sys/dev/alc/if_alc.c Wed Jan 12 22:24:07 2011 (r217331) @@ -2706,7 +2706,7 @@ alc_int_task(void *arg, int pending) } if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0 && !IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - alc_start_locked(ifp); + alc_start(ifp); } if (more == EAGAIN || From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 23:06:39 2011 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 055DD10656A6; Wed, 12 Jan 2011 23:06:39 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E720C8FC17; Wed, 12 Jan 2011 23:06: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 p0CN6c8x023156; Wed, 12 Jan 2011 23:06:38 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CN6clk023152; Wed, 12 Jan 2011 23:06:38 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201101122306.p0CN6clk023152@svn.freebsd.org> From: Matthew D Fleming Date: Wed, 12 Jan 2011 23:06: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: r217332 - 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: Wed, 12 Jan 2011 23:06:39 -0000 Author: mdf Date: Wed Jan 12 23:06:38 2011 New Revision: 217332 URL: http://svn.freebsd.org/changeset/base/217332 Log: Revert cddl changes for sysctl(9) until I understand why this isn't building on universe. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Jan 12 22:24:07 2011 (r217331) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Jan 12 23:06:38 2011 (r217332) @@ -188,9 +188,9 @@ TUNABLE_QUAD("vfs.zfs.arc_min", &zfs_arc TUNABLE_QUAD("vfs.zfs.arc_meta_limit", &zfs_arc_meta_limit); TUNABLE_INT("vfs.zfs.mdcomp_disable", &zfs_mdcomp_disable); SYSCTL_DECL(_vfs_zfs); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_max, CTLFLAG_RDTUN, &zfs_arc_max, 0, +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_max, CTLFLAG_RDTUN, &zfs_arc_max, 0, "Maximum ARC size"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_min, CTLFLAG_RDTUN, &zfs_arc_min, 0, +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_min, CTLFLAG_RDTUN, &zfs_arc_min, 0, "Minimum ARC size"); SYSCTL_INT(_vfs_zfs, OID_AUTO, mdcomp_disable, CTLFLAG_RDTUN, &zfs_mdcomp_disable, 0, "Disable metadata compression"); @@ -466,9 +466,9 @@ static uint64_t arc_loaned_bytes; static uint64_t arc_meta_used; static uint64_t arc_meta_limit; static uint64_t arc_meta_max = 0; -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_meta_used, CTLFLAG_RDTUN, +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_meta_used, CTLFLAG_RDTUN, &arc_meta_used, 0, "ARC metadata used"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_meta_limit, CTLFLAG_RDTUN, +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_meta_limit, CTLFLAG_RDTUN, &arc_meta_limit, 0, "ARC metadata limit"); typedef struct l2arc_buf_hdr l2arc_buf_hdr_t; @@ -638,15 +638,15 @@ boolean_t l2arc_noprefetch = B_FALSE; / boolean_t l2arc_feed_again = B_TRUE; /* turbo warmup */ boolean_t l2arc_norw = B_TRUE; /* no reads during writes */ -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_write_max, CTLFLAG_RW, +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2arc_write_max, CTLFLAG_RW, &l2arc_write_max, 0, "max write size"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_write_boost, CTLFLAG_RW, +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2arc_write_boost, CTLFLAG_RW, &l2arc_write_boost, 0, "extra write during warmup"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_headroom, CTLFLAG_RW, +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2arc_headroom, CTLFLAG_RW, &l2arc_headroom, 0, "number of dev writes"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_feed_secs, CTLFLAG_RW, +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2arc_feed_secs, CTLFLAG_RW, &l2arc_feed_secs, 0, "interval seconds"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_feed_min_ms, CTLFLAG_RW, +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2arc_feed_min_ms, CTLFLAG_RW, &l2arc_feed_min_ms, 0, "min interval milliseconds"); SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_noprefetch, CTLFLAG_RW, @@ -656,46 +656,46 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_fee SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_norw, CTLFLAG_RW, &l2arc_norw, 0, "no reads during writes"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, anon_size, CTLFLAG_RD, +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, anon_size, CTLFLAG_RD, &ARC_anon.arcs_size, 0, "size of anonymous state"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, anon_metadata_lsize, CTLFLAG_RD, +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, anon_metadata_lsize, CTLFLAG_RD, &ARC_anon.arcs_lsize[ARC_BUFC_METADATA], 0, "size of anonymous state"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, anon_data_lsize, CTLFLAG_RD, +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, anon_data_lsize, CTLFLAG_RD, &ARC_anon.arcs_lsize[ARC_BUFC_DATA], 0, "size of anonymous state"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_size, CTLFLAG_RD, +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mru_size, CTLFLAG_RD, &ARC_mru.arcs_size, 0, "size of mru state"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_metadata_lsize, CTLFLAG_RD, +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mru_metadata_lsize, CTLFLAG_RD, &ARC_mru.arcs_lsize[ARC_BUFC_METADATA], 0, "size of metadata in mru state"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_data_lsize, CTLFLAG_RD, +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mru_data_lsize, CTLFLAG_RD, &ARC_mru.arcs_lsize[ARC_BUFC_DATA], 0, "size of data in mru state"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_ghost_size, CTLFLAG_RD, +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mru_ghost_size, CTLFLAG_RD, &ARC_mru_ghost.arcs_size, 0, "size of mru ghost state"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_ghost_metadata_lsize, CTLFLAG_RD, +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mru_ghost_metadata_lsize, CTLFLAG_RD, &ARC_mru_ghost.arcs_lsize[ARC_BUFC_METADATA], 0, "size of metadata in mru ghost state"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_ghost_data_lsize, CTLFLAG_RD, +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mru_ghost_data_lsize, CTLFLAG_RD, &ARC_mru_ghost.arcs_lsize[ARC_BUFC_DATA], 0, "size of data in mru ghost state"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_size, CTLFLAG_RD, +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mfu_size, CTLFLAG_RD, &ARC_mfu.arcs_size, 0, "size of mfu state"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_metadata_lsize, CTLFLAG_RD, +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mfu_metadata_lsize, CTLFLAG_RD, &ARC_mfu.arcs_lsize[ARC_BUFC_METADATA], 0, "size of metadata in mfu state"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_data_lsize, CTLFLAG_RD, +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mfu_data_lsize, CTLFLAG_RD, &ARC_mfu.arcs_lsize[ARC_BUFC_DATA], 0, "size of data in mfu state"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_ghost_size, CTLFLAG_RD, +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mfu_ghost_size, CTLFLAG_RD, &ARC_mfu_ghost.arcs_size, 0, "size of mfu ghost state"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_ghost_metadata_lsize, CTLFLAG_RD, +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mfu_ghost_metadata_lsize, CTLFLAG_RD, &ARC_mfu_ghost.arcs_lsize[ARC_BUFC_METADATA], 0, "size of metadata in mfu ghost state"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_ghost_data_lsize, CTLFLAG_RD, +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mfu_ghost_data_lsize, CTLFLAG_RD, &ARC_mfu_ghost.arcs_lsize[ARC_BUFC_DATA], 0, "size of data in mfu ghost state"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2c_only_size, CTLFLAG_RD, +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2c_only_size, CTLFLAG_RD, &ARC_l2c_only.arcs_size, 0, "size of mru state"); /* Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c Wed Jan 12 22:24:07 2011 (r217331) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c Wed Jan 12 23:06:38 2011 (r217332) @@ -61,7 +61,7 @@ TUNABLE_INT("vfs.zfs.zfetch.block_cap", SYSCTL_UINT(_vfs_zfs_zfetch, OID_AUTO, block_cap, CTLFLAG_RDTUN, &zfetch_block_cap, 0, "Max number of blocks to fetch at a time"); TUNABLE_QUAD("vfs.zfs.zfetch.array_rd_sz", &zfetch_array_rd_sz); -SYSCTL_UQUAD(_vfs_zfs_zfetch, OID_AUTO, array_rd_sz, CTLFLAG_RDTUN, +SYSCTL_QUAD(_vfs_zfs_zfetch, OID_AUTO, array_rd_sz, CTLFLAG_RDTUN, &zfetch_array_rd_sz, 0, "Number of bytes in a array_read at which we stop prefetching"); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Wed Jan 12 22:24:07 2011 (r217331) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Wed Jan 12 23:06:38 2011 (r217332) @@ -50,7 +50,7 @@ TUNABLE_INT("vfs.zfs.txg.synctime", &zfs SYSCTL_INT(_vfs_zfs_txg, OID_AUTO, synctime, CTLFLAG_RDTUN, &zfs_txg_synctime, 0, "Target seconds to sync a txg"); TUNABLE_QUAD("vfs.zfs.txg.write_limit_override", &zfs_write_limit_override); -SYSCTL_UQUAD(_vfs_zfs_txg, OID_AUTO, write_limit_override, CTLFLAG_RW, +SYSCTL_QUAD(_vfs_zfs_txg, OID_AUTO, write_limit_override, CTLFLAG_RW, &zfs_write_limit_override, 0, "Override maximum size of a txg to this size in bytes, " "value of 0 means don't override"); From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 23:07:51 2011 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 5997D1065674; Wed, 12 Jan 2011 23:07:51 +0000 (UTC) (envelope-from csjp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 497F58FC1D; Wed, 12 Jan 2011 23:07: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 p0CN7pDi023313; Wed, 12 Jan 2011 23:07:51 GMT (envelope-from csjp@svn.freebsd.org) Received: (from csjp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CN7pq3023311; Wed, 12 Jan 2011 23:07:51 GMT (envelope-from csjp@svn.freebsd.org) Message-Id: <201101122307.p0CN7pq3023311@svn.freebsd.org> From: "Christian S.J. Peron" Date: Wed, 12 Jan 2011 23:07: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: r217333 - 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: Wed, 12 Jan 2011 23:07:51 -0000 Author: csjp Date: Wed Jan 12 23:07:51 2011 New Revision: 217333 URL: http://svn.freebsd.org/changeset/base/217333 Log: Un-break the build: use the correct format specifier for sizeof() Modified: head/sys/netinet/if_ether.c Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Wed Jan 12 23:06:38 2011 (r217332) +++ head/sys/netinet/if_ether.c Wed Jan 12 23:07:51 2011 (r217333) @@ -536,7 +536,7 @@ in_arpinput(struct mbuf *m) * a protocol length not equal to an IPv4 address. */ if (ah->ar_pln != sizeof(struct in_addr)) { - log(LOG_ERR, "in_arp: requested protocol length != %ld\n", + log(LOG_ERR, "in_arp: requested protocol length != %zu\n", sizeof(struct in_addr)); return; } From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 23:31:29 2011 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 31979106566C; Wed, 12 Jan 2011 23:31: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 2112A8FC18; Wed, 12 Jan 2011 23:31: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 p0CNVTe3025463; Wed, 12 Jan 2011 23:31:29 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CNVTHD025461; Wed, 12 Jan 2011 23:31:29 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201101122331.p0CNVTHD025461@svn.freebsd.org> From: Bruce Cran Date: Wed, 12 Jan 2011 23:31: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: r217334 - head/sbin/geom/class/raid3 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, 12 Jan 2011 23:31:29 -0000 Author: brucec Date: Wed Jan 12 23:31:28 2011 New Revision: 217334 URL: http://svn.freebsd.org/changeset/base/217334 Log: Fix formatting of cross-references. Modified: head/sbin/geom/class/raid3/graid3.8 Modified: head/sbin/geom/class/raid3/graid3.8 ============================================================================== --- head/sbin/geom/class/raid3/graid3.8 Wed Jan 12 23:07:51 2011 (r217333) +++ head/sbin/geom/class/raid3/graid3.8 Wed Jan 12 23:31:28 2011 (r217334) @@ -236,10 +236,10 @@ graid3 insert -n 0 data da5 .Sh SEE ALSO .Xr geom 4 , .Xr geom 8 , -.Xr gvinum 8, +.Xr gvinum 8 , .Xr mount 8 , .Xr newfs 8 , -.Xr umount 8 , +.Xr umount 8 .Sh HISTORY The .Nm From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 23:34:09 2011 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 DF1451065675; Wed, 12 Jan 2011 23:34:09 +0000 (UTC) (envelope-from zack@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE4FA8FC1C; Wed, 12 Jan 2011 23:34: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 p0CNY9dT025734; Wed, 12 Jan 2011 23:34:09 GMT (envelope-from zack@svn.freebsd.org) Received: (from zack@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CNY9BD025731; Wed, 12 Jan 2011 23:34:09 GMT (envelope-from zack@svn.freebsd.org) Message-Id: <201101122334.p0CNY9BD025731@svn.freebsd.org> From: Zack Kirsch Date: Wed, 12 Jan 2011 23:34: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: r217335 - head/sys/fs/nfsserver 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, 12 Jan 2011 23:34:10 -0000 Author: zack Date: Wed Jan 12 23:34:09 2011 New Revision: 217335 URL: http://svn.freebsd.org/changeset/base/217335 Log: Clean up the experimental NFS server replay cache when the module is unloaded. Reviewed by: rmacklem Approved by: zml (mentor) Modified: head/sys/fs/nfsserver/nfs_nfsdcache.c head/sys/fs/nfsserver/nfs_nfsdport.c Modified: head/sys/fs/nfsserver/nfs_nfsdcache.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdcache.c Wed Jan 12 23:31:28 2011 (r217334) +++ head/sys/fs/nfsserver/nfs_nfsdcache.c Wed Jan 12 23:34:09 2011 (r217335) @@ -727,9 +727,8 @@ nfsrc_freecache(struct nfsrvcache *rp) newnfsstats.srvcache_size--; } -#ifdef notdef /* - * Clean out the cache. Called when the last nfsd terminates. + * Clean out the cache. Called when nfsserver module is unloaded. */ APPLESTATIC void nfsrvd_cleancache(void) @@ -752,7 +751,6 @@ nfsrvd_cleancache(void) nfsrc_tcpsavedreplies = 0; NFSUNLOCKCACHE(); } -#endif /* notdef */ /* * The basic rule is to get rid of entries that are expired. Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Wed Jan 12 23:31:28 2011 (r217334) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Wed Jan 12 23:34:09 2011 (r217335) @@ -3078,6 +3078,10 @@ nfsd_modevent(module_t mod, int type, vo #endif nfsd_call_servertimer = NULL; nfsd_call_nfsd = NULL; + + /* Clean the NFS server reply cache */ + nfsrvd_cleancache(); + /* and get rid of the locks */ mtx_destroy(&nfs_cache_mutex); mtx_destroy(&nfs_v4root_mutex); From owner-svn-src-head@FreeBSD.ORG Wed Jan 12 23:46:12 2011 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 8EA61106566B; Wed, 12 Jan 2011 23:46:12 +0000 (UTC) (envelope-from zack@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E64C8FC08; Wed, 12 Jan 2011 23:46: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 p0CNkCPG026802; Wed, 12 Jan 2011 23:46:12 GMT (envelope-from zack@svn.freebsd.org) Received: (from zack@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0CNkCgW026800; Wed, 12 Jan 2011 23:46:12 GMT (envelope-from zack@svn.freebsd.org) Message-Id: <201101122346.p0CNkCgW026800@svn.freebsd.org> From: Zack Kirsch Date: Wed, 12 Jan 2011 23:46: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: r217336 - head/sys/fs/nfsserver 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, 12 Jan 2011 23:46:12 -0000 Author: zack Date: Wed Jan 12 23:46:12 2011 New Revision: 217336 URL: http://svn.freebsd.org/changeset/base/217336 Log: In the experimental NFS server, when converting an open-owner to a lock-owner, start at sequence id 1 instead of 0, to match up with both Solaris and Linux. Reviewed by: rmacklem Approved by: zml (mentor) Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdstate.c Wed Jan 12 23:34:09 2011 (r217335) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Wed Jan 12 23:46:12 2011 (r217336) @@ -1921,7 +1921,7 @@ tryagain: */ new_stp->ls_seq = new_stp->ls_opentolockseq; nfsrvd_refcache(new_stp->ls_op); - stateidp->seqid = new_stp->ls_stateid.seqid = 0; + stateidp->seqid = new_stp->ls_stateid.seqid = 1; stateidp->other[0] = new_stp->ls_stateid.other[0] = clp->lc_clientid.lval[0]; stateidp->other[1] = new_stp->ls_stateid.other[1] = From owner-svn-src-head@FreeBSD.ORG Thu Jan 13 00:06:26 2011 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 1793E106564A; Thu, 13 Jan 2011 00:06:26 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by mx1.freebsd.org (Postfix) with ESMTP id 8D0F28FC0C; Thu, 13 Jan 2011 00:06:25 +0000 (UTC) Received: from c122-106-165-206.carlnfd1.nsw.optusnet.com.au (c122-106-165-206.carlnfd1.nsw.optusnet.com.au [122.106.165.206]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p0D06LMu011430 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 13 Jan 2011 11:06:22 +1100 Date: Thu, 13 Jan 2011 11:06:21 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin In-Reply-To: <201101121621.30371.jhb@freebsd.org> Message-ID: <20110113104728.L1003@besplex.bde.org> References: <201101122108.p0CL8o3Q012038@svn.freebsd.org> <201101121621.30371.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, Matthew D Fleming , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r217330 - head/sys/x86/x86 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, 13 Jan 2011 00:06:26 -0000 On Wed, 12 Jan 2011, John Baldwin wrote: >> Log: >> Fix a brain fart. Since this file is shared between i386 and amd64, a >> bus_size_t may be 32 or 64 bits. Change the bounce_zone alignment field >> to explicitly be 32 bits, as I can't really imagine a DMA device that >> needs anything close to 2GB alignment of data. > > Hmm, we do have devices with 4GB boundaries though. I think I'd prefer it if > you instead if you did this: > > #if defined(amd64) || defined(PAE) > #define SYSCTL_ADD_BUS_SIZE_T SYSCTL_ADD_UQUAD > #else > #define SYSCTL_ADD_BUS_SIZE_T SYSCTL_ADD_UINT > #endif > > and then just used SYSCTL_ADD_BUS_SIZE_T() in the code so we could let the > members in the bounce zone retain the same types passed to > bus_dma_tag_create(). U_LONG should work on all arches. malloc(9) still uses u_long instead of size_t. This works for scalars even on the recently removed i386's with 32-bit longs where u_long is larger than size_t, since larger is a fail-safe direction. This fails for pointers. Newer parts of malloc() and uma are broken unless u_long is the same as uintptr_t, since they cast pointers to u_long. This direction is fail-safe too, but gcc warns about it. uquad_t should never be used, like unsigned long long. Similarly for signed types. Perhaps it could be removed in sysctl interfaces first. Bruce From owner-svn-src-head@FreeBSD.ORG Thu Jan 13 00:10:30 2011 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 B1031106566B; Thu, 13 Jan 2011 00:10:30 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4F0248FC17; Thu, 13 Jan 2011 00:10:30 +0000 (UTC) Received: by iyb26 with SMTP id 26so1087272iyb.13 for ; Wed, 12 Jan 2011 16:10:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=RAV0rRT2liyFbfr+lllG4JyubCxOUgbLqOkWf4JOw+0=; b=TDs0Y6lOItMlhnV2JpWk5FnWs3VAmcIr3ZfaUggN/I051xtDl0f6WBiYsRasZeUaJq NXMa0XZNs8AOjbdzWE1sPHdSr3+qC3WDocWhr+xesG72IAlnxmPD89snUX3fqPsy5F6r bL+nyqe4saVVwoecIzZGkYaKtcfvOIZxxJkVc= 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=vID1x2W8DGFUCArHcWGAUhtYZjpaEBz+XJeJ3F4uTLgb30++fU/ep3uQ1Gg+7N4jNc +JBOQgaHcbjJzmRPcvKTRomFQgUBeU4thC5FOP+x0tqZYDSs0NI4wVic4bFcopGvkr9g qySL+K7E/xIzCt3gzKszhvm5hZrSfRH/PMVNs= MIME-Version: 1.0 Received: by 10.231.171.197 with SMTP id i5mr1750449ibz.54.1294877429772; Wed, 12 Jan 2011 16:10:29 -0800 (PST) Sender: mdf356@gmail.com Received: by 10.231.160.147 with HTTP; Wed, 12 Jan 2011 16:10:29 -0800 (PST) In-Reply-To: <20110113104728.L1003@besplex.bde.org> References: <201101122108.p0CL8o3Q012038@svn.freebsd.org> <201101121621.30371.jhb@freebsd.org> <20110113104728.L1003@besplex.bde.org> Date: Wed, 12 Jan 2011 16:10:29 -0800 X-Google-Sender-Auth: yncRQz0xW6gZV7dDYaqnvwnIfE8 Message-ID: From: mdf@FreeBSD.org To: Bruce Evans 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, John Baldwin Subject: Re: svn commit: r217330 - head/sys/x86/x86 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, 13 Jan 2011 00:10:30 -0000 On Wed, Jan 12, 2011 at 4:06 PM, Bruce Evans wrote: > On Wed, 12 Jan 2011, John Baldwin wrote: > >>> Log: >>> =A0Fix a brain fart. =A0Since this file is shared between i386 and amd6= 4, a >>> =A0bus_size_t may be 32 or 64 bits. =A0Change the bounce_zone alignment= field >>> =A0to explicitly be 32 bits, as I can't really imagine a DMA device tha= t >>> =A0needs anything close to 2GB alignment of data. >> >> Hmm, we do have devices with 4GB boundaries though. =A0I think I'd prefe= r it >> if >> you instead if you did this: >> >> #if defined(amd64) || defined(PAE) >> #define SYSCTL_ADD_BUS_SIZE_T =A0 =A0 =A0 =A0 =A0 SYSCTL_ADD_UQUAD >> #else >> #define SYSCTL_ADD_BUS_SIZE_T =A0 =A0 =A0 =A0 =A0 SYSCTL_ADD_UINT >> #endif >> >> and then just used SYSCTL_ADD_BUS_SIZE_T() in the code so we could let t= he >> members in the bounce zone retain the same types passed to >> bus_dma_tag_create(). > > U_LONG should work on all arches. =A0malloc(9) still uses u_long instead > of size_t. =A0This works for scalars even on the recently removed i386's > with 32-bit longs where u_long is larger than size_t, since larger is > a fail-safe direction. =A0This fails for pointers. =A0Newer parts of mall= oc() > and uma are broken unless u_long is the same as uintptr_t, since they > cast pointers to u_long. =A0This direction is fail-safe too, but gcc warn= s > about it. In this case for PAE u_long is (theoretically) too small, because a bus_size_t is an uint64_t. > uquad_t should never be used, like unsigned long long. =A0Similarly for > signed types. =A0Perhaps it could be removed in sysctl interfaces first. The name SYSCTL_ADD_UQUAD is a little misleading since it's really for a uint64_t. The name could be changed, but there's already plenty of existing uses of QUAD for int64_t which aren't being changed. Thanks, matthew From owner-svn-src-head@FreeBSD.ORG Thu Jan 13 00:52:57 2011 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 68DD0106566B; Thu, 13 Jan 2011 00:52:57 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 588418FC0C; Thu, 13 Jan 2011 00:52: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 p0D0qv0B032598; Thu, 13 Jan 2011 00:52:57 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0D0qvDL032596; Thu, 13 Jan 2011 00:52:57 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201101130052.p0D0qvDL032596@svn.freebsd.org> From: Matthew D Fleming Date: Thu, 13 Jan 2011 00:52: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: r217337 - head/sys/x86/x86 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, 13 Jan 2011 00:52:57 -0000 Author: mdf Date: Thu Jan 13 00:52:57 2011 New Revision: 217337 URL: http://svn.freebsd.org/changeset/base/217337 Log: Revert to using bus_size_t for the bounce_zone's alignment member. Reuqested by: jhb Modified: head/sys/x86/x86/busdma_machdep.c Modified: head/sys/x86/x86/busdma_machdep.c ============================================================================== --- head/sys/x86/x86/busdma_machdep.c Wed Jan 12 23:46:12 2011 (r217336) +++ head/sys/x86/x86/busdma_machdep.c Thu Jan 13 00:52:57 2011 (r217337) @@ -100,7 +100,7 @@ struct bounce_zone { int total_bounced; int total_deferred; int map_count; - uint32_t alignment; + bus_size_t alignment; bus_addr_t lowaddr; char zoneid[8]; char lowaddrid[20]; @@ -993,6 +993,13 @@ busdma_sysctl_tree_top(struct bounce_zon return (bz->sysctl_tree_top); } +#if defined(__amd64__) || defined(PAE) +#define SYSCTL_ADD_BUS_SIZE_T SYSCTL_ADD_UQUAD +#else +#define SYSCTL_ADD_BUS_SIZE_T(ctx, parent, nbr, name, flag, ptr, desc) \ + SYSCTL_ADD_UINT(ctx, parent, nbr, name, flag, ptr, 0, desc) +#endif + static int alloc_bounce_zone(bus_dma_tag_t dmat) { @@ -1060,9 +1067,9 @@ alloc_bounce_zone(bus_dma_tag_t dmat) SYSCTL_ADD_STRING(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "lowaddr", CTLFLAG_RD, bz->lowaddrid, 0, ""); - SYSCTL_ADD_UINT(busdma_sysctl_tree(bz), + SYSCTL_ADD_BUS_SIZE_T(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, - "alignment", CTLFLAG_RD, &bz->alignment, 0, ""); + "alignment", CTLFLAG_RD, &bz->alignment, ""); return (0); } From owner-svn-src-head@FreeBSD.ORG Thu Jan 13 02:26:22 2011 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 B33D7106564A; Thu, 13 Jan 2011 02:26:22 +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 883868FC12; Thu, 13 Jan 2011 02:26:22 +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 p0D2QMn8035000; Thu, 13 Jan 2011 02:26:22 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0D2QM8h034999; Thu, 13 Jan 2011 02:26:22 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201101130226.p0D2QM8h034999@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 13 Jan 2011 02:26: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: r217340 - head/contrib/dialog 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, 13 Jan 2011 02:26:22 -0000 Author: nwhitehorn Date: Thu Jan 13 02:26:22 2011 New Revision: 217340 URL: http://svn.freebsd.org/changeset/base/217340 Log: Bootstrap merge info for dialog. Modified: Directory Properties: head/contrib/dialog/ (props changed) From owner-svn-src-head@FreeBSD.ORG Thu Jan 13 02:54:01 2011 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 B8640106564A; Thu, 13 Jan 2011 02:54:01 +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 4DD228FC08; Thu, 13 Jan 2011 02:54:00 +0000 (UTC) Received: from c122-106-165-206.carlnfd1.nsw.optusnet.com.au (c122-106-165-206.carlnfd1.nsw.optusnet.com.au [122.106.165.206]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p0D2rvWl024946 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 13 Jan 2011 13:53:58 +1100 Date: Thu, 13 Jan 2011 13:53:57 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: mdf@FreeBSD.org In-Reply-To: Message-ID: <20110113132935.A1458@besplex.bde.org> References: <201101122108.p0CL8o3Q012038@svn.freebsd.org> <201101121621.30371.jhb@freebsd.org> <20110113104728.L1003@besplex.bde.org> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1264095000-1294887237=:1458" Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, John Baldwin , Bruce Evans Subject: Re: svn commit: r217330 - head/sys/x86/x86 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, 13 Jan 2011 02:54:01 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1264095000-1294887237=:1458 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Wed, 12 Jan 2011 mdf@FreeBSD.org wrote: > On Wed, Jan 12, 2011 at 4:06 PM, Bruce Evans wrote= : >> On Wed, 12 Jan 2011, John Baldwin wrote: >>> ... >>> and then just used SYSCTL_ADD_BUS_SIZE_T() in the code so we could let = the >>> members in the bounce zone retain the same types passed to >>> bus_dma_tag_create(). >> >> U_LONG should work on all arches. =A0malloc(9) still uses u_long instead >> of size_t. =A0This works for scalars even on the recently removed i386's >> with 32-bit longs where u_long is larger than size_t, since larger is >> a fail-safe direction. =A0This fails for pointers. =A0Newer parts of mal= loc() >> and uma are broken unless u_long is the same as uintptr_t, since they >> cast pointers to u_long. =A0This direction is fail-safe too, but gcc war= ns >> about it. > > In this case for PAE u_long is (theoretically) too small, because a > bus_size_t is an uint64_t. Lucky there is no BUS_SIZE_MAX to complicate recent changes to :-). >> uquad_t should never be used, like unsigned long long. =A0Similarly for >> signed types. =A0Perhaps it could be removed in sysctl interfaces first. > > The name SYSCTL_ADD_UQUAD is a little misleading since it's really for > a uint64_t. The name could be changed, but there's already plenty of > existing uses of QUAD for int64_t which aren't being changed. Yes, I almost suggested changing all of these to int64_t etc. Recent changes to result in quad_t and its limits being assumed to be the same as int64_t on all arches, at the top level (previously this was stated to be true by MD levels, except for some broken cases where the limits had type long long but int64_t has type long). quad_t must be precisely 64 bits 2's complement with no padding to work. int64_t must be the same to meet its spec. Now I seem to remember that sysctl() users are the largest user of quad_t's (since sysctl never supported int64_t or intmax_t). It would be easy to change all its quads to int64's since these types must be essentially the same to work. But as you know too well, there are now an enormous number of sysctls to change from [U]QUAD to [U]INT64. This despite CTLTYPE_QUAD being unused between at least 4.4BSD-Lite2 and FreeBSD-3, and being broken in sysctl(8) between FreeBSD-4 and ~2007. I tried to kill quads and long longs 10-15 years ago because they were about to be superseded by initmax_t, but of course they are used much more now :-(. Bruce --0-1264095000-1294887237=:1458-- From owner-svn-src-head@FreeBSD.ORG Thu Jan 13 04:37:48 2011 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 D66FA106564A; Thu, 13 Jan 2011 04:37:48 +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 C4E7C8FC0A; Thu, 13 Jan 2011 04:37: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 p0D4bmxL037952; Thu, 13 Jan 2011 04:37:48 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0D4bmDF037948; Thu, 13 Jan 2011 04:37:48 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201101130437.p0D4bmDF037948@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 13 Jan 2011 04:37: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: r217341 - in head/sys/powerpc: aim 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: Thu, 13 Jan 2011 04:37:49 -0000 Author: nwhitehorn Date: Thu Jan 13 04:37:48 2011 New Revision: 217341 URL: http://svn.freebsd.org/changeset/base/217341 Log: Fix handling of NX pages on capable CPUs. Thanks to kib for prodding me in the right direction. Modified: head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/aim/trap.c head/sys/powerpc/include/spr.h Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Thu Jan 13 02:26:22 2011 (r217340) +++ head/sys/powerpc/aim/mmu_oea64.c Thu Jan 13 04:37:48 2011 (r217341) @@ -650,8 +650,7 @@ moea64_setup_direct_map(mmu_t mmup, vm_o moea64_pvo_enter(mmup, kernel_pmap, moea64_upvo_zone, &moea64_pvo_kunmanaged, pa, pa, - pte_lo, PVO_WIRED | PVO_LARGE | - VM_PROT_EXECUTE); + pte_lo, PVO_WIRED | PVO_LARGE); } } PMAP_UNLOCK(kernel_pmap); @@ -1266,8 +1265,8 @@ moea64_enter_locked(mmu_t mmu, pmap_t pm } else pte_lo |= LPTE_BR; - if (prot & VM_PROT_EXECUTE) - pvo_flags |= VM_PROT_EXECUTE; + if ((prot & VM_PROT_EXECUTE) == 0) + pte_lo |= LPTE_NOEXEC; if (wired) pvo_flags |= PVO_WIRED; @@ -1692,8 +1691,7 @@ moea64_kenter_attr(mmu_t mmu, vm_offset_ PMAP_LOCK(kernel_pmap); error = moea64_pvo_enter(mmu, kernel_pmap, moea64_upvo_zone, - &moea64_pvo_kunmanaged, va, pa, pte_lo, - PVO_WIRED | VM_PROT_EXECUTE); + &moea64_pvo_kunmanaged, va, pa, pte_lo, PVO_WIRED); if (error != 0 && error != ENOENT) panic("moea64_kenter: failed to enter va %#zx pa %#zx: %d", va, @@ -2191,8 +2189,8 @@ moea64_pvo_enter(mmu_t mmu, pmap_t pm, u LIST_FOREACH(pvo, &moea64_pvo_table[ptegidx], pvo_olink) { if (pvo->pvo_pmap == pm && PVO_VADDR(pvo) == va) { if ((pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN) == pa && - (pvo->pvo_pte.lpte.pte_lo & LPTE_PP) == - (pte_lo & LPTE_PP)) { + (pvo->pvo_pte.lpte.pte_lo & (LPTE_NOEXEC | LPTE_PP)) + == (pte_lo & (LPTE_NOEXEC | LPTE_PP))) { if (!(pvo->pvo_pte.lpte.pte_hi & LPTE_VALID)) { /* Re-insert if spilled */ i = MOEA64_PTE_INSERT(mmu, ptegidx, @@ -2246,8 +2244,6 @@ moea64_pvo_enter(mmu_t mmu, pmap_t pm, u LIST_INSERT_HEAD(&moea64_pvo_table[ptegidx], pvo, pvo_olink); pvo->pvo_vaddr &= ~ADDR_POFF; - if (!(flags & VM_PROT_EXECUTE)) - pte_lo |= LPTE_NOEXEC; if (flags & PVO_WIRED) pvo->pvo_vaddr |= PVO_WIRED; if (pvo_head != &moea64_pvo_kunmanaged) Modified: head/sys/powerpc/aim/trap.c ============================================================================== --- head/sys/powerpc/aim/trap.c Thu Jan 13 02:26:22 2011 (r217340) +++ head/sys/powerpc/aim/trap.c Thu Jan 13 04:37:48 2011 (r217341) @@ -523,7 +523,9 @@ trap_pfault(struct trapframe *frame, int p = td->td_proc; if (frame->exc == EXC_ISI) { eva = frame->srr0; - ftype = VM_PROT_READ | VM_PROT_EXECUTE; + ftype = VM_PROT_EXECUTE; + if (frame->srr1 & SRR1_ISI_PFAULT) + ftype |= VM_PROT_READ; } else { eva = frame->cpu.aim.dar; if (frame->cpu.aim.dsisr & DSISR_STORE) Modified: head/sys/powerpc/include/spr.h ============================================================================== --- head/sys/powerpc/include/spr.h Thu Jan 13 02:26:22 2011 (r217340) +++ head/sys/powerpc/include/spr.h Thu Jan 13 04:37:48 2011 (r217341) @@ -111,6 +111,9 @@ #define SPR_SDR1 0x019 /* .68 Page table base address register */ #define SPR_SRR0 0x01a /* 468 Save/Restore Register 0 */ #define SPR_SRR1 0x01b /* 468 Save/Restore Register 1 */ +#define SRR1_ISI_PFAULT 0x40000000 /* ISI page not found */ +#define SRR1_ISI_NOEXECUTE 0x10000000 /* Memory marked no-execute */ +#define SRR1_ISI_PP 0x08000000 /* PP bits forbid access */ #define SPR_DECAR 0x036 /* ..8 Decrementer auto reload */ #define SPR_EIE 0x050 /* ..8 Exception Interrupt ??? */ #define SPR_EID 0x051 /* ..8 Exception Interrupt ??? */ From owner-svn-src-head@FreeBSD.ORG Thu Jan 13 05:27:40 2011 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 AFDFC106564A; Thu, 13 Jan 2011 05:27:40 +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 6CEC88FC0C; Thu, 13 Jan 2011 05:27:40 +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 p0CNiv9g070111; Wed, 12 Jan 2011 16:44:57 -0700 (MST) (envelope-from imp@bsdimp.com) Message-ID: <4D2E3CF9.5080603@bsdimp.com> Date: Wed, 12 Jan 2011 16:44:57 -0700 From: Warner Losh User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Thunderbird/3.1.6 MIME-Version: 1.0 To: mdf@FreeBSD.org References: <201101122108.p0CL8o3Q012038@svn.freebsd.org> <201101121621.30371.jhb@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, John Baldwin Subject: Re: svn commit: r217330 - head/sys/x86/x86 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, 13 Jan 2011 05:27:40 -0000 On 01/12/2011 14:27, mdf@FreeBSD.org wrote: > On Wed, Jan 12, 2011 at 1:21 PM, John Baldwin wrote: >> On Wednesday, January 12, 2011 4:08:50 pm Matthew D Fleming wrote: >>> Author: mdf >>> Date: Wed Jan 12 21:08:49 2011 >>> New Revision: 217330 >>> URL: http://svn.freebsd.org/changeset/base/217330 >>> >>> Log: >>> Fix a brain fart. Since this file is shared between i386 and amd64, a >>> bus_size_t may be 32 or 64 bits. Change the bounce_zone alignment field >>> to explicitly be 32 bits, as I can't really imagine a DMA device that >>> needs anything close to 2GB alignment of data. >> Hmm, we do have devices with 4GB boundaries though. I think I'd prefer it if >> you instead if you did this: >> >> #if defined(amd64) || defined(PAE) >> #define SYSCTL_ADD_BUS_SIZE_T SYSCTL_ADD_UQUAD >> #else >> #define SYSCTL_ADD_BUS_SIZE_T SYSCTL_ADD_UINT >> #endif >> >> and then just used SYSCTL_ADD_BUS_SIZE_T() in the code so we could let the >> members in the bounce zone retain the same types passed to >> bus_dma_tag_create(). > But would there be a device that can't start DMA except on a 4GB > boundary? I thought that's what this member was for. You never know about weird, custom devices... This is safer and would be more future proof. its the whole reason we have the different types... And sysctl is too type-poor these days, imho, since it goes to the base type and has little facility to go for the logical type. Go on, tell me how to specify a physical address that will always work... Warner From owner-svn-src-head@FreeBSD.ORG Thu Jan 13 06:10:48 2011 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 271011065672; Thu, 13 Jan 2011 06:10:48 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 167858FC20; Thu, 13 Jan 2011 06:10: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 p0D6Al7W040012; Thu, 13 Jan 2011 06:10:47 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0D6Aljv040010; Thu, 13 Jan 2011 06:10:47 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201101130610.p0D6Aljv040010@svn.freebsd.org> From: Maxim Konovalov Date: Thu, 13 Jan 2011 06:10: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: r217342 - 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: Thu, 13 Jan 2011 06:10:48 -0000 Author: maxim Date: Thu Jan 13 06:10:47 2011 New Revision: 217342 URL: http://svn.freebsd.org/changeset/base/217342 Log: o Typo fixes. PR: docs/153933 Submitted by: jpaetzel@, Warren Block MFC after: 1 week Modified: head/sbin/geom/class/part/gpart.8 Modified: head/sbin/geom/class/part/gpart.8 ============================================================================== --- head/sbin/geom/class/part/gpart.8 Thu Jan 13 04:37:48 2011 (r217341) +++ head/sbin/geom/class/part/gpart.8 Thu Jan 13 06:10:47 2011 (r217342) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 12, 2011 +.Dd November 22, 2010 .Dt GPART 8 .Os .Sh NAME @@ -759,7 +759,7 @@ device. .Pp .Pa NOTE : The GEOM class PART can detect the same partition table on different GEOM -providers and some of them will marked as corrupt. Be careful when choosing +providers and some of them will be marked as corrupt. Be careful when choosing a provider for recovering. If you choose incorrectly you can destroy the metadata of another GEOM class, e.g. GEOM MIRROR or GEOM LABEL. .Sh EXIT STATUS From owner-svn-src-head@FreeBSD.ORG Thu Jan 13 06:18:00 2011 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 5B4EF106566C; Thu, 13 Jan 2011 06:18:00 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A52D8FC19; Thu, 13 Jan 2011 06:18: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 p0D6I0R2040220; Thu, 13 Jan 2011 06:18:00 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0D6I0cq040218; Thu, 13 Jan 2011 06:18:00 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201101130618.p0D6I0cq040218@svn.freebsd.org> From: Maxim Konovalov Date: Thu, 13 Jan 2011 06:18: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: r217343 - 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: Thu, 13 Jan 2011 06:18:00 -0000 Author: maxim Date: Thu Jan 13 06:18:00 2011 New Revision: 217343 URL: http://svn.freebsd.org/changeset/base/217343 Log: o Start each sentence on a new line. No content changes. Suggested by: jhb MFC after: 1 week Modified: head/sbin/geom/class/part/gpart.8 Modified: head/sbin/geom/class/part/gpart.8 ============================================================================== --- head/sbin/geom/class/part/gpart.8 Thu Jan 13 06:10:47 2011 (r217342) +++ head/sbin/geom/class/part/gpart.8 Thu Jan 13 06:18:00 2011 (r217343) @@ -422,8 +422,9 @@ about its use. .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. +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 @@ -703,20 +704,23 @@ action. .Sh RECOVERING The GEOM class PART supports recovering of partition tables only for GPT. The GUID partition table has a primary and secondary (backup) copy of -metadata for redundance. They are stored in the begining and in the end -of device respectively. Therefore it is acceptable to have some corruptions -in the metadata that are not fatal to work with GPT. When kernel detects -corrupt metadata it marks this table as corrupt and reports about corruption. +metadata for redundance. +They are stored in the begining and in the end of device respectively. +Therefore it is acceptable to have some corruptions in the metadata that +are not fatal to work with GPT. +When kernel detects corrupt metadata it marks this table as corrupt and +reports about corruption. Any changes in corrupt table are prohibited except .Cm destroy and .Cm recover . .Pp In case when only first sector is corrupt kernel can not detect GPT even -if partition table is not corrupt. You can write protective MBR with +if partition table is not corrupt. +You can write protective MBR with .Xr dd 1 -command to restore ability of GPT detection. The copy of protective MBR is -usually located in the +command to restore ability of GPT detection. +The copy of protective MBR is usually located in the .Pa /boot/pmbr file. .Pp @@ -743,25 +747,27 @@ and will report about corrupt table. .Pp In case when the size of device has changed (e.g. volume expansion) the -secondary GPT header will become located not in the last sector. This is -not a metadata corruption, but it is dangerous because any corruption of -the primary GPT will lead to lost of partition table. Kernel reports about -this problem with message: +secondary GPT header will become located not in the last sector. +This is not a metadata corruption, but it is dangerous because any +corruption of the primary GPT will lead to lost of partition table. +Kernel reports about this problem with message: .Bd -literal -offset indent GEOM: provider: the secondary GPT header is not in the last LBA. .Ed .Pp A corrupt table can be recovered with .Cm gpart recover -command. This command does reconstruction of corrupt metadata using -known valid metadata. Also it can relocate secondary GPT to the end of -device. +command. +This command does reconstruction of corrupt metadata using +known valid metadata. +Also it can relocate secondary GPT to the end of device. .Pp .Pa NOTE : The GEOM class PART can detect the same partition table on different GEOM -providers and some of them will be marked as corrupt. Be careful when choosing -a provider for recovering. If you choose incorrectly you can destroy the -metadata of another GEOM class, e.g. GEOM MIRROR or GEOM LABEL. +providers and some of them will be marked as corrupt. +Be careful when choosing a provider for recovering. +If you choose incorrectly you can destroy the metadata of another GEOM class, +e.g. GEOM MIRROR or GEOM LABEL. .Sh EXIT STATUS Exit status is 0 on success, and 1 if the command fails. .Sh EXAMPLES From owner-svn-src-head@FreeBSD.ORG Thu Jan 13 06:20:45 2011 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 6B1CE1065679; Thu, 13 Jan 2011 06:20:45 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 406428FC1A; Thu, 13 Jan 2011 06:20: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 p0D6KjgP040320; Thu, 13 Jan 2011 06:20:45 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0D6KjqI040318; Thu, 13 Jan 2011 06:20:45 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201101130620.p0D6KjqI040318@svn.freebsd.org> From: Maxim Konovalov Date: Thu, 13 Jan 2011 06:20: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: r217344 - 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: Thu, 13 Jan 2011 06:20:45 -0000 Author: maxim Date: Thu Jan 13 06:20:44 2011 New Revision: 217344 URL: http://svn.freebsd.org/changeset/base/217344 Log: o Somehow I revert Dd macro in the previous commit. Re-revert it. Modified: head/sbin/geom/class/part/gpart.8 Modified: head/sbin/geom/class/part/gpart.8 ============================================================================== --- head/sbin/geom/class/part/gpart.8 Thu Jan 13 06:18:00 2011 (r217343) +++ head/sbin/geom/class/part/gpart.8 Thu Jan 13 06:20:44 2011 (r217344) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2010 +.Dd January 12, 2011 .Dt GPART 8 .Os .Sh NAME From owner-svn-src-head@FreeBSD.ORG Thu Jan 13 06:48:43 2011 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 D34B6106566B; Thu, 13 Jan 2011 06:48:43 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C0FF18FC1D; Thu, 13 Jan 2011 06:48: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 p0D6mhD7041000; Thu, 13 Jan 2011 06:48:43 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0D6mhEN040994; Thu, 13 Jan 2011 06:48:43 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201101130648.p0D6mhEN040994@svn.freebsd.org> From: "Jayachandran C." Date: Thu, 13 Jan 2011 06:48: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: r217345 - in head/sys/mips: include mips 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, 13 Jan 2011 06:48:43 -0000 Author: jchandra Date: Thu Jan 13 06:48:43 2011 New Revision: 217345 URL: http://svn.freebsd.org/changeset/base/217345 Log: Cleanup physical address and PTE types on MIPS. 1. Use vm_paddr_t for physical addresses. There are a few places in the MIPS platform code where vm_offset_t is used for physical addresses, change these to use vm_paddr_t: - phys_avail[], physmem_desc[] arrays - pmap_mapdev(), page_is_managed(), is_cacheable_mem() pmap_map() args - local variables of various pmap functions 2. Change init_pte_prot() return from int to pt_entry_t, as this can be 64 bit when using 64 bit TLB entries. 3. Update printing of pt_entry_t and of vm_paddr_t to use 'j' format with uintmax_t. This will be useful later if we plan to use 64bit phsical addr on 32 bit n32 compilation. Reviewed by: imp Modified: head/sys/mips/include/md_var.h head/sys/mips/include/pmap.h head/sys/mips/mips/machdep.c head/sys/mips/mips/pmap.c head/sys/mips/mips/trap.c Modified: head/sys/mips/include/md_var.h ============================================================================== --- head/sys/mips/include/md_var.h Thu Jan 13 06:20:44 2011 (r217344) +++ head/sys/mips/include/md_var.h Thu Jan 13 06:48:43 2011 (r217345) @@ -54,7 +54,7 @@ void cpu_swapin(struct proc *); uintptr_t MipsEmulateBranch(struct trapframe *, uintptr_t, int, uintptr_t); void MipsSwitchFPState(struct thread *, struct trapframe *); u_long kvtop(void *addr); -int is_cacheable_mem(vm_offset_t addr); +int is_cacheable_mem(vm_paddr_t addr); void mips_generic_reset(void); #define MIPS_DEBUG 0 Modified: head/sys/mips/include/pmap.h ============================================================================== --- head/sys/mips/include/pmap.h Thu Jan 13 06:20:44 2011 (r217344) +++ head/sys/mips/include/pmap.h Thu Jan 13 06:48:43 2011 (r217345) @@ -138,8 +138,8 @@ typedef struct pv_entry { * regions. */ #define PHYS_AVAIL_ENTRIES 10 -extern vm_offset_t phys_avail[PHYS_AVAIL_ENTRIES + 2]; -extern vm_offset_t physmem_desc[PHYS_AVAIL_ENTRIES + 2]; +extern vm_paddr_t phys_avail[PHYS_AVAIL_ENTRIES + 2]; +extern vm_paddr_t physmem_desc[PHYS_AVAIL_ENTRIES + 2]; extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; @@ -151,10 +151,10 @@ extern vm_paddr_t dump_avail[PHYS_AVAIL_ #define pmap_page_set_memattr(m, ma) (void)0 void pmap_bootstrap(void); -void *pmap_mapdev(vm_offset_t, vm_size_t); +void *pmap_mapdev(vm_paddr_t, vm_size_t); void pmap_unmapdev(vm_offset_t, vm_size_t); vm_offset_t pmap_steal_memory(vm_size_t size); -int page_is_managed(vm_offset_t pa); +int page_is_managed(vm_paddr_t pa); void pmap_kenter(vm_offset_t va, vm_paddr_t pa); void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int attr); void pmap_kremove(vm_offset_t va); Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Thu Jan 13 06:20:44 2011 (r217344) +++ head/sys/mips/mips/machdep.c Thu Jan 13 06:48:43 2011 (r217345) @@ -136,8 +136,8 @@ char pcpu_space[MAXCPU][PAGE_SIZE * 2] \ struct pcpu *pcpup = (struct pcpu *)pcpu_space; -vm_offset_t phys_avail[PHYS_AVAIL_ENTRIES + 2]; -vm_offset_t physmem_desc[PHYS_AVAIL_ENTRIES + 2]; +vm_paddr_t phys_avail[PHYS_AVAIL_ENTRIES + 2]; +vm_paddr_t physmem_desc[PHYS_AVAIL_ENTRIES + 2]; vm_paddr_t dump_avail[PHYS_AVAIL_ENTRIES + 2]; #ifdef UNIMPLEMENTED @@ -509,12 +509,12 @@ cpu_idle_wakeup(int cpu) } int -is_cacheable_mem(vm_offset_t addr) +is_cacheable_mem(vm_paddr_t pa) { int i; for (i = 0; physmem_desc[i + 1] != 0; i += 2) { - if (addr >= physmem_desc[i] && addr < physmem_desc[i + 1]) + if (pa >= physmem_desc[i] && pa < physmem_desc[i + 1]) return (1); } Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Thu Jan 13 06:20:44 2011 (r217344) +++ head/sys/mips/mips/pmap.c Thu Jan 13 06:48:43 2011 (r217345) @@ -119,12 +119,6 @@ __FBSDID("$FreeBSD$"); /* * Get PDEs and PTEs for user/kernel address space - * - * XXX The & for pmap_segshift() is wrong, as is the fact that it doesn't - * trim off gratuitous bits of the address space. By having the & - * there, we break defining NUSERPGTBLS below because the address space - * is defined such that it ends immediately after NPDEPG*NPTEPG*PAGE_SIZE, - * so we end up getting NUSERPGTBLS of 0. */ #define pmap_seg_index(v) (((v) >> SEGSHIFT) & (NPDEPG - 1)) #define pmap_pde_index(v) (((v) >> PDRSHIFT) & (NPDEPG - 1)) @@ -184,7 +178,7 @@ static int _pmap_unwire_pte_hold(pmap_t static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags); static vm_page_t _pmap_allocpte(pmap_t pmap, unsigned ptepindex, int flags); static int pmap_unuse_pt(pmap_t, vm_offset_t, vm_page_t); -static int init_pte_prot(vm_offset_t va, vm_page_t m, vm_prot_t prot); +static pt_entry_t init_pte_prot(vm_offset_t va, vm_page_t m, vm_prot_t prot); #ifdef SMP static void pmap_invalidate_page_action(void *arg); @@ -888,7 +882,7 @@ pmap_kremove(vm_offset_t va) * Use XKPHYS for 64 bit, and KSEG0 where possible for 32 bit. */ vm_offset_t -pmap_map(vm_offset_t *virt, vm_offset_t start, vm_offset_t end, int prot) +pmap_map(vm_offset_t *virt, vm_paddr_t start, vm_paddr_t end, int prot) { vm_offset_t va, sva; @@ -1562,7 +1556,7 @@ pmap_remove_pte(struct pmap *pmap, pt_en { pt_entry_t oldpte; vm_page_t m; - vm_offset_t pa; + vm_paddr_t pa; mtx_assert(&vm_page_queue_mtx, MA_OWNED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); @@ -1583,8 +1577,8 @@ pmap_remove_pte(struct pmap *pmap, pt_en m = PHYS_TO_VM_PAGE(pa); if (pte_test(&oldpte, PTE_D)) { KASSERT(!pte_test(&oldpte, PTE_RO), - ("%s: modified page not writable: va: %p, pte: 0x%x", - __func__, (void *)va, oldpte)); + ("%s: modified page not writable: va: %p, pte: %#jx", + __func__, (void *)va, (uintmax_t)oldpte)); vm_page_dirty(m); } if (m->md.pv_flags & PV_TABLE_REF) @@ -1742,8 +1736,8 @@ pmap_remove_all(vm_page_t m) */ if (pte_test(&tpte, PTE_D)) { KASSERT(!pte_test(&tpte, PTE_RO), - ("%s: modified page not writable: va: %p, pte: 0x%x", - __func__, (void *)pv->pv_va, tpte)); + ("%s: modified page not writable: va: %p, pte: %#jx", + __func__, (void *)pv->pv_va, (uintmax_t)tpte)); vm_page_dirty(m); } pmap_invalidate_page(pv->pv_pmap, pv->pv_va); @@ -1850,12 +1844,12 @@ void pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m, vm_prot_t prot, boolean_t wired) { - vm_offset_t pa, opa; + vm_paddr_t pa, opa; pt_entry_t *pte; pt_entry_t origpte, newpte; pv_entry_t pv; vm_page_t mpte, om; - int rw = 0; + pt_entry_t rw = 0; if (pmap == NULL) return; @@ -1908,8 +1902,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, pmap->pm_stats.wired_count--; KASSERT(!pte_test(&origpte, PTE_D | PTE_RO), - ("%s: modified page not writable: va: %p, pte: 0x%x", - __func__, (void *)va, origpte)); + ("%s: modified page not writable: va: %p, pte: %#jx", + __func__, (void *)va, (uintmax_t)origpte)); /* * Remove extra pte reference @@ -2011,7 +2005,7 @@ validate: if (pte_test(&origpte, PTE_D)) { KASSERT(!pte_test(&origpte, PTE_RO), ("pmap_enter: modified page not writable:" - " va: %p, pte: 0x%x", (void *)va, origpte)); + " va: %p, pte: %#jx", (void *)va, (uintmax_t)origpte)); if (page_is_managed(opa)) vm_page_dirty(om); } @@ -2063,7 +2057,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ vm_prot_t prot, vm_page_t mpte) { pt_entry_t *pte; - vm_offset_t pa; + vm_paddr_t pa; KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva || (m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0, @@ -2519,7 +2513,7 @@ pmap_remove_pages(pmap_t pmap) m = PHYS_TO_VM_PAGE(TLBLO_PTE_TO_PA(tpte)); KASSERT(m != NULL, - ("pmap_remove_pages: bad tpte %x", tpte)); + ("pmap_remove_pages: bad tpte %#jx", (uintmax_t)tpte)); pv->pv_pmap->pm_stats.resident_count--; @@ -2848,7 +2842,7 @@ pmap_clear_reference(vm_page_t m) * Use XKPHYS uncached for 64 bit, and KSEG1 where possible for 32 bit. */ void * -pmap_mapdev(vm_offset_t pa, vm_size_t size) +pmap_mapdev(vm_paddr_t pa, vm_size_t size) { vm_offset_t va, tmpva, offset; @@ -2903,7 +2897,7 @@ int pmap_mincore(pmap_t pmap, vm_offset_t addr, vm_paddr_t *locked_pa) { pt_entry_t *ptep, pte; - vm_offset_t pa; + vm_paddr_t pa; vm_page_t m; int val; boolean_t managed; @@ -3066,8 +3060,8 @@ DB_SHOW_COMMAND(ptable, ddb_pid_dump) continue; pa = TLBLO_PTE_TO_PA(pte); va = ((u_long)i << SEGSHIFT) | (j << PDRSHIFT) | (k << PAGE_SHIFT); - db_printf("\t\t[%04d] va: %p pte: %8x pa:%lx\n", - k, (void *)va, pte, (u_long)pa); + db_printf("\t\t[%04d] va: %p pte: %8jx pa:%jx\n", + k, (void *)va, (uintmax_t)pte, (uintmax_t)pa); } } } @@ -3155,7 +3149,7 @@ pmap_asid_alloc(pmap) } int -page_is_managed(vm_offset_t pa) +page_is_managed(vm_paddr_t pa) { vm_offset_t pgnum = mips_btop(pa); @@ -3171,10 +3165,10 @@ page_is_managed(vm_offset_t pa) return (0); } -static int +static pt_entry_t init_pte_prot(vm_offset_t va, vm_page_t m, vm_prot_t prot) { - int rw; + pt_entry_t rw; if (!(prot & VM_PROT_WRITE)) rw = PTE_V | PTE_RO | PTE_C_CACHE; @@ -3203,7 +3197,7 @@ pmap_emulate_modified(pmap_t pmap, vm_of { vm_page_t m; pt_entry_t *pte; - vm_offset_t pa; + vm_paddr_t pa; PMAP_LOCK(pmap); pte = pmap_pte(pmap, va); Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Thu Jan 13 06:20:44 2011 (r217344) +++ head/sys/mips/mips/trap.c Thu Jan 13 06:48:43 2011 (r217345) @@ -1276,8 +1276,8 @@ log_illegal_instruction(const char *msg, if (!(pc & 3) && useracc((caddr_t)(intptr_t)pc, sizeof(int) * 4, VM_PROT_READ)) { /* dump page table entry for faulting instruction */ - log(LOG_ERR, "Page table info for pc address %#jx: pde = %p, pte = %#x\n", - (intmax_t)pc, (void *)(intptr_t)*pdep, ptep ? *ptep : 0); + log(LOG_ERR, "Page table info for pc address %#jx: pde = %p, pte = %#jx\n", + (intmax_t)pc, (void *)(intptr_t)*pdep, (uintmax_t)(ptep ? *ptep : 0)); addr = (unsigned int *)(intptr_t)pc; log(LOG_ERR, "Dumping 4 words starting at pc address %p: \n", @@ -1285,8 +1285,8 @@ log_illegal_instruction(const char *msg, log(LOG_ERR, "%08x %08x %08x %08x\n", addr[0], addr[1], addr[2], addr[3]); } else { - log(LOG_ERR, "pc address %#jx is inaccessible, pde = %p, pte = %#x\n", - (intmax_t)pc, (void *)(intptr_t)*pdep, ptep ? *ptep : 0); + log(LOG_ERR, "pc address %#jx is inaccessible, pde = %p, pte = %#jx\n", + (intmax_t)pc, (void *)(intptr_t)*pdep, (uintmax_t)(ptep ? *ptep : 0)); } } @@ -1340,8 +1340,8 @@ log_bad_page_fault(char *msg, struct tra (trap_type != T_BUS_ERR_IFETCH) && useracc((caddr_t)(intptr_t)pc, sizeof(int) * 4, VM_PROT_READ)) { /* dump page table entry for faulting instruction */ - log(LOG_ERR, "Page table info for pc address %#jx: pde = %p, pte = %#x\n", - (intmax_t)pc, (void *)(intptr_t)*pdep, ptep ? *ptep : 0); + log(LOG_ERR, "Page table info for pc address %#jx: pde = %p, pte = %#jx\n", + (intmax_t)pc, (void *)(intptr_t)*pdep, (uintmax_t)(ptep ? *ptep : 0)); addr = (unsigned int *)(intptr_t)pc; log(LOG_ERR, "Dumping 4 words starting at pc address %p: \n", @@ -1349,13 +1349,13 @@ log_bad_page_fault(char *msg, struct tra log(LOG_ERR, "%08x %08x %08x %08x\n", addr[0], addr[1], addr[2], addr[3]); } else { - log(LOG_ERR, "pc address %#jx is inaccessible, pde = %p, pte = %#x\n", - (intmax_t)pc, (void *)(intptr_t)*pdep, ptep ? *ptep : 0); + log(LOG_ERR, "pc address %#jx is inaccessible, pde = %p, pte = %#jx\n", + (intmax_t)pc, (void *)(intptr_t)*pdep, (uintmax_t)(ptep ? *ptep : 0)); } get_mapping_info((vm_offset_t)frame->badvaddr, &pdep, &ptep); - log(LOG_ERR, "Page table info for bad address %#jx: pde = %p, pte = %#x\n", - (intmax_t)frame->badvaddr, (void *)(intptr_t)*pdep, ptep ? *ptep : 0); + log(LOG_ERR, "Page table info for bad address %#jx: pde = %p, pte = %#jx\n", + (intmax_t)frame->badvaddr, (void *)(intptr_t)*pdep, (uintmax_t)(ptep ? *ptep : 0)); } From owner-svn-src-head@FreeBSD.ORG Thu Jan 13 10:31:00 2011 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 DE636106566B; Thu, 13 Jan 2011 10:31:00 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 6C1BD8FC14; Thu, 13 Jan 2011 10:30:59 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 3B06345B36; Thu, 13 Jan 2011 11:30:58 +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 B427745684; Thu, 13 Jan 2011 11:30:52 +0100 (CET) Date: Thu, 13 Jan 2011 11:30:46 +0100 From: Pawel Jakub Dawidek To: Matthew D Fleming Message-ID: <20110113103045.GB1723@garage.freebsd.pl> References: <201101122306.p0CN6clk023152@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eAbsdosE1cNLO4uF" Content-Disposition: inline In-Reply-To: <201101122306.p0CN6clk023152@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: r217332 - 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: Thu, 13 Jan 2011 10:31:01 -0000 --eAbsdosE1cNLO4uF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 12, 2011 at 11:06:38PM +0000, Matthew D Fleming wrote: > Author: mdf > Date: Wed Jan 12 23:06:38 2011 > New Revision: 217332 > URL: http://svn.freebsd.org/changeset/base/217332 >=20 > Log: > Revert cddl changes for sysctl(9) until I understand why this isn't > building on universe. Most ZFS bits are compiled to userland libzpool library. You need to add SYSCTL_UQUAD() to: cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --eAbsdosE1cNLO4uF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk0u1FUACgkQForvXbEpPzT1nQCfdJBOLpP1bU67ALXrhqnmLmT+ zncAn0llYZK4SMHTO0hMKl2pPUJx/iL1 =LGzh -----END PGP SIGNATURE----- --eAbsdosE1cNLO4uF-- From owner-svn-src-head@FreeBSD.ORG Thu Jan 13 13:04:49 2011 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 5A1001065670; Thu, 13 Jan 2011 13:04:49 +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 49AAE8FC17; Thu, 13 Jan 2011 13:04: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 p0DD4n8q051148; Thu, 13 Jan 2011 13:04:49 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0DD4naC051146; Thu, 13 Jan 2011 13:04:49 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201101131304.p0DD4naC051146@svn.freebsd.org> From: John Baldwin Date: Thu, 13 Jan 2011 13:04: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: r217349 - head/sys/dev/age 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, 13 Jan 2011 13:04:49 -0000 Author: jhb Date: Thu Jan 13 13:04:49 2011 New Revision: 217349 URL: http://svn.freebsd.org/changeset/base/217349 Log: Forgot to remove unlock of the driver lock from age_start_locked() when converting it to a locked variant. PR: kern/153948 Modified: head/sys/dev/age/if_age.c Modified: head/sys/dev/age/if_age.c ============================================================================== --- head/sys/dev/age/if_age.c Thu Jan 13 12:26:39 2011 (r217348) +++ head/sys/dev/age/if_age.c Thu Jan 13 13:04:49 2011 (r217349) @@ -1760,8 +1760,6 @@ age_start_locked(struct ifnet *ifp) /* Set a timeout in case the chip goes out to lunch. */ sc->age_watchdog_timer = AGE_TX_TIMEOUT; } - - AGE_UNLOCK(sc); } static void From owner-svn-src-head@FreeBSD.ORG Thu Jan 13 14:15:37 2011 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 F3A49106566B; Thu, 13 Jan 2011 14:15:36 +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 E304F8FC1E; Thu, 13 Jan 2011 14:15: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 p0DEFaBB052934; Thu, 13 Jan 2011 14:15:36 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0DEFaC8052932; Thu, 13 Jan 2011 14:15:36 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201101131415.p0DEFaC8052932@svn.freebsd.org> From: John Baldwin Date: Thu, 13 Jan 2011 14:15: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: r217350 - head/sys/dev/usb 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, 13 Jan 2011 14:15:37 -0000 Author: jhb Date: Thu Jan 13 14:15:36 2011 New Revision: 217350 URL: http://svn.freebsd.org/changeset/base/217350 Log: Use software interrupt priorities for USB kthreads instead of hardware interrupt priorities. Reviewed by: hps MFC after: 2 weeks Modified: head/sys/dev/usb/usb_process.h Modified: head/sys/dev/usb/usb_process.h ============================================================================== --- head/sys/dev/usb/usb_process.h Thu Jan 13 13:04:49 2011 (r217349) +++ head/sys/dev/usb/usb_process.h Thu Jan 13 14:15:36 2011 (r217350) @@ -27,11 +27,13 @@ #ifndef _USB_PROCESS_H_ #define _USB_PROCESS_H_ +#include #include +#include /* defines */ -#define USB_PRI_HIGH PI_NET -#define USB_PRI_MED PI_DISK +#define USB_PRI_HIGH PI_SWI(SWI_NET) +#define USB_PRI_MED PI_SWI(SWI_CAMBIO) #define USB_PROC_WAIT_TIMEOUT 2 #define USB_PROC_WAIT_DRAIN 1 From owner-svn-src-head@FreeBSD.ORG Thu Jan 13 14:22:27 2011 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 6064F106566B; Thu, 13 Jan 2011 14:22:27 +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 4F8808FC14; Thu, 13 Jan 2011 14:22:27 +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 p0DEMRLb053167; Thu, 13 Jan 2011 14:22:27 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0DEMRHk053165; Thu, 13 Jan 2011 14:22:27 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201101131422.p0DEMRHk053165@svn.freebsd.org> From: John Baldwin Date: Thu, 13 Jan 2011 14:22: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: r217351 - 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: Thu, 13 Jan 2011 14:22:27 -0000 Author: jhb Date: Thu Jan 13 14:22:27 2011 New Revision: 217351 URL: http://svn.freebsd.org/changeset/base/217351 Log: Introduce two new helper macros to define the priority ranges used for interactive timeshare threads (PRI_*_INTERACTIVE) and non-interactive timeshare threads (PRI_*_BATCH) and use these instead of PRI_*_REALTIME and PRI_*_TIMESHARE. No functional change. Reviewed by: jeff Modified: head/sys/kern/sched_ule.c Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Thu Jan 13 14:15:36 2011 (r217350) +++ head/sys/kern/sched_ule.c Thu Jan 13 14:22:27 2011 (r217351) @@ -117,6 +117,15 @@ static struct td_sched td_sched0; CPU_ISSET((cpu), &(td)->td_cpuset->cs_mask) /* + * Priority ranges used for interactive and non-interactive timeshare + * threads. Interactive threads use realtime priorities. + */ +#define PRI_MIN_INTERACT PRI_MIN_REALTIME +#define PRI_MAX_INTERACT PRI_MAX_REALTIME +#define PRI_MIN_BATCH PRI_MIN_TIMESHARE +#define PRI_MAX_BATCH PRI_MAX_TIMESHARE + +/* * Cpu percentage computation macros and defines. * * SCHED_TICK_SECS: Number of seconds to average the cpu usage across. @@ -147,8 +156,8 @@ static struct td_sched td_sched0; */ #define SCHED_PRI_NRESV (PRIO_MAX - PRIO_MIN) #define SCHED_PRI_NHALF (SCHED_PRI_NRESV / 2) -#define SCHED_PRI_MIN (PRI_MIN_TIMESHARE + SCHED_PRI_NHALF) -#define SCHED_PRI_MAX (PRI_MAX_TIMESHARE - SCHED_PRI_NHALF) +#define SCHED_PRI_MIN (PRI_MIN_BATCH + SCHED_PRI_NHALF) +#define SCHED_PRI_MAX (PRI_MAX_BATCH - SCHED_PRI_NHALF) #define SCHED_PRI_RANGE (SCHED_PRI_MAX - SCHED_PRI_MIN + 1) #define SCHED_PRI_TICKS(ts) \ (SCHED_TICK_HZ((ts)) / \ @@ -194,7 +203,7 @@ static int preempt_thresh = PRI_MIN_KERN #else static int preempt_thresh = 0; #endif -static int static_boost = PRI_MIN_TIMESHARE; +static int static_boost = PRI_MIN_BATCH; static int sched_idlespins = 10000; static int sched_idlespinthresh = 16; @@ -393,15 +402,15 @@ sched_shouldpreempt(int pri, int cpri, i if (pri <= preempt_thresh) return (1); /* - * If we're realtime or better and there is timeshare or worse running - * preempt only remote processors. + * If we're interactive or better and there is non-interactive + * or worse running preempt only remote processors. */ - if (remote && pri <= PRI_MAX_REALTIME && cpri > PRI_MAX_REALTIME) + if (remote && pri <= PRI_MAX_INTERACT && cpri > PRI_MAX_INTERACT) return (1); return (0); } -#define TS_RQ_PPQ (((PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE) + 1) / RQ_NQS) +#define TS_RQ_PPQ (((PRI_MAX_BATCH - PRI_MIN_BATCH) + 1) / RQ_NQS) /* * Add a thread to the actual run-queue. Keeps transferable counts up to * date with what is actually on the run-queue. Selects the correct @@ -423,18 +432,18 @@ tdq_runq_add(struct tdq *tdq, struct thr tdq->tdq_transferable++; ts->ts_flags |= TSF_XFERABLE; } - if (pri <= PRI_MAX_REALTIME) { + if (pri < PRI_MIN_BATCH) { ts->ts_runq = &tdq->tdq_realtime; - } else if (pri <= PRI_MAX_TIMESHARE) { + } else if (pri <= PRI_MAX_BATCH) { ts->ts_runq = &tdq->tdq_timeshare; - KASSERT(pri <= PRI_MAX_TIMESHARE && pri >= PRI_MIN_TIMESHARE, + KASSERT(pri <= PRI_MAX_BATCH && pri >= PRI_MIN_BATCH, ("Invalid priority %d on timeshare runq", pri)); /* * This queue contains only priorities between MIN and MAX * realtime. Use the whole queue to represent these values. */ if ((flags & (SRQ_BORROWING|SRQ_PREEMPTED)) == 0) { - pri = (pri - PRI_MIN_TIMESHARE) / TS_RQ_PPQ; + pri = (pri - PRI_MIN_BATCH) / TS_RQ_PPQ; pri = (pri + tdq->tdq_idx) % RQ_NQS; /* * This effectively shortens the queue by one so we @@ -1205,7 +1214,7 @@ tdq_choose(struct tdq *tdq) return (td); td = runq_choose_from(&tdq->tdq_timeshare, tdq->tdq_ridx); if (td != NULL) { - KASSERT(td->td_priority >= PRI_MIN_TIMESHARE, + KASSERT(td->td_priority >= PRI_MIN_BATCH, ("tdq_choose: Invalid priority on timeshare queue %d", td->td_priority)); return (td); @@ -1405,10 +1414,10 @@ sched_priority(struct thread *td) */ score = imax(0, sched_interact_score(td) + td->td_proc->p_nice); if (score < sched_interact) { - pri = PRI_MIN_REALTIME; - pri += ((PRI_MAX_REALTIME - PRI_MIN_REALTIME + 1) / + pri = PRI_MIN_INTERACT; + pri += ((PRI_MAX_INTERACT - PRI_MIN_INTERACT + 1) / sched_interact) * score; - KASSERT(pri >= PRI_MIN_REALTIME && pri <= PRI_MAX_REALTIME, + KASSERT(pri >= PRI_MIN_INTERACT && pri <= PRI_MAX_INTERACT, ("sched_priority: invalid interactive priority %d score %d", pri, score)); } else { @@ -1416,7 +1425,7 @@ sched_priority(struct thread *td) if (td->td_sched->ts_ticks) pri += SCHED_PRI_TICKS(td->td_sched); pri += SCHED_PRI_NICE(td->td_proc->p_nice); - KASSERT(pri >= PRI_MIN_TIMESHARE && pri <= PRI_MAX_TIMESHARE, + KASSERT(pri >= PRI_MIN_BATCH && pri <= PRI_MAX_BATCH, ("sched_priority: invalid priority %d: nice %d, " "ticks %d ftick %d ltick %d tick pri %d", pri, td->td_proc->p_nice, td->td_sched->ts_ticks, From owner-svn-src-head@FreeBSD.ORG Thu Jan 13 14:42:43 2011 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 D301F1065675; Thu, 13 Jan 2011 14:42:43 +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 C1B248FC14; Thu, 13 Jan 2011 14:42: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 p0DEghIL053781; Thu, 13 Jan 2011 14:42:43 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0DEghL6053778; Thu, 13 Jan 2011 14:42:43 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201101131442.p0DEghL6053778@svn.freebsd.org> From: John Baldwin Date: Thu, 13 Jan 2011 14:42: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: r217353 - head/sys/dev/jme 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, 13 Jan 2011 14:42:43 -0000 Author: jhb Date: Thu Jan 13 14:42:43 2011 New Revision: 217353 URL: http://svn.freebsd.org/changeset/base/217353 Log: - Add a locked variant of jme_start() and invoke it directly while holding the lock instead of queueing it to a task. - Do not invoke jme_rxintr() to reclaim any unprocessed but received packets when shutting down the interface. Instead, just drop these packets to match the behavior of other drivers. - Hold the driver lock in the interrupt handler to avoid races with ioctl requests to down the interface. Reviewed by: yongari Modified: head/sys/dev/jme/if_jme.c head/sys/dev/jme/if_jmevar.h Modified: head/sys/dev/jme/if_jme.c ============================================================================== --- head/sys/dev/jme/if_jme.c Thu Jan 13 14:41:58 2011 (r217352) +++ head/sys/dev/jme/if_jme.c Thu Jan 13 14:42:43 2011 (r217353) @@ -126,8 +126,8 @@ static void jme_setwol(struct jme_softc static int jme_suspend(device_t); static int jme_resume(device_t); static int jme_encap(struct jme_softc *, struct mbuf **); -static void jme_tx_task(void *, int); static void jme_start(struct ifnet *); +static void jme_start_locked(struct ifnet *); static void jme_watchdog(struct jme_softc *); static int jme_ioctl(struct ifnet *, u_long, caddr_t); static void jme_mac_config(struct jme_softc *); @@ -882,7 +882,6 @@ jme_attach(device_t dev) ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); /* Create local taskq. */ - TASK_INIT(&sc->jme_tx_task, 1, jme_tx_task, ifp); sc->jme_tq = taskqueue_create_fast("jme_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->jme_tq); if (sc->jme_tq == NULL) { @@ -934,7 +933,6 @@ jme_detach(device_t dev) JME_UNLOCK(sc); callout_drain(&sc->jme_tick_ch); taskqueue_drain(sc->jme_tq, &sc->jme_int_task); - taskqueue_drain(sc->jme_tq, &sc->jme_tx_task); taskqueue_drain(taskqueue_swi, &sc->jme_link_task); /* Restore possibly modified station address. */ if ((sc->jme_flags & JME_FLAG_EFUSE) != 0) @@ -1872,16 +1870,18 @@ jme_encap(struct jme_softc *sc, struct m } static void -jme_tx_task(void *arg, int pending) +jme_start(struct ifnet *ifp) { - struct ifnet *ifp; + struct jme_softc *sc; - ifp = (struct ifnet *)arg; - jme_start(ifp); + sc = ifp->if_softc; + JME_LOCK(sc); + jme_start_locked(ifp); + JME_UNLOCK(sc); } static void -jme_start(struct ifnet *ifp) +jme_start_locked(struct ifnet *ifp) { struct jme_softc *sc; struct mbuf *m_head; @@ -1889,16 +1889,14 @@ jme_start(struct ifnet *ifp) sc = ifp->if_softc; - JME_LOCK(sc); + JME_LOCK_ASSERT(sc); if (sc->jme_cdata.jme_tx_cnt >= JME_TX_DESC_HIWAT) jme_txeof(sc); if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != - IFF_DRV_RUNNING || (sc->jme_flags & JME_FLAG_LINK) == 0) { - JME_UNLOCK(sc); + IFF_DRV_RUNNING || (sc->jme_flags & JME_FLAG_LINK) == 0) return; - } for (enq = 0; !IFQ_DRV_IS_EMPTY(&ifp->if_snd); ) { IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head); @@ -1937,8 +1935,6 @@ jme_start(struct ifnet *ifp) /* Set a timeout in case the chip goes out to lunch. */ sc->jme_watchdog_timer = JME_TX_TIMEOUT; } - - JME_UNLOCK(sc); } static void @@ -1964,7 +1960,7 @@ jme_watchdog(struct jme_softc *sc) if_printf(sc->jme_ifp, "watchdog timeout (missed Tx interrupts) -- recovering\n"); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - taskqueue_enqueue(sc->jme_tq, &sc->jme_tx_task); + jme_start_locked(ifp); return; } @@ -1973,7 +1969,7 @@ jme_watchdog(struct jme_softc *sc) ifp->if_drv_flags &= ~IFF_DRV_RUNNING; jme_init_locked(sc); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - taskqueue_enqueue(sc->jme_tq, &sc->jme_tx_task); + jme_start_locked(ifp); } static int @@ -2267,10 +2263,8 @@ jme_link_task(void *arg, int pending) /* XXX Drain all queued tasks. */ JME_UNLOCK(sc); taskqueue_drain(sc->jme_tq, &sc->jme_int_task); - taskqueue_drain(sc->jme_tq, &sc->jme_tx_task); JME_LOCK(sc); - jme_rxintr(sc, JME_RX_RING_CNT); if (sc->jme_cdata.jme_rxhead != NULL) m_freem(sc->jme_cdata.jme_rxhead); JME_RXCHAIN_RESET(sc); @@ -2297,7 +2291,7 @@ jme_link_task(void *arg, int pending) /* * Reuse configured Rx descriptors and reset - * procuder/consumer index. + * producer/consumer index. */ sc->jme_cdata.jme_rx_cons = 0; sc->jme_morework = 0; @@ -2376,6 +2370,7 @@ jme_int_task(void *arg, int pending) sc = (struct jme_softc *)arg; ifp = sc->jme_ifp; + JME_LOCK(sc); status = CSR_READ_4(sc, JME_INTR_STATUS); if (sc->jme_morework != 0) { sc->jme_morework = 0; @@ -2410,19 +2405,18 @@ jme_int_task(void *arg, int pending) CSR_WRITE_4(sc, JME_RXCSR, sc->jme_rxcsr | RXCSR_RX_ENB | RXCSR_RXQ_START); } - /* - * Reclaiming Tx buffers are deferred to make jme(4) run - * without locks held. - */ if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - taskqueue_enqueue(sc->jme_tq, &sc->jme_tx_task); + jme_start_locked(ifp); } if (more != 0 || (CSR_READ_4(sc, JME_INTR_STATUS) & JME_INTRS) != 0) { taskqueue_enqueue(sc->jme_tq, &sc->jme_int_task); + JME_UNLOCK(sc); return; } done: + JME_UNLOCK(sc); + /* Reenable interrupts. */ CSR_WRITE_4(sc, JME_INTR_MASK_SET, JME_INTRS); } @@ -2524,6 +2518,8 @@ jme_rxeof(struct jme_softc *sc) uint32_t flags, status; int cons, count, nsegs; + JME_LOCK_ASSERT(sc); + ifp = sc->jme_ifp; cons = sc->jme_cdata.jme_rx_cons; @@ -2635,7 +2631,9 @@ jme_rxeof(struct jme_softc *sc) ifp->if_ipackets++; /* Pass it on. */ + JME_UNLOCK(sc); (*ifp->if_input)(ifp, m); + JME_LOCK(sc); /* Reset mbuf chains. */ JME_RXCHAIN_RESET(sc); Modified: head/sys/dev/jme/if_jmevar.h ============================================================================== --- head/sys/dev/jme/if_jmevar.h Thu Jan 13 14:41:58 2011 (r217352) +++ head/sys/dev/jme/if_jmevar.h Thu Jan 13 14:42:43 2011 (r217353) @@ -221,7 +221,6 @@ struct jme_softc { volatile int jme_morework; struct task jme_int_task; - struct task jme_tx_task; struct task jme_link_task; struct taskqueue *jme_tq; struct mtx jme_mtx; From owner-svn-src-head@FreeBSD.ORG Thu Jan 13 15:17:29 2011 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 D1A151065695; Thu, 13 Jan 2011 15:17:29 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF3008FC0A; Thu, 13 Jan 2011 15:17: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 p0DFHTIK054593; Thu, 13 Jan 2011 15:17:29 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0DFHT0I054581; Thu, 13 Jan 2011 15:17:29 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201101131517.p0DFHT0I054581@svn.freebsd.org> From: "Jayachandran C." Date: Thu, 13 Jan 2011 15:17: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: r217354 - in head/sys/mips: include mips rmi 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, 13 Jan 2011 15:17:29 -0000 Author: jchandra Date: Thu Jan 13 15:17:29 2011 New Revision: 217354 URL: http://svn.freebsd.org/changeset/base/217354 Log: Support for 64 bit PTEs on n32 and n64 compilation. In n32 and n64, add support for physical address above 4GB by having 64 bit page table entries and physical addresses. Major changes are: - param.h: update PTE sizes, masks and shift values to support 64 bit PTEs. - param.h: remove DELAY(), mips_btop(same as atop), mips_ptob (same as ptoa), and reformat. - param.h: remove casting to unsigned long in trunc_page and round_page since this will be used on physical addresses. - _types.h: have 64 bit __vm_paddr_t for n32. - pte.h: update TLB LO0/1 access macros to support 64 bit PTE - pte.h: assembly macros for PTE operations. - proc.h: md_upte is now 64 bit for n32 and n64. - exception.S and swtch.S: use the new PTE macros for PTE operations. - cpufunc.h: TLB_LO0/1 registers are 64bit for n32 and n64. - xlr_machdep.c: Add memory segments above 4GB to phys_avail[] as they are supported now. Reviewed by: jmallett (earlier version) Modified: head/sys/mips/include/_types.h head/sys/mips/include/cpufunc.h head/sys/mips/include/param.h head/sys/mips/include/proc.h head/sys/mips/include/pte.h head/sys/mips/mips/dump_machdep.c head/sys/mips/mips/exception.S head/sys/mips/mips/machdep.c head/sys/mips/mips/pmap.c head/sys/mips/mips/swtch.S head/sys/mips/rmi/xlr_machdep.c Modified: head/sys/mips/include/_types.h ============================================================================== --- head/sys/mips/include/_types.h Thu Jan 13 14:42:43 2011 (r217353) +++ head/sys/mips/include/_types.h Thu Jan 13 15:17:29 2011 (r217354) @@ -133,13 +133,17 @@ typedef __uint32_t __u_register_t; #endif #ifdef __LP64__ typedef __uint64_t __vm_offset_t; -typedef __uint64_t __vm_paddr_t; typedef __uint64_t __vm_size_t; #else typedef __uint32_t __vm_offset_t; -typedef __uint32_t __vm_paddr_t; typedef __uint32_t __vm_size_t; #endif +#if defined(__LP64__) || defined(__mips_n32) /* PHYSADDR_64_BIT */ +typedef __uint64_t __vm_paddr_t; +#else +typedef __uint32_t __vm_paddr_t; +#endif + typedef __int64_t __vm_ooffset_t; typedef __uint64_t __vm_pindex_t; Modified: head/sys/mips/include/cpufunc.h ============================================================================== --- head/sys/mips/include/cpufunc.h Thu Jan 13 14:42:43 2011 (r217353) +++ head/sys/mips/include/cpufunc.h Thu Jan 13 15:17:29 2011 (r217354) @@ -138,11 +138,13 @@ mips_wr_ ## n (uint64_t a0) \ #if defined(__mips_n64) MIPS_RW64_COP0(excpc, MIPS_COP_0_EXC_PC); -MIPS_RW64_COP0(entrylo0, MIPS_COP_0_TLB_LO0); -MIPS_RW64_COP0(entrylo1, MIPS_COP_0_TLB_LO1); MIPS_RW64_COP0(entryhi, MIPS_COP_0_TLB_HI); MIPS_RW64_COP0(pagemask, MIPS_COP_0_TLB_PG_MASK); #endif +#if defined(__mips_n64) || defined(__mips_n32) /* PHYSADDR_64_BIT */ +MIPS_RW64_COP0(entrylo0, MIPS_COP_0_TLB_LO0); +MIPS_RW64_COP0(entrylo1, MIPS_COP_0_TLB_LO1); +#endif MIPS_RW64_COP0(xcontext, MIPS_COP_0_TLB_XCONTEXT); #undef MIPS_RW64_COP0 @@ -221,11 +223,13 @@ MIPS_RW32_COP0(status, MIPS_COP_0_STATUS /* XXX: Some of these registers are specific to MIPS32. */ #if !defined(__mips_n64) -MIPS_RW32_COP0(entrylo0, MIPS_COP_0_TLB_LO0); -MIPS_RW32_COP0(entrylo1, MIPS_COP_0_TLB_LO1); MIPS_RW32_COP0(entryhi, MIPS_COP_0_TLB_HI); MIPS_RW32_COP0(pagemask, MIPS_COP_0_TLB_PG_MASK); #endif +#if !defined(__mips_n64) && !defined(__mips_n32) /* !PHYSADDR_64_BIT */ +MIPS_RW32_COP0(entrylo0, MIPS_COP_0_TLB_LO0); +MIPS_RW32_COP0(entrylo1, MIPS_COP_0_TLB_LO1); +#endif MIPS_RW32_COP0(prid, MIPS_COP_0_PRID); /* XXX 64-bit? */ MIPS_RW32_COP0_SEL(ebase, MIPS_COP_0_PRID, 1); Modified: head/sys/mips/include/param.h ============================================================================== --- head/sys/mips/include/param.h Thu Jan 13 14:42:43 2011 (r217353) +++ head/sys/mips/include/param.h Thu Jan 13 15:17:29 2011 (r217354) @@ -116,31 +116,39 @@ #define CACHE_LINE_SHIFT 6 #define CACHE_LINE_SIZE (1 << CACHE_LINE_SHIFT) -#define PAGE_SHIFT 12 /* LOG2(PAGE_SIZE) */ -#define PAGE_SIZE (1<> (PAGE_SHIFT - DEV_BSHIFT)) +#define ctod(x) ((x) << (PAGE_SHIFT - DEV_BSHIFT)) +#define dtoc(x) ((x) >> (PAGE_SHIFT - DEV_BSHIFT)) /* * Map a ``block device block'' to a file system block. @@ -160,24 +168,17 @@ * field from the disk label. * For now though just use DEV_BSIZE. */ -#define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE/DEV_BSIZE)) +#define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE/DEV_BSIZE)) /* * Mach derived conversion macros */ -#define round_page(x) (((unsigned long)(x) + PAGE_MASK) & ~PAGE_MASK) -#define trunc_page(x) ((unsigned long)(x) & ~PAGE_MASK) - -#define atop(x) ((unsigned long)(x) >> PAGE_SHIFT) -#define ptoa(x) ((unsigned long)(x) << PAGE_SHIFT) - -#define mips_btop(x) ((unsigned long)(x) >> PAGE_SHIFT) -#define mips_ptob(x) ((unsigned long)(x) << PAGE_SHIFT) +#define round_page(x) (((x) + PAGE_MASK) & ~PAGE_MASK) +#define trunc_page(x) ((x) & ~PAGE_MASK) -#define pgtok(x) ((unsigned long)(x) * (PAGE_SIZE / 1024)) +#define atop(x) ((x) >> PAGE_SHIFT) +#define ptoa(x) ((x) << PAGE_SHIFT) -#ifndef _KERNEL -#define DELAY(n) { register int N = (n); while (--N > 0); } -#endif /* !_KERNEL */ +#define pgtok(x) ((x) * (PAGE_SIZE / 1024)) #endif /* !_MIPS_INCLUDE_PARAM_H_ */ Modified: head/sys/mips/include/proc.h ============================================================================== --- head/sys/mips/include/proc.h Thu Jan 13 14:42:43 2011 (r217353) +++ head/sys/mips/include/proc.h Thu Jan 13 15:17:29 2011 (r217354) @@ -43,17 +43,21 @@ * Machine-dependent part of the proc structure. */ struct mdthread { - int md_flags; /* machine-dependent flags */ - int md_upte[KSTACK_PAGES]; /* ptes for mapping u pcb */ - int md_ss_addr; /* single step address for ptrace */ - int md_ss_instr; /* single step instruction for ptrace */ + int md_flags; /* machine-dependent flags */ +#if defined(__mips_n64) || defined(__mips_n32) /* PHYSADDR_64_BIT */ + uint64_t md_upte[KSTACK_PAGES]; /* ptes for mapping u pcb */ +#else + int md_upte[KSTACK_PAGES]; +#endif + int md_ss_addr; /* single step address for ptrace */ + int md_ss_instr; /* single step instruction for ptrace */ register_t md_saved_intr; - u_int md_spinlock_count; + u_int md_spinlock_count; /* The following is CPU dependent, but kept in for compatibility */ - int md_pc_ctrl; /* performance counter control */ - int md_pc_count; /* performance counter */ - int md_pc_spill; /* performance counter spill */ - void *md_tls; + int md_pc_ctrl; /* performance counter control */ + int md_pc_count; /* performance counter */ + int md_pc_spill; /* performance counter spill */ + void *md_tls; }; /* md_flags */ Modified: head/sys/mips/include/pte.h ============================================================================== --- head/sys/mips/include/pte.h Thu Jan 13 14:42:43 2011 (r217353) +++ head/sys/mips/include/pte.h Thu Jan 13 15:17:29 2011 (r217354) @@ -30,8 +30,11 @@ #define _MACHINE_PTE_H_ #ifndef _LOCORE -/* pt_entry_t is 32 bit for now, has to be made 64 bit for n64 */ +#if defined(__mips_n64) || defined(__mips_n32) /* PHYSADDR_64_BIT */ +typedef uint64_t pt_entry_t; +#else typedef uint32_t pt_entry_t; +#endif typedef pt_entry_t *pd_entry_t; #endif @@ -61,10 +64,15 @@ typedef pt_entry_t *pd_entry_t; * written as anything, but otherwise they have as much meaning as * other 0 fields. */ +#if defined(__mips_n64) || defined(__mips_n32) /* PHYSADDR_64_BIT */ +#define TLBLO_SWBITS_SHIFT (34) +#define TLBLO_PFN_MASK 0x3FFFFFFC0ULL +#else #define TLBLO_SWBITS_SHIFT (30) -#define TLBLO_SWBITS_MASK (0x3U << TLBLO_SWBITS_SHIFT) -#define TLBLO_PFN_SHIFT (6) #define TLBLO_PFN_MASK (0x3FFFFFC0) +#endif +#define TLBLO_PFN_SHIFT (6) +#define TLBLO_SWBITS_MASK ((pt_entry_t)0x3 << TLBLO_SWBITS_SHIFT) #define TLBLO_PA_TO_PFN(pa) ((((pa) >> TLB_PAGE_SHIFT) << TLBLO_PFN_SHIFT) & TLBLO_PFN_MASK) #define TLBLO_PFN_TO_PA(pfn) ((vm_paddr_t)((pfn) >> TLBLO_PFN_SHIFT) << TLB_PAGE_SHIFT) #define TLBLO_PTE_TO_PFN(pte) ((pte) & TLBLO_PFN_MASK) @@ -96,10 +104,10 @@ typedef pt_entry_t *pd_entry_t; #define TLBHI_ENTRY(va, asid) ((TLBHI_VA_R((va))) /* Region. */ | \ (TLBHI_VA_TO_VPN2((va))) /* VPN2. */ | \ ((asid) & TLBHI_ASID_MASK)) -#else +#else /* !defined(__mips_n64) */ #define TLBHI_PAGE_MASK (2 * PAGE_SIZE - 1) #define TLBHI_ENTRY(va, asid) (((va) & ~TLBHI_PAGE_MASK) | ((asid) & TLBHI_ASID_MASK)) -#endif +#endif /* defined(__mips_n64) */ /* * TLB flags managed in hardware: @@ -112,12 +120,12 @@ typedef pt_entry_t *pd_entry_t; * in EVERY address space, and to ignore the ASID when * it is matched. */ -#define PTE_C(attr) ((attr & 0x07) << 3) -#define PTE_C_UNCACHED (PTE_C(MIPS_CCA_UNCACHED)) -#define PTE_C_CACHE (PTE_C(MIPS_CCA_CACHED)) -#define PTE_D 0x04 -#define PTE_V 0x02 -#define PTE_G 0x01 +#define PTE_C(attr) ((attr & 0x07) << 3) +#define PTE_C_UNCACHED (PTE_C(MIPS_CCA_UNCACHED)) +#define PTE_C_CACHE (PTE_C(MIPS_CCA_CACHED)) +#define PTE_D 0x04 +#define PTE_V 0x02 +#define PTE_G 0x01 /* * VM flags managed in software: @@ -125,8 +133,8 @@ typedef pt_entry_t *pd_entry_t; * listen to requests to write to it. * W: Wired. ??? */ -#define PTE_RO (0x01 << TLBLO_SWBITS_SHIFT) -#define PTE_W (0x02 << TLBLO_SWBITS_SHIFT) +#define PTE_RO ((pt_entry_t)0x01 << TLBLO_SWBITS_SHIFT) +#define PTE_W ((pt_entry_t)0x02 << TLBLO_SWBITS_SHIFT) /* * PTE management functions for bits defined above. @@ -135,4 +143,33 @@ typedef pt_entry_t *pd_entry_t; #define pte_set(pte, bit) (*(pte) |= (bit)) #define pte_test(pte, bit) ((*(pte) & (bit)) == (bit)) +/* Assembly support for PTE access*/ +#ifdef LOCORE +#if defined(__mips_n64) || defined(__mips_n32) /* PHYSADDR_64_BIT */ +#define PTESHIFT 3 +#define PTE2MASK 0xff0 /* for the 2-page lo0/lo1 */ +#define PTEMASK 0xff8 +#define PTESIZE 8 +#define PTE_L ld +#define PTE_MTC0 dmtc0 +#define CLEAR_PTE_SWBITS(pr) +#else +#define PTESHIFT 2 +#define PTE2MASK 0xff8 /* for the 2-page lo0/lo1 */ +#define PTEMASK 0xffc +#define PTESIZE 4 +#define PTE_L lw +#define PTE_MTC0 mtc0 +#define CLEAR_PTE_SWBITS(r) sll r, 2; srl r, 2 /* remove 2 high bits */ +#endif /* defined(__mips_n64) || defined(__mips_n32) */ + +#if defined(__mips_n64) +#define PTRSHIFT 3 +#define PDEPTRMASK 0xff8 +#else +#define PTRSHIFT 2 +#define PDEPTRMASK 0xffc +#endif + +#endif /* LOCORE */ #endif /* !_MACHINE_PTE_H_ */ Modified: head/sys/mips/mips/dump_machdep.c ============================================================================== --- head/sys/mips/mips/dump_machdep.c Thu Jan 13 14:42:43 2011 (r217353) +++ head/sys/mips/mips/dump_machdep.c Thu Jan 13 15:17:29 2011 (r217354) @@ -182,7 +182,7 @@ cb_dumpdata(struct md_pa *mdp, int seqnr counter &= (1<<24) - 1; } - error = dump_write(di, (void *)(pa),0, dumplo, sz); + error = dump_write(di, (void *)(intptr_t)(pa),0, dumplo, sz); /* XXX fix PA */ if (error) break; dumplo += sz; Modified: head/sys/mips/mips/exception.S ============================================================================== --- head/sys/mips/mips/exception.S Thu Jan 13 14:42:43 2011 (r217353) +++ head/sys/mips/mips/exception.S Thu Jan 13 15:17:29 2011 (r217354) @@ -66,28 +66,13 @@ #include "assym.s" -/* - * Clear the software-managed bits in a PTE in register pr. - */ -#define CLEAR_PTE_SWBITS(pr) \ - sll pr, 2 ; \ - srl pr, 2 # keep bottom 30 bits - - .set noreorder # Noreorder is default style! + .set noreorder # Noreorder is default style! /* * Reasonable limit */ #define INTRCNT_COUNT 128 -/* Pointer size and mask for n64 */ -#if defined(__mips_n64) -#define PTRSHIFT 3 -#define PTRMASK 0xff8 -#else -#define PTRSHIFT 2 -#define PTRMASK 0xffc -#endif /* *---------------------------------------------------------------------------- @@ -131,7 +116,7 @@ MipsDoTLBMiss: GET_CPU_PCPU(k1) PTR_L k1, PC_SEGBASE(k1) beqz k1, 2f #05: make sure segbase is not null - andi k0, k0, PTRMASK #06: k0=seg offset + andi k0, k0, PDEPTRMASK #06: k0=seg offset PTR_ADDU k1, k0, k1 #07: k1=seg entry address PTR_L k1, 0(k1) #08: k1=seg entry @@ -139,22 +124,22 @@ MipsDoTLBMiss: beq k1, zero, 2f #0a: ==0 -- no page table #ifdef __mips_n64 PTR_SRL k0, PDRSHIFT - PTRSHIFT # k0=VPN - andi k0, k0, PTRMASK # k0=pde offset + andi k0, k0, PDEPTRMASK # k0=pde offset PTR_ADDU k1, k0, k1 # k1=pde entry address PTR_L k1, 0(k1) # k1=pde entry MFC0 k0, MIPS_COP_0_BAD_VADDR # k0=bad address (again) beq k1, zero, 2f # ==0 -- no page table #endif - PTR_SRL k0, PAGE_SHIFT - 2 #0b: k0=VPN (aka va>>10) - andi k0, k0, 0xff8 #0c: k0=page tab offset + PTR_SRL k0, PAGE_SHIFT - PTESHIFT #0b: k0=VPN (aka va>>10) + andi k0, k0, PTE2MASK #0c: k0=page tab offset PTR_ADDU k1, k1, k0 #0d: k1=pte address - lw k0, 0(k1) #0e: k0=lo0 pte - lw k1, 4(k1) #0f: k1=lo0 pte + PTE_L k0, 0(k1) #0e: k0=lo0 pte + PTE_L k1, PTESIZE(k1) #0f: k1=lo0 pte CLEAR_PTE_SWBITS(k0) - MTC0 k0, MIPS_COP_0_TLB_LO0 #12: lo0 is loaded + PTE_MTC0 k0, MIPS_COP_0_TLB_LO0 #12: lo0 is loaded COP0_SYNC CLEAR_PTE_SWBITS(k1) - MTC0 k1, MIPS_COP_0_TLB_LO1 #15: lo1 is loaded + PTE_MTC0 k1, MIPS_COP_0_TLB_LO1 #15: lo1 is loaded COP0_SYNC tlbwr #1a: write to tlb HAZARD_DELAY @@ -824,7 +809,7 @@ NLEAF(MipsTLBInvalidException) PTR_SRL k0, SEGSHIFT - PTRSHIFT # k0=seg offset (almost) beq k1, zero, MipsKernGenException # ==0 -- no seg tab - andi k0, k0, PTRMASK # k0=seg offset + andi k0, k0, PDEPTRMASK #06: k0=seg offset PTR_ADDU k1, k0, k1 # k1=seg entry address PTR_L k1, 0(k1) # k1=seg entry @@ -836,7 +821,7 @@ NLEAF(MipsTLBInvalidException) MFC0 k0, MIPS_COP_0_BAD_VADDR PTR_SRL k0, PDRSHIFT - PTRSHIFT # k0=pde offset (almost) beq k1, zero, MipsKernGenException # ==0 -- no pde tab - andi k0, k0, PTRMASK # k0=pde offset + andi k0, k0, PDEPTRMASK # k0=pde offset PTR_ADDU k1, k0, k1 # k1=pde entry address PTR_L k1, 0(k1) # k1=pde entry @@ -845,10 +830,10 @@ NLEAF(MipsTLBInvalidException) nop #endif MFC0 k0, MIPS_COP_0_BAD_VADDR # k0=bad address (again) - PTR_SRL k0, PAGE_SHIFT - 2 # k0=VPN - andi k0, k0, 0xffc # k0=page tab offset + PTR_SRL k0, PAGE_SHIFT - PTESHIFT # k0=VPN + andi k0, k0, PTEMASK # k0=page tab offset PTR_ADDU k1, k1, k0 # k1=pte address - lw k0, 0(k1) # k0=this PTE + PTE_L k0, 0(k1) # k0=this PTE /* Validate page table entry. */ andi k0, PTE_V @@ -856,30 +841,30 @@ NLEAF(MipsTLBInvalidException) nop /* Check whether this is an even or odd entry. */ - andi k0, k1, 4 + andi k0, k1, PTESIZE bnez k0, odd_page nop - lw k0, 0(k1) - lw k1, 4(k1) + PTE_L k0, 0(k1) + PTE_L k1, PTESIZE(k1) CLEAR_PTE_SWBITS(k0) - MTC0 k0, MIPS_COP_0_TLB_LO0 + PTE_MTC0 k0, MIPS_COP_0_TLB_LO0 COP0_SYNC CLEAR_PTE_SWBITS(k1) - MTC0 k1, MIPS_COP_0_TLB_LO1 + PTE_MTC0 k1, MIPS_COP_0_TLB_LO1 COP0_SYNC b tlb_insert_entry nop odd_page: - lw k0, -4(k1) - lw k1, 0(k1) + PTE_L k0, -PTESIZE(k1) + PTE_L k1, 0(k1) CLEAR_PTE_SWBITS(k0) - MTC0 k0, MIPS_COP_0_TLB_LO0 + PTE_MTC0 k0, MIPS_COP_0_TLB_LO0 COP0_SYNC CLEAR_PTE_SWBITS(k1) - MTC0 k1, MIPS_COP_0_TLB_LO1 + PTE_MTC0 k1, MIPS_COP_0_TLB_LO1 COP0_SYNC tlb_insert_entry: @@ -999,29 +984,29 @@ NLEAF(MipsTLBMissException) PTR_SRL k0, SEGSHIFT - PTRSHIFT # k0=seg offset (almost) PTR_L k1, %lo(kernel_segmap)(k1) # k1=segment tab base beq k1, zero, MipsKernGenException # ==0 -- no seg tab - andi k0, k0, PTRMASK # k0=seg offset + andi k0, k0, PDEPTRMASK #06: k0=seg offset PTR_ADDU k1, k0, k1 # k1=seg entry address PTR_L k1, 0(k1) # k1=seg entry MFC0 k0, MIPS_COP_0_BAD_VADDR # k0=bad address (again) beq k1, zero, MipsKernGenException # ==0 -- no page table #ifdef __mips_n64 PTR_SRL k0, PDRSHIFT - PTRSHIFT # k0=VPN - andi k0, k0, PTRMASK # k0=pde offset + andi k0, k0, PDEPTRMASK # k0=pde offset PTR_ADDU k1, k0, k1 # k1=pde entry address PTR_L k1, 0(k1) # k1=pde entry MFC0 k0, MIPS_COP_0_BAD_VADDR # k0=bad address (again) beq k1, zero, MipsKernGenException # ==0 -- no page table #endif - PTR_SRL k0, PAGE_SHIFT - 2 # k0=VPN - andi k0, k0, 0xff8 # k0=page tab offset + PTR_SRL k0, PAGE_SHIFT - PTESHIFT # k0=VPN + andi k0, k0, PTE2MASK # k0=page tab offset PTR_ADDU k1, k1, k0 # k1=pte address - lw k0, 0(k1) # k0=lo0 pte - lw k1, 4(k1) # k1=lo1 pte + PTE_L k0, 0(k1) # k0=lo0 pte + PTE_L k1, PTESIZE(k1) # k1=lo1 pte CLEAR_PTE_SWBITS(k0) - MTC0 k0, MIPS_COP_0_TLB_LO0 # lo0 is loaded + PTE_MTC0 k0, MIPS_COP_0_TLB_LO0 # lo0 is loaded COP0_SYNC CLEAR_PTE_SWBITS(k1) - MTC0 k1, MIPS_COP_0_TLB_LO1 # lo1 is loaded + PTE_MTC0 k1, MIPS_COP_0_TLB_LO1 # lo1 is loaded COP0_SYNC tlbwr # write to tlb HAZARD_DELAY Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Thu Jan 13 14:42:43 2011 (r217353) +++ head/sys/mips/mips/machdep.c Thu Jan 13 15:17:29 2011 (r217354) @@ -205,8 +205,9 @@ cpu_startup(void *dummy) vm_ksubmap_init(&kmi); - printf("avail memory = %lu (%luMB)\n", ptoa(cnt.v_free_count), - ptoa(cnt.v_free_count) / 1048576); + printf("avail memory = %ju (%juMB)\n", + ptoa((uintmax_t)cnt.v_free_count), + ptoa((uintmax_t)cnt.v_free_count) / 1048576); cpu_init_interrupts(); /* Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Thu Jan 13 14:42:43 2011 (r217353) +++ head/sys/mips/mips/pmap.c Thu Jan 13 15:17:29 2011 (r217354) @@ -3151,7 +3151,7 @@ pmap_asid_alloc(pmap) int page_is_managed(vm_paddr_t pa) { - vm_offset_t pgnum = mips_btop(pa); + vm_offset_t pgnum = atop(pa); if (pgnum >= first_page) { vm_page_t m; Modified: head/sys/mips/mips/swtch.S ============================================================================== --- head/sys/mips/mips/swtch.S Thu Jan 13 14:42:43 2011 (r217353) +++ head/sys/mips/mips/swtch.S Thu Jan 13 15:17:29 2011 (r217354) @@ -91,6 +91,7 @@ #define RESTORE_U_PCB_CONTEXT(reg, offs, base) \ REG_L reg, U_PCB_CONTEXT + (SZREG * offs) (base) + /* * Setup for and return to user. */ @@ -284,8 +285,8 @@ blocked_loop: PTR_LI s0, MIPS_KSEG2_START # If Uarea addr is below kseg2, #endif bltu v0, s0, sw2 # no need to insert in TLB. - lw a1, TD_UPTE + 0(s7) # a1 = u. pte #0 - lw a2, TD_UPTE + 4(s7) # a2 = u. pte #1 + PTE_L a1, TD_UPTE + 0(s7) # a1 = u. pte #0 + PTE_L a2, TD_UPTE + PTESIZE(s7) # a2 = u. pte #1 /* * Wiredown the USPACE of newproc in TLB entry#0. Check whether target * USPACE is already in another place of TLB before that, and if so @@ -306,8 +307,8 @@ blocked_loop: sll s0, PAGE_SHIFT + 1 addu t1, s0 MTC0 t1, MIPS_COP_0_TLB_HI - mtc0 zero, MIPS_COP_0_TLB_LO0 - mtc0 zero, MIPS_COP_0_TLB_LO1 + PTE_MTC0 zero, MIPS_COP_0_TLB_LO0 + PTE_MTC0 zero, MIPS_COP_0_TLB_LO1 HAZARD_DELAY tlbwi HAZARD_DELAY @@ -317,9 +318,9 @@ entry0set: /* SMP!! - Works only for unshared TLB case - i.e. no v-cpus */ mtc0 zero, MIPS_COP_0_TLB_INDEX # TLB entry #0 HAZARD_DELAY - mtc0 a1, MIPS_COP_0_TLB_LO0 # upte[0] + PTE_MTC0 a1, MIPS_COP_0_TLB_LO0 # upte[0] HAZARD_DELAY - mtc0 a2, MIPS_COP_0_TLB_LO1 # upte[1] + PTE_MTC0 a2, MIPS_COP_0_TLB_LO1 # upte[1] HAZARD_DELAY tlbwi # set TLB entry #0 HAZARD_DELAY Modified: head/sys/mips/rmi/xlr_machdep.c ============================================================================== --- head/sys/mips/rmi/xlr_machdep.c Thu Jan 13 14:42:43 2011 (r217353) +++ head/sys/mips/rmi/xlr_machdep.c Thu Jan 13 15:17:29 2011 (r217354) @@ -365,6 +365,7 @@ xlr_mem_init(void) dump_avail[0] = phys_avail[0]; dump_avail[1] = phys_avail[1]; } else { +#if !defined(__mips_n64) && !defined(__mips_n32) /* !PHYSADDR_64_BIT */ /* * In 32 bit physical address mode we cannot use * mem > 0xffffffff @@ -383,6 +384,7 @@ xlr_mem_init(void) printf("Memory: start %#jx limited to 4GB\n", (intmax_t)boot_map->physmem_map[i].addr); } +#endif /* !PHYSADDR_64_BIT */ phys_avail[j] = (vm_paddr_t) boot_map->physmem_map[i].addr; phys_avail[j + 1] = phys_avail[j] + From owner-svn-src-head@FreeBSD.ORG Thu Jan 13 16:29:27 2011 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 C8EC0106566C; Thu, 13 Jan 2011 16:29:27 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D5008FC15; Thu, 13 Jan 2011 16:29:27 +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 p0DGTR9u056400; Thu, 13 Jan 2011 16:29:27 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0DGTRMW056398; Thu, 13 Jan 2011 16:29:27 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201101131629.p0DGTRMW056398@svn.freebsd.org> From: Sergey Kandaurov Date: Thu, 13 Jan 2011 16:29: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: r217357 - head/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: Thu, 13 Jan 2011 16:29:27 -0000 Author: pluknet Date: Thu Jan 13 16:29:27 2011 New Revision: 217357 URL: http://svn.freebsd.org/changeset/base/217357 Log: Embed a quota error message (C string) into uprintf() fmt. While here, fix whitespaces. Approved by: kib (mentor) Modified: head/sys/ufs/ufs/ufs_quota.c Modified: head/sys/ufs/ufs/ufs_quota.c ============================================================================== --- head/sys/ufs/ufs/ufs_quota.c Thu Jan 13 16:13:53 2011 (r217356) +++ head/sys/ufs/ufs/ufs_quota.c Thu Jan 13 16:29:27 2011 (r217357) @@ -238,9 +238,9 @@ chkdq(struct inode *ip, ufs2_daddr_t cha dq->dq_flags |= DQ_MOD; DQI_UNLOCK(dq); if (warn) - uprintf("\n%s: warning, %s %s\n", - ITOV(ip)->v_mount->mnt_stat.f_mntonname, - quotatypes[i], "disk quota exceeded"); + uprintf("\n%s: warning, %s disk quota exceeded\n", + ITOV(ip)->v_mount->mnt_stat.f_mntonname, + quotatypes[i]); } return (0); } @@ -289,10 +289,10 @@ chkdqchg(struct inode *ip, ufs2_daddr_t ip->i_uid == cred->cr_uid) { dq->dq_flags |= DQ_BLKS; DQI_UNLOCK(dq); - uprintf("\n%s: write failed, %s %s\n", + uprintf("\n%s: write failed, %s " + "disk quota exceeded for too long\n", ITOV(ip)->v_mount->mnt_stat.f_mntonname, - quotatypes[type], - "disk quota exceeded for too long"); + quotatypes[type]); return (EDQUOT); } DQI_UNLOCK(dq); @@ -384,9 +384,9 @@ chkiq(struct inode *ip, int change, stru dq->dq_flags |= DQ_MOD; DQI_UNLOCK(dq); if (warn) - uprintf("\n%s: warning, %s %s\n", - ITOV(ip)->v_mount->mnt_stat.f_mntonname, - quotatypes[i], "inode quota exceeded"); + uprintf("\n%s: warning, %s inode quota exceeded\n", + ITOV(ip)->v_mount->mnt_stat.f_mntonname, + quotatypes[i]); } return (0); } @@ -434,10 +434,10 @@ chkiqchg(struct inode *ip, int change, s ip->i_uid == cred->cr_uid) { dq->dq_flags |= DQ_INODS; DQI_UNLOCK(dq); - uprintf("\n%s: write failed, %s %s\n", - ITOV(ip)->v_mount->mnt_stat.f_mntonname, - quotatypes[type], - "inode quota exceeded for too long"); + uprintf("\n%s: write failed, %s " + "inode quota exceeded for too long\n", + ITOV(ip)->v_mount->mnt_stat.f_mntonname, + quotatypes[type]); return (EDQUOT); } DQI_UNLOCK(dq); From owner-svn-src-head@FreeBSD.ORG Thu Jan 13 16:37:12 2011 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 93EBE106566B; Thu, 13 Jan 2011 16:37:12 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 775A18FC0A; Thu, 13 Jan 2011 16:37: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 p0DGbC6x056618; Thu, 13 Jan 2011 16:37:12 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0DGbCkX056616; Thu, 13 Jan 2011 16:37:12 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201101131637.p0DGbCkX056616@svn.freebsd.org> From: Weongyo Jeong Date: Thu, 13 Jan 2011 16:37: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: r217358 - head/usr.sbin/usbdump 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, 13 Jan 2011 16:37:12 -0000 Author: weongyo Date: Thu Jan 13 16:37:12 2011 New Revision: 217358 URL: http://svn.freebsd.org/changeset/base/217358 Log: Documents OUTPUT formats. While I'm here cleans up styles and words. Reviewed by: brueffer@ Modified: head/usr.sbin/usbdump/usbdump.8 Modified: head/usr.sbin/usbdump/usbdump.8 ============================================================================== --- head/usr.sbin/usbdump/usbdump.8 Thu Jan 13 16:29:27 2011 (r217357) +++ head/usr.sbin/usbdump/usbdump.8 Thu Jan 13 16:37:12 2011 (r217358) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 14, 2010 +.Dd December 4, 2010 .Dt usbdump 8 .Os .Sh NAME @@ -41,24 +41,29 @@ .Sh DESCRIPTION The .Nm -utility provides a way to dump USB packets on each host controller. +utility provides a way to dump USB packets on host controllers. .Pp -The following options are accepted. +The following options are accepted: .Bl -tag -width ".Fl f Ar file" .It Fl i Ar ifname -Listen on USB bus interface. +Listen on USB bus interface +.Ar ifname . .It Fl r Ar file -Read the raw packets from file. +Read the raw packets from +.Ar file . .It Fl s Ar snaplen -Snapshot bytes from each packet. +Snapshot +.Ar snaplen +bytes from each packet. .It Fl v Enable debugging messages. -When it defined multiple times the verbose level increases. +When defined multiple times the verbosity level increases. .It Fl w Ar file -Write the raw packets to file. +Write the raw packets to +.Ar file . .El .Sh EXAMPLES -Captures the USB raw packets alive on usbus2: +Captures USB raw packets on usbus2: .Pp .Dl "usbdump -i usbus2 -s 256 -v" .Pp @@ -67,11 +72,61 @@ size limit: .Pp .Dl "usbdump -i usbus2 -s 0 -w /tmp/dump_pkts" .Pp -Read the USB raw packets from the file: +Read the USB raw packets from previous file: .Pp .Dl "usbdump -r /tmp/dump_pkts -v" +.Sh OUTPUT FORMAT +The output format of +.Nm +is as follows: +.Pp +.Dl "