From owner-svn-src-head@FreeBSD.ORG Sun May 6 03:15:56 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id BDE25106566B; Sun, 6 May 2012 03:15:56 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from opti.dougb.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 63EAA1502EC; Sun, 6 May 2012 03:15:55 +0000 (UTC) Date: Sat, 5 May 2012 20:15:54 -0700 (PDT) From: Doug Barton To: Bruce Evans In-Reply-To: <20120505192318.T1202@besplex.bde.org> Message-ID: References: <201205041531.q44FVaYF010236@svn.freebsd.org> <20120504182200.GD1604@azathoth.lan> <4FA438C4.3080701@FreeBSD.org> <20120505192318.T1202@besplex.bde.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-message-flag: Outlook -- Not just for spreading viruses anymore! OpenPGP: id=1A1ABC84 Organization: http://SupersetSolutions.com/ MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Baptiste Daroussin , "src-committers@freebsd.org" , Garrett Cooper , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , "kmoore@freebsd.org" , Josh Paetzel Subject: Re: svn commit: r235005 - 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: Sun, 06 May 2012 03:15:56 -0000 On Sat, 5 May 2012, Bruce Evans wrote: > On Fri, 4 May 2012, Doug Barton wrote: > >> On 05/04/2012 11:22 AM, Baptiste Daroussin wrote: >>>>>>> fetch -s "${FETCHFILE}" >${SIZEFILE} >>>>>>> SIZE="`cat ${SIZEFILE}`" >>>>>>> - SIZE="`expr ${SIZE} / 1024`" >>>>>>> + SIZE=$((SIZE/1024)) >>>>> >>>>> Bug; should be '$SIZE/' >>> No this is perfectly valid >> >> Yes, that works, but it's not our usual style. However, the point is >> moot as that whole block should be reduced down to: >> >> SIZE=$(( `fetch -s "${FETCHFILE}"` / 1024 )) > > The KNF rule that there shall be spaces around binary operators should > probably apply in shell expressions too, but I don't like the spaces > on 1 side of (( and )). Shell syntax doesn't even allow spaces between > '$' ((. The "extra" spaces there are a personal style thing. I do it for 2 reasons, readability primarily, but also to distinguish arithmetic operations from $(command) style. > The rc.d style seems to be to use backquotes and not use $(cmd), but I > prefer the opposite except possibly in shell expressions like the above > so that it is easier to separate the commands from the shell expressions. Yeah, backticks over $() is also a personal style issue, for no particular good reason other than "looks better to me." :) Doug -- It's always a long day; 86400 doesn't fit into a short. 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 Sun May 6 05:49:24 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41398106564A; Sun, 6 May 2012 05:49:24 +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 2C5F38FC08; Sun, 6 May 2012 05:49:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q465nOtW098853; Sun, 6 May 2012 05:49:24 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q465nNDZ098851; Sun, 6 May 2012 05:49:23 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201205060549.q465nNDZ098851@svn.freebsd.org> From: Alexander Motin Date: Sun, 6 May 2012 05:49: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: r235069 - head/sys/geom/multipath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 May 2012 05:49:24 -0000 Author: mav Date: Sun May 6 05:49:23 2012 New Revision: 235069 URL: http://svn.freebsd.org/changeset/base/235069 Log: Fix `gmultipath configure` for big-endian machines. MFC after: 1 week Modified: head/sys/geom/multipath/g_multipath.c Modified: head/sys/geom/multipath/g_multipath.c ============================================================================== --- head/sys/geom/multipath/g_multipath.c Sat May 5 23:51:24 2012 (r235068) +++ head/sys/geom/multipath/g_multipath.c Sun May 6 05:49:23 2012 (r235069) @@ -944,7 +944,7 @@ g_multipath_ctl_configure(struct gctl_re struct g_geom *gp; struct g_consumer *cp; struct g_provider *pp; - struct g_multipath_metadata *md; + struct g_multipath_metadata md; const char *name; int error, *val; void *buf; @@ -980,14 +980,15 @@ g_multipath_ctl_configure(struct gctl_re return; } g_topology_unlock(); - md = buf = g_malloc(pp->sectorsize, M_WAITOK | M_ZERO); - strlcpy(md->md_magic, G_MULTIPATH_MAGIC, sizeof(md->md_magic)); - memcpy(md->md_uuid, sc->sc_uuid, sizeof (sc->sc_uuid)); - strlcpy(md->md_name, name, sizeof(md->md_name)); - md->md_version = G_MULTIPATH_VERSION; - md->md_size = pp->mediasize; - md->md_sectorsize = pp->sectorsize; - md->md_active_active = sc->sc_active_active; + buf = g_malloc(pp->sectorsize, M_WAITOK | M_ZERO); + strlcpy(md.md_magic, G_MULTIPATH_MAGIC, sizeof(md.md_magic)); + memcpy(md.md_uuid, sc->sc_uuid, sizeof (sc->sc_uuid)); + strlcpy(md.md_name, name, sizeof(md.md_name)); + md.md_version = G_MULTIPATH_VERSION; + md.md_size = pp->mediasize; + md.md_sectorsize = pp->sectorsize; + md.md_active_active = sc->sc_active_active; + multipath_metadata_encode(&md, buf); error = g_write_data(cp, pp->mediasize - pp->sectorsize, buf, pp->sectorsize); g_topology_lock(); From owner-svn-src-head@FreeBSD.ORG Sun May 6 05:58:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 022DA106564A; Sun, 6 May 2012 05:58:57 +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 E0BDD8FC17; Sun, 6 May 2012 05:58:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q465wuRV099199; Sun, 6 May 2012 05:58:56 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q465wuMU099195; Sun, 6 May 2012 05:58:56 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201205060558.q465wuMU099195@svn.freebsd.org> From: Juli Mallett Date: Sun, 6 May 2012 05:58: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: r235070 - head/sys/mips/gxemul X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 May 2012 05:58:57 -0000 Author: jmallett Date: Sun May 6 05:58:56 2012 New Revision: 235070 URL: http://svn.freebsd.org/changeset/base/235070 Log: Get the memory size from the gxemul mp device. Don't dump the environment if it is not present. Added: head/sys/mips/gxemul/mpreg.h (contents, props changed) Modified: head/sys/mips/gxemul/files.gxemul head/sys/mips/gxemul/gxemul_machdep.c Modified: head/sys/mips/gxemul/files.gxemul ============================================================================== --- head/sys/mips/gxemul/files.gxemul Sun May 6 05:49:23 2012 (r235069) +++ head/sys/mips/gxemul/files.gxemul Sun May 6 05:58:56 2012 (r235070) @@ -3,3 +3,6 @@ dev/gxemul/cons/gxemul_cons.c optional mips/gxemul/gxemul_machdep.c standard mips/mips/intr_machdep.c standard mips/mips/tick.c standard + +dev/gxemul/disk/gxemul_disk.c optional gxemul_disk +dev/gxemul/ether/gxemul_ether.c optional gxemul_ether Modified: head/sys/mips/gxemul/gxemul_machdep.c ============================================================================== --- head/sys/mips/gxemul/gxemul_machdep.c Sun May 6 05:49:23 2012 (r235069) +++ head/sys/mips/gxemul/gxemul_machdep.c Sun May 6 05:58:56 2012 (r235070) @@ -62,6 +62,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + extern int *edata; extern int *end; @@ -123,7 +125,6 @@ platform_start(__register_t a0, __regist int argc = a0; char **argv = (char **)a1; char **envp = (char **)a2; - unsigned int memsize = a3; int i; /* clear the BSS and SBSS segments */ @@ -152,14 +153,16 @@ platform_start(__register_t a0, __regist printf("%s ", argv[i]); printf("\n"); - printf("envp:\n"); - for (i = 0; envp[i]; i += 2) - printf("\t%s = %s\n", envp[i], envp[i+1]); - - printf("memsize = %08x\n", memsize); + if (envp != NULL) { + printf("envp:\n"); + for (i = 0; envp[i]; i += 2) + printf("\t%s = %s\n", envp[i], envp[i+1]); + } else { + printf("no envp.\n"); + } } - realmem = btoc(memsize); + realmem = btoc(GXEMUL_MP_DEV_READ(GXEMUL_MP_DEV_MEMORY)); mips_init(); mips_timer_init_params(platform_counter_freq, 0); Added: head/sys/mips/gxemul/mpreg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/gxemul/mpreg.h Sun May 6 05:58:56 2012 (r235070) @@ -0,0 +1,53 @@ +/*- + * Copyright (c) 2004-2012 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$ + */ + +#ifndef _MIPS_GXEMUL_MPREG_H_ +#define _MIPS_GXEMUL_MPREG_H_ + +#define GXEMUL_MP_DEV_BASE 0x11000000 + +#define GXEMUL_MP_DEV_WHOAMI 0x0000 +#define GXEMUL_MP_DEV_NCPUS 0x0010 +#define GXEMUL_MP_DEV_START 0x0020 +#define GXEMUL_MP_DEV_STARTADDR 0x0030 +#define GXEMUL_MP_DEV_STACK 0x0070 +#define GXEMUL_MP_DEV_MEMORY 0x0090 +#define GXEMUL_MP_DEV_IPI_ONE 0x00a0 +#define GXEMUL_MP_DEV_IPI_MANY 0x00b0 +#define GXEMUL_MP_DEV_IPI_READ 0x00c0 + +#define GXEMUL_MP_DEV_FUNCTION(f) \ + (volatile uint64_t *)MIPS_PHYS_TO_DIRECT_UNCACHED(GXEMUL_MP_DEV_BASE + (f)) +#define GXEMUL_MP_DEV_READ(f) \ + (volatile uint64_t)*GXEMUL_MP_DEV_FUNCTION(f) +#define GXEMUL_MP_DEV_WRITE(f, v) \ + *GXEMUL_MP_DEV_FUNCTION(f) = (v) + +#define GXEMUL_MP_DEV_IPI_INTERRUPT (6) + +#endif /* !_MIPS_GXEMUL_MPREG_H */ From owner-svn-src-head@FreeBSD.ORG Sun May 6 06:25:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B85EB1065673; Sun, 6 May 2012 06:25:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A474F8FC14; Sun, 6 May 2012 06:25:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q466PHtU000108; Sun, 6 May 2012 06:25:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q466PH73000106; Sun, 6 May 2012 06:25:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201205060625.q466PH73000106@svn.freebsd.org> From: Alexander Motin Date: Sun, 6 May 2012 06:25: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: r235071 - head/sbin/geom/class/raid X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 May 2012 06:25:17 -0000 Author: mav Date: Sun May 6 06:25:17 2012 New Revision: 235071 URL: http://svn.freebsd.org/changeset/base/235071 Log: Add description for GEOM RAID tunables/sysctls. MFC after: 1 week Modified: head/sbin/geom/class/raid/graid.8 Modified: head/sbin/geom/class/raid/graid.8 ============================================================================== --- head/sbin/geom/class/raid/graid.8 Sun May 6 05:58:56 2012 (r235070) +++ head/sbin/geom/class/raid/graid.8 Sun May 6 06:25:17 2012 (r235071) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 3, 2012 +.Dd May 6, 2012 .Dt GRAID 8 .Os .Sh NAME @@ -276,6 +276,33 @@ corruption! .Sh 2TiB BARRIERS Promise metadata format does not support disks above 2TiB. NVIDIA metadata format does not support volumes above 2TiB. +.Sh SYSCTL VARIABLES +The following +.Xr sysctl 8 +variable can be used to control the behavior of the +.Nm RAID +GEOM class. +.Bl -tag -width indent +.It Va kern.geom.raid.aggressive_spare : No 0 +Use any disks without metadata connected to controllers of the vendor +matching to volume metadata format as spare. +Use it with much care to not lose data if connecting unrelated disk! +.It Va kern.geom.raid.clean_time : No 5 +Mark volume as clean when idle for the specified number of seconds. +.It Va kern.geom.raid.debug : No 0 +Debug level of the +.Nm RAID +GEOM class. +.It Va kern.geom.raid.idle_threshold : No 1000000 +Time in microseconds to consider a volume idle for rebuild puroses. +.It Va kern.geom.raid.name_format : No 0 +Providers name format: 0 -- raid/r{num}, 1 -- raid/{label}. +.It Va kern.geom.raid.read_err_thresh : No 10 +Number of read errors equated to disk failure. +Write errors are always considered as disk failures. +.It Va kern.geom.raid.start_timeout : No 30 +Time to wait for missing array components on startup. +.El .Sh EXIT STATUS Exit status is 0 on success, and non-zero if the command fails. .Sh SEE ALSO From owner-svn-src-head@FreeBSD.ORG Sun May 6 07:20:48 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AD45D106566B; Sun, 6 May 2012 07:20:48 +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 982F58FC08; Sun, 6 May 2012 07:20:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q467KmhF001866; Sun, 6 May 2012 07:20:48 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q467KmWT001864; Sun, 6 May 2012 07:20:48 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201205060720.q467KmWT001864@svn.freebsd.org> From: Warner Losh Date: Sun, 6 May 2012 07:20: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: r235072 - 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: Sun, 06 May 2012 07:20:48 -0000 Author: imp Date: Sun May 6 07:20:48 2012 New Revision: 235072 URL: http://svn.freebsd.org/changeset/base/235072 Log: Fix the MACHINE_ARCH for big endian arm to be armeb. Modified: head/sys/arm/include/param.h Modified: head/sys/arm/include/param.h ============================================================================== --- head/sys/arm/include/param.h Sun May 6 06:25:17 2012 (r235071) +++ head/sys/arm/include/param.h Sun May 6 07:20:48 2012 (r235072) @@ -56,8 +56,12 @@ #define MACHINE "arm" #endif #ifndef MACHINE_ARCH +#ifdef __ARMEB__ +#define MACHINE_ARCH "armeb" +#else #define MACHINE_ARCH "arm" #endif +#endif #define MID_MACHINE MID_ARM6 #if defined(SMP) || defined(KLD_MODULE) From owner-svn-src-head@FreeBSD.ORG Sun May 6 08:28:09 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9BB851065675; Sun, 6 May 2012 08:28:09 +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 855E28FC14; Sun, 6 May 2012 08:28:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q468S9Ek004113; Sun, 6 May 2012 08:28:09 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q468S9k5004110; Sun, 6 May 2012 08:28:09 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201205060828.q468S9k5004110@svn.freebsd.org> From: Juli Mallett Date: Sun, 6 May 2012 08:28: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: r235073 - in head/sys: dev/gxemul/disk 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: Sun, 06 May 2012 08:28:09 -0000 Author: jmallett Date: Sun May 6 08:28:08 2012 New Revision: 235073 URL: http://svn.freebsd.org/changeset/base/235073 Log: Add a driver for the GXemul test machine's disk controller and disk devices. Prefer it to using an md device in the GXEMUL kernel configuration. Requested by: rwatson, theraven Added: head/sys/dev/gxemul/disk/ head/sys/dev/gxemul/disk/gxemul_disk.c (contents, props changed) head/sys/dev/gxemul/disk/gxemul_diskreg.h (contents, props changed) Modified: head/sys/mips/conf/GXEMUL Added: head/sys/dev/gxemul/disk/gxemul_disk.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/gxemul/disk/gxemul_disk.c Sun May 6 08:28:08 2012 (r235073) @@ -0,0 +1,315 @@ +/*- + * Copyright (c) 2008-2012 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$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include + +struct gxemul_disk_softc { + device_t sc_dev; + uint64_t sc_size; + struct g_geom *sc_geom; + struct g_provider *sc_provider; +}; + +static struct mtx gxemul_disk_controller_mutex; + +static g_start_t gxemul_disk_start; +static g_access_t gxemul_disk_access; + +struct g_class g_gxemul_disk_class = { + .name = "GXemul", + .version = G_VERSION, + .start = gxemul_disk_start, + .access = gxemul_disk_access, +}; + +DECLARE_GEOM_CLASS(g_gxemul_disk_class, g_gxemul_disk); + +static void gxemul_disk_identify(driver_t *, device_t); +static int gxemul_disk_probe(device_t); +static int gxemul_disk_attach(device_t); +static void gxemul_disk_attach_geom(void *, int); + +static int gxemul_disk_read(unsigned, void *, off_t); +static int gxemul_disk_size(unsigned, uint64_t *); +static int gxemul_disk_write(unsigned, const void *, off_t); + +static void +gxemul_disk_start(struct bio *bp) +{ + struct gxemul_disk_softc *sc; + unsigned diskid; + off_t offset; + uint8_t *buf; + int error; + + sc = bp->bio_to->geom->softc; + diskid = device_get_unit(sc->sc_dev); + + if ((bp->bio_length % GXEMUL_DISK_DEV_BLOCKSIZE) != 0) { + g_io_deliver(bp, EINVAL); + return; + } + + buf = bp->bio_data; + offset = bp->bio_offset; + bp->bio_resid = bp->bio_length; + while (bp->bio_resid != 0) { + switch (bp->bio_cmd) { + case BIO_READ: + mtx_lock(&gxemul_disk_controller_mutex); + error = gxemul_disk_read(diskid, buf, offset); + mtx_unlock(&gxemul_disk_controller_mutex); + break; + case BIO_WRITE: + mtx_lock(&gxemul_disk_controller_mutex); + error = gxemul_disk_write(diskid, buf, offset); + mtx_unlock(&gxemul_disk_controller_mutex); + break; + default: + g_io_deliver(bp, EOPNOTSUPP); + return; + } + if (error != 0) { + g_io_deliver(bp, error); + return; + } + + buf += GXEMUL_DISK_DEV_BLOCKSIZE; + offset += GXEMUL_DISK_DEV_BLOCKSIZE; + bp->bio_completed += GXEMUL_DISK_DEV_BLOCKSIZE; + bp->bio_resid -= GXEMUL_DISK_DEV_BLOCKSIZE; + } + + g_io_deliver(bp, 0); +} + +static int +gxemul_disk_access(struct g_provider *pp, int r, int w, int e) +{ + return (0); +} + +static void +gxemul_disk_identify(driver_t *drv, device_t parent) +{ + unsigned diskid; + + mtx_init(&gxemul_disk_controller_mutex, "GXemul disk controller", NULL, MTX_DEF); + + mtx_lock(&gxemul_disk_controller_mutex); + for (diskid = 0; diskid < 0x100; diskid++) { + /* + * If we can read at offset 0, this disk id must be + * present enough. If we get an error, stop looking. + * Disks in GXemul are allocated linearly from 0. + */ + if (gxemul_disk_read(diskid, NULL, 0) != 0) + break; + BUS_ADD_CHILD(parent, 0, "gxemul_disk", diskid); + } + mtx_unlock(&gxemul_disk_controller_mutex); +} + +static int +gxemul_disk_probe(device_t dev) +{ + device_set_desc(dev, "GXemul test disk"); + + return (0); +} + +static void +gxemul_disk_attach_geom(void *arg, int flag) +{ + struct gxemul_disk_softc *sc; + + sc = arg; + + sc->sc_geom = g_new_geomf(&g_gxemul_disk_class, "%s", device_get_nameunit(sc->sc_dev)); + sc->sc_geom->softc = sc; + + sc->sc_provider = g_new_providerf(sc->sc_geom, sc->sc_geom->name); + sc->sc_provider->sectorsize = GXEMUL_DISK_DEV_BLOCKSIZE; + sc->sc_provider->mediasize = sc->sc_size; + g_error_provider(sc->sc_provider, 0); +} + +static int +gxemul_disk_attach(device_t dev) +{ + struct gxemul_disk_softc *sc; + unsigned diskid; + int error; + + diskid = device_get_unit(dev); + + sc = device_get_softc(dev); + sc->sc_dev = dev; + sc->sc_geom = NULL; + sc->sc_provider = NULL; + + mtx_lock(&gxemul_disk_controller_mutex); + error = gxemul_disk_size(diskid, &sc->sc_size); + if (error != 0) { + mtx_unlock(&gxemul_disk_controller_mutex); + return (error); + } + mtx_unlock(&gxemul_disk_controller_mutex); + + g_post_event(gxemul_disk_attach_geom, sc, M_WAITOK, NULL); + + return (0); +} + +static int +gxemul_disk_read(unsigned diskid, void *buf, off_t off) +{ + const volatile void *src; + + mtx_assert(&gxemul_disk_controller_mutex, MA_OWNED); + + if (off < 0 || off % GXEMUL_DISK_DEV_BLOCKSIZE != 0) + return (EINVAL); + + GXEMUL_DISK_DEV_WRITE(GXEMUL_DISK_DEV_OFFSET, (uint64_t)off); + GXEMUL_DISK_DEV_WRITE(GXEMUL_DISK_DEV_DISKID, diskid); + GXEMUL_DISK_DEV_WRITE(GXEMUL_DISK_DEV_START, GXEMUL_DISK_DEV_START_READ); + switch (GXEMUL_DISK_DEV_READ(GXEMUL_DISK_DEV_STATUS)) { + case GXEMUL_DISK_DEV_STATUS_FAILURE: + return (EIO); + default: + break; + } + + if (buf != NULL) { + src = GXEMUL_DISK_DEV_FUNCTION(GXEMUL_DISK_DEV_BLOCK); + memcpy(buf, (const void *)(uintptr_t)src, + GXEMUL_DISK_DEV_BLOCKSIZE); + } + + return (0); +} + +static int +gxemul_disk_size(unsigned diskid, uint64_t *sizep) +{ + uint64_t offset, ogood; + uint64_t m, s; + int error; + + m = 1; + s = 3; + ogood = 0; + + for (;;) { + offset = (ogood * s) + (m * GXEMUL_DISK_DEV_BLOCKSIZE); + + error = gxemul_disk_read(diskid, NULL, offset); + if (error != 0) { + if (m == 1 && s == 1) { + *sizep = ogood + GXEMUL_DISK_DEV_BLOCKSIZE; + return (0); + } + if (m > 1) + m /= 2; + if (s > 1) + s--; + continue; + } + if (ogood == offset) { + m = 1; + continue; + } + ogood = offset; + m++; + } + + return (EDOOFUS); +} + +static int +gxemul_disk_write(unsigned diskid, const void *buf, off_t off) +{ + volatile void *dst; + + mtx_assert(&gxemul_disk_controller_mutex, MA_OWNED); + + if (off < 0 || off % GXEMUL_DISK_DEV_BLOCKSIZE != 0) + return (EINVAL); + + GXEMUL_DISK_DEV_WRITE(GXEMUL_DISK_DEV_OFFSET, (uint64_t)off); + GXEMUL_DISK_DEV_WRITE(GXEMUL_DISK_DEV_DISKID, diskid); + + dst = GXEMUL_DISK_DEV_FUNCTION(GXEMUL_DISK_DEV_BLOCK); + memcpy((void *)(uintptr_t)dst, buf, GXEMUL_DISK_DEV_BLOCKSIZE); + + GXEMUL_DISK_DEV_WRITE(GXEMUL_DISK_DEV_START, GXEMUL_DISK_DEV_START_READ); + switch (GXEMUL_DISK_DEV_READ(GXEMUL_DISK_DEV_STATUS)) { + case GXEMUL_DISK_DEV_STATUS_FAILURE: + return (EIO); + default: + break; + } + + return (0); +} + +static device_method_t gxemul_disk_methods[] = { + DEVMETHOD(device_probe, gxemul_disk_probe), + DEVMETHOD(device_identify, gxemul_disk_identify), + DEVMETHOD(device_attach, gxemul_disk_attach), + + { 0, 0 } +}; + +static driver_t gxemul_disk_driver = { + "gxemul_disk", + gxemul_disk_methods, + sizeof (struct gxemul_disk_softc) +}; + +static devclass_t gxemul_disk_devclass; +DRIVER_MODULE(gxemul_disk, nexus, gxemul_disk_driver, gxemul_disk_devclass, 0, 0); Added: head/sys/dev/gxemul/disk/gxemul_diskreg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/gxemul/disk/gxemul_diskreg.h Sun May 6 08:28:08 2012 (r235073) @@ -0,0 +1,57 @@ +/*- + * Copyright (c) 2008-2012 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$ + */ + +#ifndef _DEV_GXEMUL_DISK_GXEMUL_DISK_H_ +#define _DEV_GXEMUL_DISK_GXEMUL_DISK_H_ + +#define GXEMUL_DISK_DEV_BASE (0x13000000) + +#define GXEMUL_DISK_DEV_BLOCKSIZE (0x0200) + +#define GXEMUL_DISK_DEV_ID_START (0x0000) +#define GXEMUL_DISK_DEV_ID_END (0x0100) + +#define GXEMUL_DISK_DEV_OFFSET (0x0000) +#define GXEMUL_DISK_DEV_DISKID (0x0010) +#define GXEMUL_DISK_DEV_START (0x0020) +#define GXEMUL_DISK_DEV_STATUS (0x0030) +#define GXEMUL_DISK_DEV_BLOCK (0x4000) + +#define GXEMUL_DISK_DEV_FUNCTION(f) \ + (volatile uint64_t *)MIPS_PHYS_TO_DIRECT_UNCACHED(GXEMUL_DISK_DEV_BASE + (f)) +#define GXEMUL_DISK_DEV_READ(f) \ + (volatile uint64_t)*GXEMUL_DISK_DEV_FUNCTION(f) +#define GXEMUL_DISK_DEV_WRITE(f, v) \ + *GXEMUL_DISK_DEV_FUNCTION(f) = (v) + +#define GXEMUL_DISK_DEV_START_READ (0x00) +#define GXEMUL_DISK_DEV_START_WRITE (0x01) + +#define GXEMUL_DISK_DEV_STATUS_FAILURE (0x00) + +#endif /* !_DEV_GXEMUL_DISK_GXEMUL_DISK_H_ */ Modified: head/sys/mips/conf/GXEMUL ============================================================================== --- head/sys/mips/conf/GXEMUL Sun May 6 07:20:48 2012 (r235072) +++ head/sys/mips/conf/GXEMUL Sun May 6 08:28:08 2012 (r235073) @@ -37,16 +37,10 @@ options INVARIANT_SUPPORT #Extra sanity #options WITNESS #Enable checks to detect deadlocks and cycles #options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed -# -# This kernel configuration uses an embedded 8MB memory root file system. -# Adjust the following path based on local requirements. -# -options MD_ROOT # MD is a potential root device -options MD_ROOT_SIZE=8192 -#makeoptions MFS_IMAGE=/local/scratch/rnw24/mdroot.img -options ROOTDEVNAME=\"ufs:md0\" +options ROOTDEVNAME=\"ufs:gxemul_disk0\" device gxemul_cons +device gxemul_disk device md device loop device random From owner-svn-src-head@FreeBSD.ORG Sun May 6 11:02:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5A9511065674; Sun, 6 May 2012 11:02:54 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 44D008FC0A; Sun, 6 May 2012 11:02:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q46B2suX011147; Sun, 6 May 2012 11:02:54 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q46B2sXj011142; Sun, 6 May 2012 11:02:54 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201205061102.q46B2sXj011142@svn.freebsd.org> From: Michael Tuexen Date: Sun, 6 May 2012 11:02:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235075 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 May 2012 11:02:54 -0000 Author: tuexen Date: Sun May 6 11:02:53 2012 New Revision: 235075 URL: http://svn.freebsd.org/changeset/base/235075 Log: Add support for SCTP_SEND_FAILED_EVENT as required by RFC 6458. MFC after: 3 days Modified: head/sys/netinet/sctp.h head/sys/netinet/sctp_uio.h head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp.h ============================================================================== --- head/sys/netinet/sctp.h Sun May 6 08:31:57 2012 (r235074) +++ head/sys/netinet/sctp.h Sun May 6 11:02:53 2012 (r235075) @@ -526,7 +526,7 @@ struct sctp_error_unrecognized_chunk { #define SCTP_PCB_FLAGS_RECVASSOCEVNT 0x00000800 #define SCTP_PCB_FLAGS_RECVPADDREVNT 0x00001000 #define SCTP_PCB_FLAGS_RECVPEERERR 0x00002000 -#define SCTP_PCB_FLAGS_RECVSENDFAILEVNT 0x00004000 +#define SCTP_PCB_FLAGS_RECVSENDFAILEVNT 0x00004000 /* deprecated */ #define SCTP_PCB_FLAGS_RECVSHUTDOWNEVNT 0x00008000 #define SCTP_PCB_FLAGS_ADAPTATIONEVNT 0x00010000 #define SCTP_PCB_FLAGS_PDAPIEVNT 0x00020000 @@ -542,6 +542,7 @@ struct sctp_error_unrecognized_chunk { #define SCTP_PCB_FLAGS_RECVNXTINFO 0x10000000 #define SCTP_PCB_FLAGS_ASSOC_RESETEVNT 0x20000000 #define SCTP_PCB_FLAGS_STREAM_CHANGEEVNT 0x40000000 +#define SCTP_PCB_FLAGS_RECVNSENDFAILEVNT 0x80000000 /*- * mobility_features parameters (by micchie).Note Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Sun May 6 08:31:57 2012 (r235074) +++ head/sys/netinet/sctp_uio.h Sun May 6 11:02:53 2012 (r235075) @@ -343,7 +343,7 @@ struct sctp_remote_error { uint8_t sre_data[4]; }; -/* data send failure event */ +/* data send failure event (deprecated) */ struct sctp_send_failed { uint16_t ssf_type; uint16_t ssf_flags; @@ -354,6 +354,17 @@ struct sctp_send_failed { uint8_t ssf_data[]; }; +/* data send failure event (not deprecated) */ +struct sctp_send_failed_event { + uint16_t ssfe_type; + uint16_t ssfe_flags; + uint32_t ssfe_length; + uint32_t ssfe_error; + struct sctp_sndinfo ssfe_info; + sctp_assoc_t ssfe_assoc_id; + uint8_t ssfe_data[]; +}; + /* flag that indicates state of data */ #define SCTP_DATA_UNSENT 0x0001 /* inqueue never on wire */ #define SCTP_DATA_SENT 0x0002 /* on wire at failure */ @@ -513,22 +524,22 @@ union sctp_notification { }; /* notification types */ -#define SCTP_ASSOC_CHANGE 0x0001 -#define SCTP_PEER_ADDR_CHANGE 0x0002 -#define SCTP_REMOTE_ERROR 0x0003 -#define SCTP_SEND_FAILED 0x0004 -#define SCTP_SHUTDOWN_EVENT 0x0005 -#define SCTP_ADAPTATION_INDICATION 0x0006 +#define SCTP_ASSOC_CHANGE 0x0001 +#define SCTP_PEER_ADDR_CHANGE 0x0002 +#define SCTP_REMOTE_ERROR 0x0003 +#define SCTP_SEND_FAILED 0x0004 +#define SCTP_SHUTDOWN_EVENT 0x0005 +#define SCTP_ADAPTATION_INDICATION 0x0006 /* same as above */ -#define SCTP_ADAPTION_INDICATION 0x0006 -#define SCTP_PARTIAL_DELIVERY_EVENT 0x0007 -#define SCTP_AUTHENTICATION_EVENT 0x0008 -#define SCTP_STREAM_RESET_EVENT 0x0009 -#define SCTP_SENDER_DRY_EVENT 0x000a -#define SCTP_NOTIFICATIONS_STOPPED_EVENT 0x000b /* we don't send this */ -#define SCTP_ASSOC_RESET_EVENT 0x000c -#define SCTP_STREAM_CHANGE_EVENT 0x000d - +#define SCTP_ADAPTION_INDICATION 0x0006 +#define SCTP_PARTIAL_DELIVERY_EVENT 0x0007 +#define SCTP_AUTHENTICATION_EVENT 0x0008 +#define SCTP_STREAM_RESET_EVENT 0x0009 +#define SCTP_SENDER_DRY_EVENT 0x000a +#define SCTP_NOTIFICATIONS_STOPPED_EVENT 0x000b /* we don't send this */ +#define SCTP_ASSOC_RESET_EVENT 0x000c +#define SCTP_STREAM_CHANGE_EVENT 0x000d +#define SCTP_SEND_FAILED_EVENT 0x000e /* * socket option structs */ Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Sun May 6 08:31:57 2012 (r235074) +++ head/sys/netinet/sctp_usrreq.c Sun May 6 11:02:53 2012 (r235075) @@ -2989,6 +2989,9 @@ flags_out: case SCTP_STREAM_CHANGE_EVENT: event_type = SCTP_PCB_FLAGS_STREAM_CHANGEEVNT; break; + case SCTP_SEND_FAILED_EVENT: + event_type = SCTP_PCB_FLAGS_RECVNSENDFAILEVNT; + break; default: event_type = 0; SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); @@ -5412,6 +5415,9 @@ sctp_setopt(struct socket *so, int optna case SCTP_STREAM_CHANGE_EVENT: event_type = SCTP_PCB_FLAGS_STREAM_CHANGEEVNT; break; + case SCTP_SEND_FAILED_EVENT: + event_type = SCTP_PCB_FLAGS_RECVNSENDFAILEVNT; + break; default: event_type = 0; SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sun May 6 08:31:57 2012 (r235074) +++ head/sys/netinet/sctputil.c Sun May 6 11:02:53 2012 (r235075) @@ -2798,39 +2798,66 @@ sctp_notify_send_failed(struct sctp_tcb { struct mbuf *m_notify; struct sctp_send_failed *ssf; + struct sctp_send_failed_event *ssfe; struct sctp_queued_to_read *control; int length; if ((stcb == NULL) || - sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVSENDFAILEVNT)) { + (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVSENDFAILEVNT) && + sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT))) { /* event not enabled */ return; } - m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_send_failed), 0, M_DONTWAIT, 1, MT_DATA); + if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT)) { + length = sizeof(struct sctp_send_failed_event); + } else { + length = sizeof(struct sctp_send_failed); + } + m_notify = sctp_get_mbuf_for_msg(length, 0, M_DONTWAIT, 1, MT_DATA); if (m_notify == NULL) /* no space left */ return; - length = sizeof(struct sctp_send_failed) + chk->send_size; + length += chk->send_size; length -= sizeof(struct sctp_data_chunk); SCTP_BUF_LEN(m_notify) = 0; - ssf = mtod(m_notify, struct sctp_send_failed *); - ssf->ssf_type = SCTP_SEND_FAILED; - if (error == SCTP_NOTIFY_DATAGRAM_UNSENT) - ssf->ssf_flags = SCTP_DATA_UNSENT; - else - ssf->ssf_flags = SCTP_DATA_SENT; - ssf->ssf_length = length; - ssf->ssf_error = error; - /* not exactly what the user sent in, but should be close :) */ - bzero(&ssf->ssf_info, sizeof(ssf->ssf_info)); - ssf->ssf_info.sinfo_stream = chk->rec.data.stream_number; - ssf->ssf_info.sinfo_ssn = chk->rec.data.stream_seq; - ssf->ssf_info.sinfo_flags = chk->rec.data.rcv_flags; - ssf->ssf_info.sinfo_ppid = chk->rec.data.payloadtype; - ssf->ssf_info.sinfo_context = chk->rec.data.context; - ssf->ssf_info.sinfo_assoc_id = sctp_get_associd(stcb); - ssf->ssf_assoc_id = sctp_get_associd(stcb); - + if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT)) { + ssfe = mtod(m_notify, struct sctp_send_failed_event *); + ssfe->ssfe_type = SCTP_SEND_FAILED_EVENT; + if (error == SCTP_NOTIFY_DATAGRAM_UNSENT) + ssfe->ssfe_flags = SCTP_DATA_UNSENT; + else + ssfe->ssfe_flags = SCTP_DATA_SENT; + ssfe->ssfe_length = length; + ssfe->ssfe_error = error; + /* not exactly what the user sent in, but should be close :) */ + bzero(&ssfe->ssfe_info, sizeof(ssfe->ssfe_info)); + ssfe->ssfe_info.snd_sid = chk->rec.data.stream_number; + ssfe->ssfe_info.snd_flags = chk->rec.data.rcv_flags; + ssfe->ssfe_info.snd_ppid = chk->rec.data.payloadtype; + ssfe->ssfe_info.snd_context = chk->rec.data.context; + ssfe->ssfe_info.snd_assoc_id = sctp_get_associd(stcb); + ssfe->ssfe_assoc_id = sctp_get_associd(stcb); + SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_send_failed_event); + } else { + ssf = mtod(m_notify, struct sctp_send_failed *); + ssf->ssf_type = SCTP_SEND_FAILED; + if (error == SCTP_NOTIFY_DATAGRAM_UNSENT) + ssf->ssf_flags = SCTP_DATA_UNSENT; + else + ssf->ssf_flags = SCTP_DATA_SENT; + ssf->ssf_length = length; + ssf->ssf_error = error; + /* not exactly what the user sent in, but should be close :) */ + bzero(&ssf->ssf_info, sizeof(ssf->ssf_info)); + ssf->ssf_info.sinfo_stream = chk->rec.data.stream_number; + ssf->ssf_info.sinfo_ssn = chk->rec.data.stream_seq; + ssf->ssf_info.sinfo_flags = chk->rec.data.rcv_flags; + ssf->ssf_info.sinfo_ppid = chk->rec.data.payloadtype; + ssf->ssf_info.sinfo_context = chk->rec.data.context; + ssf->ssf_info.sinfo_assoc_id = sctp_get_associd(stcb); + ssf->ssf_assoc_id = sctp_get_associd(stcb); + SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_send_failed); + } if (chk->data) { /* * trim off the sctp chunk header(it should be there) @@ -2842,7 +2869,6 @@ sctp_notify_send_failed(struct sctp_tcb } } SCTP_BUF_NEXT(m_notify) = chk->data; - SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_send_failed); /* Steal off the mbuf */ chk->data = NULL; /* @@ -2882,43 +2908,75 @@ sctp_notify_send_failed2(struct sctp_tcb { struct mbuf *m_notify; struct sctp_send_failed *ssf; + struct sctp_send_failed_event *ssfe; struct sctp_queued_to_read *control; int length; if ((stcb == NULL) || - sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVSENDFAILEVNT)) { + (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVSENDFAILEVNT) && + sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT))) { /* event not enabled */ return; } - length = sizeof(struct sctp_send_failed) + sp->length; - m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_send_failed), 0, M_DONTWAIT, 1, MT_DATA); - if (m_notify == NULL) + if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT)) { + length = sizeof(struct sctp_send_failed_event); + } else { + length = sizeof(struct sctp_send_failed); + } + m_notify = sctp_get_mbuf_for_msg(length, 0, M_DONTWAIT, 1, MT_DATA); + if (m_notify == NULL) { /* no space left */ return; + } + length += sp->length; SCTP_BUF_LEN(m_notify) = 0; - ssf = mtod(m_notify, struct sctp_send_failed *); - ssf->ssf_type = SCTP_SEND_FAILED; - if (error == SCTP_NOTIFY_DATAGRAM_UNSENT) - ssf->ssf_flags = SCTP_DATA_UNSENT; - else - ssf->ssf_flags = SCTP_DATA_SENT; - ssf->ssf_length = length; - ssf->ssf_error = error; - /* not exactly what the user sent in, but should be close :) */ - bzero(&ssf->ssf_info, sizeof(ssf->ssf_info)); - ssf->ssf_info.sinfo_stream = sp->stream; - ssf->ssf_info.sinfo_ssn = sp->strseq; - if (sp->some_taken) { - ssf->ssf_info.sinfo_flags = SCTP_DATA_LAST_FRAG; + if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT)) { + ssfe = mtod(m_notify, struct sctp_send_failed_event *); + ssfe->ssfe_type = SCTP_SEND_FAILED; + if (error == SCTP_NOTIFY_DATAGRAM_UNSENT) + ssfe->ssfe_flags = SCTP_DATA_UNSENT; + else + ssfe->ssfe_flags = SCTP_DATA_SENT; + ssfe->ssfe_length = length; + ssfe->ssfe_error = error; + /* not exactly what the user sent in, but should be close :) */ + bzero(&ssfe->ssfe_info, sizeof(ssfe->ssfe_info)); + ssfe->ssfe_info.snd_sid = sp->stream; + if (sp->some_taken) { + ssfe->ssfe_info.snd_flags = SCTP_DATA_LAST_FRAG; + } else { + ssfe->ssfe_info.snd_flags = SCTP_DATA_NOT_FRAG; + } + ssfe->ssfe_info.snd_ppid = sp->ppid; + ssfe->ssfe_info.snd_context = sp->context; + ssfe->ssfe_info.snd_assoc_id = sctp_get_associd(stcb); + ssfe->ssfe_assoc_id = sctp_get_associd(stcb); + SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_send_failed_event); } else { - ssf->ssf_info.sinfo_flags = SCTP_DATA_NOT_FRAG; + ssf = mtod(m_notify, struct sctp_send_failed *); + ssf->ssf_type = SCTP_SEND_FAILED; + if (error == SCTP_NOTIFY_DATAGRAM_UNSENT) + ssf->ssf_flags = SCTP_DATA_UNSENT; + else + ssf->ssf_flags = SCTP_DATA_SENT; + ssf->ssf_length = length; + ssf->ssf_error = error; + /* not exactly what the user sent in, but should be close :) */ + bzero(&ssf->ssf_info, sizeof(ssf->ssf_info)); + ssf->ssf_info.sinfo_stream = sp->stream; + ssf->ssf_info.sinfo_ssn = sp->strseq; + if (sp->some_taken) { + ssf->ssf_info.sinfo_flags = SCTP_DATA_LAST_FRAG; + } else { + ssf->ssf_info.sinfo_flags = SCTP_DATA_NOT_FRAG; + } + ssf->ssf_info.sinfo_ppid = sp->ppid; + ssf->ssf_info.sinfo_context = sp->context; + ssf->ssf_info.sinfo_assoc_id = sctp_get_associd(stcb); + ssf->ssf_assoc_id = sctp_get_associd(stcb); + SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_send_failed); } - ssf->ssf_info.sinfo_ppid = sp->ppid; - ssf->ssf_info.sinfo_context = sp->context; - ssf->ssf_info.sinfo_assoc_id = sctp_get_associd(stcb); - ssf->ssf_assoc_id = sctp_get_associd(stcb); SCTP_BUF_NEXT(m_notify) = sp->data; - SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_send_failed); /* Steal off the mbuf */ sp->data = NULL; From owner-svn-src-head@FreeBSD.ORG Sun May 6 11:32:37 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FDD01065670; Sun, 6 May 2012 11:32:37 +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 496D28FC08; Sun, 6 May 2012 11:32:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q46BWbtf012112; Sun, 6 May 2012 11:32:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q46BWbVq012106; Sun, 6 May 2012 11:32:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201205061132.q46BWbVq012106@svn.freebsd.org> From: Alexander Motin Date: Sun, 6 May 2012 11:32:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235076 - in head: sbin/geom/class/raid sys/geom/raid X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 May 2012 11:32:37 -0000 Author: mav Date: Sun May 6 11:32:36 2012 New Revision: 235076 URL: http://svn.freebsd.org/changeset/base/235076 Log: Add support for RAID5R. Slightly improve support for RAIDMDF. Modified: head/sbin/geom/class/raid/graid.8 head/sys/geom/raid/g_raid.c head/sys/geom/raid/g_raid.h head/sys/geom/raid/md_ddf.c head/sys/geom/raid/tr_raid5.c Modified: head/sbin/geom/class/raid/graid.8 ============================================================================== --- head/sbin/geom/class/raid/graid.8 Sun May 6 11:02:53 2012 (r235075) +++ head/sbin/geom/class/raid/graid.8 Sun May 6 11:32:36 2012 (r235076) @@ -215,7 +215,7 @@ volumes per array, partitions per disk, The following configurations are supported: RAID0 (2+ disks), RAID1 (2+ disks), RAID1E (3+ disks), RAID3 (3+ disks), RAID4 (3+ disks), RAID5 (3+ disks), RAID5E (4+ disks), RAID5EE (4+ disks), RAID5R (3+ disks), RAID6 (4+ disks), -RAIDMDF (5+ disks), RAID10 (4+ disks), SINGLE (1 disk), CONCAT (2+ disks). +RAIDMDF (4+ disks), RAID10 (4+ disks), SINGLE (1 disk), CONCAT (2+ disks). .Pp Format supports two options "BE" and "LE", that mean big-endian byte order defined by specification (default) and little-endian used by some Adaptec @@ -264,8 +264,8 @@ to be used. Full support for the following RAID levels is currently implemented: RAID0, RAID1, RAID1E, RAID10, SINGLE, CONCAT. The following RAID levels supported as read-only for volumes in optimal -state (without using redundancy): RAID4, RAID5, RAID5E, RAID5EE, RAID6, -RAIDMDF. +state (without using redundancy): RAID4, RAID5, RAID5E, RAID5EE, RAID5R, +RAID6, RAIDMDF. .Sh RAID LEVEL MIGRATION The GEOM RAID class has no support for RAID level migration, allowed by some metadata formats. Modified: head/sys/geom/raid/g_raid.c ============================================================================== --- head/sys/geom/raid/g_raid.c Sun May 6 11:02:53 2012 (r235075) +++ head/sys/geom/raid/g_raid.c Sun May 6 11:32:36 2012 (r235076) @@ -1856,6 +1856,7 @@ g_raid_create_volume(struct g_raid_softc vol->v_state = G_RAID_VOLUME_S_STARTING; vol->v_raid_level = G_RAID_VOLUME_RL_UNKNOWN; vol->v_raid_level_qualifier = G_RAID_VOLUME_RLQ_UNKNOWN; + vol->v_rotate_parity = 1; bioq_init(&vol->v_inflight); bioq_init(&vol->v_locked); LIST_INIT(&vol->v_locks); Modified: head/sys/geom/raid/g_raid.h ============================================================================== --- head/sys/geom/raid/g_raid.h Sun May 6 11:02:53 2012 (r235075) +++ head/sys/geom/raid/g_raid.h Sun May 6 11:32:36 2012 (r235076) @@ -278,7 +278,13 @@ struct g_raid_volume { u_int v_raid_level; /* Array RAID level. */ u_int v_raid_level_qualifier; /* RAID level det. */ u_int v_disks_count; /* Number of disks in array. */ + u_int v_mdf_pdisks; /* Number of parity disks + in RAIDMDF array. */ + uint16_t v_mdf_polynomial; /* Polynomial for RAIDMDF. */ + uint8_t v_mdf_method; /* Generation method for RAIDMDF. */ u_int v_strip_size; /* Array strip size. */ + u_int v_rotate_parity; /* Rotate RAID5R parity + after numer of stripes. */ u_int v_sectorsize; /* Volume sector size. */ off_t v_mediasize; /* Volume media size. */ struct bio_queue_head v_inflight; /* In-flight write requests. */ Modified: head/sys/geom/raid/md_ddf.c ============================================================================== --- head/sys/geom/raid/md_ddf.c Sun May 6 11:02:53 2012 (r235075) +++ head/sys/geom/raid/md_ddf.c Sun May 6 11:32:36 2012 (r235076) @@ -1517,7 +1517,7 @@ g_raid_md_ddf_supported(int level, int q qual != G_RAID_VOLUME_RLQ_RMDFLA && qual != G_RAID_VOLUME_RLQ_RMDFLS) return (0); - if (disks < 5) + if (disks < 4) return (0); break; case G_RAID_VOLUME_RL_RAID1E: @@ -1850,6 +1850,13 @@ g_raid_md_ddf_start(struct g_raid_volume vol->v_strip_size = vol->v_sectorsize << GET8(vmeta, vdc->Stripe_Size); vol->v_disks_count = GET16(vmeta, vdc->Primary_Element_Count) * GET8(vmeta, vdc->Secondary_Element_Count); + vol->v_mdf_pdisks = GET8(vmeta, vdc->MDF_Parity_Disks); + vol->v_mdf_polynomial = GET16(vmeta, vdc->MDF_Parity_Generator_Polynomial); + vol->v_mdf_method = GET8(vmeta, vdc->MDF_Constant_Generation_Method); + if (GET8(vmeta, vdc->Rotate_Parity_count) > 31) + vol->v_rotate_parity = 1; + else + vol->v_rotate_parity = 1 << GET8(vmeta, vdc->Rotate_Parity_count); vol->v_mediasize = GET64(vmeta, vdc->VD_Size) * vol->v_sectorsize; for (i = 0, j = 0, bvd = 0; i < vol->v_disks_count; i++, j++) { if (j == GET16(vmeta, vdc->Primary_Element_Count)) { @@ -2430,16 +2437,24 @@ g_raid_md_ctl_ddf(struct g_raid_md_objec vol->v_mediasize = size; else if (level == G_RAID_VOLUME_RL_RAID3 || level == G_RAID_VOLUME_RL_RAID4 || - level == G_RAID_VOLUME_RL_RAID5 || - level == G_RAID_VOLUME_RL_RAID5R) + level == G_RAID_VOLUME_RL_RAID5) vol->v_mediasize = size * (numdisks - 1); - else if (level == G_RAID_VOLUME_RL_RAID6 || + else if (level == G_RAID_VOLUME_RL_RAID5R) { + vol->v_mediasize = size * (numdisks - 1); + vol->v_rotate_parity = 1024; + } else if (level == G_RAID_VOLUME_RL_RAID6 || level == G_RAID_VOLUME_RL_RAID5E || level == G_RAID_VOLUME_RL_RAID5EE) vol->v_mediasize = size * (numdisks - 2); - else if (level == G_RAID_VOLUME_RL_RAIDMDF) - vol->v_mediasize = size * (numdisks - 3); - else { /* RAID1E */ + else if (level == G_RAID_VOLUME_RL_RAIDMDF) { + if (numdisks < 5) + vol->v_mdf_pdisks = 2; + else + vol->v_mdf_pdisks = 3; + vol->v_mdf_polynomial = 0x11d; + vol->v_mdf_method = 0x00; + vol->v_mediasize = size * (numdisks - vol->v_mdf_pdisks); + } else { /* RAID1E */ vol->v_mediasize = ((size * numdisks) / strip / 2) * strip; } @@ -2761,6 +2776,13 @@ g_raid_md_write_ddf(struct g_raid_md_obj SET64(vmeta, vdc->Block_Count, 0); SET64(vmeta, vdc->VD_Size, vol->v_mediasize / vol->v_sectorsize); SET16(vmeta, vdc->Block_Size, vol->v_sectorsize); + SET8(vmeta, vdc->Rotate_Parity_count, + fls(vol->v_rotate_parity) - 1); + SET8(vmeta, vdc->MDF_Parity_Disks, vol->v_mdf_pdisks); + SET16(vmeta, vdc->MDF_Parity_Generator_Polynomial, + vol->v_mdf_polynomial); + SET8(vmeta, vdc->MDF_Constant_Generation_Method, + vol->v_mdf_method); SET16(vmeta, vde->VD_Number, vol->v_global_id); if (vol->v_state <= G_RAID_VOLUME_S_BROKEN) Modified: head/sys/geom/raid/tr_raid5.c ============================================================================== --- head/sys/geom/raid/tr_raid5.c Sun May 6 11:02:53 2012 (r235075) +++ head/sys/geom/raid/tr_raid5.c Sun May 6 11:32:36 2012 (r235076) @@ -112,10 +112,11 @@ g_raid_tr_taste_raid5(struct g_raid_tr_o } else if ((tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAID5 || tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAID5E || tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAID5EE || + tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAID5R || tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAID6 || tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAIDMDF) && qual >= 0 && qual <= 3) { - /* RAID5/5E/5EE/6/MDF */ + /* RAID5/5E/5EE/5R/6/MDF */ } else return (G_RAID_TR_TASTE_FAIL); trs->trso_starting = 1; @@ -210,7 +211,7 @@ g_raid_tr_iostart_raid5_read(struct g_ra struct bio *cbp; char *addr; off_t offset, start, length, nstripe, remain; - int no, pno, ddisks, pdisks; + int no, pno, ddisks, pdisks, protate, pleft; u_int strip_size, lvl, qual; vol = tr->tro_volume; @@ -218,6 +219,7 @@ g_raid_tr_iostart_raid5_read(struct g_ra strip_size = vol->v_strip_size; lvl = tr->tro_volume->v_raid_level; qual = tr->tro_volume->v_raid_level_qualifier; + protate = tr->tro_volume->v_rotate_parity; /* Stripe number. */ nstripe = bp->bio_offset / strip_size; @@ -225,7 +227,7 @@ g_raid_tr_iostart_raid5_read(struct g_ra start = bp->bio_offset % strip_size; /* Number of data and parity disks. */ if (lvl == G_RAID_VOLUME_RL_RAIDMDF) - pdisks = 3; + pdisks = tr->tro_volume->v_mdf_pdisks; else if (lvl == G_RAID_VOLUME_RL_RAID5EE || lvl == G_RAID_VOLUME_RL_RAID6) pdisks = 2; @@ -238,8 +240,10 @@ g_raid_tr_iostart_raid5_read(struct g_ra pno = 0; else /* PN */ pno = ddisks; + pleft = -1; } else { - pno = (nstripe / ddisks) % vol->v_disks_count; + pno = (nstripe / (ddisks * protate)) % vol->v_disks_count; + pleft = protate - (nstripe / ddisks) % protate; if (qual >= 2) { /* PN/Left */ pno = ddisks - pno; if (pno < 0) @@ -281,11 +285,14 @@ g_raid_tr_iostart_raid5_read(struct g_ra } else if (qual & 1) { /* Continuation/Symmetric */ no %= vol->v_disks_count; if (no == pno) { - if (qual < 2) /* P0/Right */ - pno++; - else /* PN/Left */ - pno += vol->v_disks_count - 1; - pno %= vol->v_disks_count; + if ((--pleft) <= 0) { + pleft += protate; + if (qual < 2) /* P0/Right */ + pno++; + else /* PN/Left */ + pno += vol->v_disks_count - 1; + pno %= vol->v_disks_count; + } no = (pno + pdisks) % vol->v_disks_count; offset += strip_size; } @@ -294,11 +301,14 @@ g_raid_tr_iostart_raid5_read(struct g_ra no += pdisks; if (no >= vol->v_disks_count) { no -= vol->v_disks_count; - if (qual < 2) /* P0/Right */ - pno++; - else /* PN/Left */ - pno += vol->v_disks_count - 1; - pno %= vol->v_disks_count; + if ((--pleft) <= 0) { + pleft += protate; + if (qual < 2) /* P0/Right */ + pno++; + else /* PN/Left */ + pno += vol->v_disks_count - 1; + pno %= vol->v_disks_count; + } if (no == pno) no += pdisks; else From owner-svn-src-head@FreeBSD.ORG Sun May 6 11:37:42 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 722CE1065673; Sun, 6 May 2012 11:37:42 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52D5C8FC1C; Sun, 6 May 2012 11:37:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q46BbgWT012305; Sun, 6 May 2012 11:37:42 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q46Bbgkq012300; Sun, 6 May 2012 11:37:42 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201205061137.q46Bbgkq012300@svn.freebsd.org> From: Michael Tuexen Date: Sun, 6 May 2012 11:37: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: r235077 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 May 2012 11:37:42 -0000 Author: tuexen Date: Sun May 6 11:37:41 2012 New Revision: 235077 URL: http://svn.freebsd.org/changeset/base/235077 Log: Remove debug code. MFC after: 3 days Modified: head/sys/netinet/sctp_input.c head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sun May 6 11:32:36 2012 (r235076) +++ head/sys/netinet/sctp_input.c Sun May 6 11:37:41 2012 (r235077) @@ -785,15 +785,6 @@ sctp_handle_abort(struct sctp_abort_chun /* notify user of the abort and clean up... */ sctp_abort_notification(stcb, 0, SCTP_SO_NOT_LOCKED); /* free the tcb */ -#if defined(SCTP_PANIC_ON_ABORT) - SCTP_PRINTF("stcb:%p state:%d rport:%d net:%p\n", - stcb, stcb->asoc.state, stcb->rport, net); - if (!(stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET)) { - panic("Received an ABORT"); - } else { - SCTP_PRINTF("No panic its in state %x closed\n", stcb->asoc.state); - } -#endif SCTP_STAT_INCR_COUNTER32(sctps_aborted); if ((SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) || (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) { Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sun May 6 11:32:36 2012 (r235076) +++ head/sys/netinet/sctp_pcb.c Sun May 6 11:37:41 2012 (r235077) @@ -3426,9 +3426,6 @@ sctp_inpcb_free(struct sctp_inpcb *inp, *ippp = htonl(SCTP_FROM_SCTP_PCB + SCTP_LOC_3); } asoc->sctp_ep->last_abort_code = SCTP_FROM_SCTP_PCB + SCTP_LOC_3; -#if defined(SCTP_PANIC_ON_ABORT) - panic("inpcb_free does an abort"); -#endif sctp_send_abort_tcb(asoc, op_err, SCTP_SO_LOCKED); SCTP_STAT_INCR_COUNTER32(sctps_aborted); if ((SCTP_GET_STATE(&asoc->asoc) == SCTP_STATE_OPEN) || @@ -3520,10 +3517,6 @@ sctp_inpcb_free(struct sctp_inpcb *inp, *ippp = htonl(SCTP_FROM_SCTP_PCB + SCTP_LOC_5); } asoc->sctp_ep->last_abort_code = SCTP_FROM_SCTP_PCB + SCTP_LOC_5; -#if defined(SCTP_PANIC_ON_ABORT) - panic("inpcb_free does an abort"); -#endif - sctp_send_abort_tcb(asoc, op_err, SCTP_SO_LOCKED); SCTP_STAT_INCR_COUNTER32(sctps_aborted); if ((SCTP_GET_STATE(&asoc->asoc) == SCTP_STATE_OPEN) || @@ -3604,9 +3597,6 @@ sctp_inpcb_free(struct sctp_inpcb *inp, } asoc->sctp_ep->last_abort_code = SCTP_FROM_SCTP_PCB + SCTP_LOC_7; -#if defined(SCTP_PANIC_ON_ABORT) - panic("inpcb_free does an abort"); -#endif sctp_send_abort_tcb(asoc, op_err, SCTP_SO_LOCKED); SCTP_STAT_INCR_COUNTER32(sctps_aborted); } else if (asoc->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) { Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Sun May 6 11:32:36 2012 (r235076) +++ head/sys/netinet/sctp_usrreq.c Sun May 6 11:37:41 2012 (r235077) @@ -780,9 +780,6 @@ sctp_disconnect(struct socket *so) ph->param_type = htons(SCTP_CAUSE_USER_INITIATED_ABT); ph->param_length = htons(SCTP_BUF_LEN(err)); } -#if defined(SCTP_PANIC_ON_ABORT) - panic("disconnect does an abort"); -#endif sctp_send_abort_tcb(stcb, err, SCTP_SO_LOCKED); SCTP_STAT_INCR_COUNTER32(sctps_aborted); } @@ -888,10 +885,6 @@ sctp_disconnect(struct socket *so) ippp = (uint32_t *) (ph + 1); *ippp = htonl(SCTP_FROM_SCTP_USRREQ + SCTP_LOC_4); } -#if defined(SCTP_PANIC_ON_ABORT) - panic("disconnect does an abort"); -#endif - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_USRREQ + SCTP_LOC_4; sctp_send_abort_tcb(stcb, op_err, SCTP_SO_LOCKED); SCTP_STAT_INCR_COUNTER32(sctps_aborted); @@ -1103,9 +1096,6 @@ sctp_shutdown(struct socket *so) ippp = (uint32_t *) (ph + 1); *ippp = htonl(SCTP_FROM_SCTP_USRREQ + SCTP_LOC_6); } -#if defined(SCTP_PANIC_ON_ABORT) - panic("shutdown does an abort"); -#endif stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_USRREQ + SCTP_LOC_6; sctp_abort_an_association(stcb->sctp_ep, stcb, SCTP_RESPONSE_TO_USER_REQ, Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sun May 6 11:32:36 2012 (r235076) +++ head/sys/netinet/sctputil.c Sun May 6 11:37:41 2012 (r235077) @@ -3881,9 +3881,6 @@ sctp_abort_an_association(struct sctp_in if ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) sctp_abort_notification(stcb, error, so_locked); /* notify the peer */ -#if defined(SCTP_PANIC_ON_ABORT) - panic("aborting an association"); -#endif sctp_send_abort_tcb(stcb, op_err, so_locked); SCTP_STAT_INCR_COUNTER32(sctps_aborted); if ((SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) || From owner-svn-src-head@FreeBSD.ORG Sun May 6 11:41:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9A2A106566B; Sun, 6 May 2012 11:41:00 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D4CDE8FC1B; Sun, 6 May 2012 11:41:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q46Bf0mL012444; Sun, 6 May 2012 11:41:00 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q46Bf0F8012442; Sun, 6 May 2012 11:41:00 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201205061141.q46Bf0F8012442@svn.freebsd.org> From: Ulrich Spoerlein Date: Sun, 6 May 2012 11:41: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: r235078 - head/sys/modules/linux X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 May 2012 11:41:01 -0000 Author: uqs Date: Sun May 6 11:41:00 2012 New Revision: 235078 URL: http://svn.freebsd.org/changeset/base/235078 Log: Fix make depend Modified: head/sys/modules/linux/Makefile Modified: head/sys/modules/linux/Makefile ============================================================================== --- head/sys/modules/linux/Makefile Sun May 6 11:37:41 2012 (r235077) +++ head/sys/modules/linux/Makefile Sun May 6 11:41:00 2012 (r235078) @@ -13,8 +13,8 @@ SRCS= linux_fork.c linux${SFX}_dummy.c l linux${SFX}_machdep.c linux_mib.c linux_misc.c linux_signal.c \ linux_socket.c linux_stats.c linux_sysctl.c linux${SFX}_sysent.c \ linux${SFX}_sysvec.c linux_uid16.c linux_util.c linux_time.c \ - opt_inet6.h opt_compat.h opt_posix.h opt_usb.h vnode_if.h \ - device_if.h bus_if.h assym.s + opt_inet6.h opt_compat.h opt_kdtrace.h opt_posix.h opt_usb.h \ + vnode_if.h device_if.h bus_if.h assym.s # XXX: for assym.s SRCS+= opt_kstack_pages.h opt_nfs.h opt_compat.h opt_hwpmc_hooks.h From owner-svn-src-head@FreeBSD.ORG Sun May 6 11:48:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E010106566C; Sun, 6 May 2012 11:48:38 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EDAB28FC0A; Sun, 6 May 2012 11:48:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q46BmbFG012708; Sun, 6 May 2012 11:48:37 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q46BmbNZ012706; Sun, 6 May 2012 11:48:37 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201205061148.q46BmbNZ012706@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sun, 6 May 2012 11:48:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235079 - head/sbin/growfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 May 2012 11:48:38 -0000 Author: trasz Date: Sun May 6 11:48:37 2012 New Revision: 235079 URL: http://svn.freebsd.org/changeset/base/235079 Log: Fix offset calculation to actually rewrite the _last_ block. Modified: head/sbin/growfs/growfs.c Modified: head/sbin/growfs/growfs.c ============================================================================== --- head/sbin/growfs/growfs.c Sun May 6 11:41:00 2012 (r235078) +++ head/sbin/growfs/growfs.c Sun May 6 11:48:37 2012 (r235079) @@ -1567,9 +1567,9 @@ main(int argc, char **argv) testbuf = malloc(sblock.fs_fsize); if (testbuf == NULL) err(1, "malloc"); - rdfs((ufs2_daddr_t)((size / DEV_BSIZE) - sblock.fs_fsize), + rdfs((ufs2_daddr_t)((size - sblock.fs_fsize) / DEV_BSIZE), sblock.fs_fsize, testbuf, fsi); - wtfs((ufs2_daddr_t)((size / DEV_BSIZE) - sblock.fs_fsize), + wtfs((ufs2_daddr_t)((size - sblock.fs_fsize) / DEV_BSIZE), sblock.fs_fsize, testbuf, fso, Nflag); free(testbuf); From owner-svn-src-head@FreeBSD.ORG Sun May 6 12:55:21 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3599D106564A; Sun, 6 May 2012 12:55:21 +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 20ECA8FC0A; Sun, 6 May 2012 12:55:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q46CtKVs014826; Sun, 6 May 2012 12:55:20 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q46CtKl7014823; Sun, 6 May 2012 12:55:20 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201205061255.q46CtKl7014823@svn.freebsd.org> From: Alexander Motin Date: Sun, 6 May 2012 12:55: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: r235080 - head/sys/geom/raid X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 May 2012 12:55:21 -0000 Author: mav Date: Sun May 6 12:55:20 2012 New Revision: 235080 URL: http://svn.freebsd.org/changeset/base/235080 Log: Plug small memory leaks. Modified: head/sys/geom/raid/md_ddf.c head/sys/geom/raid/md_promise.c Modified: head/sys/geom/raid/md_ddf.c ============================================================================== --- head/sys/geom/raid/md_ddf.c Sun May 6 11:48:37 2012 (r235079) +++ head/sys/geom/raid/md_ddf.c Sun May 6 12:55:20 2012 (r235080) @@ -1228,7 +1228,7 @@ hdrerror: } done: - free(abuf, M_MD_DDF); + g_free(abuf); if (error != 0) ddf_meta_free(meta); return (error); @@ -3039,6 +3039,8 @@ g_raid_md_free_volume_ddf(struct g_raid_ mdi->mdio_starting--; callout_stop(&pv->pv_start_co); } + free(pv, M_MD_DDF); + vol->v_md_data = NULL; return (0); } Modified: head/sys/geom/raid/md_promise.c ============================================================================== --- head/sys/geom/raid/md_promise.c Sun May 6 11:48:37 2012 (r235079) +++ head/sys/geom/raid/md_promise.c Sun May 6 12:55:20 2012 (r235080) @@ -1955,6 +1955,8 @@ g_raid_md_free_volume_promise(struct g_r pv->pv_started = 1; callout_stop(&pv->pv_start_co); } + free(pv, M_MD_PROMISE); + vol->v_md_data = NULL; return (0); } From owner-svn-src-head@FreeBSD.ORG Sun May 6 13:09:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27B2C106566C; Sun, 6 May 2012 13:09:14 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EE3DE8FC16; Sun, 6 May 2012 13:09:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q46D9Dnw015281; Sun, 6 May 2012 13:09:13 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q46D9DCm015278; Sun, 6 May 2012 13:09:13 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201205061309.q46D9DCm015278@svn.freebsd.org> From: Michael Tuexen Date: Sun, 6 May 2012 13:09:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235081 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 May 2012 13:09:14 -0000 Author: tuexen Date: Sun May 6 13:09:13 2012 New Revision: 235081 URL: http://svn.freebsd.org/changeset/base/235081 Log: Add support for the sac_info field in struct sctp_assoc_change as required by RFC 6458. MFC after: 3 days Modified: head/sys/netinet/sctp_uio.h head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Sun May 6 12:55:20 2012 (r235080) +++ head/sys/netinet/sctp_uio.h Sun May 6 13:09:13 2012 (r235081) @@ -296,16 +296,23 @@ struct sctp_assoc_change { uint16_t sac_outbound_streams; uint16_t sac_inbound_streams; sctp_assoc_t sac_assoc_id; + uint8_t sac_info[]; }; /* sac_state values */ -#define SCTP_COMM_UP 0x0001 -#define SCTP_COMM_LOST 0x0002 -#define SCTP_RESTART 0x0003 -#define SCTP_SHUTDOWN_COMP 0x0004 -#define SCTP_CANT_STR_ASSOC 0x0005 - - +#define SCTP_COMM_UP 0x0001 +#define SCTP_COMM_LOST 0x0002 +#define SCTP_RESTART 0x0003 +#define SCTP_SHUTDOWN_COMP 0x0004 +#define SCTP_CANT_STR_ASSOC 0x0005 + +/* sac_info values */ +#define SCTP_ASSOC_SUPPORTS_PR 0x01 +#define SCTP_ASSOC_SUPPORTS_AUTH 0x02 +#define SCTP_ASSOC_SUPPORTS_ASCONF 0x03 +#define SCTP_ASSOC_SUPPORTS_MULTIBUF 0x04 +#define SCTP_ASSOC_SUPPORTS_RE_CONFIG 0x05 +#define SCTP_ASSOC_SUPPORTS_MAX 0x05 /* * Address event */ Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sun May 6 12:55:20 2012 (r235080) +++ head/sys/netinet/sctputil.c Sun May 6 13:09:13 2012 (r235081) @@ -2602,6 +2602,7 @@ sctp_notify_assoc_change(uint32_t event, struct mbuf *m_notify; struct sctp_assoc_change *sac; struct sctp_queued_to_read *control; + unsigned int i; #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; @@ -2666,7 +2667,22 @@ sctp_notify_assoc_change(uint32_t event, sac->sac_outbound_streams = stcb->asoc.streamoutcnt; sac->sac_inbound_streams = stcb->asoc.streamincnt; sac->sac_assoc_id = sctp_get_associd(stcb); - SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_assoc_change); + i = 0; + if (stcb->asoc.peer_supports_prsctp) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_PR; + } + if (stcb->asoc.peer_supports_auth) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_AUTH; + } + if (stcb->asoc.peer_supports_asconf) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_ASCONF; + } + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_MULTIBUF; + if (stcb->asoc.peer_supports_strreset) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_RE_CONFIG; + } + sac->sac_length += i; + SCTP_BUF_LEN(m_notify) = sac->sac_length; SCTP_BUF_NEXT(m_notify) = NULL; control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination, 0, 0, stcb->asoc.context, 0, 0, 0, From owner-svn-src-head@FreeBSD.ORG Sun May 6 14:50:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3F97106566B; Sun, 6 May 2012 14:50:54 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 93E8D8FC17; Sun, 6 May 2012 14:50:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q46EosHt018789; Sun, 6 May 2012 14:50:54 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q46EosOk018786; Sun, 6 May 2012 14:50:54 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201205061450.q46EosOk018786@svn.freebsd.org> From: Michael Tuexen Date: Sun, 6 May 2012 14:50: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: r235091 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 May 2012 14:50:54 -0000 Author: tuexen Date: Sun May 6 14:50:54 2012 New Revision: 235091 URL: http://svn.freebsd.org/changeset/base/235091 Log: Address clang warnings. MFC after: 3 days Modified: head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Sun May 6 14:23:19 2012 (r235090) +++ head/sys/netinet/sctp_usrreq.c Sun May 6 14:50:54 2012 (r235091) @@ -5838,7 +5838,6 @@ sctp_ctloutput(struct socket *so, struct { void *optval = NULL; size_t optsize = 0; - struct sctp_inpcb *inp; void *p; int error = 0; @@ -5856,12 +5855,11 @@ sctp_ctloutput(struct socket *so, struct #endif return (error); } - inp = (struct sctp_inpcb *)so->so_pcb; optsize = sopt->sopt_valsize; if (optsize) { SCTP_MALLOC(optval, void *, optsize, SCTP_M_SOCKOPT); if (optval == NULL) { - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, ENOBUFS); + SCTP_LTRACE_ERR_RET(so->so_pcb, NULL, NULL, SCTP_FROM_SCTP_USRREQ, ENOBUFS); return (ENOBUFS); } error = sooptcopyin(sopt, optval, optsize, optsize); @@ -5876,7 +5874,7 @@ sctp_ctloutput(struct socket *so, struct } else if (sopt->sopt_dir == SOPT_GET) { error = sctp_getopt(so, sopt->sopt_name, optval, &optsize, p); } else { - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); + SCTP_LTRACE_ERR_RET(so->so_pcb, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; } if ((error == 0) && (optval != NULL)) { Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sun May 6 14:23:19 2012 (r235090) +++ head/sys/netinet/sctputil.c Sun May 6 14:50:54 2012 (r235091) @@ -3288,7 +3288,8 @@ sctp_notify_stream_reset_add(struct sctp struct sctp_stream_change_event *stradd; int len; - if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_STREAM_CHANGEEVNT)) { + if ((stcb == NULL) || + (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_STREAM_CHANGEEVNT))) { /* event not enabled */ return; } @@ -3349,7 +3350,8 @@ sctp_notify_stream_reset_tsn(struct sctp struct sctp_assoc_reset_event *strasoc; int len; - if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_ASSOC_RESETEVNT)) { + if ((stcb == NULL) || + (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_ASSOC_RESETEVNT))) { /* event not enabled */ return; } @@ -3407,7 +3409,8 @@ sctp_notify_stream_reset(struct sctp_tcb struct sctp_stream_reset_event *strreset; int len; - if (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_STREAM_RESETEVNT)) { + if ((stcb == NULL) || + (sctp_stcb_is_feature_off(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_STREAM_RESETEVNT))) { /* event not enabled */ return; } From owner-svn-src-head@FreeBSD.ORG Sun May 6 16:01:59 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66438106566C; Sun, 6 May 2012 16:01:59 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 382DC8FC0C; Sun, 6 May 2012 16:01:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q46G1xrj021257; Sun, 6 May 2012 16:01:59 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q46G1xSr021254; Sun, 6 May 2012 16:01:59 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201205061601.q46G1xSr021254@svn.freebsd.org> From: Tim Kientzle Date: Sun, 6 May 2012 16:01: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: r235094 - head/sys/boot/uboot/common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 May 2012 16:01:59 -0000 Author: kientzle Date: Sun May 6 16:01:58 2012 New Revision: 235094 URL: http://svn.freebsd.org/changeset/base/235094 Log: Don't call strcmp with a NULL pointer. In particular, on the AM335x, which comes up with no memory mapped to low addresses, dereferencing the NULL causes a crash. Modified: head/sys/boot/uboot/common/main.c head/sys/boot/uboot/common/metadata.c Modified: head/sys/boot/uboot/common/main.c ============================================================================== --- head/sys/boot/uboot/common/main.c Sun May 6 15:56:07 2012 (r235093) +++ head/sys/boot/uboot/common/main.c Sun May 6 16:01:58 2012 (r235094) @@ -116,6 +116,16 @@ meminfo(void) } } +static uint64_t +uboot_loadaddr(u_int type, void *data, uint64_t addr) +{ + printf("uboot_loadaddr: type=%d data=0x%x addr=0x%x\n", + type, data, addr); + if (type == 1) + return 0x40000000; + return (addr); +} + int main(void) { @@ -211,6 +221,7 @@ main(void) archsw.arch_copyout = uboot_copyout; archsw.arch_readin = uboot_readin; archsw.arch_autoload = uboot_autoload; + archsw.arch_loadaddr = uboot_loadaddr; interact(); /* doesn't return */ Modified: head/sys/boot/uboot/common/metadata.c ============================================================================== --- head/sys/boot/uboot/common/metadata.c Sun May 6 15:56:07 2012 (r235093) +++ head/sys/boot/uboot/common/metadata.c Sun May 6 16:01:58 2012 (r235094) @@ -72,6 +72,7 @@ static int md_getboothowto(char *kargs) { char *cp; + char *p; int howto; int active; int i; @@ -132,10 +133,12 @@ md_getboothowto(char *kargs) if (getenv(howto_names[i].ev) != NULL) howto |= howto_names[i].mask; } - if (!strcmp(getenv("console"), "comconsole")) - howto |= RB_SERIAL; - if (!strcmp(getenv("console"), "nullconsole")) - howto |= RB_MUTE; + if ((p = getenv("console"))) { + if (!strcmp(p, "comconsole")) + howto |= RB_SERIAL; + if (!strcmp(p, "nullconsole")) + howto |= RB_MUTE; + } return(howto); } From owner-svn-src-head@FreeBSD.ORG Sun May 6 16:32:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 706361065670; Sun, 6 May 2012 16:32:29 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 59AEC8FC17; Sun, 6 May 2012 16:32:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q46GWTrh022273; Sun, 6 May 2012 16:32:29 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q46GWTxb022271; Sun, 6 May 2012 16:32:29 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201205061632.q46GWTxb022271@svn.freebsd.org> From: Tim Kientzle Date: Sun, 6 May 2012 16:32: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: r235095 - head/sys/boot/uboot/common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 May 2012 16:32:29 -0000 Author: kientzle Date: Sun May 6 16:32:28 2012 New Revision: 235095 URL: http://svn.freebsd.org/changeset/base/235095 Log: Ooops. Back out changes to main.c from r235094. This change is specific to BeagleBone; I need to figure out how to generalize this before committing. Modified: head/sys/boot/uboot/common/main.c Modified: head/sys/boot/uboot/common/main.c ============================================================================== --- head/sys/boot/uboot/common/main.c Sun May 6 16:01:58 2012 (r235094) +++ head/sys/boot/uboot/common/main.c Sun May 6 16:32:28 2012 (r235095) @@ -116,16 +116,6 @@ meminfo(void) } } -static uint64_t -uboot_loadaddr(u_int type, void *data, uint64_t addr) -{ - printf("uboot_loadaddr: type=%d data=0x%x addr=0x%x\n", - type, data, addr); - if (type == 1) - return 0x40000000; - return (addr); -} - int main(void) { @@ -221,7 +211,6 @@ main(void) archsw.arch_copyout = uboot_copyout; archsw.arch_readin = uboot_readin; archsw.arch_autoload = uboot_autoload; - archsw.arch_loadaddr = uboot_loadaddr; interact(); /* doesn't return */ From owner-svn-src-head@FreeBSD.ORG Sun May 6 16:41:27 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BAB30106566B; Sun, 6 May 2012 16:41:27 +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 8D4788FC0A; Sun, 6 May 2012 16:41:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q46GfRNc022587; Sun, 6 May 2012 16:41:27 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q46GfRC2022585; Sun, 6 May 2012 16:41:27 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201205061641.q46GfRC2022585@svn.freebsd.org> From: Alexander Motin Date: Sun, 6 May 2012 16:41: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: r235096 - head/sys/geom/raid X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 May 2012 16:41:27 -0000 Author: mav Date: Sun May 6 16:41:27 2012 New Revision: 235096 URL: http://svn.freebsd.org/changeset/base/235096 Log: Remove some hardcoded constants from code. Modified: head/sys/geom/raid/md_ddf.c Modified: head/sys/geom/raid/md_ddf.c ============================================================================== --- head/sys/geom/raid/md_ddf.c Sun May 6 16:32:28 2012 (r235095) +++ head/sys/geom/raid/md_ddf.c Sun May 6 16:41:27 2012 (r235096) @@ -1639,6 +1639,8 @@ g_raid_md_ddf_start_disk(struct g_raid_d g_raid_get_diskname(disk)); goto nofit; } + eoff *= pd->pd_meta.sectorsize; + esize *= pd->pd_meta.sectorsize; size = INT64_MAX; for (i = 0; i < vol->v_disks_count; i++) { sd = &vol->v_subdisks[i]; @@ -1651,16 +1653,15 @@ g_raid_md_ddf_start_disk(struct g_raid_d } if (disk_pos >= 0 && vol->v_raid_level != G_RAID_VOLUME_RL_CONCAT && - (off_t)esize * 512 < size) { + esize < size) { G_RAID_DEBUG1(1, sc, "Disk %s free space " "is too small (%ju < %ju)", - g_raid_get_diskname(disk), - (off_t)esize * 512, size); + g_raid_get_diskname(disk), esize, size); disk_pos = -1; } if (disk_pos >= 0) { if (vol->v_raid_level != G_RAID_VOLUME_RL_CONCAT) - esize = size / 512; + esize = size; md_disk_bvd = disk_pos / GET16(vmeta, vdc->Primary_Element_Count); // XXX md_disk_pos = disk_pos % GET16(vmeta, vdc->Primary_Element_Count); // XXX } else { @@ -1712,8 +1713,8 @@ nofit: g_raid_change_disk_state(disk, G_RAID_DISK_S_ACTIVE); if (resurrection) { - sd->sd_offset = (off_t)eoff * 512; - sd->sd_size = (off_t)esize * 512; + sd->sd_offset = eoff; + sd->sd_size = esize; } else if (pdmeta->cr != NULL && (vdc1 = ddf_meta_find_vdc(pdmeta, vmeta->vdc->VD_GUID)) != NULL) { val2 = (uint64_t *)&(vdc1->Physical_Disk_Sequence[GET16(vmeta, hdr->Max_Primary_Element_Entries)]); @@ -2317,6 +2318,7 @@ g_raid_md_ctl_ddf(struct g_raid_md_objec disks[i] = disk; ddf_meta_unused_range(&pd->pd_meta, &offs[i], &esize); + offs[i] *= pp->sectorsize; size = MIN(size, (off_t)esize * pp->sectorsize); sectorsize = MAX(sectorsize, pp->sectorsize); continue; @@ -2356,7 +2358,8 @@ g_raid_md_ctl_ddf(struct g_raid_md_objec cp->provider->name); /* Reserve some space for metadata. */ - size = MIN(size, pp->mediasize - 131072llu * pp->sectorsize); + size = MIN(size, GET64(&pd->pd_meta, + pdr->entry[0].Configured_Size) * pp->sectorsize); sectorsize = MAX(sectorsize, pp->sectorsize); } if (error != 0) { @@ -2466,7 +2469,7 @@ g_raid_md_ctl_ddf(struct g_raid_md_objec disk = disks[i]; sd = &vol->v_subdisks[i]; sd->sd_disk = disk; - sd->sd_offset = (off_t)offs[i] * 512; + sd->sd_offset = offs[i]; sd->sd_size = size; if (disk == NULL) continue; From owner-svn-src-head@FreeBSD.ORG Sun May 6 18:04:03 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1AC2A1065674; Sun, 6 May 2012 18:04:03 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 4DC4F8FC20; Sun, 6 May 2012 18:04:02 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id CEB6125D3A00; Sun, 6 May 2012 18:04:00 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id BABC9BE6619; Sun, 6 May 2012 18:03:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id W736mFn0vNlT; Sun, 6 May 2012 18:03:57 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id DDAEDBE6618; Sun, 6 May 2012 18:03:55 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <20120421171128.GA6732@lor.one-eyed-alien.net> Date: Sun, 6 May 2012 18:03:54 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <3D17FEF6-8CC5-4BBB-B098-BEA7D28F377D@FreeBSD.org> References: <201204202137.q3KLbhNj056524@svn.freebsd.org> <20120421171128.GA6732@lor.one-eyed-alien.net> To: Brooks Davis , Ryan Stone X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234504 - in head/sys: amd64/conf i386/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: Sun, 06 May 2012 18:04:03 -0000 On 21. Apr 2012, at 17:11 , Brooks Davis wrote: > On Sat, Apr 21, 2012 at 09:45:57AM -0400, Ryan Stone wrote: >> On Fri, Apr 20, 2012 at 5:37 PM, Brooks Davis = wrote: >>> Author: brooks >>> Date: Fri Apr 20 21:37:42 2012 >>> New Revision: 234504 >>> URL: http://svn.freebsd.org/changeset/base/234504 >>>=20 >>> Log: >>> ?Enable DTrace hooks in GENERIC. >>>=20 >>> ?Reviewed by: ?gnn >>> ?Approved by: ?core (jhb, imp) >>> ?Requested by: a cast of thousands >>> ?MFC after: ? ?3 days >>=20 >> Excellent! Thanks to everybody who helped make this happen, starting >> with the participants at dtrace.conf who gave us the requisite whacks >> with the clue-by-four. >>=20 >> However, what is our policy for enabling features in -STABLE that are >> known to be unstable? If we MFC this I don't have the slightest = worry >> that somebody might see instability in their system just because the >> hooks are all of a sudden there, but I would worry that somebody make >> take DTrace hooks being enabled in GENERIC on -STABLE to imply that >> DTrace is stable, start using it and being upset when they trip over = a >> DTrace bug. >=20 > I think we should note that it remains experimental and somewhat buggy > in the release notes and probably in the MFC message. Otherwise, it's > like any new feature. If you start using a feature in production > without extensive testing you may be surprised. I am sorry but I am close to requesting a backout now but I hope someone else might be able to debug it further, so I'll wait for another couple of days. I have heard this from multiple people and I am now at the point where I wasted almost a day or work on this over the course of two weeks. I am not able to finish HEAD snapshot release builds even after updating the underlying kernel and world to a today's HEAD (I had to disable the WITH_CTF=3D to get the kernel now booted to build). I have seen this on multiple setups for about two weeks. The common factor is always that ctfmerge is hanging forever. I have = seen this on both i386 and amd64. I have seen it with modules and with kernels built with NO_MODULES. I have seen it on NFS and on local = disks. As son as I add the # Temprary as ctfmerge hangs. nomakeoptions WITH_CTF things are fine again. At the moment it looks like this: root 34611 0.0 0.1 35908 8736 - I 4:19PM 0:00.07 ctfmerge -L = VERSION -g -o if_ath.ko.debug if_ath.o if_ath_debug.o if_ath_keycache.o = if_ath_sysctl.o if_ath_tx.o if_ath_tx_ht.o if_ath_led.o ah_osdep.o ah.o = ah_regdom root 39282 0.0 0.2 44104 14516 - I 4:20PM 0:00.06 ctfmerge -L = VERSION -g -o kernel.debug locore.o aic7xxx_reg_print.o = aic79xx_reg_print.o cam.o cam_periph.o cam_queue.o cam_sim.o cam_xpt.o = ata_all.o ata_xpt.o ata_pm root@bz1:/home/bz # procstat -k 34611 PID TID COMM TDNAME KSTACK = =20 34611 100228 ctfmerge - mi_switch = sleepq_catch_signals sleepq_wait_sig _sleep _do_lock_umutex = do_lock_umutex __umtx_op_wait_umutex amd64_syscall Xfast_syscall=20 34611 100452 ctfmerge - mi_switch = sleepq_catch_signals sleepq_wait_sig _sleep _do_lock_umutex = do_lock_umutex __umtx_op_wait_umutex amd64_syscall Xfast_syscall=20 34611 100453 ctfmerge - mi_switch = sleepq_catch_signals sleepq_wait_sig _sleep _do_lock_umutex = do_lock_umutex __umtx_op_wait_umutex amd64_syscall Xfast_syscall=20 34611 100454 ctfmerge - mi_switch = sleepq_catch_signals sleepq_wait_sig _sleep _do_lock_umutex = do_lock_umutex __umtx_op_wait_umutex amd64_syscall Xfast_syscall=20 34611 100455 ctfmerge - mi_switch = sleepq_catch_signals sleepq_wait_sig _sleep _do_lock_umutex = do_lock_umutex __umtx_op_wait_umutex amd64_syscall Xfast_syscall=20 34611 100456 ctfmerge - mi_switch = sleepq_catch_signals sleepq_wait_sig _sleep _do_lock_umutex = do_lock_umutex __umtx_op_wait_umutex amd64_syscall Xfast_syscall=20 root@bz1:/home/bz # procstat -k 39282 PID TID COMM TDNAME KSTACK = =20 39282 100348 ctfmerge - mi_switch = sleepq_catch_signals sleepq_wait_sig _sleep do_wait = __umtx_op_wait_uint_private amd64_syscall Xfast_syscall=20 39282 100457 ctfmerge - mi_switch = sleepq_catch_signals sleepq_wait_sig _sleep _do_lock_umutex = do_lock_umutex __umtx_op_wait_umutex amd64_syscall Xfast_syscall=20 39282 100458 ctfmerge - mi_switch = sleepq_catch_signals sleepq_wait_sig _sleep _do_lock_umutex = do_lock_umutex __umtx_op_wait_umutex amd64_syscall Xfast_syscall=20 39282 100459 ctfmerge - mi_switch = sleepq_catch_signals sleepq_wait_sig _sleep _do_lock_umutex = do_lock_umutex __umtx_op_wait_umutex amd64_syscall Xfast_syscall=20 39282 100460 ctfmerge - mi_switch = sleepq_catch_signals sleepq_wait_sig _sleep _do_lock_umutex = do_lock_umutex __umtx_op_wait_umutex amd64_syscall Xfast_syscall=20 39282 100461 ctfmerge - mi_switch = sleepq_catch_signals sleepq_wait_sig _sleep _do_lock_umutex = do_lock_umutex __umtx_op_wait_umutex amd64_syscall Xfast_syscall=20 root@bz1:/home/bz # procstat -t 34611 PID TID COMM TDNAME CPU PRI STATE WCHAN =20= 34611 100228 ctfmerge - 7 152 sleep umtxn = =20 34611 100452 ctfmerge - 1 152 sleep umtxn = =20 34611 100453 ctfmerge - 1 152 sleep umtxn = =20 34611 100454 ctfmerge - 4 152 sleep umtxn = =20 34611 100455 ctfmerge - 0 152 sleep umtxn = =20 34611 100456 ctfmerge - 5 152 sleep umtxn = =20 root@bz1:/home/bz # procstat -t 39282 PID TID COMM TDNAME CPU PRI STATE WCHAN =20= 39282 100348 ctfmerge - 7 152 sleep uwait = =20 39282 100457 ctfmerge - 2 152 sleep umtxn = =20 39282 100458 ctfmerge - 4 152 sleep umtxn = =20 39282 100459 ctfmerge - 1 152 sleep umtxn = =20 39282 100460 ctfmerge - 5 152 sleep umtxn = =20 39282 100461 ctfmerge - 0 152 sleep umtxn = =20 root@bz1:/home/bz # procstat -i 34611 | grep -v -- '---$' PID COMM SIG FLAGS 34611 ctfmerge INT --C 34611 ctfmerge QUIT --C 34611 ctfmerge TERM --C 34611 ctfmerge URG -I- 34611 ctfmerge TSTP -I- 34611 ctfmerge CHLD -I- 34611 ctfmerge TTIN -I- 34611 ctfmerge TTOU -I- 34611 ctfmerge IO -I- 34611 ctfmerge WINCH -I- 34611 ctfmerge INFO -I- 34611 ctfmerge 32 --C root@bz1:/home/bz # procstat -i 39282 | grep -v -- '---$' PID COMM SIG FLAGS 39282 ctfmerge INT --C 39282 ctfmerge QUIT --C 39282 ctfmerge TERM --C 39282 ctfmerge URG -I- 39282 ctfmerge TSTP -I- 39282 ctfmerge CHLD -I- 39282 ctfmerge TTIN -I- 39282 ctfmerge TTOU -I- 39282 ctfmerge IO -I- 39282 ctfmerge WINCH -I- 39282 ctfmerge INFO -I- 39282 ctfmerge 32 --C root@bz1:/home/bz # procstat -j 34611 | grep -v -- '--$' PID TID COMM SIG FLAGS 34611 100452 ctfmerge INT -B 34611 100452 ctfmerge QUIT -B 34611 100452 ctfmerge TERM -B 34611 100453 ctfmerge INT -B 34611 100453 ctfmerge QUIT -B 34611 100453 ctfmerge TERM -B 34611 100454 ctfmerge INT -B 34611 100454 ctfmerge QUIT -B 34611 100454 ctfmerge TERM -B 34611 100455 ctfmerge INT -B 34611 100455 ctfmerge QUIT -B 34611 100455 ctfmerge TERM -B 34611 100456 ctfmerge INT -B 34611 100456 ctfmerge QUIT -B 34611 100456 ctfmerge TERM -B root@bz1:/home/bz # procstat -j 39282 | grep -v -- '--$' PID TID COMM SIG FLAGS 39282 100457 ctfmerge INT -B 39282 100457 ctfmerge QUIT -B 39282 100457 ctfmerge TERM -B 39282 100458 ctfmerge INT -B 39282 100458 ctfmerge QUIT -B 39282 100458 ctfmerge TERM -B 39282 100459 ctfmerge INT -B 39282 100459 ctfmerge QUIT -B 39282 100459 ctfmerge TERM -B 39282 100460 ctfmerge INT -B 39282 100460 ctfmerge QUIT -B 39282 100460 ctfmerge TERM -B 39282 100461 ctfmerge INT -B 39282 100461 ctfmerge QUIT -B 39282 100461 ctfmerge TERM -B So given I have been upset I started to investigate some more. make -C /usr/src buildworld did not work either (no -j). So I started and limited the build to 1 core: cpuset -l 1 make -C /usr/src buildkernel did not work either. So added the nomakeoptions WITH_CTF and make -C /usr/src -j8 buildkernel completes. So removed the makeoptions WITH_CTF from GENRIC and the nomakeoptions = from my kernel including GENERIC and added it to the command line: make -C /usr/src -j8 buildkernel WITH_CTF=3D=20 and that doesn't seem to work at all anymore? "/usr/src/share/mk/bsd.own.mk", line 482: WITH_CTF and WITHOUT_CTF can't = both be set. So I did: echo WITH_CTF=3D >> /etc/src.conf make -C /usr/src -j8 buildkernel and of course it did not work again. Given all this and given it has reliably worked in the past, my = conclusions is that it must be something related to ctfmerge or = libraries? /usr/bin/ctfmerge: libctf.so.2 =3D> /lib/libctf.so.2 (0x800829000) libdwarf.so.3 =3D> /usr/lib/libdwarf.so.3 (0x800a36000) libelf.so.1 =3D> /usr/lib/libelf.so.1 (0x800c3f000) libz.so.6 =3D> /lib/libz.so.6 (0x800e58000) libthr.so.3 =3D> /lib/libthr.so.3 (0x80106e000) libc.so.7 =3D> /lib/libc.so.7 (0x801293000) What has changed the last 3ish months? /bz --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-head@FreeBSD.ORG Sun May 6 18:34:32 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0262D1065670; Sun, 6 May 2012 18:34:32 +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 E23848FC0A; Sun, 6 May 2012 18:34:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q46IYV52026278; Sun, 6 May 2012 18:34:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q46IYVAf026276; Sun, 6 May 2012 18:34:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205061834.q46IYVAf026276@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 6 May 2012 18:34:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235099 - 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: Sun, 06 May 2012 18:34:32 -0000 Author: kib Date: Sun May 6 18:34:31 2012 New Revision: 235099 URL: http://svn.freebsd.org/changeset/base/235099 Log: Add definition for the -z nodefaultlib flag. MFC after: 3 days Modified: head/sys/sys/elf_common.h Modified: head/sys/sys/elf_common.h ============================================================================== --- head/sys/sys/elf_common.h Sun May 6 18:23:19 2012 (r235098) +++ head/sys/sys/elf_common.h Sun May 6 18:34:31 2012 (r235099) @@ -480,6 +480,7 @@ typedef struct { #define DF_1_LOADFLTR 0x00000010 /* Immediate loading of filtees */ #define DF_1_NOOPEN 0x00000040 /* Do not allow loading on dlopen() */ #define DF_1_ORIGIN 0x00000080 /* Process $ORIGIN */ +#define DF_1_NODEFLIB 0x00000800 /* Do not search default paths */ /* Values for n_type. Used in core files. */ #define NT_PRSTATUS 1 /* Process status. */ From owner-svn-src-head@FreeBSD.ORG Sun May 6 19:03:37 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDEE6106566B; Sun, 6 May 2012 19:03:37 +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 6E4E78FC08; Sun, 6 May 2012 19:03:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q46J3bAe027205; Sun, 6 May 2012 19:03:37 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q46J3bVX027203; Sun, 6 May 2012 19:03:37 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201205061903.q46J3bVX027203@svn.freebsd.org> From: Sergey Kandaurov Date: Sun, 6 May 2012 19:03:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235101 - head/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 May 2012 19:03:37 -0000 Author: pluknet Date: Sun May 6 19:03:36 2012 New Revision: 235101 URL: http://svn.freebsd.org/changeset/base/235101 Log: OpenBSD 5.1 added. Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Sun May 6 19:01:18 2012 (r235100) +++ head/share/misc/bsd-family-tree Sun May 6 19:03:36 2012 (r235101) @@ -253,7 +253,7 @@ FreeBSD 5.2 | | *--FreeBSD | | | | | | 9.0 | | | | DragonFly 3.0.1 | v FreeBSD | | | | - | 8.3 | | | | + | 8.3 | | OpenBSD 5.1 | | | | | | FreeBSD 10 -current | NetBSD -current OpenBSD -current | | | | | | @@ -546,6 +546,7 @@ OpenBSD 5.0 2011-11-01 [OBD] FreeBSD 9.0 2012-01-12 [FBD] DragonFly 3.0.1 2012-02-21 [DFB] FreeBSD 8.3 2012-04-18 [FBD] +OpenBSD 5.1 2012-05-01 [OBD] Bibliography ------------------------ From owner-svn-src-head@FreeBSD.ORG Sun May 6 20:46:05 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 756CD106564A; Sun, 6 May 2012 20:46:05 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5FBA28FC12; Sun, 6 May 2012 20:46:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q46Kk5Sg031157; Sun, 6 May 2012 20:46:05 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q46Kk5Ae031154; Sun, 6 May 2012 20:46:05 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <201205062046.q46Kk5Ae031154@svn.freebsd.org> From: Stanislav Sedov Date: Sun, 6 May 2012 20:46: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: r235107 - in head/etc: defaults 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, 06 May 2012 20:46:05 -0000 Author: stas Date: Sun May 6 20:46:04 2012 New Revision: 235107 URL: http://svn.freebsd.org/changeset/base/235107 Log: - Change kfd rc script to be more conformant with rcNG conventions: o change rcname to kfd; o move mandatory options to command_args; o add missing "shutdown" keyword; o fix require line. Kfd doesn't really need to be started before daemons. Suggested by: dougb Modified: head/etc/defaults/rc.conf head/etc/rc.d/kfd Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Sun May 6 20:40:18 2012 (r235106) +++ head/etc/defaults/rc.conf Sun May 6 20:46:04 2012 (r235107) @@ -297,8 +297,8 @@ kadmind5_server_enable="NO" # Run kadmin kadmind5_server="/usr/libexec/kadmind" # path to kerberos 5 admin daemon kpasswdd_server_enable="NO" # Run kpasswdd (or NO) kpasswdd_server="/usr/libexec/kpasswdd" # path to kerberos 5 passwd daemon -kfd_server_enable="NO" # Run kfd (or NO) -kfd_server="/usr/libexec/kfd" # path to kerberos 5 kfd daemon +kfd_enable="NO" # Run kfd (or NO) +kfd_program="/usr/libexec/kfd" # path to kerberos 5 kfd daemon gssd_enable="NO" # Run the gssd daemon (or NO). gssd_flags="" # Flags for gssd. Modified: head/etc/rc.d/kfd ============================================================================== --- head/etc/rc.d/kfd Sun May 6 20:40:18 2012 (r235106) +++ head/etc/rc.d/kfd Sun May 6 20:46:04 2012 (r235107) @@ -4,16 +4,14 @@ # # PROVIDE: kfd -# BEFORE: DAEMON +# REQUIRE: NETWORK +# KEYWORD: shutdown . /etc/rc.subr -name="kfd" +name=kfd +rcvar=kfd_enable load_rc_config $name -rcvar="kfd_server_enable" -unset start_cmd -command="${kfd_server}" -kfd_flags="-i" -command_args="&" +command_args="-i &" run_rc_command "$1" From owner-svn-src-head@FreeBSD.ORG Sun May 6 21:05:58 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A0B2A106564A; Sun, 6 May 2012 21:05:58 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C2F98FC0C; Sun, 6 May 2012 21:05:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q46L5wM2031799; Sun, 6 May 2012 21:05:58 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q46L5wIh031797; Sun, 6 May 2012 21:05:58 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <201205062105.q46L5wIh031797@svn.freebsd.org> From: Stanislav Sedov Date: Sun, 6 May 2012 21:05: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: r235108 - head/share/man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 May 2012 21:05:58 -0000 Author: stas Date: Sun May 6 21:05:58 2012 New Revision: 235108 URL: http://svn.freebsd.org/changeset/base/235108 Log: - Document kfd(8) rc.conf variables in the manpage. Modified: head/share/man/man5/rc.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Sun May 6 20:46:04 2012 (r235107) +++ head/share/man/man5/rc.conf.5 Sun May 6 21:05:58 2012 (r235108) @@ -2086,6 +2086,19 @@ If is set to .Dq Li YES this is the path to Kerberos 5 Password-Changing Daemon. +.It Va kfd_enable +.Pq Vt bool +Set to +.Dq Li YES +to start +.Xr kfd 8 , +the Kerberos 5 ticket forwarding daemon, at the boot time. +.It Va kfd_program +.Pq Vt str +Path to +.Xr kfd 8 +(default +.Pa /usr/libexec/kfd ) . .It Va rwhod_enable .Pq Vt bool If set to From owner-svn-src-head@FreeBSD.ORG Mon May 7 02:50:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49D29106564A; Mon, 7 May 2012 02:50:53 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C63F8FC0A; Mon, 7 May 2012 02:50:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q472oqlr042930; Mon, 7 May 2012 02:50:52 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q472oqYG042928; Mon, 7 May 2012 02:50:52 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <201205070250.q472oqYG042928@svn.freebsd.org> From: Stanislav Sedov Date: Mon, 7 May 2012 02:50: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: r235116 - head/share/man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 May 2012 02:50:53 -0000 Author: stas Date: Mon May 7 02:50:52 2012 New Revision: 235116 URL: http://svn.freebsd.org/changeset/base/235116 Log: - Bump the manpage date after kfd addition. Reported by: gjb Modified: head/share/man/man5/rc.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Mon May 7 00:39:47 2012 (r235115) +++ head/share/man/man5/rc.conf.5 Mon May 7 02:50:52 2012 (r235116) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 27, 2012 +.Dd May 06, 2012 .Dt RC.CONF 5 .Os .Sh NAME From owner-svn-src-head@FreeBSD.ORG Mon May 7 04:15:47 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05F03106564A; Mon, 7 May 2012 04:15:47 +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 E1A298FC19; Mon, 7 May 2012 04:15:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q474Fkms045878; Mon, 7 May 2012 04:15:46 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q474Fknx045874; Mon, 7 May 2012 04:15:46 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201205070415.q474Fknx045874@svn.freebsd.org> From: Juli Mallett Date: Mon, 7 May 2012 04:15: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: r235117 - in head/sys: dev/gxemul/ether mips/conf mips/gxemul X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 07 May 2012 04:15:47 -0000 Author: jmallett Date: Mon May 7 04:15:46 2012 New Revision: 235117 URL: http://svn.freebsd.org/changeset/base/235117 Log: Add a trivial driver for the GXemul Ethernet device. Probably quite buggy and certainly non-optimal, but enough for basic networking use. Requested by: rwatson Added: head/sys/dev/gxemul/ether/ head/sys/dev/gxemul/ether/gxreg.h (contents, props changed) head/sys/dev/gxemul/ether/if_gx.c (contents, props changed) Modified: head/sys/mips/conf/GXEMUL head/sys/mips/gxemul/files.gxemul Added: head/sys/dev/gxemul/ether/gxreg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/gxemul/ether/gxreg.h Mon May 7 04:15:46 2012 (r235117) @@ -0,0 +1,56 @@ +/*- + * Copyright (c) 2008-2012 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$ + */ + +#ifndef _DEV_GXEMUL_ETHER_GXREG_H_ +#define _DEV_GXEMUL_ETHER_GXREG_H_ + +#define GXEMUL_ETHER_DEV_BASE (0x14000000) +#define GXEMUL_ETHER_DEV_IRQ (3) + +#define GXEMUL_ETHER_DEV_MTU (0x4000) + +#define GXEMUL_ETHER_DEV_BUFFER (0x0000) +#define GXEMUL_ETHER_DEV_STATUS (0x4000) +#define GXEMUL_ETHER_DEV_LENGTH (0x4010) +#define GXEMUL_ETHER_DEV_COMMAND (0x4020) +#define GXEMUL_ETHER_DEV_MAC (0x4040) + +#define GXEMUL_ETHER_DEV_FUNCTION(f) \ + (volatile uint64_t *)MIPS_PHYS_TO_DIRECT_UNCACHED(GXEMUL_ETHER_DEV_BASE + (f)) +#define GXEMUL_ETHER_DEV_READ(f) \ + (volatile uint64_t)*GXEMUL_ETHER_DEV_FUNCTION(f) +#define GXEMUL_ETHER_DEV_WRITE(f, v) \ + *GXEMUL_ETHER_DEV_FUNCTION(f) = (v) + +#define GXEMUL_ETHER_DEV_STATUS_RX_OK (0x01) +#define GXEMUL_ETHER_DEV_STATUS_RX_MORE (0x02) + +#define GXEMUL_ETHER_DEV_COMMAND_RX (0x00) +#define GXEMUL_ETHER_DEV_COMMAND_TX (0x01) + +#endif /* !_DEV_GXEMUL_ETHER_GXREG_H_ */ Added: head/sys/dev/gxemul/ether/if_gx.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/gxemul/ether/if_gx.c Mon May 7 04:15:46 2012 (r235117) @@ -0,0 +1,398 @@ +/*- + * Copyright (c) 2008-2012 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$ + */ + +#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 + +struct gx_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; + struct mtx sc_mtx; +}; + +#define GXEMUL_ETHER_LOCK(sc) mtx_lock(&(sc)->sc_mtx) +#define GXEMUL_ETHER_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) + +static void gx_identify(driver_t *, device_t); +static int gx_probe(device_t); +static int gx_attach(device_t); +static int gx_detach(device_t); +static int gx_shutdown(device_t); + +static void gx_init(void *); +static int gx_transmit(struct ifnet *, struct mbuf *); + +static int gx_medchange(struct ifnet *); +static void gx_medstat(struct ifnet *, struct ifmediareq *); + +static int gx_ioctl(struct ifnet *, u_long, caddr_t); + +static void gx_rx_intr(void *); + +static device_method_t gx_methods[] = { + /* Device interface */ + DEVMETHOD(device_identify, gx_identify), + DEVMETHOD(device_probe, gx_probe), + DEVMETHOD(device_attach, gx_attach), + DEVMETHOD(device_detach, gx_detach), + DEVMETHOD(device_shutdown, gx_shutdown), + + { 0, 0 } +}; + +static driver_t gx_driver = { + "gx", + gx_methods, + sizeof (struct gx_softc), +}; + +static devclass_t gx_devclass; + +DRIVER_MODULE(gx, nexus, gx_driver, gx_devclass, 0, 0); + +static void +gx_identify(driver_t *drv, device_t parent) +{ + BUS_ADD_CHILD(parent, 0, "gx", 0); +} + +static int +gx_probe(device_t dev) +{ + if (device_get_unit(dev) != 0) + return (ENXIO); + + device_set_desc(dev, "GXemul test Ethernet"); + + return (0); +} + +static int +gx_attach(device_t dev) +{ + struct ifnet *ifp; + struct gx_softc *sc; + uint8_t mac[6]; + int error; + int rid; + + sc = device_get_softc(dev); + sc->sc_dev = dev; + sc->sc_port = device_get_unit(dev); + + /* Read MAC address. */ + GXEMUL_ETHER_DEV_WRITE(GXEMUL_ETHER_DEV_MAC, (uintptr_t)mac); + + /* Allocate and establish interrupt. */ + rid = 0; + sc->sc_intr = bus_alloc_resource(sc->sc_dev, SYS_RES_IRQ, &rid, + GXEMUL_ETHER_DEV_IRQ - 2, GXEMUL_ETHER_DEV_IRQ - 2, 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, + gx_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"); + + 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 = gx_init; + ifp->if_softc = sc; + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST | IFF_ALLMULTI; + ifp->if_ioctl = gx_ioctl; + + sc->sc_ifp = ifp; + sc->sc_flags = ifp->if_flags; + + ifmedia_init(&sc->sc_ifmedia, 0, gx_medchange, gx_medstat); + + ifmedia_add(&sc->sc_ifmedia, IFM_ETHER | IFM_AUTO, 0, NULL); + ifmedia_set(&sc->sc_ifmedia, IFM_ETHER | IFM_AUTO); + + mtx_init(&sc->sc_mtx, "GXemul Ethernet", NULL, MTX_DEF); + + ether_ifattach(ifp, mac); + + ifp->if_transmit = gx_transmit; + + return (bus_generic_attach(dev)); +} + +static int +gx_detach(device_t dev) +{ + struct gx_softc *sc; + + sc = device_get_softc(dev); + + bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_intr); + /* XXX Incomplete. */ + + return (0); +} + +static int +gx_shutdown(device_t dev) +{ + return (gx_detach(dev)); +} + +static void +gx_init(void *arg) +{ + struct ifnet *ifp; + struct gx_softc *sc; + + sc = arg; + ifp = sc->sc_ifp; + + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + + ifp->if_drv_flags |= IFF_DRV_RUNNING; +} + +static int +gx_transmit(struct ifnet *ifp, struct mbuf *m) +{ + struct gx_softc *sc; + + sc = ifp->if_softc; + + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != IFF_DRV_RUNNING) { + m_freem(m); + return (0); + } + + GXEMUL_ETHER_LOCK(sc); + GXEMUL_ETHER_DEV_WRITE(GXEMUL_ETHER_DEV_LENGTH, m->m_pkthdr.len); + m_copydata(m, 0, m->m_pkthdr.len, (void *)(uintptr_t)GXEMUL_ETHER_DEV_FUNCTION(GXEMUL_ETHER_DEV_BUFFER)); + GXEMUL_ETHER_DEV_WRITE(GXEMUL_ETHER_DEV_COMMAND, GXEMUL_ETHER_DEV_COMMAND_TX); + GXEMUL_ETHER_UNLOCK(sc); + + ETHER_BPF_MTAP(ifp, m); + + ifp->if_opackets++; + ifp->if_obytes += m->m_pkthdr.len; + + m_freem(m); + + return (0); +} + +static int +gx_medchange(struct ifnet *ifp) +{ + return (ENOTSUP); +} + +static void +gx_medstat(struct ifnet *ifp, struct ifmediareq *ifm) +{ + struct gx_softc *sc; + + sc = ifp->if_softc; + + /* Lie amazingly. */ + ifm->ifm_status = IFM_AVALID | IFM_ACTIVE; + ifm->ifm_active = IFT_ETHER | IFM_1000_T | IFM_FDX; +} + +static int +gx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +{ + struct gx_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) + gx_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) { + gx_init(sc); + } else { + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + } + } + sc->sc_flags = ifp->if_flags; + return (0); + + case SIOCSIFMTU: + if (ifr->ifr_mtu + ifp->if_data.ifi_hdrlen > GXEMUL_ETHER_DEV_MTU) + return (ENOTSUP); + 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 +gx_rx_intr(void *arg) +{ + struct gx_softc *sc = arg; + + GXEMUL_ETHER_LOCK(sc); + for (;;) { + uint64_t status, length; + struct mbuf *m; + + /* + * XXX + * Limit number of packets received at once? + */ + status = GXEMUL_ETHER_DEV_READ(GXEMUL_ETHER_DEV_STATUS); + if (status == GXEMUL_ETHER_DEV_STATUS_RX_MORE) { + GXEMUL_ETHER_DEV_WRITE(GXEMUL_ETHER_DEV_COMMAND, GXEMUL_ETHER_DEV_COMMAND_RX); + continue; + } + if (status != GXEMUL_ETHER_DEV_STATUS_RX_OK) + break; + length = GXEMUL_ETHER_DEV_READ(GXEMUL_ETHER_DEV_LENGTH); + if (length > MCLBYTES - ETHER_ALIGN) { + sc->sc_ifp->if_ierrors++; + continue; + } + + m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + if (m == NULL) { + device_printf(sc->sc_dev, "no memory for receive mbuf.\n"); + sc->sc_ifp->if_iqdrops++; + GXEMUL_ETHER_UNLOCK(sc); + return; + } + + /* Align incoming frame so IP headers are aligned. */ + m->m_data += ETHER_ALIGN; + + memcpy(m->m_data, (const void *)(uintptr_t)GXEMUL_ETHER_DEV_FUNCTION(GXEMUL_ETHER_DEV_BUFFER), length); + + m->m_pkthdr.rcvif = sc->sc_ifp; + m->m_pkthdr.len = m->m_len = length; + + sc->sc_ifp->if_ipackets++; + + GXEMUL_ETHER_UNLOCK(sc); + + (*sc->sc_ifp->if_input)(sc->sc_ifp, m); + + GXEMUL_ETHER_LOCK(sc); + } + GXEMUL_ETHER_UNLOCK(sc); +} Modified: head/sys/mips/conf/GXEMUL ============================================================================== --- head/sys/mips/conf/GXEMUL Mon May 7 02:50:52 2012 (r235116) +++ head/sys/mips/conf/GXEMUL Mon May 7 04:15:46 2012 (r235117) @@ -27,6 +27,8 @@ options DDB options KDB options SCHED_ULE +options INET # InterNETworking +options INET6 # IPv6 communications protocols options FFS #Berkeley Fast Filesystem @@ -41,6 +43,18 @@ options ROOTDEVNAME=\"ufs:gxemul_disk0\ device gxemul_cons device gxemul_disk -device md -device loop -device random +device gxemul_ether + +# Pseudo devices. +device loop # Network loopback +device random # Entropy device +device ether # Ethernet support +device tun # Packet tunnel. +device md # Memory "disks" +device gif # IPv6 and IPv4 tunneling +device faith # IPv6-to-IPv4 relaying (translation) + +# The `bpf' device enables the Berkeley Packet Filter. +# Be aware of the administrative consequences of enabling this! +# Note that 'bpf' is required for DHCP. +device bpf # Berkeley packet filter Modified: head/sys/mips/gxemul/files.gxemul ============================================================================== --- head/sys/mips/gxemul/files.gxemul Mon May 7 02:50:52 2012 (r235116) +++ head/sys/mips/gxemul/files.gxemul Mon May 7 04:15:46 2012 (r235117) @@ -5,4 +5,4 @@ mips/mips/intr_machdep.c standard mips/mips/tick.c standard dev/gxemul/disk/gxemul_disk.c optional gxemul_disk -dev/gxemul/ether/gxemul_ether.c optional gxemul_ether +dev/gxemul/ether/if_gx.c optional gxemul_ether From owner-svn-src-head@FreeBSD.ORG Mon May 7 04:36:48 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D39211065673; Mon, 7 May 2012 04:36:48 +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 BE3D58FC08; Mon, 7 May 2012 04:36:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q474amWp046585; Mon, 7 May 2012 04:36:48 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q474amCk046581; Mon, 7 May 2012 04:36:48 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201205070436.q474amCk046581@svn.freebsd.org> From: Juli Mallett Date: Mon, 7 May 2012 04:36: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: r235118 - in head/sys/mips: conf gxemul X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 07 May 2012 04:36:48 -0000 Author: jmallett Date: Mon May 7 04:36:48 2012 New Revision: 235118 URL: http://svn.freebsd.org/changeset/base/235118 Log: Add basic SMP support for GXemul. Ideally we would have some way to override some of the IPI mechanisms used by the common MIPS SMP code so we could use the multicast IPI facilities, on GXemul as well as on several real hardware platforms, and the ability to have multiple hard IPI types. Modified: head/sys/mips/conf/GXEMUL head/sys/mips/gxemul/gxemul_machdep.c head/sys/mips/gxemul/mpreg.h Modified: head/sys/mips/conf/GXEMUL ============================================================================== --- head/sys/mips/conf/GXEMUL Mon May 7 04:15:46 2012 (r235117) +++ head/sys/mips/conf/GXEMUL Mon May 7 04:36:48 2012 (r235118) @@ -26,6 +26,9 @@ makeoptions MODULES_OVERRIDE="" options DDB options KDB +# Make an SMP-capable kernel by default +options SMP # Symmetric MultiProcessor Kernel + options SCHED_ULE options INET # InterNETworking options INET6 # IPv6 communications protocols Modified: head/sys/mips/gxemul/gxemul_machdep.c ============================================================================== --- head/sys/mips/gxemul/gxemul_machdep.c Mon May 7 04:15:46 2012 (r235117) +++ head/sys/mips/gxemul/gxemul_machdep.c Mon May 7 04:36:48 2012 (r235118) @@ -62,6 +62,11 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef SMP +#include +#include +#endif + #include extern int *edata; @@ -167,3 +172,67 @@ platform_start(__register_t a0, __regist mips_timer_init_params(platform_counter_freq, 0); } + +#ifdef SMP +void +platform_ipi_send(int cpuid) +{ + GXEMUL_MP_DEV_WRITE(GXEMUL_MP_DEV_IPI_ONE, (1 << 16) | cpuid); +} + +void +platform_ipi_clear(void) +{ + GXEMUL_MP_DEV_WRITE(GXEMUL_MP_DEV_IPI_READ, 0); +} + +int +platform_ipi_intrnum(void) +{ + return (GXEMUL_MP_DEV_IPI_INTERRUPT - 2); +} + +struct cpu_group * +platform_smp_topo(void) +{ + return (smp_topo_none()); +} + +void +platform_init_ap(int cpuid) +{ + int ipi_int_mask, clock_int_mask; + + /* + * Unmask the clock and ipi interrupts. + */ + clock_int_mask = hard_int_mask(5); + ipi_int_mask = hard_int_mask(platform_ipi_intrnum()); + set_intr_mask(ipi_int_mask | clock_int_mask); +} + +void +platform_cpu_mask(cpuset_t *mask) +{ + unsigned i, n; + + n = GXEMUL_MP_DEV_READ(GXEMUL_MP_DEV_NCPUS); + CPU_ZERO(mask); + for (i = 0; i < n; i++) + CPU_SET(i, mask); +} + +int +platform_processor_id(void) +{ + return (GXEMUL_MP_DEV_READ(GXEMUL_MP_DEV_WHOAMI)); +} + +int +platform_start_ap(int cpuid) +{ + GXEMUL_MP_DEV_WRITE(GXEMUL_MP_DEV_STARTADDR, (intptr_t)mpentry); + GXEMUL_MP_DEV_WRITE(GXEMUL_MP_DEV_START, cpuid); + return (0); +} +#endif /* SMP */ Modified: head/sys/mips/gxemul/mpreg.h ============================================================================== --- head/sys/mips/gxemul/mpreg.h Mon May 7 04:15:46 2012 (r235117) +++ head/sys/mips/gxemul/mpreg.h Mon May 7 04:36:48 2012 (r235118) @@ -36,10 +36,12 @@ #define GXEMUL_MP_DEV_START 0x0020 #define GXEMUL_MP_DEV_STARTADDR 0x0030 #define GXEMUL_MP_DEV_STACK 0x0070 +#define GXEMUL_MP_DEV_RANDOM 0x0080 #define GXEMUL_MP_DEV_MEMORY 0x0090 #define GXEMUL_MP_DEV_IPI_ONE 0x00a0 #define GXEMUL_MP_DEV_IPI_MANY 0x00b0 #define GXEMUL_MP_DEV_IPI_READ 0x00c0 +#define GXEMUL_MP_DEV_CYCLES 0x00d0 #define GXEMUL_MP_DEV_FUNCTION(f) \ (volatile uint64_t *)MIPS_PHYS_TO_DIRECT_UNCACHED(GXEMUL_MP_DEV_BASE + (f)) From owner-svn-src-head@FreeBSD.ORG Mon May 7 04:56:27 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14C301065670; Mon, 7 May 2012 04:56:27 +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 00C368FC08; Mon, 7 May 2012 04:56:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q474uQut047201; Mon, 7 May 2012 04:56:26 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q474uQvZ047199; Mon, 7 May 2012 04:56:26 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201205070456.q474uQvZ047199@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 7 May 2012 04:56: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: r235119 - head/sys/dev/bce X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 07 May 2012 04:56:27 -0000 Author: yongari Date: Mon May 7 04:56:26 2012 New Revision: 235119 URL: http://svn.freebsd.org/changeset/base/235119 Log: Restore jumbo frame configuration which was broken in r218423. Submitted by: Andrey Zonov zonov dot org > (initial version) Tested by: Andrey Zonov zonov dot org > MFC after: 1 week Modified: head/sys/dev/bce/if_bce.c Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Mon May 7 04:36:48 2012 (r235118) +++ head/sys/dev/bce/if_bce.c Mon May 7 04:56:26 2012 (r235119) @@ -6842,6 +6842,8 @@ bce_init_locked(struct bce_softc *sc) bcopy(IF_LLADDR(sc->bce_ifp), sc->eaddr, ETHER_ADDR_LEN); bce_set_mac_addr(sc); + if (bce_hdr_split == FALSE) + bce_get_rx_buffer_sizes(sc, ifp->if_mtu); /* * Calculate and program the hardware Ethernet MTU * size. Be generous on the receive if we have room @@ -7436,22 +7438,10 @@ bce_ioctl(struct ifnet *ifp, u_long comm BCE_LOCK(sc); ifp->if_mtu = ifr->ifr_mtu; - - if (bce_hdr_split == FALSE) { - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - /* - * Because allocation size is used in RX - * buffer allocation, stop controller if - * it is already running. - */ - bce_stop(sc); - } - - bce_get_rx_buffer_sizes(sc, ifp->if_mtu); - + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; bce_init_locked(sc); } - BCE_UNLOCK(sc); break; From owner-svn-src-head@FreeBSD.ORG Mon May 7 09:00:31 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94F67106566B; Mon, 7 May 2012 09:00:31 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8002F8FC14; Mon, 7 May 2012 09:00:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4790VeL055125; Mon, 7 May 2012 09:00:31 GMT (envelope-from jlh@svn.freebsd.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4790VWq055121; Mon, 7 May 2012 09:00:31 GMT (envelope-from jlh@svn.freebsd.org) Message-Id: <201205070900.q4790VWq055121@svn.freebsd.org> From: Jeremie Le Hen Date: Mon, 7 May 2012 09:00: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: r235122 - in head: . share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 May 2012 09:00:31 -0000 Author: jlh Date: Mon May 7 09:00:30 2012 New Revision: 235122 URL: http://svn.freebsd.org/changeset/base/235122 Log: Introduce the ${SHLIB_LDSCRIPT} variable to have an ld(1) script instead of a symlink for .so files. Reviewed by: kib, kan (previous version), dim Approved by: kib (mentor) Silence from: -hackers@ MFC after: 1 week Modified: head/Makefile.inc1 head/share/mk/bsd.README head/share/mk/bsd.lib.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon May 7 07:04:41 2012 (r235121) +++ head/Makefile.inc1 Mon May 7 09:00:30 2012 (r235122) @@ -265,6 +265,7 @@ XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE # world stage WMAKEENV= ${CROSSENV} \ _SHLIBDIRPREFIX=${WORLDTMP} \ + _LDSCRIPTROOT= \ VERSION="${VERSION}" \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${TMPPATH} @@ -307,6 +308,7 @@ LIB32FLAGS= -m32 ${LIB32CPUFLAGS} -DCOMP # Yes, the flags are redundant. LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${OBJTREE}/lib32 \ _SHLIBDIRPREFIX=${LIB32TMP} \ + _LDSCRIPTROOT=${LIB32TMP} \ VERSION="${VERSION}" \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${TMPPATH} \ @@ -319,11 +321,11 @@ LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} -DN -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO \ -DWITHOUT_HTML -DNO_CTF -DNO_LINT -ECC -ECXX -EAS -ELD \ DESTDIR=${LIB32TMP} -LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*} -DNO_INCS +LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*:N_LDSCRIPTROOT=*} -DNO_INCS .endif # install stage -IMAKEENV= ${CROSSENV} +IMAKEENV= ${CROSSENV:N_LDSCRIPTROOT=*} IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 .if empty(.MAKEFLAGS:M-n) IMAKEENV+= PATH=${STRICTTMPPATH}:${INSTALLTMP} \ Modified: head/share/mk/bsd.README ============================================================================== --- head/share/mk/bsd.README Mon May 7 07:04:41 2012 (r235121) +++ head/share/mk/bsd.README Mon May 7 09:00:30 2012 (r235122) @@ -352,6 +352,10 @@ SRCS List of source files to build the to .c files of the same name. (This is not the default for versions of make.) +SHLIB_LDSCRIPT Template file to generate shared library linker script. + Unless used, a simple symlink is created to the real + shared object. + The include file includes the file named "../Makefile.inc" if it exists, as well as the include file . Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Mon May 7 07:04:41 2012 (r235121) +++ head/share/mk/bsd.lib.mk Mon May 7 09:00:30 2012 (r235122) @@ -271,6 +271,25 @@ _libinstall: ${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \ ${SHLIB_NAME} ${DESTDIR}${SHLIBDIR} .if defined(SHLIB_LINK) +# ${_SHLIBDIRPREFIX} and ${_LDSCRIPTROOT} are both needed when cross-building +# and when building 32 bits library shims. ${_SHLIBDIRPREFIX} is the directory +# prefix where shared objects will be installed. ${_LDSCRIPTROOT} is the +# directory prefix that will be used in generated ld(1) scripts. They cannot +# be coalesced because of the way ld(1) handles the sysroot prefix (used in the +# cross-toolchain): +# - 64 bits libs are located under sysroot, so ${_LDSCRIPTROOT} must be empty. +# - 32 bits shims are not, so ${_LDSCRIPTROOT} is used to specify their full +# path. Note that ld(1) scripts are generated both during buildworld and +# installworld; in the later case ${_LDSCRIPTROOT} must be obviously empty. +# On the other hand, the use of ${_SHLIBDIRPREFIX} is more consistent since it +# does not involve the logic of a tool we do not own. +.if defined(SHLIB_LDSCRIPT) && !empty(SHLIB_LDSCRIPT) && exists(${.CURDIR}/${SHLIB_LDSCRIPT}) + sed -e 's,@@SHLIB@@,${_LDSCRIPTROOT}${SHLIBDIR}/${SHLIB_NAME},g' \ + -e 's,@@LIBDIR@@,${_LDSCRIPTROOT}${LIBDIR},g' \ + ${.CURDIR}/${SHLIB_LDSCRIPT} > lib${LIB}.ld + ${INSTALL} -S -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${_INSTALLFLAGS} lib${LIB}.ld ${DESTDIR}${LIBDIR}/${SHLIB_LINK} +.else .if ${SHLIBDIR} == ${LIBDIR} ln -fs ${SHLIB_NAME} ${DESTDIR}${LIBDIR}/${SHLIB_LINK} .else @@ -281,8 +300,9 @@ _libinstall: rm -f ${DESTDIR}${LIBDIR}/${SHLIB_NAME} .endif .endif -.endif -.endif +.endif # SHLIB_LDSCRIPT +.endif # SHLIB_LINK +.endif # SHIB_NAME .if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${LIBDIR} @@ -350,6 +370,9 @@ clean: .endif .if defined(SHLIB_NAME) .if defined(SHLIB_LINK) +.if defined(SHLIB_LDSCRIPT) && exists(${.CURDIR}/${SHLIB_LDSCRIPT}) + rm -f lib${LIB}.ld +.endif rm -f ${SHLIB_LINK} .endif .if defined(LIB) && !empty(LIB) From owner-svn-src-head@FreeBSD.ORG Mon May 7 13:53:31 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8A20106564A; Mon, 7 May 2012 13:53:31 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id B5DE98FC0C; Mon, 7 May 2012 13:53:30 +0000 (UTC) Received: by werg1 with SMTP id g1so430029wer.13 for ; Mon, 07 May 2012 06:53:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=VvbJNdlLSGFOmuRQBZdX50t/+BNotWzrFLZjAgo0S/k=; b=E431TqeD1rLmODspIPiObW4HFnlqS6pWJT1ibujqeVWl5zr3uQKC8T2fp5Cf0gy/Rt Sb8rY1Pd37ezTG3wGNfzj/VOnVE9s4sAbj1bW0ClEyhZZvD7UxukSzum//XBQqMXNIHs l/LMP43VMqJRo3Eiu1eznvNiBjC+mShVeR2/xhVcSiwSbY4kgFLnKmi1TutKU2rFsHMY IY9uf/dajMtRtpiw8rPeWhre4992ka9/Y6JwkumZ0WTE+lPxQjP6s0I5yBOeTQKMe7pv 0PuuW3aigFbNK6AqBy13Yfyu0eiHiNuU8soGgKfB4z2ZCcd18Z092+aAgp7GlD5SkRqz S/jw== MIME-Version: 1.0 Received: by 10.216.136.72 with SMTP id v50mr9702117wei.73.1336398809553; Mon, 07 May 2012 06:53:29 -0700 (PDT) Received: by 10.180.94.97 with HTTP; Mon, 7 May 2012 06:53:29 -0700 (PDT) In-Reply-To: <3D17FEF6-8CC5-4BBB-B098-BEA7D28F377D@FreeBSD.org> References: <201204202137.q3KLbhNj056524@svn.freebsd.org> <20120421171128.GA6732@lor.one-eyed-alien.net> <3D17FEF6-8CC5-4BBB-B098-BEA7D28F377D@FreeBSD.org> Date: Mon, 7 May 2012 09:53:29 -0400 Message-ID: From: Ryan Stone To: "Bjoern A. Zeeb" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Brooks Davis , src-committers@freebsd.org Subject: Re: svn commit: r234504 - in head/sys: amd64/conf i386/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, 07 May 2012 13:53:32 -0000 On Sun, May 6, 2012 at 2:03 PM, Bjoern A. Zeeb wrote: > root@bz1:/home/bz # procstat -k 34611 > =A0PID =A0 =A0TID COMM =A0 =A0 =A0 =A0 =A0 =A0 TDNAME =A0 =A0 =A0 =A0 =A0= KSTACK > 34611 100228 ctfmerge =A0 =A0 =A0 =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mi= _switch sleepq_catch_signals sleepq_wait_sig _sleep _do_lock_umutex do_lock= _umutex __umtx_op_wait_umutex amd64_syscall Xfast_syscall > 34611 100452 ctfmerge =A0 =A0 =A0 =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mi= _switch sleepq_catch_signals sleepq_wait_sig _sleep _do_lock_umutex do_lock= _umutex __umtx_op_wait_umutex amd64_syscall Xfast_syscall > 34611 100453 ctfmerge =A0 =A0 =A0 =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mi= _switch sleepq_catch_signals sleepq_wait_sig _sleep _do_lock_umutex do_lock= _umutex __umtx_op_wait_umutex amd64_syscall Xfast_syscall > 34611 100454 ctfmerge =A0 =A0 =A0 =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mi= _switch sleepq_catch_signals sleepq_wait_sig _sleep _do_lock_umutex do_lock= _umutex __umtx_op_wait_umutex amd64_syscall Xfast_syscall > 34611 100455 ctfmerge =A0 =A0 =A0 =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mi= _switch sleepq_catch_signals sleepq_wait_sig _sleep _do_lock_umutex do_lock= _umutex __umtx_op_wait_umutex amd64_syscall Xfast_syscall > 34611 100456 ctfmerge =A0 =A0 =A0 =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mi= _switch sleepq_catch_signals sleepq_wait_sig _sleep _do_lock_umutex do_lock= _umutex __umtx_op_wait_umutex amd64_syscall Xfast_syscall > root@bz1:/home/bz # procstat -k 39282 > =A0PID =A0 =A0TID COMM =A0 =A0 =A0 =A0 =A0 =A0 TDNAME =A0 =A0 =A0 =A0 =A0= KSTACK > 39282 100348 ctfmerge =A0 =A0 =A0 =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mi= _switch sleepq_catch_signals sleepq_wait_sig _sleep do_wait __umtx_op_wait_= uint_private amd64_syscall Xfast_syscall > 39282 100457 ctfmerge =A0 =A0 =A0 =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mi= _switch sleepq_catch_signals sleepq_wait_sig _sleep _do_lock_umutex do_lock= _umutex __umtx_op_wait_umutex amd64_syscall Xfast_syscall > 39282 100458 ctfmerge =A0 =A0 =A0 =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mi= _switch sleepq_catch_signals sleepq_wait_sig _sleep _do_lock_umutex do_lock= _umutex __umtx_op_wait_umutex amd64_syscall Xfast_syscall > 39282 100459 ctfmerge =A0 =A0 =A0 =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mi= _switch sleepq_catch_signals sleepq_wait_sig _sleep _do_lock_umutex do_lock= _umutex __umtx_op_wait_umutex amd64_syscall Xfast_syscall > 39282 100460 ctfmerge =A0 =A0 =A0 =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mi= _switch sleepq_catch_signals sleepq_wait_sig _sleep _do_lock_umutex do_lock= _umutex __umtx_op_wait_umutex amd64_syscall Xfast_syscall > 39282 100461 ctfmerge =A0 =A0 =A0 =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mi= _switch sleepq_catch_signals sleepq_wait_sig _sleep _do_lock_umutex do_lock= _umutex __umtx_op_wait_umutex amd64_syscall Xfast_syscall > > > root@bz1:/home/bz # procstat -t 34611 > =A0PID =A0 =A0TID COMM =A0 =A0 =A0 =A0 =A0 =A0 TDNAME =A0 =A0 =A0 =A0 =A0= CPU =A0PRI STATE =A0 WCHAN > 34611 100228 ctfmerge =A0 =A0 =A0 =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A07 =A0152 sleep =A0 umtxn > 34611 100452 ctfmerge =A0 =A0 =A0 =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A01 =A0152 sleep =A0 umtxn > 34611 100453 ctfmerge =A0 =A0 =A0 =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A01 =A0152 sleep =A0 umtxn > 34611 100454 ctfmerge =A0 =A0 =A0 =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A04 =A0152 sleep =A0 umtxn > 34611 100455 ctfmerge =A0 =A0 =A0 =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A00 =A0152 sleep =A0 umtxn > 34611 100456 ctfmerge =A0 =A0 =A0 =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A05 =A0152 sleep =A0 umtxn > root@bz1:/home/bz # procstat -t 39282 > =A0PID =A0 =A0TID COMM =A0 =A0 =A0 =A0 =A0 =A0 TDNAME =A0 =A0 =A0 =A0 =A0= CPU =A0PRI STATE =A0 WCHAN > 39282 100348 ctfmerge =A0 =A0 =A0 =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A07 =A0152 sleep =A0 uwait > 39282 100457 ctfmerge =A0 =A0 =A0 =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A02 =A0152 sleep =A0 umtxn > 39282 100458 ctfmerge =A0 =A0 =A0 =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A04 =A0152 sleep =A0 umtxn > 39282 100459 ctfmerge =A0 =A0 =A0 =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A01 =A0152 sleep =A0 umtxn > 39282 100460 ctfmerge =A0 =A0 =A0 =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A05 =A0152 sleep =A0 umtxn > 39282 100461 ctfmerge =A0 =A0 =A0 =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A00 =A0152 sleep =A0 umtxn > > > root@bz1:/home/bz # procstat -i 34611 | grep -v -- '---$' > =A0PID COMM =A0 =A0 =A0 =A0 =A0 =A0 SIG =A0 =A0 FLAGS > 34611 ctfmerge =A0 =A0 =A0 =A0 INT =A0 =A0 =A0--C > 34611 ctfmerge =A0 =A0 =A0 =A0 QUIT =A0 =A0 --C > 34611 ctfmerge =A0 =A0 =A0 =A0 TERM =A0 =A0 --C > 34611 ctfmerge =A0 =A0 =A0 =A0 URG =A0 =A0 =A0-I- > 34611 ctfmerge =A0 =A0 =A0 =A0 TSTP =A0 =A0 -I- > 34611 ctfmerge =A0 =A0 =A0 =A0 CHLD =A0 =A0 -I- > 34611 ctfmerge =A0 =A0 =A0 =A0 TTIN =A0 =A0 -I- > 34611 ctfmerge =A0 =A0 =A0 =A0 TTOU =A0 =A0 -I- > 34611 ctfmerge =A0 =A0 =A0 =A0 IO =A0 =A0 =A0 -I- > 34611 ctfmerge =A0 =A0 =A0 =A0 WINCH =A0 =A0-I- > 34611 ctfmerge =A0 =A0 =A0 =A0 INFO =A0 =A0 -I- > 34611 ctfmerge =A0 =A0 =A0 =A0 32 =A0 =A0 =A0 --C > root@bz1:/home/bz # procstat -i 39282 | grep -v -- '---$' > =A0PID COMM =A0 =A0 =A0 =A0 =A0 =A0 SIG =A0 =A0 FLAGS > 39282 ctfmerge =A0 =A0 =A0 =A0 INT =A0 =A0 =A0--C > 39282 ctfmerge =A0 =A0 =A0 =A0 QUIT =A0 =A0 --C > 39282 ctfmerge =A0 =A0 =A0 =A0 TERM =A0 =A0 --C > 39282 ctfmerge =A0 =A0 =A0 =A0 URG =A0 =A0 =A0-I- > 39282 ctfmerge =A0 =A0 =A0 =A0 TSTP =A0 =A0 -I- > 39282 ctfmerge =A0 =A0 =A0 =A0 CHLD =A0 =A0 -I- > 39282 ctfmerge =A0 =A0 =A0 =A0 TTIN =A0 =A0 -I- > 39282 ctfmerge =A0 =A0 =A0 =A0 TTOU =A0 =A0 -I- > 39282 ctfmerge =A0 =A0 =A0 =A0 IO =A0 =A0 =A0 -I- > 39282 ctfmerge =A0 =A0 =A0 =A0 WINCH =A0 =A0-I- > 39282 ctfmerge =A0 =A0 =A0 =A0 INFO =A0 =A0 -I- > 39282 ctfmerge =A0 =A0 =A0 =A0 32 =A0 =A0 =A0 --C > > > > root@bz1:/home/bz # procstat -j 34611 | grep -v -- '--$' > =A0PID =A0 =A0TID COMM =A0 =A0 =A0 =A0 =A0 =A0 SIG =A0 =A0 FLAGS > 34611 100452 ctfmerge =A0 =A0 =A0 =A0 INT =A0 =A0 =A0-B > 34611 100452 ctfmerge =A0 =A0 =A0 =A0 QUIT =A0 =A0 -B > 34611 100452 ctfmerge =A0 =A0 =A0 =A0 TERM =A0 =A0 -B > 34611 100453 ctfmerge =A0 =A0 =A0 =A0 INT =A0 =A0 =A0-B > 34611 100453 ctfmerge =A0 =A0 =A0 =A0 QUIT =A0 =A0 -B > 34611 100453 ctfmerge =A0 =A0 =A0 =A0 TERM =A0 =A0 -B > 34611 100454 ctfmerge =A0 =A0 =A0 =A0 INT =A0 =A0 =A0-B > 34611 100454 ctfmerge =A0 =A0 =A0 =A0 QUIT =A0 =A0 -B > 34611 100454 ctfmerge =A0 =A0 =A0 =A0 TERM =A0 =A0 -B > 34611 100455 ctfmerge =A0 =A0 =A0 =A0 INT =A0 =A0 =A0-B > 34611 100455 ctfmerge =A0 =A0 =A0 =A0 QUIT =A0 =A0 -B > 34611 100455 ctfmerge =A0 =A0 =A0 =A0 TERM =A0 =A0 -B > 34611 100456 ctfmerge =A0 =A0 =A0 =A0 INT =A0 =A0 =A0-B > 34611 100456 ctfmerge =A0 =A0 =A0 =A0 QUIT =A0 =A0 -B > 34611 100456 ctfmerge =A0 =A0 =A0 =A0 TERM =A0 =A0 -B > root@bz1:/home/bz # procstat -j 39282 | grep -v -- '--$' > =A0PID =A0 =A0TID COMM =A0 =A0 =A0 =A0 =A0 =A0 SIG =A0 =A0 FLAGS > 39282 100457 ctfmerge =A0 =A0 =A0 =A0 INT =A0 =A0 =A0-B > 39282 100457 ctfmerge =A0 =A0 =A0 =A0 QUIT =A0 =A0 -B > 39282 100457 ctfmerge =A0 =A0 =A0 =A0 TERM =A0 =A0 -B > 39282 100458 ctfmerge =A0 =A0 =A0 =A0 INT =A0 =A0 =A0-B > 39282 100458 ctfmerge =A0 =A0 =A0 =A0 QUIT =A0 =A0 -B > 39282 100458 ctfmerge =A0 =A0 =A0 =A0 TERM =A0 =A0 -B > 39282 100459 ctfmerge =A0 =A0 =A0 =A0 INT =A0 =A0 =A0-B > 39282 100459 ctfmerge =A0 =A0 =A0 =A0 QUIT =A0 =A0 -B > 39282 100459 ctfmerge =A0 =A0 =A0 =A0 TERM =A0 =A0 -B > 39282 100460 ctfmerge =A0 =A0 =A0 =A0 INT =A0 =A0 =A0-B > 39282 100460 ctfmerge =A0 =A0 =A0 =A0 QUIT =A0 =A0 -B > 39282 100460 ctfmerge =A0 =A0 =A0 =A0 TERM =A0 =A0 -B > 39282 100461 ctfmerge =A0 =A0 =A0 =A0 INT =A0 =A0 =A0-B > 39282 100461 ctfmerge =A0 =A0 =A0 =A0 QUIT =A0 =A0 -B > 39282 100461 ctfmerge =A0 =A0 =A0 =A0 TERM =A0 =A0 -B > > > > So given I have been upset I started to investigate some more. > > make -C /usr/src =A0 =A0buildworld =A0did not work either (no -j). > > So I started and limited the build to 1 core: > > cpuset -l 1 make -C /usr/src buildkernel =A0 did not work either. > > > So added the nomakeoptions WITH_CTF =A0and > > make -C /usr/src -j8 buildkernel =A0completes. > > So removed the makeoptions WITH_CTF from GENRIC and the nomakeoptions fro= m my kernel including GENERIC and added it to the command line: > > make -C /usr/src -j8 buildkernel WITH_CTF=3D > > and that doesn't seem to work at all anymore? > > "/usr/src/share/mk/bsd.own.mk", line 482: WITH_CTF and WITHOUT_CTF can't = both be set. > > > So I did: > echo WITH_CTF=3D >> /etc/src.conf > make -C /usr/src -j8 buildkernel > > and of course it did not work again. > > > > Given all this and given it has reliably worked in the past, my conclusio= ns is that it must be something related to ctfmerge or libraries? > /usr/bin/ctfmerge: > =A0 =A0 =A0 =A0libctf.so.2 =3D> /lib/libctf.so.2 (0x800829000) > =A0 =A0 =A0 =A0libdwarf.so.3 =3D> /usr/lib/libdwarf.so.3 (0x800a36000) > =A0 =A0 =A0 =A0libelf.so.1 =3D> /usr/lib/libelf.so.1 (0x800c3f000) > =A0 =A0 =A0 =A0libz.so.6 =3D> /lib/libz.so.6 (0x800e58000) > =A0 =A0 =A0 =A0libthr.so.3 =3D> /lib/libthr.so.3 (0x80106e000) > =A0 =A0 =A0 =A0libc.so.7 =3D> /lib/libc.so.7 (0x801293000) > > What has changed the last 3ish months? > > /bz > > -- > Bjoern A. Zeeb =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 You have to have visions! > =A0 It does not matter how good you are. It matters what good you do! > A libthr fix went in on the 5th in r235068. I think that it was pthreads locking related. Do you have that revision? If you do, does backing up r234947 fix your problems? From owner-svn-src-head@FreeBSD.ORG Mon May 7 14:07:13 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EA9A2106564A; Mon, 7 May 2012 14:07:13 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D55F28FC1B; Mon, 7 May 2012 14:07:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q47E7D81068305; Mon, 7 May 2012 14:07:13 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q47E7DEx068300; Mon, 7 May 2012 14:07:13 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201205071407.q47E7DEx068300@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 7 May 2012 14:07:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235128 - head/lib/libusb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 May 2012 14:07:14 -0000 Author: hselasky Date: Mon May 7 14:07:13 2012 New Revision: 235128 URL: http://svn.freebsd.org/changeset/base/235128 Log: Add missing LibUSB 1.0 API function: libusb_get_string_descriptor(). Reported by: Xiaofan Chen Modified: head/lib/libusb/Makefile head/lib/libusb/libusb.3 head/lib/libusb/libusb.h head/lib/libusb/libusb10_desc.c Modified: head/lib/libusb/Makefile ============================================================================== --- head/lib/libusb/Makefile Mon May 7 12:33:17 2012 (r235127) +++ head/lib/libusb/Makefile Mon May 7 14:07:13 2012 (r235128) @@ -74,6 +74,7 @@ MLINKS += libusb.3 libusb_get_active_con MLINKS += libusb.3 libusb_get_config_descriptor.3 MLINKS += libusb.3 libusb_get_config_descriptor_by_value.3 MLINKS += libusb.3 libusb_free_config_descriptor.3 +MLINKS += libusb.3 libusb_get_string_descriptor.3 MLINKS += libusb.3 libusb_get_string_descriptor_ascii.3 MLINKS += libusb.3 libusb_parse_ss_endpoint_comp.3 MLINKS += libusb.3 libusb_free_ss_endpoint_comp.3 Modified: head/lib/libusb/libusb.3 ============================================================================== --- head/lib/libusb/libusb.3 Mon May 7 12:33:17 2012 (r235127) +++ head/lib/libusb/libusb.3 Mon May 7 14:07:13 2012 (r235128) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 12, 2012 +.Dd May 7, 2012 .Dt LIBUSB 3 .Os .Sh NAME @@ -314,6 +314,12 @@ LIBUSB_ERROR code on failure. Free a configuration descriptor. .Pp .Ft int +.Fn libusb_get_string_descriptor "libusb_device_handle *devh" "uint8_t desc_idx" "uint16_t langid" "unsigned char *data" "int length" +Retrieve a string descriptor in raw format. +Returns the number of bytes actually transferred on success +or a negative LIBUSB_ERROR code on failure. +.Pp +.Ft int .Fn libusb_get_string_descriptor_ascii "libusb_device_handle *devh" "uint8_t desc_idx" "unsigned char *data" "int length" Retrieve a string descriptor in C style ASCII. Returns the positive number of bytes in the resulting ASCII string Modified: head/lib/libusb/libusb.h ============================================================================== --- head/lib/libusb/libusb.h Mon May 7 12:33:17 2012 (r235127) +++ head/lib/libusb/libusb.h Mon May 7 14:07:13 2012 (r235128) @@ -398,6 +398,7 @@ int libusb_get_active_config_descriptor( int libusb_get_config_descriptor(libusb_device * dev, uint8_t config_index, struct libusb_config_descriptor **config); int libusb_get_config_descriptor_by_value(libusb_device * dev, uint8_t bConfigurationValue, struct libusb_config_descriptor **config); void libusb_free_config_descriptor(struct libusb_config_descriptor *config); +int libusb_get_string_descriptor(libusb_device_handle * devh, uint8_t desc_index, uint16_t langid, unsigned char *data, int length); int libusb_get_string_descriptor_ascii(libusb_device_handle * devh, uint8_t desc_index, uint8_t *data, int length); int libusb_get_descriptor(libusb_device_handle * devh, uint8_t desc_type, uint8_t desc_index, uint8_t *data, int length); int libusb_parse_ss_endpoint_comp(const void *buf, int len, struct libusb_ss_endpoint_companion_descriptor **ep_comp); Modified: head/lib/libusb/libusb10_desc.c ============================================================================== --- head/lib/libusb/libusb10_desc.c Mon May 7 12:33:17 2012 (r235127) +++ head/lib/libusb/libusb10_desc.c Mon May 7 14:07:13 2012 (r235128) @@ -294,6 +294,25 @@ libusb_free_config_descriptor(struct lib } int +libusb_get_string_descriptor(libusb_device_handle *pdev, + uint8_t desc_index, uint16_t langid, unsigned char *data, + int length) +{ + if (pdev == NULL || data == NULL || length < 1) + return (LIBUSB_ERROR_INVALID_PARAM); + + if (length > 65535) + length = 65535; + + /* put some default data into the destination buffer */ + data[0] = 0; + + return (libusb_control_transfer(pdev, LIBUSB_ENDPOINT_IN, + LIBUSB_REQUEST_GET_DESCRIPTOR, (LIBUSB_DT_STRING << 8) | desc_index, + langid, data, length, 1000)); +} + +int libusb_get_string_descriptor_ascii(libusb_device_handle *pdev, uint8_t desc_index, unsigned char *data, int length) { From owner-svn-src-head@FreeBSD.ORG Mon May 7 14:38:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFAF41065674; Mon, 7 May 2012 14:38:49 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id E03408FC18; Mon, 7 May 2012 14:38:48 +0000 (UTC) Received: from outgoing.leidinger.net (p5796D686.dip.t-dialin.net [87.150.214.134]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 114DD844AAC; Mon, 7 May 2012 16:38:30 +0200 (CEST) Received: from localhost (unknown [85.94.224.21]) by outgoing.leidinger.net (Postfix) with ESMTPSA id 01E5816EE; Mon, 7 May 2012 16:38:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=leidinger.net; s=outgoing-alex; t=1336401507; bh=j1tKN7tk4TOlpL7T3ZPAHaf+cD0QiOVtL6rypDGTVz4=; h=Date:Subject:From:To:Cc; b=V/Kq9VJqffnZTpfbK35KkSfZzQ2IBpRaVXGWqcFsPFVxc+gUxU1a1DbDdehlWHz1K NUdzyTe7rWan6IOTi3WtFchzNzf0vev9ENsE+dqZrClW3XB3pr3nLenwFbfhggbkH0 bcNFwV0/3KNCF4NILplLSnuwK0C7EIZKUumB5cGlFimEJXxuSxh4nS9VUqByvSPyjt olRC9NyEpo8OdaDTEvhO4CH0o32MUtfSS1s6dgD0dJnRorvT3tTED5JFC700+SMGGJ 0C5kTWMD9jyBOtvm6mb3LuyzS1oyPIyDAuIDlOSDAhapegM5F2f3u8BrRKFkQrd0eG IlOa+oLvNUdqw== Date: Mon, 07 May 2012 16:36:19 +0200 Message-ID: Importance: normal From: Alexander Leidinger To: bz@freebsd.org, brooks@freebsd.org, rysto32@gmail.com MIME-Version: 1.0 X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 114DD844AAC.A8C7C X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-0.539, required 6, autolearn=disabled, ALL_TRUSTED -1.00, AWL -0.79, DKIM_SIGNED 0.10, DKIM_VALID -0.10, DKIM_VALID_AU -0.10, HTML_MESSAGE 0.00, J_CHICKENPOX_21 0.60, J_CHICKENPOX_65 0.60, TW_SV 0.08, TW_TX 0.08) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1337006312.5803@3iWUW9YkssNgcbqNe+H8eQ X-EBL-Spam-Status: No Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234504 - in head/sys: amd64/conf i386/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, 07 May 2012 14:38:49 -0000 SGksCgpJIGhhZCB0aGlzIG9uY2UuIEkgdG9vayB0aGUgdGltZSB0byBraWxsIHRoZSBjdGYgcHJv Y2VzcyB3aGljaCBoYW5ncy4gV2VsbCwgbm90IG9ubHkgb25jZSwgYnV0IG11bHRpcGxlIHRpbWVz IGR1cmluZyB0aGUga2VybmVsIGJ1aWxkLiBUaGUgcmVzdWx0aW5nIGtlcm5lbCBib290ZWQuIEFm dGVyIHRoYXQgSSBkaWQgYSBjb21wbGV0ZSBidWlsZHdvcmQvaW5zdGFsbHdvcmxkL3JlYm9vdC9i dWlsZGtlcm5lbC9pbnN0YWxsa2VybmVsL3JlYm9vdCB3aXRob3V0IGFueSBwcm9ibGVtcy4KCkkg ZGlkbid0IHRyeSBhIGtlcm5lbCB3aXRob3V0IGN0ZiBhZnRlcndhcmRzLgoKTWF5YmUgdGhpcyBz ZXJ2ZXMgYXMgYSBkYXRhIHBvaW50LgoKQnllLApBbGV4YW5kZXIuCgotLSAKU2VuZCB2aWEgYW4g QW5kcm9pZCBkZXZpY2UsIHBsZWFzZSBmb3JnaXZlIGJyZXZpdHkgYW5kIHR5cG9ncmFwaGljIGFu ZCBzcGVsbGluZyBlcnJvcnMuIAoKIkJqb2VybiBBLiBaZWViIiA8YnpARnJlZUJTRC5vcmc+IGhh dCBnZXNjaHJpZWJlbjoKT24gMjEuIEFwciAyMDEyLCBhdCAxNzoxMSAsIEJyb29rcyBEYXZpcyB3 cm90ZToKCj4gT24gU2F0LCBBcHIgMjEsIDIwMTIgYXQgMDk6NDU6NTdBTSAtMDQwMCwgUnlhbiBT dG9uZSB3cm90ZToKPj4gT24gRnJpLCBBcHIgMjAsIDIwMTIgYXQgNTozNyBQTSwgQnJvb2tzIERh dmlzIDxicm9va3NAZnJlZWJzZC5vcmc+IHdyb3RlOgo+Pj4gQXV0aG9yOiBicm9va3MKPj4+IERh dGU6IEZyaSBBcHIgMjAgMjE6Mzc6NDIgMjAxMgo+Pj4gTmV3IFJldmlzaW9uOiAyMzQ1MDQKPj4+ IFVSTDogaHR0cDovL3N2bi5mcmVlYnNkLm9yZy9jaGFuZ2VzZXQvYmFzZS8yMzQ1MDQKPj4+IAo+ Pj4gTG9nOgo+Pj4gP0VuYWJsZSBEVHJhY2UgaG9va3MgaW4gR0VORVJJQy4KPj4+IAo+Pj4gP1Jl dmlld2VkIGJ5OiA/Z25uCj4+PiA/QXBwcm92ZWQgYnk6ID9jb3JlIChqaGIsIGltcCkKPj4+ID9S ZXF1ZXN0ZWQgYnk6IGEgY2FzdCBvZiB0aG91c2FuZHMKPj4+ID9NRkMgYWZ0ZXI6ID8gPzMgZGF5 cwo+PiAKPj4gRXhjZWxsZW50IcKgIFRoYW5rcyB0byBldmVyeWJvZHkgd2hvIGhlbHBlZCBtYWtl IHRoaXMgaGFwcGVuLCBzdGFydGluZwo+PiB3aXRoIHRoZSBwYXJ0aWNpcGFudHMgYXQgZHRyYWNl LmNvbmYgd2hvIGdhdmUgdXMgdGhlIHJlcXVpc2l0ZSB3aGFja3MKPj4gd2l0aCB0aGUgY2x1ZS1i eS1mb3VyLgo+PiAKPj4gSG93ZXZlciwgd2hhdCBpcyBvdXIgcG9saWN5IGZvciBlbmFibGluZyBm ZWF0dXJlcyBpbiAtU1RBQkxFIHRoYXQgYXJlCj4+IGtub3duIHRvIGJlIHVuc3RhYmxlP8KgIElm IHdlIE1GQyB0aGlzIEkgZG9uJ3QgaGF2ZSB0aGUgc2xpZ2h0ZXN0IHdvcnJ5Cj4+IHRoYXQgc29t ZWJvZHkgbWlnaHQgc2VlIGluc3RhYmlsaXR5IGluIHRoZWlyIHN5c3RlbSBqdXN0IGJlY2F1c2Ug dGhlCj4+IGhvb2tzIGFyZSBhbGwgb2YgYSBzdWRkZW4gdGhlcmUsIGJ1dCBJIHdvdWxkIHdvcnJ5 IHRoYXQgc29tZWJvZHkgbWFrZQo+PiB0YWtlIERUcmFjZSBob29rcyBiZWluZyBlbmFibGVkIGlu IEdFTkVSSUMgb24gLVNUQUJMRSB0byBpbXBseSB0aGF0Cj4+IERUcmFjZSBpcyBzdGFibGUsIHN0 YXJ0IHVzaW5nIGl0IGFuZCBiZWluZyB1cHNldCB3aGVuIHRoZXkgdHJpcCBvdmVyIGEKPj4gRFRy YWNlIGJ1Zy4KPiAKPiBJIHRoaW5rIHdlIHNob3VsZCBub3RlIHRoYXQgaXQgcmVtYWlucyBleHBl cmltZW50YWwgYW5kIHNvbWV3aGF0IGJ1Z2d5Cj4gaW4gdGhlIHJlbGVhc2Ugbm90ZXMgYW5kIHBy b2JhYmx5IGluIHRoZSBNRkMgbWVzc2FnZS7CoCBPdGhlcndpc2UsIGl0J3MKPiBsaWtlIGFueSBu ZXcgZmVhdHVyZS7CoCBJZiB5b3Ugc3RhcnQgdXNpbmcgYSBmZWF0dXJlIGluIHByb2R1Y3Rpb24K PiB3aXRob3V0IGV4dGVuc2l2ZSB0ZXN0aW5nIHlvdSBtYXkgYmUgc3VycHJpc2VkLgoKSSBhbSBz b3JyeSBidXQgSSBhbSBjbG9zZSB0byByZXF1ZXN0aW5nIGEgYmFja291dCBub3cgYnV0IEkgaG9w ZSBzb21lb25lCmVsc2UgbWlnaHQgYmUgYWJsZSB0byBkZWJ1ZyBpdCBmdXJ0aGVyLCBzbyBJJ2xs IHdhaXQgZm9yIGFub3RoZXIgY291cGxlCm9mIGRheXMuCgpJIGhhdmUgaGVhcmQgdGhpcyBmcm9t IG11bHRpcGxlIHBlb3BsZSBhbmQgSSBhbSBub3cgYXQgdGhlIHBvaW50IHdoZXJlCkkgd2FzdGVk IGFsbW9zdCBhIGRheSBvciB3b3JrIG9uIHRoaXMgb3ZlciB0aGUgY291cnNlIG9mIHR3byB3ZWVr cy4KCkkgYW0gbm90IGFibGUgdG8gZmluaXNoIEhFQUQgc25hcHNob3QgcmVsZWFzZSBidWlsZHMg ZXZlbiBhZnRlciB1cGRhdGluZwp0aGUgdW5kZXJseWluZyBrZXJuZWwgYW5kIHdvcmxkIHRvIGEg dG9kYXkncyBIRUFEwqAgKEkgaGFkIHRvIGRpc2FibGUgdGhlCldJVEhfQ1RGPSB0byBnZXQgdGhl IGtlcm5lbCBub3cgYm9vdGVkIHRvIGJ1aWxkKS4KCkkgaGF2ZSBzZWVuIHRoaXMgb24gbXVsdGlw bGUgc2V0dXBzIGZvciBhYm91dCB0d28gd2Vla3MuClRoZSBjb21tb24gZmFjdG9yIGlzIGFsd2F5 cyB0aGF0IGN0Zm1lcmdlIGlzIGhhbmdpbmcgZm9yZXZlci7CoCBJIGhhdmUgc2Vlbgp0aGlzIG9u IGJvdGggaTM4NiBhbmQgYW1kNjQuwqAgSSBoYXZlIHNlZW4gaXQgd2l0aCBtb2R1bGVzIGFuZCB3 aXRoCmtlcm5lbHMgYnVpbHQgd2l0aCBOT19NT0RVTEVTLsKgIEkgaGF2ZSBzZWVuIGl0IG9uIE5G UyBhbmQgb24gbG9jYWwgZGlza3MuCgpBcyBzb24gYXMgSSBhZGQgdGhlCiMgVGVtcHJhcnkgYXMg Y3RmbWVyZ2UgaGFuZ3MuCm5vbWFrZW9wdGlvbnPCoMKgIFdJVEhfQ1RGCnRoaW5ncyBhcmUgZmlu ZSBhZ2Fpbi4KCkF0IHRoZSBtb21lbnQgaXQgbG9va3MgbGlrZSB0aGlzOgoKcm9vdCAzNDYxMcKg wqAgMC4wwqAgMC4xIDM1OTA4wqAgODczNsKgIC3CoCBJwqDCoMKgwqAgNDoxOVBNwqDCoCAwOjAw LjA3IGN0Zm1lcmdlIC1MIFZFUlNJT04gLWcgLW8gaWZfYXRoLmtvLmRlYnVnIGlmX2F0aC5vIGlm X2F0aF9kZWJ1Zy5vIGlmX2F0aF9rZXljYWNoZS5vIGlmX2F0aF9zeXNjdGwubyBpZl9hdGhfdHgu byBpZl9hdGhfdHhfaHQubyBpZl9hdGhfbGVkLm8gYWhfb3NkZXAubyBhaC5vIGFoX3JlZ2RvbQpy b290IDM5MjgywqDCoCAwLjDCoCAwLjIgNDQxMDQgMTQ1MTbCoCAtwqAgScKgwqDCoMKgIDQ6MjBQ TcKgwqAgMDowMC4wNiBjdGZtZXJnZSAtTCBWRVJTSU9OIC1nIC1vIGtlcm5lbC5kZWJ1ZyBsb2Nv cmUubyBhaWM3eHh4X3JlZ19wcmludC5vIGFpYzc5eHhfcmVnX3ByaW50Lm8gY2FtLm8gY2FtX3Bl cmlwaC5vIGNhbV9xdWV1ZS5vIGNhbV9zaW0ubyBjYW1feHB0Lm8gYXRhX2FsbC5vIGF0YV94cHQu byBhdGFfcG0KCgpyb290QGJ6MTovaG9tZS9ieiAjIHByb2NzdGF0IC1rIDM0NjExCsKgIFBJRMKg wqDCoCBUSUQgQ09NTcKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoCBURE5BTUXCoMKgwqDCoMKgwqDC oMKgwqDCoCBLU1RBQ0vCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDC oCAKMzQ2MTEgMTAwMjI4IGN0Zm1lcmdlwqDCoMKgwqDCoMKgwqDCoCAtwqDCoMKgwqDCoMKgwqDC oMKgwqDCoMKgwqDCoMKgIG1pX3N3aXRjaCBzbGVlcHFfY2F0Y2hfc2lnbmFscyBzbGVlcHFfd2Fp dF9zaWcgX3NsZWVwIF9kb19sb2NrX3VtdXRleCBkb19sb2NrX3VtdXRleCBfX3VtdHhfb3Bfd2Fp dF91bXV0ZXggYW1kNjRfc3lzY2FsbCBYZmFzdF9zeXNjYWxsIAozNDYxMSAxMDA0NTIgY3RmbWVy Z2XCoMKgwqDCoMKgwqDCoMKgIC3CoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqAgbWlfc3dp dGNoIHNsZWVwcV9jYXRjaF9zaWduYWxzIHNsZWVwcV93YWl0X3NpZyBfc2xlZXAgX2RvX2xvY2tf dW11dGV4IGRvX2xvY2tfdW11dGV4IF9fdW10eF9vcF93YWl0X3VtdXRleCBhbWQ2NF9zeXNjYWxs IFhmYXN0X3N5c2NhbGwgCjM0NjExIDEwMDQ1MyBjdGZtZXJnZcKgwqDCoMKgwqDCoMKgwqAgLcKg wqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoCBtaV9zd2l0Y2ggc2xlZXBxX2NhdGNoX3NpZ25h bHMgc2xlZXBxX3dhaXRfc2lnIF9zbGVlcCBfZG9fbG9ja191bXV0ZXggZG9fbG9ja191bXV0ZXgg X191bXR4X29wX3dhaXRfdW11dGV4IGFtZDY0X3N5c2NhbGwgWGZhc3Rfc3lzY2FsbCAKMzQ2MTEg MTAwNDU0IGN0Zm1lcmdlwqDCoMKgwqDCoMKgwqDCoCAtwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKg wqDCoMKgIG1pX3N3aXRjaCBzbGVlcHFfY2F0Y2hfc2lnbmFscyBzbGVlcHFfd2FpdF9zaWcgX3Ns ZWVwIF9kb19sb2NrX3VtdXRleCBkb19sb2NrX3VtdXRleCBfX3VtdHhfb3Bfd2FpdF91bXV0ZXgg YW1kNjRfc3lzY2FsbCBYZmFzdF9zeXNjYWxsIAozNDYxMSAxMDA0NTUgY3RmbWVyZ2XCoMKgwqDC oMKgwqDCoMKgIC3CoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqAgbWlfc3dpdGNoIHNsZWVw cV9jYXRjaF9zaWduYWxzIHNsZWVwcV93YWl0X3NpZyBfc2xlZXAgX2RvX2xvY2tfdW11dGV4IGRv X2xvY2tfdW11dGV4IF9fdW10eF9vcF93YWl0X3VtdXRleCBhbWQ2NF9zeXNjYWxsIFhmYXN0X3N5 c2NhbGwgCjM0NjExIDEwMDQ1NiBjdGZtZXJnZcKgwqDCoMKgwqDCoMKgwqAgLcKgwqDCoMKgwqDC oMKgwqDCoMKgwqDCoMKgwqDCoCBtaV9zd2l0Y2ggc2xlZXBxX2NhdGNoX3NpZ25hbHMgc2xlZXBx X3dhaXRfc2lnIF9zbGVlcCBfZG9fbG9ja191bXV0ZXggZG9fbG9ja191bXV0ZXggX191bXR4X29w X3dhaXRfdW11dGV4IGFtZDY0X3N5c2NhbGwgWGZhc3Rfc3lzY2FsbCAKcm9vdEBiejE6L2hvbWUv YnogIyBwcm9jc3RhdCAtayAzOTI4MgrCoCBQSUTCoMKgwqAgVElEIENPTU3CoMKgwqDCoMKgwqDC oMKgwqDCoMKgwqAgVEROQU1FwqDCoMKgwqDCoMKgwqDCoMKgwqAgS1NUQUNLwqDCoMKgwqDCoMKg wqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqAgCjM5MjgyIDEwMDM0OCBjdGZtZXJnZcKg wqDCoMKgwqDCoMKgwqAgLcKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoCBtaV9zd2l0Y2gg c2xlZXBxX2NhdGNoX3NpZ25hbHMgc2xlZXBxX3dhaXRfc2lnIF9zbGVlcCBkb193YWl0IF9fdW10 eF9vcF93YWl0X3VpbnRfcHJpdmF0ZSBhbWQ2NF9zeXNjYWxsIFhmYXN0X3N5c2NhbGwgCjM5Mjgy IDEwMDQ1NyBjdGZtZXJnZcKgwqDCoMKgwqDCoMKgwqAgLcKgwqDCoMKgwqDCoMKgwqDCoMKgwqDC oMKgwqDCoCBtaV9zd2l0Y2ggc2xlZXBxX2NhdGNoX3NpZ25hbHMgc2xlZXBxX3dhaXRfc2lnIF9z bGVlcCBfZG9fbG9ja191bXV0ZXggZG9fbG9ja191bXV0ZXggX191bXR4X29wX3dhaXRfdW11dGV4 IGFtZDY0X3N5c2NhbGwgWGZhc3Rfc3lzY2FsbCAKMzkyODIgMTAwNDU4IGN0Zm1lcmdlwqDCoMKg wqDCoMKgwqDCoCAtwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgIG1pX3N3aXRjaCBzbGVl cHFfY2F0Y2hfc2lnbmFscyBzbGVlcHFfd2FpdF9zaWcgX3NsZWVwIF9kb19sb2NrX3VtdXRleCBk b19sb2NrX3VtdXRleCBfX3VtdHhfb3Bfd2FpdF91bXV0ZXggYW1kNjRfc3lzY2FsbCBYZmFzdF9z eXNjYWxsIAozOTI4MiAxMDA0NTkgY3RmbWVyZ2XCoMKgwqDCoMKgwqDCoMKgIC3CoMKgwqDCoMKg wqDCoMKgwqDCoMKgwqDCoMKgwqAgbWlfc3dpdGNoIHNsZWVwcV9jYXRjaF9zaWduYWxzIHNsZWVw cV93YWl0X3NpZyBfc2xlZXAgX2RvX2xvY2tfdW11dGV4IGRvX2xvY2tfdW11dGV4IF9fdW10eF9v cF93YWl0X3VtdXRleCBhbWQ2NF9zeXNjYWxsIFhmYXN0X3N5c2NhbGwgCjM5MjgyIDEwMDQ2MCBj dGZtZXJnZcKgwqDCoMKgwqDCoMKgwqAgLcKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoCBt aV9zd2l0Y2ggc2xlZXBxX2NhdGNoX3NpZ25hbHMgc2xlZXBxX3dhaXRfc2lnIF9zbGVlcCBfZG9f bG9ja191bXV0ZXggZG9fbG9ja191bXV0ZXggX191bXR4X29wX3dhaXRfdW11dGV4IGFtZDY0X3N5 c2NhbGwgWGZhc3Rfc3lzY2FsbCAKMzkyODIgMTAwNDYxIGN0Zm1lcmdlwqDCoMKgwqDCoMKgwqDC oCAtwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgIG1pX3N3aXRjaCBzbGVlcHFfY2F0Y2hf c2lnbmFscyBzbGVlcHFfd2FpdF9zaWcgX3NsZWVwIF9kb19sb2NrX3VtdXRleCBkb19sb2NrX3Vt dXRleCBfX3VtdHhfb3Bfd2FpdF91bXV0ZXggYW1kNjRfc3lzY2FsbCBYZmFzdF9zeXNjYWxsIAoK CnJvb3RAYnoxOi9ob21lL2J6ICMgcHJvY3N0YXQgLXQgMzQ2MTEKwqAgUElEwqDCoMKgIFRJRCBD T01NwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgIFRETkFNRcKgwqDCoMKgwqDCoMKgwqDCoMKgIENQ VcKgIFBSSSBTVEFURcKgwqAgV0NIQU7CoMKgwqAgCjM0NjExIDEwMDIyOCBjdGZtZXJnZcKgwqDC oMKgwqDCoMKgwqAgLcKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqAgN8KgIDE1MiBz bGVlcMKgwqAgdW10eG7CoMKgwqDCoCAKMzQ2MTEgMTAwNDUyIGN0Zm1lcmdlwqDCoMKgwqDCoMKg wqDCoCAtwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoCAxwqAgMTUyIHNsZWVwwqDC oCB1bXR4bsKgwqDCoMKgIAozNDYxMSAxMDA0NTMgY3RmbWVyZ2XCoMKgwqDCoMKgwqDCoMKgIC3C oMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgIDHCoCAxNTIgc2xlZXDCoMKgIHVtdHhu wqDCoMKgwqAgCjM0NjExIDEwMDQ1NCBjdGZtZXJnZcKgwqDCoMKgwqDCoMKgwqAgLcKgwqDCoMKg wqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqAgNMKgIDE1MiBzbGVlcMKgwqAgdW10eG7CoMKgwqDC oCAKMzQ2MTEgMTAwNDU1IGN0Zm1lcmdlwqDCoMKgwqDCoMKgwqDCoCAtwqDCoMKgwqDCoMKgwqDC oMKgwqDCoMKgwqDCoMKgwqDCoCAwwqAgMTUyIHNsZWVwwqDCoCB1bXR4bsKgwqDCoMKgIAozNDYx MSAxMDA0NTYgY3RmbWVyZ2XCoMKgwqDCoMKgwqDCoMKgIC3CoMKgwqDCoMKgwqDCoMKgwqDCoMKg wqDCoMKgwqDCoMKgIDXCoCAxNTIgc2xlZXDCoMKgIHVtdHhuwqDCoMKgwqAgCnJvb3RAYnoxOi9o b21lL2J6ICMgcHJvY3N0YXQgLXQgMzkyODIKwqAgUElEwqDCoMKgIFRJRCBDT01NwqDCoMKgwqDC oMKgwqDCoMKgwqDCoMKgIFRETkFNRcKgwqDCoMKgwqDCoMKgwqDCoMKgIENQVcKgIFBSSSBTVEFU RcKgwqAgV0NIQU7CoMKgwqAgCjM5MjgyIDEwMDM0OCBjdGZtZXJnZcKgwqDCoMKgwqDCoMKgwqAg LcKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqAgN8KgIDE1MiBzbGVlcMKgwqAgdXdh aXTCoMKgwqDCoCAKMzkyODIgMTAwNDU3IGN0Zm1lcmdlwqDCoMKgwqDCoMKgwqDCoCAtwqDCoMKg wqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoCAywqAgMTUyIHNsZWVwwqDCoCB1bXR4bsKgwqDC oMKgIAozOTI4MiAxMDA0NTggY3RmbWVyZ2XCoMKgwqDCoMKgwqDCoMKgIC3CoMKgwqDCoMKgwqDC oMKgwqDCoMKgwqDCoMKgwqDCoMKgIDTCoCAxNTIgc2xlZXDCoMKgIHVtdHhuwqDCoMKgwqAgCjM5 MjgyIDEwMDQ1OSBjdGZtZXJnZcKgwqDCoMKgwqDCoMKgwqAgLcKgwqDCoMKgwqDCoMKgwqDCoMKg wqDCoMKgwqDCoMKgwqAgMcKgIDE1MiBzbGVlcMKgwqAgdW10eG7CoMKgwqDCoCAKMzkyODIgMTAw NDYwIGN0Zm1lcmdlwqDCoMKgwqDCoMKgwqDCoCAtwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDC oMKgwqDCoCA1wqAgMTUyIHNsZWVwwqDCoCB1bXR4bsKgwqDCoMKgIAozOTI4MiAxMDA0NjEgY3Rm bWVyZ2XCoMKgwqDCoMKgwqDCoMKgIC3CoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKg IDDCoCAxNTIgc2xlZXDCoMKgIHVtdHhuwqDCoMKgwqAgCgoKcm9vdEBiejE6L2hvbWUvYnogIyBw cm9jc3RhdCAtaSAzNDYxMSB8IGdyZXAgLXYgLS0gJy0tLSQnCsKgIFBJRCBDT01NwqDCoMKgwqDC oMKgwqDCoMKgwqDCoMKgIFNJR8KgwqDCoMKgIEZMQUdTCjM0NjExIGN0Zm1lcmdlwqDCoMKgwqDC oMKgwqDCoCBJTlTCoMKgwqDCoMKgIC0tQwozNDYxMSBjdGZtZXJnZcKgwqDCoMKgwqDCoMKgwqAg UVVJVMKgwqDCoMKgIC0tQwozNDYxMSBjdGZtZXJnZcKgwqDCoMKgwqDCoMKgwqAgVEVSTcKgwqDC oMKgIC0tQwozNDYxMSBjdGZtZXJnZcKgwqDCoMKgwqDCoMKgwqAgVVJHwqDCoMKgwqDCoCAtSS0K MzQ2MTEgY3RmbWVyZ2XCoMKgwqDCoMKgwqDCoMKgIFRTVFDCoMKgwqDCoCAtSS0KMzQ2MTEgY3Rm bWVyZ2XCoMKgwqDCoMKgwqDCoMKgIENITETCoMKgwqDCoCAtSS0KMzQ2MTEgY3RmbWVyZ2XCoMKg wqDCoMKgwqDCoMKgIFRUSU7CoMKgwqDCoCAtSS0KMzQ2MTEgY3RmbWVyZ2XCoMKgwqDCoMKgwqDC oMKgIFRUT1XCoMKgwqDCoCAtSS0KMzQ2MTEgY3RmbWVyZ2XCoMKgwqDCoMKgwqDCoMKgIElPwqDC oMKgwqDCoMKgIC1JLQozNDYxMSBjdGZtZXJnZcKgwqDCoMKgwqDCoMKgwqAgV0lOQ0jCoMKgwqAg LUktCjM0NjExIGN0Zm1lcmdlwqDCoMKgwqDCoMKgwqDCoCBJTkZPwqDCoMKgwqAgLUktCjM0NjEx IGN0Zm1lcmdlwqDCoMKgwqDCoMKgwqDCoCAzMsKgwqDCoMKgwqDCoCAtLUMKcm9vdEBiejE6L2hv bWUvYnogIyBwcm9jc3RhdCAtaSAzOTI4MiB8IGdyZXAgLXYgLS0gJy0tLSQnCsKgIFBJRCBDT01N wqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgIFNJR8KgwqDCoMKgIEZMQUdTCjM5MjgyIGN0Zm1lcmdl wqDCoMKgwqDCoMKgwqDCoCBJTlTCoMKgwqDCoMKgIC0tQwozOTI4MiBjdGZtZXJnZcKgwqDCoMKg wqDCoMKgwqAgUVVJVMKgwqDCoMKgIC0tQwozOTI4MiBjdGZtZXJnZcKgwqDCoMKgwqDCoMKgwqAg VEVSTcKgwqDCoMKgIC0tQwozOTI4MiBjdGZtZXJnZcKgwqDCoMKgwqDCoMKgwqAgVVJHwqDCoMKg wqDCoCAtSS0KMzkyODIgY3RmbWVyZ2XCoMKgwqDCoMKgwqDCoMKgIFRTVFDCoMKgwqDCoCAtSS0K MzkyODIgY3RmbWVyZ2XCoMKgwqDCoMKgwqDCoMKgIENITETCoMKgwqDCoCAtSS0KMzkyODIgY3Rm bWVyZ2XCoMKgwqDCoMKgwqDCoMKgIFRUSU7CoMKgwqDCoCAtSS0KMzkyODIgY3RmbWVyZ2XCoMKg wqDCoMKgwqDCoMKgIFRUT1XCoMKgwqDCoCAtSS0KMzkyODIgY3RmbWVyZ2XCoMKgwqDCoMKgwqDC oMKgIElPwqDCoMKgwqDCoMKgIC1JLQozOTI4MiBjdGZtZXJnZcKgwqDCoMKgwqDCoMKgwqAgV0lO Q0jCoMKgwqAgLUktCjM5MjgyIGN0Zm1lcmdlwqDCoMKgwqDCoMKgwqDCoCBJTkZPwqDCoMKgwqAg LUktCjM5MjgyIGN0Zm1lcmdlwqDCoMKgwqDCoMKgwqDCoCAzMsKgwqDCoMKgwqDCoCAtLUMKCgoK cm9vdEBiejE6L2hvbWUvYnogIyBwcm9jc3RhdCAtaiAzNDYxMSB8IGdyZXAgLXYgLS0gJy0tJCcK wqAgUElEwqDCoMKgIFRJRCBDT01NwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgIFNJR8KgwqDCoMKg IEZMQUdTCjM0NjExIDEwMDQ1MiBjdGZtZXJnZcKgwqDCoMKgwqDCoMKgwqAgSU5UwqDCoMKgwqDC oCAtQgozNDYxMSAxMDA0NTIgY3RmbWVyZ2XCoMKgwqDCoMKgwqDCoMKgIFFVSVTCoMKgwqDCoCAt QgozNDYxMSAxMDA0NTIgY3RmbWVyZ2XCoMKgwqDCoMKgwqDCoMKgIFRFUk3CoMKgwqDCoCAtQgoz NDYxMSAxMDA0NTMgY3RmbWVyZ2XCoMKgwqDCoMKgwqDCoMKgIElOVMKgwqDCoMKgwqAgLUIKMzQ2 MTEgMTAwNDUzIGN0Zm1lcmdlwqDCoMKgwqDCoMKgwqDCoCBRVUlUwqDCoMKgwqAgLUIKMzQ2MTEg MTAwNDUzIGN0Zm1lcmdlwqDCoMKgwqDCoMKgwqDCoCBURVJNwqDCoMKgwqAgLUIKMzQ2MTEgMTAw NDU0IGN0Zm1lcmdlwqDCoMKgwqDCoMKgwqDCoCBJTlTCoMKgwqDCoMKgIC1CCjM0NjExIDEwMDQ1 NCBjdGZtZXJnZcKgwqDCoMKgwqDCoMKgwqAgUVVJVMKgwqDCoMKgIC1CCjM0NjExIDEwMDQ1NCBj dGZtZXJnZcKgwqDCoMKgwqDCoMKgwqAgVEVSTcKgwqDCoMKgIC1CCjM0NjExIDEwMDQ1NSBjdGZt ZXJnZcKgwqDCoMKgwqDCoMKgwqAgSU5UwqDCoMKgwqDCoCAtQgozNDYxMSAxMDA0NTUgY3RmbWVy Z2XCoMKgwqDCoMKgwqDCoMKgIFFVSVTCoMKgwqDCoCAtQgozNDYxMSAxMDA0NTUgY3RmbWVyZ2XC oMKgwqDCoMKgwqDCoMKgIFRFUk3CoMKgwqDCoCAtQgozNDYxMSAxMDA0NTYgY3RmbWVyZ2XCoMKg wqDCoMKgwqDCoMKgIElOVMKgwqDCoMKgwqAgLUIKMzQ2MTEgMTAwNDU2IGN0Zm1lcmdlwqDCoMKg wqDCoMKgwqDCoCBRVUlUwqDCoMKgwqAgLUIKMzQ2MTEgMTAwNDU2IGN0Zm1lcmdlwqDCoMKgwqDC oMKgwqDCoCBURVJNwqDCoMKgwqAgLUIKcm9vdEBiejE6L2hvbWUvYnogIyBwcm9jc3RhdCAtaiAz OTI4MiB8IGdyZXAgLXYgLS0gJy0tJCcKwqAgUElEwqDCoMKgIFRJRCBDT01NwqDCoMKgwqDCoMKg wqDCoMKgwqDCoMKgIFNJR8KgwqDCoMKgIEZMQUdTCjM5MjgyIDEwMDQ1NyBjdGZtZXJnZcKgwqDC oMKgwqDCoMKgwqAgSU5UwqDCoMKgwqDCoCAtQgozOTI4MiAxMDA0NTcgY3RmbWVyZ2XCoMKgwqDC oMKgwqDCoMKgIFFVSVTCoMKgwqDCoCAtQgozOTI4MiAxMDA0NTcgY3RmbWVyZ2XCoMKgwqDCoMKg wqDCoMKgIFRFUk3CoMKgwqDCoCAtQgozOTI4MiAxMDA0NTggY3RmbWVyZ2XCoMKgwqDCoMKgwqDC oMKgIElOVMKgwqDCoMKgwqAgLUIKMzkyODIgMTAwNDU4IGN0Zm1lcmdlwqDCoMKgwqDCoMKgwqDC oCBRVUlUwqDCoMKgwqAgLUIKMzkyODIgMTAwNDU4IGN0Zm1lcmdlwqDCoMKgwqDCoMKgwqDCoCBU RVJNwqDCoMKgwqAgLUIKMzkyODIgMTAwNDU5IGN0Zm1lcmdlwqDCoMKgwqDCoMKgwqDCoCBJTlTC oMKgwqDCoMKgIC1CCjM5MjgyIDEwMDQ1OSBjdGZtZXJnZcKgwqDCoMKgwqDCoMKgwqAgUVVJVMKg wqDCoMKgIC1CCjM5MjgyIDEwMDQ1OSBjdGZtZXJnZcKgwqDCoMKgwqDCoMKgwqAgVEVSTcKgwqDC oMKgIC1CCjM5MjgyIDEwMDQ2MCBjdGZtZXJnZcKgwqDCoMKgwqDCoMKgwqAgSU5UwqDCoMKgwqDC oCAtQgozOTI4MiAxMDA0NjAgY3RmbWVyZ2XCoMKgwqDCoMKgwqDCoMKgIFFVSVTCoMKgwqDCoCAt QgozOTI4MiAxMDA0NjAgY3RmbWVyZ2XCoMKgwqDCoMKgwqDCoMKgIFRFUk3CoMKgwqDCoCAtQgoz OTI4MiAxMDA0NjEgY3RmbWVyZ2XCoMKgwqDCoMKgwqDCoMKgIElOVMKgwqDCoMKgwqAgLUIKMzky ODIgMTAwNDYxIGN0Zm1lcmdlwqDCoMKgwqDCoMKgwqDCoCBRVUlUwqDCoMKgwqAgLUIKMzkyODIg MTAwNDYxIGN0Zm1lcmdlwqDCoMKgwqDCoMKgwqDCoCBURVJNwqDCoMKgwqAgLUIKCgoKU28gZ2l2 ZW4gSSBoYXZlIGJlZW4gdXBzZXQgSSBzdGFydGVkIHRvIGludmVzdGlnYXRlIHNvbWUgbW9yZS4K Cm1ha2UgLUMgL3Vzci9zcmPCoMKgwqAgYnVpbGR3b3JsZMKgIGRpZCBub3Qgd29yayBlaXRoZXIg KG5vIC1qPG4+KS4KClNvIEkgc3RhcnRlZCBhbmQgbGltaXRlZCB0aGUgYnVpbGQgdG8gMSBjb3Jl OgoKY3B1c2V0IC1sIDEgbWFrZSAtQyAvdXNyL3NyYyBidWlsZGtlcm5lbMKgwqAgZGlkIG5vdCB3 b3JrIGVpdGhlci4KCgpTbyBhZGRlZCB0aGUgbm9tYWtlb3B0aW9ucyBXSVRIX0NURsKgIGFuZAoK bWFrZSAtQyAvdXNyL3NyYyAtajggYnVpbGRrZXJuZWzCoCBjb21wbGV0ZXMuCgpTbyByZW1vdmVk IHRoZSBtYWtlb3B0aW9ucyBXSVRIX0NURiBmcm9tIEdFTlJJQyBhbmQgdGhlIG5vbWFrZW9wdGlv bnMgZnJvbSBteSBrZXJuZWwgaW5jbHVkaW5nIEdFTkVSSUMgYW5kIGFkZGVkIGl0IHRvIHRoZSBj b21tYW5kIGxpbmU6CgptYWtlIC1DIC91c3Ivc3JjIC1qOCBidWlsZGtlcm5lbCBXSVRIX0NURj0g CgphbmQgdGhhdCBkb2Vzbid0IHNlZW0gdG8gd29yayBhdCBhbGwgYW55bW9yZT8KCiIvdXNyL3Ny Yy9zaGFyZS9tay9ic2Qub3duLm1rIiwgbGluZSA0ODI6IFdJVEhfQ1RGIGFuZCBXSVRIT1VUX0NU RiBjYW4ndCBib3RoIGJlIHNldC4KCgpTbyBJIGRpZDoKZWNobyBXSVRIX0NURj0gPj4gL2V0Yy9z cmMuY29uZgptYWtlIC1DIC91c3Ivc3JjIC1qOCBidWlsZGtlcm5lbAoKYW5kIG9mIGNvdXJzZSBp dCBkaWQgbm90IHdvcmsgYWdhaW4uCgoKCkdpdmVuIGFsbCB0aGlzIGFuZCBnaXZlbiBpdCBoYXMg cmVsaWFibHkgd29ya2VkIGluIHRoZSBwYXN0LCBteSBjb25jbHVzaW9ucyBpcyB0aGF0IGl0IG11 c3QgYmUgc29tZXRoaW5nIHJlbGF0ZWQgdG8gY3RmbWVyZ2Ugb3IgbGlicmFyaWVzPwovdXNyL2Jp bi9jdGZtZXJnZToKwqDCoMKgwqDCoMKgwqAgbGliY3RmLnNvLjIgPT4gL2xpYi9saWJjdGYuc28u MiAoMHg4MDA4MjkwMDApCsKgwqDCoMKgwqDCoMKgIGxpYmR3YXJmLnNvLjMgPT4gL3Vzci9saWIv bGliZHdhcmYuc28uMyAoMHg4MDBhMzYwMDApCsKgwqDCoMKgwqDCoMKgIGxpYmVsZi5zby4xID0+ IC91c3IvbGliL2xpYmVsZi5zby4xICgweDgwMGMzZjAwMCkKwqDCoMKgwqDCoMKgwqAgbGliei5z by42ID0+IC9saWIvbGliei5zby42ICgweDgwMGU1ODAwMCkKwqDCoMKgwqDCoMKgwqAgbGlidGhy LnNvLjMgPT4gL2xpYi9saWJ0aHIuc28uMyAoMHg4MDEwNmUwMDApCsKgwqDCoMKgwqDCoMKgIGxp YmMuc28uNyA9PiAvbGliL2xpYmMuc28uNyAoMHg4MDEyOTMwMDApCgpXaGF0IGhhcyBjaGFuZ2Vk IHRoZSBsYXN0IDNpc2ggbW9udGhzPwoKL2J6CgotLSAKQmpvZXJuIEEuIFplZWLCoMKgwqDCoMKg wqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgIFlv dSBoYXZlIHRvIGhhdmUgdmlzaW9ucyEKwqDCoCBJdCBkb2VzIG5vdCBtYXR0ZXIgaG93IGdvb2Qg eW91IGFyZS4gSXQgbWF0dGVycyB3aGF0IGdvb2QgeW91IGRvIQoK From owner-svn-src-head@FreeBSD.ORG Mon May 7 15:03:42 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5AC9106566B; Mon, 7 May 2012 15:03:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90E4B8FC08; Mon, 7 May 2012 15:03:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q47F3goN070126; Mon, 7 May 2012 15:03:42 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q47F3gsa070124; Mon, 7 May 2012 15:03:42 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205071503.q47F3gsa070124@svn.freebsd.org> From: Andriy Gapon Date: Mon, 7 May 2012 15:03:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235129 - head/tools/tools/zfsboottest X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 07 May 2012 15:03:42 -0000 Author: avg Date: Mon May 7 15:03:42 2012 New Revision: 235129 URL: http://svn.freebsd.org/changeset/base/235129 Log: zfsboottest.sh: gracefully handle default value of bootfs property Reported by: theraven MFC after: 10 days Modified: head/tools/tools/zfsboottest/zfsboottest.sh Modified: head/tools/tools/zfsboottest/zfsboottest.sh ============================================================================== --- head/tools/tools/zfsboottest/zfsboottest.sh Mon May 7 14:07:13 2012 (r235128) +++ head/tools/tools/zfsboottest/zfsboottest.sh Mon May 7 15:03:42 2012 (r235129) @@ -52,8 +52,7 @@ if [ $? -ne 0 ]; then fi bootfs=`zpool get bootfs "${pool}" | tail -1 | awk '{print $3}'` if [ "${bootfs}" = "-" ]; then - echo "The \"bootfs\" property is not configured for pool \"${pool}\"." >&2 - exit 1 + bootfs="${pool}" fi # Dataset's mountpoint property should be set to 'legacy'. if [ "`zfs get -H -o value mountpoint ${bootfs}`" != "legacy" ]; then From owner-svn-src-head@FreeBSD.ORG Mon May 7 15:06:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A26FA1065672; Mon, 7 May 2012 15:06:00 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 284CC8FC14; Mon, 7 May 2012 15:06:00 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 0489E25D385D; Mon, 7 May 2012 15:05:58 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 1C930BE6715; Mon, 7 May 2012 15:05:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id c7MPz3PkGg64; Mon, 7 May 2012 15:05:57 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 02DCCBE6713; Mon, 7 May 2012 15:05:56 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: Date: Mon, 7 May 2012 15:05:55 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <98111332-EED8-468C-A3E4-1427984E934C@FreeBSD.org> References: <201204202137.q3KLbhNj056524@svn.freebsd.org> <20120421171128.GA6732@lor.one-eyed-alien.net> <3D17FEF6-8CC5-4BBB-B098-BEA7D28F377D@FreeBSD.org> To: Ryan Stone X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Brooks Davis , src-committers@freebsd.org Subject: Re: svn commit: r234504 - in head/sys: amd64/conf i386/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, 07 May 2012 15:06:00 -0000 On 7. May 2012, at 13:53 , Ryan Stone wrote: > A libthr fix went in on the 5th in r235068. I think that it was root@noinet:/usr/src # ident lib/libthr/thread/thr_sleepq.c lib/libthr/thread/thr_sleepq.c: $FreeBSD: head/lib/libthr/thread/thr_sleepq.c 235068 2012-05-05 = 23:51:24Z davidxu $ yes I do. =20 > pthreads locking related. Do you have that revision? If you do, does > backing up r234947 fix your problems? I doubt that as I have seen it on machines running installs from January/Feburary-ish when doing their update builds. I fear I'll eventually have to start a binary search unless someone has more data points. But it seems I am not alone, so.. /bz --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-head@FreeBSD.ORG Mon May 7 15:06:18 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CCA51065785; Mon, 7 May 2012 15:06:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E579E8FC12; Mon, 7 May 2012 15:06:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q47F67T3070239; Mon, 7 May 2012 15:06:07 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q47F67RW070238; Mon, 7 May 2012 15:06:07 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205071506.q47F67RW070238@svn.freebsd.org> From: Andriy Gapon Date: Mon, 7 May 2012 15:06: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: r235130 - head/tools/tools/zfsboottest X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 07 May 2012 15:06:18 -0000 Author: avg Date: Mon May 7 15:06:07 2012 New Revision: 235130 URL: http://svn.freebsd.org/changeset/base/235130 Log: zfsboottest.sh: correctly check and suggest value of vfs.root.mountfrom ... it was missing "zfs:" prefix. Reported by: theraven MFC after: 10 days Modified: head/tools/tools/zfsboottest/zfsboottest.sh Modified: head/tools/tools/zfsboottest/zfsboottest.sh ============================================================================== --- head/tools/tools/zfsboottest/zfsboottest.sh Mon May 7 15:03:42 2012 (r235129) +++ head/tools/tools/zfsboottest/zfsboottest.sh Mon May 7 15:06:07 2012 (r235130) @@ -72,11 +72,11 @@ fi # or vfs.root.mountfrom variable set in /boot/loader.conf. egrep -q '^'"${bootfs}"'[[:space:]]+/[[:space:]]+zfs[[:space:]]+' "${mountpoint}/etc/fstab" 2>/dev/null if [ $? -ne 0 ]; then - egrep -q 'vfs.root.mountfrom="?'"${bootfs}"'"?[[:space:]]*$' "${mountpoint}/boot/loader.conf" 2>/dev/null + egrep -q 'vfs.root.mountfrom="?'"zfs:${bootfs}"'"?[[:space:]]*$' "${mountpoint}/boot/loader.conf" 2>/dev/null if [ $? -ne 0 ]; then echo "To be able to boot from \"${bootfs}\", you need to declare" >&2 echo "\"${bootfs}\" as being root file system in ${mountpoint}/etc/fstab" >&2 - echo "or add \"vfs.root.mountfrom\" variable set to \"${bootfs}\" to" >&2 + echo "or add \"vfs.root.mountfrom\" variable set to \"zfs:${bootfs}\" to" >&2 echo "${mountpoint}/boot/loader.conf." >&2 exit 1 fi From owner-svn-src-head@FreeBSD.ORG Mon May 7 15:41:31 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6B821065673; Mon, 7 May 2012 15:41: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 D187A8FC19; Mon, 7 May 2012 15:41:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q47FfV9G071470; Mon, 7 May 2012 15:41:31 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q47FfVm9071468; Mon, 7 May 2012 15:41:31 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201205071541.q47FfVm9071468@svn.freebsd.org> From: John Baldwin Date: Mon, 7 May 2012 15:41: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: r235132 - head/etc/periodic/daily X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 07 May 2012 15:41:32 -0000 Author: jhb Date: Mon May 7 15:41:31 2012 New Revision: 235132 URL: http://svn.freebsd.org/changeset/base/235132 Log: Display dropped transmit packets in the daily network interface output. PR: conf/165956 Submitted by: Jeremy Chadwick MFC after: 1 week Modified: head/etc/periodic/daily/420.status-network Modified: head/etc/periodic/daily/420.status-network ============================================================================== --- head/etc/periodic/daily/420.status-network Mon May 7 15:30:53 2012 (r235131) +++ head/etc/periodic/daily/420.status-network Mon May 7 15:41:31 2012 (r235132) @@ -18,9 +18,9 @@ case "$daily_status_network_enable" in case "$daily_status_network_usedns" in [Yy][Ee][Ss]) - netstat -i && rc=0 || rc=3;; + netstat -id && rc=0 || rc=3;; *) - netstat -in && rc=0 || rc=3;; + netstat -idn && rc=0 || rc=3;; esac;; *) rc=0;; From owner-svn-src-head@FreeBSD.ORG Mon May 7 17:13:37 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 71308106566C; Mon, 7 May 2012 17:13:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4207B8FC12; Mon, 7 May 2012 17:13:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q47HDbIa074565; Mon, 7 May 2012 17:13:37 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q47HDbri074562; Mon, 7 May 2012 17:13:37 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201205071713.q47HDbri074562@svn.freebsd.org> From: Dimitry Andric Date: Mon, 7 May 2012 17:13:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235133 - in head: contrib/binutils/ld/emultempl share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 May 2012 17:13:37 -0000 Author: dim Date: Mon May 7 17:13:36 2012 New Revision: 235133 URL: http://svn.freebsd.org/changeset/base/235133 Log: Revert r234656, and apply a proper fix for binutils PR 10474, which caused linking clang on 32-bit PowerPC to fail with "relocation truncated to fit: R_PPC_REL24" errors. Original diffs (relicensed under GPLv2 with permission from author): http://sourceware.org/git/?p=binutils.git;a=commit;h=1fd262ff7d7ea5adf4894c6b960e092e7e43e3cd http://sourceware.org/git/?p=binutils.git;a=commit;h=053c49fbff58bd33bd0d12200ea61302f92caceb Tested by: andreast MFC after: 1 week Modified: head/contrib/binutils/ld/emultempl/ppc32elf.em head/share/mk/bsd.own.mk Modified: head/contrib/binutils/ld/emultempl/ppc32elf.em ============================================================================== --- head/contrib/binutils/ld/emultempl/ppc32elf.em Mon May 7 15:41:31 2012 (r235132) +++ head/contrib/binutils/ld/emultempl/ppc32elf.em Mon May 7 17:13:36 2012 (r235133) @@ -119,7 +119,40 @@ ppc_before_allocation (void) } } } + gld${EMULATION_NAME}_before_allocation (); + + /* Turn on relaxation if executable sections have addresses that + might make branches overflow. */ + if (!command_line.relax) + { + bfd_vma low = (bfd_vma) -1; + bfd_vma high = 0; + asection *o; + + /* Run lang_size_sections (if not already done). */ + if (expld.phase != lang_mark_phase_enum) + { + expld.phase = lang_mark_phase_enum; + expld.dataseg.phase = exp_dataseg_none; + one_lang_size_sections_pass (NULL, FALSE); + lang_reset_memory_regions (); + } + + for (o = output_bfd->sections; o != NULL; o = o->next) + { + if ((o->flags & (SEC_ALLOC | SEC_CODE)) != (SEC_ALLOC | SEC_CODE)) + continue; + if (o->rawsize == 0) + continue; + if (low > o->vma) + low = o->vma; + if (high < o->vma + o->rawsize - 1) + high = o->vma + o->rawsize - 1; + } + if (high > low && high - low > (1 << 25) - 1) + command_line.relax = TRUE; + } } EOF Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Mon May 7 15:41:31 2012 (r235132) +++ head/share/mk/bsd.own.mk Mon May 7 17:13:36 2012 (r235133) @@ -442,8 +442,7 @@ __T=${TARGET_ARCH} __T=${MACHINE_ARCH} .endif # Clang is only for x86 and powerpc right now, by default. -# XXX: Temporarily disabled for 32-bit powerpc, due to a binutils bug. -.if ${__T} == "amd64" || ${__T} == "i386" || ${__T} == "powerpc64" +.if ${__T} == "amd64" || ${__T} == "i386" || ${__T:Mpowerpc*} __DEFAULT_YES_OPTIONS+=CLANG .else __DEFAULT_NO_OPTIONS+=CLANG From owner-svn-src-head@FreeBSD.ORG Mon May 7 18:09:03 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 798AC106566B; Mon, 7 May 2012 18:09:03 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id D86B614D9FC; Mon, 7 May 2012 18:09:02 +0000 (UTC) Message-ID: <4FA80FBE.3070804@FreeBSD.org> Date: Mon, 07 May 2012 11:09:02 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120410 Thunderbird/11.0.1 MIME-Version: 1.0 To: Stanislav Sedov References: <201205062046.q46Kk5Ae031154@svn.freebsd.org> In-Reply-To: <201205062046.q46Kk5Ae031154@svn.freebsd.org> X-Enigmail-Version: 1.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r235107 - in head/etc: defaults 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: Mon, 07 May 2012 18:09:03 -0000 On 05/06/2012 01:46 PM, Stanislav Sedov wrote: > Author: stas > Date: Sun May 6 20:46:04 2012 > New Revision: 235107 > URL: http://svn.freebsd.org/changeset/base/235107 > > Log: > - Change kfd rc script to be more conformant with rcNG conventions: > o change rcname to kfd; > o move mandatory options to command_args; > o add missing "shutdown" keyword; > o fix require line. Kfd doesn't really need to be started before > daemons. > > Suggested by: dougb > > Modified: > head/etc/defaults/rc.conf > head/etc/rc.d/kfd Thanks! :) From owner-svn-src-head@FreeBSD.ORG Mon May 7 18:30:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E7246106579D; Mon, 7 May 2012 18:30:22 +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 D35998FC0A; Mon, 7 May 2012 18:30:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q47IUMsv077140; Mon, 7 May 2012 18:30:22 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q47IUMKa077138; Mon, 7 May 2012 18:30:22 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201205071830.q47IUMKa077138@svn.freebsd.org> From: Adrian Chadd Date: Mon, 7 May 2012 18:30: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: r235134 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 07 May 2012 18:30:23 -0000 Author: adrian Date: Mon May 7 18:30:22 2012 New Revision: 235134 URL: http://svn.freebsd.org/changeset/base/235134 Log: Re-enable this particular DELAY() for now, at least until the TX and RX PCU stop/drain routines have been thoroughly debugged. It's also very likely that I should add hooks back up to the interface glue (if_ath_pci / if_ath_ahb) to do any relevant bus flushes that are required. A WMAC DDR flush may be required for the AR9130 SoC. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon May 7 17:13:36 2012 (r235133) +++ head/sys/dev/ath/if_ath.c Mon May 7 18:30:22 2012 (r235134) @@ -5421,7 +5421,9 @@ ath_stoprecv(struct ath_softc *sc, int d * TODO: see if this particular DELAY() is required; it may be * masking some missing FIFO flush or DMA sync. */ +#if 0 if (dodelay) +#endif DELAY(3000); /* 3ms is long enough for 1 frame */ #ifdef ATH_DEBUG if (sc->sc_debug & (ATH_DEBUG_RESET | ATH_DEBUG_FATAL)) { From owner-svn-src-head@FreeBSD.ORG Mon May 7 21:36:34 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D68AA106564A; Mon, 7 May 2012 21:36:34 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id B04468FC16; Mon, 7 May 2012 21:36:33 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.4/8.14.4) with ESMTP id q47LZHtk012598; Mon, 7 May 2012 16:35:17 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.4/8.14.4/Submit) id q47LZHLb012597; Mon, 7 May 2012 16:35:17 -0500 (CDT) (envelope-from brooks) Date: Mon, 7 May 2012 16:35:17 -0500 From: Brooks Davis To: "Bjoern A. Zeeb" Message-ID: <20120507213517.GC12377@lor.one-eyed-alien.net> References: <201204202137.q3KLbhNj056524@svn.freebsd.org> <20120421171128.GA6732@lor.one-eyed-alien.net> <3D17FEF6-8CC5-4BBB-B098-BEA7D28F377D@FreeBSD.org> <98111332-EED8-468C-A3E4-1427984E934C@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1SQmhf2mF2YjsYvc" Content-Disposition: inline In-Reply-To: <98111332-EED8-468C-A3E4-1427984E934C@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, Ryan Stone Subject: Re: svn commit: r234504 - in head/sys: amd64/conf i386/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, 07 May 2012 21:36:34 -0000 --1SQmhf2mF2YjsYvc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 07, 2012 at 03:05:55PM +0000, Bjoern A. Zeeb wrote: > On 7. May 2012, at 13:53 , Ryan Stone wrote: >=20 > > A libthr fix went in on the 5th in r235068. I think that it was >=20 > root@noinet:/usr/src # ident lib/libthr/thread/thr_sleepq.c > lib/libthr/thread/thr_sleepq.c: > $FreeBSD: head/lib/libthr/thread/thr_sleepq.c 235068 2012-05-05 23:5= 1:24Z davidxu $ >=20 > yes I do. =20 >=20 > > pthreads locking related. Do you have that revision? If you do, does > > backing up r234947 fix your problems? >=20 > I doubt that as I have seen it on machines running installs from > January/Feburary-ish when doing their update builds. >=20 > I fear I'll eventually have to start a binary search unless someone > has more data points. But it seems I am not alone, so.. Does it make sense to just comment out the WITH_CTF=3D1 make option or should I back the whole commit out? -- Brooks --1SQmhf2mF2YjsYvc Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFPqEAUXY6L6fI4GtQRAuFZAKDW14s1t4wf50bUAAtn2zDYYsk2egCgqA2m 2vnyGvv9QzU+ofxMail1naE= =lqBS -----END PGP SIGNATURE----- --1SQmhf2mF2YjsYvc-- From owner-svn-src-head@FreeBSD.ORG Mon May 7 22:02:30 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 977571065672; Mon, 7 May 2012 22:02:30 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 1B48D8FC19; Mon, 7 May 2012 22:02:30 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id E5FF525D3872; Mon, 7 May 2012 22:02:28 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 12111BE6769; Mon, 7 May 2012 22:02:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id Yd7dPeKxpevH; Mon, 7 May 2012 22:02:27 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id CF896BE6766; Mon, 7 May 2012 22:02:26 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <20120507213517.GC12377@lor.one-eyed-alien.net> Date: Mon, 7 May 2012 22:02:25 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <47FDFFAE-D420-4950-8946-1C7C7F97C335@FreeBSD.org> References: <201204202137.q3KLbhNj056524@svn.freebsd.org> <20120421171128.GA6732@lor.one-eyed-alien.net> <3D17FEF6-8CC5-4BBB-B098-BEA7D28F377D@FreeBSD.org> <98111332-EED8-468C-A3E4-1427984E934C@FreeBSD.org> <20120507213517.GC12377@lor.one-eyed-alien.net> To: Brooks Davis X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Ryan Stone Subject: Re: svn commit: r234504 - in head/sys: amd64/conf i386/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, 07 May 2012 22:02:30 -0000 On 7. May 2012, at 21:35 , Brooks Davis wrote: > On Mon, May 07, 2012 at 03:05:55PM +0000, Bjoern A. Zeeb wrote: >> On 7. May 2012, at 13:53 , Ryan Stone wrote: >>=20 >>> A libthr fix went in on the 5th in r235068. I think that it was >>=20 >> root@noinet:/usr/src # ident lib/libthr/thread/thr_sleepq.c >> lib/libthr/thread/thr_sleepq.c: >> $FreeBSD: head/lib/libthr/thread/thr_sleepq.c 235068 2012-05-05 = 23:51:24Z davidxu $ >>=20 >> yes I do. =20 >>=20 >>> pthreads locking related. Do you have that revision? If you do, = does >>> backing up r234947 fix your problems? >>=20 >> I doubt that as I have seen it on machines running installs from >> January/Feburary-ish when doing their update builds. >>=20 >> I fear I'll eventually have to start a binary search unless someone >> has more data points. But it seems I am not alone, so.. >=20 > Does it make sense to just comment out the WITH_CTF=3D1 make option or > should I back the whole commit out? I'd currently wait with the backout for another few days. It seems we = have a couple of people looking to figure it out. If we can't find it by the end of the week I'd comment out the WITH_CTF=3D for now. /bz --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-head@FreeBSD.ORG Tue May 8 02:03:03 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43493106566C; Tue, 8 May 2012 02:03:03 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id E3F458FC0A; Tue, 8 May 2012 02:03:02 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id 7C3C23C6; Tue, 8 May 2012 04:03:01 +0200 (CEST) Date: Tue, 8 May 2012 04:01:19 +0200 From: Pawel Jakub Dawidek To: Andriy Gapon Message-ID: <20120508020119.GE1395@garage.freebsd.pl> References: <201205071503.q47F3gsa070124@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Y1L3PTX8QE8cb2T+" Content-Disposition: inline In-Reply-To: <201205071503.q47F3gsa070124@svn.freebsd.org> X-OS: FreeBSD 10.0-CURRENT amd64 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: r235129 - head/tools/tools/zfsboottest X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 08 May 2012 02:03:03 -0000 --Y1L3PTX8QE8cb2T+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 07, 2012 at 03:03:42PM +0000, Andriy Gapon wrote: > Author: avg > Date: Mon May 7 15:03:42 2012 > New Revision: 235129 > URL: http://svn.freebsd.org/changeset/base/235129 >=20 > Log: > zfsboottest.sh: gracefully handle default value of bootfs property I'd prefer if people avoid having their root file system at the pool level, so maybe we could leave it as a warning? > Reported by: theraven > MFC after: 10 days >=20 > Modified: > head/tools/tools/zfsboottest/zfsboottest.sh >=20 > Modified: head/tools/tools/zfsboottest/zfsboottest.sh > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/tools/tools/zfsboottest/zfsboottest.sh Mon May 7 14:07:13 2012 = (r235128) > +++ head/tools/tools/zfsboottest/zfsboottest.sh Mon May 7 15:03:42 2012 = (r235129) > @@ -52,8 +52,7 @@ if [ $? -ne 0 ]; then > fi > bootfs=3D`zpool get bootfs "${pool}" | tail -1 | awk '{print $3}'` > if [ "${bootfs}" =3D "-" ]; then > - echo "The \"bootfs\" property is not configured for pool \"${pool}\"." = >&2 > - exit 1 > + bootfs=3D"${pool}" > fi > # Dataset's mountpoint property should be set to 'legacy'. > if [ "`zfs get -H -o value mountpoint ${bootfs}`" !=3D "legacy" ]; then --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --Y1L3PTX8QE8cb2T+ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk+ofm8ACgkQForvXbEpPzQDLACgnjz6GeDb5q0bdTvCp1i0WhvA DwoAni3zFbA+hu8dQcK9DIrnzadImKCe =PPCn -----END PGP SIGNATURE----- --Y1L3PTX8QE8cb2T+-- From owner-svn-src-head@FreeBSD.ORG Tue May 8 03:39:45 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA328106566B; Tue, 8 May 2012 03:39:45 +0000 (UTC) (envelope-from jwd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4B578FC0A; Tue, 8 May 2012 03:39:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q483dj7n094494; Tue, 8 May 2012 03:39:45 GMT (envelope-from jwd@svn.freebsd.org) Received: (from jwd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q483djBV094491; Tue, 8 May 2012 03:39:45 GMT (envelope-from jwd@svn.freebsd.org) Message-Id: <201205080339.q483djBV094491@svn.freebsd.org> From: "John W. De Boskey" Date: Tue, 8 May 2012 03:39: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: r235136 - 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: Tue, 08 May 2012 03:39:45 -0000 Author: jwd Date: Tue May 8 03:39:44 2012 New Revision: 235136 URL: http://svn.freebsd.org/changeset/base/235136 Log: Use the common api helper routine instead of freeing the namei buffer directly. Approved by: rmacklem (mentor) MFC after: 1 month Modified: head/sys/fs/nfsserver/nfs_nfsdport.c Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Mon May 7 19:17:09 2012 (r235135) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Tue May 8 03:39:44 2012 (r235136) @@ -505,11 +505,10 @@ nfsvno_namei(struct nfsrv_descript *nd, out: if (error) { - uma_zfree(namei_zone, cnp->cn_pnbuf); + nfsvno_relpathbuf(ndp); ndp->ni_vp = NULL; ndp->ni_dvp = NULL; ndp->ni_startdir = NULL; - cnp->cn_flags &= ~HASBUF; } else if ((ndp->ni_cnd.cn_flags & (WANTPARENT|LOCKPARENT)) == 0) { ndp->ni_dvp = NULL; } From owner-svn-src-head@FreeBSD.ORG Tue May 8 05:11:22 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CEF1C1065670; Tue, 8 May 2012 05:11:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 81A688FC18; Tue, 8 May 2012 05:11:21 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id IAA12269; Tue, 08 May 2012 08:11:20 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1SRchj-000K3g-Ue; Tue, 08 May 2012 08:11:19 +0300 Message-ID: <4FA8AAF7.50107@FreeBSD.org> Date: Tue, 08 May 2012 08:11:19 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120503 Thunderbird/12.0.1 MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <201205071503.q47F3gsa070124@svn.freebsd.org> <20120508020119.GE1395@garage.freebsd.pl> In-Reply-To: <20120508020119.GE1395@garage.freebsd.pl> X-Enigmail-Version: 1.5pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r235129 - head/tools/tools/zfsboottest X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 08 May 2012 05:11:22 -0000 on 08/05/2012 05:01 Pawel Jakub Dawidek said the following: > On Mon, May 07, 2012 at 03:03:42PM +0000, Andriy Gapon wrote: >> Author: avg >> Date: Mon May 7 15:03:42 2012 >> New Revision: 235129 >> URL: http://svn.freebsd.org/changeset/base/235129 >> >> Log: >> zfsboottest.sh: gracefully handle default value of bootfs property > > I'd prefer if people avoid having their root file system at the pool > level, so maybe we could leave it as a warning? I see reasons to have this preference, I am just not sure that _this_ tool should be used to annoy people by telling them that their preference is inferior. I think that the various ZFS setup guides and howtos (including those by you) should already provide good examples. So if somebody doesn't follow them to the letter, then he is probably confident of his ZFS mastery. >> Reported by: theraven >> MFC after: 10 days >> >> Modified: >> head/tools/tools/zfsboottest/zfsboottest.sh >> >> Modified: head/tools/tools/zfsboottest/zfsboottest.sh >> ============================================================================== >> --- head/tools/tools/zfsboottest/zfsboottest.sh Mon May 7 14:07:13 2012 (r235128) >> +++ head/tools/tools/zfsboottest/zfsboottest.sh Mon May 7 15:03:42 2012 (r235129) >> @@ -52,8 +52,7 @@ if [ $? -ne 0 ]; then >> fi >> bootfs=`zpool get bootfs "${pool}" | tail -1 | awk '{print $3}'` >> if [ "${bootfs}" = "-" ]; then >> - echo "The \"bootfs\" property is not configured for pool \"${pool}\"." >&2 >> - exit 1 >> + bootfs="${pool}" >> fi >> # Dataset's mountpoint property should be set to 'legacy'. >> if [ "`zfs get -H -o value mountpoint ${bootfs}`" != "legacy" ]; then > -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Tue May 8 15:18:36 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 787FA1065670; Tue, 8 May 2012 15:18:36 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E5E78FC19; Tue, 8 May 2012 15:18:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q48FIa6j041234; Tue, 8 May 2012 15:18:36 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q48FIaOx041232; Tue, 8 May 2012 15:18:36 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201205081518.q48FIaOx041232@svn.freebsd.org> From: Hajimu UMEMOTO Date: Tue, 8 May 2012 15:18: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: r235138 - head/usr.sbin/traceroute6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 08 May 2012 15:18:36 -0000 Author: ume Date: Tue May 8 15:18:35 2012 New Revision: 235138 URL: http://svn.freebsd.org/changeset/base/235138 Log: Add -a and -A option to the usage. MFC after: 1 week Modified: head/usr.sbin/traceroute6/traceroute6.c Modified: head/usr.sbin/traceroute6/traceroute6.c ============================================================================== --- head/usr.sbin/traceroute6/traceroute6.c Tue May 8 08:19:07 2012 (r235137) +++ head/usr.sbin/traceroute6/traceroute6.c Tue May 8 15:18:35 2012 (r235138) @@ -1448,7 +1448,8 @@ usage() { fprintf(stderr, -"usage: traceroute6 [-dIlnNrUv] [-f firsthop] [-g gateway] [-m hoplimit]\n" -" [-p port] [-q probes] [-s src] [-w waittime] target [datalen]\n"); +"usage: traceroute6 [-adIlnNrUv] [-A as_server] [-f firsthop] [-g gateway]\n" +" [-m hoplimit] [-p port] [-q probes] [-s src] [-w waittime] target\n" +" [datalen]\n"); exit(1); } From owner-svn-src-head@FreeBSD.ORG Tue May 8 18:56:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A52401065678; Tue, 8 May 2012 18:56:22 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F8A48FC0A; Tue, 8 May 2012 18:56:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q48IuMVV047891; Tue, 8 May 2012 18:56:22 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q48IuMqG047876; Tue, 8 May 2012 18:56:22 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205081856.q48IuMqG047876@svn.freebsd.org> From: Glen Barber Date: Tue, 8 May 2012 18:56: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: r235140 - in head/lib/libc: compat-43 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, 08 May 2012 18:56:22 -0000 Author: gjb (doc committer) Date: Tue May 8 18:56:21 2012 New Revision: 235140 URL: http://svn.freebsd.org/changeset/base/235140 Log: General mdoc(7) and typo fixes. PR: 167713 Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org) Modified: head/lib/libc/compat-43/sigpause.2 head/lib/libc/sys/ffclock.2 head/lib/libc/sys/ktrace.2 head/lib/libc/sys/msgsnd.2 head/lib/libc/sys/pathconf.2 head/lib/libc/sys/rtprio.2 head/lib/libc/sys/setfib.2 head/lib/libc/sys/shm_open.2 head/lib/libc/sys/sigqueue.2 head/lib/libc/sys/timer_create.2 head/lib/libc/sys/timer_delete.2 head/lib/libc/sys/timer_settime.2 head/lib/libc/sys/unlink.2 Modified: head/lib/libc/compat-43/sigpause.2 ============================================================================== --- head/lib/libc/compat-43/sigpause.2 Tue May 8 16:36:32 2012 (r235139) +++ head/lib/libc/compat-43/sigpause.2 Tue May 8 18:56:21 2012 (r235140) @@ -62,7 +62,7 @@ .Sy This interface is made obsolete by .Xr sigsuspend 2 .Sy and -.Xr sigaction 2 +.Xr sigaction 2 . .Pp The .Fn sigset @@ -172,7 +172,8 @@ returns if the signal had been blocked and the signal's previous disposition if it had not been blocked. Otherwise, -.Dv SIG_ERR is returned and +.Dv SIG_ERR +is returned and .Va errno set to indicate the error. .Pp Modified: head/lib/libc/sys/ffclock.2 ============================================================================== --- head/lib/libc/sys/ffclock.2 Tue May 8 16:36:32 2012 (r235139) +++ head/lib/libc/sys/ffclock.2 Tue May 8 18:56:21 2012 (r235140) @@ -34,7 +34,7 @@ .Nm ffclock_getcounter , .Nm ffclock_getestimate , .Nm ffclock_setestimate -.Nd Retrieve feed-forward counter, get and set feed-forward clock estimates. +.Nd Retrieve feed-forward counter, get and set feed-forward clock estimates .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -59,7 +59,7 @@ In the feed-forward context, a .Em timestamp is a cumulative value of the ticks of the timecounter, which can be converted into seconds by using the feed-forward -.Em clock estimates. +.Em clock estimates . .Pp The .Fn ffclock_getcounter Modified: head/lib/libc/sys/ktrace.2 ============================================================================== --- head/lib/libc/sys/ktrace.2 Tue May 8 16:36:32 2012 (r235139) +++ head/lib/libc/sys/ktrace.2 Tue May 8 18:56:21 2012 (r235140) @@ -127,7 +127,7 @@ field gives the time (with microsecond r that the record was generated. The .Va ktr_tid -field holds a threadid. +field holds a thread id. .Pp The generic header is followed by .Va ktr_len Modified: head/lib/libc/sys/msgsnd.2 ============================================================================== --- head/lib/libc/sys/msgsnd.2 Tue May 8 16:36:32 2012 (r235139) +++ head/lib/libc/sys/msgsnd.2 Tue May 8 18:56:21 2012 (r235140) @@ -139,7 +139,7 @@ will fail if: The .Fa msqid argument -is not a valid message queue identifier +is not a valid message queue identifier. .Pp The message queue was removed while .Fn msgsnd Modified: head/lib/libc/sys/pathconf.2 ============================================================================== --- head/lib/libc/sys/pathconf.2 Tue May 8 16:36:32 2012 (r235139) +++ head/lib/libc/sys/pathconf.2 Tue May 8 18:56:21 2012 (r235140) @@ -165,7 +165,7 @@ Returns 1 if a Mandatory Access Control specified file, otherwise 0. .It Li _PC_MIN_HOLE_SIZE If a file system supports the reporting of holes (see -.Xr lseek 2 , +.Xr lseek 2 ) , .Fn pathconf and .Fn fpathconf Modified: head/lib/libc/sys/rtprio.2 ============================================================================== --- head/lib/libc/sys/rtprio.2 Tue May 8 16:36:32 2012 (r235139) +++ head/lib/libc/sys/rtprio.2 Tue May 8 18:56:21 2012 (r235140) @@ -132,7 +132,8 @@ RTP_PRIO_NORMAL for normal priorities, a The priority specified by the .Va prio field ranges between 0 and -.Dv RTP_PRIO_MAX (usually 31) . +.Dv RTP_PRIO_MAX +.Pq usually 31 . 0 is the highest possible priority. .Pp Realtime and idle priority is inherited through fork() and exec(). @@ -149,7 +150,7 @@ Threads of equal real/idle priority are The .Fn rtprio system call -will fail if +will fail if: .Bl -tag -width Er .It Bq Er EINVAL The specified @@ -175,7 +176,7 @@ The specified process or thread was not .Xr setpriority 2 , .Xr nice 3 , .Xr renice 8 , -.Xr p_cansee 9 . +.Xr p_cansee 9 .Sh AUTHORS .An -nosplit The original author was Modified: head/lib/libc/sys/setfib.2 ============================================================================== --- head/lib/libc/sys/setfib.2 Tue May 8 16:36:32 2012 (r235139) +++ head/lib/libc/sys/setfib.2 Tue May 8 18:56:21 2012 (r235140) @@ -95,7 +95,8 @@ system call is a .Fx extension however similar extensions have been added to many other -.Ux style kernels. +.Ux +style kernels. .Sh HISTORY The .Fn setfib Modified: head/lib/libc/sys/shm_open.2 ============================================================================== --- head/lib/libc/sys/shm_open.2 Tue May 8 16:36:32 2012 (r235139) +++ head/lib/libc/sys/shm_open.2 Tue May 8 18:56:21 2012 (r235140) @@ -88,7 +88,7 @@ already exists, then .Fn shm_open will fail with -.Er EEXIST. +.Er EEXIST . .Pp Newly created objects start off with a size of zero. If an existing shared memory object is opened with Modified: head/lib/libc/sys/sigqueue.2 ============================================================================== --- head/lib/libc/sys/sigqueue.2 Tue May 8 16:36:32 2012 (r235139) +++ head/lib/libc/sys/sigqueue.2 Tue May 8 18:56:21 2012 (r235140) @@ -141,7 +141,7 @@ does not exist. The .Fn sigqueue system call conforms to -.St -p1003.1-2004 +.St -p1003.1-2004 . .Sh HISTORY Support for .Tn POSIX Modified: head/lib/libc/sys/timer_create.2 ============================================================================== --- head/lib/libc/sys/timer_create.2 Tue May 8 16:36:32 2012 (r235139) +++ head/lib/libc/sys/timer_create.2 Tue May 8 18:56:21 2012 (r235140) @@ -157,7 +157,7 @@ memory protection fault. The .Fn timer_create system call conforms to -.St -p1003.1-2004 +.St -p1003.1-2004 . .Sh HISTORY Support for .Tn POSIX Modified: head/lib/libc/sys/timer_delete.2 ============================================================================== --- head/lib/libc/sys/timer_delete.2 Tue May 8 16:36:32 2012 (r235139) +++ head/lib/libc/sys/timer_delete.2 Tue May 8 18:56:21 2012 (r235140) @@ -72,7 +72,7 @@ is not a valid timer ID. The .Fn timer_delete system call conforms to -.St -p1003.1-2004 +.St -p1003.1-2004 . .Sh HISTORY Support for .Tn POSIX Modified: head/lib/libc/sys/timer_settime.2 ============================================================================== --- head/lib/libc/sys/timer_settime.2 Tue May 8 16:36:32 2012 (r235139) +++ head/lib/libc/sys/timer_settime.2 Tue May 8 18:56:21 2012 (r235140) @@ -257,7 +257,7 @@ The and .Fn timer_settime system calls conform to -.St -p1003.1-2004 +.St -p1003.1-2004 . .Sh HISTORY Support for .Tn POSIX Modified: head/lib/libc/sys/unlink.2 ============================================================================== --- head/lib/libc/sys/unlink.2 Tue May 8 16:36:32 2012 (r235139) +++ head/lib/libc/sys/unlink.2 Tue May 8 18:56:21 2012 (r235140) @@ -157,7 +157,7 @@ In addition to the errors returned by th .Fn unlink , the .Fn unlinkat -may fail if +may fail if: .Bl -tag -width Er .It Bq Er EBADF The From owner-svn-src-head@FreeBSD.ORG Tue May 8 19:43:33 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35CC5106566C; Tue, 8 May 2012 19:43:33 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 20DB78FC0C; Tue, 8 May 2012 19:43:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q48JhW7Z049388; Tue, 8 May 2012 19:43:32 GMT (envelope-from jlh@svn.freebsd.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q48JhWEM049386; Tue, 8 May 2012 19:43:32 GMT (envelope-from jlh@svn.freebsd.org) Message-Id: <201205081943.q48JhWEM049386@svn.freebsd.org> From: Jeremie Le Hen Date: Tue, 8 May 2012 19:43:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235142 - head/usr.bin/stdbuf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 08 May 2012 19:43:33 -0000 Author: jlh Date: Tue May 8 19:43:32 2012 New Revision: 235142 URL: http://svn.freebsd.org/changeset/base/235142 Log: Always define LD_32_PRELOAD so it works for 32 bits binaries on 64 bits platforms. Let rtld(1) decide if it needs to honor it or not. While here, fix a small bug in error reporting when asprintf(3) returns an error. Submitted by: kib Reviewed by: kib (mentor) MFC after: 1 week Modified: head/usr.bin/stdbuf/stdbuf.c Modified: head/usr.bin/stdbuf/stdbuf.c ============================================================================== --- head/usr.bin/stdbuf/stdbuf.c Tue May 8 19:33:31 2012 (r235141) +++ head/usr.bin/stdbuf/stdbuf.c Tue May 8 19:43:32 2012 (r235142) @@ -32,6 +32,7 @@ #include #define LIBSTDBUF "/usr/lib/libstdbuf.so" +#define LIBSTDBUF32 "/usr/lib32/libstdbuf.so" extern char *__progname; @@ -92,7 +93,17 @@ main(int argc, char *argv[]) LIBSTDBUF); if (i < 0 || putenv(preload1) == -1) - warn("Failed to set environment variable: %s", preload1); + warn("Failed to set environment variable: LD_PRELOAD"); + + preload0 = getenv("LD_32_PRELOAD"); + if (preload0 == NULL) + i = asprintf(&preload1, "LD_32_PRELOAD=" LIBSTDBUF32); + else + i = asprintf(&preload1, "LD_32_PRELOAD=%s:%s", preload0, + LIBSTDBUF32); + + if (i < 0 || putenv(preload1) == -1) + warn("Failed to set environment variable: LD_32_PRELOAD"); execvp(argv[0], argv); err(2, "%s", argv[0]); From owner-svn-src-head@FreeBSD.ORG Tue May 8 19:47:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AF05106566B; Tue, 8 May 2012 19:47:53 +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 56A808FC08; Tue, 8 May 2012 19:47:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q48Jlraw049567; Tue, 8 May 2012 19:47:53 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q48Jlr78049565; Tue, 8 May 2012 19:47:53 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205081947.q48Jlr78049565@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 8 May 2012 19:47:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235143 - head/lib/libc/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: Tue, 08 May 2012 19:47:53 -0000 Author: kib Date: Tue May 8 19:47:52 2012 New Revision: 235143 URL: http://svn.freebsd.org/changeset/base/235143 Log: Plug a leak. Submitted by: Greg Bednarek MFC after: 1 week Modified: head/lib/libc/rpc/auth_unix.c Modified: head/lib/libc/rpc/auth_unix.c ============================================================================== --- head/lib/libc/rpc/auth_unix.c Tue May 8 19:43:32 2012 (r235142) +++ head/lib/libc/rpc/auth_unix.c Tue May 8 19:47:52 2012 (r235143) @@ -185,6 +185,7 @@ authunix_create(machname, uid, gid, len, AUTH * authunix_create_default() { + AUTH *auth; int ngids; long ngids_max; char machname[MAXHOSTNAMELEN + 1]; @@ -207,8 +208,10 @@ authunix_create_default() if (ngids > NGRPS) ngids = NGRPS; /* XXX: interface problem; those should all have been unsigned */ - return (authunix_create(machname, (int)uid, (int)gid, ngids, - (int *)gids)); + auth = authunix_create(machname, (int)uid, (int)gid, ngids, + (int *)gids); + free(gids); + return (auth); } /* From owner-svn-src-head@FreeBSD.ORG Tue May 8 21:09:04 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4E19A106564A; Tue, 8 May 2012 21:09:04 +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 3900E8FC08; Tue, 8 May 2012 21:09:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q48L94TO052031; Tue, 8 May 2012 21:09:04 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q48L94Vu052029; Tue, 8 May 2012 21:09:04 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201205082109.q48L94Vu052029@svn.freebsd.org> From: Andrew Thompson Date: Tue, 8 May 2012 21:09: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: r235144 - head/sys/dev/tsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 08 May 2012 21:09:04 -0000 Author: thompsa Date: Tue May 8 21:09:03 2012 New Revision: 235144 URL: http://svn.freebsd.org/changeset/base/235144 Log: The DEVICE_POLLING dereference of sc->tsec_ifp needs to be checked for null first or this will panic. Condense three blocks that check sc->tsec_ifp into one while I am here. Modified: head/sys/dev/tsec/if_tsec.c Modified: head/sys/dev/tsec/if_tsec.c ============================================================================== --- head/sys/dev/tsec/if_tsec.c Tue May 8 19:47:52 2012 (r235143) +++ head/sys/dev/tsec/if_tsec.c Tue May 8 21:09:03 2012 (r235144) @@ -289,17 +289,17 @@ int tsec_detach(struct tsec_softc *sc) { + if (sc->tsec_ifp != NULL) { #ifdef DEVICE_POLLING - if (sc->tsec_ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(sc->tsec_ifp); + if (sc->tsec_ifp->if_capenable & IFCAP_POLLING) + ether_poll_deregister(sc->tsec_ifp); #endif - /* Stop TSEC controller and free TX queue */ - if (sc->sc_rres && sc->tsec_ifp) - tsec_shutdown(sc->dev); + /* Stop TSEC controller and free TX queue */ + if (sc->sc_rres) + tsec_shutdown(sc->dev); - /* Detach network interface */ - if (sc->tsec_ifp) { + /* Detach network interface */ ether_ifdetach(sc->tsec_ifp); if_free(sc->tsec_ifp); sc->tsec_ifp = NULL; From owner-svn-src-head@FreeBSD.ORG Tue May 8 22:38:47 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 847E4106566C; Tue, 8 May 2012 22:38:47 +0000 (UTC) (envelope-from davidch@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F8DC8FC12; Tue, 8 May 2012 22:38:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q48MclQI054752; Tue, 8 May 2012 22:38:47 GMT (envelope-from davidch@svn.freebsd.org) Received: (from davidch@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q48MclWi054750; Tue, 8 May 2012 22:38:47 GMT (envelope-from davidch@svn.freebsd.org) Message-Id: <201205082238.q48MclWi054750@svn.freebsd.org> From: David Christensen Date: Tue, 8 May 2012 22:38: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: r235145 - head/sys/dev/bce X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 08 May 2012 22:38:47 -0000 Author: davidch Date: Tue May 8 22:38:46 2012 New Revision: 235145 URL: http://svn.freebsd.org/changeset/base/235145 Log: - Rename sysctl "loose_rx_mtu" to "strict_rx_mtu" to match code usage. Submitted by: davidch MFC after: 1 day Modified: head/sys/dev/bce/if_bce.c Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Tue May 8 21:09:03 2012 (r235144) +++ head/sys/dev/bce/if_bce.c Tue May 8 22:38:46 2012 (r235145) @@ -527,7 +527,7 @@ SYSCTL_UINT(_hw_bce, OID_AUTO, hdr_split /* Allowable values are TRUE or FALSE. */ static int bce_strict_rx_mtu = FALSE; TUNABLE_INT("hw.bce.strict_rx_mtu", &bce_strict_rx_mtu); -SYSCTL_UINT(_hw_bce, OID_AUTO, loose_rx_mtu, CTLFLAG_RDTUN, +SYSCTL_UINT(_hw_bce, OID_AUTO, strict_rx_mtu, CTLFLAG_RDTUN, &bce_strict_rx_mtu, 0, "Enable/Disable strict RX frame size checking"); From owner-svn-src-head@FreeBSD.ORG Wed May 9 00:56:12 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 37190106564A; Wed, 9 May 2012 00:56:12 +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 223D98FC15; Wed, 9 May 2012 00:56:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q490uB7w058955; Wed, 9 May 2012 00:56:12 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q490uBKT058953; Wed, 9 May 2012 00:56:11 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201205090056.q490uBKT058953@svn.freebsd.org> From: Andrew Thompson Date: Wed, 9 May 2012 00:56: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: r235147 - head/sys/dev/tsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 09 May 2012 00:56:12 -0000 Author: thompsa Date: Wed May 9 00:56:11 2012 New Revision: 235147 URL: http://svn.freebsd.org/changeset/base/235147 Log: Do not reinitialise the interface if it is already running, this prevents the bootp+nfs code from working as it calls init on each dhcp send and rx fails to start in time. Modified: head/sys/dev/tsec/if_tsec.c Modified: head/sys/dev/tsec/if_tsec.c ============================================================================== --- head/sys/dev/tsec/if_tsec.c Wed May 9 00:56:08 2012 (r235146) +++ head/sys/dev/tsec/if_tsec.c Wed May 9 00:56:11 2012 (r235147) @@ -358,6 +358,9 @@ tsec_init_locked(struct tsec_softc *sc) struct ifnet *ifp = sc->tsec_ifp; uint32_t timeout, val, i; + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + return; + TSEC_GLOBAL_LOCK_ASSERT(sc); tsec_stop(sc); From owner-svn-src-head@FreeBSD.ORG Wed May 9 01:37:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 82C40106566B; Wed, 9 May 2012 01:37:49 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5466F8FC0A; Wed, 9 May 2012 01:37:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q491bnsO060302; Wed, 9 May 2012 01:37:49 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q491bnkB060299; Wed, 9 May 2012 01:37:49 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201205090137.q491bnkB060299@svn.freebsd.org> From: Brooks Davis Date: Wed, 9 May 2012 01: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: r235150 - in head/sys: amd64/conf i386/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: Wed, 09 May 2012 01:37:49 -0000 Author: brooks Date: Wed May 9 01:37:48 2012 New Revision: 235150 URL: http://svn.freebsd.org/changeset/base/235150 Log: The DDB_CTF has little or nothing to do with the debugger so move it next KDTRACE_HOOKS. Modified: head/sys/amd64/conf/GENERIC head/sys/i386/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Wed May 9 00:56:51 2012 (r235149) +++ head/sys/amd64/conf/GENERIC Wed May 9 01:37:48 2012 (r235150) @@ -66,6 +66,7 @@ options CAPABILITIES # Capsicum capabi options MAC # TrustedBSD MAC Framework options KDTRACE_FRAME # Ensure frames are compiled in options KDTRACE_HOOKS # Kernel DTrace hooks +options DDB_CTF # Kernel ELF linker loads CTF data options INCLUDE_CONFIG_FILE # Include this file in kernel # Debugging support. Always need this: @@ -75,7 +76,6 @@ options KDB # Enable kernel debugger # For full debugger support use this instead: options DDB # Support DDB. options GDB # Support remote GDB. -options DDB_CTF # kernel ELF linker loads CTF data options DEADLKRES # Enable the deadlock resolver options INVARIANTS # Enable calls of extra sanity checking options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Wed May 9 00:56:51 2012 (r235149) +++ head/sys/i386/conf/GENERIC Wed May 9 01:37:48 2012 (r235150) @@ -66,6 +66,7 @@ options CAPABILITY_MODE # Capsicum cap options CAPABILITIES # Capsicum capabilities options MAC # TrustedBSD MAC Framework options KDTRACE_HOOKS # Kernel DTrace hooks +options DDB_CTF # Kernel ELF linker loads CTF data options INCLUDE_CONFIG_FILE # Include this file in kernel # Debugging support. Always need this: @@ -75,7 +76,6 @@ options KDB # Enable kernel debugger # For full debugger support use this instead: options DDB # Support DDB. options GDB # Support remote GDB. -options DDB_CTF # kernel ELF linker loads CTF data options DEADLKRES # Enable the deadlock resolver options INVARIANTS # Enable calls of extra sanity checking options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS From owner-svn-src-head@FreeBSD.ORG Wed May 9 01:55:24 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 31182106566C; Wed, 9 May 2012 01:55:24 +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 1B7DE8FC08; Wed, 9 May 2012 01:55:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q491tOrQ060879; Wed, 9 May 2012 01:55:24 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q491tNQU060876; Wed, 9 May 2012 01:55:23 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201205090155.q491tNQU060876@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 9 May 2012 01:55: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: r235151 - head/sys/dev/bce X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 09 May 2012 01:55:24 -0000 Author: yongari Date: Wed May 9 01:55:23 2012 New Revision: 235151 URL: http://svn.freebsd.org/changeset/base/235151 Log: Implement basic remote PHY support. Remote PHY allows the controller to perform MDIO type accesses to a remote transceiver using message pages defined through MRBE(multirate backplane ethernet). It's used in blade systems(e.g Dell Blade m610) which are connected to pass-through blades rather than traditional switches. This change directly manipulates firmware's mailboxes to control remote PHY such that it does not use mii(4). Alternatively, as David said, it could be implemented in brgphy(4) by creating a fake PHY and let brgphy(4) do necessary mii accesses and bce(4) can implement mailbox accesses based on the type of brgphy(4)'s mii accesses. Personally, I think it would make brgphy(4) hard to maintain since it would have to access many bce(4) registers in brgphy(4). Given that there are users who are suffering from lack of remote PHY support, it would be better to get working system rather than waiting for complete/perfect implementation. Tested by: Jan Winter ( jan.winter <> kantarmedia dot de ) Reviewed by: davidch (initial version) MFC after: 2 weeks Modified: head/sys/dev/bce/if_bce.c head/sys/dev/bce/if_bcereg.h Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Wed May 9 01:37:48 2012 (r235150) +++ head/sys/dev/bce/if_bce.c Wed May 9 01:55:23 2012 (r235151) @@ -364,6 +364,7 @@ static int bce_nvram_write (struct bce static void bce_get_rx_buffer_sizes(struct bce_softc *, int); static void bce_get_media (struct bce_softc *); static void bce_init_media (struct bce_softc *); +static u32 bce_get_rphy_link (struct bce_softc *); static void bce_dma_map_addr (void *, bus_dma_segment_t *, int, int); static int bce_dma_alloc (device_t); static void bce_dma_free (struct bce_softc *); @@ -372,6 +373,7 @@ static void bce_release_resources (struc /****************************************************************************/ /* BCE Firmware Synchronization and Load */ /****************************************************************************/ +static void bce_fw_cap_init (struct bce_softc *); static int bce_fw_sync (struct bce_softc *, u32); static void bce_load_rv2p_fw (struct bce_softc *, u32 *, u32, u32); static void bce_load_cpu_fw (struct bce_softc *, @@ -418,6 +420,7 @@ static void bce_watchdog (struct bce_s static int bce_ifmedia_upd (struct ifnet *); static int bce_ifmedia_upd_locked (struct ifnet *); static void bce_ifmedia_sts (struct ifnet *, struct ifmediareq *); +static void bce_ifmedia_sts_rphy (struct bce_softc *, struct ifmediareq *); static void bce_init_locked (struct bce_softc *); static void bce_init (void *); static void bce_mgmt_init_locked (struct bce_softc *sc); @@ -757,6 +760,13 @@ bce_print_adapter_info(struct bce_softc printf("2.5G"); i++; } + if (sc->bce_phy_flags & BCE_PHY_REMOTE_CAP_FLAG) { + if (i > 0) printf("|"); + printf("Remote PHY(%s)", + sc->bce_phy_flags & BCE_PHY_REMOTE_PORT_FIBER_FLAG ? + "FIBER" : "TP"); i++; + } + if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) { if (i > 0) printf("|"); printf("MFW); MFW (%s)\n", sc->bce_mfw_ver); @@ -1297,6 +1307,9 @@ bce_attach(device_t dev) if (val & BCE_PCICFG_MISC_STATUS_32BIT_DET) sc->bce_flags |= BCE_PCI_32BIT_FLAG; + /* Find the media type for the adapter. */ + bce_get_media(sc); + /* Reset controller and announce to bootcode that driver is present. */ if (bce_reset(sc, BCE_DRV_MSG_CODE_RESET)) { BCE_PRINTF("%s(%d): Controller reset failed!\n", @@ -1344,9 +1357,6 @@ bce_attach(device_t dev) /* Update statistics once every second. */ sc->bce_stats_ticks = 1000000 & 0xffff00; - /* Find the media type for the adapter. */ - bce_get_media(sc); - /* Store data needed by PHY driver for backplane applications */ sc->bce_shared_hw_cfg = bce_shmem_rd(sc, BCE_SHARED_HW_CFG_CONFIG); sc->bce_port_hw_cfg = bce_shmem_rd(sc, BCE_PORT_HW_CFG_CONFIG); @@ -1386,6 +1396,15 @@ bce_attach(device_t dev) ifp->if_capabilities = BCE_IF_CAPABILITIES; } +#if __FreeBSD_version >= 800505 + /* + * Introducing IFCAP_LINKSTATE didn't bump __FreeBSD_version + * so it's approximate value. + */ + if ((sc->bce_phy_flags & BCE_PHY_REMOTE_CAP_FLAG) != 0) + ifp->if_capabilities |= IFCAP_LINKSTATE; +#endif + ifp->if_capenable = ifp->if_capabilities; /* @@ -1409,14 +1428,52 @@ bce_attach(device_t dev) /* Handle any special PHY initialization for SerDes PHYs. */ bce_init_media(sc); - /* MII child bus by attaching the PHY. */ - rc = mii_attach(dev, &sc->bce_miibus, ifp, bce_ifmedia_upd, - bce_ifmedia_sts, BMSR_DEFCAPMASK, sc->bce_phy_addr, - MII_OFFSET_ANY, MIIF_DOPAUSE); - if (rc != 0) { - BCE_PRINTF("%s(%d): attaching PHYs failed\n", __FILE__, - __LINE__); - goto bce_attach_fail; + if ((sc->bce_phy_flags & BCE_PHY_REMOTE_CAP_FLAG) != 0) { + ifmedia_init(&sc->bce_ifmedia, IFM_IMASK, bce_ifmedia_upd, + bce_ifmedia_sts); + /* + * We can't manually override remote PHY's link and assume + * PHY port configuration(Fiber or TP) is not changed after + * device attach. This may not be correct though. + */ + if ((sc->bce_phy_flags & BCE_PHY_REMOTE_PORT_FIBER_FLAG) != 0) { + if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) { + ifmedia_add(&sc->bce_ifmedia, + IFM_ETHER | IFM_2500_SX, 0, NULL); + ifmedia_add(&sc->bce_ifmedia, + IFM_ETHER | IFM_2500_SX | IFM_FDX, 0, NULL); + } + ifmedia_add(&sc->bce_ifmedia, + IFM_ETHER | IFM_1000_SX, 0, NULL); + ifmedia_add(&sc->bce_ifmedia, + IFM_ETHER | IFM_1000_SX | IFM_FDX, 0, NULL); + } else { + ifmedia_add(&sc->bce_ifmedia, + IFM_ETHER | IFM_10_T, 0, NULL); + ifmedia_add(&sc->bce_ifmedia, + IFM_ETHER | IFM_10_T | IFM_FDX, 0, NULL); + ifmedia_add(&sc->bce_ifmedia, + IFM_ETHER | IFM_100_TX, 0, NULL); + ifmedia_add(&sc->bce_ifmedia, + IFM_ETHER | IFM_100_TX | IFM_FDX, 0, NULL); + ifmedia_add(&sc->bce_ifmedia, + IFM_ETHER | IFM_1000_T, 0, NULL); + ifmedia_add(&sc->bce_ifmedia, + IFM_ETHER | IFM_1000_T | IFM_FDX, 0, NULL); + } + ifmedia_add(&sc->bce_ifmedia, IFM_ETHER | IFM_AUTO, 0, NULL); + ifmedia_set(&sc->bce_ifmedia, IFM_ETHER | IFM_AUTO); + sc->bce_ifmedia.ifm_media = sc->bce_ifmedia.ifm_cur->ifm_media; + } else { + /* MII child bus by attaching the PHY. */ + rc = mii_attach(dev, &sc->bce_miibus, ifp, bce_ifmedia_upd, + bce_ifmedia_sts, BMSR_DEFCAPMASK, sc->bce_phy_addr, + MII_OFFSET_ANY, MIIF_DOPAUSE); + if (rc != 0) { + BCE_PRINTF("%s(%d): attaching PHYs failed\n", __FILE__, + __LINE__); + goto bce_attach_fail; + } } /* Attach to the Ethernet interface list. */ @@ -1521,8 +1578,12 @@ bce_detach(device_t dev) ether_ifdetach(ifp); /* If we have a child device on the MII bus remove it too. */ - bus_generic_detach(dev); - device_delete_child(dev, sc->bce_miibus); + if ((sc->bce_phy_flags & BCE_PHY_REMOTE_CAP_FLAG) != 0) + ifmedia_removeall(&sc->bce_ifmedia); + else { + bus_generic_detach(dev); + device_delete_child(dev, sc->bce_miibus); + } /* Release all remaining resources. */ bce_release_resources(sc); @@ -1983,13 +2044,23 @@ bce_miibus_statchg(device_t dev) { struct bce_softc *sc; struct mii_data *mii; - int val; + struct ifmediareq ifmr; + int media_active, media_status, val; sc = device_get_softc(dev); DBENTER(BCE_VERBOSE_PHY); - mii = device_get_softc(sc->bce_miibus); + if ((sc->bce_phy_flags & BCE_PHY_REMOTE_CAP_FLAG) != 0) { + bzero(&ifmr, sizeof(ifmr)); + bce_ifmedia_sts_rphy(sc, &ifmr); + media_active = ifmr.ifm_active; + media_status = ifmr.ifm_status; + } else { + mii = device_get_softc(sc->bce_miibus); + media_active = mii->mii_media_active; + media_status = mii->mii_media_status; + } val = REG_RD(sc, BCE_EMAC_MODE); val &= ~(BCE_EMAC_MODE_PORT | BCE_EMAC_MODE_HALF_DUPLEX | @@ -1997,7 +2068,7 @@ bce_miibus_statchg(device_t dev) BCE_EMAC_MODE_25G); /* Set MII or GMII interface based on the PHY speed. */ - switch (IFM_SUBTYPE(mii->mii_media_active)) { + switch (IFM_SUBTYPE(media_active)) { case IFM_10_T: if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { DBPRINT(sc, BCE_INFO_PHY, @@ -2026,7 +2097,7 @@ bce_miibus_statchg(device_t dev) } /* Set half or full duplex based on PHY settings. */ - if ((mii->mii_media_active & IFM_GMASK) == IFM_HDX) { + if ((IFM_OPTIONS(media_active) & IFM_FDX) == 0) { DBPRINT(sc, BCE_INFO_PHY, "Setting Half-Duplex interface.\n"); val |= BCE_EMAC_MODE_HALF_DUPLEX; @@ -2036,7 +2107,7 @@ bce_miibus_statchg(device_t dev) REG_WR(sc, BCE_EMAC_MODE, val); - if ((mii->mii_media_active & IFM_ETH_RXPAUSE) != 0) { + if ((IFM_OPTIONS(media_active) & IFM_ETH_RXPAUSE) != 0) { DBPRINT(sc, BCE_INFO_PHY, "%s(): Enabling RX flow control.\n", __FUNCTION__); BCE_SETBIT(sc, BCE_EMAC_RX_MODE, BCE_EMAC_RX_MODE_FLOW_EN); @@ -2046,7 +2117,7 @@ bce_miibus_statchg(device_t dev) BCE_CLRBIT(sc, BCE_EMAC_RX_MODE, BCE_EMAC_RX_MODE_FLOW_EN); } - if ((mii->mii_media_active & IFM_ETH_TXPAUSE) != 0) { + if ((IFM_OPTIONS(media_active) & IFM_ETH_TXPAUSE) != 0) { DBPRINT(sc, BCE_INFO_PHY, "%s(): Enabling TX flow control.\n", __FUNCTION__); BCE_SETBIT(sc, BCE_EMAC_TX_MODE, BCE_EMAC_TX_MODE_FLOW_EN); @@ -3130,7 +3201,8 @@ bce_get_media_exit: static void bce_init_media(struct bce_softc *sc) { - if ((sc->bce_phy_flags & BCE_PHY_IEEE_CLAUSE_45_FLAG) != 0) { + if ((sc->bce_phy_flags & (BCE_PHY_IEEE_CLAUSE_45_FLAG | + BCE_PHY_REMOTE_CAP_FLAG)) == BCE_PHY_IEEE_CLAUSE_45_FLAG) { /* * Configure 5709S/5716S PHYs to use traditional IEEE * Clause 22 method. Otherwise we have no way to attach @@ -5018,6 +5090,8 @@ bce_reset(struct bce_softc *sc, u32 rese if (rc) BCE_PRINTF("%s(%d): Firmware did not complete " "initialization!\n", __FILE__, __LINE__); + /* Get firmware capabilities. */ + bce_fw_cap_init(sc); bce_reset_exit: DBEXIT(BCE_VERBOSE_RESET); @@ -6081,6 +6155,55 @@ bce_free_pg_chain(struct bce_softc *sc) } +static u32 +bce_get_rphy_link(struct bce_softc *sc) +{ + u32 advertise, link; + int fdpx; + + advertise = 0; + fdpx = 0; + if ((sc->bce_phy_flags & BCE_PHY_REMOTE_PORT_FIBER_FLAG) != 0) + link = bce_shmem_rd(sc, BCE_RPHY_SERDES_LINK); + else + link = bce_shmem_rd(sc, BCE_RPHY_COPPER_LINK); + if (link & BCE_NETLINK_ANEG_ENB) + advertise |= BCE_NETLINK_ANEG_ENB; + if (link & BCE_NETLINK_SPEED_10HALF) + advertise |= BCE_NETLINK_SPEED_10HALF; + if (link & BCE_NETLINK_SPEED_10FULL) { + advertise |= BCE_NETLINK_SPEED_10FULL; + fdpx++; + } + if (link & BCE_NETLINK_SPEED_100HALF) + advertise |= BCE_NETLINK_SPEED_100HALF; + if (link & BCE_NETLINK_SPEED_100FULL) { + advertise |= BCE_NETLINK_SPEED_100FULL; + fdpx++; + } + if (link & BCE_NETLINK_SPEED_1000HALF) + advertise |= BCE_NETLINK_SPEED_1000HALF; + if (link & BCE_NETLINK_SPEED_1000FULL) { + advertise |= BCE_NETLINK_SPEED_1000FULL; + fdpx++; + } + if (link & BCE_NETLINK_SPEED_2500HALF) + advertise |= BCE_NETLINK_SPEED_2500HALF; + if (link & BCE_NETLINK_SPEED_2500FULL) { + advertise |= BCE_NETLINK_SPEED_2500FULL; + fdpx++; + } + if (fdpx) + advertise |= BCE_NETLINK_FC_PAUSE_SYM | + BCE_NETLINK_FC_PAUSE_ASYM; + if ((sc->bce_phy_flags & BCE_PHY_REMOTE_PORT_FIBER_FLAG) == 0) + advertise |= BCE_NETLINK_PHY_APP_REMOTE | + BCE_NETLINK_ETH_AT_WIRESPEED; + + return (advertise); +} + + /****************************************************************************/ /* Set media options. */ /* */ @@ -6116,21 +6239,110 @@ bce_ifmedia_upd_locked(struct ifnet *ifp struct bce_softc *sc = ifp->if_softc; struct mii_data *mii; struct mii_softc *miisc; - int error; + struct ifmedia *ifm; + u32 link; + int error, fdx; DBENTER(BCE_VERBOSE_PHY); error = 0; BCE_LOCK_ASSERT(sc); - mii = device_get_softc(sc->bce_miibus); + sc->bce_link_up = FALSE; + if ((sc->bce_phy_flags & BCE_PHY_REMOTE_CAP_FLAG) != 0) { + ifm = &sc->bce_ifmedia; + if (IFM_TYPE(ifm->ifm_media) != IFM_ETHER) + return (EINVAL); + link = 0; + fdx = IFM_OPTIONS(ifm->ifm_media) & IFM_FDX; + switch(IFM_SUBTYPE(ifm->ifm_media)) { + case IFM_AUTO: + /* + * Check advertised link of remote PHY by reading + * BCE_RPHY_SERDES_LINK or BCE_RPHY_COPPER_LINK. + * Always use the same link type of remote PHY. + */ + link = bce_get_rphy_link(sc); + break; + case IFM_2500_SX: + if ((sc->bce_phy_flags & + (BCE_PHY_REMOTE_PORT_FIBER_FLAG | + BCE_PHY_2_5G_CAPABLE_FLAG)) == 0) + return (EINVAL); + /* + * XXX + * Have to enable forced 2.5Gbps configuration. + */ + if (fdx != 0) + link |= BCE_NETLINK_SPEED_2500FULL; + else + link |= BCE_NETLINK_SPEED_2500HALF; + break; + case IFM_1000_SX: + if ((sc->bce_phy_flags & + BCE_PHY_REMOTE_PORT_FIBER_FLAG) == 0) + return (EINVAL); + /* + * XXX + * Have to disable 2.5Gbps configuration. + */ + if (fdx != 0) + link = BCE_NETLINK_SPEED_1000FULL; + else + link = BCE_NETLINK_SPEED_1000HALF; + break; + case IFM_1000_T: + if (sc->bce_phy_flags & BCE_PHY_REMOTE_PORT_FIBER_FLAG) + return (EINVAL); + if (fdx != 0) + link = BCE_NETLINK_SPEED_1000FULL; + else + link = BCE_NETLINK_SPEED_1000HALF; + break; + case IFM_100_TX: + if (sc->bce_phy_flags & BCE_PHY_REMOTE_PORT_FIBER_FLAG) + return (EINVAL); + if (fdx != 0) + link = BCE_NETLINK_SPEED_100FULL; + else + link = BCE_NETLINK_SPEED_100HALF; + break; + case IFM_10_T: + if (sc->bce_phy_flags & BCE_PHY_REMOTE_PORT_FIBER_FLAG) + return (EINVAL); + if (fdx != 0) + link = BCE_NETLINK_SPEED_10FULL; + else + link = BCE_NETLINK_SPEED_10HALF; + break; + default: + return (EINVAL); + } + if (IFM_SUBTYPE(ifm->ifm_media) != IFM_AUTO) { + /* + * XXX + * Advertise pause capability for full-duplex media. + */ + if (fdx != 0) + link |= BCE_NETLINK_FC_PAUSE_SYM | + BCE_NETLINK_FC_PAUSE_ASYM; + if ((sc->bce_phy_flags & + BCE_PHY_REMOTE_PORT_FIBER_FLAG) == 0) + link |= BCE_NETLINK_PHY_APP_REMOTE | + BCE_NETLINK_ETH_AT_WIRESPEED; + } - /* Make sure the MII bus has been enumerated. */ - if (mii) { - sc->bce_link_up = FALSE; - LIST_FOREACH(miisc, &mii->mii_phys, mii_list) - PHY_RESET(miisc); - error = mii_mediachg(mii); + bce_shmem_wr(sc, BCE_MB_ARGS_0, link); + error = bce_fw_sync(sc, BCE_DRV_MSG_CODE_CMD_SET_LINK); + } else { + mii = device_get_softc(sc->bce_miibus); + + /* Make sure the MII bus has been enumerated. */ + if (mii) { + LIST_FOREACH(miisc, &mii->mii_phys, mii_list) + PHY_RESET(miisc); + error = mii_mediachg(mii); + } } DBEXIT(BCE_VERBOSE_PHY); @@ -6138,6 +6350,85 @@ bce_ifmedia_upd_locked(struct ifnet *ifp } +static void +bce_ifmedia_sts_rphy(struct bce_softc *sc, struct ifmediareq *ifmr) +{ + struct ifnet *ifp; + u32 link; + + ifp = sc->bce_ifp; + BCE_LOCK_ASSERT(sc); + + ifmr->ifm_status = IFM_AVALID; + ifmr->ifm_active = IFM_ETHER; + link = bce_shmem_rd(sc, BCE_LINK_STATUS); + /* XXX Handle heart beat status? */ + if ((link & BCE_LINK_STATUS_LINK_UP) != 0) + ifmr->ifm_status |= IFM_ACTIVE; + else { + ifmr->ifm_active |= IFM_NONE; + ifp->if_baudrate = 0; + return; + } + switch (link & BCE_LINK_STATUS_SPEED_MASK) { + case BCE_LINK_STATUS_10HALF: + ifmr->ifm_active |= IFM_10_T | IFM_HDX; + ifp->if_baudrate = IF_Mbps(10UL); + break; + case BCE_LINK_STATUS_10FULL: + ifmr->ifm_active |= IFM_10_T | IFM_FDX; + ifp->if_baudrate = IF_Mbps(10UL); + break; + case BCE_LINK_STATUS_100HALF: + ifmr->ifm_active |= IFM_100_TX | IFM_HDX; + ifp->if_baudrate = IF_Mbps(100UL); + break; + case BCE_LINK_STATUS_100FULL: + ifmr->ifm_active |= IFM_100_TX | IFM_FDX; + ifp->if_baudrate = IF_Mbps(100UL); + break; + case BCE_LINK_STATUS_1000HALF: + if ((sc->bce_phy_flags & BCE_PHY_REMOTE_PORT_FIBER_FLAG) == 0) + ifmr->ifm_active |= IFM_1000_T | IFM_HDX; + else + ifmr->ifm_active |= IFM_1000_SX | IFM_HDX; + ifp->if_baudrate = IF_Mbps(1000UL); + break; + case BCE_LINK_STATUS_1000FULL: + if ((sc->bce_phy_flags & BCE_PHY_REMOTE_PORT_FIBER_FLAG) == 0) + ifmr->ifm_active |= IFM_1000_T | IFM_FDX; + else + ifmr->ifm_active |= IFM_1000_SX | IFM_FDX; + ifp->if_baudrate = IF_Mbps(1000UL); + break; + case BCE_LINK_STATUS_2500HALF: + if ((sc->bce_phy_flags & BCE_PHY_REMOTE_PORT_FIBER_FLAG) == 0) { + ifmr->ifm_active |= IFM_NONE; + return; + } else + ifmr->ifm_active |= IFM_2500_SX | IFM_HDX; + ifp->if_baudrate = IF_Mbps(2500UL); + break; + case BCE_LINK_STATUS_2500FULL: + if ((sc->bce_phy_flags & BCE_PHY_REMOTE_PORT_FIBER_FLAG) == 0) { + ifmr->ifm_active |= IFM_NONE; + return; + } else + ifmr->ifm_active |= IFM_2500_SX | IFM_FDX; + ifp->if_baudrate = IF_Mbps(2500UL); + break; + default: + ifmr->ifm_active |= IFM_NONE; + return; + } + + if ((link & BCE_LINK_STATUS_RX_FC_ENABLED) != 0) + ifmr->ifm_active |= IFM_ETH_RXPAUSE; + if ((link & BCE_LINK_STATUS_TX_FC_ENABLED) != 0) + ifmr->ifm_active |= IFM_ETH_TXPAUSE; +} + + /****************************************************************************/ /* Reports current media status. */ /* */ @@ -6158,11 +6449,15 @@ bce_ifmedia_sts(struct ifnet *ifp, struc BCE_UNLOCK(sc); return; } - mii = device_get_softc(sc->bce_miibus); - mii_pollstat(mii); - ifmr->ifm_active = mii->mii_media_active; - ifmr->ifm_status = mii->mii_media_status; + if ((sc->bce_phy_flags & BCE_PHY_REMOTE_CAP_FLAG) != 0) + bce_ifmedia_sts_rphy(sc, ifmr); + else { + mii = device_get_softc(sc->bce_miibus); + mii_pollstat(mii); + ifmr->ifm_active = mii->mii_media_active; + ifmr->ifm_status = mii->mii_media_status; + } BCE_UNLOCK(sc); @@ -6199,14 +6494,26 @@ bce_phy_intr(struct bce_softc *sc) STATUS_ATTN_BITS_LINK_STATE); DBPRINT(sc, BCE_INFO_PHY, "%s(): Link is now UP.\n", __FUNCTION__); - } - else { + } else { REG_WR(sc, BCE_PCICFG_STATUS_BIT_CLEAR_CMD, STATUS_ATTN_BITS_LINK_STATE); DBPRINT(sc, BCE_INFO_PHY, "%s(): Link is now DOWN.\n", __FUNCTION__); } + if ((sc->bce_phy_flags & BCE_PHY_REMOTE_CAP_FLAG) != 0) { + if (new_link_state) { + if (bootverbose) + if_printf(sc->bce_ifp, "link UP\n"); + if_link_state_change(sc->bce_ifp, + LINK_STATE_UP); + } else { + if (bootverbose) + if_printf(sc->bce_ifp, "link DOWN\n"); + if_link_state_change(sc->bce_ifp, + LINK_STATE_DOWN); + } + } /* * Assume link is down and allow * tick routine to update the state @@ -7495,10 +7802,14 @@ bce_ioctl(struct ifnet *ifp, u_long comm case SIOCGIFMEDIA: DBPRINT(sc, BCE_VERBOSE_MISC, "Received SIOCSIFMEDIA/SIOCGIFMEDIA\n"); - - mii = device_get_softc(sc->bce_miibus); - error = ifmedia_ioctl(ifp, ifr, - &mii->mii_media, command); + if ((sc->bce_phy_flags & BCE_PHY_REMOTE_CAP_FLAG) != 0) + error = ifmedia_ioctl(ifp, ifr, &sc->bce_ifmedia, + command); + else { + mii = device_get_softc(sc->bce_miibus); + error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, + command); + } break; /* Set interface capability */ @@ -8163,6 +8474,7 @@ bce_tick(void *xsc) struct bce_softc *sc = xsc; struct mii_data *mii; struct ifnet *ifp; + struct ifmediareq ifmr; ifp = sc->bce_ifp; @@ -8193,21 +8505,32 @@ bce_tick(void *xsc) goto bce_tick_exit; /* Link is down. Check what the PHY's doing. */ - mii = device_get_softc(sc->bce_miibus); - mii_tick(mii); - - /* Check if the link has come up. */ - if ((mii->mii_media_status & IFM_ACTIVE) && - (IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE)) { - DBPRINT(sc, BCE_VERBOSE_MISC, - "%s(): Link up!\n", __FUNCTION__); - sc->bce_link_up = TRUE; - if ((IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T || - IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_SX || - IFM_SUBTYPE(mii->mii_media_active) == IFM_2500_SX) && - (bce_verbose || bootverbose)) - BCE_PRINTF("Gigabit link up!\n"); + if ((sc->bce_phy_flags & BCE_PHY_REMOTE_CAP_FLAG) != 0) { + bzero(&ifmr, sizeof(ifmr)); + bce_ifmedia_sts_rphy(sc, &ifmr); + if ((ifmr.ifm_status & (IFM_ACTIVE | IFM_AVALID)) == + (IFM_ACTIVE | IFM_AVALID)) { + sc->bce_link_up = TRUE; + bce_miibus_statchg(sc->bce_dev); + } + } else { + mii = device_get_softc(sc->bce_miibus); + mii_tick(mii); + /* Check if the link has come up. */ + if ((mii->mii_media_status & IFM_ACTIVE) && + (IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE)) { + DBPRINT(sc, BCE_VERBOSE_MISC, "%s(): Link up!\n", + __FUNCTION__); + sc->bce_link_up = TRUE; + if ((IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T || + IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_SX || + IFM_SUBTYPE(mii->mii_media_active) == IFM_2500_SX) && + (bce_verbose || bootverbose)) + BCE_PRINTF("Gigabit link up!\n"); + } + } + if (sc->bce_link_up == TRUE) { /* Now that link is up, handle any outstanding TX traffic. */ if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { DBPRINT(sc, BCE_VERBOSE_MISC, "%s(): Found " @@ -8221,6 +8544,36 @@ bce_tick_exit: return; } +static void +bce_fw_cap_init(struct bce_softc *sc) +{ + u32 ack, cap, link; + + ack = 0; + cap = bce_shmem_rd(sc, BCE_FW_CAP_MB); + if ((cap & BCE_FW_CAP_SIGNATURE_MAGIC_MASK) != + BCE_FW_CAP_SIGNATURE_MAGIC) + return; + if ((cap & (BCE_FW_CAP_MFW_KEEP_VLAN | BCE_FW_CAP_BC_KEEP_VLAN)) == + (BCE_FW_CAP_MFW_KEEP_VLAN | BCE_FW_CAP_BC_KEEP_VLAN)) + ack |= BCE_DRV_ACK_CAP_SIGNATURE_MAGIC | + BCE_FW_CAP_MFW_KEEP_VLAN | BCE_FW_CAP_BC_KEEP_VLAN; + if ((sc->bce_phy_flags & BCE_PHY_SERDES_FLAG) != 0 && + (cap & BCE_FW_CAP_REMOTE_PHY_CAP) != 0) { + sc->bce_phy_flags &= ~BCE_PHY_REMOTE_PORT_FIBER_FLAG; + sc->bce_phy_flags |= BCE_PHY_REMOTE_CAP_FLAG; + link = bce_shmem_rd(sc, BCE_LINK_STATUS); + if ((link & BCE_LINK_STATUS_SERDES_LINK) != 0) + sc->bce_phy_flags |= BCE_PHY_REMOTE_PORT_FIBER_FLAG; + ack |= BCE_DRV_ACK_CAP_SIGNATURE_MAGIC | + BCE_FW_CAP_REMOTE_PHY_CAP; + } + + if (ack != 0) + bce_shmem_wr(sc, BCE_DRV_ACK_CAP_MB, ack); +} + + #ifdef BCE_DEBUG /****************************************************************************/ /* Allows the driver state to be dumped through the sysctl interface. */ Modified: head/sys/dev/bce/if_bcereg.h ============================================================================== --- head/sys/dev/bce/if_bcereg.h Wed May 9 01:37:48 2012 (r235150) +++ head/sys/dev/bce/if_bcereg.h Wed May 9 01:55:23 2012 (r235151) @@ -814,6 +814,23 @@ struct flash_spec { #define BCE_DRV_PULSE_SEQ_MASK 0x00007fff #define BCE_MB_ARGS_0 0x00000014 +#define BCE_NETLINK_SPEED_10HALF (1<<0) +#define BCE_NETLINK_SPEED_10FULL (1<<1) +#define BCE_NETLINK_SPEED_100HALF (1<<2) +#define BCE_NETLINK_SPEED_100FULL (1<<3) +#define BCE_NETLINK_SPEED_1000HALF (1<<4) +#define BCE_NETLINK_SPEED_1000FULL (1<<5) +#define BCE_NETLINK_SPEED_2500HALF (1<<6) +#define BCE_NETLINK_SPEED_2500FULL (1<<7) +#define BCE_NETLINK_SPEED_10GHALF (1<<8) +#define BCE_NETLINK_SPEED_10GFULL (1<<9) +#define BCE_NETLINK_ANEG_ENB (1<<10) +#define BCE_NETLINK_PHY_APP_REMOTE (1<<11) +#define BCE_NETLINK_FC_PAUSE_SYM (1<<12) +#define BCE_NETLINK_FC_PAUSE_ASYM (1<<13) +#define BCE_NETLINK_ETH_AT_WIRESPEED (1<<14) +#define BCE_NETLINK_PHY_RESET (1<<15) + #define BCE_MB_ARGS_1 0x00000018 /* Indicate to the firmware not to go into the @@ -1079,6 +1096,26 @@ struct flash_spec { #define BCE_BC_STATE_BC_DBG_CMD_LOOP_CNT_MASK 0xffff #define BCE_BC_STATE_BC_DBG_CMD_LOOP_INFINITE 0xffff +#define BCE_FW_EVT_CODE_MB 0x00000354 +#define BCE_FW_EVT_CODE_SW_TIMER_EXPIRE_EVENT 0x00000000 +#define BCE_FW_EVT_CODE_LINK_EVENT 0x00000001 + +#define BCE_DRV_ACK_CAP_MB 0x00000364 +#define BCE_DRV_ACK_CAP_SIGNATURE_MAGIC 0x35450000 + +#define BCE_FW_CAP_MB 0x00000368 +#define BCE_FW_CAP_SIGNATURE_MAGIC 0xaa550000 +#define BCE_FW_ACK_SIGNATURE_MAGIC 0x52500000 +#define BCE_FW_CAP_SIGNATURE_MAGIC_MASK 0xffff0000 +#define BCE_FW_CAP_REMOTE_PHY_CAP 0x00000001 +#define BCE_FW_CAP_REMOTE_PHY_PRESENT 0x00000002 +#define BCE_FW_CAP_MFW_KEEP_VLAN 0x00000008 +#define BCE_FW_CAP_BC_KEEP_VLAN 0x00000010 + +#define BCE_RPHY_SERDES_LINK 0x00000374 + +#define BCE_RPHY_COPPER_LINK 0x00000378 + #define HOST_VIEW_SHMEM_BASE 0x167c00 /* @@ -6454,6 +6491,8 @@ struct bce_softc #define BCE_PHY_INT_MODE_AUTO_POLLING_FLAG 0x00000100 #define BCE_PHY_INT_MODE_LINK_READY_FLAG 0x00000200 #define BCE_PHY_IEEE_CLAUSE_45_FLAG 0x00000400 +#define BCE_PHY_REMOTE_CAP_FLAG 0x00000800 +#define BCE_PHY_REMOTE_PORT_FIBER_FLAG 0x00001000 /* Values that need to be shared with the PHY driver. */ u32 bce_shared_hw_cfg; From owner-svn-src-head@FreeBSD.ORG Wed May 9 04:54:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DDB7106564A; Wed, 9 May 2012 04:54:51 +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 699008FC0C; Wed, 9 May 2012 04:54:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q494spX9066557; Wed, 9 May 2012 04:54:51 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q494spm1066555; Wed, 9 May 2012 04:54:51 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201205090454.q494spm1066555@svn.freebsd.org> From: Warner Losh Date: Wed, 9 May 2012 04:54: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: r235152 - head/usr.bin/make X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 09 May 2012 04:54:51 -0000 Author: imp Date: Wed May 9 04:54:50 2012 New Revision: 235152 URL: http://svn.freebsd.org/changeset/base/235152 Log: Make is part of the bootstrap path, so we need to guard against this not being defined. Otherwise we don't make a new make when the old make is incompatible. Modified: head/usr.bin/make/Makefile Modified: head/usr.bin/make/Makefile ============================================================================== --- head/usr.bin/make/Makefile Wed May 9 01:55:23 2012 (r235151) +++ head/usr.bin/make/Makefile Wed May 9 04:54:50 2012 (r235152) @@ -10,7 +10,7 @@ SRCS= arch.c buf.c cond.c dir.c for.c ha lst.c main.c make.c parse.c proc.c shell.c str.c suff.c targ.c \ util.c var.c -.if ${MK_SHARED_TOOLCHAIN} == "no" +.if !defined(MK_SHARED_TOOLCHAIN) || ${MK_SHARED_TOOLCHAIN} == "no" NO_SHARED?= YES .endif From owner-svn-src-head@FreeBSD.ORG Wed May 9 07:55:43 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7AE64106566B; Wed, 9 May 2012 07:55:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C0A48FC15; Wed, 9 May 2012 07:55:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q497thUi072012; Wed, 9 May 2012 07:55:43 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q497thLH072008; Wed, 9 May 2012 07:55:43 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205090755.q497thLH072008@svn.freebsd.org> From: Andriy Gapon Date: Wed, 9 May 2012 07:55: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: r235153 - in head/sys/boot: common i386/efi sparc64/loader X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 09 May 2012 07:55:43 -0000 Author: avg Date: Wed May 9 07:55:42 2012 New Revision: 235153 URL: http://svn.freebsd.org/changeset/base/235153 Log: sys/boot: add common CTASSERT definition Modified: head/sys/boot/common/bootstrap.h head/sys/boot/i386/efi/reloc.c head/sys/boot/sparc64/loader/main.c Modified: head/sys/boot/common/bootstrap.h ============================================================================== --- head/sys/boot/common/bootstrap.h Wed May 9 04:54:50 2012 (r235152) +++ head/sys/boot/common/bootstrap.h Wed May 9 07:55:42 2012 (r235153) @@ -327,4 +327,10 @@ void dev_cleanup(void); time_t time(time_t *tloc); +#ifndef CTASSERT /* Allow lint to override */ +#define CTASSERT(x) _CTASSERT(x, __LINE__) +#define _CTASSERT(x, y) __CTASSERT(x, y) +#define __CTASSERT(x, y) typedef char __assert ## y[(x) ? 1 : -1] +#endif + #endif /* !_BOOTSTRAP_H_ */ Modified: head/sys/boot/i386/efi/reloc.c ============================================================================== --- head/sys/boot/i386/efi/reloc.c Wed May 9 04:54:50 2012 (r235152) +++ head/sys/boot/i386/efi/reloc.c Wed May 9 07:55:42 2012 (r235153) @@ -30,16 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include #include - -/* - * XXX: we can't include sys/systm.h. - */ -#ifndef CTASSERT /* Allow lint to override */ -#define CTASSERT(x) _CTASSERT(x, __LINE__) -#define _CTASSERT(x, y) __CTASSERT(x, y) -#define __CTASSERT(x, y) typedef char __assert ## y[(x) ? 1 : -1] -#endif - +#include /* * A simple relocator for IA32 EFI binaries. Modified: head/sys/boot/sparc64/loader/main.c ============================================================================== --- head/sys/boot/sparc64/loader/main.c Wed May 9 04:54:50 2012 (r235152) +++ head/sys/boot/sparc64/loader/main.c Wed May 9 07:55:42 2012 (r235153) @@ -74,12 +74,6 @@ __FBSDID("$FreeBSD$"); #include "libofw.h" #include "dev_net.h" -#ifndef CTASSERT -#define CTASSERT(x) _CTASSERT(x, __LINE__) -#define _CTASSERT(x, y) __CTASSERT(x, y) -#define __CTASSERT(x, y) typedef char __assert ## y[(x) ? 1 : -1] -#endif - extern char bootprog_name[], bootprog_rev[], bootprog_date[], bootprog_maker[]; enum { From owner-svn-src-head@FreeBSD.ORG Wed May 9 08:04:30 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F2C6106566C; Wed, 9 May 2012 08:04:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88E1A8FC08; Wed, 9 May 2012 08:04:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4984Usg072322; Wed, 9 May 2012 08:04:30 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4984UQV072312; Wed, 9 May 2012 08:04:30 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205090804.q4984UQV072312@svn.freebsd.org> From: Andriy Gapon Date: Wed, 9 May 2012 08:04: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: r235154 - in head/sys/boot/i386: btx/btx btx/btxldr btx/lib common loader zfsboot X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 09 May 2012 08:04:30 -0000 Author: avg Date: Wed May 9 08:04:29 2012 New Revision: 235154 URL: http://svn.freebsd.org/changeset/base/235154 Log: btxldr: future-proof argument passing from boot1/2-ish to loader Place the arguments at a fixed offset of 0x800 withing the argument area (of size 0x1000). Allow variable size extended arguments first of which should be a size of the extended arguments (including the size parameter). Consolidate all related definitions in a new i386/common/bootargs.h header. Many thanks to jhb and bde for their guidance and reviews. Reviewed by: jhb, bde Approved by: jhb MFC after: 1 month Added: head/sys/boot/i386/btx/lib/btxcsu.S - copied, changed from r235152, head/sys/boot/i386/btx/lib/btxcsu.s head/sys/boot/i386/common/bootargs.h (contents, props changed) Deleted: head/sys/boot/i386/btx/lib/btxcsu.s Modified: head/sys/boot/i386/btx/btx/Makefile head/sys/boot/i386/btx/btx/btx.S head/sys/boot/i386/btx/btxldr/Makefile head/sys/boot/i386/btx/btxldr/btxldr.S head/sys/boot/i386/btx/lib/Makefile head/sys/boot/i386/loader/main.c head/sys/boot/i386/zfsboot/zfsboot.c Modified: head/sys/boot/i386/btx/btx/Makefile ============================================================================== --- head/sys/boot/i386/btx/btx/Makefile Wed May 9 07:55:42 2012 (r235153) +++ head/sys/boot/i386/btx/btx/Makefile Wed May 9 08:04:29 2012 (r235154) @@ -12,6 +12,7 @@ BOOT_BTX_FLAGS=0x0 .endif CFLAGS+=-DBTX_FLAGS=${BOOT_BTX_FLAGS} +CFLAGS+=-I${.CURDIR}/../../common .if defined(BTX_SERIAL) BOOT_COMCONSOLE_PORT?= 0x3f8 Modified: head/sys/boot/i386/btx/btx/btx.S ============================================================================== --- head/sys/boot/i386/btx/btx/btx.S Wed May 9 07:55:42 2012 (r235153) +++ head/sys/boot/i386/btx/btx/btx.S Wed May 9 08:04:29 2012 (r235154) @@ -15,6 +15,8 @@ * $FreeBSD$ */ +#include + /* * Memory layout. */ @@ -205,7 +207,7 @@ init.8: xorl %ecx,%ecx # Zero movl $MEM_USR,%edx # User base address movzwl %ss:BDA_MEM,%eax # Get free memory shll $0xa,%eax # To bytes - subl $0x1000,%eax # Less arg space + subl $ARGSPACE,%eax # Less arg space subl %edx,%eax # Less base movb $SEL_UDATA,%cl # User data selector pushl %ecx # Set SS Modified: head/sys/boot/i386/btx/btxldr/Makefile ============================================================================== --- head/sys/boot/i386/btx/btxldr/Makefile Wed May 9 07:55:42 2012 (r235153) +++ head/sys/boot/i386/btx/btxldr/Makefile Wed May 9 08:04:29 2012 (r235154) @@ -6,6 +6,7 @@ NO_MAN= SRCS= btxldr.S CFLAGS+=-DLOADER_ADDRESS=${LOADER_ADDRESS} +CFLAGS+=-I${.CURDIR}/../../common .if defined(BTXLDR_VERBOSE) CFLAGS+=-DBTXLDR_VERBOSE Modified: head/sys/boot/i386/btx/btxldr/btxldr.S ============================================================================== --- head/sys/boot/i386/btx/btxldr/btxldr.S Wed May 9 07:55:42 2012 (r235153) +++ head/sys/boot/i386/btx/btxldr/btxldr.S Wed May 9 08:04:29 2012 (r235154) @@ -15,6 +15,8 @@ * $FreeBSD$ */ +#include + #define RBX_MUTE 0x10 /* -m */ #define OPT_SET(opt) (1 << (opt)) @@ -89,7 +91,7 @@ start: cld # String ops inc call hexout # stack call putstr # pointer movl $m_args,%esi # Format string - leal 0x4(%esp,1),%ebx # First argument + leal 0x4(%esp),%ebx # First argument movl $0x6,%ecx # Count start.1: movl (%ebx),%eax # Get argument and addl $0x4,%ebx # bump pointer @@ -97,24 +99,28 @@ start.1: movl (%ebx),%eax # Get argumen loop start.1 # Till done call putstr # End message #endif - movl $0x48,%ecx # Allocate space - subl %ecx,%ebp # for bootinfo - movl 0x18(%esp,1),%esi # Source: bootinfo + movl BA_BOOTINFO+4(%esp),%esi # Source: bootinfo cmpl $0x0, %esi # If the bootinfo pointer je start_null_bi # is null, don't copy it + movl BI_SIZE(%esi),%ecx # Allocate space + subl %ecx,%ebp # for bootinfo movl %ebp,%edi # Destination rep # Copy movsb # it - movl %ebp,0x18(%esp,1) # Update pointer + movl %ebp,BA_BOOTINFO+4(%esp) # Update pointer + movl %edi,%ebp # Restore base pointer #ifdef BTXLDR_VERBOSE movl $m_rel_bi,%esi # Display movl %ebp,%eax # bootinfo call hexout # relocation call putstr # message #endif -start_null_bi: movl $0x18,%ecx # Allocate space - subl %ecx,%ebp # for arguments - leal 0x4(%esp,1),%esi # Source +start_null_bi: movl $BOOTARGS_SIZE,%ecx # Fixed size of arguments + testl $KARGS_FLAGS_EXTARG, BA_BOOTFLAGS+4(%esp) # Check for extra data + jz start_fixed # Skip if the flag is not set + addl BOOTARGS_SIZE+4(%esp),%ecx # Add size of variable args +start_fixed: subl $ARGOFF,%ebp # Place args at fixed offset + leal 0x4(%esp),%esi # Source movl %ebp,%edi # Destination rep # Copy movsb # them Modified: head/sys/boot/i386/btx/lib/Makefile ============================================================================== --- head/sys/boot/i386/btx/lib/Makefile Wed May 9 07:55:42 2012 (r235153) +++ head/sys/boot/i386/btx/lib/Makefile Wed May 9 08:04:29 2012 (r235154) @@ -3,7 +3,8 @@ PROG= crt0.o INTERNALPROG= NO_MAN= -SRCS= btxcsu.s btxsys.s btxv86.s +SRCS= btxcsu.S btxsys.s btxv86.s +CFLAGS+=-I${.CURDIR}/../../common LDFLAGS=-Wl,-r .include Copied and modified: head/sys/boot/i386/btx/lib/btxcsu.S (from r235152, head/sys/boot/i386/btx/lib/btxcsu.s) ============================================================================== --- head/sys/boot/i386/btx/lib/btxcsu.s Wed May 9 04:54:50 2012 (r235152, copy source) +++ head/sys/boot/i386/btx/lib/btxcsu.S Wed May 9 08:04:29 2012 (r235154) @@ -15,6 +15,8 @@ # $FreeBSD$ +#include + # # BTX C startup code (ELF). # @@ -24,10 +26,6 @@ # .global _start # -# Constants. -# - .set ARGADJ,0xfa0 # Argument adjustment -# # Client entry point. # _start: cld Added: head/sys/boot/i386/common/bootargs.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/i386/common/bootargs.h Wed May 9 08:04:29 2012 (r235154) @@ -0,0 +1,69 @@ +/*- + * Copyright (c) 2012 Andriy Gapon + * All rights reserved. + * + * Redistribution and use in source and binary forms are freely + * permitted provided that the above copyright notice and this + * paragraph and the following disclaimer are duplicated in all + * such forms. + * + * This software is provided "AS IS" and without any express or + * implied warranties, including, without limitation, the implied + * warranties of merchantability and fitness for a particular + * purpose. + * + * $FreeBSD$ + */ + +#ifndef _BOOT_I386_ARGS_H_ +#define _BOOT_I386_ARGS_H_ + +#define KARGS_FLAGS_CD 0x1 +#define KARGS_FLAGS_PXE 0x2 +#define KARGS_FLAGS_ZFS 0x4 +#define KARGS_FLAGS_EXTARG 0x8 /* variably sized extended argument */ + +#define BOOTARGS_SIZE 24 /* sizeof(struct bootargs) */ +#define BA_BOOTFLAGS 8 /* offsetof(struct bootargs, bootflags) */ +#define BA_BOOTINFO 20 /* offsetof(struct bootargs, bootinfo) */ +#define BI_SIZE 48 /* offsetof(struct bootinfo, bi_size) */ + +/* + * We reserve some space above BTX allocated stack for the arguments + * and certain data that could hang off them. Currently only struct bootinfo + * is supported in that category. The bootinfo is placed at the top + * of the arguments area and the actual arguments are placed at ARGOFF offset + * from the top and grow towards the top. Hopefully we have enough space + * for bootinfo and the arguments to not run into each other. + * Arguments area below ARGOFF is reserved for future use. + */ +#define ARGSPACE 0x1000 /* total size of the BTX args area */ +#define ARGOFF 0x800 /* actual args offset within the args area */ +#define ARGADJ (ARGSPACE - ARGOFF) + +#ifndef __ASSEMBLER__ + +struct bootargs +{ + uint32_t howto; + uint32_t bootdev; + uint32_t bootflags; + union { + struct { + uint32_t pxeinfo; + uint32_t reserved; + }; + uint64_t zfspool; + }; + uint32_t bootinfo; + + /* + * If KARGS_FLAGS_EXTARG is set in bootflags, then the above fields + * are followed by a uint32_t field that specifies a size of the + * extended arguments (including the size field). + */ +}; + +#endif /*__ASSEMBLER__*/ + +#endif /* !_BOOT_I386_ARGS_H_ */ Modified: head/sys/boot/i386/loader/main.c ============================================================================== --- head/sys/boot/i386/loader/main.c Wed May 9 07:55:42 2012 (r235153) +++ head/sys/boot/i386/loader/main.c Wed May 9 08:04:29 2012 (r235154) @@ -39,28 +39,17 @@ __FBSDID("$FreeBSD$"); #include #include "bootstrap.h" +#include "common/bootargs.h" #include "libi386/libi386.h" #include "btxv86.h" -#define KARGS_FLAGS_CD 0x1 -#define KARGS_FLAGS_PXE 0x2 -#define KARGS_FLAGS_ZFS 0x4 +CTASSERT(sizeof(struct bootargs) == BOOTARGS_SIZE); +CTASSERT(offsetof(struct bootargs, bootinfo) == BA_BOOTINFO); +CTASSERT(offsetof(struct bootargs, bootflags) == BA_BOOTFLAGS); +CTASSERT(offsetof(struct bootinfo, bi_size) == BI_SIZE); /* Arguments passed in from the boot1/boot2 loader */ -static struct -{ - u_int32_t howto; - u_int32_t bootdev; - u_int32_t bootflags; - union { - struct { - u_int32_t pxeinfo; - u_int32_t res2; - }; - uint64_t zfspool; - }; - u_int32_t bootinfo; -} *kargs; +static struct bootargs *kargs; static u_int32_t initial_howto; static u_int32_t initial_bootdev; Modified: head/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- head/sys/boot/i386/zfsboot/zfsboot.c Wed May 9 07:55:42 2012 (r235153) +++ head/sys/boot/i386/zfsboot/zfsboot.c Wed May 9 08:04:29 2012 (r235154) @@ -41,9 +41,7 @@ __FBSDID("$FreeBSD$"); #include "drv.h" #include "util.h" #include "cons.h" - -/* Hint to loader that we came from ZFS */ -#define KARGS_FLAGS_ZFS 0x4 +#include "bootargs.h" #define PATH_DOTCONFIG "/boot.config" #define PATH_CONFIG "/boot/config" From owner-svn-src-head@FreeBSD.ORG Wed May 9 08:05:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C0CD106567B; Wed, 9 May 2012 08:05:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D7298FC1F; Wed, 9 May 2012 08:05:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4985p9P072404; Wed, 9 May 2012 08:05:51 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4985ppx072399; Wed, 9 May 2012 08:05:51 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205090805.q4985ppx072399@svn.freebsd.org> From: Andriy Gapon Date: Wed, 9 May 2012 08:05: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: r235155 - in head/sys/boot: i386/libi386 i386/zfsboot pc98/libpc98 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 09 May 2012 08:05:51 -0000 Author: avg Date: Wed May 9 08:05:50 2012 New Revision: 235155 URL: http://svn.freebsd.org/changeset/base/235155 Log: i386 boot: consolidate MAXBDDEV definition MFC after: 1 month Modified: head/sys/boot/i386/libi386/biosdisk.c head/sys/boot/i386/libi386/libi386.h head/sys/boot/i386/zfsboot/zfsboot.c head/sys/boot/pc98/libpc98/biosdisk.c Modified: head/sys/boot/i386/libi386/biosdisk.c ============================================================================== --- head/sys/boot/i386/libi386/biosdisk.c Wed May 9 08:04:29 2012 (r235154) +++ head/sys/boot/i386/libi386/biosdisk.c Wed May 9 08:05:50 2012 (r235155) @@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$"); #define BIOS_NUMDRIVES 0x475 #define BIOSDISK_SECSIZE 512 #define BUFSIZE (1 * BIOSDISK_SECSIZE) -#define MAXBDDEV MAXDEV #define DT_ATAPI 0x10 /* disk type for ATAPI floppies */ #define WDMAJOR 0 /* major numbers for devices we frontend for */ Modified: head/sys/boot/i386/libi386/libi386.h ============================================================================== --- head/sys/boot/i386/libi386/libi386.h Wed May 9 08:04:29 2012 (r235154) +++ head/sys/boot/i386/libi386/libi386.h Wed May 9 08:05:50 2012 (r235155) @@ -58,7 +58,8 @@ int i386_setcurrdev(struct env_var *ev, extern struct devdesc currdev; /* our current device */ -#define MAXDEV 31 /* maximum number of distinct devices */ +#define MAXDEV 31 /* maximum number of distinct devices */ +#define MAXBDDEV MAXDEV /* exported devices XXX rename? */ extern struct devsw bioscd; Modified: head/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- head/sys/boot/i386/zfsboot/zfsboot.c Wed May 9 08:04:29 2012 (r235154) +++ head/sys/boot/i386/zfsboot/zfsboot.c Wed May 9 08:05:50 2012 (r235155) @@ -61,8 +61,6 @@ __FBSDID("$FreeBSD$"); #define TYPE_MAXHARD TYPE_DA #define TYPE_FD 2 -#define MAXBDDEV 31 - extern uint32_t _end; #ifdef GPT Modified: head/sys/boot/pc98/libpc98/biosdisk.c ============================================================================== --- head/sys/boot/pc98/libpc98/biosdisk.c Wed May 9 08:04:29 2012 (r235154) +++ head/sys/boot/pc98/libpc98/biosdisk.c Wed May 9 08:05:50 2012 (r235155) @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #define BIOS_NUMDRIVES 0x475 #define BIOSDISK_SECSIZE 512 #define BUFSIZE (1 * BIOSDISK_SECSIZE) -#define MAXBDDEV MAXDEV #define DT_ATAPI 0x10 /* disk type for ATAPI floppies */ #define WDMAJOR 0 /* major numbers for devices we frontend for */ From owner-svn-src-head@FreeBSD.ORG Wed May 9 08:07:08 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AC9C6106566C; Wed, 9 May 2012 08:07:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D1198FC08; Wed, 9 May 2012 08:07:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q49878je072481; Wed, 9 May 2012 08:07:08 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q49878Fk072479; Wed, 9 May 2012 08:07:08 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205090807.q49878Fk072479@svn.freebsd.org> From: Andriy Gapon Date: Wed, 9 May 2012 08:07: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: r235156 - head/sys/boot/i386/loader X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 09 May 2012 08:07:08 -0000 Author: avg Date: Wed May 9 08:07:08 2012 New Revision: 235156 URL: http://svn.freebsd.org/changeset/base/235156 Log: i386 zfsloader: rename LIBZFS to LIBZFSBOOT ... to avoid name clash with the other libzfs MFC after: 1 month Modified: head/sys/boot/i386/loader/Makefile Modified: head/sys/boot/i386/loader/Makefile ============================================================================== --- head/sys/boot/i386/loader/Makefile Wed May 9 08:05:50 2012 (r235155) +++ head/sys/boot/i386/loader/Makefile Wed May 9 08:07:08 2012 (r235156) @@ -20,9 +20,7 @@ LIBFIREWIRE= ${.OBJDIR}/../libfirewire/l # Set by zfsloader Makefile .if defined(LOADER_ZFS_SUPPORT) CFLAGS+= -DLOADER_ZFS_SUPPORT -LIBZFS= ${.OBJDIR}/../../zfs/libzfsboot.a -.else -LIBZFS= +LIBZFSBOOT= ${.OBJDIR}/../../zfs/libzfsboot.a .endif # Enable PXE TFTP or NFS support, not both. @@ -119,8 +117,8 @@ FILES+= menu.rc # XXX crt0.o needs to be first for pxeboot(8) to work OBJS= ${BTXCRT} -DPADD= ${LIBFICL} ${LIBFIREWIRE} ${LIBZFS} ${LIBI386} ${LIBSTAND} -LDADD= ${LIBFICL} ${LIBFIREWIRE} ${LIBZFS} ${LIBI386} ${LIBSTAND} +DPADD= ${LIBFICL} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBSTAND} +LDADD= ${LIBFICL} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBSTAND} .include From owner-svn-src-head@FreeBSD.ORG Wed May 9 08:23:24 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5300106564A; Wed, 9 May 2012 08:23:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D0A598FC0C; Wed, 9 May 2012 08:23:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q498NOIf073479; Wed, 9 May 2012 08:23:24 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q498NOSQ073477; Wed, 9 May 2012 08:23:24 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205090823.q498NOSQ073477@svn.freebsd.org> From: Andriy Gapon Date: Wed, 9 May 2012 08:23: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: r235158 - head/sys/boot/i386/loader X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 09 May 2012 08:23:25 -0000 Author: avg Date: Wed May 9 08:23:24 2012 New Revision: 235158 URL: http://svn.freebsd.org/changeset/base/235158 Log: r235154 followup: add stddef.h for offsetof MFC after: 1 month Modified: head/sys/boot/i386/loader/main.c Modified: head/sys/boot/i386/loader/main.c ============================================================================== --- head/sys/boot/i386/loader/main.c Wed May 9 08:18:22 2012 (r235157) +++ head/sys/boot/i386/loader/main.c Wed May 9 08:23:24 2012 (r235158) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); */ #include +#include #include #include #include From owner-svn-src-head@FreeBSD.ORG Wed May 9 08:27:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FE1D106564A; Wed, 9 May 2012 08:27:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 578998FC1A; Wed, 9 May 2012 08:27:00 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:48c2:f6c0:f288:c0a1] (unknown [IPv6:2001:7b8:3a7:0:48c2:f6c0:f288:c0a1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 9E76B5C37; Wed, 9 May 2012 10:26:59 +0200 (CEST) Message-ID: <4FAA2A56.5030609@FreeBSD.org> Date: Wed, 09 May 2012 10:27:02 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120425 Thunderbird/13.0 MIME-Version: 1.0 To: Andriy Gapon References: <201205090823.q498NOSQ073477@svn.freebsd.org> In-Reply-To: <201205090823.q498NOSQ073477@svn.freebsd.org> X-Enigmail-Version: 1.5a1pre Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r235158 - head/sys/boot/i386/loader X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 09 May 2012 08:27:00 -0000 On 2012-05-09 10:23, Andriy Gapon wrote: > Author: avg > Date: Wed May 9 08:23:24 2012 > New Revision: 235158 > URL: http://svn.freebsd.org/changeset/base/235158 > > Log: > r235154 followup: add stddef.h for offsetof Thanks, this fixes the build with clang. :) From owner-svn-src-head@FreeBSD.ORG Wed May 9 08:32:11 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5FE8A106566C; Wed, 9 May 2012 08:32:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 184758FC08; Wed, 9 May 2012 08:32:09 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA21998; Wed, 09 May 2012 11:32:08 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1SS2Jc-000NZQ-2w; Wed, 09 May 2012 11:32:08 +0300 Message-ID: <4FAA2B85.3000200@FreeBSD.org> Date: Wed, 09 May 2012 11:32:05 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120503 Thunderbird/12.0.1 MIME-Version: 1.0 To: Dimitry Andric References: <201205090823.q498NOSQ073477@svn.freebsd.org> <4FAA2A56.5030609@FreeBSD.org> In-Reply-To: <4FAA2A56.5030609@FreeBSD.org> X-Enigmail-Version: 1.5pre Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r235158 - head/sys/boot/i386/loader X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 09 May 2012 08:32:11 -0000 on 09/05/2012 11:27 Dimitry Andric said the following: > On 2012-05-09 10:23, Andriy Gapon wrote: >> Author: avg >> Date: Wed May 9 08:23:24 2012 >> New Revision: 235158 >> URL: http://svn.freebsd.org/changeset/base/235158 >> >> Log: >> r235154 followup: add stddef.h for offsetof > > Thanks, this fixes the build with clang. :) Yeah, with gcc too :-) Mismerge from git to svn in the original commit :-( -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Wed May 9 15:22:40 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 572541065670; Wed, 9 May 2012 15:22:40 +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 4233E8FC1A; Wed, 9 May 2012 15:22:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q49FMeg5090289; Wed, 9 May 2012 15:22:40 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q49FMe5h090287; Wed, 9 May 2012 15:22:40 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201205091522.q49FMe5h090287@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 9 May 2012 15:22: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: r235194 - head/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 09 May 2012 15:22:40 -0000 Author: pluknet Date: Wed May 9 15:22:39 2012 New Revision: 235194 URL: http://svn.freebsd.org/changeset/base/235194 Log: Mac OS X 10.8 added (belatedly). Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Wed May 9 15:21:19 2012 (r235193) +++ head/share/misc/bsd-family-tree Wed May 9 15:22:39 2012 (r235194) @@ -250,8 +250,8 @@ FreeBSD 5.2 | | | `-----. Mac OS X | | | | \ 10.7 | | | | | | | OpenBSD 5.0 | - *--FreeBSD | | | | | - | 9.0 | | | | DragonFly 3.0.1 + *--FreeBSD | Mac OS X | | | + | 9.0 | 10.8 | | DragonFly 3.0.1 | v FreeBSD | | | | | 8.3 | | OpenBSD 5.1 | | | | | | @@ -544,6 +544,7 @@ OpenBSD 4.9 2011-05-01 [OBD] Mac OS X 10.7 2011-07-20 [APL] OpenBSD 5.0 2011-11-01 [OBD] FreeBSD 9.0 2012-01-12 [FBD] +Mac OS X 10.8 2012-02-16 [APL] DragonFly 3.0.1 2012-02-21 [DFB] FreeBSD 8.3 2012-04-18 [FBD] OpenBSD 5.1 2012-05-01 [OBD] From owner-svn-src-head@FreeBSD.ORG Wed May 9 16:06:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD7F41065701; Wed, 9 May 2012 16:06:20 +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 A83D18FC08; Wed, 9 May 2012 16:06:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q49G6KoN092180; Wed, 9 May 2012 16:06:20 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q49G6KVo092178; Wed, 9 May 2012 16:06:20 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201205091606.q49G6KVo092178@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 9 May 2012 16:06: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: r235199 - head/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 09 May 2012 16:06:20 -0000 Author: pluknet Date: Wed May 9 16:06:20 2012 New Revision: 235199 URL: http://svn.freebsd.org/changeset/base/235199 Log: Revert r235194: 10.8 appears to be a developer preview. Reported by: trasz Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Wed May 9 15:57:59 2012 (r235198) +++ head/share/misc/bsd-family-tree Wed May 9 16:06:20 2012 (r235199) @@ -250,8 +250,8 @@ FreeBSD 5.2 | | | `-----. Mac OS X | | | | \ 10.7 | | | | | | | OpenBSD 5.0 | - *--FreeBSD | Mac OS X | | | - | 9.0 | 10.8 | | DragonFly 3.0.1 + *--FreeBSD | | | | | + | 9.0 | | | | DragonFly 3.0.1 | v FreeBSD | | | | | 8.3 | | OpenBSD 5.1 | | | | | | @@ -544,7 +544,6 @@ OpenBSD 4.9 2011-05-01 [OBD] Mac OS X 10.7 2011-07-20 [APL] OpenBSD 5.0 2011-11-01 [OBD] FreeBSD 9.0 2012-01-12 [FBD] -Mac OS X 10.8 2012-02-16 [APL] DragonFly 3.0.1 2012-02-21 [DFB] FreeBSD 8.3 2012-04-18 [FBD] OpenBSD 5.1 2012-05-01 [OBD] From owner-svn-src-head@FreeBSD.ORG Wed May 9 17:26:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3ACF11065670; Wed, 9 May 2012 17:26:53 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B6888FC17; Wed, 9 May 2012 17:26:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q49HQqQH094768; Wed, 9 May 2012 17:26:52 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q49HQqe2094765; Wed, 9 May 2012 17:26:52 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205091726.q49HQqe2094765@svn.freebsd.org> From: Eitan Adler Date: Wed, 9 May 2012 17:26: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: r235201 - in head: sbin/geom/class/eli sys/geom/eli X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 09 May 2012 17:26:53 -0000 Author: eadler Date: Wed May 9 17:26:52 2012 New Revision: 235201 URL: http://svn.freebsd.org/changeset/base/235201 Log: Clarify error that geli generates when it finds corrupt data. PR: kern/165695 Submitted by: Robert Simmons Reviewed by: pjd Approved by: cperciva MFC after: 1 week Modified: head/sbin/geom/class/eli/geli.8 head/sys/geom/eli/g_eli_integrity.c Modified: head/sbin/geom/class/eli/geli.8 ============================================================================== --- head/sbin/geom/class/eli/geli.8 Wed May 9 16:57:09 2012 (r235200) +++ head/sbin/geom/class/eli/geli.8 Wed May 9 17:26:52 2012 (r235201) @@ -924,6 +924,9 @@ will not protect your data against repla It is recommended to write to the whole provider before first use, in order to make sure that all sectors and their corresponding checksums are properly initialized into a consistent state. +One can safely ignore data authentication errors that occur immediately +after the first time a provider is attached and before it is +initialized in this way. .Sh SEE ALSO .Xr crypto 4 , .Xr gbde 4 , Modified: head/sys/geom/eli/g_eli_integrity.c ============================================================================== --- head/sys/geom/eli/g_eli_integrity.c Wed May 9 16:57:09 2012 (r235200) +++ head/sys/geom/eli/g_eli_integrity.c Wed May 9 17:26:52 2012 (r235201) @@ -205,8 +205,8 @@ g_eli_auth_read_done(struct cryptop *crp * Report previous corruption if there was one. */ if (coroff != -1) { - G_ELI_DEBUG(0, "%s: %jd bytes " - "corrupted at offset %jd.", + G_ELI_DEBUG(0, "%s: Failed to authenticate %jd " + "bytes of data at offset %jd", sc->sc_name, (intmax_t)corsize, (intmax_t)coroff); coroff = -1; @@ -221,7 +221,8 @@ g_eli_auth_read_done(struct cryptop *crp } /* Report previous corruption if there was one. */ if (coroff != -1) { - G_ELI_DEBUG(0, "%s: %jd bytes corrupted at offset %jd.", + G_ELI_DEBUG(0, "%s: Failed to authenticate %jd " + "bytes of data at offset %jd", sc->sc_name, (intmax_t)corsize, (intmax_t)coroff); } } From owner-svn-src-head@FreeBSD.ORG Wed May 9 17:27:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C4115106566C; Wed, 9 May 2012 17:27:49 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AFB488FC08; Wed, 9 May 2012 17:27:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q49HRn79094840; Wed, 9 May 2012 17:27:49 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q49HRnOC094838; Wed, 9 May 2012 17:27:49 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205091727.q49HRnOC094838@svn.freebsd.org> From: Eitan Adler Date: Wed, 9 May 2012 17:27: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: r235202 - head/lib/libc/stdio X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 09 May 2012 17:27:49 -0000 Author: eadler Date: Wed May 9 17:27:49 2012 New Revision: 235202 URL: http://svn.freebsd.org/changeset/base/235202 Log: Remove reference to non-existent FreeBSD Security Architecture Approved by: cperciva MFC after: 3 days Modified: head/lib/libc/stdio/fgets.3 Modified: head/lib/libc/stdio/fgets.3 ============================================================================== --- head/lib/libc/stdio/fgets.3 Wed May 9 17:26:52 2012 (r235201) +++ head/lib/libc/stdio/fgets.3 Wed May 9 17:27:49 2012 (r235202) @@ -32,7 +32,7 @@ .\" @(#)fgets.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd May 5, 2012 .Dt FGETS 3 .Os .Sh NAME @@ -154,5 +154,3 @@ a buffer overflow attack. It is strongly suggested that the .Fn fgets function be used in all cases. -(See -the FSA.) From owner-svn-src-head@FreeBSD.ORG Wed May 9 17:29:08 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2F6081065670; Wed, 9 May 2012 17:29:08 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B2808FC08; Wed, 9 May 2012 17:29:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q49HT7DA094919; Wed, 9 May 2012 17:29:07 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q49HT7pV094917; Wed, 9 May 2012 17:29:07 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205091729.q49HT7pV094917@svn.freebsd.org> From: Eitan Adler Date: Wed, 9 May 2012 17:29: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: r235203 - head/etc/mtree X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 09 May 2012 17:29:08 -0000 Author: eadler Date: Wed May 9 17:29:07 2012 New Revision: 235203 URL: http://svn.freebsd.org/changeset/base/235203 Log: Submitted by: gavin, pjd Approved by: cperciva MFC after: 3 days Modified: head/etc/mtree/BSD.usr.dist Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Wed May 9 17:27:49 2012 (r235202) +++ head/etc/mtree/BSD.usr.dist Wed May 9 17:29:07 2012 (r235203) @@ -209,8 +209,8 @@ .. bootforth .. - csh - .. + csh + .. cvs contrib .. From owner-svn-src-head@FreeBSD.ORG Wed May 9 17:30:45 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E7C710656D0; Wed, 9 May 2012 17:30:45 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 49BDF8FC18; Wed, 9 May 2012 17:30:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q49HUjeA095007; Wed, 9 May 2012 17:30:45 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q49HUjOU095005; Wed, 9 May 2012 17:30:45 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205091730.q49HUjOU095005@svn.freebsd.org> From: Eitan Adler Date: Wed, 9 May 2012 17:30: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: r235204 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 May 2012 17:30:45 -0000 Author: eadler Date: Wed May 9 17:30:44 2012 New Revision: 235204 URL: http://svn.freebsd.org/changeset/base/235204 Log: Add some missing files to OLD_FILES PR: conf/166460 Submitted by: Jeremy Chadwick Reviewed by: stable@ Approved by: cperciva MFC after: 2 weeks Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Wed May 9 17:29:07 2012 (r235203) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Wed May 9 17:30:44 2012 (r235204) @@ -2179,6 +2179,8 @@ OLD_FILES+=usr/share/man/man8/ipfstat.8. OLD_FILES+=usr/share/man/man8/ipmon.8.gz OLD_FILES+=usr/share/man/man8/ipnat.8.gz OLD_FILES+=usr/share/man/man8/ippool.8.gz +OLD_FILES+=etc/periodic/security/510.ipfdenied +OLD_FILES+=etc/periodic/security/610.ipf6denied .endif .if ${MK_IPFW} == no From owner-svn-src-head@FreeBSD.ORG Wed May 9 17:32:11 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 660B0106564A; Wed, 9 May 2012 17:32:11 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 527FC8FC15; Wed, 9 May 2012 17:32:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q49HWBhe095104; Wed, 9 May 2012 17:32:11 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q49HWB2K095102; Wed, 9 May 2012 17:32:11 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205091732.q49HWB2K095102@svn.freebsd.org> From: Eitan Adler Date: Wed, 9 May 2012 17:32: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: r235205 - head/sbin/md5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 09 May 2012 17:32:11 -0000 Author: eadler Date: Wed May 9 17:32:10 2012 New Revision: 235205 URL: http://svn.freebsd.org/changeset/base/235205 Log: Document the -c option in --help output PR: bin/167463 Submitted by: "Bryan Drewery" Approved by: cperciva MFC after: 3 days Modified: head/sbin/md5/md5.c Modified: head/sbin/md5/md5.c ============================================================================== --- head/sbin/md5/md5.c Wed May 9 17:30:44 2012 (r235204) +++ head/sbin/md5/md5.c Wed May 9 17:32:10 2012 (r235205) @@ -372,6 +372,6 @@ static void usage(Algorithm_t *alg) { - fprintf(stderr, "usage: %s [-pqrtx] [-s string] [files ...]\n", alg->progname); + fprintf(stderr, "usage: %s [-pqrtx] [-c string] [-s string] [files ...]\n", alg->progname); exit(1); } From owner-svn-src-head@FreeBSD.ORG Wed May 9 18:17:02 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A9709106564A; Wed, 9 May 2012 18:17:02 +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 930FD8FC0A; Wed, 9 May 2012 18:17:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q49IH2jj096530; Wed, 9 May 2012 18:17:02 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q49IH2OK096523; Wed, 9 May 2012 18:17:02 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201205091817.q49IH2OK096523@svn.freebsd.org> From: Adrian Chadd Date: Wed, 9 May 2012 18:17: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: r235206 - in head/sys/dev/ath/ath_hal: ar5210 ar5211 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 09 May 2012 18:17:02 -0000 Author: adrian Date: Wed May 9 18:17:01 2012 New Revision: 235206 URL: http://svn.freebsd.org/changeset/base/235206 Log: Add some empty DFS methods for AR5210/AR5211 for now, if DFS is enabled but these don't exist, the code panics. I should really just add or use a DFS HAL capability before doing this, so the methods wouldn't be needed.. Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210.h head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c head/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c head/sys/dev/ath/ath_hal/ar5211/ar5211.h head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c head/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210.h Wed May 9 17:32:10 2012 (r235205) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210.h Wed May 9 18:17:01 2012 (r235206) @@ -252,6 +252,8 @@ extern HAL_BOOL ar5210GetDiagState(struc extern uint32_t ar5210Get11nExtBusy(struct ath_hal *); extern HAL_BOOL ar5210GetMibCycleCounts(struct ath_hal *, HAL_SURVEY_SAMPLE *); +extern void ar5210EnableDfs(struct ath_hal *, HAL_PHYERR_PARAM *); +extern void ar5210GetDfsThresh(struct ath_hal *, HAL_PHYERR_PARAM *); extern u_int ar5210GetKeyCacheSize(struct ath_hal *); extern HAL_BOOL ar5210IsKeyCacheEntryValid(struct ath_hal *, uint16_t); Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Wed May 9 17:32:10 2012 (r235205) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Wed May 9 18:17:01 2012 (r235206) @@ -133,6 +133,10 @@ static const struct ath_hal_private ar52 .ah_setCoverageClass = ar5210SetCoverageClass, .ah_get11nExtBusy = ar5210Get11nExtBusy, .ah_getMibCycleCounts = ar5210GetMibCycleCounts, + .ah_enableDfs = ar5210EnableDfs, + .ah_getDfsThresh = ar5210GetDfsThresh, + /* XXX procRadarEvent */ + /* XXX isFastClockEnabled */ /* Key Cache Functions */ .ah_getKeyCacheSize = ar5210GetKeyCacheSize, Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c Wed May 9 17:32:10 2012 (r235205) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c Wed May 9 18:17:01 2012 (r235206) @@ -667,3 +667,13 @@ ar5210GetMibCycleCounts(struct ath_hal * return (AH_FALSE); } + +void +ar5210EnableDfs(struct ath_hal *ah, HAL_PHYERR_PARAM *pe) +{ +} + +void +ar5210GetDfsThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe) +{ +} Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211.h Wed May 9 17:32:10 2012 (r235205) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211.h Wed May 9 18:17:01 2012 (r235206) @@ -279,6 +279,8 @@ extern HAL_BOOL ar5211GetDiagState(struc extern uint32_t ar5211Get11nExtBusy(struct ath_hal *); extern HAL_BOOL ar5211GetMibCycleCounts(struct ath_hal *, HAL_SURVEY_SAMPLE *); +extern void ar5211EnableDfs(struct ath_hal *, HAL_PHYERR_PARAM *); +extern void ar5211GetDfsThresh(struct ath_hal *, HAL_PHYERR_PARAM *); extern u_int ar5211GetKeyCacheSize(struct ath_hal *); extern HAL_BOOL ar5211IsKeyCacheEntryValid(struct ath_hal *, uint16_t); Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c Wed May 9 17:32:10 2012 (r235205) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c Wed May 9 18:17:01 2012 (r235206) @@ -133,6 +133,10 @@ static const struct ath_hal_private ar52 .ah_setCoverageClass = ar5211SetCoverageClass, .ah_get11nExtBusy = ar5211Get11nExtBusy, .ah_getMibCycleCounts = ar5211GetMibCycleCounts, + .ah_enableDfs = ar5211EnableDfs, + .ah_getDfsThresh = ar5211GetDfsThresh, + /* XXX procRadarEvent */ + /* XXX isFastClockEnabled */ /* Key Cache Functions */ .ah_getKeyCacheSize = ar5211GetKeyCacheSize, Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c Wed May 9 17:32:10 2012 (r235205) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c Wed May 9 18:17:01 2012 (r235206) @@ -709,3 +709,13 @@ ar5211GetMibCycleCounts(struct ath_hal * return (AH_FALSE); } + +void +ar5211EnableDfs(struct ath_hal *ah, HAL_PHYERR_PARAM *pe) +{ +} + +void +ar5211GetDfsThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe) +{ +} From owner-svn-src-head@FreeBSD.ORG Wed May 9 19:08:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E93231065672; Wed, 9 May 2012 19:08:54 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D3A458FC08; Wed, 9 May 2012 19:08:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q49J8s6B098801; Wed, 9 May 2012 19:08:54 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q49J8sUO098798; Wed, 9 May 2012 19:08:54 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201205091908.q49J8sUO098798@svn.freebsd.org> From: Marius Strobl Date: Wed, 9 May 2012 19:08: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: r235207 - in head/sys/boot/sparc64: boot1 zfsboot X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 09 May 2012 19:08:55 -0000 Author: marius Date: Wed May 9 19:08:54 2012 New Revision: 235207 URL: http://svn.freebsd.org/changeset/base/235207 Log: Use a non-tricky approach for building and installing zfsboot sharing the Makefile with boot1. Submitted by: ru Modified: head/sys/boot/sparc64/boot1/Makefile head/sys/boot/sparc64/zfsboot/Makefile Modified: head/sys/boot/sparc64/boot1/Makefile ============================================================================== --- head/sys/boot/sparc64/boot1/Makefile Wed May 9 18:17:01 2012 (r235206) +++ head/sys/boot/sparc64/boot1/Makefile Wed May 9 19:08:54 2012 (r235207) @@ -5,7 +5,7 @@ INTERNALPROG= NO_MAN= FILES?= boot1 SRCS= _start.s boot1.c -CLEANFILES+=boot1 boot1.aout +CLEANFILES=${FILES} boot1.aout BOOTBLOCKBASE= 0x4000 @@ -14,7 +14,7 @@ LDFLAGS=-Ttext ${BOOTBLOCKBASE} -Wl,-N # Construct boot1. sunlabel expects it to contain zeroed-out space for the # label, and to be of the correct size. -boot1: boot1.aout +${FILES}: boot1.aout @set -- `ls -l boot1.aout`; x=$$((7680-$$5)); \ echo "$$x bytes available"; test $$x -ge 0 dd if=/dev/zero of=${.TARGET} bs=512 count=16 Modified: head/sys/boot/sparc64/zfsboot/Makefile ============================================================================== --- head/sys/boot/sparc64/zfsboot/Makefile Wed May 9 18:17:01 2012 (r235206) +++ head/sys/boot/sparc64/zfsboot/Makefile Wed May 9 19:08:54 2012 (r235207) @@ -5,9 +5,5 @@ PROGNAME= zfsboot CFLAGS+= -DZFSBOOT FILES= zfsboot -CLEANFILES+= zfsboot - -zfsboot: boot1 - ln -s ${.ALLSRC} ${.TARGET} .include "${.CURDIR}/../boot1/Makefile" From owner-svn-src-head@FreeBSD.ORG Wed May 9 21:56:11 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C4A41065673; Wed, 9 May 2012 21:56:11 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7702F8FC14; Wed, 9 May 2012 21:56:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q49LuBCj004468; Wed, 9 May 2012 21:56:11 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q49LuBgU004466; Wed, 9 May 2012 21:56:11 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205092156.q49LuBgU004466@svn.freebsd.org> From: Eitan Adler Date: Wed, 9 May 2012 21:56: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: r235208 - head/usr.sbin/portsnap/portsnap X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 09 May 2012 21:56:11 -0000 Author: eadler Date: Wed May 9 21:56:10 2012 New Revision: 235208 URL: http://svn.freebsd.org/changeset/base/235208 Log: make it easier for users used to a VCS that allows up to be a shortcut for update. PR: bin/152856 Approved by: cperciva MFC after: 3 days Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh ============================================================================== --- head/usr.sbin/portsnap/portsnap/portsnap.sh Wed May 9 19:08:54 2012 (r235207) +++ head/usr.sbin/portsnap/portsnap/portsnap.sh Wed May 9 21:56:10 2012 (r235208) @@ -143,6 +143,9 @@ parse_cmdline() { cron | extract | fetch | update | alfred) COMMANDS="${COMMANDS} $1" ;; + up) + COMMANDS="${COMMANDS} update" + ;; *) if [ $# -gt 1 ]; then usage; fi if echo ${COMMANDS} | grep -vq extract; then From owner-svn-src-head@FreeBSD.ORG Wed May 9 22:13:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4EC011065672; Wed, 9 May 2012 22:13:57 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A5A28FC0C; Wed, 9 May 2012 22:13:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q49MDvfW005059; Wed, 9 May 2012 22:13:57 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q49MDvuk005057; Wed, 9 May 2012 22:13:57 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205092213.q49MDvuk005057@svn.freebsd.org> From: Eitan Adler Date: Wed, 9 May 2012 22:13: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: r235209 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 09 May 2012 22:13:57 -0000 Author: eadler Date: Wed May 9 22:13:56 2012 New Revision: 235209 URL: http://svn.freebsd.org/changeset/base/235209 Log: Add a few new tips and update some old ones to more modern commands MFC after: 1 week Modified: head/games/fortune/datfiles/freebsd-tips Modified: head/games/fortune/datfiles/freebsd-tips ============================================================================== --- head/games/fortune/datfiles/freebsd-tips Wed May 9 21:56:10 2012 (r235208) +++ head/games/fortune/datfiles/freebsd-tips Wed May 9 22:13:56 2012 (r235209) @@ -73,8 +73,7 @@ If you need to ask a question on the Fre contains lots of useful advice to help you get the best results. % -If you `set filec' (file completion) in tcsh and write a part of the -filename, pressing TAB will show you the available choices when there +pressing TAB will show you the available choices when there is more than one, or complete the filename if there's only one match. % If you `set watch = (0 any any)' in tcsh, you will be notified when @@ -122,9 +121,6 @@ In order to support national characters less without creating other nationalisation aspects, set the environment variable LC_ALL to 'en_US.ISO8859-1'. % -In tcsh, you can `set autolist' to have the shell automatically show -all the possible matches when doing filename/directory expansion. -% "man firewall" will give advice for building a FreeBSD firewall -- David Scheidt % @@ -192,13 +188,6 @@ flag is your gateway. Nice bash prompt: PS1='(\[$(tput md)\]\t <\w>\[$(tput me)\]) $(echo $?) \$ ' -- Mathieu % -Nice tcsh prompts: - set prompt = '[%B%m%b] %B%~%b%# ' - set prompt = '%m %# ' - set prompt = '%n@%m%# ' - set prompt = '%n@%m:%/%# ' - set prompt = '%n@%m:%~%# ' -% Over quota? "du -s * | sort -n " will give you a sorted list of your directory sizes. -- David Scheidt @@ -263,7 +252,7 @@ To quickly create an empty file, use "to -- Dru % To read a compressed file without having to first uncompress it, use -"zcat" or "zmore" to view it. +"zcat" or "zless" to view it. -- Dru % To repeat the last command in the C shell, type "!!". @@ -282,7 +271,7 @@ will search '/', and all subdirectories, % To see all of the directories on your FreeBSD system, type - ls -R / | more + ls -R / | less -- Dru % To see how long it takes a command to run, type the word "time" before the @@ -322,12 +311,12 @@ been replaced with other messages, look Want colour in your directory listings? Use "ls -G". "ls -F" is also useful, and they can be combined as "ls -FG". % -Want to find a specific port, just type the following under /usr/ports, +Want to find a specific port, just type the following or one its subdirectories: - "make search name=" + "make -C /usr/ports search name=" or - "make search key=" + "make -C /usr/ports search key=" % Want to know how many words, lines, or bytes are contained in a file? Type "wc filename". @@ -479,3 +468,9 @@ when you are trying to find where in the Try "whereis firefox" and "whereis whereis". -- Konstantinos Konstantinidis % +Want to run the same command again? +In tcsh you can type "!!" +% +Want to go the directory you were just in? +In tcsh you can type "cd -" +% From owner-svn-src-head@FreeBSD.ORG Wed May 9 23:05:10 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6A9FA106566C; Wed, 9 May 2012 23:05:10 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id DEC148FC12; Wed, 9 May 2012 23:05:09 +0000 (UTC) Received: by vbmv11 with SMTP id v11so1208720vbm.13 for ; Wed, 09 May 2012 16:05:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=SSk9UfQQ/lS/z+IfRupBM8D27sruMfH+UqSXbPXzDvo=; b=koMi9ChhJCBmkWQ/Nc3idMIhndsf6VL7v5Qouf9CQ6jUZWckJtHhRn9O9k/mIeF7lA 7i02/YRUrIQ3taZXNI5lJAto/VOQcCHSEgaXZoU8aatarxoT9W/xNkDHU2eAdl5fEhA3 bmcQxezgef1VPVvTJSVvyxkyfz+OSHI3SAlz0cfxdwu/2lcvqfbenSRcC49kNOwDXwlr YAIjFH4HFGTTSJTQsi3u/pmc2bbWovTZ6sr56J1yurEKLDwvDMS9V72RzDxOXRAbf2u/ davC0jyX2t1d3KlozZbL/7KUMf/VGByhVEa89BAmqxPSNtMHGrezRpI9CQLNEL2x+eB3 rxOw== MIME-Version: 1.0 Received: by 10.52.75.105 with SMTP id b9mr966699vdw.26.1336604709194; Wed, 09 May 2012 16:05:09 -0700 (PDT) Received: by 10.220.7.148 with HTTP; Wed, 9 May 2012 16:05:09 -0700 (PDT) In-Reply-To: <201205092213.q49MDvuk005057@svn.freebsd.org> References: <201205092213.q49MDvuk005057@svn.freebsd.org> Date: Wed, 9 May 2012 16:05:09 -0700 Message-ID: From: Garrett Cooper To: Eitan Adler 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: r235209 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 09 May 2012 23:05:10 -0000 On Wed, May 9, 2012 at 3:13 PM, Eitan Adler wrote: > Author: eadler > Date: Wed May =A09 22:13:56 2012 > New Revision: 235209 > URL: http://svn.freebsd.org/changeset/base/235209 > > Log: > =A0Add a few new tips and update some old ones to more modern commands > > =A0MFC after: =A0 =A01 week > > Modified: > =A0head/games/fortune/datfiles/freebsd-tips ... > -Want to find a specific port, just type the following under /usr/ports, > +Want to find a specific port, just type the following > =A0or one its subdirectories: > > - =A0 =A0 =A0 "make search name=3D" > + =A0 =A0 =A0 "make -C /usr/ports search name=3D" > =A0 =A0 or > - =A0 =A0 =A0 "make search key=3D" > + =A0 =A0 =A0 "make -C /usr/ports search key=3D" I've been told multiple times that YMMV for make -C vs cd ; make, FYI, so I've modified my behavior to match the cd ; make idiom. Interesting why I've only been told this in BSD circles though... ... > +Want to go the directory you were just in? > +In tcsh you can type "cd -" Same with sh ;)... -Garrett From owner-svn-src-head@FreeBSD.ORG Thu May 10 00:00:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4E4E71065672; Thu, 10 May 2012 00:00:29 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 391078FC15; Thu, 10 May 2012 00:00:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4A00TIe008379; Thu, 10 May 2012 00:00:29 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4A00T5m008377; Thu, 10 May 2012 00:00:29 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201205100000.q4A00T5m008377@svn.freebsd.org> From: Sean Bruno Date: Thu, 10 May 2012 00:00: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: r235210 - 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: Thu, 10 May 2012 00:00:29 -0000 Author: sbruno Date: Thu May 10 00:00:28 2012 New Revision: 235210 URL: http://svn.freebsd.org/changeset/base/235210 Log: Modify the binding of queues to attach to as many CPUs as possible when using more than one igb(4) adapter. This means that queues will not be bound to the same CPUs if there are more CPUs availble. This is only applicable to a system that has multiple interfaces. Obtained from: Yahoo! Inc. MFC after: 3 days Modified: head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Wed May 9 22:13:56 2012 (r235209) +++ head/sys/dev/e1000/if_igb.c Thu May 10 00:00:28 2012 (r235210) @@ -364,6 +364,13 @@ TUNABLE_INT("hw.igb.num_queues", &igb_nu SYSCTL_INT(_hw_igb, OID_AUTO, num_queues, CTLFLAG_RDTUN, &igb_num_queues, 0, "Number of queues to configure, 0 indicates autoconfigure"); +/* +** Global variable to store last used CPU when binding queues +** to CPUs in igb_allocate_msix. Starts at CPU_FIRST and increments when a +** queue is bound to a cpu. +*/ +static int igb_last_bind_cpu = -1; + /* How many packets rxeof tries to clean at a time */ static int igb_rx_process_limit = 100; TUNABLE_INT("hw.igb.rx_process_limit", &igb_rx_process_limit); @@ -2493,8 +2500,16 @@ igb_allocate_msix(struct adapter *adapte ** Bind the msix vector, and thus the ** rings to the corresponding cpu. */ - if (adapter->num_queues > 1) - bus_bind_intr(dev, que->res, i); + if (adapter->num_queues > 1) { + if (igb_last_bind_cpu < 0) + igb_last_bind_cpu = CPU_FIRST(); + bus_bind_intr(dev, que->res, igb_last_bind_cpu); + device_printf(dev, + "Bound queue %d to cpu %d\n", + i,igb_last_bind_cpu); + igb_last_bind_cpu = CPU_NEXT(igb_last_bind_cpu); + igb_last_bind_cpu = igb_last_bind_cpu % mp_ncpus; + } #if __FreeBSD_version >= 800000 TASK_INIT(&que->txr->txq_task, 0, igb_deferred_mq_start, que->txr); From owner-svn-src-head@FreeBSD.ORG Thu May 10 02:07:01 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 263CF106566B; Thu, 10 May 2012 02:07:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D4938FC08; Thu, 10 May 2012 02:07:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4A270QQ012315; Thu, 10 May 2012 02:07:00 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4A2704B012293; Thu, 10 May 2012 02:07:00 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205100207.q4A2704B012293@svn.freebsd.org> From: Glen Barber Date: Thu, 10 May 2012 02:07: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: r235211 - in head: cddl/contrib/opensolaris/cmd/zstreamdump gnu/usr.bin/binutils/addr2line gnu/usr.bin/binutils/ranlib gnu/usr.bin/binutils/size gnu/usr.bin/binutils/strip gnu/usr.bin/g... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 10 May 2012 02:07:01 -0000 Author: gjb (doc committer) Date: Thu May 10 02:07:00 2012 New Revision: 235211 URL: http://svn.freebsd.org/changeset/base/235211 Log: General mdoc(7) and typo fixes. PR: 167696 Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org) MFC after: 3 days Modified: head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 head/gnu/usr.bin/binutils/addr2line/addr2line.1 head/gnu/usr.bin/binutils/ranlib/ranlib.1 head/gnu/usr.bin/binutils/size/size.1 head/gnu/usr.bin/binutils/strip/strip.1 head/gnu/usr.bin/gdb/gdb/gdb.1 head/sbin/md5/md5.1 head/usr.bin/calendar/calendar.1 head/usr.bin/clang/clang/clang.1 head/usr.bin/clang/tblgen/tblgen.1 head/usr.bin/csup/csup.1 head/usr.bin/fetch/fetch.1 head/usr.bin/gprof/gprof.1 head/usr.bin/ipcrm/ipcrm.1 head/usr.bin/join/join.1 head/usr.bin/limits/limits.1 head/usr.bin/ncplogin/ncplogout.1 head/usr.bin/tftp/tftp.1 head/usr.bin/who/who.1 head/usr.bin/whois/whois.1 head/usr.sbin/pkg_install/updating/pkg_updating.1 Modified: head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 Thu May 10 00:00:28 2012 (r235210) +++ head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 Thu May 10 02:07:00 2012 (r235211) @@ -25,7 +25,7 @@ .Dt ZSTREAMDUMP 8 .Os .Sh NAME -.Nm zdb +.Nm zstreamdump .Nd filter data in zfs send stream .Sh SYNOPSIS .Nm Modified: head/gnu/usr.bin/binutils/addr2line/addr2line.1 ============================================================================== --- head/gnu/usr.bin/binutils/addr2line/addr2line.1 Thu May 10 00:00:28 2012 (r235210) +++ head/gnu/usr.bin/binutils/addr2line/addr2line.1 Thu May 10 02:07:00 2012 (r235211) @@ -131,7 +131,7 @@ .if n .ad l .nh .SH "NAME" -addr2line \- convert addresses into file names and line numbers. +addr2line \- convert addresses into file names and line numbers .SH "SYNOPSIS" .IX Header "SYNOPSIS" addr2line [\fB\-b\fR \fIbfdname\fR|\fB\-\-target=\fR\fIbfdname\fR] Modified: head/gnu/usr.bin/binutils/ranlib/ranlib.1 ============================================================================== --- head/gnu/usr.bin/binutils/ranlib/ranlib.1 Thu May 10 00:00:28 2012 (r235210) +++ head/gnu/usr.bin/binutils/ranlib/ranlib.1 Thu May 10 02:07:00 2012 (r235211) @@ -131,7 +131,7 @@ .if n .ad l .nh .SH "NAME" -ranlib \- generate index to archive. +ranlib \- generate index to archive .SH "SYNOPSIS" .IX Header "SYNOPSIS" ranlib [\fB\-vV\fR] \fIarchive\fR Modified: head/gnu/usr.bin/binutils/size/size.1 ============================================================================== --- head/gnu/usr.bin/binutils/size/size.1 Thu May 10 00:00:28 2012 (r235210) +++ head/gnu/usr.bin/binutils/size/size.1 Thu May 10 02:07:00 2012 (r235211) @@ -131,7 +131,7 @@ .if n .ad l .nh .SH "NAME" -size \- list section sizes and total size. +size \- list section sizes and total size .SH "SYNOPSIS" .IX Header "SYNOPSIS" size [\fB\-A\fR|\fB\-B\fR|\fB\-\-format=\fR\fIcompatibility\fR] Modified: head/gnu/usr.bin/binutils/strip/strip.1 ============================================================================== --- head/gnu/usr.bin/binutils/strip/strip.1 Thu May 10 00:00:28 2012 (r235210) +++ head/gnu/usr.bin/binutils/strip/strip.1 Thu May 10 02:07:00 2012 (r235211) @@ -131,7 +131,7 @@ .if n .ad l .nh .SH "NAME" -strip \- Discard symbols from object files. +strip \- Discard symbols from object files .SH "SYNOPSIS" .IX Header "SYNOPSIS" strip [\fB\-F\fR \fIbfdname\fR |\fB\-\-target=\fR\fIbfdname\fR] Modified: head/gnu/usr.bin/gdb/gdb/gdb.1 ============================================================================== --- head/gnu/usr.bin/gdb/gdb/gdb.1 Thu May 10 00:00:28 2012 (r235210) +++ head/gnu/usr.bin/gdb/gdb/gdb.1 Thu May 10 02:07:00 2012 (r235211) @@ -322,11 +322,11 @@ to output the full file name and line nu recognizable fashion each time a stack frame is displayed (which includes each time the program stops). This recognizable format looks like two `\|\c -.B \032\c +.B \e032\c \&\|' characters, followed by the file name, line number and character position separated by colons, and a newline. The Emacs-to-GDB interface program uses the two `\|\c -.B \032\c +.B \e032\c \&\|' characters as a signal to display the source code for the frame. Modified: head/sbin/md5/md5.1 ============================================================================== --- head/sbin/md5/md5.1 Thu May 10 00:00:28 2012 (r235210) +++ head/sbin/md5/md5.1 Thu May 10 02:07:00 2012 (r235211) @@ -3,7 +3,7 @@ .Dt MD5 1 .Os .Sh NAME -.Nm md5 , sha1 , sha256, rmd160 +.Nm md5 , sha1 , sha256 , rmd160 .Nd calculate a message-digest fingerprint (checksum) for a file .Sh SYNOPSIS .Nm md5 Modified: head/usr.bin/calendar/calendar.1 ============================================================================== --- head/usr.bin/calendar/calendar.1 Thu May 10 00:00:28 2012 (r235210) +++ head/usr.bin/calendar/calendar.1 Thu May 10 02:07:00 2012 (r235211) @@ -218,7 +218,7 @@ Paskha\fB\et\fROrthodox Easter .Sh FILES .Bl -tag -width calendar.christian -compact .It Pa calendar -file in current directory +file in current directory. .It Pa ~/.calendar .Pa calendar HOME directory. Modified: head/usr.bin/clang/clang/clang.1 ============================================================================== --- head/usr.bin/clang/clang/clang.1 Thu May 10 00:00:28 2012 (r235210) +++ head/usr.bin/clang/clang/clang.1 Thu May 10 02:07:00 2012 (r235211) @@ -475,7 +475,7 @@ write temporary files used during the co .IX Item "CPATH" If this environment variable is present, it is treated as a delimited list of paths to be added to the default system include path list. The -delimiter is the platform dependent delimitor, as used in the \fI\s-1PATH\s0\fR +delimiter is the platform dependent delimiter, as used in the \fI\s-1PATH\s0\fR environment variable. .Sp Empty components in the environment variable are ignored. Modified: head/usr.bin/clang/tblgen/tblgen.1 ============================================================================== --- head/usr.bin/clang/tblgen/tblgen.1 Thu May 10 00:00:28 2012 (r235210) +++ head/usr.bin/clang/tblgen/tblgen.1 Thu May 10 02:07:00 2012 (r235211) @@ -175,7 +175,7 @@ Print the enumeration list for this clas Print all records to standard output (default). .IP "\fB\-print\-enums\fR" 4 .IX Item "-print-enums" -Print enumeration values for a class +Print enumeration values for a class. .IP "\fB\-print\-sets\fR" 4 .IX Item "-print-sets" Print expanded sets for testing \s-1DAG\s0 exprs. Modified: head/usr.bin/csup/csup.1 ============================================================================== --- head/usr.bin/csup/csup.1 Thu May 10 00:00:28 2012 (r235210) +++ head/usr.bin/csup/csup.1 Thu May 10 02:07:00 2012 (r235211) @@ -311,7 +311,7 @@ will not create it. The default .Ar base directory is -.Pa /usr/local/etc/csup . +.Pa /usr/local/etc/cvsup . .It Cm prefix= Ns Ar prefix This is the directory under which updated files will be placed. By default, it is the same as @@ -656,7 +656,7 @@ from that directory is not required then .El .Pp will not work because the file on the server is called -.Ql Makefile,v. +.Ql Makefile,v . A better solution would be .Pp .Bl -item -compact -offset indent Modified: head/usr.bin/fetch/fetch.1 ============================================================================== --- head/usr.bin/fetch/fetch.1 Thu May 10 00:00:28 2012 (r235210) +++ head/usr.bin/fetch/fetch.1 Thu May 10 02:07:00 2012 (r235211) @@ -254,7 +254,7 @@ for a description of additional environm .Ev HTTP_REFERER , .Ev HTTP_USER_AGENT , .Ev NETRC , -.Ev NO_PROXY and +.Ev NO_PROXY No and .Ev no_proxy . .Sh EXIT STATUS The Modified: head/usr.bin/gprof/gprof.1 ============================================================================== --- head/usr.bin/gprof/gprof.1 Thu May 10 00:00:28 2012 (r235210) +++ head/usr.bin/gprof/gprof.1 Thu May 10 02:07:00 2012 (r235211) @@ -73,7 +73,7 @@ compiler or linker you can use instead of .Fl l Ns Ar c . Read the given object file (the default is -.Pa a.out) +.Pa a.out ) and establishes the relation between its symbol table and the call graph profile. The default graph profile file name is the name Modified: head/usr.bin/ipcrm/ipcrm.1 ============================================================================== --- head/usr.bin/ipcrm/ipcrm.1 Thu May 10 00:00:28 2012 (r235210) +++ head/usr.bin/ipcrm/ipcrm.1 Thu May 10 02:07:00 2012 (r235211) @@ -112,7 +112,7 @@ If the identifier or the key is -1, it w .Xr ipcs 1 .Sh HISTORY The wiping of all System V IPC objects was first implemented in -.Fx 6.4 and 7.1. +.Fx 6.4 No and 7.1. .Sh AUTHORS The original author was Adam Glass. The wiping of all System V IPC objects was thought up by Callum Modified: head/usr.bin/join/join.1 ============================================================================== --- head/usr.bin/join/join.1 Thu May 10 00:00:28 2012 (r235210) +++ head/usr.bin/join/join.1 Thu May 10 02:07:00 2012 (r235211) @@ -107,7 +107,7 @@ representing the join field. The elements of list must be either comma .Pq Ql \&, or whitespace separated. -(The latter requires quoting to protect it from the shell, or, a simpler +(The letter requires quoting to protect it from the shell, or, a simpler approach is to use multiple .Fl o options.) Modified: head/usr.bin/limits/limits.1 ============================================================================== --- head/usr.bin/limits/limits.1 Thu May 10 00:00:28 2012 (r235210) +++ head/usr.bin/limits/limits.1 Thu May 10 02:07:00 2012 (r235211) @@ -19,7 +19,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 23, 2011 +.Dd January 23, 2012 .Dt LIMITS 1 .Os .Sh NAME @@ -179,7 +179,7 @@ limits are affected until overridden lat or .Fl H options. -.Fl e +.It Fl e Select .Dq "eval mode" formatting for output. Modified: head/usr.bin/ncplogin/ncplogout.1 ============================================================================== --- head/usr.bin/ncplogin/ncplogout.1 Thu May 10 00:00:28 2012 (r235210) +++ head/usr.bin/ncplogin/ncplogout.1 Thu May 10 02:07:00 2012 (r235211) @@ -30,7 +30,7 @@ The options are: .Bl -tag -width indent .It Fl S Ar server Specify the name of the -.Tn Netware +.Tn NetWare server to which the connection should be terminated. Can be omitted if there is only one connection active. Modified: head/usr.bin/tftp/tftp.1 ============================================================================== --- head/usr.bin/tftp/tftp.1 Thu May 10 00:00:28 2012 (r235210) +++ head/usr.bin/tftp/tftp.1 Thu May 10 02:07:00 2012 (r235211) @@ -112,9 +112,9 @@ commands. Enable or disable debugging levels during verbose output. The value of .Ar level can be one of -.Cm packet, simple, options, +.Cm packet , simple , options , or -.Cm access. +.Cm access . .Pp .It Cm get Oo Ar host : Oc Ns Ar file Op Ar localname .It Cm get Xo Modified: head/usr.bin/who/who.1 ============================================================================== --- head/usr.bin/who/who.1 Thu May 10 00:00:28 2012 (r235210) +++ head/usr.bin/who/who.1 Thu May 10 02:07:00 2012 (r235211) @@ -82,7 +82,7 @@ An error occurred. Show idle time for each user in hours and minutes as .Ar hh Ns : Ns Ar mm , .Ql \&. -if the user has been idle less that a minute, and +if the user has been idle less than a minute, and .Dq Li old if the user has been idle more than 24 hours. .It Cm am I Modified: head/usr.bin/whois/whois.1 ============================================================================== --- head/usr.bin/whois/whois.1 Thu May 10 00:00:28 2012 (r235210) +++ head/usr.bin/whois/whois.1 Thu May 10 02:07:00 2012 (r235211) @@ -203,12 +203,12 @@ This option is deprecated; use the option with an argument of .Qq Li RU instead. +.El .Pp The operands specified to .Nm are treated independently and may be used as queries on different whois servers. -.El .Sh EXIT STATUS .Ex -std .Sh EXAMPLES Modified: head/usr.sbin/pkg_install/updating/pkg_updating.1 ============================================================================== --- head/usr.sbin/pkg_install/updating/pkg_updating.1 Thu May 10 00:00:28 2012 (r235210) +++ head/usr.sbin/pkg_install/updating/pkg_updating.1 Thu May 10 02:07:00 2012 (r235211) @@ -55,7 +55,7 @@ Location of the ports tree. .It Pa /var/db/pkg Default location of the installed package database. .It Pa /usr/ports -The default ports directory and default location of the UPDATING file +The default ports directory and default location of the UPDATING file. .El .Sh EXAMPLES Shows all entries of all installed ports: From owner-svn-src-head@FreeBSD.ORG Thu May 10 04:11:40 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 464231065677; Thu, 10 May 2012 04:11:40 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 26D808FC14; Thu, 10 May 2012 04:11:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4A4BeKg016743; Thu, 10 May 2012 04:11:40 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4A4Be19016740; Thu, 10 May 2012 04:11:40 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201205100411.q4A4Be19016740@svn.freebsd.org> From: Martin Matuska Date: Thu, 10 May 2012 04:11: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: r235212 - head/cddl/contrib/opensolaris/cmd/zdb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 10 May 2012 04:11:40 -0000 Author: mm Date: Thu May 10 04:11:39 2012 New Revision: 235212 URL: http://svn.freebsd.org/changeset/base/235212 Log: Import illumos changeset 13618:c6ae14a341e8 [1]: 2088 zdb could use a reasonable manual page Rewrite new zdb manpage to mdoc(7) References: https://www.illumos.org/issues/2088 PR: kern/167467 [1] Submitted by: Marcelo Araujo [1] Reviewed by: mm Obtained from: Illumos (issue #2088) MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Thu May 10 02:07:00 2012 (r235211) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Thu May 10 04:11:39 2012 (r235212) @@ -1,61 +1,286 @@ '\" te -.\" Copyright (c) 2011, Martin Matuska . +.\" Copyright (c) 2012, Martin Matuska . .\" All Rights Reserved. .\" -.\" The contents of this file are subject to the terms of the -.\" Common Development and Distribution License (the "License"). -.\" You may not use this file except in compliance with the License. -.\" -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -.\" or http://www.opensolaris.org/os/licensing. -.\" See the License for the specific language governing permissions -.\" and limitations under the License. -.\" -.\" When distributing Covered Code, include this CDDL HEADER in each -.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. -.\" If applicable, add the following below this CDDL HEADER, with the -.\" fields enclosed by brackets "[]" replaced with your own identifying -.\" information: Portions Copyright [yyyy] [name of copyright owner] +.\" This file and its contents are supplied under the terms of the +.\" Common Development and Distribution License ("CDDL"), version 1.0. +.\" You may only use this file in accordance with the terms of version +.\" 1.0 of the CDDL. .\" -.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved. +.\" A full copy of the text of the CDDL should have accompanied this +.\" source. A copy of the CDDL is also available via the Internet at +.\" http://www.illumos.org/license/CDDL. +.\" +.\" +.\" Copyright 2012, Richard Lowe. +.\" Copyright (c) 2012, Marcelo Araujo . +.\" All Rights Reserved. .\" .\" $FreeBSD$ .\" -.Dd November 26, 2011 +.Dd May 10, 2012 .Dt ZDB 8 .Os .Sh NAME .Nm zdb -.Nd ZFS debugger +.Nd Display zpool debugging and consistency information .Sh SYNOPSIS .Nm -.Ar pool +.Op Fl CumdibcsDvhLXFPA +.Op Fl e Op Fl p Ar path... +.Op Fl t Ar txg +.Ar poolname +.Op Ar object ... +.Nm +.Op Fl divPA +.Op Fl e Op Fl p Ar path... +.Ar dataset +.Op Ar object ... +.Nm +.Fl m Op Fl LXFPA +.Op Fl t Ar txg +.Op Fl e Op Fl p Ar path... +.Ar poolname +.Nm +.Fl R Op Fl A +.Op Fl e Op Fl p Ar path... +.Ar poolname +.Ar vdev Ns : Ns Ar offset Ns : Ns Ar size Ns Op Ns : Ns Ar flags +.Nm +.Fl S +.Op Fl AP +.Op Fl e Op Fl p Ar path... +.Ar poolname +.Nm +.Fl l +.Op Fl uA +.Ar device +.Nm +.Fl C +.Op Fl A +.Op Fl U Ar cache .Sh DESCRIPTION The .Nm -command is used by support engineers to diagnose failures and -gather statistics. Since the -.Tn ZFS -file system is always consistent on disk and is self-repairing, -.Nm -should only be run under the direction by a support engineer. -.Pp -If no arguments are specified, -.Nm -performs basic consistency checks on the pool and associated datasets, and -report any problems detected. -.Nm -Any options supported by this command are internal to Sun and subject to change -at any time. -.Sh EXIT STATUS -The following exit values are returned: -.Bl -tag -offset 2n -width 2n -.It 0 -The pool is consistent. -.It 1 -An error was detected. -.It 2 -Invalid command line options were specified. +utility displays information about a ZFS pool useful for debugging and +performs some amount of consistency checking. +It is a not a general purpose tool and options (and facilities) may change. +This is neither a +.Xr fsck 8 +nor a +.Xr fsdb 8 +utility. +.Pp +The output of this command in general reflects the on-disk structure of a ZFS +pool, and is inherently unstable. +The precise output of most invocations is not documented, a knowledge of ZFS +internals is assumed. +.Pp +When operating on an imported and active pool it is possible, though unlikely, +that zdb may interpret inconsistent pool data and behave erratically. +.Sh OPTIONS +Display options: +.Bl -tag -width indent +.It Fl b +Display statistics regarding the number, size (logical, physical and +allocated) and deduplication of blocks. +.It Fl c +Verify the checksum of all metadata blocks while printing block statistics +(see +.Fl b Ns ). +.Pp +If specified multiple times, verify the checksums of all blocks. +.It Fl C +Display information about the configuration. If specified with no other +options, instead display information about the cache file +.Ns ( Pa /etc/zfs/zpool.cache Ns ). +To specify the cache file to display, see +.Fl U +.Pp +If specified multiple times, and a pool name is also specified display both +the cached configuration and the on-disk configuration. +If specified multiple times with +.FL e +also display the configuration that would be used were the pool to be +imported. +.It Fl d +Display information about datasets. Specified once, displays basic dataset +information: ID, create transaction, size, and object count. +.Pp +If specified multiple times provides greater and greater verbosity. +.Pp +If object IDs are specified, display information about those specific objects only. +.It Fl D +Display deduplication statistics, including the deduplication ratio (dedup), +compression ratio (compress), inflation due to the zfs copies property +(copies), and an overall effective ratio (dedup * compress / copies). +.Pp +If specified twice, display a histogram of deduplication statistics, showing +the allocated (physically present on disk) and referenced (logically +referenced in the pool) block counts and sizes by reference count. +.It Fl h +Display pool history similar to +.Cm zpool history , +but include internal changes, transaction, and dataset information. +.It Fl i +Display information about intent log (ZIL) entries relating to each +dataset. +If specified multiple times, display counts of each intent log transaction +type. +.It Fl l Ar device +Display the vdev labels from the specified device. +If the +.Fl u +option is also specified, also display the uberblocks on this device. +.It Fl L +Disable leak tracing and the loading of space maps. +By default, +.Nm +verifies that all non-free blocks are referenced, which can be very expensive. +.It Fl m +Display the offset, spacemap, and free space of each metaslab. +When specified twice, also display information about the maximum contiguous +free space and the percentage of free space in each space map. +When specified three times display every spacemap record. +.It Xo +.Fl R Ar poolname +.Ar vdev Ns : Ns Ar offset Ns : Ns Ar size Ns Op Ns : Ns Ar flags +.Xc +Read and display a block from the specified device. By default the block is +displayed as a hex dump, but see the description of the +.Fl r +flag, below. +.Pp +The block is specified in terms of a colon-separated tuple +.Ar vdev +(an integer vdev identifier) +.Ar offset +(the offset within the vdev) +.Ar size +(the size of the block to read) and, optionally, +.Ar flags +(a set of flags, described below). +.Bl -tag -width indent +.It Sy b offset +Print block pointer +.It Sy d +Decompress the block +.It Sy e +Byte swap the block +.It Sy g +Dump gang block header +.It Sy i +Dump indirect block +.It Sy r +Dump raw uninterpreted block data +.El +.It Fl s +Report statistics on +.Nm Ns 's +I/O. +Display operation counts, bandwidth, and error counts of I/O to the pool from +.Nm . +.It Fl S +Simulate the effects of deduplication, constructing a DDT and then display +that DDT as with \fB-DD\fR. +.It Fl u +Display the current uberblock. +.El +.Pp +Other options: +.Bl -tag -width indent +.It Fl A +Do not abort should any assertion fail. +.It Fl AA +Enable panic recovery, certain errors which would otherwise be fatal are +demoted to warnings. +.It Fl AAA +Do not abort if asserts fail and also enable panic recovery. +.It Fl e Op Fl p Ar path... +Operate on an exported pool, not present in +.Pa /etc/zfs/zpool.cache . +The +.Fl p +flag specifies the path under which devices are to be searched. +.It Fl F +Attempt to make an unreadable pool readable by trying progressively older +transactions. +.It Fl P +Print numbers in an unscaled form more amenable to parsing, eg. 1000000 rather +than 1M. +.It Fl t Ar transaction +Specify the highest transaction to use when searching for uberblocks. +See also the +.Fl u +and +.Fl l +options for a means to see the available uberblocks and their associated +transaction numbers. +.It Fl U Ar cachefile +Use a cache file other than +.Pa /etc/zfs/zpool.cache . +This option is only valid with +.Fl C +.It Fl v +Enable verbosity. +Specify multiple times for increased verbosity. +.It Fl X +Attempt +.Ql extreme +transaction rewind, that is attempt the same recovery as +.Fl F +but read transactions otherwise deemed too old. +.El +.Pp +Specifying a display option more than once enables verbosity for only that +option, with more occurrences enabling more verbosity. +.Pp +If no options are specified, all information about the named pool will be +displayed at default verbosity. +.Sh EXAMPLES +.Bl -tag -width 0n +.It Sy Example 1 Display the configuration of imported pool 'rpool' +.Bd -literal -offset 2n +.Li # Ic zdb -C rpool + +MOS Configuration: + version: 28 + name: 'rpool' + ... +.Ed +.It Sy Example 2 Display basic dataset information about 'rpool' +.Bd -literal -offset 2n +.Li # Ic zdb -d rpool +Dataset mos [META], ID 0, cr_txg 4, 26.9M, 1051 objects +Dataset rpool/swap [ZVOL], ID 59, cr_txg 356, 486M, 2 objects +... +.Ed +.It Xo Sy Example 3 Display basic information about object 0 in +.Sy 'rpool/export/home' +.Xc +.Bd -literal -offset 2n +.Li # Ic zdb -d rpool/export/home 0 +Dataset rpool/export/home [ZPL], ID 137, cr_txg 1546, 32K, 8 objects + + Object lvl iblk dblk dsize lsize %full type + 0 7 16K 16K 15.0K 16K 25.00 DMU dnode +.Ed +.It Xo Sy Example 4 Display the predicted effect of enabling deduplication on +.Sy 'rpool' +.Xc +.Bd -literal -offset 2n +.Li # Ic zdb -S rpool +Simulated DDT histogram: + +bucket allocated referenced +______ ______________________________ ______________________________ +refcnt blocks LSIZE PSIZE DSIZE blocks LSIZE PSIZE DSIZE +------ ------ ----- ----- ----- ------ ----- ----- ----- + 1 694K 27.1G 15.0G 15.0G 694K 27.1G 15.0G 15.0G + 2 35.0K 1.33G 699M 699M 74.7K 2.79G 1.45G 1.45G + ... +dedup = 1.11, compress = 1.80, copies = 1.00, dedup * compress / copies = 2.00 +.Ed .El .Sh SEE ALSO .Xr zfs 8 , @@ -64,16 +289,18 @@ Invalid command line options were specif This manual page is a .Xr mdoc 7 reimplementation of the -.Tn OpenSolaris +.Tn illumos manual page .Em zdb(1M) , modified and customized for .Fx and licensed under the -.Tn Common Development and Distribution License +Common Development and Distribution License .Pq Tn CDDL . .Pp The .Xr mdoc 7 implementation of this manual page was initially written by -.An Martin Matuska Aq mm@FreeBSD.org . +.An Martin Matuska Aq mm@FreeBSD.org +and +.An Marcelo Araujo Aq araujo@FreeBSD.org . Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Thu May 10 02:07:00 2012 (r235211) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Thu May 10 04:11:39 2012 (r235212) @@ -102,13 +102,16 @@ static void usage(void) { (void) fprintf(stderr, - "Usage: %s [-CumdibcsDvhL] poolname [object...]\n" - " %s [-div] dataset [object...]\n" - " %s -m [-L] poolname [vdev [metaslab...]]\n" - " %s -R poolname vdev:offset:size[:flags]\n" - " %s -S poolname\n" - " %s -l [-u] device\n" - " %s -C\n\n", + "Usage: %s [-CumdibcsDvhLXFPA] [-t txg] [-e [-p path...]]" + "poolname [object...]\n" + " %s [-divPA] [-e -p path...] dataset [object...]\n" + " %s -m [-LXFPA] [-t txg] [-e [-p path...]]" + "poolname [vdev [metaslab...]]\n" + " %s -R [-A] [-e [-p path...]] poolname " + "vdev:offset:size[:flags]\n" + " %s -S [-PA] [-e [-p path...]] poolname\n" + " %s -l [-uA] device\n" + " %s -C [-A] [-U config]\n\n", cmdname, cmdname, cmdname, cmdname, cmdname, cmdname, cmdname); (void) fprintf(stderr, " Dataset name must include at least one " @@ -150,7 +153,7 @@ usage(void) "has altroot/not in a cachefile\n"); (void) fprintf(stderr, " -p -- use one or more with " "-e to specify path to vdev dir\n"); - (void) fprintf(stderr, " -P print numbers parsable\n"); + (void) fprintf(stderr, " -P print numbers in parseable form\n"); (void) fprintf(stderr, " -t -- highest txg to use when " "searching for uberblocks\n"); (void) fprintf(stderr, "Specify an option more than once (e.g. -bb) " From owner-svn-src-head@FreeBSD.ORG Thu May 10 08:57:59 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 42996106564A; Thu, 10 May 2012 08:57:59 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C2668FC0C; Thu, 10 May 2012 08:57:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4A8vxX0025454; Thu, 10 May 2012 08:57:59 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4A8vwIX025449; Thu, 10 May 2012 08:57:58 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201205100857.q4A8vwIX025449@svn.freebsd.org> From: Martin Matuska Date: Thu, 10 May 2012 08:57: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: r235216 - in head/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 10 May 2012 08:57:59 -0000 Author: mm Date: Thu May 10 08:57:58 2012 New Revision: 235216 URL: http://svn.freebsd.org/changeset/base/235216 Log: Add support for force unmounting ZFS filesystems during "zfs rename" with the -f flag. Reimplementation of the illumos changeset 13677:a0cbef703c12 2635 'zfs rename -f' to perform force unmount References: https://www.illumos.org/issues/2635 PR: kern/164447 Suggested by: Marcelo Araujo Obtained from: illumos (issue #2635) MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Thu May 10 08:05:41 2012 (r235215) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Thu May 10 08:57:58 2012 (r235216) @@ -18,7 +18,7 @@ .\" information: Portions Copyright [yyyy] [name of copyright owner] .\" .\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved. -.\" Copyright (c) 2011 by Delphix. All rights reserved. +.\" Copyright (c) 2012 by Delphix. All rights reserved. .\" Copyright (c) 2012 Nexenta Systems, Inc. All Rights Reserved. .\" Copyright (c) 2011, Pawel Jakub Dawidek .\" @@ -77,10 +77,12 @@ .Ar clone-filesystem .Nm .Cm rename +.Op Fl f .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot .Nm .Cm rename +.Op Fl f .Fl p .Ar filesystem Ns | Ns Ar volume .Ar filesystem Ns | Ns Ar volume @@ -1646,12 +1648,14 @@ subcommand can be used to rename any con .It Xo .Nm .Cm rename +.Op Fl f .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot .Xc .It Xo .Nm .Cm rename +.Op Fl f .Fl p .Ar filesystem Ns | Ns Ar volume .Ar filesystem Ns | Ns Ar volume @@ -1685,6 +1689,11 @@ property is set to or .Cm none , file system is not unmounted even if this option is not given. +.It Fl f +Force unmount any filesystems that need to be unmounted in the process. +This flag has no effect if used together with the +.Fl u +flag. .El .It Xo .Nm Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Thu May 10 08:05:41 2012 (r235215) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Thu May 10 08:57:58 2012 (r235216) @@ -22,10 +22,10 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2012 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. * Copyright (c) 2011-2012 Pawel Jakub Dawidek . * All rights reserved. - * Copyright (c) 2011 Martin Matuska . All rights reserved. + * Copyright (c) 2012 Martin Matuska . All rights reserved. */ #include @@ -256,9 +256,10 @@ get_usage(zfs_help_t idx) "snapshot>\n" "\treceive [-vnFu] [-d | -e] \n")); case HELP_RENAME: - return (gettext("\trename " + return (gettext("\trename [-f] " "\n" - "\trename -p \n" + "\trename [-f] -p " + "\n" "\trename -r \n" "\trename -u [-p] ")); case HELP_ROLLBACK: @@ -3091,8 +3092,8 @@ zfs_do_list(int argc, char **argv) } /* - * zfs rename - * zfs rename -p + * zfs rename [-f] + * zfs rename [-f] -p * zfs rename -r * zfs rename -u [-p] * @@ -3112,7 +3113,7 @@ zfs_do_rename(int argc, char **argv) boolean_t parents = B_FALSE; /* check options */ - while ((c = getopt(argc, argv, "pru")) != -1) { + while ((c = getopt(argc, argv, "fpru")) != -1) { switch (c) { case 'p': parents = B_TRUE; @@ -3123,6 +3124,9 @@ zfs_do_rename(int argc, char **argv) case 'u': flags.nounmount = B_TRUE; break; + case 'f': + flags.forceunmount = B_TRUE; + break; case '?': default: (void) fprintf(stderr, gettext("invalid option '%c'\n"), Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Thu May 10 08:05:41 2012 (r235215) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Thu May 10 08:57:58 2012 (r235216) @@ -26,6 +26,7 @@ * All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. * All rights reserved. + * Copyright (c) 2012 Martin Matuska . All rights reserved. */ #ifndef _LIBZFS_H @@ -541,6 +542,9 @@ typedef struct renameflags { /* don't unmount file systems */ int nounmount : 1; + + /* force unmount file systems */ + int forceunmount : 1; } renameflags_t; extern int zfs_rename(zfs_handle_t *, const char *, renameflags_t flags); Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Thu May 10 08:05:41 2012 (r235215) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Thu May 10 08:57:58 2012 (r235216) @@ -25,6 +25,7 @@ * Copyright (c) 2011 by Delphix. All rights reserved. * Copyright (c) 2011-2012 Pawel Jakub Dawidek . * All rights reserved. + * Copyright (c) 2012 Martin Matuska . All rights reserved. */ #include @@ -3721,7 +3722,8 @@ zfs_rename(zfs_handle_t *zhp, const char } else { if ((cl = changelist_gather(zhp, ZFS_PROP_NAME, - flags.nounmount ? CL_GATHER_DONT_UNMOUNT : 0, 0)) == NULL) { + flags.nounmount ? CL_GATHER_DONT_UNMOUNT : 0, + flags.forceunmount ? MS_FORCE : 0)) == NULL) { return (-1); } From owner-svn-src-head@FreeBSD.ORG Thu May 10 09:10:32 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8D05C1065670; Thu, 10 May 2012 09:10:32 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 781098FC08; Thu, 10 May 2012 09:10:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4A9AWd9025899; Thu, 10 May 2012 09:10:32 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4A9AWLu025897; Thu, 10 May 2012 09:10:32 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201205100910.q4A9AWLu025897@svn.freebsd.org> From: Martin Matuska Date: Thu, 10 May 2012 09:10:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235217 - head/cddl/contrib/opensolaris/cmd/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, 10 May 2012 09:10:32 -0000 Author: mm Date: Thu May 10 09:10:31 2012 New Revision: 235217 URL: http://svn.freebsd.org/changeset/base/235217 Log: Remove unreachable break in zfs_main.c Partial import of illumos changeset 13622:e5889df1eaac 2077 lots of unreachable breaks in illumos gate References: https://www.illumos.org/issues/2077 PR: kern/167370 Submitted by: Marcelo Araujo Obtained from: illumos (issue #2077) MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Thu May 10 08:57:58 2012 (r235216) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Thu May 10 09:10:31 2012 (r235217) @@ -23,6 +23,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2012 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright 2012 Milan Jurik. All rights reserved. * Copyright (c) 2011-2012 Pawel Jakub Dawidek . * All rights reserved. * Copyright (c) 2012 Martin Matuska . All rights reserved. @@ -765,7 +766,6 @@ zfs_do_create(int argc, char **argv) (void) fprintf(stderr, gettext("missing size " "argument\n")); goto badusage; - break; case '?': (void) fprintf(stderr, gettext("invalid option '%c'\n"), optopt); From owner-svn-src-head@FreeBSD.ORG Thu May 10 09:30:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7D873106566B; Thu, 10 May 2012 09:30:38 +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 68E938FC08; Thu, 10 May 2012 09:30:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4A9UcMb026599; Thu, 10 May 2012 09:30:38 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4A9UcWI026597; Thu, 10 May 2012 09:30:38 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201205100930.q4A9UcWI026597@svn.freebsd.org> From: David Xu Date: Thu, 10 May 2012 09:30: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: r235218 - 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: Thu, 10 May 2012 09:30:38 -0000 Author: davidxu Date: Thu May 10 09:30:37 2012 New Revision: 235218 URL: http://svn.freebsd.org/changeset/base/235218 Log: Create a common function lookup() to search a chan, this eliminates redundant SC_LOOKUP() calling. Modified: head/lib/libthr/thread/thr_sleepq.c Modified: head/lib/libthr/thread/thr_sleepq.c ============================================================================== --- head/lib/libthr/thread/thr_sleepq.c Thu May 10 09:10:31 2012 (r235217) +++ head/lib/libthr/thread/thr_sleepq.c Thu May 10 09:30:37 2012 (r235218) @@ -94,19 +94,23 @@ _sleepq_unlock(void *wchan) THR_LOCK_RELEASE(curthread, &sc->sc_lock); } -struct sleepqueue * -_sleepq_lookup(void *wchan) +static inline struct sleepqueue * +lookup(struct sleepqueue_chain *sc, void *wchan) { - struct sleepqueue_chain *sc; struct sleepqueue *sq; - sc = SC_LOOKUP(wchan); LIST_FOREACH(sq, &sc->sc_queues, sq_hash) if (sq->sq_wchan == wchan) return (sq); return (NULL); } +struct sleepqueue * +_sleepq_lookup(void *wchan) +{ + return (lookup(SC_LOOKUP(wchan), wchan)); +} + void _sleepq_add(void *wchan, struct pthread *td) { @@ -114,7 +118,7 @@ _sleepq_add(void *wchan, struct pthread struct sleepqueue *sq; sc = SC_LOOKUP(wchan); - sq = _sleepq_lookup(wchan); + sq = lookup(sc, wchan); if (sq != NULL) { SLIST_INSERT_HEAD(&sq->sq_freeq, td->sleepqueue, sq_flink); } else { From owner-svn-src-head@FreeBSD.ORG Thu May 10 09:47:05 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DEA11065670; Thu, 10 May 2012 09:47:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6FA328FC1C; Thu, 10 May 2012 09:47:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4A9l5cq027167; Thu, 10 May 2012 09:47:05 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4A9l5NC027162; Thu, 10 May 2012 09:47:05 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205100947.q4A9l5NC027162@svn.freebsd.org> From: Andriy Gapon Date: Thu, 10 May 2012 09:47: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: r235219 - in head/sys/boot/i386: cdboot pxeldr X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 10 May 2012 09:47:05 -0000 Author: avg Date: Thu May 10 09:47:04 2012 New Revision: 235219 URL: http://svn.freebsd.org/changeset/base/235219 Log: cdboot, pxeldr: make use of bootargs.h instead of redefining flag constants Reviewed by: jhb MFC after: 1 month Added: head/sys/boot/i386/cdboot/cdboot.S - copied, changed from r235152, head/sys/boot/i386/cdboot/cdboot.s Deleted: head/sys/boot/i386/cdboot/cdboot.s Modified: head/sys/boot/i386/cdboot/Makefile head/sys/boot/i386/pxeldr/Makefile head/sys/boot/i386/pxeldr/pxeldr.S Modified: head/sys/boot/i386/cdboot/Makefile ============================================================================== --- head/sys/boot/i386/cdboot/Makefile Thu May 10 09:30:37 2012 (r235218) +++ head/sys/boot/i386/cdboot/Makefile Thu May 10 09:47:04 2012 (r235219) @@ -4,7 +4,9 @@ PROG= cdboot STRIP= BINMODE=${NOBINMODE} NO_MAN= -SRCS= ${PROG}.s +SRCS= ${PROG}.S + +CFLAGS+=-I${.CURDIR}/../common ORG= 0x7c00 Copied and modified: head/sys/boot/i386/cdboot/cdboot.S (from r235152, head/sys/boot/i386/cdboot/cdboot.s) ============================================================================== --- head/sys/boot/i386/cdboot/cdboot.s Wed May 9 04:54:50 2012 (r235152, copy source) +++ head/sys/boot/i386/cdboot/cdboot.S Thu May 10 09:47:04 2012 (r235219) @@ -40,6 +40,8 @@ # off of. # +#include + # # Memory locations. # @@ -62,11 +64,6 @@ .set AOUT_ENTRY,0x14 # entry point .set AOUT_HEADER,MEM_PAGE_SIZE # size of the a.out header # -# Flags for kargs->bootflags -# - .set KARGS_FLAGS_CD,0x1 # flag to indicate booting from - # CD loader -# # Segment selectors. # .set SEL_SDATA,0x8 # Supervisor data Modified: head/sys/boot/i386/pxeldr/Makefile ============================================================================== --- head/sys/boot/i386/pxeldr/Makefile Thu May 10 09:30:37 2012 (r235218) +++ head/sys/boot/i386/pxeldr/Makefile Thu May 10 09:47:04 2012 (r235219) @@ -23,6 +23,8 @@ CFLAGS+=-DPROBE_KEYBOARD CFLAGS+=-DALWAYS_SERIAL .endif +CFLAGS+=-I${.CURDIR}/../common + LOADERBIN= ${.OBJDIR}/../loader/loader.bin CLEANFILES+= ${BOOT}.tmp Modified: head/sys/boot/i386/pxeldr/pxeldr.S ============================================================================== --- head/sys/boot/i386/pxeldr/pxeldr.S Thu May 10 09:30:37 2012 (r235218) +++ head/sys/boot/i386/pxeldr/pxeldr.S Thu May 10 09:47:04 2012 (r235219) @@ -26,6 +26,7 @@ */ #include +#include /* * Memory locations. @@ -50,11 +51,6 @@ .set AOUT_ENTRY,0x14 # entry point .set AOUT_HEADER,MEM_PAGE_SIZE # size of the a.out header /* - * Flags for kargs->bootflags - */ - .set KARGS_FLAGS_PXE,0x2 # flag to indicate booting from - # PXE loader -/* * Segment selectors. */ .set SEL_SDATA,0x8 # Supervisor data From owner-svn-src-head@FreeBSD.ORG Thu May 10 10:39:46 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 20A261065672; Thu, 10 May 2012 10:39:46 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 06C2F8FC1D; Thu, 10 May 2012 10:39:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4AAdjKv029153; Thu, 10 May 2012 10:39:45 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4AAdjTs029139; Thu, 10 May 2012 10:39:45 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201205101039.q4AAdjTs029139@svn.freebsd.org> From: Martin Matuska Date: Thu, 10 May 2012 10:39: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: r235222 - in head: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/lib/libzfs/common cddl/contrib/opensolaris/lib/libzpool/common/sys sys/cddl/contrib/opensolaris/uts/common/f... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 10 May 2012 10:39:46 -0000 Author: mm Date: Thu May 10 10:39:45 2012 New Revision: 235222 URL: http://svn.freebsd.org/changeset/base/235222 Log: Import illumos changeset 13686:4bc0783f6064 2703 add mechanism to report ZFS send progress If the zfs send command is used with the -v flag, the amount of bytes transmitted is reported in per second updates. References: https://www.illumos.org/issues/2703 Obtained from: illumos (issue #2703) MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Thu May 10 10:16:21 2012 (r235221) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Thu May 10 10:39:45 2012 (r235222) @@ -20,6 +20,7 @@ .\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2012 by Delphix. All rights reserved. .\" Copyright (c) 2012 Nexenta Systems, Inc. All Rights Reserved. +.\" Copyright (c) 2012, Joyent, Inc. All rights reserved. .\" Copyright (c) 2011, Pawel Jakub Dawidek .\" .\" $FreeBSD$ @@ -2280,6 +2281,7 @@ flags to determine what data will be sen Print machine-parsable verbose information about the stream package generated. .It Fl v Print verbose information about the stream package generated. +This information includes a per-second report of how much data has been sent. .El .Pp The format of the stream is committed. You will be able to receive your streams Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Thu May 10 10:16:21 2012 (r235221) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Thu May 10 10:39:45 2012 (r235222) @@ -24,6 +24,7 @@ * Copyright 2012 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. * Copyright 2012 Milan Jurik. All rights reserved. + * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2011-2012 Pawel Jakub Dawidek . * All rights reserved. * Copyright (c) 2012 Martin Matuska . All rights reserved. @@ -3590,6 +3591,7 @@ zfs_do_send(int argc, char **argv) if (flags.verbose) extraverbose = B_TRUE; flags.verbose = B_TRUE; + flags.progress = B_TRUE; break; case 'D': flags.dedup = B_TRUE; Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Thu May 10 10:16:21 2012 (r235221) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Thu May 10 10:39:45 2012 (r235222) @@ -25,7 +25,7 @@ * Copyright (c) 2011 Pawel Jakub Dawidek . * All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. - * All rights reserved. + * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2012 Martin Matuska . All rights reserved. */ @@ -573,6 +573,9 @@ typedef struct sendflags { /* parsable verbose output (ie. -P) */ boolean_t parsable; + + /* show progress (ie. -v) */ + boolean_t progress; } sendflags_t; typedef boolean_t (snapfilter_cb_t)(zfs_handle_t *, void *); Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Thu May 10 10:16:21 2012 (r235221) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Thu May 10 10:39:45 2012 (r235222) @@ -22,6 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2012 Pawel Jakub Dawidek . * All rights reserved. */ @@ -40,6 +41,7 @@ #include #include #include +#include #include @@ -67,6 +69,12 @@ typedef struct dedup_arg { libzfs_handle_t *dedup_hdl; } dedup_arg_t; +typedef struct progress_arg { + zfs_handle_t *pa_zhp; + int pa_fd; + boolean_t pa_parsable; +} progress_arg_t; + typedef struct dataref { uint64_t ref_guid; uint64_t ref_object; @@ -786,7 +794,7 @@ typedef struct send_dump_data { char prevsnap[ZFS_MAXNAMELEN]; uint64_t prevsnap_obj; boolean_t seenfrom, seento, replicate, doall, fromorigin; - boolean_t verbose, dryrun, parsable; + boolean_t verbose, dryrun, parsable, progress; int outfd; boolean_t err; nvlist_t *fss; @@ -979,10 +987,60 @@ hold_for_send(zfs_handle_t *zhp, send_du return (error); } +static void * +send_progress_thread(void *arg) +{ + progress_arg_t *pa = arg; + + zfs_cmd_t zc = { 0 }; + zfs_handle_t *zhp = pa->pa_zhp; + libzfs_handle_t *hdl = zhp->zfs_hdl; + unsigned long long bytes; + char buf[16]; + + time_t t; + struct tm *tm; + + assert(zhp->zfs_type == ZFS_TYPE_SNAPSHOT); + (void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name)); + + if (!pa->pa_parsable) + (void) fprintf(stderr, "TIME SENT SNAPSHOT\n"); + + /* + * Print the progress from ZFS_IOC_SEND_PROGRESS every second. + */ + for (;;) { + (void) sleep(1); + + zc.zc_cookie = pa->pa_fd; + if (zfs_ioctl(hdl, ZFS_IOC_SEND_PROGRESS, &zc) != 0) + return ((void *)-1); + + (void) time(&t); + tm = localtime(&t); + bytes = zc.zc_cookie; + + if (pa->pa_parsable) { + (void) fprintf(stderr, "%02d:%02d:%02d\t%llu\t%s\n", + tm->tm_hour, tm->tm_min, tm->tm_sec, + bytes, zhp->zfs_name); + } else { + zfs_nicenum(bytes, buf, sizeof (buf)); + (void) fprintf(stderr, "%02d:%02d:%02d %5s %s\n", + tm->tm_hour, tm->tm_min, tm->tm_sec, + buf, zhp->zfs_name); + } + } +} + static int dump_snapshot(zfs_handle_t *zhp, void *arg) { send_dump_data_t *sdd = arg; + progress_arg_t pa = { 0 }; + pthread_t tid; + char *thissnap; int err; boolean_t isfromsnap, istosnap, fromorigin; @@ -1100,8 +1158,29 @@ dump_snapshot(zfs_handle_t *zhp, void *a } if (!sdd->dryrun) { + /* + * If progress reporting is requested, spawn a new thread to + * poll ZFS_IOC_SEND_PROGRESS at a regular interval. + */ + if (sdd->progress) { + pa.pa_zhp = zhp; + pa.pa_fd = sdd->outfd; + pa.pa_parsable = sdd->parsable; + + if (err = pthread_create(&tid, NULL, + send_progress_thread, &pa)) { + zfs_close(zhp); + return (err); + } + } + err = dump_ioctl(zhp, sdd->prevsnap, sdd->prevsnap_obj, fromorigin, sdd->outfd, sdd->debugnv); + + if (sdd->progress) { + (void) pthread_cancel(tid); + (void) pthread_join(tid, NULL); + } } (void) strcpy(sdd->prevsnap, thissnap); @@ -1451,12 +1530,13 @@ zfs_send(zfs_handle_t *zhp, const char * sdd.fsavl = fsavl; sdd.verbose = flags->verbose; sdd.parsable = flags->parsable; + sdd.progress = flags->progress; sdd.dryrun = flags->dryrun; sdd.filter_cb = filter_func; sdd.filter_cb_arg = cb_arg; if (debugnvp) sdd.debugnv = *debugnvp; - if (holdsnaps) { + if (holdsnaps || flags->progress) { ++holdseq; (void) snprintf(sdd.holdtag, sizeof (sdd.holdtag), ".send-%d-%llu", getpid(), (u_longlong_t)holdseq); Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Thu May 10 10:16:21 2012 (r235221) +++ head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Thu May 10 10:39:45 2012 (r235222) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, Joyent, Inc. All rights reserved. */ #ifndef _SYS_ZFS_CONTEXT_H @@ -228,6 +229,7 @@ struct proc { }; extern struct proc p0; +#define curproc (&p0) #define PS_NONE -1 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Thu May 10 10:16:21 2012 (r235221) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Thu May 10 10:39:45 2012 (r235222) @@ -25,6 +25,8 @@ /* * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012, Joyent, Inc. All rights reserved. + * Copyright (c) 2012, Martin Matuska . All rights reserved. */ #include @@ -54,38 +56,15 @@ int zfs_send_corrupt_data = B_FALSE; static char *dmu_recv_tag = "dmu_recv_tag"; -/* - * The list of data whose inclusion in a send stream can be pending from - * one call to backup_cb to another. Multiple calls to dump_free() and - * dump_freeobjects() can be aggregated into a single DRR_FREE or - * DRR_FREEOBJECTS replay record. - */ -typedef enum { - PENDING_NONE, - PENDING_FREE, - PENDING_FREEOBJECTS -} pendop_t; - -struct backuparg { - dmu_replay_record_t *drr; - kthread_t *td; - struct file *fp; - offset_t *off; - objset_t *os; - zio_cksum_t zc; - uint64_t toguid; - int err; - pendop_t pending_op; -}; - static int -dump_bytes(struct backuparg *ba, void *buf, int len) +dump_bytes(dmu_sendarg_t *dsp, void *buf, int len) { + dsl_dataset_t *ds = dsp->dsa_os->os_dsl_dataset; struct uio auio; struct iovec aiov; ASSERT3U(len % 8, ==, 0); - fletcher_4_incremental_native(buf, len, &ba->zc); + fletcher_4_incremental_native(buf, len, &dsp->dsa_zc); aiov.iov_base = buf; aiov.iov_len = len; auio.uio_iov = &aiov; @@ -94,24 +73,28 @@ dump_bytes(struct backuparg *ba, void *b auio.uio_segflg = UIO_SYSSPACE; auio.uio_rw = UIO_WRITE; auio.uio_offset = (off_t)-1; - auio.uio_td = ba->td; + auio.uio_td = dsp->dsa_td; #ifdef _KERNEL - if (ba->fp->f_type == DTYPE_VNODE) + if (dsp->dsa_fp->f_type == DTYPE_VNODE) bwillwrite(); - ba->err = fo_write(ba->fp, &auio, ba->td->td_ucred, 0, ba->td); + dsp->dsa_err = fo_write(dsp->dsa_fp, &auio, dsp->dsa_td->td_ucred, 0, + dsp->dsa_td); #else fprintf(stderr, "%s: returning EOPNOTSUPP\n", __func__); - ba->err = EOPNOTSUPP; + dsp->dsa_err = EOPNOTSUPP; #endif - *ba->off += len; - return (ba->err); + mutex_enter(&ds->ds_sendstream_lock); + *dsp->dsa_off += len; + mutex_exit(&ds->ds_sendstream_lock); + + return (dsp->dsa_err); } static int -dump_free(struct backuparg *ba, uint64_t object, uint64_t offset, +dump_free(dmu_sendarg_t *dsp, uint64_t object, uint64_t offset, uint64_t length) { - struct drr_free *drrf = &(ba->drr->drr_u.drr_free); + struct drr_free *drrf = &(dsp->dsa_drr->drr_u.drr_free); /* * If there is a pending op, but it's not PENDING_FREE, push it out, @@ -120,13 +103,15 @@ dump_free(struct backuparg *ba, uint64_t * other DRR_FREE records. DRR_FREEOBJECTS records can only be * aggregated with other DRR_FREEOBJECTS records. */ - if (ba->pending_op != PENDING_NONE && ba->pending_op != PENDING_FREE) { - if (dump_bytes(ba, ba->drr, sizeof (dmu_replay_record_t)) != 0) + if (dsp->dsa_pending_op != PENDING_NONE && + dsp->dsa_pending_op != PENDING_FREE) { + if (dump_bytes(dsp, dsp->dsa_drr, + sizeof (dmu_replay_record_t)) != 0) return (EINTR); - ba->pending_op = PENDING_NONE; + dsp->dsa_pending_op = PENDING_NONE; } - if (ba->pending_op == PENDING_FREE) { + if (dsp->dsa_pending_op == PENDING_FREE) { /* * There should never be a PENDING_FREE if length is -1 * (because dump_dnode is the only place where this @@ -144,34 +129,35 @@ dump_free(struct backuparg *ba, uint64_t return (0); } else { /* not a continuation. Push out pending record */ - if (dump_bytes(ba, ba->drr, + if (dump_bytes(dsp, dsp->dsa_drr, sizeof (dmu_replay_record_t)) != 0) return (EINTR); - ba->pending_op = PENDING_NONE; + dsp->dsa_pending_op = PENDING_NONE; } } /* create a FREE record and make it pending */ - bzero(ba->drr, sizeof (dmu_replay_record_t)); - ba->drr->drr_type = DRR_FREE; + bzero(dsp->dsa_drr, sizeof (dmu_replay_record_t)); + dsp->dsa_drr->drr_type = DRR_FREE; drrf->drr_object = object; drrf->drr_offset = offset; drrf->drr_length = length; - drrf->drr_toguid = ba->toguid; + drrf->drr_toguid = dsp->dsa_toguid; if (length == -1ULL) { - if (dump_bytes(ba, ba->drr, sizeof (dmu_replay_record_t)) != 0) + if (dump_bytes(dsp, dsp->dsa_drr, + sizeof (dmu_replay_record_t)) != 0) return (EINTR); } else { - ba->pending_op = PENDING_FREE; + dsp->dsa_pending_op = PENDING_FREE; } return (0); } static int -dump_data(struct backuparg *ba, dmu_object_type_t type, +dump_data(dmu_sendarg_t *dsp, dmu_object_type_t type, uint64_t object, uint64_t offset, int blksz, const blkptr_t *bp, void *data) { - struct drr_write *drrw = &(ba->drr->drr_u.drr_write); + struct drr_write *drrw = &(dsp->dsa_drr->drr_u.drr_write); /* @@ -180,19 +166,20 @@ dump_data(struct backuparg *ba, dmu_obje * the stream, since aggregation can't be done across operations * of different types. */ - if (ba->pending_op != PENDING_NONE) { - if (dump_bytes(ba, ba->drr, sizeof (dmu_replay_record_t)) != 0) + if (dsp->dsa_pending_op != PENDING_NONE) { + if (dump_bytes(dsp, dsp->dsa_drr, + sizeof (dmu_replay_record_t)) != 0) return (EINTR); - ba->pending_op = PENDING_NONE; + dsp->dsa_pending_op = PENDING_NONE; } /* write a DATA record */ - bzero(ba->drr, sizeof (dmu_replay_record_t)); - ba->drr->drr_type = DRR_WRITE; + bzero(dsp->dsa_drr, sizeof (dmu_replay_record_t)); + dsp->dsa_drr->drr_type = DRR_WRITE; drrw->drr_object = object; drrw->drr_type = type; drrw->drr_offset = offset; drrw->drr_length = blksz; - drrw->drr_toguid = ba->toguid; + drrw->drr_toguid = dsp->dsa_toguid; drrw->drr_checksumtype = BP_GET_CHECKSUM(bp); if (zio_checksum_table[drrw->drr_checksumtype].ci_dedup) drrw->drr_checksumflags |= DRR_CHECKSUM_DEDUP; @@ -201,42 +188,43 @@ dump_data(struct backuparg *ba, dmu_obje DDK_SET_COMPRESS(&drrw->drr_key, BP_GET_COMPRESS(bp)); drrw->drr_key.ddk_cksum = bp->blk_cksum; - if (dump_bytes(ba, ba->drr, sizeof (dmu_replay_record_t)) != 0) + if (dump_bytes(dsp, dsp->dsa_drr, sizeof (dmu_replay_record_t)) != 0) return (EINTR); - if (dump_bytes(ba, data, blksz) != 0) + if (dump_bytes(dsp, data, blksz) != 0) return (EINTR); return (0); } static int -dump_spill(struct backuparg *ba, uint64_t object, int blksz, void *data) +dump_spill(dmu_sendarg_t *dsp, uint64_t object, int blksz, void *data) { - struct drr_spill *drrs = &(ba->drr->drr_u.drr_spill); + struct drr_spill *drrs = &(dsp->dsa_drr->drr_u.drr_spill); - if (ba->pending_op != PENDING_NONE) { - if (dump_bytes(ba, ba->drr, sizeof (dmu_replay_record_t)) != 0) + if (dsp->dsa_pending_op != PENDING_NONE) { + if (dump_bytes(dsp, dsp->dsa_drr, + sizeof (dmu_replay_record_t)) != 0) return (EINTR); - ba->pending_op = PENDING_NONE; + dsp->dsa_pending_op = PENDING_NONE; } /* write a SPILL record */ - bzero(ba->drr, sizeof (dmu_replay_record_t)); - ba->drr->drr_type = DRR_SPILL; + bzero(dsp->dsa_drr, sizeof (dmu_replay_record_t)); + dsp->dsa_drr->drr_type = DRR_SPILL; drrs->drr_object = object; drrs->drr_length = blksz; - drrs->drr_toguid = ba->toguid; + drrs->drr_toguid = dsp->dsa_toguid; - if (dump_bytes(ba, ba->drr, sizeof (dmu_replay_record_t))) + if (dump_bytes(dsp, dsp->dsa_drr, sizeof (dmu_replay_record_t))) return (EINTR); - if (dump_bytes(ba, data, blksz)) + if (dump_bytes(dsp, data, blksz)) return (EINTR); return (0); } static int -dump_freeobjects(struct backuparg *ba, uint64_t firstobj, uint64_t numobjs) +dump_freeobjects(dmu_sendarg_t *dsp, uint64_t firstobj, uint64_t numobjs) { - struct drr_freeobjects *drrfo = &(ba->drr->drr_u.drr_freeobjects); + struct drr_freeobjects *drrfo = &(dsp->dsa_drr->drr_u.drr_freeobjects); /* * If there is a pending op, but it's not PENDING_FREEOBJECTS, @@ -245,13 +233,14 @@ dump_freeobjects(struct backuparg *ba, u * aggregated with other DRR_FREE records. DRR_FREEOBJECTS records * can only be aggregated with other DRR_FREEOBJECTS records. */ - if (ba->pending_op != PENDING_NONE && - ba->pending_op != PENDING_FREEOBJECTS) { - if (dump_bytes(ba, ba->drr, sizeof (dmu_replay_record_t)) != 0) + if (dsp->dsa_pending_op != PENDING_NONE && + dsp->dsa_pending_op != PENDING_FREEOBJECTS) { + if (dump_bytes(dsp, dsp->dsa_drr, + sizeof (dmu_replay_record_t)) != 0) return (EINTR); - ba->pending_op = PENDING_NONE; + dsp->dsa_pending_op = PENDING_NONE; } - if (ba->pending_op == PENDING_FREEOBJECTS) { + if (dsp->dsa_pending_op == PENDING_FREEOBJECTS) { /* * See whether this free object array can be aggregated * with pending one @@ -261,42 +250,43 @@ dump_freeobjects(struct backuparg *ba, u return (0); } else { /* can't be aggregated. Push out pending record */ - if (dump_bytes(ba, ba->drr, + if (dump_bytes(dsp, dsp->dsa_drr, sizeof (dmu_replay_record_t)) != 0) return (EINTR); - ba->pending_op = PENDING_NONE; + dsp->dsa_pending_op = PENDING_NONE; } } /* write a FREEOBJECTS record */ - bzero(ba->drr, sizeof (dmu_replay_record_t)); - ba->drr->drr_type = DRR_FREEOBJECTS; + bzero(dsp->dsa_drr, sizeof (dmu_replay_record_t)); + dsp->dsa_drr->drr_type = DRR_FREEOBJECTS; drrfo->drr_firstobj = firstobj; drrfo->drr_numobjs = numobjs; - drrfo->drr_toguid = ba->toguid; + drrfo->drr_toguid = dsp->dsa_toguid; - ba->pending_op = PENDING_FREEOBJECTS; + dsp->dsa_pending_op = PENDING_FREEOBJECTS; return (0); } static int -dump_dnode(struct backuparg *ba, uint64_t object, dnode_phys_t *dnp) +dump_dnode(dmu_sendarg_t *dsp, uint64_t object, dnode_phys_t *dnp) { - struct drr_object *drro = &(ba->drr->drr_u.drr_object); + struct drr_object *drro = &(dsp->dsa_drr->drr_u.drr_object); if (dnp == NULL || dnp->dn_type == DMU_OT_NONE) - return (dump_freeobjects(ba, object, 1)); + return (dump_freeobjects(dsp, object, 1)); - if (ba->pending_op != PENDING_NONE) { - if (dump_bytes(ba, ba->drr, sizeof (dmu_replay_record_t)) != 0) + if (dsp->dsa_pending_op != PENDING_NONE) { + if (dump_bytes(dsp, dsp->dsa_drr, + sizeof (dmu_replay_record_t)) != 0) return (EINTR); - ba->pending_op = PENDING_NONE; + dsp->dsa_pending_op = PENDING_NONE; } /* write an OBJECT record */ - bzero(ba->drr, sizeof (dmu_replay_record_t)); - ba->drr->drr_type = DRR_OBJECT; + bzero(dsp->dsa_drr, sizeof (dmu_replay_record_t)); + dsp->dsa_drr->drr_type = DRR_OBJECT; drro->drr_object = object; drro->drr_type = dnp->dn_type; drro->drr_bonustype = dnp->dn_bonustype; @@ -304,19 +294,19 @@ dump_dnode(struct backuparg *ba, uint64_ drro->drr_bonuslen = dnp->dn_bonuslen; drro->drr_checksumtype = dnp->dn_checksum; drro->drr_compress = dnp->dn_compress; - drro->drr_toguid = ba->toguid; + drro->drr_toguid = dsp->dsa_toguid; - if (dump_bytes(ba, ba->drr, sizeof (dmu_replay_record_t)) != 0) + if (dump_bytes(dsp, dsp->dsa_drr, sizeof (dmu_replay_record_t)) != 0) return (EINTR); - if (dump_bytes(ba, DN_BONUS(dnp), P2ROUNDUP(dnp->dn_bonuslen, 8)) != 0) + if (dump_bytes(dsp, DN_BONUS(dnp), P2ROUNDUP(dnp->dn_bonuslen, 8)) != 0) return (EINTR); /* free anything past the end of the file */ - if (dump_free(ba, object, (dnp->dn_maxblkid + 1) * + if (dump_free(dsp, object, (dnp->dn_maxblkid + 1) * (dnp->dn_datablkszsec << SPA_MINBLOCKSHIFT), -1ULL)) return (EINTR); - if (ba->err) + if (dsp->dsa_err) return (EINTR); return (0); } @@ -330,7 +320,7 @@ static int backup_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, arc_buf_t *pbuf, const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) { - struct backuparg *ba = arg; + dmu_sendarg_t *dsp = arg; dmu_object_type_t type = bp ? BP_GET_TYPE(bp) : DMU_OT_NONE; int err = 0; @@ -343,10 +333,10 @@ backup_cb(spa_t *spa, zilog_t *zilog, co } else if (bp == NULL && zb->zb_object == DMU_META_DNODE_OBJECT) { uint64_t span = BP_SPAN(dnp, zb->zb_level); uint64_t dnobj = (zb->zb_blkid * span) >> DNODE_SHIFT; - err = dump_freeobjects(ba, dnobj, span >> DNODE_SHIFT); + err = dump_freeobjects(dsp, dnobj, span >> DNODE_SHIFT); } else if (bp == NULL) { uint64_t span = BP_SPAN(dnp, zb->zb_level); - err = dump_free(ba, zb->zb_object, zb->zb_blkid * span, span); + err = dump_free(dsp, zb->zb_object, zb->zb_blkid * span, span); } else if (zb->zb_level > 0 || type == DMU_OT_OBJSET) { return (0); } else if (type == DMU_OT_DNODE) { @@ -365,7 +355,7 @@ backup_cb(spa_t *spa, zilog_t *zilog, co for (i = 0; i < blksz >> DNODE_SHIFT; i++) { uint64_t dnobj = (zb->zb_blkid << (DNODE_BLOCK_SHIFT - DNODE_SHIFT)) + i; - err = dump_dnode(ba, dnobj, blk+i); + err = dump_dnode(dsp, dnobj, blk+i); if (err) break; } @@ -380,7 +370,7 @@ backup_cb(spa_t *spa, zilog_t *zilog, co ZIO_FLAG_CANFAIL, &aflags, zb) != 0) return (EIO); - err = dump_spill(ba, zb->zb_object, blksz, abuf->b_data); + err = dump_spill(dsp, zb->zb_object, blksz, abuf->b_data); (void) arc_buf_remove_ref(abuf, &abuf); } else { /* it's a level-0 block of a regular object */ uint32_t aflags = ARC_WAIT; @@ -404,7 +394,7 @@ backup_cb(spa_t *spa, zilog_t *zilog, co } } - err = dump_data(ba, type, zb->zb_object, zb->zb_blkid * blksz, + err = dump_data(dsp, type, zb->zb_object, zb->zb_blkid * blksz, blksz, bp, abuf->b_data); (void) arc_buf_remove_ref(abuf, &abuf); } @@ -414,13 +404,13 @@ backup_cb(spa_t *spa, zilog_t *zilog, co } int -dmu_sendbackup(objset_t *tosnap, objset_t *fromsnap, boolean_t fromorigin, - struct file *fp, offset_t *off) +dmu_send(objset_t *tosnap, objset_t *fromsnap, boolean_t fromorigin, + int outfd, struct file *fp, offset_t *off) { dsl_dataset_t *ds = tosnap->os_dsl_dataset; dsl_dataset_t *fromds = fromsnap ? fromsnap->os_dsl_dataset : NULL; dmu_replay_record_t *drr; - struct backuparg ba; + dmu_sendarg_t *dsp; int err; uint64_t fromtxg = 0; @@ -461,8 +451,10 @@ dmu_sendbackup(objset_t *tosnap, objset_ #ifdef _KERNEL if (dmu_objset_type(tosnap) == DMU_OST_ZFS) { uint64_t version; - if (zfs_get_zplprop(tosnap, ZFS_PROP_VERSION, &version) != 0) + if (zfs_get_zplprop(tosnap, ZFS_PROP_VERSION, &version) != 0) { + kmem_free(drr, sizeof (dmu_replay_record_t)); return (EINVAL); + } if (version == ZPL_VERSION_SA) { DMU_SET_FEATUREFLAGS( drr->drr_u.drr_begin.drr_versioninfo, @@ -489,47 +481,60 @@ dmu_sendbackup(objset_t *tosnap, objset_ if (fromorigin) dsl_dataset_rele(fromds, FTAG); - ba.drr = drr; - ba.td = curthread; - ba.fp = fp; - ba.os = tosnap; - ba.off = off; - ba.toguid = ds->ds_phys->ds_guid; - ZIO_SET_CHECKSUM(&ba.zc, 0, 0, 0, 0); - ba.pending_op = PENDING_NONE; + dsp = kmem_zalloc(sizeof (dmu_sendarg_t), KM_SLEEP); - if (dump_bytes(&ba, drr, sizeof (dmu_replay_record_t)) != 0) { - kmem_free(drr, sizeof (dmu_replay_record_t)); - return (ba.err); + dsp->dsa_drr = drr; + dsp->dsa_outfd = outfd; + dsp->dsa_proc = curproc; + dsp->dsa_td = curthread; + dsp->dsa_fp = fp; + dsp->dsa_os = tosnap; + dsp->dsa_off = off; + dsp->dsa_toguid = ds->ds_phys->ds_guid; + ZIO_SET_CHECKSUM(&dsp->dsa_zc, 0, 0, 0, 0); + dsp->dsa_pending_op = PENDING_NONE; + + mutex_enter(&ds->ds_sendstream_lock); + list_insert_head(&ds->ds_sendstreams, dsp); + mutex_exit(&ds->ds_sendstream_lock); + + if (dump_bytes(dsp, drr, sizeof (dmu_replay_record_t)) != 0) { + err = dsp->dsa_err; + goto out; } err = traverse_dataset(ds, fromtxg, TRAVERSE_PRE | TRAVERSE_PREFETCH, - backup_cb, &ba); + backup_cb, dsp); - if (ba.pending_op != PENDING_NONE) - if (dump_bytes(&ba, drr, sizeof (dmu_replay_record_t)) != 0) + if (dsp->dsa_pending_op != PENDING_NONE) + if (dump_bytes(dsp, drr, sizeof (dmu_replay_record_t)) != 0) err = EINTR; if (err) { - if (err == EINTR && ba.err) - err = ba.err; - kmem_free(drr, sizeof (dmu_replay_record_t)); - return (err); + if (err == EINTR && dsp->dsa_err) + err = dsp->dsa_err; + goto out; } bzero(drr, sizeof (dmu_replay_record_t)); drr->drr_type = DRR_END; - drr->drr_u.drr_end.drr_checksum = ba.zc; - drr->drr_u.drr_end.drr_toguid = ba.toguid; + drr->drr_u.drr_end.drr_checksum = dsp->dsa_zc; + drr->drr_u.drr_end.drr_toguid = dsp->dsa_toguid; - if (dump_bytes(&ba, drr, sizeof (dmu_replay_record_t)) != 0) { - kmem_free(drr, sizeof (dmu_replay_record_t)); - return (ba.err); + if (dump_bytes(dsp, drr, sizeof (dmu_replay_record_t)) != 0) { + err = dsp->dsa_err; + goto out; } +out: + mutex_enter(&ds->ds_sendstream_lock); + list_remove(&ds->ds_sendstreams, dsp); + mutex_exit(&ds->ds_sendstream_lock); + kmem_free(drr, sizeof (dmu_replay_record_t)); + kmem_free(dsp, sizeof (dmu_sendarg_t)); - return (0); + return (err); } int Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Thu May 10 10:16:21 2012 (r235221) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Thu May 10 10:39:45 2012 (r235222) @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2011 Pawel Jakub Dawidek . * All rights reserved. * Portions Copyright (c) 2011 Martin Matuska @@ -32,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -401,6 +403,8 @@ dsl_dataset_get_ref(dsl_pool_t *dp, uint mutex_init(&ds->ds_lock, NULL, MUTEX_DEFAULT, NULL); mutex_init(&ds->ds_recvlock, NULL, MUTEX_DEFAULT, NULL); mutex_init(&ds->ds_opening_lock, NULL, MUTEX_DEFAULT, NULL); + mutex_init(&ds->ds_sendstream_lock, NULL, MUTEX_DEFAULT, NULL); + rw_init(&ds->ds_rwlock, 0, 0, 0); cv_init(&ds->ds_exclusive_cv, NULL, CV_DEFAULT, NULL); @@ -408,6 +412,9 @@ dsl_dataset_get_ref(dsl_pool_t *dp, uint dsl_deadlist_open(&ds->ds_deadlist, mos, ds->ds_phys->ds_deadlist_obj); + list_create(&ds->ds_sendstreams, sizeof (dmu_sendarg_t), + offsetof(dmu_sendarg_t, dsa_link)); + if (err == 0) { err = dsl_dir_open_obj(dp, ds->ds_phys->ds_dir_obj, NULL, ds, &ds->ds_dir); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Thu May 10 10:16:21 2012 (r235221) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Thu May 10 10:39:45 2012 (r235222) @@ -24,6 +24,7 @@ */ /* * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + * Copyright (c) 2012, Joyent, Inc. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -706,8 +707,8 @@ typedef void (*dmu_traverse_cb_t)(objset void dmu_traverse_objset(objset_t *os, uint64_t txg_start, dmu_traverse_cb_t cb, void *arg); -int dmu_sendbackup(objset_t *tosnap, objset_t *fromsnap, boolean_t fromorigin, - struct file *fp, offset_t *off); +int dmu_send(objset_t *tosnap, objset_t *fromsnap, boolean_t fromorigin, + int outfd, struct file *fp, offset_t *off); int dmu_send_estimate(objset_t *tosnap, objset_t *fromsnap, boolean_t fromorigin, uint64_t *sizep); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_impl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_impl.h Thu May 10 10:16:21 2012 (r235221) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_impl.h Thu May 10 10:39:45 2012 (r235222) @@ -21,6 +21,8 @@ /* * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * Copyright (c) 2012, Joyent, Inc. All rights reserved. + * Copyright (c) 2012, Martin Matuska . All rights reserved. */ #ifndef _SYS_DMU_IMPL_H @@ -31,6 +33,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { @@ -265,6 +268,33 @@ static xuio_stats_t xuio_stats = { atomic_add_64(&xuio_stats.stat.value.ui64, (val)) #define XUIOSTAT_BUMP(stat) XUIOSTAT_INCR(stat, 1) +/* + * The list of data whose inclusion in a send stream can be pending from + * one call to backup_cb to another. Multiple calls to dump_free() and + * dump_freeobjects() can be aggregated into a single DRR_FREE or + * DRR_FREEOBJECTS replay record. + */ +typedef enum { + PENDING_NONE, + PENDING_FREE, + PENDING_FREEOBJECTS +} dmu_pendop_t; + +typedef struct dmu_sendarg { + list_node_t dsa_link; + dmu_replay_record_t *dsa_drr; + kthread_t *dsa_td; + struct file *dsa_fp; + int dsa_outfd; + struct proc *dsa_proc; + offset_t *dsa_off; + objset_t *dsa_os; + zio_cksum_t dsa_zc; + uint64_t dsa_toguid; + int dsa_err; + dmu_pendop_t dsa_pending_op; +} dmu_sendarg_t; + #ifdef __cplusplus } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Thu May 10 10:16:21 2012 (r235221) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Thu May 10 10:39:45 2012 (r235222) @@ -23,6 +23,7 @@ * Copyright (c) 2011 Pawel Jakub Dawidek . * All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012, Joyent, Inc. All rights reserved. */ #ifndef _SYS_DSL_DATASET_H @@ -152,6 +153,9 @@ typedef struct dsl_dataset { uint64_t ds_reserved; /* cached refreservation */ uint64_t ds_quota; /* cached refquota */ + kmutex_t ds_sendstream_lock; + list_t ds_sendstreams; + /* Protected by ds_lock; keep at end of struct for better locality */ char ds_snapname[MAXNAMELEN]; } dsl_dataset_t; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Thu May 10 10:16:21 2012 (r235221) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Thu May 10 10:39:45 2012 (r235222) @@ -25,6 +25,7 @@ * Portions Copyright 2011 Martin Matuska * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012, Joyent, Inc. All rights reserved. */ #include @@ -57,6 +58,7 @@ #include #include #include +#include #include #include #include @@ -3933,7 +3935,8 @@ zfs_ioc_send(zfs_cmd_t *zc) } off = fp->f_offset; - error = dmu_sendbackup(tosnap, fromsnap, zc->zc_obj, fp, &off); + error = dmu_send(tosnap, fromsnap, zc->zc_obj, + zc->zc_cookie, fp, &off); if (off >= 0 && off <= MAXOFFSET_T) fp->f_offset = off; @@ -3945,6 +3948,49 @@ zfs_ioc_send(zfs_cmd_t *zc) return (error); } +/* + * inputs: + * zc_name name of snapshot on which to report progress + * zc_cookie file descriptor of send stream + * + * outputs: + * zc_cookie number of bytes written in send stream thus far + */ +static int +zfs_ioc_send_progress(zfs_cmd_t *zc) +{ + dsl_dataset_t *ds; + dmu_sendarg_t *dsp = NULL; + int error; + + if ((error = dsl_dataset_hold(zc->zc_name, FTAG, &ds)) != 0) + return (error); + + mutex_enter(&ds->ds_sendstream_lock); + + /* + * Iterate over all the send streams currently active on this dataset. + * If there's one which matches the specified file descriptor _and_ the + * stream was started by the current process, return the progress of + * that stream. + */ + for (dsp = list_head(&ds->ds_sendstreams); dsp != NULL; + dsp = list_next(&ds->ds_sendstreams, dsp)) { + if (dsp->dsa_outfd == zc->zc_cookie && + dsp->dsa_proc == curproc) + break; + } + + if (dsp != NULL) + zc->zc_cookie = *(dsp->dsa_off); + else + error = ENOENT; + + mutex_exit(&ds->ds_sendstream_lock); + dsl_dataset_rele(ds, FTAG); + return (error); +} + static int zfs_ioc_inject_fault(zfs_cmd_t *zc) { @@ -4946,7 +4992,9 @@ static zfs_ioc_vec_t zfs_ioc_vec[] = { { zfs_ioc_space_written, zfs_secpolicy_read, DATASET_NAME, B_FALSE, B_TRUE }, { zfs_ioc_space_snaps, zfs_secpolicy_read, DATASET_NAME, B_FALSE, - B_TRUE } + B_TRUE }, + { zfs_ioc_send_progress, zfs_secpolicy_read, DATASET_NAME, B_FALSE, + B_FALSE } }; int Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Thu May 10 10:16:21 2012 (r235221) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Thu May 10 10:39:45 2012 (r235222) @@ -23,6 +23,8 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + * Copyright (c) 2012, Joyent, Inc. All rights reserved. + * Copyright (c) 2012, Martin Matuska . All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -794,6 +796,7 @@ typedef unsigned long zfs_ioc_t; #define ZFS_IOC_POOL_REGUID _IOWR('Z', 60, struct zfs_cmd) #define ZFS_IOC_SPACE_WRITTEN _IOWR('Z', 61, struct zfs_cmd) #define ZFS_IOC_SPACE_SNAPS _IOWR('Z', 62, struct zfs_cmd) +#define ZFS_IOC_SEND_PROGRESS _IOWR('Z', 63, struct zfs_cmd) /* * Internal SPA load state. Used by FMA diagnosis engine. From owner-svn-src-head@FreeBSD.ORG Thu May 10 11:06:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DEF2106566B; Thu, 10 May 2012 11:06:20 +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 3809A8FC19; Thu, 10 May 2012 11:06:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4AB6KVr033005; Thu, 10 May 2012 11:06:20 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4AB6KQQ033003; Thu, 10 May 2012 11:06:20 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201205101106.q4AB6KQQ033003@svn.freebsd.org> From: Warner Losh Date: Thu, 10 May 2012 11:06: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: r235224 - 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: Thu, 10 May 2012 11:06:20 -0000 Author: imp Date: Thu May 10 11:06:19 2012 New Revision: 235224 URL: http://svn.freebsd.org/changeset/base/235224 Log: Do a bit of house cleaning and remove the old, obsolete upgrade from 6.0 support and bump the minimum version to 8.0. These versions have not been tested and are believed to be broken. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu May 10 10:56:46 2012 (r235223) +++ head/Makefile.inc1 Thu May 10 11:06:19 2012 (r235224) @@ -223,9 +223,6 @@ CROSSENV= MAKEOBJDIRPREFIX=${OBJTREE} \ MACHINE_ARCH=${TARGET_ARCH} \ MACHINE=${TARGET} \ CPUTYPE=${TARGET_CPUTYPE} -.if ${OSRELDATE} < 700044 -CROSSENV+= AR=gnu-ar RANLIB=gnu-ranlib -.endif .if ${MK_GROFF} != "no" CROSSENV+= GROFF_BIN_PATH=${WORLDTMP}/legacy/usr/bin \ GROFF_FONT_PATH=${WORLDTMP}/legacy/usr/share/groff_font \ @@ -981,8 +978,8 @@ update: # legacy: Build compatibility shims for the next three targets # legacy: -.if ${BOOTSTRAPPING} < 600034 && ${BOOTSTRAPPING} != 0 - @echo "ERROR: Source upgrades from versions prior to 6.0 not supported."; \ +.if ${BOOTSTRAPPING} < 800107 && ${BOOTSTRAPPING} != 0 + @echo "ERROR: Source upgrades from versions prior to 8.0 not supported."; \ false .endif .for _tool in tools/build @@ -1010,14 +1007,6 @@ _gperf= gnu/usr.bin/gperf _groff= gnu/usr.bin/groff .endif -.if ${BOOTSTRAPPING} >= 700044 && ${BOOTSTRAPPING} < 800022 -_ar= usr.bin/ar -.endif - -.if ${BOOTSTRAPPING} < 800013 -_mklocale= usr.bin/mklocale -.endif - .if ${BOOTSTRAPPING} < 900002 _sed= usr.bin/sed .endif @@ -1031,16 +1020,10 @@ _yacc= usr.bin/yacc _awk= usr.bin/awk .endif -.if ${MK_BSNMP} != "no" && \ - (${BOOTSTRAPPING} < 700018 || !exists(/usr/sbin/gensnmptree)) +.if ${MK_BSNMP} != "no" && !exists(/usr/sbin/gensnmptree) _gensnmptree= usr.sbin/bsnmpd/gensnmptree .endif -.if ${MK_RESCUE} != "no" && \ - ${BOOTSTRAPPING} < 700026 -_crunchgen= usr.sbin/crunch/crunchgen -.endif - .if ${MK_CLANG} != "no" _clang_tblgen= \ lib/clang/libllvmsupport \ @@ -1051,9 +1034,7 @@ _clang_tblgen= \ # dtrace tools are required for older bootstrap env and cross-build .if ${MK_CDDL} != "no" && \ - ((${BOOTSTRAPPING} < 800038 && \ - !(${BOOTSTRAPPING} >= 700112 && ${BOOTSTRAPPING} < 799999)) \ - || (${MACHINE} != ${TARGET} || ${MACHINE_ARCH} != ${TARGET_ARCH})) + (${MACHINE} != ${TARGET} || ${MACHINE_ARCH} != ${TARGET_ARCH}) _dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \ lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge .endif @@ -1082,20 +1063,17 @@ bootstrap-tools: ${_strfile} \ ${_gperf} \ ${_groff} \ - ${_ar} \ ${_dtc} \ ${_awk} \ usr.bin/lorder \ usr.bin/makewhatis \ - ${_mklocale} \ usr.bin/rpcgen \ ${_sed} \ ${_lex} \ ${_yacc} \ usr.bin/xinstall \ ${_gensnmptree} \ - usr.sbin/config \ - ${_crunchgen} + usr.sbin/config ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ @@ -1154,7 +1132,7 @@ build-tools: # # cross-tools: Build cross-building tools # -.if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 800035 +.if ${TARGET_ARCH} != ${MACHINE_ARCH} .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" _btxld= usr.sbin/btxld .endif From owner-svn-src-head@FreeBSD.ORG Thu May 10 11:12:39 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73A401065670; Thu, 10 May 2012 11:12:39 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 46B478FC12; Thu, 10 May 2012 11:12:39 +0000 (UTC) Received: from John-Baldwins-MacBook-Air.local (unknown [24.114.252.231]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 9241AB93B; Thu, 10 May 2012 07:12:38 -0400 (EDT) Message-ID: <4FABA2A2.3060200@FreeBSD.org> Date: Thu, 10 May 2012 07:12:34 -0400 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Eitan Adler References: <201205092213.q49MDvuk005057@svn.freebsd.org> In-Reply-To: <201205092213.q49MDvuk005057@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 10 May 2012 07:12:38 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r235209 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 10 May 2012 11:12:39 -0000 On 5/9/12 6:13 PM, Eitan Adler wrote: > Author: eadler > Date: Wed May 9 22:13:56 2012 > New Revision: 235209 > URL: http://svn.freebsd.org/changeset/base/235209 > > Log: > Add a few new tips and update some old ones to more modern commands > > MFC after: 1 week > > Modified: > head/games/fortune/datfiles/freebsd-tips > > Modified: head/games/fortune/datfiles/freebsd-tips > ============================================================================== > --- head/games/fortune/datfiles/freebsd-tips Wed May 9 21:56:10 2012 (r235208) > +++ head/games/fortune/datfiles/freebsd-tips Wed May 9 22:13:56 2012 (r235209) > @@ -73,8 +73,7 @@ If you need to ask a question on the Fre > > contains lots of useful advice to help you get the best results. > % > -If you `set filec' (file completion) in tcsh and write a part of the > -filename, pressing TAB will show you the available choices when there > +pressing TAB will show you the available choices when there > is more than one, or complete the filename if there's only one match. The new version starts off in the middle of a sentence now. I think you need to put some of this back ("If you write part of a filename in tcsh, pressing TAB..."). > @@ -192,13 +188,6 @@ flag is your gateway. > Nice bash prompt: PS1='(\[$(tput md)\]\t <\w>\[$(tput me)\]) $(echo $?) \$ ' > -- Mathieu > % > -Nice tcsh prompts: > - set prompt = '[%B%m%b] %B%~%b%# ' > - set prompt = '%m %# ' > - set prompt = '%n@%m%# ' > - set prompt = '%n@%m:%/%# ' > - set prompt = '%n@%m:%~%# ' > -% Not sure why you removed this? Even if we changed tcsh's default prompt recently this lists multiple possible prompts. > @@ -322,12 +311,12 @@ been replaced with other messages, look > Want colour in your directory listings? Use "ls -G". "ls -F" is also useful, > and they can be combined as "ls -FG". > % > -Want to find a specific port, just type the following under /usr/ports, > +Want to find a specific port, just type the following > or one its subdirectories: > > - "make search name=" > + "make -C /usr/ports search name=" > or > - "make search key=" > + "make -C /usr/ports search key=" > % Eh, I think you should revert this. The make -C thing is more clunky for a newbie (if you want to do multiple searches, then doing one cd is less typing than specifying -C each time). Also, the first sentence about subdirectories is rather broken in the new version. You would need to make it clear that you replace the argument to -C with a subdirectory. I think it's not worth it though to add enough detail to explain it, and that reverting this is probably simpler for a newbie. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Thu May 10 12:37:33 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 458C1106566C; Thu, 10 May 2012 12:37:33 +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 301EA8FC0A; Thu, 10 May 2012 12:37:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4ACbXPv035773; Thu, 10 May 2012 12:37:33 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4ACbWud035770; Thu, 10 May 2012 12:37:32 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201205101237.q4ACbWud035770@svn.freebsd.org> From: Alexander Motin Date: Thu, 10 May 2012 12:37:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235226 - in head/sys: amd64/conf i386/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: Thu, 10 May 2012 12:37:33 -0000 Author: mav Date: Thu May 10 12:37:32 2012 New Revision: 235226 URL: http://svn.freebsd.org/changeset/base/235226 Log: Add `options GEOM_RAID` into i386 and amd64 GENERIC kernels. ataraid(4) previously was present there and having GEOM RAID is convinient. Unlike other classes GEOM RAID can be set up from BIOS before install and users are expecting it to be detected automatically. Modified: head/sys/amd64/conf/GENERIC head/sys/i386/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Thu May 10 11:08:09 2012 (r235225) +++ head/sys/amd64/conf/GENERIC Thu May 10 12:37:32 2012 (r235226) @@ -44,6 +44,7 @@ options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework options GEOM_PART_GPT # GUID Partition Tables. +options GEOM_RAID # Soft RAID functionality. options GEOM_LABEL # Provides labelization options COMPAT_FREEBSD32 # Compatible with i386 binaries options COMPAT_FREEBSD4 # Compatible with FreeBSD4 Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Thu May 10 11:08:09 2012 (r235225) +++ head/sys/i386/conf/GENERIC Thu May 10 12:37:32 2012 (r235226) @@ -46,6 +46,7 @@ options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework options GEOM_PART_GPT # GUID Partition Tables. +options GEOM_RAID # Soft RAID functionality. options GEOM_LABEL # Provides labelization options COMPAT_FREEBSD4 # Compatible with FreeBSD4 options COMPAT_FREEBSD5 # Compatible with FreeBSD5 From owner-svn-src-head@FreeBSD.ORG Thu May 10 12:41:27 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC61E106564A for ; Thu, 10 May 2012 12:41:27 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3F0148FC1A for ; Thu, 10 May 2012 12:41:26 +0000 (UTC) Received: by wgbds11 with SMTP id ds11so402453wgb.1 for ; Thu, 10 May 2012 05:41:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=fbR+L9FWEF8Jc3AVjapngjg2CriCrq3VBhDzX9oTb+c=; b=WF08rRQH9w7ILTM51gIugjUctPDTsqlZAsXlt5Oo/g1vcO1VU2+UwHpIHuASDrta85 NoEXe69vhMxGAODvRNQWBMgXbpkJJYAgWFW/RorO7WDWC6Zmfmo1mAJgW3CyhPCpub1l LQesXYmIEwAnkmlx8TgTVXWwsIHNYw0CbTIOE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=fbR+L9FWEF8Jc3AVjapngjg2CriCrq3VBhDzX9oTb+c=; b=F5z9z5nvfV1QJRoKISo9/w+6/Vl4JjHAktdy+YorZwxccGDg9sqGpWRsNGJLckbNKw LLB9Frx4J24Rf08kdrgI2oRlBBT5rHLRa6f9HydqgmsK5YmUZLDLY8N6QcgBgr+QMz7/ F6TP4vrJ8TAKS3nYl1B7gPeNPQMsKd+l5lKn1hKhRoTzXJh3lorm4Luy7I2m4XUgdyP+ RkrOwEMDQX+fC80Uv9I7i4B19x9mOryiVRs1FfC4XNy43xYkE0GXvUtSxsos/PiUDz6X AfyeTvMqKlvesCOdBE0Sm9X44v+oRoOLUK3dnX3KWeX5biMVB3RGZ/v+CT9Ui+CLiEGl c1+g== Received: by 10.180.84.4 with SMTP id u4mr9256012wiy.2.1336653685796; Thu, 10 May 2012 05:41:25 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.223.120.6 with HTTP; Thu, 10 May 2012 05:40:55 -0700 (PDT) In-Reply-To: <4FABA2A2.3060200@FreeBSD.org> References: <201205092213.q49MDvuk005057@svn.freebsd.org> <4FABA2A2.3060200@FreeBSD.org> From: Eitan Adler Date: Thu, 10 May 2012 08:40:55 -0400 X-Google-Sender-Auth: V-MLeHd1axwVcK-X5Cql5NLKJLk Message-ID: To: John Baldwin Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQl/0bWF+0MGHwAofAWu7w1N9LZFxV1rsnQQW/wjwMLAPQARO0mDuFK14kmaNabt4n1iCYbu Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r235209 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 10 May 2012 12:41:27 -0000 On 10 May 2012 07:12, John Baldwin wrote: > The new version starts off in the middle of a sentence now. =C2=A0I think= you > need to put some of this back ("If you write part of a filename in tcsh, > pressing TAB..."). hm, good point. > Not sure why you removed this? =C2=A0Even if we changed tcsh's default pr= ompt > recently this lists multiple possible prompts. I added an examples file with a lot more content. > Eh, I think you should revert this. =C2=A0The make -C thing is more clunk= y > for a newbie (if you want to do multiple searches, then doing one cd is > less typing than specifying -C each time). =C2=A0Also, the first sentence > about subdirectories is rather broken in the new version. =C2=A0You would > need to make it clear that you replace the argument to -C with a > subdirectory. =C2=A0I think it's not worth it though to add enough detail= to > explain it, and that reverting this is probably simpler for a newbie. Alright. --=20 Eitan Adler Source & Ports committer X11, Bugbusting teams From owner-svn-src-head@FreeBSD.ORG Thu May 10 12:46:13 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2B42106564A; Thu, 10 May 2012 12:46:13 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CD0A8FC18; Thu, 10 May 2012 12:46:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4ACkD6H036060; Thu, 10 May 2012 12:46:13 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4ACkDgf036058; Thu, 10 May 2012 12:46:13 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205101246.q4ACkDgf036058@svn.freebsd.org> From: Eitan Adler Date: Thu, 10 May 2012 12:46:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235227 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 10 May 2012 12:46:13 -0000 Author: eadler Date: Thu May 10 12:46:12 2012 New Revision: 235227 URL: http://svn.freebsd.org/changeset/base/235227 Log: Partial revert of previous commit as some of the changes were not newbie-friendly. Requested by: jhb, gcooper Approved by: cperciva (implicit) MFC after: 3 days X-MFC-With: r235209 Modified: head/games/fortune/datfiles/freebsd-tips Modified: head/games/fortune/datfiles/freebsd-tips ============================================================================== --- head/games/fortune/datfiles/freebsd-tips Thu May 10 12:37:32 2012 (r235226) +++ head/games/fortune/datfiles/freebsd-tips Thu May 10 12:46:12 2012 (r235227) @@ -73,6 +73,7 @@ If you need to ask a question on the Fre contains lots of useful advice to help you get the best results. % +If you write part of a filename in tcsh, pressing TAB will show you the available choices when there is more than one, or complete the filename if there's only one match. % @@ -311,12 +312,12 @@ been replaced with other messages, look Want colour in your directory listings? Use "ls -G". "ls -F" is also useful, and they can be combined as "ls -FG". % -Want to find a specific port, just type the following +Want to find a specific port, just type the following under /usr/ports or one its subdirectories: - "make -C /usr/ports search name=" + "make search name=" or - "make -C /usr/ports search key=" + "make search key=" % Want to know how many words, lines, or bytes are contained in a file? Type "wc filename". @@ -472,5 +473,5 @@ Want to run the same command again? In tcsh you can type "!!" % Want to go the directory you were just in? -In tcsh you can type "cd -" +Type "cd -" % From owner-svn-src-head@FreeBSD.ORG Thu May 10 13:30:42 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0AAD106566B; Thu, 10 May 2012 13:30:42 +0000 (UTC) (envelope-from roberto@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B1228FC15; Thu, 10 May 2012 13:30:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4ADUgdY037390; Thu, 10 May 2012 13:30:42 GMT (envelope-from roberto@svn.freebsd.org) Received: (from roberto@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4ADUg8t037388; Thu, 10 May 2012 13:30:42 GMT (envelope-from roberto@svn.freebsd.org) Message-Id: <201205101330.q4ADUg8t037388@svn.freebsd.org> From: Ollivier Robert Date: Thu, 10 May 2012 13:30: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: r235228 - head/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 10 May 2012 13:30:42 -0000 Author: roberto Date: Thu May 10 13:30:42 2012 New Revision: 235228 URL: http://svn.freebsd.org/changeset/base/235228 Log: Add the IPv6 tag to ftp4.fr.freebsd.org. Modified: head/usr.sbin/bsdinstall/scripts/mirrorselect Modified: head/usr.sbin/bsdinstall/scripts/mirrorselect ============================================================================== --- head/usr.sbin/bsdinstall/scripts/mirrorselect Thu May 10 12:46:12 2012 (r235227) +++ head/usr.sbin/bsdinstall/scripts/mirrorselect Thu May 10 13:30:42 2012 (r235228) @@ -87,7 +87,7 @@ MIRROR=`dialog --backtitle "FreeBSD Inst ftp://ftp.fr.freebsd.org "France"\ ftp://ftp2.fr.freebsd.org "IPv6 France #2"\ ftp://ftp3.fr.freebsd.org "France #3"\ - ftp://ftp4.fr.freebsd.org "France #4"\ + ftp://ftp4.fr.freebsd.org "IPv6 France #4"\ ftp://ftp5.fr.freebsd.org "France #5"\ ftp://ftp6.fr.freebsd.org "France #6"\ ftp://ftp8.fr.freebsd.org "IPv6 France #8"\ From owner-svn-src-head@FreeBSD.ORG Thu May 10 14:27:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 263901065674; Thu, 10 May 2012 14:27:50 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1119F8FC0A; Thu, 10 May 2012 14:27:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4AERnIw039086; Thu, 10 May 2012 14:27:49 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4AERnhn039084; Thu, 10 May 2012 14:27:49 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201205101427.q4AERnhn039084@svn.freebsd.org> From: Fabien Thomas Date: Thu, 10 May 2012 14:27: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: r235229 - head/sys/dev/hwpmc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 10 May 2012 14:27:50 -0000 Author: fabient Date: Thu May 10 14:27:49 2012 New Revision: 235229 URL: http://svn.freebsd.org/changeset/base/235229 Log: Remove out of date KASSERT that fire with soft PMC. MFC after: 1 week Modified: head/sys/dev/hwpmc/hwpmc_intel.c Modified: head/sys/dev/hwpmc/hwpmc_intel.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_intel.c Thu May 10 13:30:42 2012 (r235228) +++ head/sys/dev/hwpmc/hwpmc_intel.c Thu May 10 14:27:49 2012 (r235229) @@ -196,10 +196,6 @@ pmc_intel_initialize(void) case PMC_CPU_INTEL_PIV: error = pmc_p4_initialize(pmc_mdep, ncpus); - - KASSERT(pmc_mdep->pmd_npmc == TSC_NPMCS + P4_NPMCS, - ("[intel,%d] incorrect npmc count %d", __LINE__, - pmc_mdep->pmd_npmc)); break; #endif @@ -214,10 +210,6 @@ pmc_intel_initialize(void) case PMC_CPU_INTEL_PIII: case PMC_CPU_INTEL_PM: error = pmc_p6_initialize(pmc_mdep, ncpus); - - KASSERT(pmc_mdep->pmd_npmc == TSC_NPMCS + P6_NPMCS, - ("[intel,%d] incorrect npmc count %d", __LINE__, - pmc_mdep->pmd_npmc)); break; /* @@ -226,10 +218,6 @@ pmc_intel_initialize(void) case PMC_CPU_INTEL_P5: error = pmc_p5_initialize(pmc_mdep, ncpus); - - KASSERT(pmc_mdep->pmd_npmc == TSC_NPMCS + PENTIUM_NPMCS, - ("[intel,%d] incorrect npmc count %d", __LINE__, - pmc_mdep->pmd_npmc)); break; #endif From owner-svn-src-head@FreeBSD.ORG Thu May 10 15:16:43 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7D6B31065677; Thu, 10 May 2012 15:16:43 +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 5D9CF8FC16; Thu, 10 May 2012 15:16:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4AFGh5J040636; Thu, 10 May 2012 15:16:43 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4AFGhTq040632; Thu, 10 May 2012 15:16:43 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201205101516.q4AFGhTq040632@svn.freebsd.org> From: Alan Cox Date: Thu, 10 May 2012 15:16: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: r235230 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2012 15:16:43 -0000 Author: alc Date: Thu May 10 15:16:42 2012 New Revision: 235230 URL: http://svn.freebsd.org/changeset/base/235230 Log: Give vm_fault()'s sequential access optimization a makeover. There are two aspects to the sequential access optimization: (1) read ahead of pages that are expected to be accessed in the near future and (2) unmap and cache behind of pages that are not expected to be accessed again. This revision changes both aspects. The read ahead optimization is now more effective. It starts with the same initial read window as before, but arithmetically grows the window on sequential page faults. This can yield increased read bandwidth. For example, on one of my machines, a program using mmap() to read a file that is several times larger than the machine's physical memory takes about 17% less time to complete. The unmap and cache behind optimization is now more selectively applied. The read ahead window must grow to its maximum size before unmap and cache behind is performed. This significantly reduces the number of times that pages are unmapped and cached only to be reactivated a short time later. The unmap and cache behind optimization now clears each page's referenced flag. Previously, in the case of dirty pages, if the containing file was still mapped at the time that the page daemon examined the dirty pages, they would be reactivated. From a stylistic standpoint, this revision also cleanly separates the implementation of the read ahead and unmap/cache behind optimizations. Glanced at: kib MFC after: 2 weeks Modified: head/sys/vm/vm_fault.c head/sys/vm/vm_map.c head/sys/vm/vm_map.h Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Thu May 10 14:27:49 2012 (r235229) +++ head/sys/vm/vm_fault.c Thu May 10 15:16:42 2012 (r235230) @@ -118,9 +118,11 @@ static int prefault_pageorder[] = { static int vm_fault_additional_pages(vm_page_t, int, int, vm_page_t *, int *); static void vm_fault_prefault(pmap_t, vm_offset_t, vm_map_entry_t); -#define VM_FAULT_READ_AHEAD 8 -#define VM_FAULT_READ_BEHIND 7 -#define VM_FAULT_READ (VM_FAULT_READ_AHEAD+VM_FAULT_READ_BEHIND+1) +#define VM_FAULT_READ_BEHIND 8 +#define VM_FAULT_READ_MAX (1 + VM_FAULT_READ_AHEAD_MAX) +#define VM_FAULT_NINCR (VM_FAULT_READ_MAX / VM_FAULT_READ_BEHIND) +#define VM_FAULT_SUM (VM_FAULT_NINCR * (VM_FAULT_NINCR + 1) / 2) +#define VM_FAULT_CACHE_BEHIND (VM_FAULT_READ_BEHIND * VM_FAULT_SUM) struct faultstate { vm_page_t m; @@ -136,6 +138,8 @@ struct faultstate { int vfslocked; }; +static void vm_fault_cache_behind(const struct faultstate *fs, int distance); + static inline void release_page(struct faultstate *fs) { @@ -236,13 +240,13 @@ vm_fault_hold(vm_map_t map, vm_offset_t int fault_flags, vm_page_t *m_hold) { vm_prot_t prot; - int is_first_object_locked, result; - boolean_t growstack, wired; + long ahead, behind; + int alloc_req, era, faultcount, nera, reqpage, result; + boolean_t growstack, is_first_object_locked, wired; int map_generation; vm_object_t next_object; - vm_page_t marray[VM_FAULT_READ], mt, mt_prev; + vm_page_t marray[VM_FAULT_READ_MAX]; int hardfault; - int faultcount, ahead, behind, alloc_req; struct faultstate fs; struct vnode *vp; int locked, error; @@ -252,7 +256,7 @@ vm_fault_hold(vm_map_t map, vm_offset_t PCPU_INC(cnt.v_vm_faults); fs.vp = NULL; fs.vfslocked = 0; - faultcount = behind = 0; + faultcount = reqpage = 0; RetryFault:; @@ -460,75 +464,47 @@ readrest: */ if (TRYPAGER) { int rv; - int reqpage = 0; u_char behavior = vm_map_entry_behavior(fs.entry); if (behavior == MAP_ENTRY_BEHAV_RANDOM || P_KILLED(curproc)) { + behind = 0; ahead = 0; + } else if (behavior == MAP_ENTRY_BEHAV_SEQUENTIAL) { behind = 0; + ahead = atop(fs.entry->end - vaddr) - 1; + if (ahead > VM_FAULT_READ_AHEAD_MAX) + ahead = VM_FAULT_READ_AHEAD_MAX; + if (fs.pindex == fs.entry->next_read) + vm_fault_cache_behind(&fs, + VM_FAULT_READ_MAX); } else { - behind = (vaddr - fs.entry->start) >> PAGE_SHIFT; - if (behind > VM_FAULT_READ_BEHIND) - behind = VM_FAULT_READ_BEHIND; - - ahead = ((fs.entry->end - vaddr) >> PAGE_SHIFT) - 1; - if (ahead > VM_FAULT_READ_AHEAD) - ahead = VM_FAULT_READ_AHEAD; - } - is_first_object_locked = FALSE; - if ((behavior == MAP_ENTRY_BEHAV_SEQUENTIAL || - (behavior != MAP_ENTRY_BEHAV_RANDOM && - fs.pindex >= fs.entry->lastr && - fs.pindex < fs.entry->lastr + VM_FAULT_READ)) && - (fs.first_object == fs.object || - (is_first_object_locked = VM_OBJECT_TRYLOCK(fs.first_object))) && - fs.first_object->type != OBJT_DEVICE && - fs.first_object->type != OBJT_PHYS && - fs.first_object->type != OBJT_SG) { - vm_pindex_t firstpindex; - - if (fs.first_pindex < 2 * VM_FAULT_READ) - firstpindex = 0; - else - firstpindex = fs.first_pindex - 2 * VM_FAULT_READ; - mt = fs.first_object != fs.object ? - fs.first_m : fs.m; - KASSERT(mt != NULL, ("vm_fault: missing mt")); - KASSERT((mt->oflags & VPO_BUSY) != 0, - ("vm_fault: mt %p not busy", mt)); - mt_prev = vm_page_prev(mt); - /* - * note: partially valid pages cannot be - * included in the lookahead - NFS piecemeal - * writes will barf on it badly. + * If this is a sequential page fault, then + * arithmetically increase the number of pages + * in the read-ahead window. Otherwise, reset + * the read-ahead window to its smallest size. */ - while ((mt = mt_prev) != NULL && - mt->pindex >= firstpindex && - mt->valid == VM_PAGE_BITS_ALL) { - mt_prev = vm_page_prev(mt); - if (mt->busy || - (mt->oflags & VPO_BUSY)) - continue; - vm_page_lock(mt); - if (mt->hold_count || - mt->wire_count) { - vm_page_unlock(mt); - continue; - } - pmap_remove_all(mt); - if (mt->dirty != 0) - vm_page_deactivate(mt); - else - vm_page_cache(mt); - vm_page_unlock(mt); - } - ahead += behind; - behind = 0; + behind = atop(vaddr - fs.entry->start); + if (behind > VM_FAULT_READ_BEHIND) + behind = VM_FAULT_READ_BEHIND; + ahead = atop(fs.entry->end - vaddr) - 1; + era = fs.entry->read_ahead; + if (fs.pindex == fs.entry->next_read) { + nera = era + behind; + if (nera > VM_FAULT_READ_AHEAD_MAX) + nera = VM_FAULT_READ_AHEAD_MAX; + behind = 0; + if (ahead > nera) + ahead = nera; + if (era == VM_FAULT_READ_AHEAD_MAX) + vm_fault_cache_behind(&fs, + VM_FAULT_CACHE_BEHIND); + } else if (ahead > VM_FAULT_READ_AHEAD_MIN) + ahead = VM_FAULT_READ_AHEAD_MIN; + if (era != ahead) + fs.entry->read_ahead = ahead; } - if (is_first_object_locked) - VM_OBJECT_UNLOCK(fs.first_object); /* * Call the pager to retrieve the data, if any, after @@ -899,7 +875,7 @@ vnode_locked: * without holding a write lock on it. */ if (hardfault) - fs.entry->lastr = fs.pindex + faultcount - behind; + fs.entry->next_read = fs.pindex + faultcount - reqpage; if ((prot & VM_PROT_WRITE) != 0 || (fault_flags & VM_FAULT_DIRTY) != 0) { @@ -992,6 +968,60 @@ vnode_locked: } /* + * Speed up the reclamation of up to "distance" pages that precede the + * faulting pindex within the first object of the shadow chain. + */ +static void +vm_fault_cache_behind(const struct faultstate *fs, int distance) +{ + vm_object_t first_object, object; + vm_page_t m, m_prev; + vm_pindex_t pindex; + + object = fs->object; + VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); + first_object = fs->first_object; + if (first_object != object) { + if (!VM_OBJECT_TRYLOCK(first_object)) { + VM_OBJECT_UNLOCK(object); + VM_OBJECT_LOCK(first_object); + VM_OBJECT_LOCK(object); + } + } + if (first_object->type != OBJT_DEVICE && + first_object->type != OBJT_PHYS && first_object->type != OBJT_SG) { + if (fs->first_pindex < distance) + pindex = 0; + else + pindex = fs->first_pindex - distance; + if (pindex < OFF_TO_IDX(fs->entry->offset)) + pindex = OFF_TO_IDX(fs->entry->offset); + m = first_object != object ? fs->first_m : fs->m; + KASSERT((m->oflags & VPO_BUSY) != 0, + ("vm_fault_cache_behind: page %p is not busy", m)); + m_prev = vm_page_prev(m); + while ((m = m_prev) != NULL && m->pindex >= pindex && + m->valid == VM_PAGE_BITS_ALL) { + m_prev = vm_page_prev(m); + if (m->busy != 0 || (m->oflags & VPO_BUSY) != 0) + continue; + vm_page_lock(m); + if (m->hold_count == 0 && m->wire_count == 0) { + pmap_remove_all(m); + vm_page_aflag_clear(m, PGA_REFERENCED); + if (m->dirty != 0) + vm_page_deactivate(m); + else + vm_page_cache(m); + } + vm_page_unlock(m); + } + } + if (first_object != object) + VM_OBJECT_UNLOCK(first_object); +} + +/* * vm_fault_prefault provides a quick way of clustering * pagefaults into a processes address space. It is a "cousin" * of vm_map_pmap_enter, except it runs at page fault time instead Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Thu May 10 14:27:49 2012 (r235229) +++ head/sys/vm/vm_map.c Thu May 10 15:16:42 2012 (r235230) @@ -1300,6 +1300,8 @@ charged: new_entry->protection = prot; new_entry->max_protection = max; new_entry->wired_count = 0; + new_entry->read_ahead = VM_FAULT_READ_AHEAD_INIT; + new_entry->next_read = OFF_TO_IDX(offset); KASSERT(cred == NULL || !ENTRY_CHARGED(new_entry), ("OVERCOMMIT: vm_map_insert leaks vm_map %p", new_entry)); Modified: head/sys/vm/vm_map.h ============================================================================== --- head/sys/vm/vm_map.h Thu May 10 14:27:49 2012 (r235229) +++ head/sys/vm/vm_map.h Thu May 10 15:16:42 2012 (r235230) @@ -112,8 +112,9 @@ struct vm_map_entry { vm_prot_t protection; /* protection code */ vm_prot_t max_protection; /* maximum protection */ vm_inherit_t inheritance; /* inheritance */ + uint8_t read_ahead; /* pages in the read-ahead window */ int wired_count; /* can be paged if = 0 */ - vm_pindex_t lastr; /* last read */ + vm_pindex_t next_read; /* index of the next sequential read */ struct ucred *cred; /* tmp storage for creator ref */ }; @@ -330,6 +331,14 @@ long vmspace_wired_count(struct vmspace #define VM_FAULT_DIRTY 2 /* Dirty the page; use w/VM_PROT_COPY */ /* + * Initially, mappings are slightly sequential. The maximum window size must + * account for the map entry's "read_ahead" field being defined as an uint8_t. + */ +#define VM_FAULT_READ_AHEAD_MIN 7 +#define VM_FAULT_READ_AHEAD_INIT 15 +#define VM_FAULT_READ_AHEAD_MAX min(atop(MAXPHYS) - 1, UINT8_MAX) + +/* * The following "find_space" options are supported by vm_map_find() */ #define VMFS_NO_SPACE 0 /* don't find; use the given range */ From owner-svn-src-head@FreeBSD.ORG Thu May 10 15:17:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2FD1B1065687; Thu, 10 May 2012 15:17:22 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B6748FC0A; Thu, 10 May 2012 15:17:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4AFHL5a040694; Thu, 10 May 2012 15:17:21 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4AFHLAl040691; Thu, 10 May 2012 15:17:21 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201205101517.q4AFHLAl040691@svn.freebsd.org> From: Marius Strobl Date: Thu, 10 May 2012 15:17: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: r235231 - in head/sys/sparc64: include sparc64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 10 May 2012 15:17:22 -0000 Author: marius Date: Thu May 10 15:17:21 2012 New Revision: 235231 URL: http://svn.freebsd.org/changeset/base/235231 Log: Merge r234989 from x86: Revert part of r234723 by re-enabling the SMP protection for intr_bind(). Modified: head/sys/sparc64/include/intr_machdep.h head/sys/sparc64/sparc64/intr_machdep.c Modified: head/sys/sparc64/include/intr_machdep.h ============================================================================== --- head/sys/sparc64/include/intr_machdep.h Thu May 10 15:16:42 2012 (r235230) +++ head/sys/sparc64/include/intr_machdep.h Thu May 10 15:17:21 2012 (r235231) @@ -91,8 +91,10 @@ struct intr_vector { extern ih_func_t *intr_handlers[]; extern struct intr_vector intr_vectors[]; +#ifdef SMP void intr_add_cpu(u_int cpu); int intr_bind(int vec, u_char cpu); +#endif int intr_describe(int vec, void *ih, const char *descr); void intr_setup(int level, ih_func_t *ihf, int pri, iv_func_t *ivf, void *iva); Modified: head/sys/sparc64/sparc64/intr_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/intr_machdep.c Thu May 10 15:16:42 2012 (r235230) +++ head/sys/sparc64/sparc64/intr_machdep.c Thu May 10 15:17:21 2012 (r235231) @@ -555,15 +555,6 @@ intr_shuffle_irqs(void *arg __unused) SYSINIT(intr_shuffle_irqs, SI_SUB_SMP, SI_ORDER_SECOND, intr_shuffle_irqs, NULL); #else /* !SMP */ - -/* Return EOPNOTSUPP in the UP case. */ -int -intr_bind(int vec __unused, u_char cpu __unused) -{ - - return (EOPNOTSUPP); -} - /* Use an empty stub for compatibility. */ void intr_add_cpu(u_int cpu __unused) From owner-svn-src-head@FreeBSD.ORG Thu May 10 15:23:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF649106564A; Thu, 10 May 2012 15:23:20 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C86778FC0C; Thu, 10 May 2012 15:23:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4AFNKmV040928; Thu, 10 May 2012 15:23:20 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4AFNKa2040926; Thu, 10 May 2012 15:23:20 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201205101523.q4AFNKa2040926@svn.freebsd.org> From: Marius Strobl Date: Thu, 10 May 2012 15:23:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235232 - head/sys/sparc64/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, 10 May 2012 15:23:21 -0000 Author: marius Date: Thu May 10 15:23:20 2012 New Revision: 235232 URL: http://svn.freebsd.org/changeset/base/235232 Log: Fix mismerge in r235231. Modified: head/sys/sparc64/include/intr_machdep.h Modified: head/sys/sparc64/include/intr_machdep.h ============================================================================== --- head/sys/sparc64/include/intr_machdep.h Thu May 10 15:17:21 2012 (r235231) +++ head/sys/sparc64/include/intr_machdep.h Thu May 10 15:23:20 2012 (r235232) @@ -91,8 +91,8 @@ struct intr_vector { extern ih_func_t *intr_handlers[]; extern struct intr_vector intr_vectors[]; -#ifdef SMP void intr_add_cpu(u_int cpu); +#ifdef SMP int intr_bind(int vec, u_char cpu); #endif int intr_describe(int vec, void *ih, const char *descr); From owner-svn-src-head@FreeBSD.ORG Thu May 10 17:41:16 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFA45106564A; Thu, 10 May 2012 17:41:16 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C98D28FC08; Thu, 10 May 2012 17:41:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4AHfGp5045041; Thu, 10 May 2012 17:41:16 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4AHfGvG045036; Thu, 10 May 2012 17:41:16 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201205101741.q4AHfGvG045036@svn.freebsd.org> From: Bernhard Schmidt Date: Thu, 10 May 2012 17:41:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235233 - in head/sys: conf dev/ral modules/ral X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 10 May 2012 17:41:17 -0000 Author: bschmidt Date: Thu May 10 17:41:16 2012 New Revision: 235233 URL: http://svn.freebsd.org/changeset/base/235233 Log: Add support for Ralink RT2800/RT3000 chipsets. Thanks to ray@, Sevan and Sergey Dyatko for feedback and testing! Obtained from: OpenBSD MFC after: 3 weeks Added: head/sys/dev/ral/rt2860.c (contents, props changed) head/sys/dev/ral/rt2860reg.h (contents, props changed) head/sys/dev/ral/rt2860var.h (contents, props changed) Modified: head/sys/conf/files head/sys/dev/ral/if_ral_pci.c head/sys/modules/ral/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu May 10 15:23:20 2012 (r235232) +++ head/sys/conf/files Thu May 10 17:41:16 2012 (r235233) @@ -1759,6 +1759,7 @@ dev/puc/pucdata.c optional puc pci dev/quicc/quicc_core.c optional quicc dev/ral/rt2560.c optional ral dev/ral/rt2661.c optional ral +dev/ral/rt2860.c optional ral dev/ral/if_ral_pci.c optional ral pci rt2561fw.c optional rt2561fw | ralfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rt2561.fw:rt2561fw -mrt2561 -c${.TARGET}" \ Modified: head/sys/dev/ral/if_ral_pci.c ============================================================================== --- head/sys/dev/ral/if_ral_pci.c Thu May 10 15:23:20 2012 (r235232) +++ head/sys/dev/ral/if_ral_pci.c Thu May 10 17:41:16 2012 (r235233) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include MODULE_DEPEND(ral, pci, 1, 1, 1); MODULE_DEPEND(ral, firmware, 1, 1, 1); @@ -70,11 +71,37 @@ struct ral_pci_ident { }; static const struct ral_pci_ident ral_pci_ids[] = { + { 0x1432, 0x7708, "Edimax RT2860" }, + { 0x1432, 0x7711, "Edimax RT3591" }, + { 0x1432, 0x7722, "Edimax RT3591" }, + { 0x1432, 0x7727, "Edimax RT2860" }, + { 0x1432, 0x7728, "Edimax RT2860" }, + { 0x1432, 0x7738, "Edimax RT2860" }, + { 0x1432, 0x7748, "Edimax RT2860" }, + { 0x1432, 0x7758, "Edimax RT2860" }, + { 0x1432, 0x7768, "Edimax RT2860" }, + { 0x1462, 0x891a, "MSI RT3090" }, { 0x1814, 0x0201, "Ralink Technology RT2560" }, { 0x1814, 0x0301, "Ralink Technology RT2561S" }, { 0x1814, 0x0302, "Ralink Technology RT2561" }, { 0x1814, 0x0401, "Ralink Technology RT2661" }, - + { 0x1814, 0x0601, "Ralink Technology RT2860" }, + { 0x1814, 0x0681, "Ralink Technology RT2890" }, + { 0x1814, 0x0701, "Ralink Technology RT2760" }, + { 0x1814, 0x0781, "Ralink Technology RT2790" }, + { 0x1814, 0x3060, "Ralink Technology RT3060" }, + { 0x1814, 0x3062, "Ralink Technology RT3062" }, + { 0x1814, 0x3090, "Ralink Technology RT3090" }, + { 0x1814, 0x3091, "Ralink Technology RT3091" }, + { 0x1814, 0x3092, "Ralink Technology RT3092" }, + { 0x1814, 0x3390, "Ralink Technology RT3390" }, + { 0x1814, 0x3562, "Ralink Technology RT3562" }, + { 0x1814, 0x3592, "Ralink Technology RT3592" }, + { 0x1814, 0x3593, "Ralink Technology RT3593" }, + { 0x1814, 0x5390, "Ralink Technology RT5390" }, + { 0x1814, 0x539a, "Ralink Technology RT5390" }, + { 0x1814, 0x539f, "Ralink Technology RT5390" }, + { 0x1a3b, 0x1059, "AWT RT2890" }, { 0, 0, NULL } }; @@ -101,12 +128,20 @@ static struct ral_opns { rt2661_suspend, rt2661_resume, rt2661_intr +}, ral_rt2860_opns = { + rt2860_attach, + rt2860_detach, + rt2860_shutdown, + rt2860_suspend, + rt2860_resume, + rt2860_intr }; struct ral_pci_softc { union { struct rt2560_softc sc_rt2560; struct rt2661_softc sc_rt2661; + struct rt2860_softc sc_rt2860; } u; struct ral_opns *sc_opns; @@ -180,8 +215,19 @@ ral_pci_attach(device_t dev) /* enable bus-mastering */ pci_enable_busmaster(dev); - psc->sc_opns = (pci_get_device(dev) == 0x0201) ? &ral_rt2560_opns : - &ral_rt2661_opns; + switch (pci_get_device(dev)) { + case 0x0201: + psc->sc_opns = &ral_rt2560_opns; + break; + case 0x0301: + case 0x0302: + case 0x0401: + psc->sc_opns = &ral_rt2661_opns; + break; + default: + psc->sc_opns = &ral_rt2860_opns; + break; + } psc->mem_rid = RAL_PCI_BAR0; psc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &psc->mem_rid, Added: head/sys/dev/ral/rt2860.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ral/rt2860.c Thu May 10 17:41:16 2012 (r235233) @@ -0,0 +1,4103 @@ +/*- + * Copyright (c) 2007-2010 Damien Bergamini + * Copyright (c) 2012 Bernhard Schmidt + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $OpenBSD: rt2860.c,v 1.65 2010/10/23 14:24:54 damien Exp $ + */ + +#include +__FBSDID("$FreeBSD$"); + +/*- + * Ralink Technology RT2860/RT3090/RT3390/RT3562 chipset driver + * http://www.ralinktech.com/ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +#define RAL_DEBUG +#ifdef RAL_DEBUG +#define DPRINTF(x) do { if (sc->sc_debug > 0) printf x; } while (0) +#define DPRINTFN(n, x) do { if (sc->sc_debug >= (n)) printf x; } while (0) +#else +#define DPRINTF(x) +#define DPRINTFN(n, x) +#endif + +static struct ieee80211vap *rt2860_vap_create(struct ieee80211com *, + const char [IFNAMSIZ], int, enum ieee80211_opmode, + int, const uint8_t [IEEE80211_ADDR_LEN], + const uint8_t [IEEE80211_ADDR_LEN]); +static void rt2860_vap_delete(struct ieee80211vap *); +static void rt2860_dma_map_addr(void *, bus_dma_segment_t *, int, int); +static int rt2860_alloc_tx_ring(struct rt2860_softc *, + struct rt2860_tx_ring *); +static void rt2860_reset_tx_ring(struct rt2860_softc *, + struct rt2860_tx_ring *); +static void rt2860_free_tx_ring(struct rt2860_softc *, + struct rt2860_tx_ring *); +static int rt2860_alloc_tx_pool(struct rt2860_softc *); +static void rt2860_free_tx_pool(struct rt2860_softc *); +static int rt2860_alloc_rx_ring(struct rt2860_softc *, + struct rt2860_rx_ring *); +static void rt2860_reset_rx_ring(struct rt2860_softc *, + struct rt2860_rx_ring *); +static void rt2860_free_rx_ring(struct rt2860_softc *, + struct rt2860_rx_ring *); +static void rt2860_updatestats(struct rt2860_softc *); +static void rt2860_newassoc(struct ieee80211_node *, int); +static void rt2860_node_free(struct ieee80211_node *); +#ifdef IEEE80211_HT +static int rt2860_ampdu_rx_start(struct ieee80211com *, + struct ieee80211_node *, uint8_t); +static void rt2860_ampdu_rx_stop(struct ieee80211com *, + struct ieee80211_node *, uint8_t); +#endif +static int rt2860_newstate(struct ieee80211vap *, enum ieee80211_state, + int); +static uint16_t rt3090_efuse_read_2(struct rt2860_softc *, uint16_t); +static uint16_t rt2860_eeprom_read_2(struct rt2860_softc *, uint16_t); +static void rt2860_intr_coherent(struct rt2860_softc *); +static void rt2860_drain_stats_fifo(struct rt2860_softc *); +static void rt2860_tx_intr(struct rt2860_softc *, int); +static void rt2860_rx_intr(struct rt2860_softc *); +static void rt2860_tbtt_intr(struct rt2860_softc *); +static void rt2860_gp_intr(struct rt2860_softc *); +static int rt2860_tx(struct rt2860_softc *, struct mbuf *, + struct ieee80211_node *); +static int rt2860_raw_xmit(struct ieee80211_node *, struct mbuf *, + const struct ieee80211_bpf_params *); +static int rt2860_tx_raw(struct rt2860_softc *, struct mbuf *, + struct ieee80211_node *, + const struct ieee80211_bpf_params *params); +static void rt2860_start(struct ifnet *); +static void rt2860_start_locked(struct ifnet *); +static void rt2860_watchdog(void *); +static int rt2860_ioctl(struct ifnet *, u_long, caddr_t); +static void rt2860_mcu_bbp_write(struct rt2860_softc *, uint8_t, uint8_t); +static uint8_t rt2860_mcu_bbp_read(struct rt2860_softc *, uint8_t); +static void rt2860_rf_write(struct rt2860_softc *, uint8_t, uint32_t); +static uint8_t rt3090_rf_read(struct rt2860_softc *, uint8_t); +static void rt3090_rf_write(struct rt2860_softc *, uint8_t, uint8_t); +static int rt2860_mcu_cmd(struct rt2860_softc *, uint8_t, uint16_t, int); +static void rt2860_enable_mrr(struct rt2860_softc *); +static void rt2860_set_txpreamble(struct rt2860_softc *); +static void rt2860_set_basicrates(struct rt2860_softc *, + const struct ieee80211_rateset *); +static void rt2860_scan_start(struct ieee80211com *); +static void rt2860_scan_end(struct ieee80211com *); +static void rt2860_set_channel(struct ieee80211com *); +static void rt2860_select_chan_group(struct rt2860_softc *, int); +static void rt2860_set_chan(struct rt2860_softc *, u_int); +static void rt3090_set_chan(struct rt2860_softc *, u_int); +static int rt3090_rf_init(struct rt2860_softc *); +static void rt3090_rf_wakeup(struct rt2860_softc *); +static int rt3090_filter_calib(struct rt2860_softc *, uint8_t, uint8_t, + uint8_t *); +static void rt3090_rf_setup(struct rt2860_softc *); +static void rt2860_set_leds(struct rt2860_softc *, uint16_t); +static void rt2860_set_gp_timer(struct rt2860_softc *, int); +static void rt2860_set_bssid(struct rt2860_softc *, const uint8_t *); +static void rt2860_set_macaddr(struct rt2860_softc *, const uint8_t *); +static void rt2860_update_promisc(struct ifnet *); +static void rt2860_updateslot(struct ifnet *); +static void rt2860_updateprot(struct ifnet *); +static int rt2860_updateedca(struct ieee80211com *); +#ifdef HW_CRYPTO +static int rt2860_set_key(struct ieee80211com *, struct ieee80211_node *, + struct ieee80211_key *); +static void rt2860_delete_key(struct ieee80211com *, + struct ieee80211_node *, struct ieee80211_key *); +#endif +static int8_t rt2860_rssi2dbm(struct rt2860_softc *, uint8_t, uint8_t); +static const char *rt2860_get_rf(uint8_t); +static int rt2860_read_eeprom(struct rt2860_softc *, + uint8_t macaddr[IEEE80211_ADDR_LEN]); +static int rt2860_bbp_init(struct rt2860_softc *); +static int rt2860_txrx_enable(struct rt2860_softc *); +static void rt2860_init(void *); +static void rt2860_init_locked(struct rt2860_softc *); +static void rt2860_stop(void *); +static void rt2860_stop_locked(struct rt2860_softc *); +static int rt2860_load_microcode(struct rt2860_softc *); +#ifdef NOT_YET +static void rt2860_calib(struct rt2860_softc *); +#endif +static void rt3090_set_rx_antenna(struct rt2860_softc *, int); +static void rt2860_switch_chan(struct rt2860_softc *, + struct ieee80211_channel *); +static int rt2860_setup_beacon(struct rt2860_softc *, + struct ieee80211vap *); +static void rt2860_enable_tsf_sync(struct rt2860_softc *); + +static const struct { + uint32_t reg; + uint32_t val; +} rt2860_def_mac[] = { + RT2860_DEF_MAC +}; + +static const struct { + uint8_t reg; + uint8_t val; +} rt2860_def_bbp[] = { + RT2860_DEF_BBP +}; + +static const struct rfprog { + uint8_t chan; + uint32_t r1, r2, r3, r4; +} rt2860_rf2850[] = { + RT2860_RF2850 +}; + +struct { + uint8_t n, r, k; +} rt3090_freqs[] = { + RT3070_RF3052 +}; + +static const struct { + uint8_t reg; + uint8_t val; +} rt3090_def_rf[] = { + RT3070_DEF_RF +}; + +int +rt2860_attach(device_t dev, int id) +{ + struct rt2860_softc *sc = device_get_softc(dev); + struct ieee80211com *ic; + struct ifnet *ifp; + uint32_t tmp; + int error, ntries, qid; + uint8_t bands; + uint8_t macaddr[IEEE80211_ADDR_LEN]; + + sc->sc_dev = dev; + sc->sc_debug = 0; + + ifp = sc->sc_ifp = if_alloc(IFT_IEEE80211); + if (ifp == NULL) { + device_printf(sc->sc_dev, "can not if_alloc()\n"); + return ENOMEM; + } + ic = ifp->if_l2com; + + mtx_init(&sc->sc_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, + MTX_DEF | MTX_RECURSE); + + callout_init_mtx(&sc->watchdog_ch, &sc->sc_mtx, 0); + + /* wait for NIC to initialize */ + for (ntries = 0; ntries < 100; ntries++) { + tmp = RAL_READ(sc, RT2860_ASIC_VER_ID); + if (tmp != 0 && tmp != 0xffffffff) + break; + DELAY(10); + } + if (ntries == 100) { + device_printf(sc->sc_dev, + "timeout waiting for NIC to initialize\n"); + error = EIO; + goto fail1; + } + sc->mac_ver = tmp >> 16; + sc->mac_rev = tmp & 0xffff; + + if (sc->mac_ver != 0x2860 && + (id == 0x0681 || id == 0x0781 || id == 0x1059)) + sc->sc_flags |= RT2860_ADVANCED_PS; + + /* retrieve RF rev. no and various other things from EEPROM */ + rt2860_read_eeprom(sc, macaddr); + if (bootverbose) { + device_printf(sc->sc_dev, "MAC/BBP RT%X (rev 0x%04X), " + "RF %s (MIMO %dT%dR), address %6D\n", + sc->mac_ver, sc->mac_rev, rt2860_get_rf(sc->rf_rev), + sc->ntxchains, sc->nrxchains, macaddr, ":"); + } + + /* + * Allocate Tx (4 EDCAs + HCCA + Mgt) and Rx rings. + */ + for (qid = 0; qid < 6; qid++) { + if ((error = rt2860_alloc_tx_ring(sc, &sc->txq[qid])) != 0) { + device_printf(sc->sc_dev, + "could not allocate Tx ring %d\n", qid); + goto fail2; + } + } + + if ((error = rt2860_alloc_rx_ring(sc, &sc->rxq)) != 0) { + device_printf(sc->sc_dev, "could not allocate Rx ring\n"); + goto fail2; + } + + if ((error = rt2860_alloc_tx_pool(sc)) != 0) { + device_printf(sc->sc_dev, "could not allocate Tx pool\n"); + goto fail3; + } + + /* mgmt ring is broken on RT2860C, use EDCA AC VO ring instead */ + sc->mgtqid = (sc->mac_ver == 0x2860 && sc->mac_rev == 0x0100) ? + WME_AC_VO : 5; + + ifp->if_softc = sc; + if_initname(ifp, device_get_name(dev), device_get_unit(dev)); + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_init = rt2860_init; + ifp->if_ioctl = rt2860_ioctl; + ifp->if_start = rt2860_start; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; + IFQ_SET_READY(&ifp->if_snd); + + ic->ic_ifp = ifp; + ic->ic_opmode = IEEE80211_M_STA; + ic->ic_phytype = IEEE80211_T_OFDM; /* not only, but not used */ + + /* set device capabilities */ + ic->ic_caps = + IEEE80211_C_STA /* station mode */ + | IEEE80211_C_IBSS /* ibss, nee adhoc, mode */ + | IEEE80211_C_HOSTAP /* hostap mode */ + | IEEE80211_C_MONITOR /* monitor mode */ + | IEEE80211_C_AHDEMO /* adhoc demo mode */ + | IEEE80211_C_WDS /* 4-address traffic works */ + | IEEE80211_C_MBSS /* mesh point link mode */ + | IEEE80211_C_SHPREAMBLE /* short preamble supported */ + | IEEE80211_C_SHSLOT /* short slot time supported */ + | IEEE80211_C_WPA /* capable of WPA1+WPA2 */ +#if 0 + | IEEE80211_C_BGSCAN /* capable of bg scanning */ +#endif + | IEEE80211_C_WME /* 802.11e */ + ; + + bands = 0; + setbit(&bands, IEEE80211_MODE_11B); + setbit(&bands, IEEE80211_MODE_11G); + if (sc->rf_rev == RT2860_RF_2750 || sc->rf_rev == RT2860_RF_2850) + setbit(&bands, IEEE80211_MODE_11A); + ieee80211_init_channels(ic, NULL, &bands); + + ieee80211_ifattach(ic, macaddr); + + ic->ic_wme.wme_update = rt2860_updateedca; + ic->ic_scan_start = rt2860_scan_start; + ic->ic_scan_end = rt2860_scan_end; + ic->ic_set_channel = rt2860_set_channel; + ic->ic_updateslot = rt2860_updateslot; + ic->ic_update_promisc = rt2860_update_promisc; + ic->ic_raw_xmit = rt2860_raw_xmit; + sc->sc_node_free = ic->ic_node_free; + ic->ic_node_free = rt2860_node_free; + ic->ic_newassoc = rt2860_newassoc; + + ic->ic_vap_create = rt2860_vap_create; + ic->ic_vap_delete = rt2860_vap_delete; + + ieee80211_radiotap_attach(ic, + &sc->sc_txtap.wt_ihdr, sizeof(sc->sc_txtap), + RT2860_TX_RADIOTAP_PRESENT, + &sc->sc_rxtap.wr_ihdr, sizeof(sc->sc_rxtap), + RT2860_RX_RADIOTAP_PRESENT); + +#ifdef RAL_DEBUG + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + "debug", CTLFLAG_RW, &sc->sc_debug, 0, "debug msgs"); +#endif + if (bootverbose) + ieee80211_announce(ic); + + return 0; + +fail3: rt2860_free_rx_ring(sc, &sc->rxq); +fail2: while (--qid >= 0) + rt2860_free_tx_ring(sc, &sc->txq[qid]); +fail1: mtx_destroy(&sc->sc_mtx); + if_free(ifp); + return error; +} + +int +rt2860_detach(void *xsc) +{ + struct rt2860_softc *sc = xsc; + struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; + int qid; + + RAL_LOCK(sc); + rt2860_stop_locked(sc); + RAL_UNLOCK(sc); + + ieee80211_ifdetach(ic); + + for (qid = 0; qid < 6; qid++) + rt2860_free_tx_ring(sc, &sc->txq[qid]); + rt2860_free_rx_ring(sc, &sc->rxq); + rt2860_free_tx_pool(sc); + + if_free(ifp); + + mtx_destroy(&sc->sc_mtx); + + return 0; +} + +void +rt2860_shutdown(void *xsc) +{ + struct rt2860_softc *sc = xsc; + + rt2860_stop(sc); +} + +void +rt2860_suspend(void *xsc) +{ + struct rt2860_softc *sc = xsc; + + rt2860_stop(sc); +} + +void +rt2860_resume(void *xsc) +{ + struct rt2860_softc *sc = xsc; + struct ifnet *ifp = sc->sc_ifp; + + if (ifp->if_flags & IFF_UP) + rt2860_init(sc); +} + +static struct ieee80211vap * +rt2860_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, + enum ieee80211_opmode opmode, int flags, + const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t mac[IEEE80211_ADDR_LEN]) +{ + struct ifnet *ifp = ic->ic_ifp; + struct rt2860_vap *rvp; + struct ieee80211vap *vap; + + switch (opmode) { + case IEEE80211_M_STA: + case IEEE80211_M_IBSS: + case IEEE80211_M_AHDEMO: + case IEEE80211_M_MONITOR: + case IEEE80211_M_HOSTAP: + case IEEE80211_M_MBSS: + /* XXXRP: TBD */ + if (!TAILQ_EMPTY(&ic->ic_vaps)) { + if_printf(ifp, "only 1 vap supported\n"); + return NULL; + } + if (opmode == IEEE80211_M_STA) + flags |= IEEE80211_CLONE_NOBEACONS; + break; + case IEEE80211_M_WDS: + if (TAILQ_EMPTY(&ic->ic_vaps) || + ic->ic_opmode != IEEE80211_M_HOSTAP) { + if_printf(ifp, "wds only supported in ap mode\n"); + return NULL; + } + /* + * Silently remove any request for a unique + * bssid; WDS vap's always share the local + * mac address. + */ + flags &= ~IEEE80211_CLONE_BSSID; + break; + default: + if_printf(ifp, "unknown opmode %d\n", opmode); + return NULL; + } + rvp = malloc(sizeof(struct rt2860_vap), M_80211_VAP, M_NOWAIT | M_ZERO); + if (rvp == NULL) + return NULL; + vap = &rvp->ral_vap; + ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid, mac); + + /* override state transition machine */ + rvp->ral_newstate = vap->iv_newstate; + vap->iv_newstate = rt2860_newstate; +#if 0 + vap->iv_update_beacon = rt2860_beacon_update; +#endif + + /* HW supports up to 255 STAs (0-254) in HostAP and IBSS modes */ + vap->iv_max_aid = min(IEEE80211_AID_MAX, RT2860_WCID_MAX); + + ieee80211_ratectl_init(vap); + /* complete setup */ + ieee80211_vap_attach(vap, ieee80211_media_change, ieee80211_media_status); + if (TAILQ_FIRST(&ic->ic_vaps) == vap) + ic->ic_opmode = opmode; + return vap; +} + +static void +rt2860_vap_delete(struct ieee80211vap *vap) +{ + struct rt2860_vap *rvp = RT2860_VAP(vap); + + ieee80211_ratectl_deinit(vap); + ieee80211_vap_detach(vap); + free(rvp, M_80211_VAP); +} + +static void +rt2860_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nseg, int error) +{ + if (error != 0) + return; + + KASSERT(nseg == 1, ("too many DMA segments, %d should be 1", nseg)); + + *(bus_addr_t *)arg = segs[0].ds_addr; +} + + +static int +rt2860_alloc_tx_ring(struct rt2860_softc *sc, struct rt2860_tx_ring *ring) +{ + int size, error; + + size = RT2860_TX_RING_COUNT * sizeof (struct rt2860_txd); + + error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 16, 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, + size, 1, size, 0, NULL, NULL, &ring->desc_dmat); + if (error != 0) { + device_printf(sc->sc_dev, "could not create desc DMA map\n"); + goto fail; + } + + error = bus_dmamem_alloc(ring->desc_dmat, (void **)&ring->txd, + BUS_DMA_NOWAIT | BUS_DMA_ZERO, &ring->desc_map); + if (error != 0) { + device_printf(sc->sc_dev, "could not allocate DMA memory\n"); + goto fail; + } + + error = bus_dmamap_load(ring->desc_dmat, ring->desc_map, ring->txd, + size, rt2860_dma_map_addr, &ring->paddr, 0); + if (error != 0) { + device_printf(sc->sc_dev, "could not load desc DMA map\n"); + goto fail; + } + + bus_dmamap_sync(ring->desc_dmat, ring->desc_map, BUS_DMASYNC_PREWRITE); + + return 0; + +fail: rt2860_free_tx_ring(sc, ring); + return error; +} + +void +rt2860_reset_tx_ring(struct rt2860_softc *sc, struct rt2860_tx_ring *ring) +{ + struct rt2860_tx_data *data; + int i; + + for (i = 0; i < RT2860_TX_RING_COUNT; i++) { + if ((data = ring->data[i]) == NULL) + continue; /* nothing mapped in this slot */ + + if (data->m != NULL) { + bus_dmamap_sync(sc->txwi_dmat, data->map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(sc->txwi_dmat, data->map); + m_freem(data->m); + data->m = NULL; + } + if (data->ni != NULL) { + ieee80211_free_node(data->ni); + data->ni = NULL; + } + + SLIST_INSERT_HEAD(&sc->data_pool, data, next); + ring->data[i] = NULL; + } + + ring->queued = 0; + ring->cur = ring->next = 0; +} + +void +rt2860_free_tx_ring(struct rt2860_softc *sc, struct rt2860_tx_ring *ring) +{ + struct rt2860_tx_data *data; + int i; + + if (ring->txd != NULL) { + bus_dmamap_sync(ring->desc_dmat, ring->desc_map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(ring->desc_dmat, ring->desc_map); + bus_dmamem_free(ring->desc_dmat, ring->txd, ring->desc_map); + } + if (ring->desc_dmat != NULL) + bus_dma_tag_destroy(ring->desc_dmat); + + for (i = 0; i < RT2860_TX_RING_COUNT; i++) { + if ((data = ring->data[i]) == NULL) + continue; /* nothing mapped in this slot */ + + if (data->m != NULL) { + bus_dmamap_sync(sc->txwi_dmat, data->map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(sc->txwi_dmat, data->map); + m_freem(data->m); + } + if (data->ni != NULL) + ieee80211_free_node(data->ni); + + SLIST_INSERT_HEAD(&sc->data_pool, data, next); + } +} + +/* + * Allocate a pool of TX Wireless Information blocks. + */ +int +rt2860_alloc_tx_pool(struct rt2860_softc *sc) +{ + caddr_t vaddr; + bus_addr_t paddr; + int i, size, error; + + size = RT2860_TX_POOL_COUNT * RT2860_TXWI_DMASZ; + + /* init data_pool early in case of failure.. */ + SLIST_INIT(&sc->data_pool); + + error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, + size, 1, size, 0, NULL, NULL, &sc->txwi_dmat); + if (error != 0) { + device_printf(sc->sc_dev, "could not create txwi DMA tag\n"); + goto fail; + } + + error = bus_dmamem_alloc(sc->txwi_dmat, (void **)&sc->txwi_vaddr, + BUS_DMA_NOWAIT | BUS_DMA_ZERO, &sc->txwi_map); + if (error != 0) { + device_printf(sc->sc_dev, "could not allocate DMA memory\n"); + goto fail; + } + + error = bus_dmamap_load(sc->txwi_dmat, sc->txwi_map, + sc->txwi_vaddr, size, rt2860_dma_map_addr, &paddr, 0); + if (error != 0) { + device_printf(sc->sc_dev, "could not load txwi DMA map\n"); + goto fail; + } + + bus_dmamap_sync(sc->txwi_dmat, sc->txwi_map, BUS_DMASYNC_PREWRITE); + + vaddr = sc->txwi_vaddr; + for (i = 0; i < RT2860_TX_POOL_COUNT; i++) { + struct rt2860_tx_data *data = &sc->data[i]; + + error = bus_dmamap_create(sc->txwi_dmat, 0, &data->map); + if (error != 0) { + device_printf(sc->sc_dev, "could not create DMA map\n"); + goto fail; + } + data->txwi = (struct rt2860_txwi *)vaddr; + data->paddr = paddr; + vaddr += RT2860_TXWI_DMASZ; + paddr += RT2860_TXWI_DMASZ; + + SLIST_INSERT_HEAD(&sc->data_pool, data, next); + } + + return 0; + +fail: rt2860_free_tx_pool(sc); + return error; +} + +void +rt2860_free_tx_pool(struct rt2860_softc *sc) +{ + if (sc->txwi_vaddr != NULL) { + bus_dmamap_sync(sc->txwi_dmat, sc->txwi_map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(sc->txwi_dmat, sc->txwi_map); + bus_dmamem_free(sc->txwi_dmat, sc->txwi_vaddr, sc->txwi_map); + } + if (sc->txwi_dmat != NULL) + bus_dma_tag_destroy(sc->txwi_dmat); + + while (!SLIST_EMPTY(&sc->data_pool)) { + struct rt2860_tx_data *data; + data = SLIST_FIRST(&sc->data_pool); + bus_dmamap_destroy(sc->txwi_dmat, data->map); + SLIST_REMOVE_HEAD(&sc->data_pool, next); + } +} + +int +rt2860_alloc_rx_ring(struct rt2860_softc *sc, struct rt2860_rx_ring *ring) +{ + bus_addr_t physaddr; + int i, size, error; + + size = RT2860_RX_RING_COUNT * sizeof (struct rt2860_rxd); + + error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 16, 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, + size, 1, size, 0, NULL, NULL, &ring->desc_dmat); + if (error != 0) { + device_printf(sc->sc_dev, "could not create desc DMA tag\n"); + goto fail; + } + + error = bus_dmamem_alloc(ring->desc_dmat, (void **)&ring->rxd, + BUS_DMA_NOWAIT | BUS_DMA_ZERO, &ring->desc_map); + if (error != 0) { + device_printf(sc->sc_dev, "could not allocate DMA memory\n"); + goto fail; + } + + error = bus_dmamap_load(ring->desc_dmat, ring->desc_map, ring->rxd, + size, rt2860_dma_map_addr, &ring->paddr, 0); + if (error != 0) { + device_printf(sc->sc_dev, "could not load desc DMA map\n"); + goto fail; + } + + error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, + 1, MCLBYTES, 0, NULL, NULL, &ring->data_dmat); + if (error != 0) { + device_printf(sc->sc_dev, "could not create data DMA tag\n"); + goto fail; + } + + for (i = 0; i < RT2860_RX_RING_COUNT; i++) { + struct rt2860_rx_data *data = &ring->data[i]; + struct rt2860_rxd *rxd = &ring->rxd[i]; + + error = bus_dmamap_create(ring->data_dmat, 0, &data->map); + if (error != 0) { + device_printf(sc->sc_dev, "could not create DMA map\n"); + goto fail; + } + + data->m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + if (data->m == NULL) { + device_printf(sc->sc_dev, + "could not allocate rx mbuf\n"); + error = ENOMEM; + goto fail; + } + + error = bus_dmamap_load(ring->data_dmat, data->map, + mtod(data->m, void *), MCLBYTES, rt2860_dma_map_addr, + &physaddr, 0); + if (error != 0) { + device_printf(sc->sc_dev, + "could not load rx buf DMA map"); + goto fail; + } + + rxd->sdp0 = htole32(physaddr); + rxd->sdl0 = htole16(MCLBYTES); + } + + bus_dmamap_sync(ring->desc_dmat, ring->desc_map, BUS_DMASYNC_PREWRITE); + + return 0; + +fail: rt2860_free_rx_ring(sc, ring); + return error; +} + +void +rt2860_reset_rx_ring(struct rt2860_softc *sc, struct rt2860_rx_ring *ring) +{ + int i; + + for (i = 0; i < RT2860_RX_RING_COUNT; i++) + ring->rxd[i].sdl0 &= ~htole16(RT2860_RX_DDONE); + + bus_dmamap_sync(ring->desc_dmat, ring->desc_map, BUS_DMASYNC_PREWRITE); + + ring->cur = 0; +} + +void +rt2860_free_rx_ring(struct rt2860_softc *sc, struct rt2860_rx_ring *ring) +{ + int i; + + if (ring->rxd != NULL) { + bus_dmamap_sync(ring->desc_dmat, ring->desc_map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(ring->desc_dmat, ring->desc_map); + bus_dmamem_free(ring->desc_dmat, ring->rxd, ring->desc_map); + } + if (ring->desc_dmat != NULL) + bus_dma_tag_destroy(ring->desc_dmat); + + for (i = 0; i < RT2860_RX_RING_COUNT; i++) { + struct rt2860_rx_data *data = &ring->data[i]; + + if (data->m != NULL) { + bus_dmamap_sync(ring->data_dmat, data->map, + BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(ring->data_dmat, data->map); + m_freem(data->m); + } + if (data->map != NULL) + bus_dmamap_destroy(ring->data_dmat, data->map); + } + if (ring->data_dmat != NULL) + bus_dma_tag_destroy(ring->data_dmat); +} + +static void +rt2860_updatestats(struct rt2860_softc *sc) +{ + struct ieee80211com *ic = sc->sc_ifp->if_l2com; + + /* + * In IBSS or HostAP modes (when the hardware sends beacons), the + * MAC can run into a livelock and start sending CTS-to-self frames + * like crazy if protection is enabled. Fortunately, we can detect + * when such a situation occurs and reset the MAC. + */ + if (ic->ic_curmode != IEEE80211_M_STA) { + /* check if we're in a livelock situation.. */ + uint32_t tmp = RAL_READ(sc, RT2860_DEBUG); + if ((tmp & (1 << 29)) && (tmp & (1 << 7 | 1 << 5))) { + /* ..and reset MAC/BBP for a while.. */ + DPRINTF(("CTS-to-self livelock detected\n")); + RAL_WRITE(sc, RT2860_MAC_SYS_CTRL, RT2860_MAC_SRST); + RAL_BARRIER_WRITE(sc); + DELAY(1); + RAL_WRITE(sc, RT2860_MAC_SYS_CTRL, + RT2860_MAC_RX_EN | RT2860_MAC_TX_EN); + } + } +} + +static void +rt2860_newassoc(struct ieee80211_node *ni, int isnew) +{ + struct ieee80211com *ic = ni->ni_ic; + struct rt2860_softc *sc = ic->ic_ifp->if_softc; + uint8_t wcid; + + wcid = IEEE80211_AID(ni->ni_associd); + if (isnew && ni->ni_associd != 0) { + sc->wcid2ni[wcid] = ni; + + /* init WCID table entry */ + RAL_WRITE_REGION_1(sc, RT2860_WCID_ENTRY(wcid), + ni->ni_macaddr, IEEE80211_ADDR_LEN); + } + DPRINTF(("new assoc isnew=%d addr=%s WCID=%d\n", + isnew, ether_sprintf(ni->ni_macaddr), wcid)); +} + +static void +rt2860_node_free(struct ieee80211_node *ni) +{ + struct ieee80211com *ic = ni->ni_ic; + struct rt2860_softc *sc = ic->ic_ifp->if_softc; + uint8_t wcid; + + if (ni->ni_associd != 0) { + wcid = IEEE80211_AID(ni->ni_associd); + + /* clear Rx WCID search table entry */ + RAL_SET_REGION_4(sc, RT2860_WCID_ENTRY(wcid), 0, 2); + } + sc->sc_node_free(ni); +} + +#ifdef IEEE80211_HT +static int +rt2860_ampdu_rx_start(struct ieee80211com *ic, struct ieee80211_node *ni, + uint8_t tid) +{ + struct rt2860_softc *sc = ic->ic_softc; + uint8_t wcid = ((struct rt2860_node *)ni)->wcid; + uint32_t tmp; + + /* update BA session mask */ + tmp = RAL_READ(sc, RT2860_WCID_ENTRY(wcid) + 4); + tmp |= (1 << tid) << 16; + RAL_WRITE(sc, RT2860_WCID_ENTRY(wcid) + 4, tmp); + return 0; +} + +static void *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu May 10 18:06:01 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5044D106566B; Thu, 10 May 2012 18:06:01 +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 3A2C38FC12; Thu, 10 May 2012 18:06:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4AI61gf045889; Thu, 10 May 2012 18:06:01 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4AI613V045886; Thu, 10 May 2012 18:06:01 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201205101806.q4AI613V045886@svn.freebsd.org> From: Warner Losh Date: Thu, 10 May 2012 18:06: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: r235234 - in head/sys: arm/conf 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: Thu, 10 May 2012 18:06:01 -0000 Author: imp Date: Thu May 10 18:06:00 2012 New Revision: 235234 URL: http://svn.freebsd.org/changeset/base/235234 Log: Generate board id's from Linux's mach-types database for all arm ports. This currently is a nop, but will soon be used to allow support for multiple boards to be built into one kernel (starting with AT91RM9200 and expanding out from there). Added: head/sys/arm/conf/genboardid.awk (contents, props changed) head/sys/arm/conf/mach-types (contents, props changed) Modified: head/sys/conf/files.arm Added: head/sys/arm/conf/genboardid.awk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/genboardid.awk Thu May 10 18:06:00 2012 (r235234) @@ -0,0 +1,55 @@ +#!/bin/awk +# $FreeBSD$ + +#- +# Copyright (c) 2012 M. Warner Losh. 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. +# + +# +# Generate FreeBSD's board ID's defines from Linux's +# arm board list. +# +# You can grab a new copy any time with: +# fetch -o sys/arm/conf/mach-types http://www.arm.linux.org.uk/developer/machines/download.php +# +BEGIN { nr = 0; boardid[nr] = "ARM_BOARD_ID_NONE"; num[nr++] = 0; } +/^#/ { next; } +/^[ ]*$/ { next; } + +NF == 4 { + boardid[nr] = "ARM_BOARD_ID_"$3; + num[nr] = $4; + nr++ +} + +END { + printf("/* Arm board ID file generated automatically from Linux's mach-types file. */\n\n"); + printf("#ifndef _SYS_ARM_ARM_BOARDID_H\n"); + printf("#define _SYS_ARM_ARM_BOARDID_H\n\n"); + for (i = 0; i < nr; i++) { + printf("#define %-30s %d\n", boardid[i], num[i]); + } + printf("\n#endif /* _SYS_ARM_ARM_BOARDID_H */\n"); +} + Added: head/sys/arm/conf/mach-types ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/mach-types Thu May 10 18:06:00 2012 (r235234) @@ -0,0 +1,4146 @@ +# Database of machine macros and numbers +# +# This file is linux/arch/arm/tools/mach-types +# +# Up to date versions of this file can be obtained from: +# +# http://www.arm.linux.org.uk/developer/machines/download.php +# +# Please do not send patches to this file; it is automatically generated! +# To add an entry into this database, please see Documentation/arm/README, +# or visit: +# +# http://www.arm.linux.org.uk/developer/machines/?action=new +# +# Last update: Thu May 10 18:35:23 2012 +# +# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number +# +ebsa110 ARCH_EBSA110 EBSA110 0 +riscpc ARCH_RPC RISCPC 1 +nexuspci ARCH_NEXUSPCI NEXUSPCI 3 +ebsa285 ARCH_EBSA285 EBSA285 4 +netwinder ARCH_NETWINDER NETWINDER 5 +cats ARCH_CATS CATS 6 +tbox ARCH_TBOX TBOX 7 +co285 ARCH_CO285 CO285 8 +clps7110 ARCH_CLPS7110 CLPS7110 9 +archimedes ARCH_ARC ARCHIMEDES 10 +a5k ARCH_A5K A5K 11 +etoile ARCH_ETOILE ETOILE 12 +lacie_nas ARCH_LACIE_NAS LACIE_NAS 13 +clps7500 ARCH_CLPS7500 CLPS7500 14 +shark ARCH_SHARK SHARK 15 +brutus SA1100_BRUTUS BRUTUS 16 +personal_server ARCH_PERSONAL_SERVER PERSONAL_SERVER 17 +itsy SA1100_ITSY ITSY 18 +l7200 ARCH_L7200 L7200 19 +pleb SA1100_PLEB PLEB 20 +integrator ARCH_INTEGRATOR INTEGRATOR 21 +h3600 SA1100_H3600 H3600 22 +ixp1200 ARCH_IXP1200 IXP1200 23 +p720t ARCH_P720T P720T 24 +assabet SA1100_ASSABET ASSABET 25 +victor SA1100_VICTOR VICTOR 26 +lart SA1100_LART LART 27 +ranger SA1100_RANGER RANGER 28 +graphicsclient SA1100_GRAPHICSCLIENT GRAPHICSCLIENT 29 +xp860 SA1100_XP860 XP860 30 +cerf SA1100_CERF CERF 31 +nanoengine SA1100_NANOENGINE NANOENGINE 32 +fpic SA1100_FPIC FPIC 33 +extenex1 SA1100_EXTENEX1 EXTENEX1 34 +sherman SA1100_SHERMAN SHERMAN 35 +accelent_sa SA1100_ACCELENT ACCELENT_SA 36 +accelent_l7200 ARCH_L7200_ACCELENT ACCELENT_L7200 37 +netport SA1100_NETPORT NETPORT 38 +pangolin SA1100_PANGOLIN PANGOLIN 39 +yopy SA1100_YOPY YOPY 40 +coolidge SA1100_COOLIDGE COOLIDGE 41 +huw_webpanel SA1100_HUW_WEBPANEL HUW_WEBPANEL 42 +spotme ARCH_SPOTME SPOTME 43 +freebird ARCH_FREEBIRD FREEBIRD 44 +ti925 ARCH_TI925 TI925 45 +riscstation ARCH_RISCSTATION RISCSTATION 46 +cavy SA1100_CAVY CAVY 47 +jornada720 SA1100_JORNADA720 JORNADA720 48 +omnimeter SA1100_OMNIMETER OMNIMETER 49 +edb7211 ARCH_EDB7211 EDB7211 50 +citygo SA1100_CITYGO CITYGO 51 +pfs168 SA1100_PFS168 PFS168 52 +spot SA1100_SPOT SPOT 53 +flexanet SA1100_FLEXANET FLEXANET 54 +webpal ARCH_WEBPAL WEBPAL 55 +linpda SA1100_LINPDA LINPDA 56 +anakin ARCH_ANAKIN ANAKIN 57 +mvi SA1100_MVI MVI 58 +jupiter SA1100_JUPITER JUPITER 59 +psionw ARCH_PSIONW PSIONW 60 +aln SA1100_ALN ALN 61 +epxa ARCH_CAMELOT CAMELOT 62 +gds2200 SA1100_GDS2200 GDS2200 63 +netbook SA1100_PSION_SERIES7 PSION_SERIES7 64 +xfile SA1100_XFILE XFILE 65 +accelent_ep9312 ARCH_ACCELENT_EP9312 ACCELENT_EP9312 66 +ic200 ARCH_IC200 IC200 67 +creditlart SA1100_CREDITLART CREDITLART 68 +htm SA1100_HTM HTM 69 +iq80310 ARCH_IQ80310 IQ80310 70 +freebot SA1100_FREEBOT FREEBOT 71 +entel ARCH_ENTEL ENTEL 72 +enp3510 ARCH_ENP3510 ENP3510 73 +trizeps SA1100_TRIZEPS TRIZEPS 74 +nesa SA1100_NESA NESA 75 +venus ARCH_VENUS VENUS 76 +tardis ARCH_TARDIS TARDIS 77 +mercury ARCH_MERCURY MERCURY 78 +empeg SA1100_EMPEG EMPEG 79 +adi_evb ARCH_I80200FCC I80200FCC 80 +itt_cpb SA1100_ITT_CPB ITT_CPB 81 +svc SA1100_SVC SVC 82 +alpha2 SA1100_ALPHA2 ALPHA2 84 +alpha1 SA1100_ALPHA1 ALPHA1 85 +netarm ARCH_NETARM NETARM 86 +simpad SA1100_SIMPAD SIMPAD 87 +pda1 ARCH_PDA1 PDA1 88 +lubbock ARCH_LUBBOCK LUBBOCK 89 +aniko ARCH_ANIKO ANIKO 90 +clep7212 ARCH_CLEP7212 CLEP7212 91 +cs89712 ARCH_CS89712 CS89712 92 +weararm SA1100_WEARARM WEARARM 93 +possio_px SA1100_POSSIO_PX POSSIO_PX 94 +sidearm SA1100_SIDEARM SIDEARM 95 +stork SA1100_STORK STORK 96 +shannon SA1100_SHANNON SHANNON 97 +ace ARCH_ACE ACE 98 +ballyarm SA1100_BALLYARM BALLYARM 99 +simputer SA1100_SIMPUTER SIMPUTER 100 +nexterm SA1100_NEXTERM NEXTERM 101 +sa1100_elf SA1100_SA1100_ELF SA1100_ELF 102 +gator SA1100_GATOR GATOR 103 +granite ARCH_GRANITE GRANITE 104 +consus SA1100_CONSUS CONSUS 105 +aaed2000 ARCH_AAED2000 AAED2000 106 +cdb89712 ARCH_CDB89712 CDB89712 107 +graphicsmaster SA1100_GRAPHICSMASTER GRAPHICSMASTER 108 +adsbitsy SA1100_ADSBITSY ADSBITSY 109 +pxa_idp ARCH_PXA_IDP PXA_IDP 110 +plce ARCH_PLCE PLCE 111 +pt_system3 SA1100_PT_SYSTEM3 PT_SYSTEM3 112 +murphy ARCH_MEDALB MEDALB 113 +eagle ARCH_EAGLE EAGLE 114 +dsc21 ARCH_DSC21 DSC21 115 +dsc24 ARCH_DSC24 DSC24 116 +ti5472 ARCH_TI5472 TI5472 117 +autcpu12 ARCH_AUTCPU12 AUTCPU12 118 +uengine ARCH_UENGINE UENGINE 119 +bluestem SA1100_BLUESTEM BLUESTEM 120 +xingu8 ARCH_XINGU8 XINGU8 121 +bushstb ARCH_BUSHSTB BUSHSTB 122 +epsilon1 SA1100_EPSILON1 EPSILON1 123 +balloon SA1100_BALLOON BALLOON 124 +puppy ARCH_PUPPY PUPPY 125 +elroy SA1100_ELROY ELROY 126 +gms720 ARCH_GMS720 GMS720 127 +s24x ARCH_S24X S24X 128 +jtel_clep7312 ARCH_JTEL_CLEP7312 JTEL_CLEP7312 129 +cx821xx ARCH_CX821XX CX821XX 130 +edb7312 ARCH_EDB7312 EDB7312 131 +bsa1110 SA1100_BSA1110 BSA1110 132 +powerpin ARCH_POWERPIN POWERPIN 133 +openarm ARCH_OPENARM OPENARM 134 +whitechapel SA1100_WHITECHAPEL WHITECHAPEL 135 +h3100 SA1100_H3100 H3100 136 +h3800 SA1100_H3800 H3800 137 +blue_v1 ARCH_BLUE_V1 BLUE_V1 138 +pxa_cerf ARCH_PXA_CERF PXA_CERF 139 +arm7tevb ARCH_ARM7TEVB ARM7TEVB 140 +d7400 SA1100_D7400 D7400 141 +piranha ARCH_PIRANHA PIRANHA 142 +sbcamelot SA1100_SBCAMELOT SBCAMELOT 143 +kings SA1100_KINGS KINGS 144 +smdk2400 ARCH_SMDK2400 SMDK2400 145 +collie SA1100_COLLIE COLLIE 146 +idr ARCH_IDR IDR 147 +badge4 SA1100_BADGE4 BADGE4 148 +webnet ARCH_WEBNET WEBNET 149 +d7300 SA1100_D7300 D7300 150 +cep SA1100_CEP CEP 151 +fortunet ARCH_FORTUNET FORTUNET 152 +vc547x ARCH_VC547X VC547X 153 +filewalker SA1100_FILEWALKER FILEWALKER 154 +netgateway SA1100_NETGATEWAY NETGATEWAY 155 +symbol2800 SA1100_SYMBOL2800 SYMBOL2800 156 +suns SA1100_SUNS SUNS 157 +frodo SA1100_FRODO FRODO 158 +ms301 SA1100_MACH_TYTE_MS301 MACH_TYTE_MS301 159 +mx1ads ARCH_MX1ADS MX1ADS 160 +h7201 ARCH_H7201 H7201 161 +h7202 ARCH_H7202 H7202 162 +amico ARCH_AMICO AMICO 163 +iam SA1100_IAM IAM 164 +tt530 SA1100_TT530 TT530 165 +sam2400 ARCH_SAM2400 SAM2400 166 +jornada56x SA1100_JORNADA56X JORNADA56X 167 +active SA1100_ACTIVE ACTIVE 168 +iq80321 ARCH_IQ80321 IQ80321 169 +wid SA1100_WID WID 170 +sabinal ARCH_SABINAL SABINAL 171 +ixp425_matacumbe ARCH_IXP425_MATACUMBE IXP425_MATACUMBE 172 +miniprint SA1100_MINIPRINT MINIPRINT 173 +adm510x ARCH_ADM510X ADM510X 174 +svs200 SA1100_SVS200 SVS200 175 +atg_tcu ARCH_ATG_TCU ATG_TCU 176 +jornada820 SA1100_JORNADA820 JORNADA820 177 +s3c44b0 ARCH_S3C44B0 S3C44B0 178 +margis2 ARCH_MARGIS2 MARGIS2 179 +ks8695 ARCH_KS8695 KS8695 180 +brh ARCH_BRH BRH 181 +s3c2410 ARCH_S3C2410 S3C2410 182 +possio_px30 ARCH_POSSIO_PX30 POSSIO_PX30 183 +s3c2800 ARCH_S3C2800 S3C2800 184 +fleetwood SA1100_FLEETWOOD FLEETWOOD 185 +omaha ARCH_OMAHA OMAHA 186 +ta7 ARCH_TA7 TA7 187 +nova SA1100_NOVA NOVA 188 +hmk ARCH_HMK HMK 189 +karo ARCH_KARO KARO 190 +fester SA1100_FESTER FESTER 191 +gpi ARCH_GPI GPI 192 +smdk2410 ARCH_SMDK2410 SMDK2410 193 +i519 ARCH_I519 I519 194 +nexio SA1100_NEXIO NEXIO 195 +bitbox SA1100_BITBOX BITBOX 196 +g200 SA1100_G200 G200 197 +gill SA1100_GILL GILL 198 +pxa_mercury ARCH_PXA_MERCURY PXA_MERCURY 199 +ceiva ARCH_CEIVA CEIVA 200 +fret SA1100_FRET FRET 201 +emailphone SA1100_EMAILPHONE EMAILPHONE 202 +h3900 ARCH_H3900 H3900 203 +pxa1 ARCH_PXA1 PXA1 204 +koan369 SA1100_KOAN369 KOAN369 205 +cogent ARCH_COGENT COGENT 206 +esl_simputer ARCH_ESL_SIMPUTER ESL_SIMPUTER 207 +esl_simputer_clr ARCH_ESL_SIMPUTER_CLR ESL_SIMPUTER_CLR 208 +esl_simputer_bw ARCH_ESL_SIMPUTER_BW ESL_SIMPUTER_BW 209 +hhp_cradle ARCH_HHP_CRADLE HHP_CRADLE 210 +he500 ARCH_HE500 HE500 211 +inhandelf2 SA1100_INHANDELF2 INHANDELF2 212 +inhandftip SA1100_INHANDFTIP INHANDFTIP 213 +dnp1110 SA1100_DNP1110 DNP1110 214 +pnp1110 SA1100_PNP1110 PNP1110 215 +csb226 ARCH_CSB226 CSB226 216 +arnold SA1100_ARNOLD ARNOLD 217 +voiceblue MACH_VOICEBLUE VOICEBLUE 218 +jz8028 ARCH_JZ8028 JZ8028 219 +h5400 ARCH_H5400 H5400 220 +forte SA1100_FORTE FORTE 221 +acam SA1100_ACAM ACAM 222 +abox SA1100_ABOX ABOX 223 +atmel ARCH_ATMEL ATMEL 224 +sitsang ARCH_SITSANG SITSANG 225 +cpu1110lcdnet SA1100_CPU1110LCDNET CPU1110LCDNET 226 +mpl_vcma9 ARCH_MPL_VCMA9 MPL_VCMA9 227 +opus_a1 ARCH_OPUS_A1 OPUS_A1 228 +daytona ARCH_DAYTONA DAYTONA 229 +killbear SA1100_KILLBEAR KILLBEAR 230 +yoho ARCH_YOHO YOHO 231 +jasper ARCH_JASPER JASPER 232 +dsc25 ARCH_DSC25 DSC25 233 +omap_innovator MACH_OMAP_INNOVATOR OMAP_INNOVATOR 234 +mnci ARCH_RAMSES RAMSES 235 +s28x ARCH_S28X S28X 236 +mport3 ARCH_MPORT3 MPORT3 237 +pxa_eagle250 ARCH_PXA_EAGLE250 PXA_EAGLE250 238 +pdb ARCH_PDB PDB 239 +blue_2g SA1100_BLUE_2G BLUE_2G 240 +bluearch SA1100_BLUEARCH BLUEARCH 241 +ixdp2400 ARCH_IXDP2400 IXDP2400 242 +ixdp2800 ARCH_IXDP2800 IXDP2800 243 +explorer SA1100_EXPLORER EXPLORER 244 +ixdp425 ARCH_IXDP425 IXDP425 245 +chimp ARCH_CHIMP CHIMP 246 +stork_nest ARCH_STORK_NEST STORK_NEST 247 +stork_egg ARCH_STORK_EGG STORK_EGG 248 +wismo SA1100_WISMO WISMO 249 +ezlinx ARCH_EZLINX EZLINX 250 +at91rm9200 ARCH_AT91RM9200 AT91RM9200 251 +adtech_orion ARCH_ADTECH_ORION ADTECH_ORION 252 +neptune ARCH_NEPTUNE NEPTUNE 253 +hackkit SA1100_HACKKIT HACKKIT 254 +pxa_wins30 ARCH_PXA_WINS30 PXA_WINS30 255 +lavinna SA1100_LAVINNA LAVINNA 256 +pxa_uengine ARCH_PXA_UENGINE PXA_UENGINE 257 +innokom ARCH_INNOKOM INNOKOM 258 +bms ARCH_BMS BMS 259 +ixcdp1100 ARCH_IXCDP1100 IXCDP1100 260 +prpmc1100 ARCH_PRPMC1100 PRPMC1100 261 +at91rm9200dk ARCH_AT91RM9200DK AT91RM9200DK 262 +armstick ARCH_ARMSTICK ARMSTICK 263 +armonie ARCH_ARMONIE ARMONIE 264 +mport1 ARCH_MPORT1 MPORT1 265 +s3c5410 ARCH_S3C5410 S3C5410 266 +zcp320a ARCH_ZCP320A ZCP320A 267 +i_box ARCH_I_BOX I_BOX 268 +stlc1502 ARCH_STLC1502 STLC1502 269 +siren ARCH_SIREN SIREN 270 +greenlake ARCH_GREENLAKE GREENLAKE 271 +argus ARCH_ARGUS ARGUS 272 +combadge SA1100_COMBADGE COMBADGE 273 +rokepxa ARCH_ROKEPXA ROKEPXA 274 +cintegrator ARCH_CINTEGRATOR CINTEGRATOR 275 +guidea07 ARCH_GUIDEA07 GUIDEA07 276 +tat257 ARCH_TAT257 TAT257 277 +igp2425 ARCH_IGP2425 IGP2425 278 +bluegrama ARCH_BLUEGRAMMA BLUEGRAMMA 279 +ipod ARCH_IPOD IPOD 280 +adsbitsyx ARCH_ADSBITSYX ADSBITSYX 281 +trizeps2 ARCH_TRIZEPS2 TRIZEPS2 282 +viper ARCH_VIPER VIPER 283 +adsbitsyplus SA1100_ADSBITSYPLUS ADSBITSYPLUS 284 +adsagc SA1100_ADSAGC ADSAGC 285 +stp7312 ARCH_STP7312 STP7312 286 +nx_phnx MACH_NX_PHNX NX_PHNX 287 +wep_ep250 ARCH_WEP_EP250 WEP_EP250 288 +inhandelf3 ARCH_INHANDELF3 INHANDELF3 289 +adi_coyote ARCH_ADI_COYOTE ADI_COYOTE 290 +iyonix ARCH_IYONIX IYONIX 291 +damicam1 ARCH_DAMICAM_SA1110 DAMICAM_SA1110 292 +meg03 ARCH_MEG03 MEG03 293 +pxa_whitechapel ARCH_PXA_WHITECHAPEL PXA_WHITECHAPEL 294 +nwsc ARCH_NWSC NWSC 295 +nwlarm ARCH_NWLARM NWLARM 296 +ixp425_mguard ARCH_IXP425_MGUARD IXP425_MGUARD 297 +pxa_netdcu4 ARCH_PXA_NETDCU4 PXA_NETDCU4 298 +ixdp2401 ARCH_IXDP2401 IXDP2401 299 +ixdp2801 ARCH_IXDP2801 IXDP2801 300 +zodiac ARCH_ZODIAC ZODIAC 301 +armmodul ARCH_ARMMODUL ARMMODUL 302 +ketop SA1100_KETOP KETOP 303 +av7200 ARCH_AV7200 AV7200 304 +arch_ti925 ARCH_ARCH_TI925 ARCH_TI925 305 +acq200 ARCH_ACQ200 ACQ200 306 +pt_dafit SA1100_PT_DAFIT PT_DAFIT 307 +ihba ARCH_IHBA IHBA 308 +quinque ARCH_QUINQUE QUINQUE 309 +nimbraone ARCH_NIMBRAONE NIMBRAONE 310 +nimbra29x ARCH_NIMBRA29X NIMBRA29X 311 +nimbra210 ARCH_NIMBRA210 NIMBRA210 312 +hhp_d95xx ARCH_HHP_D95XX HHP_D95XX 313 +labarm ARCH_LABARM LABARM 314 +m825xx ARCH_M825XX M825XX 315 +m7100 SA1100_M7100 M7100 316 +nipc2 ARCH_NIPC2 NIPC2 317 +fu7202 ARCH_FU7202 FU7202 318 +adsagx ARCH_ADSAGX ADSAGX 319 +pxa_pooh ARCH_PXA_POOH PXA_POOH 320 +bandon ARCH_BANDON BANDON 321 +pcm7210 ARCH_PCM7210 PCM7210 322 +nms9200 ARCH_NMS9200 NMS9200 323 +logodl ARCH_LOGODL LOGODL 324 +m7140 SA1100_M7140 M7140 325 +korebot ARCH_KOREBOT KOREBOT 326 +iq31244 ARCH_IQ31244 IQ31244 327 +koan393 SA1100_KOAN393 KOAN393 328 +inhandftip3 ARCH_INHANDFTIP3 INHANDFTIP3 329 +gonzo ARCH_GONZO GONZO 330 +bast ARCH_BAST BAST 331 +scanpass ARCH_SCANPASS SCANPASS 332 +ep7312_pooh ARCH_EP7312_POOH EP7312_POOH 333 +ta7s ARCH_TA7S TA7S 334 +ta7v ARCH_TA7V TA7V 335 +icarus SA1100_ICARUS ICARUS 336 +h1900 ARCH_H1900 H1900 337 +gemini SA1100_GEMINI GEMINI 338 +axim ARCH_AXIM AXIM 339 +audiotron ARCH_AUDIOTRON AUDIOTRON 340 +h2200 ARCH_H2200 H2200 341 +loox600 ARCH_LOOX600 LOOX600 342 +niop ARCH_NIOP NIOP 343 +dm310 ARCH_DM310 DM310 344 +seedpxa_c2 ARCH_SEEDPXA_C2 SEEDPXA_C2 345 +ixp4xx_mguardpci ARCH_IXP4XX_MGUARD_PCI IXP4XX_MGUARD_PCI 346 +h1940 ARCH_H1940 H1940 347 +scorpio ARCH_SCORPIO SCORPIO 348 +viva ARCH_VIVA VIVA 349 +pxa_xcard ARCH_PXA_XCARD PXA_XCARD 350 +csb335 ARCH_CSB335 CSB335 351 +ixrd425 ARCH_IXRD425 IXRD425 352 +iq80315 ARCH_IQ80315 IQ80315 353 +nmp7312 ARCH_NMP7312 NMP7312 354 +cx861xx ARCH_CX861XX CX861XX 355 +enp2611 ARCH_ENP2611 ENP2611 356 +xda SA1100_XDA XDA 357 +csir_ims ARCH_CSIR_IMS CSIR_IMS 358 +ixp421_dnaeeth ARCH_IXP421_DNAEETH IXP421_DNAEETH 359 +pocketserv9200 ARCH_POCKETSERV9200 POCKETSERV9200 360 +toto ARCH_TOTO TOTO 361 +s3c2440 ARCH_S3C2440 S3C2440 362 +ks8695p ARCH_KS8695P KS8695P 363 +se4000 ARCH_SE4000 SE4000 364 +quadriceps ARCH_QUADRICEPS QUADRICEPS 365 +bronco ARCH_BRONCO BRONCO 366 +esl_wireless_tab ARCH_ESL_WIRELESS_TAB ESL_WIRELESS_TAB 367 +esl_sofcomp ARCH_ESL_SOFCOMP ESL_SOFCOMP 368 +s5c7375 ARCH_S5C7375 S5C7375 369 +spearhead ARCH_SPEARHEAD SPEARHEAD 370 +pantera ARCH_PANTERA PANTERA 371 +prayoglite ARCH_PRAYOGLITE PRAYOGLITE 372 +gumstix ARCH_GUMSTIX GUMSTIX 373 +rcube ARCH_RCUBE RCUBE 374 +rea_olv ARCH_REA_OLV REA_OLV 375 +pxa_iphone ARCH_PXA_IPHONE PXA_IPHONE 376 +s3c3410 ARCH_S3C3410 S3C3410 377 +espd_4510b ARCH_ESPD_4510B ESPD_4510B 378 +mp1x ARCH_MP1X MP1X 379 +at91rm9200tb ARCH_AT91RM9200TB AT91RM9200TB 380 +adsvgx ARCH_ADSVGX ADSVGX 381 +omap_h2 MACH_OMAP_H2 OMAP_H2 382 +pelee ARCH_PELEE PELEE 383 +e740 MACH_E740 E740 384 +iq80331 ARCH_IQ80331 IQ80331 385 +versatile_pb ARCH_VERSATILE_PB VERSATILE_PB 387 +kev7a400 MACH_KEV7A400 KEV7A400 388 +lpd7a400 MACH_LPD7A400 LPD7A400 389 +lpd7a404 MACH_LPD7A404 LPD7A404 390 +fujitsu_camelot ARCH_FUJITSU_CAMELOT FUJITSU_CAMELOT 391 +janus2m ARCH_JANUS2M JANUS2M 392 +embtf MACH_EMBTF EMBTF 393 +hpm MACH_HPM HPM 394 +smdk2410tk MACH_SMDK2410TK SMDK2410TK 395 +smdk2410aj MACH_SMDK2410AJ SMDK2410AJ 396 +streetracer MACH_STREETRACER STREETRACER 397 +eframe MACH_EFRAME EFRAME 398 +csb337 MACH_CSB337 CSB337 399 +pxa_lark MACH_PXA_LARK PXA_LARK 400 +pxa_pnp2110 MACH_PNP2110 PNP2110 401 +tcc72x MACH_TCC72X TCC72X 402 +altair MACH_ALTAIR ALTAIR 403 +kc3 MACH_KC3 KC3 404 +sinteftd MACH_SINTEFTD SINTEFTD 405 +mainstone MACH_MAINSTONE MAINSTONE 406 +aday4x MACH_ADAY4X ADAY4X 407 +lite300 MACH_LITE300 LITE300 408 +s5c7376 MACH_S5C7376 S5C7376 409 +mt02 MACH_MT02 MT02 410 +mport3s MACH_MPORT3S MPORT3S 411 +ra_alpha MACH_RA_ALPHA RA_ALPHA 412 +xcep MACH_XCEP XCEP 413 +arcom_vulcan MACH_ARCOM_VULCAN ARCOM_VULCAN 414 +stargate MACH_STARGATE STARGATE 415 +armadilloj MACH_ARMADILLOJ ARMADILLOJ 416 +elroy_jack MACH_ELROY_JACK ELROY_JACK 417 +backend MACH_BACKEND BACKEND 418 +s5linbox MACH_S5LINBOX S5LINBOX 419 +nomadik MACH_NOMADIK NOMADIK 420 +ia_cpu_9200 MACH_IA_CPU_9200 IA_CPU_9200 421 +at91_bja1 MACH_AT91_BJA1 AT91_BJA1 422 +corgi MACH_CORGI CORGI 423 +poodle MACH_POODLE POODLE 424 +ten MACH_TEN TEN 425 +roverp5p MACH_ROVERP5P ROVERP5P 426 +sc2700 MACH_SC2700 SC2700 427 +ex_eagle MACH_EX_EAGLE EX_EAGLE 428 +nx_pxa12 MACH_NX_PXA12 NX_PXA12 429 +nx_pxa5 MACH_NX_PXA5 NX_PXA5 430 +blackboard2 MACH_BLACKBOARD2 BLACKBOARD2 431 +i819 MACH_I819 I819 432 +ixmb995e MACH_IXMB995E IXMB995E 433 +skyrider MACH_SKYRIDER SKYRIDER 434 +skyhawk MACH_SKYHAWK SKYHAWK 435 +enterprise MACH_ENTERPRISE ENTERPRISE 436 +dep2410 MACH_DEP2410 DEP2410 437 +armcore MACH_ARMCORE ARMCORE 438 +hobbit MACH_HOBBIT HOBBIT 439 +h7210 MACH_H7210 H7210 440 +pxa_netdcu5 MACH_PXA_NETDCU5 PXA_NETDCU5 441 +acc MACH_ACC ACC 442 +esl_sarva MACH_ESL_SARVA ESL_SARVA 443 +xm250 MACH_XM250 XM250 444 +t6tc1xb MACH_T6TC1XB T6TC1XB 445 +ess710 MACH_ESS710 ESS710 446 +mx31ads MACH_MX31ADS MX31ADS 447 +himalaya MACH_HIMALAYA HIMALAYA 448 +bolfenk MACH_BOLFENK BOLFENK 449 +at91rm9200kr MACH_AT91RM9200KR AT91RM9200KR 450 +edb9312 MACH_EDB9312 EDB9312 451 +omap_generic MACH_OMAP_GENERIC OMAP_GENERIC 452 +aximx3 MACH_AXIMX3 AXIMX3 453 +eb67xdip MACH_EB67XDIP EB67XDIP 454 +webtxs MACH_WEBTXS WEBTXS 455 +hawk MACH_HAWK HAWK 456 +ccat91sbc001 MACH_CCAT91SBC001 CCAT91SBC001 457 +expresso MACH_EXPRESSO EXPRESSO 458 +h4000 MACH_H4000 H4000 459 +dino MACH_DINO DINO 460 +ml675k MACH_ML675K ML675K 461 +edb9301 MACH_EDB9301 EDB9301 462 +edb9315 MACH_EDB9315 EDB9315 463 +reciva_tt MACH_RECIVA_TT RECIVA_TT 464 +cstcb01 MACH_CSTCB01 CSTCB01 465 +cstcb1 MACH_CSTCB1 CSTCB1 466 +shadwell MACH_SHADWELL SHADWELL 467 +goepel263 MACH_GOEPEL263 GOEPEL263 468 +acq100 MACH_ACQ100 ACQ100 469 +mx1fs2 MACH_MX1FS2 MX1FS2 470 +hiptop_g1 MACH_HIPTOP_G1 HIPTOP_G1 471 +sparky MACH_SPARKY SPARKY 472 +ns9750 MACH_NS9750 NS9750 473 +phoenix MACH_PHOENIX PHOENIX 474 +vr1000 MACH_VR1000 VR1000 475 +deisterpxa MACH_DEISTERPXA DEISTERPXA 476 +bcm1160 MACH_BCM1160 BCM1160 477 +pcm022 MACH_PCM022 PCM022 478 +adsgcx MACH_ADSGCX ADSGCX 479 +dreadnaught MACH_DREADNAUGHT DREADNAUGHT 480 +dm320 MACH_DM320 DM320 481 +markov MACH_MARKOV MARKOV 482 +cos7a400 MACH_COS7A400 COS7A400 483 +milano MACH_MILANO MILANO 484 +ue9328 MACH_UE9328 UE9328 485 +uex255 MACH_UEX255 UEX255 486 +ue2410 MACH_UE2410 UE2410 487 +a620 MACH_A620 A620 488 +ocelot MACH_OCELOT OCELOT 489 +cheetah MACH_CHEETAH CHEETAH 490 +omap_perseus2 MACH_OMAP_PERSEUS2 OMAP_PERSEUS2 491 +zvue MACH_ZVUE ZVUE 492 +roverp1 MACH_ROVERP1 ROVERP1 493 +asidial2 MACH_ASIDIAL2 ASIDIAL2 494 +s3c24a0 MACH_S3C24A0 S3C24A0 495 +e800 MACH_E800 E800 496 +e750 MACH_E750 E750 497 +s3c5500 MACH_S3C5500 S3C5500 498 +smdk5500 MACH_SMDK5500 SMDK5500 499 +signalsync MACH_SIGNALSYNC SIGNALSYNC 500 +nbc MACH_NBC NBC 501 +kodiak MACH_KODIAK KODIAK 502 +netbookpro MACH_NETBOOKPRO NETBOOKPRO 503 +hw90200 MACH_HW90200 HW90200 504 +condor MACH_CONDOR CONDOR 505 +cup MACH_CUP CUP 506 +kite MACH_KITE KITE 507 +scb9328 MACH_SCB9328 SCB9328 508 +omap_h3 MACH_OMAP_H3 OMAP_H3 509 +omap_h4 MACH_OMAP_H4 OMAP_H4 510 +n10 MACH_N10 N10 511 +montejade MACH_MONTAJADE MONTAJADE 512 +sg560 MACH_SG560 SG560 513 +dp1000 MACH_DP1000 DP1000 514 +omap_osk MACH_OMAP_OSK OMAP_OSK 515 +rg100v3 MACH_RG100V3 RG100V3 516 +mx2ads MACH_MX2ADS MX2ADS 517 +pxa_kilo MACH_PXA_KILO PXA_KILO 518 +ixp4xx_eagle MACH_IXP4XX_EAGLE IXP4XX_EAGLE 519 +tosa MACH_TOSA TOSA 520 +mb2520f MACH_MB2520F MB2520F 521 +emc1000 MACH_EMC1000 EMC1000 522 +tidsc25 MACH_TIDSC25 TIDSC25 523 +akcpmxl MACH_AKCPMXL AKCPMXL 524 +av3xx MACH_AV3XX AV3XX 525 +avila MACH_AVILA AVILA 526 +pxa_mpm10 MACH_PXA_MPM10 PXA_MPM10 527 +pxa_kyanite MACH_PXA_KYANITE PXA_KYANITE 528 +sgold MACH_SGOLD SGOLD 529 +oscar MACH_OSCAR OSCAR 530 +epxa4usb2 MACH_EPXA4USB2 EPXA4USB2 531 +xsengine MACH_XSENGINE XSENGINE 532 +ip600 MACH_IP600 IP600 533 +mcan2 MACH_MCAN2 MCAN2 534 +ddi_blueridge MACH_DDI_BLUERIDGE DDI_BLUERIDGE 535 +skyminder MACH_SKYMINDER SKYMINDER 536 +lpd79520 MACH_LPD79520 LPD79520 537 +edb9302 MACH_EDB9302 EDB9302 538 +hw90340 MACH_HW90340 HW90340 539 +cip_box MACH_CIP_BOX CIP_BOX 540 +ivpn MACH_IVPN IVPN 541 +rsoc2 MACH_RSOC2 RSOC2 542 +husky MACH_HUSKY HUSKY 543 +boxer MACH_BOXER BOXER 544 +shepherd MACH_SHEPHERD SHEPHERD 545 +aml42800aa MACH_AML42800AA AML42800AA 546 +lpc2294 MACH_LPC2294 LPC2294 548 +switchgrass MACH_SWITCHGRASS SWITCHGRASS 549 +ens_cmu MACH_ENS_CMU ENS_CMU 550 +mm6_sdb MACH_MM6_SDB MM6_SDB 551 +saturn MACH_SATURN SATURN 552 +i30030evb MACH_I30030EVB I30030EVB 553 +mxc27530evb MACH_MXC27530EVB MXC27530EVB 554 +smdk2800 MACH_SMDK2800 SMDK2800 555 +mtwilson MACH_MTWILSON MTWILSON 556 +ziti MACH_ZITI ZITI 557 +grandfather MACH_GRANDFATHER GRANDFATHER 558 +tengine MACH_TENGINE TENGINE 559 +s3c2460 MACH_S3C2460 S3C2460 560 +pdm MACH_PDM PDM 561 +h4700 MACH_H4700 H4700 562 +h6300 MACH_H6300 H6300 563 +rz1700 MACH_RZ1700 RZ1700 564 +a716 MACH_A716 A716 565 +estk2440a MACH_ESTK2440A ESTK2440A 566 +atwixp425 MACH_ATWIXP425 ATWIXP425 567 +csb336 MACH_CSB336 CSB336 568 +rirm2 MACH_RIRM2 RIRM2 569 +cx23518 MACH_CX23518 CX23518 570 +cx2351x MACH_CX2351X CX2351X 571 +computime MACH_COMPUTIME COMPUTIME 572 +izarus MACH_IZARUS IZARUS 573 +pxa_rts MACH_RTS RTS 574 +se5100 MACH_SE5100 SE5100 575 +s3c2510 MACH_S3C2510 S3C2510 576 +csb437tl MACH_CSB437TL CSB437TL 577 +slauson MACH_SLAUSON SLAUSON 578 +pearlriver MACH_PEARLRIVER PEARLRIVER 579 +tdc_p210 MACH_TDC_P210 TDC_P210 580 +sg580 MACH_SG580 SG580 581 +wrsbcarm7 MACH_WRSBCARM7 WRSBCARM7 582 +ipd MACH_IPD IPD 583 +pxa_dnp2110 MACH_PXA_DNP2110 PXA_DNP2110 584 +xaeniax MACH_XAENIAX XAENIAX 585 +somn4250 MACH_SOMN4250 SOMN4250 586 +pleb2 MACH_PLEB2 PLEB2 587 +cornwallis MACH_CORNWALLIS CORNWALLIS 588 +gurney_drv MACH_GURNEY_DRV GURNEY_DRV 589 +chaffee MACH_CHAFFEE CHAFFEE 590 +rms101 MACH_RMS101 RMS101 591 +rx3715 MACH_RX3715 RX3715 592 +swift MACH_SWIFT SWIFT 593 +roverp7 MACH_ROVERP7 ROVERP7 594 +pr818s MACH_PR818S PR818S 595 +trxpro MACH_TRXPRO TRXPRO 596 +nslu2 MACH_NSLU2 NSLU2 597 +e400 MACH_E400 E400 598 +trab MACH_TRAB TRAB 599 +cmc_pu2 MACH_CMC_PU2 CMC_PU2 600 +fulcrum MACH_FULCRUM FULCRUM 601 +netgate42x MACH_NETGATE42X NETGATE42X 602 +str710 MACH_STR710 STR710 603 +ixdpg425 MACH_IXDPG425 IXDPG425 604 +tomtomgo MACH_TOMTOMGO TOMTOMGO 605 +versatile_ab MACH_VERSATILE_AB VERSATILE_AB 606 +edb9307 MACH_EDB9307 EDB9307 607 +sg565 MACH_SG565 SG565 608 +lpd79524 MACH_LPD79524 LPD79524 609 +lpd79525 MACH_LPD79525 LPD79525 610 +rms100 MACH_RMS100 RMS100 611 +kb9200 MACH_KB9200 KB9200 612 +sx1 MACH_SX1 SX1 613 +hms39c7092 MACH_HMS39C7092 HMS39C7092 614 +armadillo MACH_ARMADILLO ARMADILLO 615 +ipcu MACH_IPCU IPCU 616 +loox720 MACH_LOOX720 LOOX720 617 +ixdp465 MACH_IXDP465 IXDP465 618 +ixdp2351 MACH_IXDP2351 IXDP2351 619 +adsvix MACH_ADSVIX ADSVIX 620 +dm270 MACH_DM270 DM270 621 +socltplus MACH_SOCLTPLUS SOCLTPLUS 622 +ecia MACH_ECIA ECIA 623 +cm4008 MACH_CM4008 CM4008 624 +p2001 MACH_P2001 P2001 625 +twister MACH_TWISTER TWISTER 626 +mudshark MACH_MUDSHARK MUDSHARK 627 +hb2 MACH_HB2 HB2 628 +iq80332 MACH_IQ80332 IQ80332 629 +sendt MACH_SENDT SENDT 630 +mx2jazz MACH_MX2JAZZ MX2JAZZ 631 +multiio MACH_MULTIIO MULTIIO 632 +hrdisplay MACH_HRDISPLAY HRDISPLAY 633 +mxc27530ads MACH_MXC27530ADS MXC27530ADS 634 +trizeps3 MACH_TRIZEPS3 TRIZEPS3 635 +zefeerdza MACH_ZEFEERDZA ZEFEERDZA 636 +zefeerdzb MACH_ZEFEERDZB ZEFEERDZB 637 +zefeerdzg MACH_ZEFEERDZG ZEFEERDZG 638 +zefeerdzn MACH_ZEFEERDZN ZEFEERDZN 639 +zefeerdzq MACH_ZEFEERDZQ ZEFEERDZQ 640 +gtwx5715 MACH_GTWX5715 GTWX5715 641 +astro_jack MACH_ASTRO_JACK ASTRO_JACK 643 +tip03 MACH_TIP03 TIP03 644 +a9200ec MACH_A9200EC A9200EC 645 +pnx0105 MACH_PNX0105 PNX0105 646 +adcpoecpu MACH_ADCPOECPU ADCPOECPU 647 +csb637 MACH_CSB637 CSB637 648 +mb9200 MACH_MB9200 MB9200 650 +kulun MACH_KULUN KULUN 651 +snapper MACH_SNAPPER SNAPPER 652 +optima MACH_OPTIMA OPTIMA 653 +dlhsbc MACH_DLHSBC DLHSBC 654 +x30 MACH_X30 X30 655 +n30 MACH_N30 N30 656 +manga_ks8695 MACH_MANGA_KS8695 MANGA_KS8695 657 +ajax MACH_AJAX AJAX 658 +nec_mp900 MACH_NEC_MP900 NEC_MP900 659 +vvtk1000 MACH_VVTK1000 VVTK1000 661 +kafa MACH_KAFA KAFA 662 +vvtk3000 MACH_VVTK3000 VVTK3000 663 +pimx1 MACH_PIMX1 PIMX1 664 +ollie MACH_OLLIE OLLIE 665 +skymax MACH_SKYMAX SKYMAX 666 +jazz MACH_JAZZ JAZZ 667 +tel_t3 MACH_TEL_T3 TEL_T3 668 +aisino_fcr255 MACH_AISINO_FCR255 AISINO_FCR255 669 +btweb MACH_BTWEB BTWEB 670 +dbg_lh79520 MACH_DBG_LH79520 DBG_LH79520 671 +cm41xx MACH_CM41XX CM41XX 672 +ts72xx MACH_TS72XX TS72XX 673 +nggpxa MACH_NGGPXA NGGPXA 674 +csb535 MACH_CSB535 CSB535 675 +csb536 MACH_CSB536 CSB536 676 +pxa_trakpod MACH_PXA_TRAKPOD PXA_TRAKPOD 677 +praxis MACH_PRAXIS PRAXIS 678 +lh75411 MACH_LH75411 LH75411 679 +otom MACH_OTOM OTOM 680 +nexcoder_2440 MACH_NEXCODER_2440 NEXCODER_2440 681 +loox410 MACH_LOOX410 LOOX410 682 +westlake MACH_WESTLAKE WESTLAKE 683 +nsb MACH_NSB NSB 684 +esl_sarva_stn MACH_ESL_SARVA_STN ESL_SARVA_STN 685 +esl_sarva_tft MACH_ESL_SARVA_TFT ESL_SARVA_TFT 686 +esl_sarva_iad MACH_ESL_SARVA_IAD ESL_SARVA_IAD 687 +esl_sarva_acc MACH_ESL_SARVA_ACC ESL_SARVA_ACC 688 +typhoon MACH_TYPHOON TYPHOON 689 +cnav MACH_CNAV CNAV 690 +a730 MACH_A730 A730 691 +netstar MACH_NETSTAR NETSTAR 692 +supercon MACH_PHASEFALE_SUPERCON PHASEFALE_SUPERCON 693 +shiva1100 MACH_SHIVA1100 SHIVA1100 694 +etexsc MACH_ETEXSC ETEXSC 695 +ixdpg465 MACH_IXDPG465 IXDPG465 696 +a9m2410 MACH_A9M2410 A9M2410 697 +a9m2440 MACH_A9M2440 A9M2440 698 +a9m9750 MACH_A9M9750 A9M9750 699 +a9m9360 MACH_A9M9360 A9M9360 700 +unc90 MACH_UNC90 UNC90 701 +eco920 MACH_ECO920 ECO920 702 +satview MACH_SATVIEW SATVIEW 703 +roadrunner MACH_ROADRUNNER ROADRUNNER 704 +at91rm9200ek MACH_AT91RM9200EK AT91RM9200EK 705 +gp32 MACH_GP32 GP32 706 +gem MACH_GEM GEM 707 +i858 MACH_I858 I858 708 +hx2750 MACH_HX2750 HX2750 709 +mxc91131evb MACH_MXC91131EVB MXC91131EVB 710 +p700 MACH_P700 P700 711 +cpe MACH_CPE CPE 712 +spitz MACH_SPITZ SPITZ 713 +nimbra340 MACH_NIMBRA340 NIMBRA340 714 +lpc22xx MACH_LPC22XX LPC22XX 715 +omap_comet3 MACH_COMET3 COMET3 716 +omap_comet4 MACH_COMET4 COMET4 717 +csb625 MACH_CSB625 CSB625 718 +fortunet2 MACH_FORTUNET2 FORTUNET2 719 +s5h2200 MACH_S5H2200 S5H2200 720 +optorm920 MACH_OPTORM920 OPTORM920 721 +adsbitsyxb MACH_ADSBITSYXB ADSBITSYXB 722 +adssphere MACH_ADSSPHERE ADSSPHERE 723 +adsportal MACH_ADSPORTAL ADSPORTAL 724 +ln2410sbc MACH_LN2410SBC LN2410SBC 725 +cb3rufc MACH_CB3RUFC CB3RUFC 726 +mp2usb MACH_MP2USB MP2USB 727 +ntnp425c MACH_NTNP425C NTNP425C 728 +colibri MACH_COLIBRI COLIBRI 729 +pcm7220 MACH_PCM7220 PCM7220 730 +gateway7001 MACH_GATEWAY7001 GATEWAY7001 731 +pcm027 MACH_PCM027 PCM027 732 +cmpxa MACH_CMPXA CMPXA 733 +anubis MACH_ANUBIS ANUBIS 734 +ite8152 MACH_ITE8152 ITE8152 735 +lpc3xxx MACH_LPC3XXX LPC3XXX 736 +puppeteer MACH_PUPPETEER PUPPETEER 737 +e570 MACH_E570 E570 739 +x50 MACH_X50 X50 740 +recon MACH_RECON RECON 741 +xboardgp8 MACH_XBOARDGP8 XBOARDGP8 742 +fpic2 MACH_FPIC2 FPIC2 743 +akita MACH_AKITA AKITA 744 +a81 MACH_A81 A81 745 +svm_sc25x MACH_SVM_SC25X SVM_SC25X 746 +vt020 MACH_VADATECH020 VADATECH020 747 +tli MACH_TLI TLI 748 +edb9315lc MACH_EDB9315LC EDB9315LC 749 +passec MACH_PASSEC PASSEC 750 +ds_tiger MACH_DS_TIGER DS_TIGER 751 +e310 MACH_E310 E310 752 +e330 MACH_E330 E330 753 +rt3000 MACH_RT3000 RT3000 754 +nokia770 MACH_NOKIA770 NOKIA770 755 +pnx0106 MACH_PNX0106 PNX0106 756 +hx21xx MACH_HX21XX HX21XX 757 +faraday MACH_FARADAY FARADAY 758 +sbc9312 MACH_SBC9312 SBC9312 759 +batman MACH_BATMAN BATMAN 760 +jpd201 MACH_JPD201 JPD201 761 +mipsa MACH_MIPSA MIPSA 762 +kacom MACH_KACOM KACOM 763 +swarcocpu MACH_SWARCOCPU SWARCOCPU 764 +swarcodsl MACH_SWARCODSL SWARCODSL 765 +blueangel MACH_BLUEANGEL BLUEANGEL 766 +hairygrama MACH_HAIRYGRAMA HAIRYGRAMA 767 +banff MACH_BANFF BANFF 768 +carmeva MACH_CARMEVA CARMEVA 769 +sam255 MACH_SAM255 SAM255 770 +ppm10 MACH_PPM10 PPM10 771 +edb9315a MACH_EDB9315A EDB9315A 772 +sunset MACH_SUNSET SUNSET 773 +stargate2 MACH_STARGATE2 STARGATE2 774 +intelmote2 MACH_INTELMOTE2 INTELMOTE2 775 +trizeps4 MACH_TRIZEPS4 TRIZEPS4 776 +mainstone2 MACH_MAINSTONE2 MAINSTONE2 777 +ez_ixp42x MACH_EZ_IXP42X EZ_IXP42X 778 +tapwave_zodiac MACH_TAPWAVE_ZODIAC TAPWAVE_ZODIAC 779 +universalmeter MACH_UNIVERSALMETER UNIVERSALMETER 780 +hicoarm9 MACH_HICOARM9 HICOARM9 781 +pnx4008 MACH_PNX4008 PNX4008 782 +kws6000 MACH_KWS6000 KWS6000 783 +portux920t MACH_PORTUX920T PORTUX920T 784 +ez_x5 MACH_EZ_X5 EZ_X5 785 +omap_rudolph MACH_OMAP_RUDOLPH OMAP_RUDOLPH 786 +cpuat91 MACH_CPUAT91 CPUAT91 787 +rea9200 MACH_REA9200 REA9200 788 +acts_pune_sa1110 MACH_ACTS_PUNE_SA1110 ACTS_PUNE_SA1110 789 +ixp425 MACH_IXP425 IXP425 790 +i30030ads MACH_I30030ADS I30030ADS 791 +perch MACH_PERCH PERCH 792 +eis05r1 MACH_EIS05R1 EIS05R1 793 +pepperpad MACH_PEPPERPAD PEPPERPAD 794 +sb3010 MACH_SB3010 SB3010 795 +rm9200 MACH_RM9200 RM9200 796 +dma03 MACH_DMA03 DMA03 797 +road_s101 MACH_ROAD_S101 ROAD_S101 798 +iq81340sc MACH_IQ81340SC IQ81340SC 799 +iq_nextgen_b MACH_IQ_NEXTGEN_B IQ_NEXTGEN_B 800 +iq81340mc MACH_IQ81340MC IQ81340MC 801 +iq_nextgen_d MACH_IQ_NEXTGEN_D IQ_NEXTGEN_D 802 +iq_nextgen_e MACH_IQ_NEXTGEN_E IQ_NEXTGEN_E 803 +mallow_at91 MACH_MALLOW_AT91 MALLOW_AT91 804 +cybertracker_i MACH_CYBERTRACKER_I CYBERTRACKER_I 805 +gesbc931x MACH_GESBC931X GESBC931X 806 +centipad MACH_CENTIPAD CENTIPAD 807 +armsoc MACH_ARMSOC ARMSOC 808 +se4200 MACH_SE4200 SE4200 809 +ems197a MACH_EMS197A EMS197A 810 +micro9 MACH_MICRO9 MICRO9 811 +micro9l MACH_MICRO9L MICRO9L 812 +uc5471dsp MACH_UC5471DSP UC5471DSP 813 +sj5471eng MACH_SJ5471ENG SJ5471ENG 814 +none MACH_CMPXA26X CMPXA26X 815 +nc1 MACH_NC NC 816 +omap_palmte MACH_OMAP_PALMTE OMAP_PALMTE 817 +ajax52x MACH_AJAX52X AJAX52X 818 +siriustar MACH_SIRIUSTAR SIRIUSTAR 819 +iodata_hdlg MACH_IODATA_HDLG IODATA_HDLG 820 +at91rm9200utl MACH_AT91RM9200UTL AT91RM9200UTL 821 +biosafe MACH_BIOSAFE BIOSAFE 822 +mp1000 MACH_MP1000 MP1000 823 +parsy MACH_PARSY PARSY 824 +ccxp270 MACH_CCXP CCXP 825 +omap_gsample MACH_OMAP_GSAMPLE OMAP_GSAMPLE 826 +realview_eb MACH_REALVIEW_EB REALVIEW_EB 827 +samoa MACH_SAMOA SAMOA 828 +palmt3 MACH_PALMT3 PALMT3 829 +i878 MACH_I878 I878 830 +borzoi MACH_BORZOI BORZOI 831 +gecko MACH_GECKO GECKO 832 +ds101 MACH_DS101 DS101 833 +omap_palmtt2 MACH_OMAP_PALMTT2 OMAP_PALMTT2 834 +palmld MACH_PALMLD PALMLD 835 +cc9c MACH_CC9C CC9C 836 +sbc1670 MACH_SBC1670 SBC1670 837 +ixdp28x5 MACH_IXDP28X5 IXDP28X5 838 +omap_palmtt MACH_OMAP_PALMTT OMAP_PALMTT 839 +ml696k MACH_ML696K ML696K 840 +arcom_zeus MACH_ARCOM_ZEUS ARCOM_ZEUS 841 +osiris MACH_OSIRIS OSIRIS 842 +maestro MACH_MAESTRO MAESTRO 843 +palmte2 MACH_PALMTE2 PALMTE2 844 +ixbbm MACH_IXBBM IXBBM 845 +mx27ads MACH_MX27ADS MX27ADS 846 +ax8004 MACH_AX8004 AX8004 847 +at91sam9261ek MACH_AT91SAM9261EK AT91SAM9261EK 848 +loft MACH_LOFT LOFT 849 +magpie MACH_MAGPIE MAGPIE 850 +mx21ads MACH_MX21ADS MX21ADS 851 +mb87m3400 MACH_MB87M3400 MB87M3400 852 +mguard_delta MACH_MGUARD_DELTA MGUARD_DELTA 853 +davinci_dvdp MACH_DAVINCI_DVDP DAVINCI_DVDP 854 +htcuniversal MACH_HTCUNIVERSAL HTCUNIVERSAL 855 +tpad MACH_TPAD TPAD 856 +roverp3 MACH_ROVERP3 ROVERP3 857 +jornada928 MACH_JORNADA928 JORNADA928 858 +mv88fxx81 MACH_MV88FXX81 MV88FXX81 859 +stmp36xx MACH_STMP36XX STMP36XX 860 +sxni79524 MACH_SXNI79524 SXNI79524 861 +ams_delta MACH_AMS_DELTA AMS_DELTA 862 +uranium MACH_URANIUM URANIUM 863 +ucon MACH_UCON UCON 864 +nas100d MACH_NAS100D NAS100D 865 +l083 MACH_L083_1000 L083_1000 866 +ezx MACH_EZX EZX 867 +pnx5220 MACH_PNX5220 PNX5220 868 +butte MACH_BUTTE BUTTE 869 +srm2 MACH_SRM2 SRM2 870 +dsbr MACH_DSBR DSBR 871 +crystalball MACH_CRYSTALBALL CRYSTALBALL 872 +tinypxa27x MACH_TINYPXA27X TINYPXA27X 873 +herbie MACH_HERBIE HERBIE 874 +magician MACH_MAGICIAN MAGICIAN 875 +cm4002 MACH_CM4002 CM4002 876 +b4 MACH_B4 B4 877 +maui MACH_MAUI MAUI 878 +cybertracker_g MACH_CYBERTRACKER_G CYBERTRACKER_G 879 +nxdkn MACH_NXDKN NXDKN 880 +mio8390 MACH_MIO8390 MIO8390 881 +omi_board MACH_OMI_BOARD OMI_BOARD 882 +mx21civ MACH_MX21CIV MX21CIV 883 +mahi_cdac MACH_MAHI_CDAC MAHI_CDAC 884 +palmtx MACH_PALMTX PALMTX 885 +s3c2413 MACH_S3C2413 S3C2413 887 +samsys_ep0 MACH_SAMSYS_EP0 SAMSYS_EP0 888 +wg302v1 MACH_WG302V1 WG302V1 889 +wg302v2 MACH_WG302V2 WG302V2 890 +eb42x MACH_EB42X EB42X 891 +iq331es MACH_IQ331ES IQ331ES 892 +cosydsp MACH_COSYDSP COSYDSP 893 +uplat7d_proto MACH_UPLAT7D UPLAT7D 894 +ptdavinci MACH_PTDAVINCI PTDAVINCI 895 +mbus MACH_MBUS MBUS 896 +nadia2vb MACH_NADIA2VB NADIA2VB 897 +r1000 MACH_R1000 R1000 898 +hw90250 MACH_HW90250 HW90250 899 +omap_2430sdp MACH_OMAP_2430SDP OMAP_2430SDP 900 +davinci_evm MACH_DAVINCI_EVM DAVINCI_EVM 901 +omap_tornado MACH_OMAP_TORNADO OMAP_TORNADO 902 +olocreek MACH_OLOCREEK OLOCREEK 903 +palmz72 MACH_PALMZ72 PALMZ72 904 +nxdb500 MACH_NXDB500 NXDB500 905 +apf9328 MACH_APF9328 APF9328 906 +omap_wipoq MACH_OMAP_WIPOQ OMAP_WIPOQ 907 +omap_twip MACH_OMAP_TWIP OMAP_TWIP 908 +treo650 MACH_TREO650 TREO650 909 +acumen MACH_ACUMEN ACUMEN 910 +xp100 MACH_XP100 XP100 911 +fs2410 MACH_FS2410 FS2410 912 +pxa270_cerf MACH_PXA270_CERF PXA270_CERF 913 +sq2ftlpalm MACH_SQ2FTLPALM SQ2FTLPALM 914 +bsemserver MACH_BSEMSERVER BSEMSERVER 915 +netclient MACH_NETCLIENT NETCLIENT 916 +palmt5 MACH_PALMT5 PALMT5 917 +palmtc MACH_PALMTC PALMTC 918 +omap_apollon MACH_OMAP_APOLLON OMAP_APOLLON 919 +mxc30030evb MACH_MXC30030EVB MXC30030EVB 920 +rea_cpu2 MACH_REA_2D REA_2D 921 +eti3e524 MACH_TI3E524 TI3E524 922 +ateb9200 MACH_ATEB9200 ATEB9200 923 +auckland MACH_AUCKLAND AUCKLAND 924 +ak3220m MACH_AK3320M AK3320M 925 +duramax MACH_DURAMAX DURAMAX 926 +n35 MACH_N35 N35 927 +pronghorn MACH_PRONGHORN PRONGHORN 928 +fundy MACH_FUNDY FUNDY 929 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu May 10 18:10:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B65A0106566C; Thu, 10 May 2012 18:10:20 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A0A258FC1D; Thu, 10 May 2012 18:10:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4AIAKsg046046; Thu, 10 May 2012 18:10:20 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4AIAKvS046044; Thu, 10 May 2012 18:10:20 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201205101810.q4AIAKvS046044@svn.freebsd.org> From: Bernhard Schmidt Date: Thu, 10 May 2012 18:10: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: r235235 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2012 18:10:20 -0000 Author: bschmidt Date: Thu May 10 18:10:20 2012 New Revision: 235235 URL: http://svn.freebsd.org/changeset/base/235235 Log: Update man page due import of RT2800/RT3000 support. Obtained from: OpenBSD MFC after: 3 weeks Modified: head/share/man/man4/ral.4 Modified: head/share/man/man4/ral.4 ============================================================================== --- head/share/man/man4/ral.4 Thu May 10 18:06:00 2012 (r235234) +++ head/share/man/man4/ral.4 Thu May 10 18:10:20 2012 (r235235) @@ -1,5 +1,4 @@ -.\" Copyright (c) 2005, 2006 -.\" Damien Bergamini +.\" Copyright (c) 2005-2010 Damien Bergamini .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above @@ -15,12 +14,12 @@ .\" .\" $FreeBSD$ .\" -.Dd July 8, 2009 +.Dd May 10, 2012 .Dt RAL 4 .Os .Sh NAME .Nm ral -.Nd "Ralink Technology IEEE 802.11 wireless network driver" +.Nd "Ralink Technology IEEE 802.11a/g/n wireless network device" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -42,31 +41,43 @@ if_ral_load="YES" .Sh DESCRIPTION The .Nm -driver supports PCI/CardBus wireless adapters based on the Ralink Technology -RT2500, RT2501, and RT2600 chipsets. +driver supports PCI/PCIe/CardBus wireless adapters based on the Ralink RT2500, +RT2501, RT2600, RT2700, RT2800 and RT3090 chipsets. .Pp The RT2500 chipset is the first generation of 802.11b/g adapters from Ralink. -It consists of two integrated chips, a RT2560 MAC/BBP and a RT2525 radio +It consists of two integrated chips, an RT2560 MAC/BBP and an RT2525 radio transceiver. .Pp -The RT2501 chipset is the second generation of 802.11b/g adapters from Ralink. -It consists of two integrated chips, a RT2561 MAC/BBP and a RT2527 radio +The RT2501 chipset is the second generation of 802.11a/b/g adapters from +Ralink. +It consists of two integrated chips, an RT2561 MAC/BBP and an RT2527 radio transceiver. This chipset provides support for the IEEE 802.11e standard with multiple hardware transmission queues and allows scatter/gather for efficient DMA operations. .Pp -The RT2600 chipset consists of two integrated chips, a RT2661 MAC/BBP and a +The RT2600 chipset consists of two integrated chips, an RT2661 MAC/BBP and an RT2529 radio transceiver. This chipset uses the MIMO (multiple-input multiple-output) technology with -multiple antennas to extend the operating range of the adapter and to achieve -higher throughput. -MIMO is the basis of the forthcoming IEEE 802.11n standard. -.Pp -The transmit speed is user-selectable or can be adapted automatically by the -driver depending on the received signal strength and on the number of hardware -transmission retries. +multiple radio transceivers to extend the operating range of the adapter and +to achieve higher throughput. +However, the RT2600 chipset does not support any of the 802.11n features. +.Pp +The RT2700 chipset is a low-cost version of the RT2800 chipset. +It supports a single transmit path and two receiver paths (1T2R). +It consists of two integrated chips, an RT2760 or RT2790 (PCIe) MAC/BBP and +an RT2720 (2.4GHz) or RT2750 (2.4GHz/5GHz) radio transceiver. +.Pp +The RT2800 chipset is the first generation of 802.11n adapters from Ralink. +It consists of two integrated chips, an RT2860 or RT2890 (PCIe) MAC/BBP and +an RT2820 (2.4GHz) or RT2850 (2.4GHz/5GHz) radio transceiver. +The RT2800 chipset supports two transmit paths and up to three receiver +paths (2T2R/2T3R). +It can achieve speeds up to 144Mbps (20MHz bandwidth) and 300Mbps (40MHz +bandwidth.) .Pp +The RT3090 chipset is the first generation of single-chip 802.11n adapters +from Ralink. .Nm supports .Cm station , @@ -92,13 +103,16 @@ Multiple interfaces may be operated together with a .Cm hostap interface to construct a wireless repeater device. +.Pp +The transmit speed is user-selectable or can be adapted automatically by the +driver depending on the number of hardware transmission retries. For more information on configuring this device, see .Xr ifconfig 8 . .Sh HARDWARE The .Nm -driver supports PCI/CardBus wireless adapters based on the Ralink Technology -RT2500, RT2501, and RT2600 chipsets, including: +driver supports PCI/PCIe/CardBus wireless adapters based on Ralink Technology +chipsets, including: .Pp .Bl -column -compact ".Li Atlantis Land A02-PCM-W54" "RT2561S" "CardBus" .It Em Card Ta Em MAC/BBP Ta Em Bus @@ -188,9 +202,6 @@ RT2500, RT2501, and RT2600 chipsets, inc .It "Zonet ZEW1500" Ta RT2560 Ta CardBus .It "Zonet ZEW1600" Ta RT2560 Ta PCI .El -.Pp -An up to date list can be found at -.Pa http://damien.bergamini.free.fr/ral/list.html . .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): .Pp @@ -239,6 +250,7 @@ This should not happen. .Xr hostapd 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 . +.Xr ifconfig 8 .Rs .%T "Ralink Technology" .%U http://www.ralinktech.com/ @@ -248,12 +260,37 @@ The .Nm driver first appeared in .Ox 3.7 . +Support for the RT2501 and RT2600 chipsets was added in +.Ox 3.9 . +Support for the RT2800 chipset was added in +.Ox 4.3 . +Support for the RT2700 chipset was added in +.Ox 4.4 . +Support for the RT3090 chipset was added in +.Ox 4.9 . .Sh AUTHORS The original .Nm driver was written by -.An Damien Bergamini Aq damien@FreeBSD.org . -.Sh BUGS -Host AP mode doesn't support client power save. -Clients using power save mode will experience +.An Damien Bergamini Aq damien@openbsd.org . +.Sh CAVEATS +The +.Nm +driver does not make use of the hardware cryptographic engine. +.Pp +The +.Nm +driver does not support any of the 802.11n capabilities offered by +the RT2700 and RT2800 chipsets. +Additional work is required in before those features can be supported. +.Pp +Host AP mode doesn't support power saving. +Clients attempting to use power saving mode may experience significant packet loss (disabling power saving on the client will fix this). +.Pp +Some PCI +.Nm +adapters seem to strictly require a system supporting PCI 2.2 or greater and +will likely not work in systems based on older revisions of the PCI +specification. +Check the board's PCI version before purchasing the card. From owner-svn-src-head@FreeBSD.ORG Thu May 10 18:14:25 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B8701106566C; Thu, 10 May 2012 18:14:25 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4A378FC0A; Thu, 10 May 2012 18:14:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4AIEP3o046208; Thu, 10 May 2012 18:14:25 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4AIEP0h046206; Thu, 10 May 2012 18:14:25 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201205101814.q4AIEP0h046206@svn.freebsd.org> From: Bernhard Schmidt Date: Thu, 10 May 2012 18:14:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235236 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2012 18:14:25 -0000 Author: bschmidt Date: Thu May 10 18:14:25 2012 New Revision: 235236 URL: http://svn.freebsd.org/changeset/base/235236 Log: ifconfig(8) is important, but no need to mention it twice. MFC after: 3 weeks Modified: head/share/man/man4/ral.4 Modified: head/share/man/man4/ral.4 ============================================================================== --- head/share/man/man4/ral.4 Thu May 10 18:10:20 2012 (r235235) +++ head/share/man/man4/ral.4 Thu May 10 18:14:25 2012 (r235236) @@ -250,7 +250,6 @@ This should not happen. .Xr hostapd 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 . -.Xr ifconfig 8 .Rs .%T "Ralink Technology" .%U http://www.ralinktech.com/ From owner-svn-src-head@FreeBSD.ORG Thu May 10 18:26:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 385261065672; Thu, 10 May 2012 18:26:00 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 245F98FC0A; Thu, 10 May 2012 18:26:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4AIQ0A5046580; Thu, 10 May 2012 18:26:00 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4AIPxcH046578; Thu, 10 May 2012 18:25:59 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201205101825.q4AIPxcH046578@svn.freebsd.org> From: Bernhard Schmidt Date: Thu, 10 May 2012 18:25: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: r235237 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2012 18:26:00 -0000 Author: bschmidt Date: Thu May 10 18:25:59 2012 New Revision: 235237 URL: http://svn.freebsd.org/changeset/base/235237 Log: remove trailing '.' Poked by: gjb MFC after: 3 weeks Modified: head/share/man/man4/ral.4 Modified: head/share/man/man4/ral.4 ============================================================================== --- head/share/man/man4/ral.4 Thu May 10 18:14:25 2012 (r235236) +++ head/share/man/man4/ral.4 Thu May 10 18:25:59 2012 (r235237) @@ -249,7 +249,7 @@ This should not happen. .Xr wlan_xauth 4 , .Xr hostapd 8 , .Xr ifconfig 8 , -.Xr wpa_supplicant 8 . +.Xr wpa_supplicant 8 .Rs .%T "Ralink Technology" .%U http://www.ralinktech.com/ From owner-svn-src-head@FreeBSD.ORG Thu May 10 18:29:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8B6951065674; Thu, 10 May 2012 18:29:41 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 744A98FC16; Thu, 10 May 2012 18:29:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4AITfxE046738; Thu, 10 May 2012 18:29:41 GMT (envelope-from jasone@svn.freebsd.org) Received: (from jasone@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4AITf6c046727; Thu, 10 May 2012 18:29:41 GMT (envelope-from jasone@svn.freebsd.org) Message-Id: <201205101829.q4AITf6c046727@svn.freebsd.org> From: Jason Evans Date: Thu, 10 May 2012 18:29: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: r235238 - in head/contrib/jemalloc: . doc include/jemalloc include/jemalloc/internal src X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2012 18:29:41 -0000 Author: jasone Date: Thu May 10 18:29:40 2012 New Revision: 235238 URL: http://svn.freebsd.org/changeset/base/235238 Log: Import jemalloc 37b6f95dcd866f51c91488531a2efc3ed4c2b754 (dev branch, prior to 3.0.0 release). This version is likely very close to what will be 3.0.0. Modified: head/contrib/jemalloc/ChangeLog head/contrib/jemalloc/FREEBSD-Xlist head/contrib/jemalloc/FREEBSD-diffs head/contrib/jemalloc/VERSION head/contrib/jemalloc/doc/jemalloc.3 head/contrib/jemalloc/include/jemalloc/internal/arena.h head/contrib/jemalloc/include/jemalloc/internal/atomic.h head/contrib/jemalloc/include/jemalloc/internal/ctl.h head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h head/contrib/jemalloc/include/jemalloc/internal/mutex.h head/contrib/jemalloc/include/jemalloc/internal/private_namespace.h head/contrib/jemalloc/include/jemalloc/internal/prof.h head/contrib/jemalloc/include/jemalloc/internal/tcache.h head/contrib/jemalloc/include/jemalloc/internal/tsd.h head/contrib/jemalloc/include/jemalloc/internal/util.h head/contrib/jemalloc/include/jemalloc/jemalloc.h head/contrib/jemalloc/include/jemalloc/jemalloc_defs.h head/contrib/jemalloc/src/arena.c head/contrib/jemalloc/src/chunk.c head/contrib/jemalloc/src/chunk_mmap.c head/contrib/jemalloc/src/ctl.c head/contrib/jemalloc/src/huge.c head/contrib/jemalloc/src/jemalloc.c head/contrib/jemalloc/src/mutex.c head/contrib/jemalloc/src/prof.c head/contrib/jemalloc/src/quarantine.c head/contrib/jemalloc/src/stats.c head/contrib/jemalloc/src/tcache.c head/contrib/jemalloc/src/tsd.c head/contrib/jemalloc/src/util.c Modified: head/contrib/jemalloc/ChangeLog ============================================================================== --- head/contrib/jemalloc/ChangeLog Thu May 10 18:25:59 2012 (r235237) +++ head/contrib/jemalloc/ChangeLog Thu May 10 18:29:40 2012 (r235238) @@ -19,9 +19,10 @@ found in the git revision history: New features: - Implement Valgrind support, redzones, and quarantine. - - Add support for additional operating systems: + - Add support for additional platforms: + FreeBSD + Mac OS X Lion + + MinGW - Add support for additional architectures: + MIPS + SH4 @@ -64,18 +65,24 @@ found in the git revision history: - Remove the --enable-sysv configure option. Bug fixes: - - Fix fork-related bugs that could cause deadlock in children between fork - and exec. - Fix a statistics-related bug in the "thread.arena" mallctl that could cause invalid statistics and crashes. - - Work around TLS dallocation via free() on Linux. This bug could cause + - Work around TLS deallocation via free() on Linux. This bug could cause write-after-free memory corruption. + - Fix a potential deadlock that could occur during interval- and + growth-triggered heap profile dumps. - Fix chunk_alloc_dss() to stop claiming memory is zeroed. This bug could cause memory corruption and crashes with --enable-dss specified. + - Fix fork-related bugs that could cause deadlock in children between fork + and exec. - Fix malloc_stats_print() to honor 'b' and 'l' in the opts parameter. - Fix realloc(p, 0) to act like free(p). - Do not enforce minimum alignment in memalign(). - Check for NULL pointer in malloc_usable_size(). + - Fix an off-by-one heap profile statistics bug that could be observed in + interval- and growth-triggered heap profiles. + - Fix the "epoch" mallctl to update cached stats even if the passed in epoch + is 0. - Fix bin->runcur management to fix a layout policy bug. This bug did not affect correctness. - Fix a bug in choose_arena_hard() that potentially caused more arenas to be Modified: head/contrib/jemalloc/FREEBSD-Xlist ============================================================================== --- head/contrib/jemalloc/FREEBSD-Xlist Thu May 10 18:25:59 2012 (r235237) +++ head/contrib/jemalloc/FREEBSD-Xlist Thu May 10 18:29:40 2012 (r235238) @@ -18,6 +18,7 @@ include/jemalloc/internal/jemalloc_inter include/jemalloc/internal/size_classes.sh include/jemalloc/jemalloc.h.in include/jemalloc/jemalloc_defs.h.in +include/msvc_compat/ install-sh src/zone.c test/ Modified: head/contrib/jemalloc/FREEBSD-diffs ============================================================================== --- head/contrib/jemalloc/FREEBSD-diffs Thu May 10 18:25:59 2012 (r235237) +++ head/contrib/jemalloc/FREEBSD-diffs Thu May 10 18:29:40 2012 (r235238) @@ -1,5 +1,5 @@ diff --git a/doc/jemalloc.xml.in b/doc/jemalloc.xml.in -index e8a5722..cec85b5 100644 +index 93c16dc..b5c5595 100644 --- a/doc/jemalloc.xml.in +++ b/doc/jemalloc.xml.in @@ -51,12 +51,23 @@ @@ -27,7 +27,7 @@ index e8a5722..cec85b5 100644 Standard API -@@ -2091,4 +2102,16 @@ malloc_conf = "lg_chunk:24";]]> +@@ -2101,4 +2112,16 @@ malloc_conf = "lg_chunk:24";]]> The posix_memalign function conforms to IEEE Std 1003.1-2001 (“POSIX.1”). @@ -45,7 +45,7 @@ index e8a5722..cec85b5 100644 + diff --git a/include/jemalloc/internal/jemalloc_internal.h.in b/include/jemalloc/internal/jemalloc_internal.h.in -index b61abe8..edbb437 100644 +index 268cd14..cfb1fb9 100644 --- a/include/jemalloc/internal/jemalloc_internal.h.in +++ b/include/jemalloc/internal/jemalloc_internal.h.in @@ -1,5 +1,8 @@ @@ -54,12 +54,12 @@ index b61abe8..edbb437 100644 +#include "libc_private.h" +#include "namespace.h" + - #include - #include - #include -@@ -35,6 +38,9 @@ - #include #include + #ifdef _WIN32 + # include +@@ -54,6 +57,9 @@ typedef intptr_t ssize_t; + #endif + #include +#include "un-namespace.h" +#include "libc_private.h" @@ -68,10 +68,10 @@ index b61abe8..edbb437 100644 #include "../jemalloc@install_suffix@.h" diff --git a/include/jemalloc/internal/mutex.h b/include/jemalloc/internal/mutex.h -index 8837ef5..d7133f4 100644 +index de44e14..564d604 100644 --- a/include/jemalloc/internal/mutex.h +++ b/include/jemalloc/internal/mutex.h -@@ -39,9 +39,6 @@ struct malloc_mutex_s { +@@ -43,9 +43,6 @@ struct malloc_mutex_s { #ifdef JEMALLOC_LAZY_LOCK extern bool isthreaded; @@ -82,10 +82,10 @@ index 8837ef5..d7133f4 100644 bool malloc_mutex_init(malloc_mutex_t *mutex); diff --git a/include/jemalloc/internal/private_namespace.h b/include/jemalloc/internal/private_namespace.h -index bb1b63e..00eb169 100644 +index b816647..b8ce6b1 100644 --- a/include/jemalloc/internal/private_namespace.h +++ b/include/jemalloc/internal/private_namespace.h -@@ -165,7 +165,6 @@ +@@ -186,7 +186,6 @@ #define iqalloc JEMALLOC_N(iqalloc) #define iralloc JEMALLOC_N(iralloc) #define isalloc JEMALLOC_N(isalloc) @@ -94,7 +94,7 @@ index bb1b63e..00eb169 100644 #define jemalloc_postfork_child JEMALLOC_N(jemalloc_postfork_child) #define jemalloc_postfork_parent JEMALLOC_N(jemalloc_postfork_parent) diff --git a/include/jemalloc/jemalloc.h.in b/include/jemalloc/jemalloc.h.in -index f0581db..f26d8bc 100644 +index ad06948..505dd38 100644 --- a/include/jemalloc/jemalloc.h.in +++ b/include/jemalloc/jemalloc.h.in @@ -15,6 +15,7 @@ extern "C" { @@ -107,10 +107,10 @@ index f0581db..f26d8bc 100644 #define ALLOCM_LG_ALIGN(la) (la) diff --git a/include/jemalloc/jemalloc_FreeBSD.h b/include/jemalloc/jemalloc_FreeBSD.h new file mode 100644 -index 0000000..2c5797f +index 0000000..9efab93 --- /dev/null +++ b/include/jemalloc/jemalloc_FreeBSD.h -@@ -0,0 +1,76 @@ +@@ -0,0 +1,80 @@ +/* + * Override settings that were generated in jemalloc_defs.h as necessary. + */ @@ -154,8 +154,12 @@ index 0000000..2c5797f +# define LG_SIZEOF_PTR 2 +#endif +#ifdef __mips__ ++#ifdef __mips_n64 ++# define LG_SIZEOF_PTR 3 ++#else +# define LG_SIZEOF_PTR 2 +#endif ++#endif +#ifdef __powerpc64__ +# define LG_SIZEOF_PTR 3 +#elif defined(__powerpc__) @@ -188,20 +192,21 @@ index 0000000..2c5797f +#define pthread_mutex_lock _pthread_mutex_lock +#define pthread_mutex_unlock _pthread_mutex_unlock diff --git a/src/jemalloc.c b/src/jemalloc.c -index f9c8916..8e24a5a 100644 +index d42e91d..cdf6222 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c -@@ -8,6 +8,9 @@ malloc_tsd_data(, arenas, arena_t *, NULL) +@@ -8,6 +8,10 @@ malloc_tsd_data(, arenas, arena_t *, NULL) malloc_tsd_data(, thread_allocated, thread_allocated_t, THREAD_ALLOCATED_INITIALIZER) -+const char *__malloc_options_1_0; ++/* Work around : */ ++const char *__malloc_options_1_0 = NULL; +__sym_compat(_malloc_options, __malloc_options_1_0, FBSD_1.0); + /* Runtime configuration options. */ - const char *je_malloc_conf JEMALLOC_ATTR(visibility("default")); + const char *je_malloc_conf; #ifdef JEMALLOC_DEBUG -@@ -401,7 +404,8 @@ malloc_conf_init(void) +@@ -429,7 +433,8 @@ malloc_conf_init(void) #endif ; @@ -212,10 +217,10 @@ index f9c8916..8e24a5a 100644 * Do nothing; opts is already initialized to * the value of the MALLOC_CONF environment diff --git a/src/mutex.c b/src/mutex.c -index 4b8ce57..7be5fc9 100644 +index 37a843e..4a90a05 100644 --- a/src/mutex.c +++ b/src/mutex.c -@@ -63,6 +63,17 @@ pthread_create(pthread_t *__restrict thread, +@@ -66,6 +66,17 @@ pthread_create(pthread_t *__restrict thread, #ifdef JEMALLOC_MUTEX_INIT_CB int _pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex, void *(calloc_cb)(size_t, size_t)); @@ -234,14 +239,14 @@ index 4b8ce57..7be5fc9 100644 bool diff --git a/src/util.c b/src/util.c -index 99ae26d..b80676c 100644 +index 9b73c3e..f94799f 100644 --- a/src/util.c +++ b/src/util.c -@@ -60,6 +60,22 @@ wrtmessage(void *cbopaque, const char *s) - void (*je_malloc_message)(void *, const char *s) - JEMALLOC_ATTR(visibility("default")) = wrtmessage; +@@ -58,6 +58,22 @@ wrtmessage(void *cbopaque, const char *s) + + JEMALLOC_EXPORT void (*je_malloc_message)(void *, const char *s); -+JEMALLOC_CATTR(visibility("hidden"), static) ++JEMALLOC_ATTR(visibility("hidden")) +void +wrtmessage_1_0(const char *s1, const char *s2, const char *s3, + const char *s4) @@ -258,5 +263,5 @@ index 99ae26d..b80676c 100644 +__sym_compat(_malloc_message, __malloc_message_1_0, FBSD_1.0); + /* - * glibc provides a non-standard strerror_r() when _GNU_SOURCE is defined, so - * provide a wrapper. + * Wrapper around malloc_message() that avoids the need for + * je_malloc_message(...) throughout the code. Modified: head/contrib/jemalloc/VERSION ============================================================================== --- head/contrib/jemalloc/VERSION Thu May 10 18:25:59 2012 (r235237) +++ head/contrib/jemalloc/VERSION Thu May 10 18:29:40 2012 (r235238) @@ -1 +1 @@ -1.0.0-286-ga8f8d7540d66ddee7337db80c92890916e1063ca +1.0.0-335-g37b6f95dcd866f51c91488531a2efc3ed4c2b754 Modified: head/contrib/jemalloc/doc/jemalloc.3 ============================================================================== --- head/contrib/jemalloc/doc/jemalloc.3 Thu May 10 18:25:59 2012 (r235237) +++ head/contrib/jemalloc/doc/jemalloc.3 Thu May 10 18:29:40 2012 (r235238) @@ -2,12 +2,12 @@ .\" Title: JEMALLOC .\" Author: Jason Evans .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 04/21/2012 +.\" Date: 05/09/2012 .\" Manual: User Manual -.\" Source: jemalloc 1.0.0-286-ga8f8d7540d66ddee7337db80c92890916e1063ca +.\" Source: jemalloc 1.0.0-335-g37b6f95dcd866f51c91488531a2efc3ed4c2b754 .\" Language: English .\" -.TH "JEMALLOC" "3" "04/21/2012" "jemalloc 1.0.0-286-ga8f8d7540d" "User Manual" +.TH "JEMALLOC" "3" "05/09/2012" "jemalloc 1.0.0-335-g37b6f95dcd" "User Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -31,7 +31,7 @@ jemalloc \- general purpose memory allocation functions .SH "LIBRARY" .PP -This manual describes jemalloc 1\&.0\&.0\-286\-ga8f8d7540d66ddee7337db80c92890916e1063ca\&. More information can be found at the +This manual describes jemalloc 1\&.0\&.0\-335\-g37b6f95dcd866f51c91488531a2efc3ed4c2b754\&. More information can be found at the \m[blue]\fBjemalloc website\fR\m[]\&\s-2\u[1]\d\s+2\&. .PP The following configuration options are enabled in libc\*(Aqs built\-in jemalloc: @@ -567,6 +567,12 @@ was specified during build configuration was specified during build configuration\&. .RE .PP +"config\&.mremap" (\fBbool\fR) r\- +.RS 4 +\fB\-\-enable\-mremap\fR +was specified during build configuration\&. +.RE +.PP "config\&.munmap" (\fBbool\fR) r\- .RS 4 \fB\-\-enable\-munmap\fR @@ -1462,7 +1468,7 @@ jemalloc website .IP " 2." 4 Valgrind .RS 4 -\%http://http://valgrind.org/ +\%http://valgrind.org/ .RE .IP " 3." 4 gperftools package Modified: head/contrib/jemalloc/include/jemalloc/internal/arena.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/arena.h Thu May 10 18:25:59 2012 (r235237) +++ head/contrib/jemalloc/include/jemalloc/internal/arena.h Thu May 10 18:29:40 2012 (r235238) @@ -109,7 +109,8 @@ struct arena_chunk_map_s { * * p : run page offset * s : run size - * c : (binind+1) for size class (used only if prof_promote is true) + * n : binind for size class; large objects set these to BININD_INVALID + * except for promoted allocations (see prof_promote) * x : don't care * - : 0 * + : 1 @@ -117,35 +118,38 @@ struct arena_chunk_map_s { * [dula] : bit unset * * Unallocated (clean): - * ssssssss ssssssss ssss---- ----du-a - * xxxxxxxx xxxxxxxx xxxx---- -----Uxx - * ssssssss ssssssss ssss---- ----dU-a + * ssssssss ssssssss ssss1111 1111du-a + * xxxxxxxx xxxxxxxx xxxxxxxx xxxx-Uxx + * ssssssss ssssssss ssss1111 1111dU-a * * Unallocated (dirty): - * ssssssss ssssssss ssss---- ----D--a - * xxxxxxxx xxxxxxxx xxxx---- ----xxxx - * ssssssss ssssssss ssss---- ----D--a + * ssssssss ssssssss ssss1111 1111D--a + * xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx + * ssssssss ssssssss ssss1111 1111D--a * * Small: - * pppppppp pppppppp pppp---- ----d--A - * pppppppp pppppppp pppp---- -------A - * pppppppp pppppppp pppp---- ----d--A + * pppppppp pppppppp ppppnnnn nnnnd--A + * pppppppp pppppppp ppppnnnn nnnn---A + * pppppppp pppppppp ppppnnnn nnnnd--A * * Large: - * ssssssss ssssssss ssss---- ----D-LA - * xxxxxxxx xxxxxxxx xxxx---- ----xxxx - * -------- -------- -------- ----D-LA + * ssssssss ssssssss ssss1111 1111D-LA + * xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx + * -------- -------- ----1111 1111D-LA * * Large (sampled, size <= PAGE): - * ssssssss ssssssss sssscccc ccccD-LA + * ssssssss ssssssss ssssnnnn nnnnD-LA * * Large (not sampled, size == PAGE): - * ssssssss ssssssss ssss---- ----D-LA + * ssssssss ssssssss ssss1111 1111D-LA */ size_t bits; -#define CHUNK_MAP_CLASS_SHIFT 4 -#define CHUNK_MAP_CLASS_MASK ((size_t)0xff0U) -#define CHUNK_MAP_FLAGS_MASK ((size_t)0xfU) +#define CHUNK_MAP_BININD_SHIFT 4 +#define BININD_INVALID ((size_t)0xffU) +/* CHUNK_MAP_BININD_MASK == (BININD_INVALID << CHUNK_MAP_BININD_SHIFT) */ +#define CHUNK_MAP_BININD_MASK ((size_t)0xff0U) +#define CHUNK_MAP_BININD_INVALID CHUNK_MAP_BININD_MASK +#define CHUNK_MAP_FLAGS_MASK ((size_t)0xcU) #define CHUNK_MAP_DIRTY ((size_t)0x8U) #define CHUNK_MAP_UNZEROED ((size_t)0x4U) #define CHUNK_MAP_LARGE ((size_t)0x2U) @@ -409,8 +413,14 @@ void *arena_malloc_small(arena_t *arena, void *arena_malloc_large(arena_t *arena, size_t size, bool zero); void *arena_palloc(arena_t *arena, size_t size, size_t alignment, bool zero); void arena_prof_promoted(const void *ptr, size_t size); -void arena_dalloc_bin(arena_t *arena, arena_chunk_t *chunk, void *ptr, +void arena_dalloc_bin_locked(arena_t *arena, arena_chunk_t *chunk, void *ptr, arena_chunk_map_t *mapelm); +void arena_dalloc_bin(arena_t *arena, arena_chunk_t *chunk, void *ptr, + size_t pageind, arena_chunk_map_t *mapelm); +void arena_dalloc_small(arena_t *arena, arena_chunk_t *chunk, void *ptr, + size_t pageind); +void arena_dalloc_large_locked(arena_t *arena, arena_chunk_t *chunk, + void *ptr); void arena_dalloc_large(arena_t *arena, arena_chunk_t *chunk, void *ptr); void arena_stats_merge(arena_t *arena, size_t *nactive, size_t *ndirty, arena_stats_t *astats, malloc_bin_stats_t *bstats, @@ -430,6 +440,31 @@ void arena_postfork_child(arena_t *arena #ifdef JEMALLOC_H_INLINES #ifndef JEMALLOC_ENABLE_INLINE +arena_chunk_map_t *arena_mapp_get(arena_chunk_t *chunk, size_t pageind); +size_t *arena_mapbitsp_get(arena_chunk_t *chunk, size_t pageind); +size_t arena_mapbits_get(arena_chunk_t *chunk, size_t pageind); +size_t arena_mapbits_unallocated_size_get(arena_chunk_t *chunk, + size_t pageind); +size_t arena_mapbits_large_size_get(arena_chunk_t *chunk, size_t pageind); +size_t arena_mapbits_small_runind_get(arena_chunk_t *chunk, size_t pageind); +size_t arena_mapbits_binind_get(arena_chunk_t *chunk, size_t pageind); +size_t arena_mapbits_dirty_get(arena_chunk_t *chunk, size_t pageind); +size_t arena_mapbits_unzeroed_get(arena_chunk_t *chunk, size_t pageind); +size_t arena_mapbits_large_get(arena_chunk_t *chunk, size_t pageind); +size_t arena_mapbits_allocated_get(arena_chunk_t *chunk, size_t pageind); +void arena_mapbits_unallocated_set(arena_chunk_t *chunk, size_t pageind, + size_t size, size_t flags); +void arena_mapbits_unallocated_size_set(arena_chunk_t *chunk, size_t pageind, + size_t size); +void arena_mapbits_large_set(arena_chunk_t *chunk, size_t pageind, + size_t size, size_t flags); +void arena_mapbits_large_binind_set(arena_chunk_t *chunk, size_t pageind, + size_t binind); +void arena_mapbits_small_set(arena_chunk_t *chunk, size_t pageind, + size_t runind, size_t binind, size_t flags); +void arena_mapbits_unzeroed_set(arena_chunk_t *chunk, size_t pageind, + size_t unzeroed); +size_t arena_ptr_small_binind_get(const void *ptr, size_t mapbits); size_t arena_bin_index(arena_t *arena, arena_bin_t *bin); unsigned arena_run_regind(arena_run_t *run, arena_bin_info_t *bin_info, const void *ptr); @@ -442,6 +477,227 @@ void arena_dalloc(arena_t *arena, arena_ #endif #if (defined(JEMALLOC_ENABLE_INLINE) || defined(JEMALLOC_ARENA_C_)) +# ifdef JEMALLOC_ARENA_INLINE_A +JEMALLOC_INLINE arena_chunk_map_t * +arena_mapp_get(arena_chunk_t *chunk, size_t pageind) +{ + + assert(pageind >= map_bias); + assert(pageind < chunk_npages); + + return (&chunk->map[pageind-map_bias]); +} + +JEMALLOC_INLINE size_t * +arena_mapbitsp_get(arena_chunk_t *chunk, size_t pageind) +{ + + return (&arena_mapp_get(chunk, pageind)->bits); +} + +JEMALLOC_INLINE size_t +arena_mapbits_get(arena_chunk_t *chunk, size_t pageind) +{ + + return (*arena_mapbitsp_get(chunk, pageind)); +} + +JEMALLOC_INLINE size_t +arena_mapbits_unallocated_size_get(arena_chunk_t *chunk, size_t pageind) +{ + size_t mapbits; + + mapbits = arena_mapbits_get(chunk, pageind); + assert((mapbits & (CHUNK_MAP_LARGE|CHUNK_MAP_ALLOCATED)) == 0); + return (mapbits & ~PAGE_MASK); +} + +JEMALLOC_INLINE size_t +arena_mapbits_large_size_get(arena_chunk_t *chunk, size_t pageind) +{ + size_t mapbits; + + mapbits = arena_mapbits_get(chunk, pageind); + assert((mapbits & (CHUNK_MAP_LARGE|CHUNK_MAP_ALLOCATED)) == + (CHUNK_MAP_LARGE|CHUNK_MAP_ALLOCATED)); + return (mapbits & ~PAGE_MASK); +} + +JEMALLOC_INLINE size_t +arena_mapbits_small_runind_get(arena_chunk_t *chunk, size_t pageind) +{ + size_t mapbits; + + mapbits = arena_mapbits_get(chunk, pageind); + assert((mapbits & (CHUNK_MAP_LARGE|CHUNK_MAP_ALLOCATED)) == + CHUNK_MAP_ALLOCATED); + return (mapbits >> LG_PAGE); +} + +JEMALLOC_INLINE size_t +arena_mapbits_binind_get(arena_chunk_t *chunk, size_t pageind) +{ + size_t mapbits; + size_t binind; + + mapbits = arena_mapbits_get(chunk, pageind); + binind = (mapbits & CHUNK_MAP_BININD_MASK) >> CHUNK_MAP_BININD_SHIFT; + assert(binind < NBINS || binind == BININD_INVALID); + return (binind); +} + +JEMALLOC_INLINE size_t +arena_mapbits_dirty_get(arena_chunk_t *chunk, size_t pageind) +{ + size_t mapbits; + + mapbits = arena_mapbits_get(chunk, pageind); + return (mapbits & CHUNK_MAP_DIRTY); +} + +JEMALLOC_INLINE size_t +arena_mapbits_unzeroed_get(arena_chunk_t *chunk, size_t pageind) +{ + size_t mapbits; + + mapbits = arena_mapbits_get(chunk, pageind); + return (mapbits & CHUNK_MAP_UNZEROED); +} + +JEMALLOC_INLINE size_t +arena_mapbits_large_get(arena_chunk_t *chunk, size_t pageind) +{ + size_t mapbits; + + mapbits = arena_mapbits_get(chunk, pageind); + return (mapbits & CHUNK_MAP_LARGE); +} + +JEMALLOC_INLINE size_t +arena_mapbits_allocated_get(arena_chunk_t *chunk, size_t pageind) +{ + size_t mapbits; + + mapbits = arena_mapbits_get(chunk, pageind); + return (mapbits & CHUNK_MAP_ALLOCATED); +} + +JEMALLOC_INLINE void +arena_mapbits_unallocated_set(arena_chunk_t *chunk, size_t pageind, size_t size, + size_t flags) +{ + size_t *mapbitsp; + + mapbitsp = arena_mapbitsp_get(chunk, pageind); + assert((size & PAGE_MASK) == 0); + assert((flags & ~CHUNK_MAP_FLAGS_MASK) == 0); + *mapbitsp = size | CHUNK_MAP_BININD_INVALID | flags; +} + +JEMALLOC_INLINE void +arena_mapbits_unallocated_size_set(arena_chunk_t *chunk, size_t pageind, + size_t size) +{ + size_t *mapbitsp; + + mapbitsp = arena_mapbitsp_get(chunk, pageind); + assert((size & PAGE_MASK) == 0); + assert((*mapbitsp & (CHUNK_MAP_LARGE|CHUNK_MAP_ALLOCATED)) == 0); + *mapbitsp = size | (*mapbitsp & PAGE_MASK); +} + +JEMALLOC_INLINE void +arena_mapbits_large_set(arena_chunk_t *chunk, size_t pageind, size_t size, + size_t flags) +{ + size_t *mapbitsp; + + mapbitsp = arena_mapbitsp_get(chunk, pageind); + assert((size & PAGE_MASK) == 0); + assert((flags & ~CHUNK_MAP_FLAGS_MASK) == 0); + *mapbitsp = size | CHUNK_MAP_BININD_INVALID | flags | CHUNK_MAP_LARGE | + CHUNK_MAP_ALLOCATED; +} + +JEMALLOC_INLINE void +arena_mapbits_large_binind_set(arena_chunk_t *chunk, size_t pageind, + size_t binind) +{ + size_t *mapbitsp; + + assert(binind <= BININD_INVALID); + mapbitsp = arena_mapbitsp_get(chunk, pageind); + assert(arena_mapbits_large_size_get(chunk, pageind) == PAGE); + *mapbitsp = (*mapbitsp & ~CHUNK_MAP_BININD_MASK) | (binind << + CHUNK_MAP_BININD_SHIFT); +} + +JEMALLOC_INLINE void +arena_mapbits_small_set(arena_chunk_t *chunk, size_t pageind, size_t runind, + size_t binind, size_t flags) +{ + size_t *mapbitsp; + + assert(binind < BININD_INVALID); + mapbitsp = arena_mapbitsp_get(chunk, pageind); + assert(pageind - runind >= map_bias); + assert((flags & ~CHUNK_MAP_FLAGS_MASK) == 0); + *mapbitsp = (runind << LG_PAGE) | (binind << CHUNK_MAP_BININD_SHIFT) | + flags | CHUNK_MAP_ALLOCATED; +} + +JEMALLOC_INLINE void +arena_mapbits_unzeroed_set(arena_chunk_t *chunk, size_t pageind, + size_t unzeroed) +{ + size_t *mapbitsp; + + mapbitsp = arena_mapbitsp_get(chunk, pageind); + *mapbitsp = (*mapbitsp & ~CHUNK_MAP_UNZEROED) | unzeroed; +} + +JEMALLOC_INLINE size_t +arena_ptr_small_binind_get(const void *ptr, size_t mapbits) +{ + size_t binind; + + binind = (mapbits & CHUNK_MAP_BININD_MASK) >> CHUNK_MAP_BININD_SHIFT; + + if (config_debug) { + arena_chunk_t *chunk; + arena_t *arena; + size_t pageind; + size_t actual_mapbits; + arena_run_t *run; + arena_bin_t *bin; + size_t actual_binind; + arena_bin_info_t *bin_info; + + assert(binind != BININD_INVALID); + assert(binind < NBINS); + chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr); + arena = chunk->arena; + pageind = ((uintptr_t)ptr - (uintptr_t)chunk) >> LG_PAGE; + actual_mapbits = arena_mapbits_get(chunk, pageind); + assert(mapbits == actual_mapbits); + assert(arena_mapbits_large_get(chunk, pageind) == 0); + assert(arena_mapbits_allocated_get(chunk, pageind) != 0); + run = (arena_run_t *)((uintptr_t)chunk + (uintptr_t)((pageind - + (actual_mapbits >> LG_PAGE)) << LG_PAGE)); + bin = run->bin; + actual_binind = bin - arena->bins; + assert(binind == actual_binind); + bin_info = &arena_bin_info[actual_binind]; + assert(((uintptr_t)ptr - ((uintptr_t)run + + (uintptr_t)bin_info->reg0_offset)) % bin_info->reg_interval + == 0); + } + + return (binind); +} +# endif /* JEMALLOC_ARENA_INLINE_A */ + +# ifdef JEMALLOC_ARENA_INLINE_B JEMALLOC_INLINE size_t arena_bin_index(arena_t *arena, arena_bin_t *bin) { @@ -535,7 +791,7 @@ arena_prof_ctx_get(const void *ptr) chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr); pageind = ((uintptr_t)ptr - (uintptr_t)chunk) >> LG_PAGE; - mapbits = chunk->map[pageind-map_bias].bits; + mapbits = arena_mapbits_get(chunk, pageind); assert((mapbits & CHUNK_MAP_ALLOCATED) != 0); if ((mapbits & CHUNK_MAP_LARGE) == 0) { if (prof_promote) @@ -544,7 +800,8 @@ arena_prof_ctx_get(const void *ptr) arena_run_t *run = (arena_run_t *)((uintptr_t)chunk + (uintptr_t)((pageind - (mapbits >> LG_PAGE)) << LG_PAGE)); - size_t binind = arena_bin_index(chunk->arena, run->bin); + size_t binind = arena_ptr_small_binind_get(ptr, + mapbits); arena_bin_info_t *bin_info = &arena_bin_info[binind]; unsigned regind; @@ -554,7 +811,7 @@ arena_prof_ctx_get(const void *ptr) sizeof(prof_ctx_t *))); } } else - ret = chunk->map[pageind-map_bias].prof_ctx; + ret = arena_mapp_get(chunk, pageind)->prof_ctx; return (ret); } @@ -571,19 +828,18 @@ arena_prof_ctx_set(const void *ptr, prof chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr); pageind = ((uintptr_t)ptr - (uintptr_t)chunk) >> LG_PAGE; - mapbits = chunk->map[pageind-map_bias].bits; + mapbits = arena_mapbits_get(chunk, pageind); assert((mapbits & CHUNK_MAP_ALLOCATED) != 0); if ((mapbits & CHUNK_MAP_LARGE) == 0) { if (prof_promote == false) { arena_run_t *run = (arena_run_t *)((uintptr_t)chunk + (uintptr_t)((pageind - (mapbits >> LG_PAGE)) << LG_PAGE)); - arena_bin_t *bin = run->bin; size_t binind; arena_bin_info_t *bin_info; unsigned regind; - binind = arena_bin_index(chunk->arena, bin); + binind = arena_ptr_small_binind_get(ptr, mapbits); bin_info = &arena_bin_info[binind]; regind = arena_run_regind(run, bin_info, ptr); @@ -592,7 +848,7 @@ arena_prof_ctx_set(const void *ptr, prof } else assert((uintptr_t)ctx == (uintptr_t)1U); } else - chunk->map[pageind-map_bias].prof_ctx = ctx; + arena_mapp_get(chunk, pageind)->prof_ctx = ctx; } JEMALLOC_INLINE void * @@ -631,35 +887,42 @@ arena_salloc(const void *ptr, bool demot { size_t ret; arena_chunk_t *chunk; - size_t pageind, mapbits; + size_t pageind, binind; assert(ptr != NULL); assert(CHUNK_ADDR2BASE(ptr) != ptr); chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr); pageind = ((uintptr_t)ptr - (uintptr_t)chunk) >> LG_PAGE; - mapbits = chunk->map[pageind-map_bias].bits; - assert((mapbits & CHUNK_MAP_ALLOCATED) != 0); - if ((mapbits & CHUNK_MAP_LARGE) == 0) { - arena_run_t *run = (arena_run_t *)((uintptr_t)chunk + - (uintptr_t)((pageind - (mapbits >> LG_PAGE)) << LG_PAGE)); - size_t binind = arena_bin_index(chunk->arena, run->bin); - arena_bin_info_t *bin_info = &arena_bin_info[binind]; - assert(((uintptr_t)ptr - ((uintptr_t)run + - (uintptr_t)bin_info->reg0_offset)) % bin_info->reg_interval - == 0); - ret = bin_info->reg_size; - } else { + assert(arena_mapbits_allocated_get(chunk, pageind) != 0); + binind = arena_mapbits_binind_get(chunk, pageind); + if (binind == BININD_INVALID || (config_prof && demote == false && + prof_promote && arena_mapbits_large_get(chunk, pageind) != 0)) { + /* + * Large allocation. In the common case (demote == true), and + * as this is an inline function, most callers will only end up + * looking at binind to determine that ptr is a small + * allocation. + */ assert(((uintptr_t)ptr & PAGE_MASK) == 0); - ret = mapbits & ~PAGE_MASK; - if (config_prof && demote && prof_promote && ret == PAGE && - (mapbits & CHUNK_MAP_CLASS_MASK) != 0) { - size_t binind = ((mapbits & CHUNK_MAP_CLASS_MASK) >> - CHUNK_MAP_CLASS_SHIFT) - 1; - assert(binind < NBINS); - ret = arena_bin_info[binind].reg_size; - } + ret = arena_mapbits_large_size_get(chunk, pageind); assert(ret != 0); + assert(pageind + (ret>>LG_PAGE) <= chunk_npages); + assert(ret == PAGE || arena_mapbits_large_size_get(chunk, + pageind+(ret>>LG_PAGE)-1) == 0); + assert(binind == arena_mapbits_binind_get(chunk, + pageind+(ret>>LG_PAGE)-1)); + assert(arena_mapbits_dirty_get(chunk, pageind) == + arena_mapbits_dirty_get(chunk, pageind+(ret>>LG_PAGE)-1)); + } else { + /* + * Small allocation (possibly promoted to a large object due to + * prof_promote). + */ + assert(arena_mapbits_large_get(chunk, pageind) != 0 || + arena_ptr_small_binind_get(ptr, arena_mapbits_get(chunk, + pageind)) == binind); + ret = arena_bin_info[binind].reg_size; } return (ret); @@ -668,8 +931,7 @@ arena_salloc(const void *ptr, bool demot JEMALLOC_INLINE void arena_dalloc(arena_t *arena, arena_chunk_t *chunk, void *ptr, bool try_tcache) { - size_t pageind; - arena_chunk_map_t *mapelm; + size_t pageind, mapbits; tcache_t *tcache; assert(arena != NULL); @@ -678,47 +940,30 @@ arena_dalloc(arena_t *arena, arena_chunk assert(CHUNK_ADDR2BASE(ptr) != ptr); pageind = ((uintptr_t)ptr - (uintptr_t)chunk) >> LG_PAGE; - mapelm = &chunk->map[pageind-map_bias]; - assert((mapelm->bits & CHUNK_MAP_ALLOCATED) != 0); - if ((mapelm->bits & CHUNK_MAP_LARGE) == 0) { + mapbits = arena_mapbits_get(chunk, pageind); + assert(arena_mapbits_allocated_get(chunk, pageind) != 0); + if ((mapbits & CHUNK_MAP_LARGE) == 0) { /* Small allocation. */ - if (try_tcache && (tcache = tcache_get(false)) != NULL) - tcache_dalloc_small(tcache, ptr); - else { - arena_run_t *run; - arena_bin_t *bin; + if (try_tcache && (tcache = tcache_get(false)) != NULL) { + size_t binind; - run = (arena_run_t *)((uintptr_t)chunk + - (uintptr_t)((pageind - (mapelm->bits >> LG_PAGE)) << - LG_PAGE)); - bin = run->bin; - if (config_debug) { - size_t binind = arena_bin_index(arena, bin); - UNUSED arena_bin_info_t *bin_info = - &arena_bin_info[binind]; - assert(((uintptr_t)ptr - ((uintptr_t)run + - (uintptr_t)bin_info->reg0_offset)) % - bin_info->reg_interval == 0); - } - malloc_mutex_lock(&bin->lock); - arena_dalloc_bin(arena, chunk, ptr, mapelm); - malloc_mutex_unlock(&bin->lock); - } + binind = arena_ptr_small_binind_get(ptr, mapbits); + tcache_dalloc_small(tcache, ptr, binind); + } else + arena_dalloc_small(arena, chunk, ptr, pageind); } else { - size_t size = mapelm->bits & ~PAGE_MASK; + size_t size = arena_mapbits_large_size_get(chunk, pageind); assert(((uintptr_t)ptr & PAGE_MASK) == 0); if (try_tcache && size <= tcache_maxclass && (tcache = tcache_get(false)) != NULL) { tcache_dalloc_large(tcache, ptr, size); - } else { - malloc_mutex_lock(&arena->lock); + } else arena_dalloc_large(arena, chunk, ptr); - malloc_mutex_unlock(&arena->lock); - } } } +# endif /* JEMALLOC_ARENA_INLINE_B */ #endif #endif /* JEMALLOC_H_INLINES */ Modified: head/contrib/jemalloc/include/jemalloc/internal/atomic.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/atomic.h Thu May 10 18:25:59 2012 (r235237) +++ head/contrib/jemalloc/include/jemalloc/internal/atomic.h Thu May 10 18:29:40 2012 (r235238) @@ -47,6 +47,20 @@ atomic_sub_uint64(uint64_t *p, uint64_t return (__sync_sub_and_fetch(p, x)); } +#elif (defined(_MSC_VER)) +JEMALLOC_INLINE uint64_t +atomic_add_uint64(uint64_t *p, uint64_t x) +{ + + return (InterlockedExchangeAdd64(p, x)); +} + +JEMALLOC_INLINE uint64_t +atomic_sub_uint64(uint64_t *p, uint64_t x) +{ + + return (InterlockedExchangeAdd64(p, -((int64_t)x))); +} #elif (defined(JEMALLOC_OSATOMIC)) JEMALLOC_INLINE uint64_t atomic_add_uint64(uint64_t *p, uint64_t x) @@ -145,6 +159,20 @@ atomic_sub_uint32(uint32_t *p, uint32_t return (__sync_sub_and_fetch(p, x)); } +#elif (defined(_MSC_VER)) +JEMALLOC_INLINE uint32_t +atomic_add_uint32(uint32_t *p, uint32_t x) +{ + + return (InterlockedExchangeAdd(p, x)); +} + +JEMALLOC_INLINE uint32_t +atomic_sub_uint32(uint32_t *p, uint32_t x) +{ + + return (InterlockedExchangeAdd(p, -((int32_t)x))); +} #elif (defined(JEMALLOC_OSATOMIC)) JEMALLOC_INLINE uint32_t atomic_add_uint32(uint32_t *p, uint32_t x) Modified: head/contrib/jemalloc/include/jemalloc/internal/ctl.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/ctl.h Thu May 10 18:25:59 2012 (r235237) +++ head/contrib/jemalloc/include/jemalloc/internal/ctl.h Thu May 10 18:29:40 2012 (r235238) @@ -2,6 +2,8 @@ #ifdef JEMALLOC_H_TYPES typedef struct ctl_node_s ctl_node_t; +typedef struct ctl_named_node_s ctl_named_node_t; +typedef struct ctl_indexed_node_s ctl_indexed_node_t; typedef struct ctl_arena_stats_s ctl_arena_stats_t; typedef struct ctl_stats_s ctl_stats_t; @@ -11,20 +13,21 @@ typedef struct ctl_stats_s ctl_stats_t; struct ctl_node_s { bool named; - union { - struct { - const char *name; - /* If (nchildren == 0), this is a terminal node. */ - unsigned nchildren; - const ctl_node_t *children; - } named; - struct { - const ctl_node_t *(*index)(const size_t *, size_t, - size_t); - } indexed; - } u; - int (*ctl)(const size_t *, size_t, void *, size_t *, void *, - size_t); +}; + +struct ctl_named_node_s { + struct ctl_node_s node; + const char *name; + /* If (nchildren == 0), this is a terminal node. */ + unsigned nchildren; + const ctl_node_t *children; + int (*ctl)(const size_t *, size_t, void *, size_t *, + void *, size_t); +}; + +struct ctl_indexed_node_s { + struct ctl_node_s node; + const ctl_named_node_t *(*index)(const size_t *, size_t, size_t); }; struct ctl_arena_stats_s { Modified: head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h Thu May 10 18:25:59 2012 (r235237) +++ head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h Thu May 10 18:29:40 2012 (r235238) @@ -3,23 +3,34 @@ #include "libc_private.h" #include "namespace.h" -#include -#include -#include -#if !defined(SYS_write) && defined(__NR_write) -#define SYS_write __NR_write +#include +#ifdef _WIN32 +# include +# define ENOENT ERROR_PATH_NOT_FOUND +# define EINVAL ERROR_BAD_ARGUMENTS +# define EAGAIN ERROR_OUTOFMEMORY +# define EPERM ERROR_WRITE_FAULT +# define EFAULT ERROR_INVALID_ADDRESS +# define ENOMEM ERROR_NOT_ENOUGH_MEMORY +# undef ERANGE +# define ERANGE ERROR_INVALID_DATA +#else +# include +# include +# include +# if !defined(SYS_write) && defined(__NR_write) +# define SYS_write __NR_write +# endif +# include +# include +# include #endif -#include #include -#include -#include #include #ifndef SIZE_T_MAX # define SIZE_T_MAX SIZE_MAX #endif -#include -#include #include #include #include @@ -33,10 +44,18 @@ #include #include #include -#include +#ifdef _MSC_VER +# include +typedef intptr_t ssize_t; +# define PATH_MAX 1024 +# define STDERR_FILENO 2 +# define __func__ __FUNCTION__ +/* Disable warnings about deprecated system functions */ +# pragma warning(disable: 4996) +#else +# include +#endif #include -#include -#include #include "un-namespace.h" #include "libc_private.h" @@ -110,6 +129,13 @@ static const bool config_prof_libunwind false #endif ; +static const bool config_mremap = +#ifdef JEMALLOC_MREMAP + true +#else + false +#endif + ; static const bool config_munmap = #ifdef JEMALLOC_MUNMAP true @@ -218,6 +244,9 @@ static const bool config_ivsalloc = #else # define JEMALLOC_ENABLE_INLINE # define JEMALLOC_INLINE static inline +# ifdef _MSC_VER +# define inline _inline +# endif #endif *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu May 10 20:03:35 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73C8B106564A; Thu, 10 May 2012 20:03:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EA3C8FC12; Thu, 10 May 2012 20:03:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4AK3ZG9049615; Thu, 10 May 2012 20:03:35 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4AK3ZZs049613; Thu, 10 May 2012 20:03:35 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201205102003.q4AK3ZZs049613@svn.freebsd.org> From: Dimitry Andric Date: Thu, 10 May 2012 20:03:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235239 - head/lib/libc/locale X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 10 May 2012 20:03:35 -0000 Author: dim Date: Thu May 10 20:03:34 2012 New Revision: 235239 URL: http://svn.freebsd.org/changeset/base/235239 Log: Fix copy/paste error in lib/libc/locale/toupper.c. Submitted by: Kohji Okuno Modified: head/lib/libc/locale/toupper.c Modified: head/lib/libc/locale/toupper.c ============================================================================== --- head/lib/libc/locale/toupper.c Thu May 10 18:29:40 2012 (r235238) +++ head/lib/libc/locale/toupper.c Thu May 10 20:03:34 2012 (r235239) @@ -51,7 +51,7 @@ ___toupper_l(c, l) { size_t lim; FIX_LOCALE(l); - _RuneRange *rr = &XLOCALE_CTYPE(l)->runes->__maplower_ext; + _RuneRange *rr = &XLOCALE_CTYPE(l)->runes->__mapupper_ext; _RuneEntry *base, *re; if (c < 0 || c == EOF) From owner-svn-src-head@FreeBSD.ORG Thu May 10 20:28:34 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4294F1065678; Thu, 10 May 2012 20:28:34 +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 2DF408FC08; Thu, 10 May 2012 20:28:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4AKSYWp050445; Thu, 10 May 2012 20:28:34 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4AKSXLk050443; Thu, 10 May 2012 20:28:33 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201205102028.q4AKSXLk050443@svn.freebsd.org> From: Sergey Kandaurov Date: Thu, 10 May 2012 20:28:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235241 - head/sys/fs/ext2fs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 10 May 2012 20:28:34 -0000 Author: pluknet Date: Thu May 10 20:28:33 2012 New Revision: 235241 URL: http://svn.freebsd.org/changeset/base/235241 Log: Fix mount interlock oversights from the previous change in r234386. Reported by: dougb Submitted by: Mateusz Guzik Reviewed by: Kirk McKusick Tested by: pho Modified: head/sys/fs/ext2fs/ext2_vfsops.c Modified: head/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vfsops.c Thu May 10 20:13:24 2012 (r235240) +++ head/sys/fs/ext2fs/ext2_vfsops.c Thu May 10 20:28:33 2012 (r235241) @@ -830,7 +830,6 @@ ext2_sync(struct mount *mp, int waitfor) /* * Write back each (modified) inode. */ - MNT_ILOCK(mp); loop: MNT_VNODE_FOREACH_ALL(vp, mp, mvp) { if (vp->v_type == VNON) { @@ -847,7 +846,6 @@ loop: } error = vget(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_INTERLOCK, td); if (error) { - MNT_ILOCK(mp); if (error == ENOENT) { MNT_VNODE_FOREACH_ALL_ABORT(mp, mvp); goto loop; From owner-svn-src-head@FreeBSD.ORG Thu May 10 21:38:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48E6D106566B; Thu, 10 May 2012 21:38:49 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 338278FC08; Thu, 10 May 2012 21:38:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4ALcnFO052809; Thu, 10 May 2012 21:38:49 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4ALcnhj052807; Thu, 10 May 2012 21:38:49 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201205102138.q4ALcnhj052807@svn.freebsd.org> From: Kirk McKusick Date: Thu, 10 May 2012 21:38: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: r235246 - head/sys/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 10 May 2012 21:38:49 -0000 Author: mckusick Date: Thu May 10 21:38:48 2012 New Revision: 235246 URL: http://svn.freebsd.org/changeset/base/235246 Log: Fix mount mutex handling missed in r234386. Modified: head/sys/nfsclient/nfs_subs.c Modified: head/sys/nfsclient/nfs_subs.c ============================================================================== --- head/sys/nfsclient/nfs_subs.c Thu May 10 21:22:59 2012 (r235245) +++ head/sys/nfsclient/nfs_subs.c Thu May 10 21:38:48 2012 (r235246) @@ -865,7 +865,6 @@ nfs_clearcommit(struct mount *mp) struct buf *bp, *nbp; struct bufobj *bo; - MNT_ILOCK(mp); MNT_VNODE_FOREACH_ALL(vp, mp, nvp) { bo = &vp->v_bufobj; vholdl(vp); From owner-svn-src-head@FreeBSD.ORG Thu May 10 23:38:34 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A55DB106566C; Thu, 10 May 2012 23:38:34 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 902088FC14; Thu, 10 May 2012 23:38:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4ANcYG6056688; Thu, 10 May 2012 23:38:34 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4ANcYxL056685; Thu, 10 May 2012 23:38:34 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205102338.q4ANcYxL056685@svn.freebsd.org> From: Eitan Adler Date: Thu, 10 May 2012 23:38:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235251 - head/share/syscons/keymaps X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 10 May 2012 23:38:34 -0000 Author: eadler Date: Thu May 10 23:38:34 2012 New Revision: 235251 URL: http://svn.freebsd.org/changeset/base/235251 Log: Add Spanish Dvorak keyboard model to syscons. (not verified to be accurate) PR: conf/160235 Submitted by: Alvaro Approved by: cperciva MFC after: 3 weeks Added: head/share/syscons/keymaps/spanish.dvorak.kbd (contents, props changed) Modified: head/share/syscons/keymaps/Makefile Modified: head/share/syscons/keymaps/Makefile ============================================================================== --- head/share/syscons/keymaps/Makefile Thu May 10 22:38:15 2012 (r235250) +++ head/share/syscons/keymaps/Makefile Thu May 10 23:38:34 2012 (r235251) @@ -36,6 +36,7 @@ FILES= INDEX.keymaps \ ru.cp866.kbd ru.iso5.kbd \ si.iso.kbd \ sk.iso2.kbd \ + spanish.dvorak.kbd \ spanish.iso.kbd spanish.iso.acc.kbd spanish.iso15.acc.kbd \ swedish.iso.kbd swedish.cp850.kbd \ swissfrench.iso.kbd swissfrench.iso.acc.kbd swissfrench.cp850.kbd \ Added: head/share/syscons/keymaps/spanish.dvorak.kbd ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/syscons/keymaps/spanish.dvorak.kbd Thu May 10 23:38:34 2012 (r235251) @@ -0,0 +1,139 @@ +# $FreeBSD$ +# alt +# scan cntrl alt alt cntrl lock +# code base shift cntrl shift alt shift cntrl shift state +# ------------------------------------------------------------------ + 000 nop nop nop nop nop nop nop nop O + 001 esc esc esc esc esc esc debug esc O + 002 '1' '!' nop nop '|' '!' nop nop O + 003 '2' '"' nop nop '@' '"' nop nop O + 004 '3' 183 nop nop '#' '#' nop nop O + 005 '4' '$' nop nop '~' '~' nop nop O + 006 '5' '%' nop nop '5' '%' nop nop O + 007 '6' '&' nop nop 172 172 nop nop O + 008 '7' '/' nop nop '7' '/' nop nop O + 009 '8' '(' nop nop '8' '(' nop nop O + 010 '9' ')' nop nop '9' ')' nop nop O + 011 '0' '=' nop nop '0' '=' nop nop O + 012 ''' '?' nop nop ''' '?' nop nop O + 013 161 191 nop nop 161 191 nop nop O + 014 bs bs del del bs bs del del O + 015 ht btab nop nop ht btab nop nop O + 016 '.' ':' nop nop '.' ':' nop nop O + 017 ',' ';' nop nop ',' ';' nop nop O + 018 241 209 nop nop '~' '~' nop nop O + 019 'p' 'P' dle dle 'p' 'P' dle dle C + 020 'y' 'Y' em em 'y' 'Y' em em C + 021 'f' 'F' ack ack 'f' 'F' ack ack C + 022 'g' 'G' bel bel 'g' 'G' bel bel C + 023 'c' 'C' etx etx 'c' 'C' etx etx C + 024 'h' 'H' bs bs 'h' 'H' bs bs C + 025 'l' 'L' ff ff 'l' 'L' ff ff C + 026 dgra dcir esc esc '[' '[' esc esc O + 027 '+' '*' gs gs ']' ']' gs gs O + 028 cr cr nl nl cr cr nl nl O + 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O + 030 'a' 'A' soh soh 'a' 'A' soh soh C + 031 'o' 'O' si si 243 211 si si C + 032 'e' 'E' enq enq 164 164 enq enq C + 033 'u' 'U' nak nak 250 218 nak nak C + 034 'i' 'I' ht ht 237 205 ht ht C + 035 'd' 'D' eot eot 'd' 'D' eot eot C + 036 'r' 'R' dc2 dc2 'r' 'R' dc2 dc2 C + 037 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C + 038 'n' 'N' so so 'n' 'N' so so C + 039 's' 'S' dc3 dc3 's' 'S' dc3 dc3 C + 040 dacu duml nop nop '{' '{' nop nop O + 041 '\' '|' fs fs '\' '|' fs fs O + 042 lshift lshift lshift lshift lshift lshift lshift lshift O + 043 231 199 rs rs '}' '}' rs rs O + 044 '-' '_' us us '-' '_' us us O + 045 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C + 046 'j' 'J' nl nl 'j' 'J' nl nl C + 047 'k' 'K' vt vt 'k' 'K' vt vt C + 048 'x' 'X' can can 'x' 'X' can can C + 049 'b' 'B' stx stx 'b' 'B' stx stx C + 050 'm' 'M' cr cr 'm' 'M' cr cr C + 051 'w' 'W' etb etb 'w' 'W' etb etb C + 052 'v' 'V' syn syn 'v' 'V' syn syn C + 053 'z' 'Z' sub sub 'z' 'Z' sub sub C + 054 rshift rshift rshift rshift rshift rshift rshift rshift O + 055 '*' '*' '*' '*' '*' '*' '*' '*' O + 056 lalt lalt lalt lalt lalt lalt lalt lalt O + 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O + 058 clock clock clock clock clock clock clock clock O + 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O + 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O + 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 069 nlock nlock nlock nlock nlock nlock nlock nlock O + 070 slock slock slock slock slock slock slock slock O + 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N + 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N + 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N + 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N + 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N + 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N + 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N + 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N + 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N + 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N + 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N + 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N + 083 del '.' '.' '.' '.' '.' boot boot N + 084 nop nop nop nop nop nop nop nop O + 085 nop nop nop nop nop nop nop nop O + 086 '<' '>' nop nop '<' '>' nop nop O + 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O + 089 cr cr nl nl cr cr nl nl O + 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O + 091 '/' '/' '/' '/' '/' '/' '/' '/' N + 092 nscr pscr debug debug nop nop nop nop O + 093 ralt ralt ralt ralt ralt ralt ralt ralt O + 094 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O + 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O + 096 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O + 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O + 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O + 099 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O + 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O + 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O + 102 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O + 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot fkey61 O + 104 slock saver slock saver susp nop susp nop O + 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O + 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O + 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O + 108 nop nop nop nop nop nop nop nop O + + dgra '`' ( 'a' 224 ) ( 'A' 192 ) ( 'e' 232 ) ( 'E' 200 ) + ( 'i' 236 ) ( 'I' 204 ) ( 'o' 242 ) ( 'O' 210 ) + ( 'u' 249 ) ( 'U' 217 ) + dacu 180 ( 'a' 225 ) ( 'A' 193 ) ( 'e' 233 ) ( 'E' 201 ) + ( 'i' 237 ) ( 'I' 205 ) ( 'o' 243 ) ( 'O' 211 ) + ( 'u' 250 ) ( 'U' 218 ) ( 'y' 253 ) ( 'Y' 221 ) + dcir '^' ( 'a' 226 ) ( 'A' 194 ) ( 'e' 234 ) ( 'E' 202 ) + ( 'i' 238 ) ( 'I' 206 ) ( 'o' 244 ) ( 'O' 212 ) + ( 'u' 251 ) ( 'U' 219 ) + dtil '~' ( 'a' 227 ) ( 'A' 195 ) ( 'n' 241 ) ( 'N' 209 ) + ( 'o' 245 ) ( 'O' 213 ) + dmac 000 + dbre 000 + ddot 000 + duml 168 ( 'a' 228 ) ( 'A' 196 ) ( 'e' 235 ) ( 'E' 203 ) + ( 'i' 239 ) ( 'I' 207 ) ( 'o' 246 ) ( 'O' 214 ) + ( 'u' 252 ) ( 'U' 220 ) ( 'y' 255 ) + dsla 000 + drin 176 ( 'a' 229 ) ( 'A' 197 ) + dced 184 ( 'c' 231 ) ( 'C' 199 ) + dapo 000 + ddac 000 + dogo 000 + dcar 000 From owner-svn-src-head@FreeBSD.ORG Fri May 11 00:19:06 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3DAC106564A; Fri, 11 May 2012 00:19:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF49F8FC16; Fri, 11 May 2012 00:19:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4B0J616057948; Fri, 11 May 2012 00:19:06 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4B0J6WH057946; Fri, 11 May 2012 00:19:06 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205110019.q4B0J6WH057946@svn.freebsd.org> From: Glen Barber Date: Fri, 11 May 2012 00:19: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: r235252 - head/usr.bin/unzip X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 00:19:06 -0000 Author: gjb (doc committer) Date: Fri May 11 00:19:06 2012 New Revision: 235252 URL: http://svn.freebsd.org/changeset/base/235252 Log: Document the unzip(1) '-Z' option implemented in r234206. Submitted by: swills (via hacker lounge) MFC after: 3 days Modified: head/usr.bin/unzip/unzip.1 Modified: head/usr.bin/unzip/unzip.1 ============================================================================== --- head/usr.bin/unzip/unzip.1 Thu May 10 23:38:34 2012 (r235251) +++ head/usr.bin/unzip/unzip.1 Fri May 11 00:19:06 2012 (r235252) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 21, 2010 +.Dd May 10, 2012 .Dt UNZIP 1 .Os .Sh NAME @@ -102,6 +102,16 @@ content of the archive. .It Fl x Ar pattern Exclude files matching the pattern .Ar pattern . +.It Fl Z Ar mode +Emulate +.Xr zipinfo 1L +mode. +Enabling +.Xr zipinfo 1L +mode changes the way in which additional arguments are parsed. +Currently only +.Xr zipinfo 1L +mode 1 is supported, which lists the file names one per line. .El .Pp Note that only one of From owner-svn-src-head@FreeBSD.ORG Fri May 11 02:40:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ED70B106566B; Fri, 11 May 2012 02:40:40 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D70BC8FC15; Fri, 11 May 2012 02:40:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4B2eeWx062370; Fri, 11 May 2012 02:40:40 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4B2ee9W062365; Fri, 11 May 2012 02:40:40 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201205110240.q4B2ee9W062365@svn.freebsd.org> From: Marius Strobl Date: Fri, 11 May 2012 02:40: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: r235255 - in head/sys/dev: dc fxp usb/net xl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 02:40:41 -0000 Author: marius Date: Fri May 11 02:40:40 2012 New Revision: 235255 URL: http://svn.freebsd.org/changeset/base/235255 Log: - Change the module order of these MAC drivers to be last so they are deterministically handled after the corresponding PHY drivers when loaded as modules. Otherwise, when these MAC/PHY driver pairs are compiled into a single module probing the PHY driver may fail. This makes r151438 and r226154 actually work. [1] Reported and tested by: yongari (fxp(4)) - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Submitted by: jhb [1] MFC after: 3 days Modified: head/sys/dev/dc/if_dc.c head/sys/dev/fxp/if_fxp.c head/sys/dev/usb/net/if_rue.c head/sys/dev/xl/if_xl.c Modified: head/sys/dev/dc/if_dc.c ============================================================================== --- head/sys/dev/dc/if_dc.c Fri May 11 01:28:25 2012 (r235254) +++ head/sys/dev/dc/if_dc.c Fri May 11 02:40:40 2012 (r235255) @@ -354,8 +354,9 @@ static driver_t dc_driver = { static devclass_t dc_devclass; -DRIVER_MODULE(dc, pci, dc_driver, dc_devclass, 0, 0); -DRIVER_MODULE(miibus, dc, miibus_driver, miibus_devclass, 0, 0); +DRIVER_MODULE_ORDERED(dc, pci, dc_driver, dc_devclass, NULL, NULL, + SI_ORDER_ANY); +DRIVER_MODULE(miibus, dc, miibus_driver, miibus_devclass, NULL, NULL); #define DC_SETBIT(sc, reg, x) \ CSR_WRITE_4(sc, reg, CSR_READ_4(sc, reg) | (x)) Modified: head/sys/dev/fxp/if_fxp.c ============================================================================== --- head/sys/dev/fxp/if_fxp.c Fri May 11 01:28:25 2012 (r235254) +++ head/sys/dev/fxp/if_fxp.c Fri May 11 02:40:40 2012 (r235255) @@ -290,7 +290,7 @@ static device_method_t fxp_methods[] = { DEVMETHOD(miibus_writereg, fxp_miibus_writereg), DEVMETHOD(miibus_statchg, fxp_miibus_statchg), - { 0, 0 } + DEVMETHOD_END }; static driver_t fxp_driver = { @@ -301,8 +301,9 @@ static driver_t fxp_driver = { static devclass_t fxp_devclass; -DRIVER_MODULE(fxp, pci, fxp_driver, fxp_devclass, 0, 0); -DRIVER_MODULE(miibus, fxp, miibus_driver, miibus_devclass, 0, 0); +DRIVER_MODULE_ORDERED(fxp, pci, fxp_driver, fxp_devclass, NULL, NULL, + SI_ORDER_ANY); +DRIVER_MODULE(miibus, fxp, miibus_driver, miibus_devclass, NULL, NULL); static struct resource_spec fxp_res_spec_mem[] = { { SYS_RES_MEMORY, FXP_PCI_MMBA, RF_ACTIVE }, Modified: head/sys/dev/usb/net/if_rue.c ============================================================================== --- head/sys/dev/usb/net/if_rue.c Fri May 11 01:28:25 2012 (r235254) +++ head/sys/dev/usb/net/if_rue.c Fri May 11 02:40:40 2012 (r235255) @@ -202,8 +202,9 @@ static driver_t rue_driver = { static devclass_t rue_devclass; -DRIVER_MODULE(rue, uhub, rue_driver, rue_devclass, NULL, 0); -DRIVER_MODULE(miibus, rue, miibus_driver, miibus_devclass, 0, 0); +DRIVER_MODULE_ORDERED(rue, uhub, rue_driver, rue_devclass, NULL, NULL, + SI_ORDER_ANY); +DRIVER_MODULE(miibus, rue, miibus_driver, miibus_devclass, NULL, NULL); MODULE_DEPEND(rue, uether, 1, 1, 1); MODULE_DEPEND(rue, usb, 1, 1, 1); MODULE_DEPEND(rue, ether, 1, 1, 1); Modified: head/sys/dev/xl/if_xl.c ============================================================================== --- head/sys/dev/xl/if_xl.c Fri May 11 01:28:25 2012 (r235254) +++ head/sys/dev/xl/if_xl.c Fri May 11 02:40:40 2012 (r235255) @@ -327,8 +327,9 @@ static driver_t xl_driver = { static devclass_t xl_devclass; -DRIVER_MODULE(xl, pci, xl_driver, xl_devclass, 0, 0); -DRIVER_MODULE(miibus, xl, miibus_driver, miibus_devclass, 0, 0); +DRIVER_MODULE_ORDERED(xl, pci, xl_driver, xl_devclass, NULL, NULL, + SI_ORDER_ANY); +DRIVER_MODULE(miibus, xl, miibus_driver, miibus_devclass, NULL, NULL); static void xl_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nseg, int error) From owner-svn-src-head@FreeBSD.ORG Fri May 11 03:15:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ACBB8106564A; Fri, 11 May 2012 03:15:23 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 979C78FC08; Fri, 11 May 2012 03:15:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4B3FNP9063724; Fri, 11 May 2012 03:15:23 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4B3FNLX063722; Fri, 11 May 2012 03:15:23 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201205110315.q4B3FNLX063722@svn.freebsd.org> From: Kevin Lo Date: Fri, 11 May 2012 03:15: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: r235256 - 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: Fri, 11 May 2012 03:15:23 -0000 Author: kevlo Date: Fri May 11 03:15:22 2012 New Revision: 235256 URL: http://svn.freebsd.org/changeset/base/235256 Log: Initialize "error" to zero when it's declared in em_setup_receive_ring() Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Fri May 11 02:40:40 2012 (r235255) +++ head/sys/dev/e1000/if_em.c Fri May 11 03:15:22 2012 (r235256) @@ -4046,7 +4046,7 @@ em_setup_receive_ring(struct rx_ring *rx struct adapter *adapter = rxr->adapter; struct em_buffer *rxbuf; bus_dma_segment_t seg[1]; - int rsize, nsegs, error; + int rsize, nsegs, error = 0; #ifdef DEV_NETMAP struct netmap_adapter *na = NA(adapter->ifp); struct netmap_slot *slot; From owner-svn-src-head@FreeBSD.ORG Fri May 11 03:17:33 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 703DE106566B; Fri, 11 May 2012 03:17:33 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B7E38FC08; Fri, 11 May 2012 03:17:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4B3HXEO063825; Fri, 11 May 2012 03:17:33 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4B3HX5T063823; Fri, 11 May 2012 03:17:33 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201205110317.q4B3HX5T063823@svn.freebsd.org> From: Kevin Lo Date: Fri, 11 May 2012 03:17:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235257 - head/sys/dev/sf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 03:17:33 -0000 Author: kevlo Date: Fri May 11 03:17:32 2012 New Revision: 235257 URL: http://svn.freebsd.org/changeset/base/235257 Log: Remove unused variable mii. This variable is initialized but not used. Modified: head/sys/dev/sf/if_sf.c Modified: head/sys/dev/sf/if_sf.c ============================================================================== --- head/sys/dev/sf/if_sf.c Fri May 11 03:15:22 2012 (r235256) +++ head/sys/dev/sf/if_sf.c Fri May 11 03:17:32 2012 (r235257) @@ -1984,7 +1984,6 @@ static void sf_init_locked(struct sf_softc *sc) { struct ifnet *ifp; - struct mii_data *mii; uint8_t eaddr[ETHER_ADDR_LEN]; bus_addr_t addr; int i; @@ -1993,7 +1992,6 @@ sf_init_locked(struct sf_softc *sc) ifp = sc->sf_ifp; if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) return; - mii = device_get_softc(sc->sf_miibus); sf_stop(sc); /* Reset the hardware to a known state. */ From owner-svn-src-head@FreeBSD.ORG Fri May 11 04:18:40 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 398D1106564A; Fri, 11 May 2012 04:18:40 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 249508FC0A; Fri, 11 May 2012 04:18:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4B4IeAx065943; Fri, 11 May 2012 04:18:40 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4B4Id5R065941; Fri, 11 May 2012 04:18:39 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201205110418.q4B4Id5R065941@svn.freebsd.org> From: Tim Kientzle Date: Fri, 11 May 2012 04:18: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: r235261 - head/sys/boot/fdt X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 04:18:40 -0000 Author: kientzle Date: Fri May 11 04:18:39 2012 New Revision: 235261 URL: http://svn.freebsd.org/changeset/base/235261 Log: Don't hang if there is no /cpus node in the device tree. Modified: head/sys/boot/fdt/fdt_loader_cmd.c Modified: head/sys/boot/fdt/fdt_loader_cmd.c ============================================================================== --- head/sys/boot/fdt/fdt_loader_cmd.c Fri May 11 04:10:23 2012 (r235260) +++ head/sys/boot/fdt/fdt_loader_cmd.c Fri May 11 04:18:39 2012 (r235261) @@ -317,6 +317,8 @@ fixup_cpubusfreqs(unsigned long cpufreq, /* We want to modify every subnode of /cpus */ o = fdt_path_offset(fdtp, "/cpus"); + if (o < 0) + return; /* maxo should contain offset of node next to /cpus */ depth = 0; From owner-svn-src-head@FreeBSD.ORG Fri May 11 07:12:19 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5398E1065670; Fri, 11 May 2012 07:12:19 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3EBE88FC12; Fri, 11 May 2012 07:12:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4B7CJLX071208; Fri, 11 May 2012 07:12:19 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4B7CJgM071206; Fri, 11 May 2012 07:12:19 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201205110712.q4B7CJgM071206@svn.freebsd.org> From: Kevin Lo Date: Fri, 11 May 2012 07:12:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235262 - 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: Fri, 11 May 2012 07:12:19 -0000 Author: kevlo Date: Fri May 11 07:12:18 2012 New Revision: 235262 URL: http://svn.freebsd.org/changeset/base/235262 Log: Make sure we don't dereference a null pointer Modified: head/sys/dev/re/if_re.c Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Fri May 11 04:18:39 2012 (r235261) +++ head/sys/dev/re/if_re.c Fri May 11 07:12:18 2012 (r235262) @@ -1753,8 +1753,12 @@ re_detach(device_t dev) bus_teardown_intr(dev, sc->rl_irq[0], sc->rl_intrhand[0]); sc->rl_intrhand[0] = NULL; } - if (ifp != NULL) + if (ifp != NULL) { +#ifdef DEV_NETMAP + netmap_detach(ifp); +#endif /* DEV_NETMAP */ if_free(ifp); + } if ((sc->rl_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) == 0) rid = 0; else @@ -1843,9 +1847,6 @@ re_detach(device_t dev) bus_dma_tag_destroy(sc->rl_ldata.rl_stag); } -#ifdef DEV_NETMAP - netmap_detach(ifp); -#endif /* DEV_NETMAP */ if (sc->rl_parent_tag) bus_dma_tag_destroy(sc->rl_parent_tag); From owner-svn-src-head@FreeBSD.ORG Fri May 11 09:46:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CAC741065674; Fri, 11 May 2012 09:46:17 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B49DC8FC15; Fri, 11 May 2012 09:46:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4B9kH5f075945; Fri, 11 May 2012 09:46:17 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4B9kHQ5075935; Fri, 11 May 2012 09:46:17 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205110946.q4B9kHQ5075935@svn.freebsd.org> From: Andriy Gapon Date: Fri, 11 May 2012 09:46:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235264 - in head/sys/boot/pc98: btx/btx btx/btxldr btx/lib cdboot loader X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 09:46:17 -0000 Author: avg Date: Fri May 11 09:46:17 2012 New Revision: 235264 URL: http://svn.freebsd.org/changeset/base/235264 Log: MFi386: improve argument passing via btxldr use related definitions in i386 bootargs.h Reviewed by: nyan, jhb MFC after: 1 month Added: head/sys/boot/pc98/btx/lib/btxcsu.S - copied, changed from r235217, head/sys/boot/pc98/btx/lib/btxcsu.s head/sys/boot/pc98/cdboot/cdboot.S - copied, changed from r235152, head/sys/boot/pc98/cdboot/cdboot.s Deleted: head/sys/boot/pc98/btx/lib/btxcsu.s head/sys/boot/pc98/cdboot/cdboot.s Modified: head/sys/boot/pc98/btx/btx/Makefile head/sys/boot/pc98/btx/btx/btx.S head/sys/boot/pc98/btx/btxldr/Makefile head/sys/boot/pc98/btx/btxldr/btxldr.S head/sys/boot/pc98/btx/lib/Makefile head/sys/boot/pc98/cdboot/Makefile head/sys/boot/pc98/loader/main.c Modified: head/sys/boot/pc98/btx/btx/Makefile ============================================================================== --- head/sys/boot/pc98/btx/btx/Makefile Fri May 11 09:34:39 2012 (r235263) +++ head/sys/boot/pc98/btx/btx/Makefile Fri May 11 09:46:17 2012 (r235264) @@ -12,6 +12,7 @@ BOOT_BTX_FLAGS=0x0 .endif CFLAGS+=-DBTX_FLAGS=${BOOT_BTX_FLAGS} +CFLAGS+=-I${.CURDIR}/../../../i386/common .if defined(BTX_SERIAL) BOOT_COMCONSOLE_PORT?= 0x238 Modified: head/sys/boot/pc98/btx/btx/btx.S ============================================================================== --- head/sys/boot/pc98/btx/btx/btx.S Fri May 11 09:34:39 2012 (r235263) +++ head/sys/boot/pc98/btx/btx/btx.S Fri May 11 09:46:17 2012 (r235264) @@ -15,6 +15,8 @@ * $FreeBSD$ */ +#include + /* * Memory layout. */ @@ -205,7 +207,7 @@ init.8: xorl %ecx,%ecx # Zero andl $0x7,%eax incl %eax shll $0x11,%eax # To bytes - subl $0x1000,%eax # Less arg space + subl $ARGSPACE,%eax # Less arg space subl %edx,%eax # Less base movb $SEL_UDATA,%cl # User data selector pushl %ecx # Set SS Modified: head/sys/boot/pc98/btx/btxldr/Makefile ============================================================================== --- head/sys/boot/pc98/btx/btxldr/Makefile Fri May 11 09:34:39 2012 (r235263) +++ head/sys/boot/pc98/btx/btxldr/Makefile Fri May 11 09:46:17 2012 (r235264) @@ -6,6 +6,7 @@ NO_MAN= SRCS= btxldr.S CFLAGS+=-DLOADER_ADDRESS=${LOADER_ADDRESS} +CFLAGS+=-I${.CURDIR}/../../../i386/common .if defined(BTXLDR_VERBOSE) CFLAGS+=-DBTXLDR_VERBOSE Modified: head/sys/boot/pc98/btx/btxldr/btxldr.S ============================================================================== --- head/sys/boot/pc98/btx/btxldr/btxldr.S Fri May 11 09:34:39 2012 (r235263) +++ head/sys/boot/pc98/btx/btxldr/btxldr.S Fri May 11 09:46:17 2012 (r235264) @@ -20,6 +20,8 @@ * real thing should probably be more flexible, and in C. */ +#include + /* * Memory locations. */ @@ -105,7 +107,7 @@ gdcwait.2: inb $0x60,%al call hexout # stack call putstr # pointer movl $m_args,%esi # Format string - leal 0x4(%esp,1),%ebx # First argument + leal 0x4(%esp),%ebx # First argument movl $0x6,%ecx # Count start.1: movl (%ebx),%eax # Get argument and addl $0x4,%ebx # bump pointer @@ -113,24 +115,28 @@ start.1: movl (%ebx),%eax # Get argumen loop start.1 # Till done call putstr # End message #endif - movl $0x48,%ecx # Allocate space - subl %ecx,%ebp # for bootinfo - movl 0x18(%esp,1),%esi # Source: bootinfo + movl BA_BOOTINFO+4(%esp),%esi # Source: bootinfo cmpl $0x0, %esi # If the bootinfo pointer je start_null_bi # is null, don't copy it + movl BI_SIZE(%esi),%ecx # Allocate space + subl %ecx,%ebp # for bootinfo movl %ebp,%edi # Destination rep # Copy movsb # it - movl %ebp,0x18(%esp,1) # Update pointer + movl %ebp,BA_BOOTINFO+4(%esp) # Update pointer + movl %edi,%ebp # Restore base pointer #ifdef BTXLDR_VERBOSE movl $m_rel_bi,%esi # Display movl %ebp,%eax # bootinfo call hexout # relocation call putstr # message #endif -start_null_bi: movl $0x18,%ecx # Allocate space - subl %ecx,%ebp # for arguments - leal 0x4(%esp,1),%esi # Source +start_null_bi: movl $BOOTARGS_SIZE,%ecx # Fixed size of arguments + testl $KARGS_FLAGS_EXTARG, BA_BOOTFLAGS+4(%esp) # Check for extra data + jz start_fixed # Skip if the flag is not set + addl BOOTARGS_SIZE+4(%esp),%ecx # Add size of variable args +start_fixed: subl $ARGOFF,%ebp # Place args at fixed offset + leal 0x4(%esp),%esi # Source movl %ebp,%edi # Destination rep # Copy movsb # them Modified: head/sys/boot/pc98/btx/lib/Makefile ============================================================================== --- head/sys/boot/pc98/btx/lib/Makefile Fri May 11 09:34:39 2012 (r235263) +++ head/sys/boot/pc98/btx/lib/Makefile Fri May 11 09:46:17 2012 (r235264) @@ -3,7 +3,8 @@ PROG= crt0.o INTERNALPROG= NO_MAN= -SRCS= btxcsu.s btxsys.s btxv86.s +SRCS= btxcsu.S btxsys.s btxv86.s +CFLAGS+=-I${.CURDIR}/../../../i386/common LDFLAGS=-Wl,-r .include Copied and modified: head/sys/boot/pc98/btx/lib/btxcsu.S (from r235217, head/sys/boot/pc98/btx/lib/btxcsu.s) ============================================================================== --- head/sys/boot/pc98/btx/lib/btxcsu.s Thu May 10 09:10:31 2012 (r235217, copy source) +++ head/sys/boot/pc98/btx/lib/btxcsu.S Fri May 11 09:46:17 2012 (r235264) @@ -19,15 +19,13 @@ # BTX C startup code (ELF). # +#include + # # Globals. # .global _start # -# Constants. -# - .set ARGADJ,0xfa0 # Argument adjustment -# # Client entry point. # _start: cld Modified: head/sys/boot/pc98/cdboot/Makefile ============================================================================== --- head/sys/boot/pc98/cdboot/Makefile Fri May 11 09:34:39 2012 (r235263) +++ head/sys/boot/pc98/cdboot/Makefile Fri May 11 09:46:17 2012 (r235264) @@ -4,7 +4,9 @@ PROG= cdboot STRIP= BINMODE=${NOBINMODE} NO_MAN= -SRCS= ${PROG}.s +SRCS= ${PROG}.S + +CFLAGS+=-I${.CURDIR}/../../i386/common ORG= 0x0000 Copied and modified: head/sys/boot/pc98/cdboot/cdboot.S (from r235152, head/sys/boot/pc98/cdboot/cdboot.s) ============================================================================== --- head/sys/boot/pc98/cdboot/cdboot.s Wed May 9 04:54:50 2012 (r235152, copy source) +++ head/sys/boot/pc98/cdboot/cdboot.S Fri May 11 09:46:17 2012 (r235264) @@ -30,6 +30,8 @@ # $FreeBSD$ +#include + # # Basically, we first create a set of boot arguments to pass to the loaded # binary. Then we attempt to load /boot/loader from the CD we were booted @@ -82,11 +84,6 @@ .set AOUT_ENTRY,0x14 # entry point .set AOUT_HEADER,MEM_PAGE_SIZE # size of the a.out header # -# Flags for kargs->bootflags -# - .set KARGS_FLAGS_CD,0x1 # flag to indicate booting from - # CD loader -# # Segment selectors. # .set SEL_SDATA,0x8 # Supervisor data Modified: head/sys/boot/pc98/loader/main.c ============================================================================== --- head/sys/boot/pc98/loader/main.c Fri May 11 09:34:39 2012 (r235263) +++ head/sys/boot/pc98/loader/main.c Fri May 11 09:46:17 2012 (r235264) @@ -33,29 +33,25 @@ __FBSDID("$FreeBSD$"); */ #include +#include #include #include #include #include #include "bootstrap.h" +#include "common/bootargs.h" #include "libi386/libi386.h" #include "libpc98/libpc98.h" #include "btxv86.h" -#define KARGS_FLAGS_CD 0x1 -#define KARGS_FLAGS_PXE 0x2 +CTASSERT(sizeof(struct bootargs) == BOOTARGS_SIZE); +CTASSERT(offsetof(struct bootargs, bootinfo) == BA_BOOTINFO); +CTASSERT(offsetof(struct bootargs, bootflags) == BA_BOOTFLAGS); +CTASSERT(offsetof(struct bootinfo, bi_size) == BI_SIZE); /* Arguments passed in from the boot1/boot2 loader */ -static struct -{ - u_int32_t howto; - u_int32_t bootdev; - u_int32_t bootflags; - u_int32_t pxeinfo; - u_int32_t res2; - u_int32_t bootinfo; -} *kargs; +static struct bootargs *kargs; static u_int32_t initial_howto; static u_int32_t initial_bootdev; From owner-svn-src-head@FreeBSD.ORG Fri May 11 10:13:34 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BF4AA106566C; Fri, 11 May 2012 10:13:34 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A906E8FC0A; Fri, 11 May 2012 10:13:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BADYBG076890; Fri, 11 May 2012 10:13:34 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BADY9g076888; Fri, 11 May 2012 10:13:34 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201205111013.q4BADY9g076888@svn.freebsd.org> From: Ulrich Spoerlein Date: Fri, 11 May 2012 10:13: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: r235265 - head/share/man/man7 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 10:13:34 -0000 Author: uqs Date: Fri May 11 10:13:34 2012 New Revision: 235265 URL: http://svn.freebsd.org/changeset/base/235265 Log: Stop lying about default UFS blocksizes. This catches up with the year-old change to default blocksizes. Also reduce the variants of spelling gigabyte from 3 down to 2 (GB and GiB). Suggested by: arundel (about a year ago now ...) Modified: head/share/man/man7/tuning.7 Modified: head/share/man/man7/tuning.7 ============================================================================== --- head/share/man/man7/tuning.7 Fri May 11 09:46:17 2012 (r235264) +++ head/share/man/man7/tuning.7 Fri May 11 10:13:34 2012 (r235265) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 16, 2010 +.Dd May 11, 2012 .Dt TUNING 7 .Os .Sh NAME @@ -148,15 +148,15 @@ If you do not use ports all that much an system source .Pq Pa /usr/src on the machine, you can get away with -a 1 gigabyte +a 1 GB .Pa /usr partition. However, if you install a lot of ports (especially window managers and Linux-emulated binaries), we recommend -at least a 2 gigabyte +at least a 2 GB .Pa /usr and if you also intend to keep system source -on the machine, we recommend a 3 gigabyte +on the machine, we recommend a 3 GB .Pa /usr . Do not underestimate the amount of space you will need in this partition, it can creep up and @@ -218,22 +218,22 @@ and .Em cylinders/group . .Pp .Fx -performs best when using 8K or 16K file system block sizes. -The default file system block size is 16K, +performs best when using 16K or 32K file system block sizes. +The default file system block size is 32K, which provides best performance for most applications, with the exception of those that perform random access on large files (such as database server software). Such applications tend to perform better with a smaller block size, although modern disk characteristics are such that the performance gain from using a smaller block size may not be worth consideration. -Using a block size larger than 16K +Using a block size larger than 32K can cause fragmentation of the buffer cache and lead to lower performance. .Pp The defaults may be unsuitable for a file system that requires a very large number of i-nodes or is intended to hold a large number of very small files. -Such a file system should be created with an 8K or 4K block size. +Such a file system should be created with an 4K, 8K, or 16K block size. This also requires you to specify a smaller fragment size. We recommend always using a fragment size that is 1/8 @@ -256,13 +256,13 @@ Do not use this option unless you are actually storing large files on the partition, because if you overcompensate you can wind up with a file system that has lots of free space remaining but cannot accommodate any more files. -Using 32768, 65536, or 262144 bytes/i-node is recommended. +Using 65536, 131072, or 262144 bytes/i-node is recommended. You can go higher but it will have only incremental effects on .Xr fsck 8 recovery times. For example, -.Dq Li "newfs -i 32768 ..." . +.Dq Li "newfs -i 65536 ..." . .Pp .Xr tunefs 8 may be used to further tune a file system. @@ -525,8 +525,8 @@ sysctl governs VFS read-ahead and is exp to pre-read if the heuristics algorithm decides that the reads are issued sequentially. It is used by the UFS, ext2fs and msdosfs file systems. -With the default UFS block size of 16 KiB, a setting of 32 will allow -speculatively reading up to 512 KiB. +With the default UFS block size of 32 KiB, a setting of 64 will allow +speculatively reading up to 2 MiB. This setting may be increased to get around disk I/O latencies, especially where these latencies are large such as in virtual machine emulated environments. From owner-svn-src-head@FreeBSD.ORG Fri May 11 11:29:09 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3212B1065670; Fri, 11 May 2012 11:29:09 +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 1CD888FC0A; Fri, 11 May 2012 11:29:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BBT8ol081096; Fri, 11 May 2012 11:29:08 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BBT85G081093; Fri, 11 May 2012 11:29:08 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205111129.q4BBT85G081093@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 11 May 2012 11:29: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: r235266 - head/lib/libc/stdlib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 11:29:09 -0000 Author: kib Date: Fri May 11 11:29:08 2012 New Revision: 235266 URL: http://svn.freebsd.org/changeset/base/235266 Log: According to SUSv4, realpath(3) must fail if [ENOENT] A component of file_name does not name an existing file or file_name points to an empty string. [ENOTDIR] A component of the path prefix is not a directory, or the file_name argument contains at least one non- character and ends with one or more trailing characters and the last pathname component names an existing file that is neither a directory nor a symbolic link to a directory. Add checks for the listed conditions, and set errno accordingly. Update the realpath(3) manpage to mention SUS behaviour. Remove the requirement to include sys/param.h before stdlib.h. PR: 128933 MFC after: 3 weeks Modified: head/lib/libc/stdlib/realpath.3 head/lib/libc/stdlib/realpath.c Modified: head/lib/libc/stdlib/realpath.3 ============================================================================== --- head/lib/libc/stdlib/realpath.3 Fri May 11 10:13:34 2012 (r235265) +++ head/lib/libc/stdlib/realpath.3 Fri May 11 11:29:08 2012 (r235266) @@ -31,7 +31,7 @@ .\" @(#)realpath.3 8.2 (Berkeley) 2/16/94 .\" $FreeBSD$ .\" -.Dd April 19, 2010 +.Dd May 11, 2012 .Dt REALPATH 3 .Os .Sh NAME @@ -40,7 +40,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/param.h .In stdlib.h .Ft "char *" .Fn realpath "const char *pathname" "char *resolved_path" @@ -72,11 +71,12 @@ The function will resolve both absolute and relative paths and return the absolute pathname corresponding to .Fa pathname . -All but the last component of +All components of .Fa pathname must exist when .Fn realpath -is called. +is called, and all but the last component must name either directories or +symlinks pointing to the directories. .Sh "RETURN VALUES" The .Fn realpath Modified: head/lib/libc/stdlib/realpath.c ============================================================================== --- head/lib/libc/stdlib/realpath.c Fri May 11 10:13:34 2012 (r235265) +++ head/lib/libc/stdlib/realpath.c Fri May 11 11:29:08 2012 (r235266) @@ -132,8 +132,29 @@ realpath(const char * __restrict path, c resolved[resolved_len++] = '/'; resolved[resolved_len] = '\0'; } - if (next_token[0] == '\0') + if (next_token[0] == '\0') { + /* + * Handle consequential slashes. The path + * before slash shall point to a directory. + * + * Only the trailing slashes are not covered + * by other checks in the loop, but we verify + * the prefix for any (rare) "//" or "/\0" + * occurence to not implement lookahead. + */ + if (lstat(resolved, &sb) != 0) { + if (m) + free(resolved); + return (NULL); + } + if (!S_ISDIR(sb.st_mode)) { + if (m) + free(resolved); + errno = ENOTDIR; + return (NULL); + } continue; + } else if (strcmp(next_token, ".") == 0) continue; else if (strcmp(next_token, "..") == 0) { @@ -151,9 +172,7 @@ realpath(const char * __restrict path, c } /* - * Append the next path component and lstat() it. If - * lstat() fails we still can return successfully if - * there are no more path components left. + * Append the next path component and lstat() it. */ resolved_len = strlcat(resolved, next_token, PATH_MAX); if (resolved_len >= PATH_MAX) { @@ -163,10 +182,8 @@ realpath(const char * __restrict path, c return (NULL); } if (lstat(resolved, &sb) != 0) { - if (errno == ENOENT && p == NULL) { - errno = serrno; - return (resolved); - } + if (errno != ENOENT || p != NULL) + errno = ENOTDIR; if (m) free(resolved); return (NULL); From owner-svn-src-head@FreeBSD.ORG Fri May 11 12:37:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0A4C41065670; Fri, 11 May 2012 12:37:17 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E72F68FC1B; Fri, 11 May 2012 12:37:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BCbGRP083599; Fri, 11 May 2012 12:37:16 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BCbGX2083596; Fri, 11 May 2012 12:37:16 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201205111237.q4BCbGX2083596@svn.freebsd.org> From: Gabor Kovesdan Date: Fri, 11 May 2012 12:37:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235267 - in head/usr.bin/sort: . nls X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 12:37:17 -0000 Author: gabor Date: Fri May 11 12:37:16 2012 New Revision: 235267 URL: http://svn.freebsd.org/changeset/base/235267 Log: Add a BSD-licensed sort rewrite that was started by me and later completed with the major functionality and optimizations by Oleg Moskalenko. It is compatible with the latest version of POSIX and the current GNU sort version that we have in base. Beside this, it implements all the functionality introduced in later versions of GNU sort. For now, it will be installed as "bsdsort", keeping GNU sort as the default sort implementation. Added: head/usr.bin/sort/ head/usr.bin/sort/Makefile (contents, props changed) head/usr.bin/sort/bwstring.c (contents, props changed) head/usr.bin/sort/bwstring.h (contents, props changed) head/usr.bin/sort/coll.c (contents, props changed) head/usr.bin/sort/coll.h (contents, props changed) head/usr.bin/sort/file.c (contents, props changed) head/usr.bin/sort/file.h (contents, props changed) head/usr.bin/sort/mem.c (contents, props changed) head/usr.bin/sort/mem.h (contents, props changed) head/usr.bin/sort/nls/ head/usr.bin/sort/nls/C.msg (contents, props changed) head/usr.bin/sort/nls/hu_HU.ISO8859-2.msg (contents, props changed) head/usr.bin/sort/radixsort.c (contents, props changed) head/usr.bin/sort/radixsort.h (contents, props changed) head/usr.bin/sort/sort.1.in (contents, props changed) head/usr.bin/sort/sort.c (contents, props changed) head/usr.bin/sort/sort.h (contents, props changed) head/usr.bin/sort/vsort.c (contents, props changed) head/usr.bin/sort/vsort.h (contents, props changed) Added: head/usr.bin/sort/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/sort/Makefile Fri May 11 12:37:16 2012 (r235267) @@ -0,0 +1,45 @@ +# $FreeBSD$ + +.include + +.if ${MK_BSD_SORT} == "yes" +PROG= sort +.else +PROG= bsdsort +CLEANFILES+= bsdsort.1 + +bsdsort.1: sort.1 + cp ${.ALLSRC} ${.TARGET} +.endif + +SRCS= bwstring.c coll.c file.c mem.c radixsort.c sort.c vsort.c + +WARNS= 6 + +sort.1: sort.1.in + /usr/bin/sed ${MAN_SUB} ${.ALLSRC} >${.TARGET} + +CLEANFILES+= sort.1 + +.if !defined(WITHOUT_THREADS) +CFLAGS+= -DSORT_THREADS +LDFLAGS+= -lpthread -lmd +MAN_SUB+= -e 's|%%THREADS%%||g' +.else +LDFLAGS+= -lmd +MAN_SUB+= -e 's|%%THREADS%%|\.\\"|g' +.endif + +.if !defined(WITHOUT_NLS) +NLS+= hu_HU.ISO8859-2 +NLSSRCFILES= ${NLS:S@$@.msg@} +MAN_SUB+= -e 's|%%NLS%%||g' +.for lang in ${NLS} +NLSSRCDIR_${lang}= ${.CURDIR}/nls +.endfor +.else +CFLAGS+= -DWITHOUT_NLS +MAN_SUB+= -e 's|%%THREADS%%|\.\\"|g' +.endif + +.include Added: head/usr.bin/sort/bwstring.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/sort/bwstring.c Fri May 11 12:37:16 2012 (r235267) @@ -0,0 +1,1138 @@ +/*- + * Copyright (C) 2009 Gabor Kovesdan + * Copyright (C) 2012 Oleg Moskalenko + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "bwstring.h" +#include "sort.h" + +bool byte_sort = false; + +static wchar_t **wmonths = NULL; +static unsigned char **cmonths = NULL; + +/* initialise months */ + +void +initialise_months(void) +{ + const nl_item item[12] = { ABMON_1, ABMON_2, ABMON_3, ABMON_4, + ABMON_5, ABMON_6, ABMON_7, ABMON_8, ABMON_9, ABMON_10, + ABMON_11, ABMON_12 }; + unsigned char *tmp; + size_t len; + + if (MB_CUR_MAX == 1) { + if (cmonths == NULL) { + unsigned char *m; + + cmonths = sort_malloc(sizeof(unsigned char*) * 12); + for (int i = 0; i < 12; i++) { + cmonths[i] = NULL; + tmp = (unsigned char *) nl_langinfo(item[i]); + if (tmp == NULL) + continue; + if (debug_sort) + printf("month[%d]=%s\n", i, tmp); + len = strlen(tmp); + if (len < 1) + continue; + while (isblank(*tmp)) + ++tmp; + m = sort_malloc(len + 1); + memcpy(m, tmp, len + 1); + m[len] = '\0'; + for (unsigned int j = 0; j < len; j++) + m[j] = toupper(m[j]); + cmonths[i] = m; + } + } + + } else { + if (wmonths == NULL) { + wchar_t *m; + + wmonths = sort_malloc(sizeof(wchar_t *) * 12); + for (int i = 0; i < 12; i++) { + wmonths[i] = NULL; + tmp = (unsigned char *) nl_langinfo(item[i]); + if (tmp == NULL) + continue; + if (debug_sort) + printf("month[%d]=%s\n", i, tmp); + len = strlen(tmp); + if (len < 1) + continue; + while (isblank(*tmp)) + ++tmp; + m = sort_malloc(SIZEOF_WCHAR_STRING(len + 1)); + if (mbstowcs(m, tmp, len) == ((size_t) -1)) + continue; + m[len] = L'\0'; + for (unsigned int j = 0; j < len; j++) + m[j] = towupper(m[j]); + wmonths[i] = m; + } + } + } +} + +/* + * Compare two wide-character strings + */ +static int +wide_str_coll(const wchar_t *s1, const wchar_t *s2) +{ + int ret = 0; + + errno = 0; + ret = wcscoll(s1, s2); + if (errno == EILSEQ) { + errno = 0; + ret = wcscmp(s1, s2); + if (errno != 0) { + for (size_t i = 0; ; ++i) { + wchar_t c1 = s1[i]; + wchar_t c2 = s2[i]; + if (c1 == L'\0') + return ((c2 == L'\0') ? 0 : -1); + if (c2 == L'\0') + return (+1); + if (c1 == c2) + continue; + return ((int)(c1 - c2)); + } + } + } + return (ret); +} + +/* counterparts of wcs functions */ + +void +bwsprintf(FILE *f, struct bwstring *bws, const char *prefix, const char *suffix) +{ + + if (MB_CUR_MAX == 1) + fprintf(f, "%s%s%s", prefix, bws->data.cstr, suffix); + else + fprintf(f, "%s%S%s", prefix, bws->data.wstr, suffix); +} + +const void* bwsrawdata(const struct bwstring *bws) +{ + + return (&(bws->data)); +} + +size_t bwsrawlen(const struct bwstring *bws) +{ + + return ((MB_CUR_MAX == 1) ? bws->len : SIZEOF_WCHAR_STRING(bws->len)); +} + +size_t +bws_memsize(const struct bwstring *bws) +{ + + return ((MB_CUR_MAX == 1) ? (bws->len + 2 + sizeof(struct bwstring)) : + (SIZEOF_WCHAR_STRING(bws->len + 1) + sizeof(struct bwstring))); +} + +void +bws_setlen(struct bwstring *bws, size_t newlen) +{ + + if (bws && newlen != bws->len && newlen <= bws->len) { + bws->len = newlen; + if (MB_CUR_MAX == 1) + bws->data.cstr[newlen] = '\0'; + else + bws->data.wstr[newlen] = L'\0'; + } +} + +/* + * Allocate a new binary string of specified size + */ +struct bwstring * +bwsalloc(size_t sz) +{ + struct bwstring *ret; + + if (MB_CUR_MAX == 1) + ret = sort_malloc(sizeof(struct bwstring) + 1 + sz); + else + ret = sort_malloc(sizeof(struct bwstring) + + SIZEOF_WCHAR_STRING(sz + 1)); + ret->len = sz; + + if (MB_CUR_MAX == 1) + ret->data.cstr[ret->len] = '\0'; + else + ret->data.wstr[ret->len] = L'\0'; + + return (ret); +} + +/* + * Create a copy of binary string. + * New string size equals the length of the old string. + */ +struct bwstring * +bwsdup(const struct bwstring *s) +{ + + if (s == NULL) + return (NULL); + else { + struct bwstring *ret = bwsalloc(s->len); + + if (MB_CUR_MAX == 1) + memcpy(ret->data.cstr, s->data.cstr, (s->len)); + else + memcpy(ret->data.wstr, s->data.wstr, + SIZEOF_WCHAR_STRING(s->len)); + + return (ret); + } +} + +/* + * Create a new binary string from a raw binary buffer. + */ +struct bwstring * +bwssbdup(const wchar_t *str, size_t len) +{ + + if (str == NULL) + return ((len == 0) ? bwsalloc(0) : NULL); + else { + struct bwstring *ret; + + ret = bwsalloc(len); + + if (MB_CUR_MAX == 1) + for (size_t i = 0; i < len; ++i) + ret->data.cstr[i] = (unsigned char) str[i]; + else + memcpy(ret->data.wstr, str, SIZEOF_WCHAR_STRING(len)); + + return (ret); + } +} + +/* + * Create a new binary string from a raw binary buffer. + */ +struct bwstring * +bwscsbdup(const unsigned char *str, size_t len) +{ + struct bwstring *ret; + + ret = bwsalloc(len); + + if (str) { + if (MB_CUR_MAX == 1) + memcpy(ret->data.cstr, str, len); + else { + mbstate_t mbs; + const char *s; + size_t charlen, chars, cptr; + + charlen = chars = 0; + cptr = 0; + s = (const char *) str; + + memset(&mbs, 0, sizeof(mbs)); + + while (cptr < len) { + size_t n = MB_CUR_MAX; + + if (n > len - cptr) + n = len - cptr; + charlen = mbrlen(s + cptr, n, &mbs); + switch (charlen) { + case 0: + /* FALLTHROUGH */ + case (size_t) -1: + /* FALLTHROUGH */ + case (size_t) -2: + ret->data.wstr[chars++] = + (unsigned char) s[cptr]; + ++cptr; + break; + default: + n = mbrtowc(ret->data.wstr + (chars++), + s + cptr, charlen, &mbs); + if ((n == (size_t)-1) || (n == (size_t)-2)) + /* NOTREACHED */ + err(2, "mbrtowc error"); + cptr += charlen; + }; + } + + ret->len = chars; + ret->data.wstr[ret->len] = L'\0'; + } + } + return (ret); +} + +/* + * De-allocate object memory + */ +void +bwsfree(const struct bwstring *s) +{ + + if (s) + sort_free(s); +} + +/* + * Copy content of src binary string to dst. + * If the capacity of the dst string is not sufficient, + * then the data is truncated. + */ +size_t +bwscpy(struct bwstring *dst, const struct bwstring *src) +{ + size_t nums = src->len; + + if (nums > dst->len) + nums = dst->len; + dst->len = nums; + + if (MB_CUR_MAX == 1) { + memcpy(dst->data.cstr, src->data.cstr, nums); + dst->data.cstr[dst->len] = '\0'; + } else { + memcpy(dst->data.wstr, src->data.wstr, + SIZEOF_WCHAR_STRING(nums + 1)); + dst->data.wstr[dst->len] = L'\0'; + } + + return (nums); +} + +/* + * Copy content of src binary string to dst, + * with specified number of symbols to be copied. + * If the capacity of the dst string is not sufficient, + * then the data is truncated. + */ +struct bwstring * +bwsncpy(struct bwstring *dst, const struct bwstring *src, size_t size) +{ + size_t nums = src->len; + + if (nums > dst->len) + nums = dst->len; + if (nums > size) + nums = size; + dst->len = nums; + + if (MB_CUR_MAX == 1) { + memcpy(dst->data.cstr, src->data.cstr, nums); + dst->data.cstr[dst->len] = '\0'; + } else { + memcpy(dst->data.wstr, src->data.wstr, + SIZEOF_WCHAR_STRING(nums + 1)); + dst->data.wstr[dst->len] = L'\0'; + } + + return (dst); +} + +/* + * Copy content of src binary string to dst, + * with specified number of symbols to be copied. + * An offset value can be specified, from the start of src string. + * If the capacity of the dst string is not sufficient, + * then the data is truncated. + */ +struct bwstring * +bwsnocpy(struct bwstring *dst, const struct bwstring *src, size_t offset, + size_t size) +{ + + if (offset >= src->len) { + dst->data.wstr[0] = 0; + dst->len = 0; + } else { + size_t nums = src->len - offset; + + if (nums > dst->len) + nums = dst->len; + if (nums > size) + nums = size; + dst->len = nums; + if (MB_CUR_MAX == 1) { + memcpy(dst->data.cstr, src->data.cstr + offset, + (nums)); + dst->data.cstr[dst->len] = '\0'; + } else { + memcpy(dst->data.wstr, src->data.wstr + offset, + SIZEOF_WCHAR_STRING(nums)); + dst->data.wstr[dst->len] = L'\0'; + } + } + return (dst); +} + +/* + * Write binary string to the file. + * The output is ended either with '\n' (nl == true) + * or '\0' (nl == false). + */ +int +bwsfwrite(struct bwstring *bws, FILE *f, bool zero_ended) +{ + + if (MB_CUR_MAX == 1) { + size_t len = bws->len; + + if (!zero_ended) { + bws->data.cstr[len] = '\n'; + + if (fwrite(bws->data.cstr, len + 1, 1, f) < 1) + err(2, NULL); + + bws->data.cstr[len] = '\0'; + } else if (fwrite(bws->data.cstr, len + 1, 1, f) < 1) + err(2, NULL); + + return (len + 1); + + } else { + wchar_t eols; + int printed = 0; + + eols = zero_ended ? btowc('\0') : btowc('\n'); + + while (printed < (int) BWSLEN(bws)) { + const wchar_t *s = bws->data.wstr + printed; + + if (*s == L'\0') { + int nums; + + nums = fwprintf(f, L"%lc", *s); + + if (nums != 1) + err(2, NULL); + ++printed; + } else { + int nums; + + nums = fwprintf(f, L"%ls", s); + + if (nums < 1) + err(2, NULL); + printed += nums; + } + } + fwprintf(f, L"%lc", eols); + return (printed + 1); + } +} + +/* + * Allocate and read a binary string from file. + * The strings are nl-ended or zero-ended, depending on the sort setting. + */ +struct bwstring * +bwsfgetln(FILE *f, size_t *len, bool zero_ended, struct reader_buffer *rb) +{ + wchar_t eols; + + eols = zero_ended ? btowc('\0') : btowc('\n'); + + if (!zero_ended && (MB_CUR_MAX > 1)) { + wchar_t *ret; + + ret = fgetwln(f, len); + + if (ret == NULL) { + if (!feof(f)) + err(2, NULL); + return (NULL); + } + if (*len > 0) { + if (ret[*len - 1] == eols) + --(*len); + } + return (bwssbdup(ret, *len)); + + } else { + wchar_t c = 0; + + *len = 0; + + if (feof(f)) + return (NULL); + + if (2 >= rb->fgetwln_z_buffer_size) { + rb->fgetwln_z_buffer_size += 256; + rb->fgetwln_z_buffer = sort_realloc(rb->fgetwln_z_buffer, + sizeof(wchar_t) * rb->fgetwln_z_buffer_size); + } + rb->fgetwln_z_buffer[*len] = 0; + + if (MB_CUR_MAX == 1) + while (!feof(f)) { + c = fgetc(f); + + if (c == EOF) { + if (*len == 0) + return (NULL); + goto line_read_done; + } + if (c == eols) + goto line_read_done; + + if (*len + 1 >= rb->fgetwln_z_buffer_size) { + rb->fgetwln_z_buffer_size += 256; + rb->fgetwln_z_buffer = sort_realloc(rb->fgetwln_z_buffer, + SIZEOF_WCHAR_STRING(rb->fgetwln_z_buffer_size)); + } + + rb->fgetwln_z_buffer[*len] = c; + rb->fgetwln_z_buffer[++(*len)] = 0; + } + else + while (!feof(f)) { + c = fgetwc(f); + + if (c == WEOF) { + if (*len == 0) + return (NULL); + goto line_read_done; + } + if (c == eols) + goto line_read_done; + + if (*len + 1 >= rb->fgetwln_z_buffer_size) { + rb->fgetwln_z_buffer_size += 256; + rb->fgetwln_z_buffer = sort_realloc(rb->fgetwln_z_buffer, + SIZEOF_WCHAR_STRING(rb->fgetwln_z_buffer_size)); + } + + rb->fgetwln_z_buffer[*len] = c; + rb->fgetwln_z_buffer[++(*len)] = 0; + } + +line_read_done: + /* we do not count the last 0 */ + return (bwssbdup(rb->fgetwln_z_buffer, *len)); + } +} + +int +bwsncmp(const struct bwstring *bws1, const struct bwstring *bws2, + size_t offset, size_t len) +{ + size_t cmp_len, len1, len2; + int res = 0; + + cmp_len = 0; + len1 = bws1->len; + len2 = bws2->len; + + if (len1 <= offset) { + return ((len2 <= offset) ? 0 : -1); + } else { + if (len2 <= offset) + return (+1); + else { + len1 -= offset; + len2 -= offset; + + cmp_len = len1; + + if (len2 < cmp_len) + cmp_len = len2; + + if (len < cmp_len) + cmp_len = len; + + if (MB_CUR_MAX == 1) { + const unsigned char *s1, *s2; + + s1 = bws1->data.cstr + offset; + s2 = bws2->data.cstr + offset; + + res = memcmp(s1, s2, cmp_len); + + } else { + const wchar_t *s1, *s2; + + s1 = bws1->data.wstr + offset; + s2 = bws2->data.wstr + offset; + + res = memcmp(s1, s2, SIZEOF_WCHAR_STRING(cmp_len)); + } + } + } + + if (res == 0) { + if (len1 < cmp_len && len1 < len2) + res = -1; + else if (len2 < cmp_len && len2 < len1) + res = +1; + } + + return (res); +} + +int +bwscmp(const struct bwstring *bws1, const struct bwstring *bws2, size_t offset) +{ + size_t len1, len2, cmp_len; + int res; + + len1 = bws1->len; + len2 = bws2->len; + + len1 -= offset; + len2 -= offset; + + cmp_len = len1; + + if (len2 < cmp_len) + cmp_len = len2; + + res = bwsncmp(bws1, bws2, offset, cmp_len); + + if (res == 0) { + if( len1 < len2) + res = -1; + else if (len2 < len1) + res = +1; + } + + return (res); +} + +int +bws_iterator_cmp(bwstring_iterator iter1, bwstring_iterator iter2, size_t len) +{ + wchar_t c1, c2; + size_t i = 0; + + for (i = 0; i < len; ++i) { + c1 = bws_get_iter_value(iter1); + c2 = bws_get_iter_value(iter2); + if (c1 != c2) + return (c1 - c2); + iter1 = bws_iterator_inc(iter1, 1); + iter2 = bws_iterator_inc(iter2, 1); + } + + return (0); +} + +int +bwscoll(const struct bwstring *bws1, const struct bwstring *bws2, size_t offset) +{ + size_t len1, len2; + + len1 = bws1->len; + len2 = bws2->len; + + if (len1 <= offset) + return ((len2 <= offset) ? 0 : -1); + else { + if (len2 <= offset) + return (+1); + else { + len1 -= offset; + len2 -= offset; + + if (MB_CUR_MAX == 1) { + const unsigned char *s1, *s2; + + s1 = bws1->data.cstr + offset; + s2 = bws2->data.cstr + offset; + + if (byte_sort) { + int res = 0; + + if (len1 > len2) { + res = memcmp(s1, s2, len2); + if (!res) + res = +1; + } else if (len1 < len2) { + res = memcmp(s1, s2, len1); + if (!res) + res = -1; + } else + res = memcmp(s1, s2, len1); + + return (res); + + } else { + int res = 0; + size_t i, maxlen; + + i = 0; + maxlen = len1; + + if (maxlen > len2) + maxlen = len2; + + while (i < maxlen) { + /* goto next non-zero part: */ + while ((i < maxlen) && + !s1[i] && !s2[i]) + ++i; + + if (i >= maxlen) + break; + + if (s1[i] == 0) { + if (s2[i] == 0) + /* NOTREACHED */ + err(2, "bwscoll error 01"); + else + return (-1); + } else if (s2[i] == 0) + return (+1); + + res = strcoll(s1 + i, s2 + i); + if (res) + return (res); + + while ((i < maxlen) && + s1[i] && s2[i]) + ++i; + + if (i >= maxlen) + break; + + if (s1[i] == 0) { + if (s2[i] == 0) { + ++i; + continue; + } else + return (-1); + } else if (s2[i] == 0) + return (+1); + else + /* NOTREACHED */ + err(2, "bwscoll error 02"); + } + + if (len1 < len2) + return (-1); + else if (len1 > len2) + return (+1); + + return (0); + } + } else { + const wchar_t *s1, *s2; + size_t i, maxlen; + int res = 0; + + s1 = bws1->data.wstr + offset; + s2 = bws2->data.wstr + offset; + + i = 0; + maxlen = len1; + + if (maxlen > len2) + maxlen = len2; + + while (i < maxlen) { + + /* goto next non-zero part: */ + while ((i < maxlen) && + !s1[i] && !s2[i]) + ++i; + + if (i >= maxlen) + break; + + if (s1[i] == 0) { + if (s2[i] == 0) + /* NOTREACHED */ + err(2, "bwscoll error 1"); + else + return (-1); + } else if (s2[i] == 0) + return (+1); + + res = wide_str_coll(s1 + i, s2 + i); + if (res) + return (res); + + while ((i < maxlen) && s1[i] && s2[i]) + ++i; + + if (i >= maxlen) + break; + + if (s1[i] == 0) { + if (s2[i] == 0) { + ++i; + continue; + } else + return (-1); + } else if (s2[i] == 0) + return (+1); + else + /* NOTREACHED */ + err(2, "bwscoll error 2"); + } + + if (len1 < len2) + return (-1); + else if (len1 > len2) + return (+1); + + return (0); + } + } + } +} + +/* + * Correction of the system API + */ +double +bwstod(struct bwstring *s0, bool *empty) +{ + double ret = 0; + + if (MB_CUR_MAX == 1) { + unsigned char *end, *s; + char *ep; + + s = s0->data.cstr; + end = s + s0->len; + ep = NULL; + + while (isblank(*s) && s < end) + ++s; + + if (!isprint(*s)) { + *empty = true; + return (0); + } + + ret = strtod(s, &ep); + if ((unsigned char*) ep == s) { + *empty = true; + return (0); + } + } else { + wchar_t *end, *ep, *s; + + s = s0->data.wstr; + end = s + s0->len; + ep = NULL; + + while (iswblank(*s) && s < end) + ++s; + + if (!iswprint(*s)) { + *empty = true; + return (0); + } + + ret = wcstod(s, &ep); + if (ep == s) { + *empty = true; + return (0); + } + } + + *empty = false; + return (ret); +} + +/* + * A helper function for monthcoll. If a line matches + * a month name, it returns (number of the month - 1), + * while if there is no match, it just return -1. + */ + +int +bws_month_score(const struct bwstring *s0) +{ + + if (MB_CUR_MAX == 1) { + const unsigned char *end, *s; + size_t len; + + s = s0->data.cstr; + end = s + s0->len; + + while (isblank(*s) && s < end) + ++s; + + len = strlen(s); + + for (int i = 11; i >= 0; --i) { + if (cmonths[i] && + (s == (unsigned char*)strstr(s, cmonths[i]))) + return (i); + } + + } else { + const wchar_t *end, *s; + size_t len; + + s = s0->data.wstr; + end = s + s0->len; + + while (iswblank(*s) && s < end) + ++s; + + len = wcslen(s); + + for (int i = 11; i >= 0; --i) { + if (wmonths[i] && (s == wcsstr(s, wmonths[i]))) + return (i); + } + } + + return (-1); +} + +/* + * Rips out leading blanks (-b). + */ +struct bwstring * +ignore_leading_blanks(struct bwstring *str) +{ + + if (MB_CUR_MAX == 1) { + unsigned char *dst, *end, *src; + + src = str->data.cstr; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Fri May 11 12:47:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 40CD41065670; Fri, 11 May 2012 12:47:22 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1026A8FC08; Fri, 11 May 2012 12:47:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BClLjV083945; Fri, 11 May 2012 12:47:21 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BClLnB083940; Fri, 11 May 2012 12:47:21 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201205111247.q4BClLnB083940@svn.freebsd.org> From: Gabor Kovesdan Date: Fri, 11 May 2012 12:47: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: r235268 - in head: gnu/usr.bin/sort share/mk tools/build/options usr.bin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 12:47:22 -0000 Author: gabor Date: Fri May 11 12:47:21 2012 New Revision: 235268 URL: http://svn.freebsd.org/changeset/base/235268 Log: - Hook up BSD sort to the build. By default, it will be installed as "bsdsort" and GNU sort will be the default "sort". When WITH_BSD_SORT is set, BSD sort will be the default "sort" and GNU sort will be installed as "gnusort". Added: head/tools/build/options/WITH_BSD_SORT (contents, props changed) Modified: head/gnu/usr.bin/sort/Makefile head/share/mk/bsd.own.mk head/usr.bin/Makefile Modified: head/gnu/usr.bin/sort/Makefile ============================================================================== --- head/gnu/usr.bin/sort/Makefile Fri May 11 12:37:16 2012 (r235267) +++ head/gnu/usr.bin/sort/Makefile Fri May 11 12:47:21 2012 (r235268) @@ -3,7 +3,18 @@ SORTDIR= ${.CURDIR}/../../../contrib/gnu-sort .PATH: ${SORTDIR}/lib ${SORTDIR}/src ${SORTDIR}/man +.include + +.if ${MK_BSD_SORT} != "yes" PROG= sort +.else +PROG= gnusort + +CLEANFILES+= gnusort.1 +gnusort.1: sort.1 + cp ${.ALLSRC} ${.TARGET} +.endif + SRCS= sort.c \ __fpending.c \ argmatch.c \ Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Fri May 11 12:37:16 2012 (r235267) +++ head/share/mk/bsd.own.mk Fri May 11 12:47:21 2012 (r235268) @@ -413,6 +413,7 @@ __DEFAULT_YES_OPTIONS = \ __DEFAULT_NO_OPTIONS = \ BSD_GREP \ + BSD_SORT \ BIND_IDN \ BIND_LARGE_FILE \ BIND_LIBS \ Added: head/tools/build/options/WITH_BSD_SORT ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_BSD_SORT Fri May 11 12:47:21 2012 (r235268) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Install BSD-licensed sort as 'sort' instead of GNU sort. Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Fri May 11 12:37:16 2012 (r235267) +++ head/usr.bin/Makefile Fri May 11 12:47:21 2012 (r235268) @@ -141,6 +141,7 @@ SUBDIR= alias \ shar \ showmount \ sockstat \ + sort \ split \ stat \ stdbuf \ From owner-svn-src-head@FreeBSD.ORG Fri May 11 12:48:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2CB61065675; Fri, 11 May 2012 12:48:29 +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 388718FC17; Fri, 11 May 2012 12:48:29 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q4BCmKdE031736; Fri, 11 May 2012 15:48:20 +0300 (EEST) (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.5/8.14.5) with ESMTP id q4BCmK84035486; Fri, 11 May 2012 15:48:20 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q4BCmKx4035485; Fri, 11 May 2012 15:48:20 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 11 May 2012 15:48:20 +0300 From: Konstantin Belousov To: Gabor Kovesdan Message-ID: <20120511124820.GN2358@deviant.kiev.zoral.com.ua> References: <201205111237.q4BCbGX2083596@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1wmVbOfxY+Z3peoJ" Content-Disposition: inline In-Reply-To: <201205111237.q4BCbGX2083596@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=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham 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: r235267 - in head/usr.bin/sort: . nls X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 12:48:29 -0000 --1wmVbOfxY+Z3peoJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, May 11, 2012 at 12:37:16PM +0000, Gabor Kovesdan wrote: > Author: gabor > Date: Fri May 11 12:37:16 2012 > New Revision: 235267 > URL: http://svn.freebsd.org/changeset/base/235267 > +bool byte_sort = false; > + > +static wchar_t **wmonths = NULL; > +static unsigned char **cmonths = NULL; Such initializations are useless. You only increase the size of the binary on the disk as the consequence. --1wmVbOfxY+Z3peoJ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk+tCpQACgkQC3+MBN1Mb4gVpQCfY72YSkx1PnBhPqJFszoOHtCJ e3kAmgKaHGFGs7+1h8gGO8mHDIRqUs4p =MNqY -----END PGP SIGNATURE----- --1wmVbOfxY+Z3peoJ-- From owner-svn-src-head@FreeBSD.ORG Fri May 11 12:57:30 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C7EC106564A; Fri, 11 May 2012 12:57:30 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) by mx1.freebsd.org (Postfix) with ESMTP id 669348FC0A; Fri, 11 May 2012 12:57:30 +0000 (UTC) Received: from [192.168.14.46] ([24.114.252.244]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id q4BCvTvt074436 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Fri, 11 May 2012 12:57:29 GMT (envelope-from theraven@FreeBSD.org) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: David Chisnall In-Reply-To: <20120511124820.GN2358@deviant.kiev.zoral.com.ua> Date: Fri, 11 May 2012 08:57:29 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <6AE99277-D90F-453D-AE40-EE731DFD3BAB@FreeBSD.org> References: <201205111237.q4BCbGX2083596@svn.freebsd.org> <20120511124820.GN2358@deviant.kiev.zoral.com.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.1257) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Gabor Kovesdan Subject: Re: svn commit: r235267 - in head/usr.bin/sort: . nls X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 12:57:30 -0000 On 11 May 2012, at 08:48, Konstantin Belousov wrote: > On Fri, May 11, 2012 at 12:37:16PM +0000, Gabor Kovesdan wrote: >> Author: gabor >> Date: Fri May 11 12:37:16 2012 >> New Revision: 235267 >> URL: http://svn.freebsd.org/changeset/base/235267 >=20 >> +bool byte_sort =3D false; >> + >> +static wchar_t **wmonths =3D NULL; >> +static unsigned char **cmonths =3D NULL; >=20 > Such initializations are useless. You only increase the size of the = binary > on the disk as the consequence. Really? The C specification requires all globals and statics that are = not explicitly initialised to be set to their zero value, so this = initialisation has no effect on the resulting binary[1]. These are = placed in the BSS section, irrespective of whether the initialisation is = implicit or explicit and the loader is responsible for allocating space = for them - all that is stored in the binary is the size. For local variables, initialisation like this has no effect even at low = optimisation levels - dead stores will be removed. It does, however, = make it more difficult for the compiler to distinguish between = initialised and initialised sensibly in some cases. David [1] In a standards-compliant compiler. Apparently a few shipping = compilers for embedded systems fail to respect this, but everything = FreeBSD is compiled with does.= From owner-svn-src-head@FreeBSD.ORG Fri May 11 13:03:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C4EA1065670 for ; Fri, 11 May 2012 13:03:22 +0000 (UTC) (envelope-from bounces+73574-9504-svn-src-head=freebsd.org@sendgrid.me) Received: from o3.shared.sendgrid.net (o3.shared.sendgrid.net [208.117.48.85]) by mx1.freebsd.org (Postfix) with SMTP id CFA4F8FC0C for ; Fri, 11 May 2012 13:03:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h= message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; s=smtpapi; bh=SOL4OsfmV6CNL166prskglHstJw=; b=K2al4h2KJjcGNIxxz8DGSUUHd9Se WxWF6pa8ykaCxWGsTBUwwy3ZoJcukXcr+ZMcvwxRSvx8QqbU2aSz2isXkDXKDld9 EivqsRo9x5CkKZ9xFMsM3pBy50Lu0AUayjoKLCcOegQsC79rDGkDFBkkunBTu48F Vd10CZB+IjK1RmE= Received: by 10.41.149.110 with SMTP id f04-07.1899.4FAD0E192 Fri, 11 May 2012 13:03:21 +0000 (UTC) Received: from mail.tarsnap.com (unknown [10.8.49.124]) by mi3 (SG) with ESMTP id 4fad0e18.1323.24f63e3 for ; Fri, 11 May 2012 08:03:20 -0500 (CST) Received: (qmail 23760 invoked from network); 11 May 2012 12:56:39 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by mail.tarsnap.com with ESMTP; 11 May 2012 12:56:39 -0000 Received: (qmail 8547 invoked from network); 11 May 2012 13:02:44 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 11 May 2012 13:02:44 -0000 Message-ID: <4FAD0DF4.9000609@freebsd.org> Date: Fri, 11 May 2012 06:02:44 -0700 From: Colin Percival User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120509 Thunderbird/12.0.1 MIME-Version: 1.0 To: Konstantin Belousov References: <201205111237.q4BCbGX2083596@svn.freebsd.org> <20120511124820.GN2358@deviant.kiev.zoral.com.ua> In-Reply-To: <20120511124820.GN2358@deviant.kiev.zoral.com.ua> X-Enigmail-Version: 1.5pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Sendgrid-EID: EvYvoie/qnEezyq2t4eRKjDm9X7ZKbCMt75WvXA+XNH0Rtb8nNeDSHiMkH4QpjFM6cSJ8jxYIQ7dwb20qxk9peyGSoKtZxj9QNJvXKjcr7XHh9wNLeH/8eHwJeS+MH9v20UBUAo78Q0+JlhqUWZvu6JHzl+RLG0RHKdvvg9Z/28= Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Gabor Kovesdan Subject: Re: svn commit: r235267 - in head/usr.bin/sort: . nls X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 13:03:22 -0000 On 05/11/12 05:48, Konstantin Belousov wrote: > On Fri, May 11, 2012 at 12:37:16PM +0000, Gabor Kovesdan wrote: >> +bool byte_sort = false; + +static wchar_t **wmonths = NULL; +static >> unsigned char **cmonths = NULL; > > Such initializations are useless. You only increase the size of the binary > on the disk as the consequence. I just tested this hypothesis, and found no change in binary size using either clang or gcc46. Presumably they're smart enough to ignore explicit (and unnecessary) initializations of statics to zero. -- Colin Percival Security Officer, FreeBSD | freebsd.org | The power to serve Founder / author, Tarsnap | tarsnap.com | Online backups for the truly paranoid From owner-svn-src-head@FreeBSD.ORG Fri May 11 13:03:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4CA3F106566C; Fri, 11 May 2012 13:03:53 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E04F8FC17; Fri, 11 May 2012 13:03:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BD3qNd084546; Fri, 11 May 2012 13:03:52 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BD3qSl084544; Fri, 11 May 2012 13:03:52 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201205111303.q4BD3qSl084544@svn.freebsd.org> From: Gabor Kovesdan Date: Fri, 11 May 2012 13:03: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: r235269 - head/share/man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 13:03:53 -0000 Author: gabor Date: Fri May 11 13:03:52 2012 New Revision: 235269 URL: http://svn.freebsd.org/changeset/base/235269 Log: - Regen Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Fri May 11 12:47:21 2012 (r235268) +++ head/share/man/man5/src.conf.5 Fri May 11 13:03:52 2012 (r235269) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 221733 2011-05-10 13:01:11Z ru .\" $FreeBSD$ -.Dd April 29, 2012 +.Dd May 11, 2012 .Dt SRC.CONF 5 .Os .Sh NAME @@ -227,6 +227,9 @@ Set to not build the BSD licensed versio .It Va WITH_BSD_GREP .\" from FreeBSD: head/tools/build/options/WITH_BSD_GREP 222273 2011-05-25 01:04:12Z obrien Install BSD-licensed grep as '[ef]grep' instead of GNU grep. +.It Va WITH_BSD_SORT +.\" from FreeBSD: head/tools/build/options/WITH_BSD_SORT 235268 2012-05-11 12:47:21Z gabor +Install BSD-licensed sort as 'sort' instead of GNU sort. .It Va WITHOUT_BSNMP .\" from FreeBSD: head/tools/build/options/WITHOUT_BSNMP 183306 2008-09-23 16:15:42Z sam Set to not build or install @@ -270,7 +273,7 @@ When set, it also enforces the following Set to not build the Clang C/C++ compiler. .Pp It is a default setting on -arm/arm, arm/armeb, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc and sparc64/sparc64. +arm/arm, arm/armeb, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32 and sparc64/sparc64. When set, it also enforces the following options: .Pp .Bl -item -compact @@ -284,7 +287,7 @@ When set, it also enforces the following Set to build the Clang C/C++ compiler. .Pp It is a default setting on -amd64/amd64, i386/i386, pc98/i386 and powerpc/powerpc64. +amd64/amd64, i386/i386, pc98/i386, powerpc/powerpc and powerpc/powerpc64. .It Va WITH_CLANG_EXTRAS .\" from FreeBSD: head/tools/build/options/WITH_CLANG_EXTRAS 231057 2012-02-05 23:56:22Z dim Set to build additional clang and llvm tools, such as bugpoint. From owner-svn-src-head@FreeBSD.ORG Fri May 11 13:09:11 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A2C81065673; Fri, 11 May 2012 13:09:11 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id CE5188FC08; Fri, 11 May 2012 13:09:10 +0000 (UTC) Received: from server.mypc.hu (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id 0659814E7546; Fri, 11 May 2012 15:09:10 +0200 (CEST) X-Virus-Scanned: amavisd-new at server.mypc.hu Received: from server.mypc.hu ([127.0.0.1]) by server.mypc.hu (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id nisThTg5Tevy; Fri, 11 May 2012 15:09:09 +0200 (CEST) Received: from [192.168.1.117] (catv-80-98-232-12.catv.broadband.hu [80.98.232.12]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id 70C7F14E755C; Fri, 11 May 2012 15:09:09 +0200 (CEST) Message-ID: <4FAD0F71.1080203@FreeBSD.org> Date: Fri, 11 May 2012 15:09:05 +0200 From: Gabor Kovesdan User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120328 Thunderbird/13.0a2 MIME-Version: 1.0 To: Colin Percival References: <201205111237.q4BCbGX2083596@svn.freebsd.org> <20120511124820.GN2358@deviant.kiev.zoral.com.ua> <4FAD0DF4.9000609@freebsd.org> In-Reply-To: <4FAD0DF4.9000609@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r235267 - in head/usr.bin/sort: . nls X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 13:09:11 -0000 On 2012.05.11. 15:02, Colin Percival wrote: > On 05/11/12 05:48, Konstantin Belousov wrote: >> >On Fri, May 11, 2012 at 12:37:16PM +0000, Gabor Kovesdan wrote: >>> >>+bool byte_sort = false; + +static wchar_t **wmonths = NULL; +static >>> >>unsigned char **cmonths = NULL; >> > >> >Such initializations are useless. You only increase the size of the binary >> >on the disk as the consequence. > I just tested this hypothesis, and found no change in binary size using > either clang or gcc46. Presumably they're smart enough to ignore explicit > (and unnecessary) initializations of statics to zero. Thanks Colin and thanks Konstantin for raising this doubt. I will clean these up later for better style, anyway. Gabor From owner-svn-src-head@FreeBSD.ORG Fri May 11 13:10:36 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E6279106566B; Fri, 11 May 2012 13:10:35 +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 38B7E8FC1B; Fri, 11 May 2012 13:10:11 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q4BD9ui4035706; Fri, 11 May 2012 16:09:56 +0300 (EEST) (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.5/8.14.5) with ESMTP id q4BD9t4S035591; Fri, 11 May 2012 16:09:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q4BD9tIk035590; Fri, 11 May 2012 16:09:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 11 May 2012 16:09:55 +0300 From: Konstantin Belousov To: David Chisnall Message-ID: <20120511130955.GO2358@deviant.kiev.zoral.com.ua> References: <201205111237.q4BCbGX2083596@svn.freebsd.org> <20120511124820.GN2358@deviant.kiev.zoral.com.ua> <6AE99277-D90F-453D-AE40-EE731DFD3BAB@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OpylS7L25zwHG0dS" Content-Disposition: inline In-Reply-To: <6AE99277-D90F-453D-AE40-EE731DFD3BAB@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=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham 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, Gabor Kovesdan Subject: Re: svn commit: r235267 - in head/usr.bin/sort: . nls X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 13:10:36 -0000 --OpylS7L25zwHG0dS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 11, 2012 at 08:57:29AM -0400, David Chisnall wrote: > On 11 May 2012, at 08:48, Konstantin Belousov wrote: >=20 > > On Fri, May 11, 2012 at 12:37:16PM +0000, Gabor Kovesdan wrote: > >> Author: gabor > >> Date: Fri May 11 12:37:16 2012 > >> New Revision: 235267 > >> URL: http://svn.freebsd.org/changeset/base/235267 > >=20 > >> +bool byte_sort =3D false; > >> + > >> +static wchar_t **wmonths =3D NULL; > >> +static unsigned char **cmonths =3D NULL; > >=20 > > Such initializations are useless. You only increase the size of the bin= ary > > on the disk as the consequence. >=20 > Really? The C specification requires all globals and statics that > are not explicitly initialised to be set to their zero value, so this > initialisation has no effect on the resulting binary[1]. These are > placed in the BSS section, irrespective of whether the initialisation is > implicit or explicit and the loader is responsible for allocating space > for them - all that is stored in the binary is the size. The initialized variables are placed in .data and not .bss. Apparently, some compilers do an optimiziation and put zero-initialized objects into .bss, as Colin noted, but this is not guaranteed behaviour. If placed in .data, they do consume disk space. Redundand initialization is not encouraged by style as well. >=20 > For local variables, initialisation like this has no effect even > at low optimisation levels - dead stores will be removed. It does, > however, make it more difficult for the compiler to distinguish between > initialised and initialised sensibly in some cases. local variables are irrelevant there. >=20 > David >=20 > [1] In a standards-compliant compiler. Apparently a few shipping > compilers for embedded systems fail to respect this, but everything > FreeBSD is compiled with does. --OpylS7L25zwHG0dS Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk+tD6MACgkQC3+MBN1Mb4hi0gCfVDlGEYE0YUxXCKY4chkd/3cb 98wAoKFhikWfcz1UoO1ZArgMWHBob+ui =F/Dd -----END PGP SIGNATURE----- --OpylS7L25zwHG0dS-- From owner-svn-src-head@FreeBSD.ORG Fri May 11 13:20:18 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 383CE1065677; Fri, 11 May 2012 13:20:18 +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 1972E8FC14; Fri, 11 May 2012 13:20:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BDKHo8085102; Fri, 11 May 2012 13:20:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BDKHYK085099; Fri, 11 May 2012 13:20:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201205111320.q4BDKHYK085099@svn.freebsd.org> From: Alexander Motin Date: Fri, 11 May 2012 13:20: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: r235270 - head/sys/geom/raid X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 13:20:18 -0000 Author: mav Date: Fri May 11 13:20:17 2012 New Revision: 235270 URL: http://svn.freebsd.org/changeset/base/235270 Log: - Prevent error status leak if write to some of the RAID1/1E volume disks failed while write to some other succeeded. Instead mark disk as failed. - Make RAID1E less aggressive in failing disks to avoid volume breakage. MFC after: 2 weeks Modified: head/sys/geom/raid/tr_raid1.c head/sys/geom/raid/tr_raid1e.c Modified: head/sys/geom/raid/tr_raid1.c ============================================================================== --- head/sys/geom/raid/tr_raid1.c Fri May 11 13:03:52 2012 (r235269) +++ head/sys/geom/raid/tr_raid1.c Fri May 11 13:20:17 2012 (r235270) @@ -894,7 +894,16 @@ rebuild_round_done: g_raid_unlock_range(sd->sd_volume, bp->bio_offset, bp->bio_length); } - error = bp->bio_error; + if (pbp->bio_cmd != BIO_READ) { + if (pbp->bio_inbed == 1 || pbp->bio_error != 0) + pbp->bio_error = bp->bio_error; + if (bp->bio_error != 0) { + G_RAID_LOGREQ(0, bp, "Write failed: failing subdisk."); + g_raid_tr_raid1_fail_disk(sd->sd_softc, sd, sd->sd_disk); + } + error = pbp->bio_error; + } else + error = bp->bio_error; g_destroy_bio(bp); if (pbp->bio_children == pbp->bio_inbed) { pbp->bio_completed = pbp->bio_length; Modified: head/sys/geom/raid/tr_raid1e.c ============================================================================== --- head/sys/geom/raid/tr_raid1e.c Fri May 11 13:03:52 2012 (r235269) +++ head/sys/geom/raid/tr_raid1e.c Fri May 11 13:20:17 2012 (r235270) @@ -338,6 +338,9 @@ static void g_raid_tr_raid1e_fail_disk(struct g_raid_softc *sc, struct g_raid_subdisk *sd, struct g_raid_disk *disk) { + struct g_raid_volume *vol; + + vol = sd->sd_volume; /* * We don't fail the last disk in the pack, since it still has decent * data on it and that's better than failing the disk if it is the root @@ -347,8 +350,12 @@ g_raid_tr_raid1e_fail_disk(struct g_raid * the volume that has / on it. I can't think of a case where we'd * want the volume to go away on this kind of event. */ - if (g_raid_nsubdisks(sd->sd_volume, G_RAID_SUBDISK_S_ACTIVE) == 1 && - g_raid_get_subdisk(sd->sd_volume, G_RAID_SUBDISK_S_ACTIVE) == sd) + if ((g_raid_nsubdisks(vol, G_RAID_SUBDISK_S_ACTIVE) + + g_raid_nsubdisks(vol, G_RAID_SUBDISK_S_RESYNC) + + g_raid_nsubdisks(vol, G_RAID_SUBDISK_S_STALE) + + g_raid_nsubdisks(vol, G_RAID_SUBDISK_S_UNINITIALIZED) < + vol->v_disks_count) && + (sd->sd_state >= G_RAID_SUBDISK_S_UNINITIALIZED)) return; g_raid_fail_disk(sc, sd, disk); } @@ -1113,7 +1120,16 @@ rebuild_round_done: G_RAID_LOGREQ(2, bp, "REMAP done %d.", bp->bio_error); g_raid_unlock_range(sd->sd_volume, virtual, bp->bio_length); } - error = bp->bio_error; + if (pbp->bio_cmd != BIO_READ) { + if (pbp->bio_inbed == 1 || pbp->bio_error != 0) + pbp->bio_error = bp->bio_error; + if (bp->bio_error != 0) { + G_RAID_LOGREQ(0, bp, "Write failed: failing subdisk."); + g_raid_tr_raid1e_fail_disk(sd->sd_softc, sd, sd->sd_disk); + } + error = pbp->bio_error; + } else + error = bp->bio_error; g_destroy_bio(bp); if (pbp->bio_children == pbp->bio_inbed) { pbp->bio_completed = pbp->bio_length; From owner-svn-src-head@FreeBSD.ORG Fri May 11 13:33:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54C091065670; Fri, 11 May 2012 13:33:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 0F3018FC08; Fri, 11 May 2012 13:33:22 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:839:5834:5e28:89f8] (unknown [IPv6:2001:7b8:3a7:0:839:5834:5e28:89f8]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 415735C37; Fri, 11 May 2012 15:33:21 +0200 (CEST) Message-ID: <4FAD1523.2040501@FreeBSD.org> Date: Fri, 11 May 2012 15:33:23 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120425 Thunderbird/13.0 MIME-Version: 1.0 To: Colin Percival References: <201205111237.q4BCbGX2083596@svn.freebsd.org> <20120511124820.GN2358@deviant.kiev.zoral.com.ua> <4FAD0DF4.9000609@freebsd.org> In-Reply-To: <4FAD0DF4.9000609@freebsd.org> X-Enigmail-Version: 1.5a1pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Gabor Kovesdan Subject: Re: svn commit: r235267 - in head/usr.bin/sort: . nls X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 13:33:23 -0000 On 2012-05-11 15:02, Colin Percival wrote:> On 05/11/12 05:48, Konstantin Belousov wrote: >> On Fri, May 11, 2012 at 12:37:16PM +0000, Gabor Kovesdan wrote: >>> +bool byte_sort = false; + +static wchar_t **wmonths = NULL; +static >>> unsigned char **cmonths = NULL; >> >> Such initializations are useless. You only increase the size of the binary >> on the disk as the consequence. > > I just tested this hypothesis, and found no change in binary size using > either clang or gcc46. Presumably they're smart enough to ignore explicit > (and unnecessary) initializations of statics to zero. This is default behaviour, which can be toggled with gcc's (and clang's) command line option -fno-zero-initialized-in-bss: http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-fno_002dzero_002dinitialized_002din_002dbss-744 From owner-svn-src-head@FreeBSD.ORG Fri May 11 14:40:25 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C0F1C1065676; Fri, 11 May 2012 14:40:25 +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 AB2028FC08; Fri, 11 May 2012 14:40:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BEePg3087546; Fri, 11 May 2012 14:40:25 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BEePPh087543; Fri, 11 May 2012 14:40:25 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201205111440.q4BEePPh087543@svn.freebsd.org> From: Warner Losh Date: Fri, 11 May 2012 14:40: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: r235271 - in head/sys: arm/at91 boot/arm/at91/libat91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 14:40:25 -0000 Author: imp Date: Fri May 11 14:40:25 2012 New Revision: 235271 URL: http://svn.freebsd.org/changeset/base/235271 Log: Hack to unbreak boot2 for at91rm9200 boot loader. When the at91sam code came in, it moved things around which wound up breaking the build. We have to do this bit of a hack to avoid duplication of a lot of #defines. Modified: head/sys/arm/at91/at91_pioreg.h head/sys/boot/arm/at91/libat91/at91rm9200.h Modified: head/sys/arm/at91/at91_pioreg.h ============================================================================== --- head/sys/arm/at91/at91_pioreg.h Fri May 11 13:20:17 2012 (r235270) +++ head/sys/arm/at91/at91_pioreg.h Fri May 11 14:40:25 2012 (r235271) @@ -28,6 +28,7 @@ #ifndef ARM_AT91_AT91_PIOREG_H #define ARM_AT91_AT91_PIOREG_H +#ifndef ATMEL_ENV /* Registers */ #define PIO_PER 0x00 /* PIO Enable Register */ #define PIO_PDR 0x04 /* PIO Disable Register */ @@ -65,6 +66,7 @@ #define PIO_OWDR 0xa4 /* PIO Output Write Disable Register */ #define PIO_OWSR 0xa8 /* PIO Output Write Status Register */ /* 0xac reserved */ +#endif #define AT91C_PIO_PA0 ((unsigned int) 1 << 0) // Pin Controlled by PA0 #define AT91C_PIO_PA1 ((unsigned int) 1 << 1) // Pin Controlled by PA1 Modified: head/sys/boot/arm/at91/libat91/at91rm9200.h ============================================================================== --- head/sys/boot/arm/at91/libat91/at91rm9200.h Fri May 11 13:20:17 2012 (r235270) +++ head/sys/boot/arm/at91/libat91/at91rm9200.h Fri May 11 14:40:25 2012 (r235271) @@ -41,6 +41,8 @@ #ifndef AT91RM9200_H #define AT91RM9200_H +#define ATMEL_ENV + typedef volatile unsigned int AT91_REG;// Hardware register definition // ***************************************************************************** From owner-svn-src-head@FreeBSD.ORG Fri May 11 14:45:30 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CC601065674; Fri, 11 May 2012 14:45:30 +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 27CDC8FC17; Fri, 11 May 2012 14:45:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BEjUir087742; Fri, 11 May 2012 14:45:30 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BEjT6p087740; Fri, 11 May 2012 14:45:29 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201205111445.q4BEjT6p087740@svn.freebsd.org> From: Warner Losh Date: Fri, 11 May 2012 14:45: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: r235272 - head/sys/boot/arm/at91/boot2 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 14:45:30 -0000 Author: imp Date: Fri May 11 14:45:29 2012 New Revision: 235272 URL: http://svn.freebsd.org/changeset/base/235272 Log: Add support for passing in the board ID. # This doesn't implement the full Linux boot ABI for arm yet. # since there's no ATAGs list passed in for r2, and r0 has # boot options rather than 0 as specified in the standard. # Commited code to the tree won't touch any of this anyway, but # future code may be able to use this. Modified: head/sys/boot/arm/at91/boot2/boot2.c Modified: head/sys/boot/arm/at91/boot2/boot2.c ============================================================================== --- head/sys/boot/arm/at91/boot2/boot2.c Fri May 11 14:40:25 2012 (r235271) +++ head/sys/boot/arm/at91/boot2/boot2.c Fri May 11 14:45:29 2012 (r235272) @@ -86,11 +86,12 @@ static const unsigned char flags[NOPT] = RBX_VERBOSE }; +unsigned board_id; /* board type to pass to kernel, if set by board_* code */ unsigned dsk_start; static char cmd[512]; static char kname[1024]; static uint32_t opts; -static int dsk_meta; +static uint8_t dsk_meta; static void load(void); static int parse(void); @@ -241,7 +242,7 @@ load(void) #ifdef FIXUP_BOOT_DRV fixup_boot_drv(staddr, klen, bootslice, bootpart); #endif - ((void(*)(int))addr)(opts & RBX_MASK); + ((void(*)(int, int, int, int))addr)(opts & RBX_MASK, board_id, 0, 0); } static int From owner-svn-src-head@FreeBSD.ORG Fri May 11 14:52:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23B591065670; Fri, 11 May 2012 14:52:00 +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 0B7F58FC14; Fri, 11 May 2012 14:52:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BEpxIe087966; Fri, 11 May 2012 14:51:59 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BEpxKL087962; Fri, 11 May 2012 14:51:59 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201205111451.q4BEpxKL087962@svn.freebsd.org> From: Warner Losh Date: Fri, 11 May 2012 14:51: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: r235273 - head/sys/arm/xscale/ixp425 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 14:52:00 -0000 Author: imp Date: Fri May 11 14:51:59 2012 New Revision: 235273 URL: http://svn.freebsd.org/changeset/base/235273 Log: Remove obsolte big endian flag. It is no longer needed. Modified: head/sys/arm/xscale/ixp425/std.ixp425 head/sys/arm/xscale/ixp425/std.ixp435 Modified: head/sys/arm/xscale/ixp425/std.ixp425 ============================================================================== --- head/sys/arm/xscale/ixp425/std.ixp425 Fri May 11 14:45:29 2012 (r235272) +++ head/sys/arm/xscale/ixp425/std.ixp425 Fri May 11 14:51:59 2012 (r235273) @@ -3,4 +3,3 @@ files "../xscale/ixp425/files.ixp425" include "../xscale/std.xscale" cpu CPU_XSCALE_IXP425 -makeoption ARM_BIG_ENDIAN Modified: head/sys/arm/xscale/ixp425/std.ixp435 ============================================================================== --- head/sys/arm/xscale/ixp425/std.ixp435 Fri May 11 14:45:29 2012 (r235272) +++ head/sys/arm/xscale/ixp425/std.ixp435 Fri May 11 14:51:59 2012 (r235273) @@ -5,4 +5,3 @@ files "../xscale/ixp425/files.ixp425" include "../xscale/std.xscale" cpu CPU_XSCALE_IXP435 cpu CPU_XSCALE_IXP425 -makeoption ARM_BIG_ENDIAN From owner-svn-src-head@FreeBSD.ORG Fri May 11 14:54:39 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 16575106564A; Fri, 11 May 2012 14:54:39 +0000 (UTC) (envelope-from ache@vniz.net) Received: from vniz.net (vniz.net [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 824828FC15; Fri, 11 May 2012 14:54:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vniz.net (8.14.5/8.14.5) with ESMTP id q4BEsX7i019263; Fri, 11 May 2012 18:54:33 +0400 (MSK) (envelope-from ache@vniz.net) Received: (from ache@localhost) by localhost (8.14.5/8.14.5/Submit) id q4BEsXfl019262; Fri, 11 May 2012 18:54:33 +0400 (MSK) (envelope-from ache) Date: Fri, 11 May 2012 18:54:32 +0400 From: Andrey Chernov To: Konstantin Belousov Message-ID: <20120511145432.GA19173@vniz.net> Mail-Followup-To: Andrey Chernov , Konstantin Belousov , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201205111129.q4BBT85G081093@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201205111129.q4BBT85G081093@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: r235266 - head/lib/libc/stdlib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 14:54:39 -0000 Thanks, but in this two places old errno value should be saved across free() because free() may damage it: On Fri, May 11, 2012 at 11:29:08AM +0000, Konstantin Belousov wrote: ... > + if (lstat(resolved, &sb) != 0) { > + if (m) > + free(resolved); > + return (NULL); ... > + errno = ENOTDIR; > if (m) > free(resolved); > return (NULL); -- http://ache.vniz.net/ From owner-svn-src-head@FreeBSD.ORG Fri May 11 16:04:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B2B2B106564A; Fri, 11 May 2012 16:04:57 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A21C8FC08; Fri, 11 May 2012 16:04:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BG4vvR090494; Fri, 11 May 2012 16:04:57 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BG4uuO090406; Fri, 11 May 2012 16:04:56 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201205111604.q4BG4uuO090406@svn.freebsd.org> From: Gabor Kovesdan Date: Fri, 11 May 2012 16:04: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: r235274 - in head/tools/test/sort: . bigtest bigtest/siks regression regression/data regression/ref X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 16:04:57 -0000 Author: gabor Date: Fri May 11 16:04:55 2012 New Revision: 235274 URL: http://svn.freebsd.org/changeset/base/235274 Log: - Add regression tests for BSD sort Added: head/tools/test/sort/ head/tools/test/sort/bigtest/ head/tools/test/sort/bigtest/kcmd (contents, props changed) head/tools/test/sort/bigtest/q-1.022.tgz (contents, props changed) head/tools/test/sort/bigtest/q-1.024.003. (contents, props changed) head/tools/test/sort/bigtest/q-1.024.003.tgz (contents, props changed) head/tools/test/sort/bigtest/q-1.024.009.tgz (contents, props changed) head/tools/test/sort/bigtest/q-1.024.07.tgz (contents, props changed) head/tools/test/sort/bigtest/q-1.024.tgz (contents, props changed) head/tools/test/sort/bigtest/q-1.23.1.tgz (contents, props changed) head/tools/test/sort/bigtest/q-1.23.tgz (contents, props changed) head/tools/test/sort/bigtest/si (contents, props changed) head/tools/test/sort/bigtest/siks/ head/tools/test/sort/bigtest/siks/res.1.1.8.0 (contents, props changed) head/tools/test/sort/bigtest/siks/res.6.25.9.15 (contents, props changed) head/tools/test/sort/bigtest/siks/res.8.10.10.0 (contents, props changed) head/tools/test/sort/bigtest/siks/sik1 (contents, props changed) head/tools/test/sort/bigtest/siks/sik2 (contents, props changed) head/tools/test/sort/regression/ head/tools/test/sort/regression/Makefile (contents, props changed) head/tools/test/sort/regression/cmp.sh (contents, props changed) head/tools/test/sort/regression/data/ head/tools/test/sort/regression/data/test01 (contents, props changed) head/tools/test/sort/regression/data/test02 (contents, props changed) head/tools/test/sort/regression/data/test03 (contents, props changed) head/tools/test/sort/regression/data/test04 (contents, props changed) head/tools/test/sort/regression/data/test05 (contents, props changed) head/tools/test/sort/regression/data/test06 (contents, props changed) head/tools/test/sort/regression/data/test07 (contents, props changed) head/tools/test/sort/regression/data/test08 (contents, props changed) head/tools/test/sort/regression/data/test09 (contents, props changed) head/tools/test/sort/regression/data/test10 (contents, props changed) head/tools/test/sort/regression/data/test11 (contents, props changed) head/tools/test/sort/regression/data/test12 (contents, props changed) head/tools/test/sort/regression/data/test13 (contents, props changed) head/tools/test/sort/regression/data/test14 (contents, props changed) head/tools/test/sort/regression/data/test15 (contents, props changed) head/tools/test/sort/regression/data/test16 (contents, props changed) head/tools/test/sort/regression/data/test17 (contents, props changed) head/tools/test/sort/regression/data/test_nums (contents, props changed) head/tools/test/sort/regression/ref/ head/tools/test/sort/regression/ref/test01 (contents, props changed) head/tools/test/sort/regression/ref/test01M (contents, props changed) head/tools/test/sort/regression/ref/test01Mr (contents, props changed) head/tools/test/sort/regression/ref/test01b (contents, props changed) head/tools/test/sort/regression/ref/test01bd (contents, props changed) head/tools/test/sort/regression/ref/test01bs (contents, props changed) head/tools/test/sort/regression/ref/test01bu (contents, props changed) head/tools/test/sort/regression/ref/test01f (contents, props changed) head/tools/test/sort/regression/ref/test01fr (contents, props changed) head/tools/test/sort/regression/ref/test01fs (contents, props changed) head/tools/test/sort/regression/ref/test01fu (contents, props changed) head/tools/test/sort/regression/ref/test01g (contents, props changed) head/tools/test/sort/regression/ref/test01gr (contents, props changed) head/tools/test/sort/regression/ref/test01gs (contents, props changed) head/tools/test/sort/regression/ref/test01gu (contents, props changed) head/tools/test/sort/regression/ref/test01i (contents, props changed) head/tools/test/sort/regression/ref/test01ir (contents, props changed) head/tools/test/sort/regression/ref/test01n (contents, props changed) head/tools/test/sort/regression/ref/test01nr (contents, props changed) head/tools/test/sort/regression/ref/test01ns (contents, props changed) head/tools/test/sort/regression/ref/test01nu (contents, props changed) head/tools/test/sort/regression/ref/test01r (contents, props changed) head/tools/test/sort/regression/ref/test01u (contents, props changed) head/tools/test/sort/regression/ref/test02 (contents, props changed) head/tools/test/sort/regression/ref/test02M (contents, props changed) head/tools/test/sort/regression/ref/test02Mr (contents, props changed) head/tools/test/sort/regression/ref/test02b (contents, props changed) head/tools/test/sort/regression/ref/test02bd (contents, props changed) head/tools/test/sort/regression/ref/test02bs (contents, props changed) head/tools/test/sort/regression/ref/test02bu (contents, props changed) head/tools/test/sort/regression/ref/test02f (contents, props changed) head/tools/test/sort/regression/ref/test02fr (contents, props changed) head/tools/test/sort/regression/ref/test02fs (contents, props changed) head/tools/test/sort/regression/ref/test02fu (contents, props changed) head/tools/test/sort/regression/ref/test02g (contents, props changed) head/tools/test/sort/regression/ref/test02gr (contents, props changed) head/tools/test/sort/regression/ref/test02gs (contents, props changed) head/tools/test/sort/regression/ref/test02gu (contents, props changed) head/tools/test/sort/regression/ref/test02i (contents, props changed) head/tools/test/sort/regression/ref/test02ir (contents, props changed) head/tools/test/sort/regression/ref/test02n (contents, props changed) head/tools/test/sort/regression/ref/test02nr (contents, props changed) head/tools/test/sort/regression/ref/test02ns (contents, props changed) head/tools/test/sort/regression/ref/test02nu (contents, props changed) head/tools/test/sort/regression/ref/test02r (contents, props changed) head/tools/test/sort/regression/ref/test02u (contents, props changed) head/tools/test/sort/regression/ref/test03 (contents, props changed) head/tools/test/sort/regression/ref/test03M (contents, props changed) head/tools/test/sort/regression/ref/test03Mr (contents, props changed) head/tools/test/sort/regression/ref/test03b (contents, props changed) head/tools/test/sort/regression/ref/test03bd (contents, props changed) head/tools/test/sort/regression/ref/test03bs (contents, props changed) head/tools/test/sort/regression/ref/test03bu (contents, props changed) head/tools/test/sort/regression/ref/test03f (contents, props changed) head/tools/test/sort/regression/ref/test03fr (contents, props changed) head/tools/test/sort/regression/ref/test03fs (contents, props changed) head/tools/test/sort/regression/ref/test03fu (contents, props changed) head/tools/test/sort/regression/ref/test03g (contents, props changed) head/tools/test/sort/regression/ref/test03gr (contents, props changed) head/tools/test/sort/regression/ref/test03gs (contents, props changed) head/tools/test/sort/regression/ref/test03gu (contents, props changed) head/tools/test/sort/regression/ref/test03i (contents, props changed) head/tools/test/sort/regression/ref/test03ir (contents, props changed) head/tools/test/sort/regression/ref/test03n (contents, props changed) head/tools/test/sort/regression/ref/test03nr (contents, props changed) head/tools/test/sort/regression/ref/test03ns (contents, props changed) head/tools/test/sort/regression/ref/test03nu (contents, props changed) head/tools/test/sort/regression/ref/test03r (contents, props changed) head/tools/test/sort/regression/ref/test03u (contents, props changed) head/tools/test/sort/regression/ref/test04 (contents, props changed) head/tools/test/sort/regression/ref/test04M (contents, props changed) head/tools/test/sort/regression/ref/test04Mr (contents, props changed) head/tools/test/sort/regression/ref/test04b (contents, props changed) head/tools/test/sort/regression/ref/test04bd (contents, props changed) head/tools/test/sort/regression/ref/test04bs (contents, props changed) head/tools/test/sort/regression/ref/test04bu (contents, props changed) head/tools/test/sort/regression/ref/test04f (contents, props changed) head/tools/test/sort/regression/ref/test04fr (contents, props changed) head/tools/test/sort/regression/ref/test04fs (contents, props changed) head/tools/test/sort/regression/ref/test04fu (contents, props changed) head/tools/test/sort/regression/ref/test04g (contents, props changed) head/tools/test/sort/regression/ref/test04gr (contents, props changed) head/tools/test/sort/regression/ref/test04gs (contents, props changed) head/tools/test/sort/regression/ref/test04gu (contents, props changed) head/tools/test/sort/regression/ref/test04i (contents, props changed) head/tools/test/sort/regression/ref/test04ir (contents, props changed) head/tools/test/sort/regression/ref/test04n (contents, props changed) head/tools/test/sort/regression/ref/test04nr (contents, props changed) head/tools/test/sort/regression/ref/test04ns (contents, props changed) head/tools/test/sort/regression/ref/test04nu (contents, props changed) head/tools/test/sort/regression/ref/test04r (contents, props changed) head/tools/test/sort/regression/ref/test04u (contents, props changed) head/tools/test/sort/regression/ref/test05 (contents, props changed) head/tools/test/sort/regression/ref/test05M (contents, props changed) head/tools/test/sort/regression/ref/test05Mr (contents, props changed) head/tools/test/sort/regression/ref/test05b (contents, props changed) head/tools/test/sort/regression/ref/test05bd (contents, props changed) head/tools/test/sort/regression/ref/test05bs (contents, props changed) head/tools/test/sort/regression/ref/test05bu (contents, props changed) head/tools/test/sort/regression/ref/test05f (contents, props changed) head/tools/test/sort/regression/ref/test05fr (contents, props changed) head/tools/test/sort/regression/ref/test05fs (contents, props changed) head/tools/test/sort/regression/ref/test05fu (contents, props changed) head/tools/test/sort/regression/ref/test05g (contents, props changed) head/tools/test/sort/regression/ref/test05gr (contents, props changed) head/tools/test/sort/regression/ref/test05gs (contents, props changed) head/tools/test/sort/regression/ref/test05gu (contents, props changed) head/tools/test/sort/regression/ref/test05i (contents, props changed) head/tools/test/sort/regression/ref/test05ir (contents, props changed) head/tools/test/sort/regression/ref/test05n (contents, props changed) head/tools/test/sort/regression/ref/test05nr (contents, props changed) head/tools/test/sort/regression/ref/test05ns (contents, props changed) head/tools/test/sort/regression/ref/test05nu (contents, props changed) head/tools/test/sort/regression/ref/test05r (contents, props changed) head/tools/test/sort/regression/ref/test05u (contents, props changed) head/tools/test/sort/regression/ref/test06 (contents, props changed) head/tools/test/sort/regression/ref/test06M (contents, props changed) head/tools/test/sort/regression/ref/test06Mr (contents, props changed) head/tools/test/sort/regression/ref/test06b (contents, props changed) head/tools/test/sort/regression/ref/test06bd (contents, props changed) head/tools/test/sort/regression/ref/test06bs (contents, props changed) head/tools/test/sort/regression/ref/test06bu (contents, props changed) head/tools/test/sort/regression/ref/test06f (contents, props changed) head/tools/test/sort/regression/ref/test06fr (contents, props changed) head/tools/test/sort/regression/ref/test06fs (contents, props changed) head/tools/test/sort/regression/ref/test06fu (contents, props changed) head/tools/test/sort/regression/ref/test06g (contents, props changed) head/tools/test/sort/regression/ref/test06gr (contents, props changed) head/tools/test/sort/regression/ref/test06gs (contents, props changed) head/tools/test/sort/regression/ref/test06gu (contents, props changed) head/tools/test/sort/regression/ref/test06i (contents, props changed) head/tools/test/sort/regression/ref/test06ir (contents, props changed) head/tools/test/sort/regression/ref/test06n (contents, props changed) head/tools/test/sort/regression/ref/test06nr (contents, props changed) head/tools/test/sort/regression/ref/test06ns (contents, props changed) head/tools/test/sort/regression/ref/test06nu (contents, props changed) head/tools/test/sort/regression/ref/test06r (contents, props changed) head/tools/test/sort/regression/ref/test06u (contents, props changed) head/tools/test/sort/regression/ref/test07 (contents, props changed) head/tools/test/sort/regression/ref/test07M (contents, props changed) head/tools/test/sort/regression/ref/test07Mr (contents, props changed) head/tools/test/sort/regression/ref/test07b (contents, props changed) head/tools/test/sort/regression/ref/test07bd (contents, props changed) head/tools/test/sort/regression/ref/test07bs (contents, props changed) head/tools/test/sort/regression/ref/test07bu (contents, props changed) head/tools/test/sort/regression/ref/test07f (contents, props changed) head/tools/test/sort/regression/ref/test07fr (contents, props changed) head/tools/test/sort/regression/ref/test07fs (contents, props changed) head/tools/test/sort/regression/ref/test07fu (contents, props changed) head/tools/test/sort/regression/ref/test07g (contents, props changed) head/tools/test/sort/regression/ref/test07gr (contents, props changed) head/tools/test/sort/regression/ref/test07gs (contents, props changed) head/tools/test/sort/regression/ref/test07gu (contents, props changed) head/tools/test/sort/regression/ref/test07i (contents, props changed) head/tools/test/sort/regression/ref/test07ir (contents, props changed) head/tools/test/sort/regression/ref/test07n (contents, props changed) head/tools/test/sort/regression/ref/test07nr (contents, props changed) head/tools/test/sort/regression/ref/test07ns (contents, props changed) head/tools/test/sort/regression/ref/test07nu (contents, props changed) head/tools/test/sort/regression/ref/test07r (contents, props changed) head/tools/test/sort/regression/ref/test07u (contents, props changed) head/tools/test/sort/regression/ref/test08 (contents, props changed) head/tools/test/sort/regression/ref/test08M (contents, props changed) head/tools/test/sort/regression/ref/test08Mr (contents, props changed) head/tools/test/sort/regression/ref/test08b (contents, props changed) head/tools/test/sort/regression/ref/test08bd (contents, props changed) head/tools/test/sort/regression/ref/test08bs (contents, props changed) head/tools/test/sort/regression/ref/test08bu (contents, props changed) head/tools/test/sort/regression/ref/test08f (contents, props changed) head/tools/test/sort/regression/ref/test08fr (contents, props changed) head/tools/test/sort/regression/ref/test08fs (contents, props changed) head/tools/test/sort/regression/ref/test08fu (contents, props changed) head/tools/test/sort/regression/ref/test08g (contents, props changed) head/tools/test/sort/regression/ref/test08gr (contents, props changed) head/tools/test/sort/regression/ref/test08gs (contents, props changed) head/tools/test/sort/regression/ref/test08gu (contents, props changed) head/tools/test/sort/regression/ref/test08i (contents, props changed) head/tools/test/sort/regression/ref/test08ir (contents, props changed) head/tools/test/sort/regression/ref/test08n (contents, props changed) head/tools/test/sort/regression/ref/test08nr (contents, props changed) head/tools/test/sort/regression/ref/test08ns (contents, props changed) head/tools/test/sort/regression/ref/test08nu (contents, props changed) head/tools/test/sort/regression/ref/test08r (contents, props changed) head/tools/test/sort/regression/ref/test08u (contents, props changed) head/tools/test/sort/regression/ref/test09 (contents, props changed) head/tools/test/sort/regression/ref/test09M (contents, props changed) head/tools/test/sort/regression/ref/test09Mr (contents, props changed) head/tools/test/sort/regression/ref/test09b (contents, props changed) head/tools/test/sort/regression/ref/test09bd (contents, props changed) head/tools/test/sort/regression/ref/test09bs (contents, props changed) head/tools/test/sort/regression/ref/test09bu (contents, props changed) head/tools/test/sort/regression/ref/test09f (contents, props changed) head/tools/test/sort/regression/ref/test09fr (contents, props changed) head/tools/test/sort/regression/ref/test09fs (contents, props changed) head/tools/test/sort/regression/ref/test09fu (contents, props changed) head/tools/test/sort/regression/ref/test09g (contents, props changed) head/tools/test/sort/regression/ref/test09gr (contents, props changed) head/tools/test/sort/regression/ref/test09gs (contents, props changed) head/tools/test/sort/regression/ref/test09gu (contents, props changed) head/tools/test/sort/regression/ref/test09i (contents, props changed) head/tools/test/sort/regression/ref/test09ir (contents, props changed) head/tools/test/sort/regression/ref/test09n (contents, props changed) head/tools/test/sort/regression/ref/test09nr (contents, props changed) head/tools/test/sort/regression/ref/test09ns (contents, props changed) head/tools/test/sort/regression/ref/test09nu (contents, props changed) head/tools/test/sort/regression/ref/test09r (contents, props changed) head/tools/test/sort/regression/ref/test09u (contents, props changed) head/tools/test/sort/regression/ref/test10 (contents, props changed) head/tools/test/sort/regression/ref/test10M (contents, props changed) head/tools/test/sort/regression/ref/test10Mr (contents, props changed) head/tools/test/sort/regression/ref/test10b (contents, props changed) head/tools/test/sort/regression/ref/test10bd (contents, props changed) head/tools/test/sort/regression/ref/test10bs (contents, props changed) head/tools/test/sort/regression/ref/test10bu (contents, props changed) head/tools/test/sort/regression/ref/test10f (contents, props changed) head/tools/test/sort/regression/ref/test10fr (contents, props changed) head/tools/test/sort/regression/ref/test10fs (contents, props changed) head/tools/test/sort/regression/ref/test10fu (contents, props changed) head/tools/test/sort/regression/ref/test10g (contents, props changed) head/tools/test/sort/regression/ref/test10gr (contents, props changed) head/tools/test/sort/regression/ref/test10gs (contents, props changed) head/tools/test/sort/regression/ref/test10gu (contents, props changed) head/tools/test/sort/regression/ref/test10i (contents, props changed) head/tools/test/sort/regression/ref/test10ir (contents, props changed) head/tools/test/sort/regression/ref/test10n (contents, props changed) head/tools/test/sort/regression/ref/test10nr (contents, props changed) head/tools/test/sort/regression/ref/test10ns (contents, props changed) head/tools/test/sort/regression/ref/test10nu (contents, props changed) head/tools/test/sort/regression/ref/test10r (contents, props changed) head/tools/test/sort/regression/ref/test10u (contents, props changed) head/tools/test/sort/regression/ref/test11 (contents, props changed) head/tools/test/sort/regression/ref/test11M (contents, props changed) head/tools/test/sort/regression/ref/test11Mr (contents, props changed) head/tools/test/sort/regression/ref/test11b (contents, props changed) head/tools/test/sort/regression/ref/test11bd (contents, props changed) head/tools/test/sort/regression/ref/test11bs (contents, props changed) head/tools/test/sort/regression/ref/test11bu (contents, props changed) head/tools/test/sort/regression/ref/test11f (contents, props changed) head/tools/test/sort/regression/ref/test11fr (contents, props changed) head/tools/test/sort/regression/ref/test11fs (contents, props changed) head/tools/test/sort/regression/ref/test11fu (contents, props changed) head/tools/test/sort/regression/ref/test11g (contents, props changed) head/tools/test/sort/regression/ref/test11gr (contents, props changed) head/tools/test/sort/regression/ref/test11gs (contents, props changed) head/tools/test/sort/regression/ref/test11gu (contents, props changed) head/tools/test/sort/regression/ref/test11i (contents, props changed) head/tools/test/sort/regression/ref/test11ir (contents, props changed) head/tools/test/sort/regression/ref/test11n (contents, props changed) head/tools/test/sort/regression/ref/test11nr (contents, props changed) head/tools/test/sort/regression/ref/test11ns (contents, props changed) head/tools/test/sort/regression/ref/test11nu (contents, props changed) head/tools/test/sort/regression/ref/test11r (contents, props changed) head/tools/test/sort/regression/ref/test11u (contents, props changed) head/tools/test/sort/regression/ref/test12 (contents, props changed) head/tools/test/sort/regression/ref/test12M (contents, props changed) head/tools/test/sort/regression/ref/test12Mr (contents, props changed) head/tools/test/sort/regression/ref/test12b (contents, props changed) head/tools/test/sort/regression/ref/test12bd (contents, props changed) head/tools/test/sort/regression/ref/test12bs (contents, props changed) head/tools/test/sort/regression/ref/test12bu (contents, props changed) head/tools/test/sort/regression/ref/test12f (contents, props changed) head/tools/test/sort/regression/ref/test12fr (contents, props changed) head/tools/test/sort/regression/ref/test12fs (contents, props changed) head/tools/test/sort/regression/ref/test12fu (contents, props changed) head/tools/test/sort/regression/ref/test12g (contents, props changed) head/tools/test/sort/regression/ref/test12gr (contents, props changed) head/tools/test/sort/regression/ref/test12gs (contents, props changed) head/tools/test/sort/regression/ref/test12gu (contents, props changed) head/tools/test/sort/regression/ref/test12i (contents, props changed) head/tools/test/sort/regression/ref/test12ir (contents, props changed) head/tools/test/sort/regression/ref/test12n (contents, props changed) head/tools/test/sort/regression/ref/test12nr (contents, props changed) head/tools/test/sort/regression/ref/test12ns (contents, props changed) head/tools/test/sort/regression/ref/test12nu (contents, props changed) head/tools/test/sort/regression/ref/test12r (contents, props changed) head/tools/test/sort/regression/ref/test12u (contents, props changed) head/tools/test/sort/regression/ref/test13 (contents, props changed) head/tools/test/sort/regression/ref/test13M (contents, props changed) head/tools/test/sort/regression/ref/test13Mr (contents, props changed) head/tools/test/sort/regression/ref/test13b (contents, props changed) head/tools/test/sort/regression/ref/test13bd (contents, props changed) head/tools/test/sort/regression/ref/test13bs (contents, props changed) head/tools/test/sort/regression/ref/test13bu (contents, props changed) head/tools/test/sort/regression/ref/test13f (contents, props changed) head/tools/test/sort/regression/ref/test13fr (contents, props changed) head/tools/test/sort/regression/ref/test13fs (contents, props changed) head/tools/test/sort/regression/ref/test13fu (contents, props changed) head/tools/test/sort/regression/ref/test13g (contents, props changed) head/tools/test/sort/regression/ref/test13gr (contents, props changed) head/tools/test/sort/regression/ref/test13gs (contents, props changed) head/tools/test/sort/regression/ref/test13gu (contents, props changed) head/tools/test/sort/regression/ref/test13i (contents, props changed) head/tools/test/sort/regression/ref/test13ir (contents, props changed) head/tools/test/sort/regression/ref/test13n (contents, props changed) head/tools/test/sort/regression/ref/test13nr (contents, props changed) head/tools/test/sort/regression/ref/test13ns (contents, props changed) head/tools/test/sort/regression/ref/test13nu (contents, props changed) head/tools/test/sort/regression/ref/test13r (contents, props changed) head/tools/test/sort/regression/ref/test13u (contents, props changed) head/tools/test/sort/regression/ref/test14 (contents, props changed) head/tools/test/sort/regression/ref/test14M (contents, props changed) head/tools/test/sort/regression/ref/test14Mr (contents, props changed) head/tools/test/sort/regression/ref/test14b (contents, props changed) head/tools/test/sort/regression/ref/test14bd (contents, props changed) head/tools/test/sort/regression/ref/test14bs (contents, props changed) head/tools/test/sort/regression/ref/test14bu (contents, props changed) head/tools/test/sort/regression/ref/test14f (contents, props changed) head/tools/test/sort/regression/ref/test14fr (contents, props changed) head/tools/test/sort/regression/ref/test14fs (contents, props changed) head/tools/test/sort/regression/ref/test14fu (contents, props changed) head/tools/test/sort/regression/ref/test14g (contents, props changed) head/tools/test/sort/regression/ref/test14gr (contents, props changed) head/tools/test/sort/regression/ref/test14gs (contents, props changed) head/tools/test/sort/regression/ref/test14gu (contents, props changed) head/tools/test/sort/regression/ref/test14i (contents, props changed) head/tools/test/sort/regression/ref/test14ir (contents, props changed) head/tools/test/sort/regression/ref/test14n (contents, props changed) head/tools/test/sort/regression/ref/test14nr (contents, props changed) head/tools/test/sort/regression/ref/test14ns (contents, props changed) head/tools/test/sort/regression/ref/test14nu (contents, props changed) head/tools/test/sort/regression/ref/test14r (contents, props changed) head/tools/test/sort/regression/ref/test14u (contents, props changed) head/tools/test/sort/regression/ref/test15 (contents, props changed) head/tools/test/sort/regression/ref/test15M (contents, props changed) head/tools/test/sort/regression/ref/test15Mr (contents, props changed) head/tools/test/sort/regression/ref/test15b (contents, props changed) head/tools/test/sort/regression/ref/test15bd (contents, props changed) head/tools/test/sort/regression/ref/test15bs (contents, props changed) head/tools/test/sort/regression/ref/test15bu (contents, props changed) head/tools/test/sort/regression/ref/test15f (contents, props changed) head/tools/test/sort/regression/ref/test15fr (contents, props changed) head/tools/test/sort/regression/ref/test15fs (contents, props changed) head/tools/test/sort/regression/ref/test15fu (contents, props changed) head/tools/test/sort/regression/ref/test15g (contents, props changed) head/tools/test/sort/regression/ref/test15gr (contents, props changed) head/tools/test/sort/regression/ref/test15gs (contents, props changed) head/tools/test/sort/regression/ref/test15gu (contents, props changed) head/tools/test/sort/regression/ref/test15i (contents, props changed) head/tools/test/sort/regression/ref/test15ir (contents, props changed) head/tools/test/sort/regression/ref/test15n (contents, props changed) head/tools/test/sort/regression/ref/test15nr (contents, props changed) head/tools/test/sort/regression/ref/test15ns (contents, props changed) head/tools/test/sort/regression/ref/test15nu (contents, props changed) head/tools/test/sort/regression/ref/test15r (contents, props changed) head/tools/test/sort/regression/ref/test15u (contents, props changed) head/tools/test/sort/regression/ref/test16 (contents, props changed) head/tools/test/sort/regression/ref/test16M (contents, props changed) head/tools/test/sort/regression/ref/test16Mr (contents, props changed) head/tools/test/sort/regression/ref/test16b (contents, props changed) head/tools/test/sort/regression/ref/test16bd (contents, props changed) head/tools/test/sort/regression/ref/test16bs (contents, props changed) head/tools/test/sort/regression/ref/test16bu (contents, props changed) head/tools/test/sort/regression/ref/test16f (contents, props changed) head/tools/test/sort/regression/ref/test16fr (contents, props changed) head/tools/test/sort/regression/ref/test16fs (contents, props changed) head/tools/test/sort/regression/ref/test16fu (contents, props changed) head/tools/test/sort/regression/ref/test16g (contents, props changed) head/tools/test/sort/regression/ref/test16gr (contents, props changed) head/tools/test/sort/regression/ref/test16gs (contents, props changed) head/tools/test/sort/regression/ref/test16gu (contents, props changed) head/tools/test/sort/regression/ref/test16i (contents, props changed) head/tools/test/sort/regression/ref/test16ir (contents, props changed) head/tools/test/sort/regression/ref/test16n (contents, props changed) head/tools/test/sort/regression/ref/test16nr (contents, props changed) head/tools/test/sort/regression/ref/test16ns (contents, props changed) head/tools/test/sort/regression/ref/test16nu (contents, props changed) head/tools/test/sort/regression/ref/test16r (contents, props changed) head/tools/test/sort/regression/ref/test16u (contents, props changed) head/tools/test/sort/regression/ref/test17 (contents, props changed) head/tools/test/sort/regression/ref/test17M (contents, props changed) head/tools/test/sort/regression/ref/test17Mr (contents, props changed) head/tools/test/sort/regression/ref/test17b (contents, props changed) head/tools/test/sort/regression/ref/test17bd (contents, props changed) head/tools/test/sort/regression/ref/test17bs (contents, props changed) head/tools/test/sort/regression/ref/test17bu (contents, props changed) head/tools/test/sort/regression/ref/test17f (contents, props changed) head/tools/test/sort/regression/ref/test17fr (contents, props changed) head/tools/test/sort/regression/ref/test17fs (contents, props changed) head/tools/test/sort/regression/ref/test17fu (contents, props changed) head/tools/test/sort/regression/ref/test17g (contents, props changed) head/tools/test/sort/regression/ref/test17gr (contents, props changed) head/tools/test/sort/regression/ref/test17gs (contents, props changed) head/tools/test/sort/regression/ref/test17gu (contents, props changed) head/tools/test/sort/regression/ref/test17i (contents, props changed) head/tools/test/sort/regression/ref/test17ir (contents, props changed) head/tools/test/sort/regression/ref/test17n (contents, props changed) head/tools/test/sort/regression/ref/test17nr (contents, props changed) head/tools/test/sort/regression/ref/test17ns (contents, props changed) head/tools/test/sort/regression/ref/test17nu (contents, props changed) head/tools/test/sort/regression/ref/test17r (contents, props changed) head/tools/test/sort/regression/ref/test17u (contents, props changed) head/tools/test/sort/regression/ref/test_nums (contents, props changed) head/tools/test/sort/regression/ref/test_numsM (contents, props changed) head/tools/test/sort/regression/ref/test_numsMr (contents, props changed) head/tools/test/sort/regression/ref/test_numsb (contents, props changed) head/tools/test/sort/regression/ref/test_numsbd (contents, props changed) head/tools/test/sort/regression/ref/test_numsbs (contents, props changed) head/tools/test/sort/regression/ref/test_numsbu (contents, props changed) head/tools/test/sort/regression/ref/test_numsf (contents, props changed) head/tools/test/sort/regression/ref/test_numsfr (contents, props changed) head/tools/test/sort/regression/ref/test_numsfs (contents, props changed) head/tools/test/sort/regression/ref/test_numsfu (contents, props changed) head/tools/test/sort/regression/ref/test_numsg (contents, props changed) head/tools/test/sort/regression/ref/test_numsgr (contents, props changed) head/tools/test/sort/regression/ref/test_numsgs (contents, props changed) head/tools/test/sort/regression/ref/test_numsgu (contents, props changed) head/tools/test/sort/regression/ref/test_numsi (contents, props changed) head/tools/test/sort/regression/ref/test_numsir (contents, props changed) head/tools/test/sort/regression/ref/test_numsn (contents, props changed) head/tools/test/sort/regression/ref/test_numsnr (contents, props changed) head/tools/test/sort/regression/ref/test_numsns (contents, props changed) head/tools/test/sort/regression/ref/test_numsnu (contents, props changed) head/tools/test/sort/regression/ref/test_numsr (contents, props changed) head/tools/test/sort/regression/ref/test_numsu (contents, props changed) Added: head/tools/test/sort/bigtest/kcmd ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/bigtest/kcmd Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,376 @@ +#!/bin/sh + +# $FreeBSD$ + +rm -rf siks +mkdir -p siks + +export GNUSORT_NUMERIC_COMPATIBILITY=x + +BSDSORT=../sort +GNUSORT=~/coreutils/bin/sort +#GNUSORT=sort + +FILECMP=cmp + +INPUT_FILE=si + +rm -rf test.log + +#ru_RU.ISO-8859-5 en_US.ISO8859-15 zh_HK.Big5HKSCS +# +# ru KOI-8 is an "irregular" locale with non-trivial ordering. +# zh* is a 2-bytes locale + +for lang in ru_RU.KOI8-R C ru_RU.ISO-8859-5 en_US.ISO8859-15 zh_HK.Big5HKSCS +do + + export LANG=${lang} + + for KEYS in -srh -sfrudb -Vs -sM -siz + do + + echo ${LANG} ${KEYS} + + ${BSDSORT} ${KEYS} ${INPUT_FILE} -o siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} crash >> test.log + exit + fi + ${GNUSORT} ${KEYS} ${INPUT_FILE} -o siks/sik2 + if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.0.0 2>&1 ; then + echo ${LANG} ${KEYS} error >> test.log + fi + ${BSDSORT} -c ${KEYS} siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -c error >> test.log + fi + rm siks/res.0.0 + + ${BSDSORT} ${KEYS} -t " " ${INPUT_FILE} -o siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -t " " crash >> test.log + exit + fi + ${GNUSORT} ${KEYS} -t " " ${INPUT_FILE} -o siks/sik2 + if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.0.0 2>&1 ; then + echo ${LANG} ${KEYS} error -t " " >> test.log + fi + ${BSDSORT} -c -t " " ${KEYS} siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo $? ${LANG} ${KEYS} -t " " -c error >> test.log + fi + rm siks/res.0.0 + + ${BSDSORT} ${KEYS} -t "|" ${INPUT_FILE} -o siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -t "|" crash >> test.log + exit + fi + ${GNUSORT} ${KEYS} -t "|" ${INPUT_FILE} -o siks/sik2 + if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.0.0 2>&1 ; then + echo ${LANG} ${KEYS} error -t "|" >> test.log + fi + ${BSDSORT} -c -t "|" ${KEYS} siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -c -t "|" error >> test.log + fi + rm siks/res.0.0 + + ${BSDSORT} ${KEYS} -t '\0' ${INPUT_FILE} -o siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -t 0 crash >> test.log + exit + fi + ${GNUSORT} ${KEYS} -t '\0' ${INPUT_FILE} -o siks/sik2 + if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.0.0 2>&1 ; then + echo ${LANG} ${KEYS} error -t '\0' >> test.log + fi + ${BSDSORT} -c -t '\0' ${KEYS} siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -c -t '\0' error >> test.log + fi + rm siks/res.0.0 + + for f1 in 1 2 3 4 5 6 7 8 9 + do + for c1 in 1 2 3 4 5 10 15 20 25 30 + do + echo ${LANG} ${KEYS} ${f1} ${c1} + + ${BSDSORT} ${KEYS} +${f1}.${c1} ${INPUT_FILE} -o siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} +${f1}.${c1} crash +- >> test.log + exit + fi + ${GNUSORT} ${KEYS} +${f1}.${c1} ${INPUT_FILE} -o siks/sik2 + if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1} 2>&1 ; then + echo ${LANG} ${KEYS} +${f1}.${c1} error +- >> test.log + fi + ${BSDSORT} -c ${KEYS} +${f1}.${c1} siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} +${f1}.${c1} -c error +- >> test.log + fi + rm siks/res.${f1}.${c1} + + ${BSDSORT} ${KEYS} -k${f1}.${c1} ${INPUT_FILE} -o siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -k${f1}.${c1} crash >> test.log + exit + fi + ${GNUSORT} ${KEYS} -k${f1}.${c1} ${INPUT_FILE} -o siks/sik2 + if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1} 2>&1 ; then + echo ${LANG} ${KEYS} -k${f1}.${c1} error >> test.log + fi + ${BSDSORT} -c ${KEYS} -k${f1}.${c1} siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -k${f1}.${c1} -c error >> test.log + fi + rm siks/res.${f1}.${c1} + + ${BSDSORT} ${KEYS} -k${f1}.${c1}b ${INPUT_FILE} -o siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -k${f1}.${c1}b crash >> test.log + exit + fi + ${GNUSORT} ${KEYS} -k${f1}.${c1}b ${INPUT_FILE} -o siks/sik2 + if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1} 2>&1 ; then + echo ${LANG} ${KEYS} -k${f1}.${c1}b error >> test.log + fi + ${BSDSORT} -c ${KEYS} -k${f1}.${c1}b siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -k${f1}.${c1}b -c error >> test.log + fi + rm siks/res.${f1}.${c1} + + ${BSDSORT} ${KEYS} -t " " -k${f1}.${c1} ${INPUT_FILE} -o siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -t -k${f1}.${c1} crash >> test.log + exit + fi + ${GNUSORT} ${KEYS} -t " " -k${f1}.${c1} ${INPUT_FILE} -o siks/sik2 + if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1} 2>&1 ; then + echo ${LANG} ${KEYS} -k${f1}.${c1} error -t " " >> test.log + fi + ${BSDSORT} -c -t " " ${KEYS} -k${f1}.${c1} siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -k${f1}.${c1} -t " " -c error >> test.log + fi + rm siks/res.${f1}.${c1} + + ${BSDSORT} ${KEYS} -t " " -k${f1}.${c1}n ${INPUT_FILE} -o siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -k${f1}.${c1}n crash >> test.log + exit + fi + ${GNUSORT} ${KEYS} -t " " -k${f1}.${c1}n ${INPUT_FILE} -o siks/sik2 + if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1} 2>&1 ; then + echo ${LANG} ${KEYS} -k${f1}.${c1} error -t " " n >> test.log + fi + ${BSDSORT} -c -t " " ${KEYS} -k${f1}.${c1}n siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -k${f1}.${c1} -c -t " " n error >> test.log + fi + rm siks/res.${f1}.${c1} + + ${BSDSORT} ${KEYS} -t "|" -k${f1}.${c1} ${INPUT_FILE} -o siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -t "|" -k${f1}.${c1} crash >> test.log + exit + fi + ${GNUSORT} ${KEYS} -t "|" -k${f1}.${c1} ${INPUT_FILE} -o siks/sik2 + if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1} 2>&1 ; then + echo ${LANG} ${KEYS} -k${f1}.${c1} error -t "|" >> test.log + fi + ${BSDSORT} -c -t "|" ${KEYS} -k${f1}.${c1} siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -k${f1}.${c1} -c -t "|" error >> test.log + fi + rm siks/res.${f1}.${c1} + + for f2 in 1 2 3 4 5 6 7 8 9 10 + do + for c2 in 0 1 2 3 4 5 10 15 20 25 30 + do + echo ${LANG} ${KEYS} ${f1} ${c1} ${f2} ${c2} + + ${BSDSORT} ${KEYS} +${f1}.${c1} -${f2}.${c2} ${INPUT_FILE} -o siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} +${f1}.${c1} -${f2}.${c2} crash >> test.log + exit + fi + ${GNUSORT} ${KEYS} +${f1}.${c1} -${f2}.${c2} ${INPUT_FILE} -o siks/sik2 + if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1}.${f2}.${c2} 2>&1 ; then + echo ${LANG} ${KEYS} +${f1}.${c1} -${f2}.${c2} error +- >> test.log + fi + ${BSDSORT} -c ${KEYS} +${f1}.${c1} -${f2}.${c2} siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} +${f1}.${c1} -${f2}.${c2} -c error +- >> test.log + fi + rm siks/res.${f1}.${c1}.${f2}.${c2} + + ${BSDSORT} ${KEYS} -k${f1}.${c1},${f2}.${c2} ${INPUT_FILE} -o siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -k${f1}.${c1},${f2}.${c2} crash >> test.log + exit + fi + ${GNUSORT} ${KEYS} -k${f1}.${c1},${f2}.${c2} ${INPUT_FILE} -o siks/sik2 + if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1}.${f2}.${c2} 2>&1 ; then + echo ${LANG} ${KEYS} -k${f1}.${c1}.${f2}.${c2} error >> test.log + fi + ${BSDSORT} -c ${KEYS} -k${f1}.${c1},${f2}.${c2} siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -k${f1}.${c1},${f2}.${c2} -c error >> test.log + fi + rm siks/res.${f1}.${c1}.${f2}.${c2} + + ${BSDSORT} ${KEYS} -k${f1}.${c1}b,${f2}.${c2} ${INPUT_FILE} -o siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -k${f1}.${c1}b,${f2}.${c2} crash >> test.log + exit + fi + ${GNUSORT} ${KEYS} -k${f1}.${c1}b,${f2}.${c2} ${INPUT_FILE} -o siks/sik2 + if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1}.${f2}.${c2} 2>&1 ; then + echo ${LANG} ${KEYS} -k${f1}.${c1}.b.${f2}.${c2} error >> test.log + fi + ${BSDSORT} -c ${KEYS} -k${f1}.${c1}b,${f2}.${c2} siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -k${f1}.${c1}b,${f2}.${c2} -c error >> test.log + fi + rm siks/res.${f1}.${c1}.${f2}.${c2} + + ${BSDSORT} ${KEYS} -t " " -k${f1}.${c1},${f2}.${c2} ${INPUT_FILE} -o siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -t " " -k${f1}.${c1},${f2}.${c2} crash >> test.log + exit + fi + ${GNUSORT} ${KEYS} -t " " -k${f1}.${c1},${f2}.${c2} ${INPUT_FILE} -o siks/sik2 + if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1}.${f2}.${c2} 2>&1 ; then + echo ${LANG} ${KEYS} -k${f1}.${c1}.${f2}.${c2} error -t " " >> test.log + fi + ${BSDSORT} -c -t " " ${KEYS} -k${f1}.${c1},${f2}.${c2} siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -k${f1}.${c1},${f2}.${c2} -c -t " " error >> test.log + fi + rm siks/res.${f1}.${c1}.${f2}.${c2} + + ${BSDSORT} ${KEYS} -t " " -k${f1}.${c1}n,${f2}.${c2} ${INPUT_FILE} -o siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -t " " -k${f1}.${c1}n,${f2}.${c2} crash >> test.log + exit + fi + ${GNUSORT} ${KEYS} -t " " -k${f1}.${c1}n,${f2}.${c2} ${INPUT_FILE} -o siks/sik2 + if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1}.${f2}.${c2} 2>&1 ; then + echo ${LANG} ${KEYS} -t " " -k${f1}.${c1}.${f2}.${c2} error n >> test.log + fi + ${BSDSORT} -c -t " " ${KEYS} -k${f1}.${c1}n,${f2}.${c2} siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -k${f1}.${c1},${f2}.${c2} -c -t " " n error >> test.log + fi + rm siks/res.${f1}.${c1}.${f2}.${c2} + + ${BSDSORT} ${KEYS} -t '\0' -k${f1}.${c1}n,${f2}.${c2} ${INPUT_FILE} -o siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -t '\0' -k${f1}.${c1}n,${f2}.${c2} crash >> test.log + exit + fi + ${GNUSORT} ${KEYS} -t '\0' -k${f1}.${c1}n,${f2}.${c2} ${INPUT_FILE} -o siks/sik2 + if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1}.${f2}.${c2} 2>&1 ; then + echo ${LANG} ${KEYS} -k${f1}.${c1}.${f2}.${c2} error -t '\0' n >> test.log + fi + ${BSDSORT} -c -t '\0' ${KEYS} -k${f1}.${c1}n,${f2}.${c2} siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -k${f1}.${c1},${f2}.${c2} -c -t '\0' n error >> test.log + fi + rm siks/res.${f1}.${c1}.${f2}.${c2} + + ${BSDSORT} ${KEYS} -t "|" -k${f1}.${c1},${f2}.${c2} ${INPUT_FILE} -o siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -t "|" -k${f1}.${c1},${f2}.${c2} crash >> test.log + exit + fi + ${GNUSORT} ${KEYS} -t "|" -k${f1}.${c1},${f2}.${c2} ${INPUT_FILE} -o siks/sik2 + if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1}.${f2}.${c2} 2>&1 ; then + echo ${LANG} ${KEYS} -k${f1}.${c1}.${f2}.${c2} error -t "|" >> test.log + fi + ${BSDSORT} -c -t "|" ${KEYS} -k${f1}.${c1},${f2}.${c2} siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -k${f1}.${c1},${f2}.${c2} -c -t "|" error >> test.log + fi + rm siks/res.${f1}.${c1}.${f2}.${c2} + + ${BSDSORT} ${KEYS} -t "|" -k${f1}.${c1},${f2}.${c2} -k${f2}.${c1},${f1}.${c2} ${INPUT_FILE} -o siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -t "|" -k${f1}.${c1},${f2}.${c2} -k${f2}.${c1},${f1}.${c2} crash >> test.log + exit + fi + ${GNUSORT} ${KEYS} -t "|" -k${f1}.${c1},${f2}.${c2} -k${f2}.${c1},${f1}.${c2} ${INPUT_FILE} -o siks/sik2 + if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1}.${f2}.${c2} 2>&1 ; then + echo ${LANG} ${KEYS} -k${f1}.${c1}.${f2}.${c2} error -t "|" 2k >> test.log + fi + ${BSDSORT} -c -t "|" ${KEYS} -k${f1}.${c1},${f2}.${c2} -k${f2}.${c1},${f1}.${c2} siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -k${f1}.${c1},${f2}.${c2} -c -t "|" 2k error >> test.log + fi + rm siks/res.${f1}.${c1}.${f2}.${c2} + + ${BSDSORT} ${KEYS} -k${f1}.${c1}b,${f2}.${c2} -k${f2}.${c1},${f1}.${c2} ${INPUT_FILE} -o siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -k${f1}.${c1}b,${f2}.${c2} -k${f2}.${c1},${f1}.${c2} crash >> test.log + exit + fi + ${GNUSORT} ${KEYS} -k${f1}.${c1}b,${f2}.${c2} -k${f2}.${c1},${f1}.${c2} ${INPUT_FILE} -o siks/sik2 + if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1}.${f2}.${c2} 2>&1 ; then + echo ${LANG} ${KEYS} -k${f1}.${c1}.b.${f2}.${c2} error 2k >> test.log + fi + ${BSDSORT} -c ${KEYS} -k${f1}.${c1}b,${f2}.${c2} -k${f2}.${c1},${f1}.${c2} siks/sik1 + ER=$? + if ! [ ${ER} -eq 0 ] ; then + echo ${LANG} ${KEYS} -k${f1}.${c1}b,${f2}.${c2} -c 2k error >> test.log + fi + rm siks/res.${f1}.${c1}.${f2}.${c2} + + done + done + done + done + done +done + Added: head/tools/test/sort/bigtest/q-1.022.tgz ============================================================================== Added: head/tools/test/sort/bigtest/q-1.024.003. ============================================================================== Added: head/tools/test/sort/bigtest/q-1.024.003.tgz ============================================================================== Added: head/tools/test/sort/bigtest/q-1.024.009.tgz ============================================================================== Added: head/tools/test/sort/bigtest/q-1.024.07.tgz ============================================================================== Added: head/tools/test/sort/bigtest/q-1.024.tgz ============================================================================== Added: head/tools/test/sort/bigtest/q-1.23.1.tgz ============================================================================== Added: head/tools/test/sort/bigtest/q-1.23.tgz ============================================================================== Added: head/tools/test/sort/bigtest/si ============================================================================== Binary file. No diff available. Added: head/tools/test/sort/bigtest/siks/res.1.1.8.0 ============================================================================== Added: head/tools/test/sort/bigtest/siks/res.6.25.9.15 ============================================================================== Added: head/tools/test/sort/bigtest/siks/res.8.10.10.0 ============================================================================== Added: head/tools/test/sort/bigtest/siks/sik1 ============================================================================== Binary file. No diff available. Added: head/tools/test/sort/bigtest/siks/sik2 ============================================================================== Binary file. No diff available. Added: head/tools/test/sort/regression/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/Makefile Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,31 @@ +# $FreeBSD$ + +TESTFILE= test01 test02 test03 test04 test05 test06 test07 test08 \ + test09 test10 test11 test12 test13 test14 test15 test16 test17 \ + test_nums + +OPTIONS= r f fr fs fu i ir b bs bd bu g gs gu gr n nr M Mr u nu ns + +#SORT?= /usr/local/bin/bsdsort +GNUSORT?=~/coreutils/bin/sort +SORT?= ../sort +CMP?= ${.CURDIR}/cmp.sh + +check: + mkdir -p output +.for f in ${TESTFILE} + @LANG=C;${SORT} data/${f} >output/${f} + @#LANG=C;${GNUSORT} data/${f} >ref/${f} + @${CMP} ref/${f} output/${f} +.endfor +.for opt in ${OPTIONS} +.for f in ${TESTFILE} + @LANG=C;${SORT} -${opt} data/${f} >output/${f}${opt} + @#LANG=C;${GNUSORT} -${opt} data/${f} >ref/${f}${opt} + @${CMP} ref/${f}${opt} output/${f}${opt} +.endfor +.endfor + +CLEANDIRS+= output + +.include Added: head/tools/test/sort/regression/cmp.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/cmp.sh Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,4 @@ +#!/bin/sh +# $FreeBSD$ + +diff $1 $2 | grep '^-' >/dev/null && echo DIFFER: $1 $2 && exit 0 || exit 0 Added: head/tools/test/sort/regression/data/test01 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/data/test01 Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,3 @@ + +flyer +root Added: head/tools/test/sort/regression/data/test02 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/data/test02 Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,5 @@ +repa A +repa 1 +repa b +repa _ +repa Added: head/tools/test/sort/regression/data/test03 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/data/test03 Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,10 @@ +_bab +Bab +zakó +limonádé +___kád +gyerek +cipõ +alma +_barack +korte Added: head/tools/test/sort/regression/data/test04 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/data/test04 Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,9 @@ +23453252 +56572 +2336 +-124 +543 +543a +-543b +a414 +z123 Added: head/tools/test/sort/regression/data/test05 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/data/test05 Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,3 @@ +alfa +beta +gamma Added: head/tools/test/sort/regression/data/test06 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/data/test06 Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,4 @@ +alfa +beta +psi +zeta Added: head/tools/test/sort/regression/data/test07 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/data/test07 Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,4 @@ +gamma +delta +epszilon +zz Added: head/tools/test/sort/regression/data/test08 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/data/test08 Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,4 @@ +aaa +aaa +bbb +bbb Added: head/tools/test/sort/regression/data/test09 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/data/test09 Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,9 @@ +alma +bab +barack +cipõ +gyerek +korte +kád +limonádé +zakó Added: head/tools/test/sort/regression/data/test10 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/data/test10 Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,2 @@ +alfa +beta Added: head/tools/test/sort/regression/data/test11 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/data/test11 Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,9 @@ +MAY +dec +JAN +feb +mar +APR +kutya +_buff +apre Added: head/tools/test/sort/regression/data/test12 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/data/test12 Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,3 @@ +ddwqrwerfw 34 +zfwfgergre 23 +fcergergrd 75 Added: head/tools/test/sort/regression/data/test13 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/data/test13 Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,3 @@ +lap +zab +kukac Added: head/tools/test/sort/regression/data/test14 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/data/test14 Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,5 @@ +alma +korte +Alma +Bika +bika Added: head/tools/test/sort/regression/data/test15 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/data/test15 Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,5 @@ +raketa,,8 +alma,,9 +barack,,2 +piros,,13 +citromsarga,,0 Added: head/tools/test/sort/regression/data/test16 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/data/test16 Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,2 @@ +a414 +z123 Added: head/tools/test/sort/regression/data/test17 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/data/test17 Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,4 @@ +alma 5 bagoly +alma 6 korte +alma 4 zab +korte 4 barack Added: head/tools/test/sort/regression/data/test_nums ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/data/test_nums Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,16 @@ + 123456789 + 123456789.1234 + 987654321.7654 + 987654321.765400 + -123456789 + -987654321.2345 +-1234567890 +-987654321 +123456789 +987654321 + -1234567890 + 987654321 + -987654321.9876 + -987654321 + 123456789.1234 + 123456789 Added: head/tools/test/sort/regression/ref/test01 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test01 Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,3 @@ + +flyer +root Added: head/tools/test/sort/regression/ref/test01M ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test01M Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,3 @@ + +flyer +root Added: head/tools/test/sort/regression/ref/test01Mr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test01Mr Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,3 @@ +root +flyer + Added: head/tools/test/sort/regression/ref/test01b ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test01b Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,3 @@ + +flyer +root Added: head/tools/test/sort/regression/ref/test01bd ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test01bd Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,3 @@ + +flyer +root Added: head/tools/test/sort/regression/ref/test01bs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test01bs Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,3 @@ + +flyer +root Added: head/tools/test/sort/regression/ref/test01bu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test01bu Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,3 @@ + +flyer +root Added: head/tools/test/sort/regression/ref/test01f ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test01f Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,3 @@ + +flyer +root Added: head/tools/test/sort/regression/ref/test01fr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test01fr Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,3 @@ +root +flyer + Added: head/tools/test/sort/regression/ref/test01fs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test01fs Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,3 @@ + +flyer +root Added: head/tools/test/sort/regression/ref/test01fu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test01fu Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,3 @@ + +flyer +root Added: head/tools/test/sort/regression/ref/test01g ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test01g Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,3 @@ + +flyer +root Added: head/tools/test/sort/regression/ref/test01gr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test01gr Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,3 @@ +root +flyer + Added: head/tools/test/sort/regression/ref/test01gs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test01gs Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,3 @@ + +flyer +root Added: head/tools/test/sort/regression/ref/test01gu ============================================================================== Binary file. No diff available. Added: head/tools/test/sort/regression/ref/test01i ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test01i Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,3 @@ + +flyer +root Added: head/tools/test/sort/regression/ref/test01ir ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test01ir Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,3 @@ +root +flyer + Added: head/tools/test/sort/regression/ref/test01n ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test01n Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,3 @@ + +flyer +root Added: head/tools/test/sort/regression/ref/test01nr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test01nr Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,3 @@ +root +flyer + Added: head/tools/test/sort/regression/ref/test01ns ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test01ns Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,3 @@ + +flyer +root Added: head/tools/test/sort/regression/ref/test01nu ============================================================================== Binary file. No diff available. Added: head/tools/test/sort/regression/ref/test01r ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test01r Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,3 @@ +root +flyer + Added: head/tools/test/sort/regression/ref/test01u ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test01u Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,3 @@ + +flyer +root Added: head/tools/test/sort/regression/ref/test02 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test02 Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,5 @@ +repa +repa 1 +repa A +repa _ +repa b Added: head/tools/test/sort/regression/ref/test02M ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test02M Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,5 @@ +repa +repa 1 +repa A +repa _ +repa b Added: head/tools/test/sort/regression/ref/test02Mr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test02Mr Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,5 @@ +repa b +repa _ +repa A +repa 1 +repa Added: head/tools/test/sort/regression/ref/test02b ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test02b Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,5 @@ +repa +repa 1 +repa A +repa _ +repa b Added: head/tools/test/sort/regression/ref/test02bd ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test02bd Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,5 @@ +repa _ +repa +repa 1 +repa A +repa b Added: head/tools/test/sort/regression/ref/test02bs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test02bs Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,5 @@ +repa +repa 1 +repa A +repa _ +repa b Added: head/tools/test/sort/regression/ref/test02bu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test02bu Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,5 @@ +repa +repa 1 +repa A +repa _ +repa b Added: head/tools/test/sort/regression/ref/test02f ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test02f Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,5 @@ +repa +repa 1 +repa A +repa b +repa _ Added: head/tools/test/sort/regression/ref/test02fr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test02fr Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,5 @@ +repa _ +repa b +repa A +repa 1 +repa Added: head/tools/test/sort/regression/ref/test02fs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test02fs Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,5 @@ +repa +repa 1 +repa A +repa b +repa _ Added: head/tools/test/sort/regression/ref/test02fu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test02fu Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,5 @@ +repa +repa 1 +repa A +repa b +repa _ Added: head/tools/test/sort/regression/ref/test02g ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test02g Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,5 @@ +repa +repa 1 +repa A +repa _ +repa b Added: head/tools/test/sort/regression/ref/test02gr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test02gr Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,5 @@ +repa b +repa _ +repa A +repa 1 +repa Added: head/tools/test/sort/regression/ref/test02gs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test02gs Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,5 @@ +repa A +repa 1 +repa b +repa _ +repa Added: head/tools/test/sort/regression/ref/test02gu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test02gu Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1 @@ +repa A Added: head/tools/test/sort/regression/ref/test02i ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test02i Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,5 @@ +repa +repa 1 +repa A +repa _ +repa b Added: head/tools/test/sort/regression/ref/test02ir ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test02ir Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,5 @@ +repa b +repa _ +repa A +repa 1 +repa Added: head/tools/test/sort/regression/ref/test02n ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test02n Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,5 @@ +repa +repa 1 +repa A +repa _ +repa b Added: head/tools/test/sort/regression/ref/test02nr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test02nr Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,5 @@ +repa b +repa _ +repa A +repa 1 +repa Added: head/tools/test/sort/regression/ref/test02ns ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test02ns Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,5 @@ +repa A +repa 1 +repa b +repa _ +repa Added: head/tools/test/sort/regression/ref/test02nu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test02nu Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1 @@ +repa A Added: head/tools/test/sort/regression/ref/test02r ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test02r Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,5 @@ +repa b +repa _ +repa A +repa 1 +repa Added: head/tools/test/sort/regression/ref/test02u ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test02u Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,5 @@ +repa +repa 1 +repa A +repa _ +repa b Added: head/tools/test/sort/regression/ref/test03 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test03 Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,10 @@ +Bab +___kád +_bab +_barack +alma +cipõ +gyerek +korte +limonádé +zakó Added: head/tools/test/sort/regression/ref/test03M ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test03M Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,10 @@ +Bab +___kád +_bab +_barack +alma +cipõ +gyerek +korte +limonádé +zakó Added: head/tools/test/sort/regression/ref/test03Mr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test03Mr Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,10 @@ +zakó +limonádé +korte +gyerek +cipõ +alma +_barack +_bab +___kád +Bab Added: head/tools/test/sort/regression/ref/test03b ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test03b Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,10 @@ +Bab +___kád +_bab +_barack +alma +cipõ +gyerek +korte +limonádé +zakó Added: head/tools/test/sort/regression/ref/test03bd ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test03bd Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,10 @@ +Bab +alma +_bab +_barack +cipõ +gyerek +___kád +korte +limonádé +zakó Added: head/tools/test/sort/regression/ref/test03bs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test03bs Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,10 @@ +Bab +___kád +_bab +_barack +alma +cipõ +gyerek +korte +limonádé +zakó Added: head/tools/test/sort/regression/ref/test03bu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test03bu Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,10 @@ +Bab +___kád +_bab +_barack +alma +cipõ +gyerek +korte +limonádé +zakó Added: head/tools/test/sort/regression/ref/test03f ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test03f Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,10 @@ +alma +Bab +cipõ +gyerek +korte +limonádé +zakó +_bab +_barack +___kád Added: head/tools/test/sort/regression/ref/test03fr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test03fr Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,10 @@ +___kád +_barack +_bab +zakó +limonádé +korte +gyerek +cipõ +Bab +alma Added: head/tools/test/sort/regression/ref/test03fs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/sort/regression/ref/test03fs Fri May 11 16:04:55 2012 (r235274) @@ -0,0 +1,10 @@ +alma +Bab +cipõ +gyerek *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Fri May 11 16:09:13 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 758D61065680; Fri, 11 May 2012 16:09:13 +0000 (UTC) (envelope-from beat@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 610348FC16; Fri, 11 May 2012 16:09:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BG9Dba090697; Fri, 11 May 2012 16:09:13 GMT (envelope-from beat@svn.freebsd.org) Received: (from beat@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BG9Dbf090695; Fri, 11 May 2012 16:09:13 GMT (envelope-from beat@svn.freebsd.org) Message-Id: <201205111609.q4BG9Dbf090695@svn.freebsd.org> From: Beat Gaetzi Date: Fri, 11 May 2012 16:09:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235276 - head/usr.sbin/pkg_install/lib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 16:09:13 -0000 Author: beat (ports committer) Date: Fri May 11 16:09:12 2012 New Revision: 235276 URL: http://svn.freebsd.org/changeset/base/235276 Log: - Print package name in case an empty pkgdep line is found. PR: bin/164378 Submitted by: Yuri and many others Approved by: flz MFC after: 2 weeks Modified: head/usr.sbin/pkg_install/lib/plist.c Modified: head/usr.sbin/pkg_install/lib/plist.c ============================================================================== --- head/usr.sbin/pkg_install/lib/plist.c Fri May 11 16:08:51 2012 (r235275) +++ head/usr.sbin/pkg_install/lib/plist.c Fri May 11 16:09:12 2012 (r235276) @@ -286,7 +286,8 @@ read_plist(Package *pkg, FILE *fp) if (*cp == '\0') { cp = NULL; if (cmd == PLIST_PKGDEP) { - warnx("corrupted record (pkgdep line without argument), ignoring"); + warnx("corrupted record for package %s (pkgdep line without " + "argument), ignoring", pkg->name); cmd = FAIL; } goto bottom; From owner-svn-src-head@FreeBSD.ORG Fri May 11 17:04:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A064106566C; Fri, 11 May 2012 17:04:17 +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 B8E268FC16; Fri, 11 May 2012 17:04:16 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q4BH4DDE084811; Fri, 11 May 2012 20:04:13 +0300 (EEST) (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.5/8.14.5) with ESMTP id q4BH4CK9036734; Fri, 11 May 2012 20:04:12 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q4BH4C7H036733; Fri, 11 May 2012 20:04:12 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 11 May 2012 20:04:12 +0300 From: Konstantin Belousov To: Andrey Chernov , Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20120511170412.GR2358@deviant.kiev.zoral.com.ua> References: <201205111129.q4BBT85G081093@svn.freebsd.org> <20120511145432.GA19173@vniz.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QjyiCFk1yXa15KPn" Content-Disposition: inline In-Reply-To: <20120511145432.GA19173@vniz.net> 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=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Subject: Re: svn commit: r235266 - head/lib/libc/stdlib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 17:04:17 -0000 --QjyiCFk1yXa15KPn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 11, 2012 at 06:54:32PM +0400, Andrey Chernov wrote: > Thanks, but in this two places old errno value should be saved across > free() because free() may damage it: I do not agree. free() cannot change errno. >=20 > On Fri, May 11, 2012 at 11:29:08AM +0000, Konstantin Belousov wrote: > ... > > + if (lstat(resolved, &sb) !=3D 0) { > > + if (m) > > + free(resolved); > > + > return (NULL); > ... > > + errno =3D ENOTDIR; > > if (m) > > free(resolved); > > return (NULL); >=20 --QjyiCFk1yXa15KPn Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk+tRosACgkQC3+MBN1Mb4j+YQCgrlfXN2Ip4mlwRoeEi4tnIbDv ujYAoJ71OuDNL42dKPGDPL0+pQlUrHwa =n1I7 -----END PGP SIGNATURE----- --QjyiCFk1yXa15KPn-- From owner-svn-src-head@FreeBSD.ORG Fri May 11 17:17:10 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5D6501065673; Fri, 11 May 2012 17:17:10 +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 D45668FC17; Fri, 11 May 2012 17:17:09 +0000 (UTC) Received: from c122-106-171-232.carlnfd1.nsw.optusnet.com.au (c122-106-171-232.carlnfd1.nsw.optusnet.com.au [122.106.171.232]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q4BHH1ic025377 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 12 May 2012 03:17:02 +1000 Date: Sat, 12 May 2012 03:17:01 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov In-Reply-To: <20120511130955.GO2358@deviant.kiev.zoral.com.ua> Message-ID: <20120512014148.C1953@besplex.bde.org> References: <201205111237.q4BCbGX2083596@svn.freebsd.org> <20120511124820.GN2358@deviant.kiev.zoral.com.ua> <6AE99277-D90F-453D-AE40-EE731DFD3BAB@FreeBSD.org> <20120511130955.GO2358@deviant.kiev.zoral.com.ua> 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, David Chisnall , Gabor Kovesdan Subject: Re: svn commit: r235267 - in head/usr.bin/sort: . nls X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 17:17:10 -0000 On Fri, 11 May 2012, Konstantin Belousov wrote: > On Fri, May 11, 2012 at 08:57:29AM -0400, David Chisnall wrote: >> On 11 May 2012, at 08:48, Konstantin Belousov wrote: >> >>> On Fri, May 11, 2012 at 12:37:16PM +0000, Gabor Kovesdan wrote: >>>> Author: gabor >>>> Date: Fri May 11 12:37:16 2012 >>>> New Revision: 235267 >>>> URL: http://svn.freebsd.org/changeset/base/235267 >>> >>>> +bool byte_sort = false; >>>> + >>>> +static wchar_t **wmonths = NULL; >>>> +static unsigned char **cmonths = NULL; >>> >>> Such initializations are useless. You only increase the size of the binary >>> on the disk as the consequence. Not even that with some compilers. For example, not with gcc since -fzero-initialized-in-bss is the default with gcc. >> Really? The C specification requires all globals and statics that >> are not explicitly initialised to be set to their zero value, so this >> initialisation has no effect on the resulting binary[1]. These are >> placed in the BSS section, irrespective of whether the initialisation is >> implicit or explicit and the loader is responsible for allocating space >> for them - all that is stored in the binary is the size. THe C specifcation doesn't specify the BSS section, or the any section, or how variables are implemented. It barely mentions "memory", and mostly uses the more generic terms "object" and "storage" instead. > The initialized variables are placed in .data and not .bss. > Apparently, some compilers do an optimiziation and put zero-initialized > objects into .bss, as Colin noted, but this is not guaranteed behaviour. > If placed in .data, they do consume disk space. > > Redundand initialization is not encouraged by style as well. Yes, this is mainly a style bug. I noticed some other style bugs in the commit mail. Mainly: - logs of extra blank lines - lots of nested declarations - excessive nesting of compound statements. This is especially ugly after return. E.g.: func() { if (foo) return; else { nested declaration; ... // most of the function is here } } >> For local variables, initialisation like this has no effect even >> at low optimisation levels - dead stores will be removed. It does, >> however, make it more difficult for the compiler to distinguish between >> initialised and initialised sensibly in some cases. It is a larger style bug for local variables. style(9) even knows about it (but has been weakened to allow it in some cases). For compilers, it breaks any possibility of detecting a variable initialized to a garbage value (an initial value of 0 may be just as much garbage as a random value). For humans, it makes lifetime analysis more difficult. > local variables are irrelevant there. >> [1] In a standards-compliant compiler. Apparently a few shipping >> compilers for embedded systems fail to respect this, but everything >> FreeBSD is compiled with does. I think the requirement for (as if to) zero-initialization applies even to freestanding implementations. The implementation of this for variables in the BSS is left to crt, so it is mostly out of the compiler's control. However, they may be some some boot programs that save space by not bzeroing the bss. Not being a C program in this respect apparently caused the following farcal churn in i386/boot2: - the opts variable started with a bogus explicit initialization to 0. Long ago (in 2003), but probably after the default of -fzero-initialized-in-bss turned this into just a style bug, the explicit initializaton was removed. - zeroing of the bss was moved from i386/boot2/boot1.s ro rbx in 2004. It hopefully still worked. - in 2011, the kname variable was changed from char [1024] to a pointer. The pointer was explicitly initialized to NULL. This was not just a style bug, since the bss was apparently no longer zeroed. - initialization of the opts variable was apparently broken in the same way some time before this (whenever the zeroing was optimized away). - in the next commit in 2011, it was claimed that the BSS is not zeroed, and the initialization of kname was moved into main() to fix this. bss was spelled BSS, so my greps didn't find this immediately. - in a later commit in 2012, the initialization of opts was moved into main(), presumably for the same reason, but neither bss nor BSS was mentioned in the commit log, so this took longer to find. - these changes broke at least kname. Apparently, it can be initialized to non-null before main() in some cases. This was fixed in the most recent commit to boot2.c, in 2012, by moving the initialization of kname out of main(). opts was moved similary. The commit message doesn't mention bss or BSS, and says that this is to make clange build again. But boot2 is compiled without -fzero-initialized-in-bss, so initializing kname and opts outside of main() has no effect. They are now uninitialized again, assuming that the 2011 commit message is correct. Even the old char array for kname probably needed kname[0] to be zero. We apparently depend on most memory being 0 when booting, so that the chance of it being nonzero for these 2 variables is tiny. kname and opts are the only 2 global variables in i386/boot2 that need to be initialized to 0 in some way (the others either need to be initialized to non-0, so they never get put in the bss, or their initial value doesn't matter. After reducing kname to a pointer, these variables have total size 8. Perhaps the zeroing code would now take more than 8 bytes. However, in the 2004 version when the zeroing code was in boot1.S, it size seems to be 6 or 7 bytes (the code for this is smart). Thus the savings might be negative, but they are more likely to be a whole 4-8 bytes. There may be safer ways to save space. Bruce From owner-svn-src-head@FreeBSD.ORG Fri May 11 17:40:13 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C0B8A106566C; Fri, 11 May 2012 17:40:13 +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 ACC5D8FC08; Fri, 11 May 2012 17:40:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BHeDZh093432; Fri, 11 May 2012 17:40:13 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BHeDS9093430; Fri, 11 May 2012 17:40:13 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201205111740.q4BHeDS9093430@svn.freebsd.org> From: Warner Losh Date: Fri, 11 May 2012 17:40:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235277 - head/sys/arm/arm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 17:40:13 -0000 Author: imp Date: Fri May 11 17:40:13 2012 New Revision: 235277 URL: http://svn.freebsd.org/changeset/base/235277 Log: This comment has become unmoored from the code to which it applies. Move it back. Modified: head/sys/arm/arm/locore.S Modified: head/sys/arm/arm/locore.S ============================================================================== --- head/sys/arm/arm/locore.S Fri May 11 16:09:12 2012 (r235276) +++ head/sys/arm/arm/locore.S Fri May 11 17:40:13 2012 (r235277) @@ -42,12 +42,6 @@ __FBSDID("$FreeBSD$"); /* What size should this really be ? It is only used by initarm() */ #define INIT_ARM_STACK_SIZE 2048 -/* - * This is for kvm_mkdb, and should be the address of the beginning - * of the kernel text segment (not necessarily the same as kernbase). - */ - - #define CPWAIT_BRANCH \ sub pc, pc, #4 @@ -56,6 +50,10 @@ __FBSDID("$FreeBSD$"); mov tmp, tmp /* wait for it to complete */ ;\ CPWAIT_BRANCH /* branch to next insn */ +/* + * This is for kvm_mkdb, and should be the address of the beginning + * of the kernel text segment (not necessarily the same as kernbase). + */ .text .align 0 .globl kernbase From owner-svn-src-head@FreeBSD.ORG Fri May 11 17:47:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C05A106564A; Fri, 11 May 2012 17:47:22 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail16.syd.optusnet.com.au (mail16.syd.optusnet.com.au [211.29.132.197]) by mx1.freebsd.org (Postfix) with ESMTP id D9AB08FC16; Fri, 11 May 2012 17:47:21 +0000 (UTC) Received: from c122-106-171-232.carlnfd1.nsw.optusnet.com.au (c122-106-171-232.carlnfd1.nsw.optusnet.com.au [122.106.171.232]) by mail16.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q4BHlDxQ031598 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 12 May 2012 03:47:14 +1000 Date: Sat, 12 May 2012 03:47:12 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ulrich Spoerlein In-Reply-To: <201205111013.q4BADY9g076888@svn.freebsd.org> Message-ID: <20120512031923.N2476@besplex.bde.org> References: <201205111013.q4BADY9g076888@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r235265 - head/share/man/man7 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 17:47:22 -0000 On Fri, 11 May 2012, Ulrich Spoerlein wrote: > Log: > Stop lying about default UFS blocksizes. > > This catches up with the year-old change to default blocksizes. Also > reduce the variants of spelling gigabyte from 3 down to 2 (GB and GiB). Why not reduce it to 1 (no GakaBytes, aka GiB)? > Modified: head/share/man/man7/tuning.7 > ============================================================================== > --- head/share/man/man7/tuning.7 Fri May 11 09:46:17 2012 (r235264) > +++ head/share/man/man7/tuning.7 Fri May 11 10:13:34 2012 (r235265) > @@ -148,15 +148,15 @@ If you do not use ports all that much an > system source > .Pq Pa /usr/src > on the machine, you can get away with > -a 1 gigabyte > +a 1 GB Since we are not disk manufacturers, GB here means 2**30. I like not spelling it GakaByte of course. Similarly in most places. > @@ -218,22 +218,22 @@ and > .Em cylinders/group . > .Pp > .Fx > -performs best when using 8K or 16K file system block sizes. > -The default file system block size is 16K, > +performs best when using 16K or 32K file system block sizes. > +The default file system block size is 32K, K here means 2**10. I like not spelling it KakaByte of course. > @@ -256,13 +256,13 @@ Do not use this option > unless you are actually storing large files on the partition, because if you > overcompensate you can wind up with a file system that has lots of free > space remaining but cannot accommodate any more files. > -Using 32768, 65536, or 262144 bytes/i-node is recommended. > +Using 65536, 131072, or 262144 bytes/i-node is recommended. Most places give block sizes in K. This is verbose. > You can go higher but > it will have only incremental effects on > .Xr fsck 8 > recovery times. > For example, > -.Dq Li "newfs -i 32768 ..." . > +.Dq Li "newfs -i 65536 ..." . newfs now uses expand_number() for most numeric args. expand_number() is horrible, starting with its name (it doesn't expand numbers, but parses string representations of numbers), but it supports sizes in K and its bugs don't include supporting sizes in GakaBytes, so the verboseness in the above is now unnecessary. > .Pp > .Xr tunefs 8 > may be used to further tune a file system. > @@ -525,8 +525,8 @@ sysctl governs VFS read-ahead and is exp > to pre-read if the heuristics algorithm decides that the reads are > issued sequentially. > It is used by the UFS, ext2fs and msdosfs file systems. > -With the default UFS block size of 16 KiB, a setting of 32 will allow > -speculatively reading up to 512 KiB. > +With the default UFS block size of 32 KiB, a setting of 64 will allow > +speculatively reading up to 2 MiB. This used and uses KakaBytes, but the above uses K (it also omits B). This uses MakaBytes for the first time in this file. Elsewhere, most places use M. The first of these are in the first paragraph, and near them, GB is spelled as G, so the reduction is from >= 4 to >=3, not from 3 to 2. Actually, I can't find any GakaB, so the reduction does seem to be to 2 (G and GB). For M, the spellings are at least M for fs and swap sizes, M and MB for memory sizes, MB for page sizes, and now MakaByte for a block size. > This setting may be increased to get around disk I/O latencies, especially > where these latencies are large such as in virtual machine emulated > environments. Bruce From owner-svn-src-head@FreeBSD.ORG Fri May 11 17:49:01 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 49FCA106566C; Fri, 11 May 2012 17:49:01 +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 351168FC1F; Fri, 11 May 2012 17:49:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BHn1Pt093746; Fri, 11 May 2012 17:49:01 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BHn0BW093744; Fri, 11 May 2012 17:49:00 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201205111749.q4BHn0BW093744@svn.freebsd.org> From: Warner Losh Date: Fri, 11 May 2012 17:49: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: r235278 - head/sys/arm/arm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 17:49:01 -0000 Author: imp Date: Fri May 11 17:49:00 2012 New Revision: 235278 URL: http://svn.freebsd.org/changeset/base/235278 Log: Remove unused cruft. We call through memcpy more directly when we need to move the kernel, so we no longer need this. Modified: head/sys/arm/arm/locore.S Modified: head/sys/arm/arm/locore.S ============================================================================== --- head/sys/arm/arm/locore.S Fri May 11 17:40:13 2012 (r235277) +++ head/sys/arm/arm/locore.S Fri May 11 17:49:00 2012 (r235278) @@ -229,11 +229,6 @@ mmu_init_table: .word _end .word svcstk + INIT_ARM_STACK_SIZE -#if defined(FLASHADDR) && defined(LOADERRAMADDR) -.L_arm_memcpy: - .word _C_LABEL(_arm_memcpy) -#endif - .Lvirt_done: .word virt_done .Lmainreturned: From owner-svn-src-head@FreeBSD.ORG Fri May 11 17:50:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5681C106564A; Fri, 11 May 2012 17:50:52 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 42D288FC18; Fri, 11 May 2012 17:50:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BHoqvG093884; Fri, 11 May 2012 17:50:52 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BHoqGS093882; Fri, 11 May 2012 17:50:52 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201205111750.q4BHoqGS093882@svn.freebsd.org> From: Michael Tuexen Date: Fri, 11 May 2012 17:50: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: r235280 - 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: Fri, 11 May 2012 17:50:52 -0000 Author: tuexen Date: Fri May 11 17:50:51 2012 New Revision: 235280 URL: http://svn.freebsd.org/changeset/base/235280 Log: Remove a constant which is only used on non-FreeBSD platform. (The actual code for the socket option handling has been #ifdefed out forever...) MFC after: 3 days. Modified: head/sys/netinet/sctp.h Modified: head/sys/netinet/sctp.h ============================================================================== --- head/sys/netinet/sctp.h Fri May 11 17:50:18 2012 (r235279) +++ head/sys/netinet/sctp.h Fri May 11 17:50:51 2012 (r235280) @@ -265,8 +265,6 @@ struct sctp_paramhdr { #define SCTP_PEELOFF 0x0000800a /* the real worker for sctp_getaddrlen() */ #define SCTP_GET_ADDR_LEN 0x0000800b -/* temporary workaround for Apple listen() issue, no args used */ -#define SCTP_LISTEN_FIX 0x0000800c /* Debug things that need to be purged */ #define SCTP_SET_INITIAL_DBG_SEQ 0x00009f00 From owner-svn-src-head@FreeBSD.ORG Fri May 11 17:55:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 773ED106564A; Fri, 11 May 2012 17:55:41 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id B17E38FC0A; Fri, 11 May 2012 17:55:40 +0000 (UTC) Received: by vbmv11 with SMTP id v11so4091622vbm.13 for ; Fri, 11 May 2012 10:55:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=yZ+HKWnf5nKu6sI1sqBSvilV1EFKNbETkhQvyTMjAqM=; b=KnC+OBOS+SKe1sJyHzMOdL2P9EDzUhi0qRvdE65YtjoRYiS6qjZUofSFXA2d9l2wLA KGT0YJw8oo70fppSuRHlLnS74py6DmwNTtTLy066QlQxzjsw2FB6z9klbs0N/e3mTanl XDj7M310FP9PCI/3s/Q+YKLAl6gL5TGBtw9817BOLJ8XidOiJbHA8ti0C6/Qxbzm+yBQ GjcMKRbnazGMDk9qGBYdIaqJhCDoqbCP32pwwTMhlFPijOfi4iRAVzFsePrUR81TOBVT 18PyMYtviNfubien9Y8XjvcRFGThwcHjCLU7p3QH2U/j4Q9T5vHotsFc70rNO8HxS7xB b39g== MIME-Version: 1.0 Received: by 10.52.22.79 with SMTP id b15mr309055vdf.10.1336758940028; Fri, 11 May 2012 10:55:40 -0700 (PDT) Received: by 10.220.7.148 with HTTP; Fri, 11 May 2012 10:55:39 -0700 (PDT) In-Reply-To: <20120511170412.GR2358@deviant.kiev.zoral.com.ua> References: <201205111129.q4BBT85G081093@svn.freebsd.org> <20120511145432.GA19173@vniz.net> <20120511170412.GR2358@deviant.kiev.zoral.com.ua> Date: Fri, 11 May 2012 10:55:39 -0700 Message-ID: From: Garrett Cooper To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, Konstantin Belousov , svn-src-all@freebsd.org, src-committers@freebsd.org, Andrey Chernov Subject: Re: svn commit: r235266 - head/lib/libc/stdlib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 17:55:41 -0000 On Fri, May 11, 2012 at 10:04 AM, Konstantin Belousov wrote: > On Fri, May 11, 2012 at 06:54:32PM +0400, Andrey Chernov wrote: >> Thanks, but in this two places old errno value should be saved across >> free() because free() may damage it: > I do not agree. free() cannot change errno. It might depending on the OS (logically it shouldn't, but I digress), but there was some recent discussion on the POSIX list about errno not being mangled via free: http://austingroupbugs.net/view.php?id=385 . Cheers, -Garrett From owner-svn-src-head@FreeBSD.ORG Fri May 11 17:56:26 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7306106566C; Fri, 11 May 2012 17:56:26 +0000 (UTC) (envelope-from ache@vniz.net) Received: from vniz.net (vniz.net [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 3CBD98FC14; Fri, 11 May 2012 17:56:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vniz.net (8.14.5/8.14.5) with ESMTP id q4BHuOrQ021606; Fri, 11 May 2012 21:56:24 +0400 (MSK) (envelope-from ache@vniz.net) Received: (from ache@localhost) by localhost (8.14.5/8.14.5/Submit) id q4BHuOba021605; Fri, 11 May 2012 21:56:24 +0400 (MSK) (envelope-from ache) Date: Fri, 11 May 2012 21:56:24 +0400 From: Andrey Chernov To: Konstantin Belousov Message-ID: <20120511175624.GA21202@vniz.net> Mail-Followup-To: Andrey Chernov , Konstantin Belousov , Konstantin Belousov , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201205111129.q4BBT85G081093@svn.freebsd.org> <20120511145432.GA19173@vniz.net> <20120511170412.GR2358@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1yeeQ81UyVL57Vl7" Content-Disposition: inline In-Reply-To: <20120511170412.GR2358@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Konstantin Belousov Subject: Re: svn commit: r235266 - head/lib/libc/stdlib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 17:56:26 -0000 --1yeeQ81UyVL57Vl7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 11, 2012 at 08:04:12PM +0300, Konstantin Belousov wrote: > On Fri, May 11, 2012 at 06:54:32PM +0400, Andrey Chernov wrote: > > Thanks, but in this two places old errno value should be saved across > > free() because free() may damage it: > I do not agree. free() cannot change errno. Perhaps I forget something, so please refer to standard stating that. IEEE Std 1003.1-2008 says that "No errors are defined." in the ERRORS=20 section, but states that beforehand: "if the argument does not match a pointer earlier returned by a function=20 in POSIX.1-2008 that allocates memory as if by malloc(), or if the space ha= s=20 been deallocated by a call to free() or realloc(), the behavior is=20 undefined. Any use of a pointer that refers to freed space results in undefined=20 behavior. =2E.. The DESCRIPTION is updated to clarify that if the pointer returned is not= =20 by a function that allocates memory as if by malloc(), then the behavior=20 is undefined." So that "undefined behavior" case still can modify errno. (Some internal syscalls (like munmap etc) could produce errno. In any=20 case it is very implemetation defined.) --=20 http://ache.vniz.net/ --1yeeQ81UyVL57Vl7 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk+tUsgACgkQVg5YK5ZEdN0b8gCfUwWDCgWdiU802+IcvPqYY4ku 7ggAoLggsKfmilwvKhvLQBjln3rQhj1H =q0hH -----END PGP SIGNATURE----- --1yeeQ81UyVL57Vl7-- From owner-svn-src-head@FreeBSD.ORG Fri May 11 18:07:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0E77106566B; Fri, 11 May 2012 18:07:23 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD0E98FC12; Fri, 11 May 2012 18:07:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BI7N3S094426; Fri, 11 May 2012 18:07:23 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BI7N6p094425; Fri, 11 May 2012 18:07:23 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201205111807.q4BI7N6p094425@svn.freebsd.org> From: Dimitry Andric Date: Fri, 11 May 2012 18:07: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: r235281 - head/sys/boot/i386/cdboot X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 18:07:24 -0000 Author: dim Date: Fri May 11 18:07:23 2012 New Revision: 235281 URL: http://svn.freebsd.org/changeset/base/235281 Log: Fix sys/boot/i386/cdboot/cdboot.S compilation with clang after r235219. This file uses .code16 directives, which are not yet supported by clang's integrated assembler. MFC after: 1 month Modified: head/sys/boot/i386/cdboot/Makefile Modified: head/sys/boot/i386/cdboot/Makefile ============================================================================== --- head/sys/boot/i386/cdboot/Makefile Fri May 11 17:50:51 2012 (r235280) +++ head/sys/boot/i386/cdboot/Makefile Fri May 11 18:07:23 2012 (r235281) @@ -13,3 +13,7 @@ ORG= 0x7c00 LDFLAGS=-e start -Ttext ${ORG} -Wl,-N,-S,--oformat,binary .include + +# XXX: clang integrated-as doesn't grok .codeNN directives yet +CFLAGS.cdboot.S= ${CLANG_NO_IAS} +CFLAGS+= ${CFLAGS.${.IMPSRC:T}} From owner-svn-src-head@FreeBSD.ORG Fri May 11 18:07:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 564551065783; Fri, 11 May 2012 18:07:38 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4154B8FC0A; Fri, 11 May 2012 18:07:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BI7aBg094471; Fri, 11 May 2012 18:07:36 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BI7aLm094469; Fri, 11 May 2012 18:07:36 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201205111807.q4BI7aLm094469@svn.freebsd.org> From: Michael Tuexen Date: Fri, 11 May 2012 18:07:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235282 - 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: Fri, 11 May 2012 18:07:38 -0000 Author: tuexen Date: Fri May 11 18:07:36 2012 New Revision: 235282 URL: http://svn.freebsd.org/changeset/base/235282 Log: Only provide the supported features in the SCTP_ASSOC_CHANGE notif if the state is SCTP_COMM_UP or SCTP_RESTART. While there, do some cleanups. MFC after: 3 days Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Fri May 11 18:07:23 2012 (r235281) +++ head/sys/netinet/sctputil.c Fri May 11 18:07:36 2012 (r235282) @@ -2592,8 +2592,8 @@ sctp_pad_lastmbuf(struct mbuf *m, int pa } static void -sctp_notify_assoc_change(uint32_t event, struct sctp_tcb *stcb, - uint32_t error, int so_locked +sctp_notify_assoc_change(uint16_t state, struct sctp_tcb *stcb, + uint16_t error, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif @@ -2602,6 +2602,7 @@ sctp_notify_assoc_change(uint32_t event, struct mbuf *m_notify; struct sctp_assoc_change *sac; struct sctp_queued_to_read *control; + size_t len; unsigned int i; #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) @@ -2615,7 +2616,7 @@ sctp_notify_assoc_change(uint32_t event, */ if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) && - ((event == SCTP_COMM_LOST) || (event == SCTP_CANT_STR_ASSOC))) { + ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC))) { if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_COOKIE_WAIT) { SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ECONNREFUSED); stcb->sctp_socket->so_error = ECONNREFUSED; @@ -2651,7 +2652,11 @@ sctp_notify_assoc_change(uint32_t event, /* event not enabled */ return; } - m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_assoc_change), 0, M_DONTWAIT, 1, MT_DATA); + len = sizeof(struct sctp_assoc_change); + if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { + len += SCTP_ASSOC_SUPPORTS_MAX; + } + m_notify = sctp_get_mbuf_for_msg(len, 0, M_DONTWAIT, 1, MT_DATA); if (m_notify == NULL) /* no space left */ return; @@ -2661,27 +2666,29 @@ sctp_notify_assoc_change(uint32_t event, sac->sac_type = SCTP_ASSOC_CHANGE; sac->sac_flags = 0; sac->sac_length = sizeof(struct sctp_assoc_change); - sac->sac_state = event; + sac->sac_state = state; sac->sac_error = error; /* XXX verify these stream counts */ sac->sac_outbound_streams = stcb->asoc.streamoutcnt; sac->sac_inbound_streams = stcb->asoc.streamincnt; sac->sac_assoc_id = sctp_get_associd(stcb); - i = 0; - if (stcb->asoc.peer_supports_prsctp) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_PR; - } - if (stcb->asoc.peer_supports_auth) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_AUTH; - } - if (stcb->asoc.peer_supports_asconf) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_ASCONF; - } - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_MULTIBUF; - if (stcb->asoc.peer_supports_strreset) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_RE_CONFIG; + if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { + i = 0; + if (stcb->asoc.peer_supports_prsctp) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_PR; + } + if (stcb->asoc.peer_supports_auth) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_AUTH; + } + if (stcb->asoc.peer_supports_asconf) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_ASCONF; + } + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_MULTIBUF; + if (stcb->asoc.peer_supports_strreset) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_RE_CONFIG; + } + sac->sac_length += i; } - sac->sac_length += i; SCTP_BUF_LEN(m_notify) = sac->sac_length; SCTP_BUF_NEXT(m_notify) = NULL; control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination, @@ -2700,7 +2707,7 @@ sctp_notify_assoc_change(uint32_t event, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, so_locked); - if (event == SCTP_COMM_LOST) { + if (state == SCTP_COMM_LOST) { /* Wake up any sleeper */ #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(stcb->sctp_ep); From owner-svn-src-head@FreeBSD.ORG Fri May 11 18:10:49 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D7FDD106564A; Fri, 11 May 2012 18:10:49 +0000 (UTC) (envelope-from ache@vniz.net) Received: from vniz.net (vniz.net [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 45FF08FC14; Fri, 11 May 2012 18:10:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vniz.net (8.14.5/8.14.5) with ESMTP id q4BIAl9B021829; Fri, 11 May 2012 22:10:47 +0400 (MSK) (envelope-from ache@vniz.net) Received: (from ache@localhost) by localhost (8.14.5/8.14.5/Submit) id q4BIAlrW021828; Fri, 11 May 2012 22:10:47 +0400 (MSK) (envelope-from ache) Date: Fri, 11 May 2012 22:10:47 +0400 From: Andrey Chernov To: Garrett Cooper Message-ID: <20120511181047.GA21793@vniz.net> Mail-Followup-To: Andrey Chernov , Garrett Cooper , Konstantin Belousov , Konstantin Belousov , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201205111129.q4BBT85G081093@svn.freebsd.org> <20120511145432.GA19173@vniz.net> <20120511170412.GR2358@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Konstantin Belousov , svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Konstantin Belousov Subject: Re: svn commit: r235266 - head/lib/libc/stdlib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 18:10:49 -0000 On Fri, May 11, 2012 at 10:55:39AM -0700, Garrett Cooper wrote: > On Fri, May 11, 2012 at 10:04 AM, Konstantin Belousov > wrote: > > On Fri, May 11, 2012 at 06:54:32PM +0400, Andrey Chernov wrote: > >> Thanks, but in this two places old errno value should be saved across > >> free() because free() may damage it: > > I do not agree. free() cannot change errno. > > It might depending on the OS (logically it shouldn't, but I > digress), but there was some recent discussion on the POSIX list about > errno not being mangled via free: > http://austingroupbugs.net/view.php?id=385 . Yes. The initial paragraph from it states pretty clear: Line 25639 [XSH errno] is explicit that "The setting of errno after a successful call to a function is unspecified unless the description of that function specifies that errno shall not be modified." However, free() does not mention its interaction with errno. -- http://ache.vniz.net/ From owner-svn-src-head@FreeBSD.ORG Fri May 11 19:15:34 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2FF421065670; Fri, 11 May 2012 19:15:34 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B0CA8FC17; Fri, 11 May 2012 19:15:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BJFXap096759; Fri, 11 May 2012 19:15:33 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BJFX7N096757; Fri, 11 May 2012 19:15:33 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201205111915.q4BJFX7N096757@svn.freebsd.org> From: Michael Tuexen Date: Fri, 11 May 2012 19:15:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235283 - 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: Fri, 11 May 2012 19:15:34 -0000 Author: tuexen Date: Fri May 11 19:15:33 2012 New Revision: 235283 URL: http://svn.freebsd.org/changeset/base/235283 Log: Fix a bug in the handling of association reset request. MFC after: 3 days Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Fri May 11 18:07:36 2012 (r235282) +++ head/sys/netinet/sctp_input.c Fri May 11 19:15:33 2012 (r235283) @@ -3773,46 +3773,40 @@ sctp_handle_str_reset_request_tsn(struct seq = ntohl(req->request_seq); if (asoc->str_reset_seq_in == seq) { + asoc->last_reset_action[1] = stcb->asoc.last_reset_action[0]; if (!(asoc->local_strreset_support & SCTP_ENABLE_CHANGE_ASSOC_REQ)) { - stcb->asoc.last_reset_action[1] = stcb->asoc.last_reset_action[0]; - stcb->asoc.last_reset_action[0] = SCTP_STREAM_RESET_RESULT_PERFORMED; - asoc->last_reset_action[0] = SCTP_STREAM_RESET_RESULT_DENIED; - } else + } else { fwdtsn.ch.chunk_length = htons(sizeof(struct sctp_forward_tsn_chunk)); - fwdtsn.ch.chunk_type = SCTP_FORWARD_CUM_TSN; - fwdtsn.ch.chunk_flags = 0; - fwdtsn.new_cumulative_tsn = htonl(stcb->asoc.highest_tsn_inside_map + 1); - sctp_handle_forward_tsn(stcb, &fwdtsn, &abort_flag, NULL, 0); - if (abort_flag) { - return (1); - } - asoc->highest_tsn_inside_map += SCTP_STREAM_RESET_TSN_DELTA; - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { - sctp_log_map(0, 10, asoc->highest_tsn_inside_map, SCTP_MAP_SLIDE_RESULT); - } - asoc->tsn_last_delivered = asoc->cumulative_tsn = asoc->highest_tsn_inside_map; - asoc->mapping_array_base_tsn = asoc->highest_tsn_inside_map + 1; - memset(asoc->mapping_array, 0, asoc->mapping_array_size); - asoc->highest_tsn_inside_nr_map = asoc->highest_tsn_inside_map; - memset(asoc->nr_mapping_array, 0, asoc->mapping_array_size); - atomic_add_int(&asoc->sending_seq, 1); - /* save off historical data for retrans */ - asoc->last_sending_seq[1] = asoc->last_sending_seq[0]; - asoc->last_sending_seq[0] = asoc->sending_seq; - asoc->last_base_tsnsent[1] = asoc->last_base_tsnsent[0]; - asoc->last_base_tsnsent[0] = asoc->mapping_array_base_tsn; - - sctp_add_stream_reset_result_tsn(chk, - ntohl(req->request_seq), - SCTP_STREAM_RESET_RESULT_PERFORMED, - asoc->sending_seq, - asoc->mapping_array_base_tsn); - sctp_reset_out_streams(stcb, 0, (uint16_t *) NULL); - sctp_reset_in_stream(stcb, 0, (uint16_t *) NULL); - asoc->last_reset_action[1] = asoc->last_reset_action[0]; - asoc->last_reset_action[0] = SCTP_STREAM_RESET_RESULT_PERFORMED; - sctp_notify_stream_reset_tsn(stcb, asoc->sending_seq, (asoc->mapping_array_base_tsn + 1), 0); + fwdtsn.ch.chunk_type = SCTP_FORWARD_CUM_TSN; + fwdtsn.ch.chunk_flags = 0; + fwdtsn.new_cumulative_tsn = htonl(stcb->asoc.highest_tsn_inside_map + 1); + sctp_handle_forward_tsn(stcb, &fwdtsn, &abort_flag, NULL, 0); + if (abort_flag) { + return (1); + } + asoc->highest_tsn_inside_map += SCTP_STREAM_RESET_TSN_DELTA; + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { + sctp_log_map(0, 10, asoc->highest_tsn_inside_map, SCTP_MAP_SLIDE_RESULT); + } + asoc->tsn_last_delivered = asoc->cumulative_tsn = asoc->highest_tsn_inside_map; + asoc->mapping_array_base_tsn = asoc->highest_tsn_inside_map + 1; + memset(asoc->mapping_array, 0, asoc->mapping_array_size); + asoc->highest_tsn_inside_nr_map = asoc->highest_tsn_inside_map; + memset(asoc->nr_mapping_array, 0, asoc->mapping_array_size); + atomic_add_int(&asoc->sending_seq, 1); + /* save off historical data for retrans */ + asoc->last_sending_seq[1] = asoc->last_sending_seq[0]; + asoc->last_sending_seq[0] = asoc->sending_seq; + asoc->last_base_tsnsent[1] = asoc->last_base_tsnsent[0]; + asoc->last_base_tsnsent[0] = asoc->mapping_array_base_tsn; + sctp_reset_out_streams(stcb, 0, (uint16_t *) NULL); + sctp_reset_in_stream(stcb, 0, (uint16_t *) NULL); + asoc->last_reset_action[0] = SCTP_STREAM_RESET_RESULT_PERFORMED; + sctp_notify_stream_reset_tsn(stcb, asoc->sending_seq, (asoc->mapping_array_base_tsn + 1), 0); + } + sctp_add_stream_reset_result_tsn(chk, seq, asoc->last_reset_action[0], + asoc->last_sending_seq[0], asoc->last_base_tsnsent[0]); asoc->str_reset_seq_in++; } else if (asoc->str_reset_seq_in - 1 == seq) { sctp_add_stream_reset_result_tsn(chk, seq, asoc->last_reset_action[0], From owner-svn-src-head@FreeBSD.ORG Fri May 11 19:33:44 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3F4E51065688; Fri, 11 May 2012 19:33:44 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail11.syd.optusnet.com.au (mail11.syd.optusnet.com.au [211.29.132.192]) by mx1.freebsd.org (Postfix) with ESMTP id CD1B38FC15; Fri, 11 May 2012 19:33:43 +0000 (UTC) Received: from c122-106-171-232.carlnfd1.nsw.optusnet.com.au (c122-106-171-232.carlnfd1.nsw.optusnet.com.au [122.106.171.232]) by mail11.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q4BJXYMk022428 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 12 May 2012 05:33:35 +1000 Date: Sat, 12 May 2012 05:33:34 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warner Losh In-Reply-To: <201205111740.q4BHeDS9093430@svn.freebsd.org> Message-ID: <20120512051849.N2914@besplex.bde.org> References: <201205111740.q4BHeDS9093430@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r235277 - head/sys/arm/arm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 19:33:44 -0000 On Fri, 11 May 2012, Warner Losh wrote: > Log: > This comment has become unmoored from the code to which it applies. > Move it back. This commit message is unmoored from its this too (except when both are collected in the commit mail). > Modified: head/sys/arm/arm/locore.S > ============================================================================== > --- head/sys/arm/arm/locore.S Fri May 11 16:09:12 2012 (r235276) > +++ head/sys/arm/arm/locore.S Fri May 11 17:40:13 2012 (r235277) > @@ -42,12 +42,6 @@ __FBSDID("$FreeBSD$"); > /* What size should this really be ? It is only used by initarm() */ > #define INIT_ARM_STACK_SIZE 2048 > > -/* > - * This is for kvm_mkdb, and should be the address of the beginning > - * of the kernel text segment (not necessarily the same as kernbase). > - */ > - > - Like the commit message, this this doesn't clearly refer to anything. The 2 blank lines are either intentional unmooring with 1 style bugs, or 2 style bugs. (When a this refers to multiple this's, and those this's are separated by blank lines, attaching the this to the this's by juxtaposition (with no blank lines) doesn't work, and one fairly obscure way of indicating this is to attach the comment to nothing (by separating it with a blank line.) > #define CPWAIT_BRANCH \ > sub pc, pc, #4 > > @@ -56,6 +50,10 @@ __FBSDID("$FreeBSD$"); > mov tmp, tmp /* wait for it to complete */ ;\ > CPWAIT_BRANCH /* branch to next insn */ > > +/* > + * This is for kvm_mkdb, and should be the address of the beginning > + * of the kernel text segment (not necessarily the same as kernbase). > + */ > .text > .align 0 > .globl kernbase > This this now has its this near to it, but would still be clearer if this were described explicitly. That this seems to be simply kernbase, or possibly kernbase and physaddr. But this or that comment makes no sense when attached to kernbase, because it says that this or that this is NOT necessarily the same as kernbase. These this's have intentionally fairly bad grammar so that it is unclear what those this's are ;-). Bruce From owner-svn-src-head@FreeBSD.ORG Fri May 11 19:57:26 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20AB41065749; Fri, 11 May 2012 19:57:26 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id CD3198FC19; Fri, 11 May 2012 19:57:24 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id WAA22563; Fri, 11 May 2012 22:57:23 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1SSvxr-0004vX-2D; Fri, 11 May 2012 22:57:23 +0300 Message-ID: <4FAD6F22.500@FreeBSD.org> Date: Fri, 11 May 2012 22:57:22 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120503 Thunderbird/12.0.1 MIME-Version: 1.0 To: Dimitry Andric References: <201205111807.q4BI7N6p094425@svn.freebsd.org> In-Reply-To: <201205111807.q4BI7N6p094425@svn.freebsd.org> X-Enigmail-Version: 1.5pre Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r235281 - head/sys/boot/i386/cdboot X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 19:57:26 -0000 on 11/05/2012 21:07 Dimitry Andric said the following: > Author: dim > Date: Fri May 11 18:07:23 2012 > New Revision: 235281 > URL: http://svn.freebsd.org/changeset/base/235281 > > Log: > Fix sys/boot/i386/cdboot/cdboot.S compilation with clang after r235219. > This file uses .code16 directives, which are not yet supported by > clang's integrated assembler. > > MFC after: 1 month Thank you! Please ping me when the MFC time comes, so that I won't forget to bundle this commit into the MFC of the original/offending commit. > Modified: > head/sys/boot/i386/cdboot/Makefile > > Modified: head/sys/boot/i386/cdboot/Makefile > ============================================================================== > --- head/sys/boot/i386/cdboot/Makefile Fri May 11 17:50:51 2012 (r235280) > +++ head/sys/boot/i386/cdboot/Makefile Fri May 11 18:07:23 2012 (r235281) > @@ -13,3 +13,7 @@ ORG= 0x7c00 > LDFLAGS=-e start -Ttext ${ORG} -Wl,-N,-S,--oformat,binary > > .include > + > +# XXX: clang integrated-as doesn't grok .codeNN directives yet > +CFLAGS.cdboot.S= ${CLANG_NO_IAS} > +CFLAGS+= ${CFLAGS.${.IMPSRC:T}} -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Fri May 11 20:01:45 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CA369106568B; Fri, 11 May 2012 20:01:45 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B66468FC14; Fri, 11 May 2012 20:01:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BK1jFI098255; Fri, 11 May 2012 20:01:45 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BK1jXj098253; Fri, 11 May 2012 20:01:45 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201205112001.q4BK1jXj098253@svn.freebsd.org> From: Hiroki Sato Date: Fri, 11 May 2012 20:01: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: r235285 - head/sbin/ifconfig X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 20:01:45 -0000 Author: hrs Date: Fri May 11 20:01:45 2012 New Revision: 235285 URL: http://svn.freebsd.org/changeset/base/235285 Log: Skip nd6 line with no warning message when the system does not support INET6. Spotted by: flo Modified: head/sbin/ifconfig/af_nd6.c Modified: head/sbin/ifconfig/af_nd6.c ============================================================================== --- head/sbin/ifconfig/af_nd6.c Fri May 11 19:26:54 2012 (r235284) +++ head/sbin/ifconfig/af_nd6.c Fri May 11 20:01:45 2012 (r235285) @@ -148,12 +148,14 @@ nd6_status(int s) memset(&nd, 0, sizeof(nd)); strncpy(nd.ifname, ifr.ifr_name, sizeof(nd.ifname)); if ((s6 = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) { - warn("socket(AF_INET6, SOCK_DGRAM)"); + if (errno != EPROTONOSUPPORT) + warn("socket(AF_INET6, SOCK_DGRAM)"); return; } error = ioctl(s6, SIOCGIFINFO_IN6, &nd); if (error) { - warn("ioctl(SIOCGIFINFO_IN6)"); + if (errno != EPFNOSUPPORT) + warn("ioctl(SIOCGIFINFO_IN6)"); close(s6); return; } From owner-svn-src-head@FreeBSD.ORG Fri May 11 20:06:47 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 87AB91065675; Fri, 11 May 2012 20:06:47 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F9778FC23; Fri, 11 May 2012 20:06:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BK6lrC098475; Fri, 11 May 2012 20:06:47 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BK6k8K098438; Fri, 11 May 2012 20:06:46 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205112006.q4BK6k8K098438@svn.freebsd.org> From: Glen Barber Date: Fri, 11 May 2012 20:06: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: r235286 - in head: contrib/bsnmp/snmp_usm contrib/bsnmp/snmp_vacm lib/libbluetooth lib/libc/locale lib/libc/net lib/libc/posix1e lib/libc/rpc lib/libc/stdlib lib/libc/string lib/libelf ... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 20:06:47 -0000 Author: gjb (doc committer) Date: Fri May 11 20:06:46 2012 New Revision: 235286 URL: http://svn.freebsd.org/changeset/base/235286 Log: General mdoc(7) and typo fixes. PR: 167734 Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org) MFC after: 3 days Modified: head/contrib/bsnmp/snmp_usm/snmp_usm.3 head/contrib/bsnmp/snmp_vacm/snmp_vacm.3 head/lib/libbluetooth/bluetooth.3 head/lib/libc/locale/duplocale.3 head/lib/libc/locale/freelocale.3 head/lib/libc/locale/newlocale.3 head/lib/libc/locale/querylocale.3 head/lib/libc/locale/uselocale.3 head/lib/libc/locale/xlocale.3 head/lib/libc/net/sctp_connectx.3 head/lib/libc/net/sctp_recvmsg.3 head/lib/libc/net/sourcefilter.3 head/lib/libc/posix1e/acl_delete_entry.3 head/lib/libc/rpc/publickey.3 head/lib/libc/stdlib/getenv.3 head/lib/libc/stdlib/strfmon.3 head/lib/libc/string/strlcpy.3 head/lib/libelf/elf_getdata.3 head/lib/libelf/elf_strptr.3 head/lib/libelf/gelf_getphdr.3 head/lib/libelf/gelf_newehdr.3 head/lib/libgpib/gpib.3 head/lib/libkvm/kvm_getpcpu.3 head/lib/libprocstat/libprocstat.3 head/lib/libradius/libradius.3 head/lib/libtacplus/libtacplus.3 head/lib/libusb/libusb.3 head/lib/libusb/libusb20.3 head/lib/msun/man/cexp.3 head/lib/msun/man/complex.3 head/share/man/man3/ATOMIC_VAR_INIT.3 head/share/man/man3/pthread.3 head/share/man/man3/pthread_condattr.3 head/sys/netinet/libalias/libalias.3 head/usr.sbin/bsnmpd/modules/snmp_netgraph/snmp_netgraph.3 head/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3 Modified: head/contrib/bsnmp/snmp_usm/snmp_usm.3 ============================================================================== --- head/contrib/bsnmp/snmp_usm/snmp_usm.3 Fri May 11 20:01:45 2012 (r235285) +++ head/contrib/bsnmp/snmp_usm/snmp_usm.3 Fri May 11 20:06:46 2012 (r235286) @@ -57,7 +57,7 @@ An advisory lock used to coordinate seve altering the SNMP USM users. .It Va usmUserTable The table contains all SNMP USM users configured in -.Nm bsnmpd. +.Nm bsnmpd . The table contains the following objects .Bl -tag -width ".It Va usmUserEngineID" .It Va usmUserEngineID @@ -102,7 +102,7 @@ module These columns may be used to change the user's privacy key. .It Va usmUserPublic An arbitrary octet string that may be modified to confirm a SET operation on any -of the columns was successfull. +of the columns was successful. .It Va usmUserStorageType This column always has either of two values. Entries created via .Nm bsnmpd's Modified: head/contrib/bsnmp/snmp_vacm/snmp_vacm.3 ============================================================================== --- head/contrib/bsnmp/snmp_vacm/snmp_vacm.3 Fri May 11 20:01:45 2012 (r235285) +++ head/contrib/bsnmp/snmp_vacm/snmp_vacm.3 Fri May 11 20:06:46 2012 (r235286) @@ -76,7 +76,7 @@ objects under the subtree in the relevan .It Va vacmViewTreeFamilyTable The table contains a list of SNMP views, i.e. entries specifying the OID of a MIB subtree and whether access to the objects under this subtree is to be -allowed or forbiden. +allowed or forbidden. .El .Sh FILES .Bl -tag -width "XXXXXXXXX" Modified: head/lib/libbluetooth/bluetooth.3 ============================================================================== --- head/lib/libbluetooth/bluetooth.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/libbluetooth/bluetooth.3 Fri May 11 20:06:46 2012 (r235286) @@ -494,7 +494,8 @@ previously obtained with .Xr bt_devopen 3 . Filtering can be done on packet types, i.e. .Dv ACL , -.Dv SCO or +.Dv SCO +or .Dv HCI , command and event packets, and, in addition, on .Dv HCI Modified: head/lib/libc/locale/duplocale.3 ============================================================================== --- head/lib/libc/locale/duplocale.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/libc/locale/duplocale.3 Fri May 11 20:06:46 2012 (r235286) @@ -44,10 +44,10 @@ Duplicates an existing .Fa locale_t returning a new .Fa locale_t -that refers to the same locale values but has independent internal state. +that refers to the same locale values but has an independent internal state. Various functions, such as .Xr mblen 3 -require presistent state. +require a persistent state. These functions formerly used static variables and calls to them from multiple threads had undefined behavior. They now use fields in the Modified: head/lib/libc/locale/freelocale.3 ============================================================================== --- head/lib/libc/locale/freelocale.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/libc/locale/freelocale.3 Fri May 11 20:06:46 2012 (r235286) @@ -34,7 +34,7 @@ .Nd Frees a locale created with .Xr duplocale 3 or -.Xr newlocale 3 . +.Xr newlocale 3 .Sh LIBRARY .Lb libc .Sh SYNOPSIS Modified: head/lib/libc/locale/newlocale.3 ============================================================================== --- head/lib/libc/locale/newlocale.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/libc/locale/newlocale.3 Fri May 11 20:06:46 2012 (r235286) @@ -51,7 +51,7 @@ Any other components will be inherited f The .Fa mask is either -.Fa LC_ALL_MASK, +.Fa LC_ALL_MASK , indicating all possible locale components, or the logical OR of some combination of the following: .Bl -tag -width "LC_MESSAGES_MASK" -offset indent @@ -59,7 +59,7 @@ or the logical OR of some combination of The locale for string collation routines. This controls alphabetic ordering in .Xr strcoll 3 - and +and .Xr strxfrm 3 . .It LC_CTYPE_MASK The locale for the Modified: head/lib/libc/locale/querylocale.3 ============================================================================== --- head/lib/libc/locale/querylocale.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/libc/locale/querylocale.3 Fri May 11 20:06:46 2012 (r235286) @@ -32,7 +32,7 @@ .Os .Sh NAME .Nm querylocale -.Nd Look up the locale name for a specified category. +.Nd Look up the locale name for a specified category .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -41,7 +41,7 @@ .Fn querylocale "int mask" "locale_t locale" .Sh DESCRIPTION Returns the name of the locale for the category specified by -.Fa mask. +.Fa mask . This possible values for the mask are the same as those in .Xr newlocale 3 . If more than one bit in the mask is set, the returned value is undefined. Modified: head/lib/libc/locale/uselocale.3 ============================================================================== --- head/lib/libc/locale/uselocale.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/libc/locale/uselocale.3 Fri May 11 20:06:46 2012 (r235286) @@ -32,7 +32,7 @@ .Os .Sh NAME .Nm uselocale -.Nd Sets a thread-local locale. +.Nd Sets a thread-local locale .Sh LIBRARY .Lb libc .Sh SYNOPSIS Modified: head/lib/libc/locale/xlocale.3 ============================================================================== --- head/lib/libc/locale/xlocale.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/libc/locale/xlocale.3 Fri May 11 20:06:46 2012 (r235286) @@ -32,7 +32,7 @@ .Os .Sh NAME .Nm xlocale -.Nd Thread-safe extended locale support. +.Nd Thread-safe extended locale support .Sh LIBRARY .Lb libc .Sh SYNOPSIS Modified: head/lib/libc/net/sctp_connectx.3 ============================================================================== --- head/lib/libc/net/sctp_connectx.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/libc/net/sctp_connectx.3 Fri May 11 20:06:46 2012 (r235286) @@ -36,7 +36,7 @@ .Os .Sh NAME .Nm sctp_connectx -.Nd connect an SCTP socket with multiple destination addresses. +.Nd connect an SCTP socket with multiple destination addresses .Sh LIBRARY .Lb libc .Sh SYNOPSIS Modified: head/lib/libc/net/sctp_recvmsg.3 ============================================================================== --- head/lib/libc/net/sctp_recvmsg.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/libc/net/sctp_recvmsg.3 Fri May 11 20:06:46 2012 (r235286) @@ -66,7 +66,7 @@ For a one-to-many (SOCK_SEQPACKET) type .Fn sctp_recvmsg after having implicitly started an association via one of the send calls including -.Fn sctp_sendmsg +.Fn sctp_sendmsg , .Fn sendto and .Fn sendmsg . Modified: head/lib/libc/net/sourcefilter.3 ============================================================================== --- head/lib/libc/net/sourcefilter.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/libc/net/sourcefilter.3 Fri May 11 20:06:46 2012 (r235286) @@ -158,7 +158,7 @@ For the protocol-independent functions .Fn getsourcefilter and .Fn setsourcefilter , -the argument +the .Fa grouplen argument specifies the size of the structure pointed to by .Fa group . @@ -220,7 +220,7 @@ operation. .Sh SEE ALSO .Xr ip 4 , .Xr ip6 4 , -.Xr multicast 4, +.Xr multicast 4 , .Xr ifmcstat 8 .Rs .%A D. Thaler Modified: head/lib/libc/posix1e/acl_delete_entry.3 ============================================================================== --- head/lib/libc/posix1e/acl_delete_entry.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/libc/posix1e/acl_delete_entry.3 Fri May 11 20:06:46 2012 (r235286) @@ -30,7 +30,7 @@ .Os .Sh NAME .Nm acl_delete_entry , -.Nm acl_delete_entry_np , +.Nm acl_delete_entry_np .Nd delete an ACL entry from an ACL .Sh LIBRARY .Lb libc Modified: head/lib/libc/rpc/publickey.3 ============================================================================== --- head/lib/libc/rpc/publickey.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/libc/rpc/publickey.3 Fri May 11 20:06:46 2012 (r235286) @@ -35,14 +35,14 @@ has an extra argument, which is used to decrypt the encrypted secret key stored in the database. Both routines return 1 if they are successful in finding the key, 0 otherwise. The keys are returned as -.Dv NULL Ns \-terminated , +.Dv NUL Ns \-terminated , hexadecimal strings. If the password supplied to .Fn getsecretkey fails to decrypt the secret key, the routine will return 1 but the .Fa secretkey argument will be a -.Dv NULL +.Dv NUL string .Pq Dq . .Sh SEE ALSO Modified: head/lib/libc/stdlib/getenv.3 ============================================================================== --- head/lib/libc/stdlib/getenv.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/libc/stdlib/getenv.3 Fri May 11 20:06:46 2012 (r235286) @@ -152,7 +152,8 @@ failed because is a .Dv NULL pointer, -.Fa string is without an +.Fa string +is without an .Dq Li \&= character or .Dq Li \&= Modified: head/lib/libc/stdlib/strfmon.3 ============================================================================== --- head/lib/libc/stdlib/strfmon.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/libc/stdlib/strfmon.3 Fri May 11 20:06:46 2012 (r235286) @@ -115,14 +115,14 @@ character is written. .El .Sh RETURN VALUES If the total number of resulting bytes including the terminating -.Dv NULL +.Dv NUL byte is not more than .Fa maxsize , .Fn strfmon returns the number of bytes placed into the array pointed to by .Fa s , not including the terminating -.Dv NULL +.Dv NUL byte. Otherwise, \-1 is returned, the contents of the array are indeterminate, Modified: head/lib/libc/string/strlcpy.3 ============================================================================== --- head/lib/libc/string/strlcpy.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/libc/string/strlcpy.3 Fri May 11 20:06:46 2012 (r235286) @@ -169,7 +169,7 @@ if (strlcat(pname, file, sizeof(pname)) .Ed .Pp Since it is known how many characters were copied the first time, things -can be sped up a bit by using a copy instead of an append +can be sped up a bit by using a copy instead of an append. .Bd -literal -offset indent char *dir, *file, pname[MAXPATHLEN]; size_t n; Modified: head/lib/libelf/elf_getdata.3 ============================================================================== --- head/lib/libelf/elf_getdata.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/libelf/elf_getdata.3 Fri May 11 20:06:46 2012 (r235286) @@ -144,7 +144,7 @@ structures of type .Dv ELF_T_BYTE . .Ss Special handling of zero-sized and SHT_NOBITS sections For sections of type -.Dv SHT_NOBITS, +.Dv SHT_NOBITS , and for zero-sized sections, the functions .Fn elf_getdata Modified: head/lib/libelf/elf_strptr.3 ============================================================================== --- head/lib/libelf/elf_strptr.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/libelf/elf_strptr.3 Fri May 11 20:06:46 2012 (r235286) @@ -64,7 +64,7 @@ encountered. .It Bq Er ELF_E_ARGUMENT Argument .Ar elf -was NULL +was NULL. .It Bq Er ELF_E_ARGUMENT Argument .Ar elf Modified: head/lib/libelf/gelf_getphdr.3 ============================================================================== --- head/lib/libelf/gelf_getphdr.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/libelf/gelf_getphdr.3 Fri May 11 20:06:46 2012 (r235286) @@ -66,7 +66,7 @@ Function will retrieve the program header table entry at index .Ar index from ELF descriptor -.Ar elf. +.Ar elf . The translated program header table entry will be written to the address pointed to be argument .Ar dst . Modified: head/lib/libelf/gelf_newehdr.3 ============================================================================== --- head/lib/libelf/gelf_newehdr.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/libelf/gelf_newehdr.3 Fri May 11 20:06:46 2012 (r235286) @@ -58,7 +58,8 @@ structure. Function .Fn elf64_newehdr returns a pointer to a 64 bit -.Vt Elf64_Ehdr structure. +.Vt Elf64_Ehdr +structure. .Pp When argument .Ar elfclass Modified: head/lib/libgpib/gpib.3 ============================================================================== --- head/lib/libgpib/gpib.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/libgpib/gpib.3 Fri May 11 20:06:46 2012 (r235286) @@ -666,7 +666,7 @@ and sends its contents to the device. .Pp The function .Fn ibwrtkey -is obsolete, and not implemented +is obsolete, and not implemented. .Pp The function .Fn ibxtrc Modified: head/lib/libkvm/kvm_getpcpu.3 ============================================================================== --- head/lib/libkvm/kvm_getpcpu.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/libkvm/kvm_getpcpu.3 Fri May 11 20:06:46 2012 (r235286) @@ -114,7 +114,7 @@ it returns -1 instead. On success, the .Fn kvm_getpcpu function returns a pointer to an allocated buffer or -.Dv NULL. +.Dv NULL . If an error occurs, it returns -1 instead. .Pp @@ -124,7 +124,7 @@ call returns 0; if an error occurs, it r .Pp If any function encounters an error, then an error message may be retrieved via -.Xr kvm_geterr 3. +.Xr kvm_geterr 3 . .Sh SEE ALSO .Xr free 3 , .Xr kvm 3 Modified: head/lib/libprocstat/libprocstat.3 ============================================================================== --- head/lib/libprocstat/libprocstat.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/libprocstat/libprocstat.3 Fri May 11 20:06:46 2012 (r235286) @@ -203,7 +203,7 @@ The .Fn procstat_get_socket_info and .Fn procstat_get_vnode_info -functions are used to retrive information about pipes, pseudo-terminals, +functions are used to retrieve information about pipes, pseudo-terminals, shared memory objects, sockets, and vnodes, respectively. Each of them have a similar interface API. Modified: head/lib/libradius/libradius.3 ============================================================================== --- head/lib/libradius/libradius.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/libradius/libradius.3 Fri May 11 20:06:46 2012 (r235286) @@ -108,8 +108,7 @@ allows clients to perform authentication network requests to remote servers. .Ss Initialization To use the library, an application must first call -.Fn rad_auth_open -, +.Fn rad_auth_open , .Fn rad_acct_open or .Fn rad_server_open @@ -119,8 +118,7 @@ which provides the context for subsequen The former function is used for RADIUS authentication and the latter is used for RADIUS accounting. Calls to -.Fn rad_auth_open -, +.Fn rad_auth_open , .Fn rad_acct_open and .Fn rad_server_open @@ -487,7 +485,7 @@ To respond to the request you should cal .Fn rad_create_response and fill response content with same packet writing functions as for client. When packet is ready, it should be sent with -.Fn rad_send_response +.Fn rad_send_response . .Sh RETURN VALUES The following functions return a non-negative value on success. If Modified: head/lib/libtacplus/libtacplus.3 ============================================================================== --- head/lib/libtacplus/libtacplus.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/libtacplus/libtacplus.3 Fri May 11 20:06:46 2012 (r235286) @@ -380,7 +380,7 @@ the request, and waits for a reply. On failure, .Fn tac_send_acct returns \-1. -Otherwise, it returns the TACACS+ status code +Otherwise, it returns the TACACS+ status code. Possible status codes, defined in .In taclib.h , include: Modified: head/lib/libusb/libusb.3 ============================================================================== --- head/lib/libusb/libusb.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/libusb/libusb.3 Fri May 11 20:06:46 2012 (r235286) @@ -100,12 +100,12 @@ counter decremented once. .Ft uint8_t .Fn libusb_get_bus_number "libusb_device *dev" Returns the number of the bus contained by the device -.Fa dev. +.Fa dev . .Pp .Ft uint8_t .Fn libusb_get_device_address "libusb_device *dev" Returns the device_address contained by the device -.Fa dev. +.Fa dev . .Pp .Ft enum libusb_speed .Fn libusb_get_device_speed "libusb_device *dev" @@ -127,12 +127,12 @@ LIBUSB_ERROR_OTHERS on other failure. .Ft libusb_device * .Fn libusb_ref_device "libusb_device *dev" Increment the reference counter of the device -.Fa dev. +.Fa dev . .Pp .Ft void .Fn libusb_unref_device "libusb_device *dev" Decrement the reference counter of the device -.Fa dev. +.Fa dev . .Pp .Ft int .Fn libusb_open "libusb_device *dev" "libusb_device_handle **devh" @@ -147,7 +147,7 @@ disconnected and a LIBUSB_ERROR code on A convenience function to open a device by vendor and product IDs .Fa vid and -.Fa pid. +.Fa pid . Returns NULL on error. .Pp .Ft void @@ -161,7 +161,7 @@ Returns NULL on error. .Pp .Ft int .Fn libusb_get_configuration "libusb_device_handle *devh" "int *config" -Returns the bConfiguration value of the current configuration. +Returns the value of the current configuration. Returns 0 on success, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and a LIBUSB_ERROR code on error. @@ -171,7 +171,7 @@ and a LIBUSB_ERROR code on error. Set the active configuration to .Fa config for the device contained by -.Fa devh. +.Fa devh . This function returns 0 on success, LIBUSB_ERROR_NOT_FOUND if the requested configuration does not exist, LIBUSB_ERROR_BUSY if the interfaces are currently claimed, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and a @@ -180,7 +180,7 @@ LIBUSB_ERROR code on failure. .Ft int .Fn libusb_claim_interface "libusb_device_handle *devh" "int interface_number" Claim an interface in a given libusb_handle -.Fa devh. +.Fa devh . This is a non-blocking function. It returns 0 on success, LIBUSB_ERROR_NOT_FOUND if the requested interface does not exist, LIBUSB_ERROR_BUSY if a program or @@ -279,7 +279,7 @@ LIBUSB_ERROR code on failure. .Ft int .Fn libusb_get_device_descriptor "libusb_device *dev" "libusb_device_descriptor *desc" Get the USB device descriptor for the device -.Fa dev. +.Fa dev . This is a non-blocking function. Returns 0 on success and a LIBUSB_ERROR code on failure. @@ -330,11 +330,11 @@ on success and a LIBUSB_ERROR code on fa This function parses the USB 3.0 endpoint companion descriptor in host endian format pointed to by .Fa buf and having a length of -.Fa len. +.Fa len . Typically these arguments are the extra and extra_length fields of the endpoint descriptor. On success the pointer to resulting descriptor is stored at the location given by -.Fa ep_comp. +.Fa ep_comp . Returns zero on success and a LIBUSB_ERROR code on failure. On success the parsed USB 3.0 endpoint companion descriptor must be freed using the libusb_free_ss_endpoint_comp function. @@ -348,9 +348,9 @@ This function is NULL safe and frees a p This function parses a Binary Object Store, BOS, descriptor into host endian format pointed to by .Fa buf and having a length of -.Fa len. +.Fa len . On success the pointer to resulting descriptor is stored at the location given by -.Fa bos. +.Fa bos . Returns zero on success and a LIBUSB_ERROR code on failure. On success the parsed BOS descriptor must be freed using the libusb_free_bos_descriptor function. Modified: head/lib/libusb/libusb20.3 ============================================================================== --- head/lib/libusb/libusb20.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/libusb/libusb20.3 Fri May 11 20:06:46 2012 (r235286) @@ -331,7 +331,7 @@ packets are avoided for proxy buffers. .Pp . .Fn libusb20_tr_get_max_total_length -function will return the maximum value for the data length sum of all USB +will return the maximum value for the data length sum of all USB frames associated with an USB transfer. In case of control transfers the value returned does not include the length of the SETUP packet, 8 bytes, which is part of frame zero. @@ -815,7 +815,7 @@ returns the current speed of the given U .Pp . .Fn libusb20_dev_get_config_index -This function returns the currently select config index for the given +returns the currently selected config index for the given USB device. . .Pp @@ -832,7 +832,7 @@ will set the debug level for the given U .Pp . .Fn libusb20_dev_wait_process -function will wait until a pending USB transfer has completed on +will wait until a pending USB transfer has completed on the given USB device. . A timeout value can be specified which is passed on to the @@ -866,7 +866,7 @@ returned. .Pp . .Fn libusb20_be_get_dev_quirk -This function will return the device quirk according to +will return the device quirk according to .Fa index into the libusb20_quirk structure pointed to by .Fa pq . @@ -948,7 +948,7 @@ Dequeued USB devices will not be freed w .Pp . .Fn libusb20_be_enqueue_device -This function will enqueue the given USB device pointer in the backend USB device list. +will enqueue the given USB device pointer in the backend USB device list. . Enqueued USB devices will get freed when the backend is freed. . Modified: head/lib/msun/man/cexp.3 ============================================================================== --- head/lib/msun/man/cexp.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/msun/man/cexp.3 Fri May 11 20:06:46 2012 (r235286) @@ -48,7 +48,7 @@ functions compute the complex exponentia .Fa z , also known as .Em cis Ns ( Ns -.Fa z Ns ) +.Fa z Ns ) . .Sh RETURN VALUES For real numbers .Fa x Modified: head/lib/msun/man/complex.3 ============================================================================== --- head/lib/msun/man/complex.3 Fri May 11 20:01:45 2012 (r235285) +++ head/lib/msun/man/complex.3 Fri May 11 20:06:46 2012 (r235286) @@ -111,7 +111,7 @@ The functions described here conform to .St -isoC-99 . .Sh BUGS -The inverse trigonmetric and hyperbolic functions +The inverse trigonometric and hyperbolic functions .Fn cacos , .Fn cacosh , .Fn casin , Modified: head/share/man/man3/ATOMIC_VAR_INIT.3 ============================================================================== --- head/share/man/man3/ATOMIC_VAR_INIT.3 Fri May 11 20:01:45 2012 (r235285) +++ head/share/man/man3/ATOMIC_VAR_INIT.3 Fri May 11 20:06:46 2012 (r235286) @@ -139,7 +139,7 @@ It sets the atomic variable .Fa object to its desired .Fa value -and returs the original contents of the atomic variable. +and returns the original contents of the atomic variable. .Pp The .Fn atomic_compare_exchange_strong @@ -203,7 +203,7 @@ The .Fn atomic_fetch_sub macro subtracts the value .Fa operand -to atomic variable +from atomic variable .Fa object and returns the original contents of the atomic variable. .Pp Modified: head/share/man/man3/pthread.3 ============================================================================== --- head/share/man/man3/pthread.3 Fri May 11 20:01:45 2012 (r235285) +++ head/share/man/man3/pthread.3 Fri May 11 20:06:46 2012 (r235286) @@ -452,7 +452,7 @@ Set the thread-specific value for the sp .Fa "void \*[lp]*child\*[rp]\*[lp]void\*[rp]" .Fc .Xc -Register fork handlers +Register fork handlers. .It Xo .Ft void .Fn pthread_cleanup_pop "int execute" Modified: head/share/man/man3/pthread_condattr.3 ============================================================================== --- head/share/man/man3/pthread_condattr.3 Fri May 11 20:01:45 2012 (r235285) +++ head/share/man/man3/pthread_condattr.3 Fri May 11 20:06:46 2012 (r235286) @@ -35,7 +35,7 @@ .Nm pthread_condattr_getclock , .Nm pthread_condattr_setclock , .Nm pthread_condattr_getpshared , -.Nm pthread_condattr_setpshared , +.Nm pthread_condattr_setpshared .Nd condition attribute operations .Sh LIBRARY .Lb libpthread Modified: head/sys/netinet/libalias/libalias.3 ============================================================================== --- head/sys/netinet/libalias/libalias.3 Fri May 11 20:01:45 2012 (r235285) +++ head/sys/netinet/libalias/libalias.3 Fri May 11 20:06:46 2012 (r235286) @@ -919,7 +919,7 @@ added support for PPTP and LSNAT as well .An Paolo Pisati Aq piso@FreeBSD.org made the library modular, moving support for all protocols (except for IP, TCP and UDP) to external modules. -.Sh ACKNOWLEDGMENTS +.Sh ACKNOWLEDGEMENTS Listed below, in approximate chronological order, are individuals who have provided valuable comments and/or debugging assistance. .Bd -ragged -offset indent @@ -1277,10 +1277,10 @@ struct dll { .Ed .Bl -inset .It Va name -is the name of the module +is the name of the module. .It Va handle is a pointer to the module obtained through -.Xr dlopen 3 +.Xr dlopen 3 . .El Whenever a module is loaded in userland, an entry is added to .Va dll_chain , Modified: head/usr.sbin/bsnmpd/modules/snmp_netgraph/snmp_netgraph.3 ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_netgraph/snmp_netgraph.3 Fri May 11 20:01:45 2012 (r235285) +++ head/usr.sbin/bsnmpd/modules/snmp_netgraph/snmp_netgraph.3 Fri May 11 20:06:46 2012 (r235286) @@ -305,7 +305,7 @@ This buffer should be at least .Li NG_NODESIZ bytes long. The function returns the node id or 0 if the -node is not found +node is not found. .Pp The function .Fn ng_node_type @@ -396,7 +396,8 @@ of the node with id .Fa peer . The functions return 0 on success or -1 otherwise. The function -.Fn ng_connect2_tee_id does the same as +.Fn ng_connect2_tee_id +does the same as .Fn ng_connect2_id except, that it puts an unnamed tee node between the two nodes. .Pp Modified: head/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3 ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3 Fri May 11 20:01:45 2012 (r235285) +++ head/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3 Fri May 11 20:06:46 2012 (r235286) @@ -61,8 +61,8 @@ via .Va wlanParentIfName column. Any optional parameters may be set via the -.Va wlanIfaceOperatingMode, -.Va wlanIfaceFlags, +.Va wlanIfaceOperatingMode , +.Va wlanIfaceFlags , .Va wlanIfaceBssid and .Va wlanIfaceLocalAddress From owner-svn-src-head@FreeBSD.ORG Fri May 11 20:12:05 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8FE1F1065670; Fri, 11 May 2012 20:12:05 +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 45DF08FC15; Fri, 11 May 2012 20:12:05 +0000 (UTC) Received: from [172.24.128.81] ([192.75.139.248]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id q4BK90IZ016528 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Fri, 11 May 2012 14:09:03 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <4FAD0DF4.9000609@freebsd.org> Date: Fri, 11 May 2012 16:08:54 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <36CFD0BA-5047-42C5-9FE5-5D057CEFBAD9@bsdimp.com> References: <201205111237.q4BCbGX2083596@svn.freebsd.org> <20120511124820.GN2358@deviant.kiev.zoral.com.ua> <4FAD0DF4.9000609@freebsd.org> To: Colin Percival X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Fri, 11 May 2012 14:09:05 -0600 (MDT) Cc: Konstantin Belousov , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Gabor Kovesdan Subject: Re: svn commit: r235267 - in head/usr.bin/sort: . nls X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 20:12:05 -0000 On May 11, 2012, at 9:02 AM, Colin Percival wrote: > On 05/11/12 05:48, Konstantin Belousov wrote: >> On Fri, May 11, 2012 at 12:37:16PM +0000, Gabor Kovesdan wrote: >>> +bool byte_sort =3D false; + +static wchar_t **wmonths =3D NULL; = +static >>> unsigned char **cmonths =3D NULL; >>=20 >> Such initializations are useless. You only increase the size of the = binary=20 >> on the disk as the consequence. >=20 > I just tested this hypothesis, and found no change in binary size = using > either clang or gcc46. Presumably they're smart enough to ignore = explicit > (and unnecessary) initializations of statics to zero. How did you test this? size(1) or ls(1)? If ls, then you may be = running into the page rounding of the .text and .data sections... Warner From owner-svn-src-head@FreeBSD.ORG Fri May 11 20:37:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AA591106564A for ; Fri, 11 May 2012 20:37:51 +0000 (UTC) (envelope-from bounces+73574-9504-svn-src-head=freebsd.org@sendgrid.me) Received: from o3.shared.sendgrid.net (o3.shared.sendgrid.net [208.117.48.85]) by mx1.freebsd.org (Postfix) with SMTP id 3C9AA8FC14 for ; Fri, 11 May 2012 20:37:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h= message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; s=smtpapi; bh=TmySVd5pe/UddOiZl38fL3byYow=; b=XbNxvvaudptOL6ZryNArdmwem+FD W8o8s2K0JLAJJBuJzXeLrinJjljl9CXSfLHH1G72gaNv8tjs/GkmZNRU8qAGx5oT yLstiEJLllpube57mO2XHCLP1kGCDN8Kjfo/skyAw6nfhEIvclrcg3r8ViIhi7ox 7vTToLHImPORPBc= Received: by 10.41.149.114 with SMTP id f04-11.7015.4FAD78974 Fri, 11 May 2012 20:37:43 +0000 (UTC) Received: from mail.tarsnap.com (unknown [10.8.49.124]) by mi4 (SG) with ESMTP id 4fad7897.462b.17290b8 for ; Fri, 11 May 2012 15:37:43 -0500 (CST) Received: (qmail 27270 invoked from network); 11 May 2012 20:31:00 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by mail.tarsnap.com with ESMTP; 11 May 2012 20:31:00 -0000 Received: (qmail 2790 invoked from network); 11 May 2012 20:37:06 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 11 May 2012 20:37:06 -0000 Message-ID: <4FAD7872.7030503@freebsd.org> Date: Fri, 11 May 2012 13:37:06 -0700 From: Colin Percival User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120509 Thunderbird/12.0.1 MIME-Version: 1.0 To: Warner Losh References: <201205111237.q4BCbGX2083596@svn.freebsd.org> <20120511124820.GN2358@deviant.kiev.zoral.com.ua> <4FAD0DF4.9000609@freebsd.org> <36CFD0BA-5047-42C5-9FE5-5D057CEFBAD9@bsdimp.com> In-Reply-To: <36CFD0BA-5047-42C5-9FE5-5D057CEFBAD9@bsdimp.com> X-Enigmail-Version: 1.5pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Sendgrid-EID: EvYvoie/qnEezyq2t4eRKjDm9X7ZKbCMt75WvXA+XNFrEDFqK6JGqTfxq5Sr4RxzWgIQ+H56Lbp0y2KE/j8tAZVZCm94Cq9BEhVO/Q15VZ+LAnz509Utnuewk3N1HuYaoxmmxhAXF5XvybXegRc5cXlk015VH4lxUm2xmWcU9A0= Cc: Konstantin Belousov , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Gabor Kovesdan Subject: Re: svn commit: r235267 - in head/usr.bin/sort: . nls X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 20:37:51 -0000 On 05/11/12 13:08, Warner Losh wrote: > On May 11, 2012, at 9:02 AM, Colin Percival wrote: >> On 05/11/12 05:48, Konstantin Belousov wrote: >>> On Fri, May 11, 2012 at 12:37:16PM +0000, Gabor Kovesdan wrote: >>>> +bool byte_sort = false; + +static wchar_t **wmonths = NULL; +static >>>> unsigned char **cmonths = NULL; >>> >>> Such initializations are useless. You only increase the size of the binary >>> on the disk as the consequence. >> >> I just tested this hypothesis, and found no change in binary size using >> either clang or gcc46. Presumably they're smart enough to ignore explicit >> (and unnecessary) initializations of statics to zero. > > How did you test this? size(1) or ls(1)? If ls, then you may be running into the page rounding of the .text and .data sections... size(1), ls(1)-before-strip(1), and ls(1)-after-strip(1). -- Colin Percival Security Officer, FreeBSD | freebsd.org | The power to serve Founder / author, Tarsnap | tarsnap.com | Online backups for the truly paranoid From owner-svn-src-head@FreeBSD.ORG Fri May 11 20:53:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0BB1106564A; Fri, 11 May 2012 20:53:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C86048FC0C; Fri, 11 May 2012 20:53:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BKrKQI099961; Fri, 11 May 2012 20:53:20 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BKrKvK099952; Fri, 11 May 2012 20:53:20 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201205112053.q4BKrKvK099952@svn.freebsd.org> From: Adrian Chadd Date: Fri, 11 May 2012 20:53: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: r235288 - in head/sys/dev/etherswitch: . arswitch rtl8366 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 20:53:21 -0000 Author: adrian Date: Fri May 11 20:53:20 2012 New Revision: 235288 URL: http://svn.freebsd.org/changeset/base/235288 Log: Commit the first pass of the etherswitch support. This is designed to support the very basic ethernet switch chip behaviour, specifically: * accessing switch register space; * accessing per-PHY registers (for switches that actually expose PHYs); * basic vlan group support, which applies for the rtl8366 driver but not for the atheros switches. This also includes initial support for: * rtl8366rb support - which is a 10/100/1000 switch which supports vlan groups; * Initial Atheros AR8316 switch support - which is a 10/100/1000 switch which supports an alternate vlan configuration (so the vlan group methods are stubbed.) The general idea here is that the switch driver may speak to a variety of backend busses (mdio, i2c, spi, whatever) and expose: * If applicable, one or more MDIO busses which ethernet interfaces can then attach PHYs to via miiproxy/mdioproxy; * exposes miibusses, one for each port at the moment, so .. * .. a PHY can be exposed on each miibus, for each switch port, with all of the existing MII/ifnet framework. However: * The ifnet is manually created for now, and it isn't linked into the interface list, nor can you (currently) send/receive frames on this ifnet. At some point in the future there may be _some_ support for this, for switches with a multi-port, isolated mode. * I'm still in the process of sorting out correct(er) locking. TODO: * ray's switch code in zrouter (zrouter.org) includes a much more developed newbus API that covers the various switch methods, as well as a capability API so drivers, the switch layer and the userland utility can properly control the subset of supported features. The plan is to sort that out later, once the rest of ray's switch drivers are brought over and extended to export MII busses and PHYs. Submitted by: Stefan Bethke Reviewed by: ray Added: head/sys/dev/etherswitch/arswitch/ head/sys/dev/etherswitch/arswitch/arswitch.c (contents, props changed) head/sys/dev/etherswitch/arswitch/arswitch_8216.c (contents, props changed) head/sys/dev/etherswitch/arswitch/arswitch_8216.h (contents, props changed) head/sys/dev/etherswitch/arswitch/arswitch_8226.c (contents, props changed) head/sys/dev/etherswitch/arswitch/arswitch_8226.h (contents, props changed) head/sys/dev/etherswitch/arswitch/arswitch_8316.c (contents, props changed) head/sys/dev/etherswitch/arswitch/arswitch_8316.h (contents, props changed) head/sys/dev/etherswitch/arswitch/arswitch_phy.c (contents, props changed) head/sys/dev/etherswitch/arswitch/arswitch_phy.h (contents, props changed) head/sys/dev/etherswitch/arswitch/arswitch_reg.c (contents, props changed) head/sys/dev/etherswitch/arswitch/arswitch_reg.h (contents, props changed) head/sys/dev/etherswitch/arswitch/arswitchreg.h (contents, props changed) head/sys/dev/etherswitch/arswitch/arswitchvar.h (contents, props changed) head/sys/dev/etherswitch/etherswitch.c (contents, props changed) head/sys/dev/etherswitch/etherswitch.h (contents, props changed) head/sys/dev/etherswitch/etherswitch_if.m (contents, props changed) head/sys/dev/etherswitch/rtl8366/ head/sys/dev/etherswitch/rtl8366/rtl8366rb.c (contents, props changed) head/sys/dev/etherswitch/rtl8366/rtl8366rbvar.h (contents, props changed) Added: head/sys/dev/etherswitch/arswitch/arswitch.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/etherswitch/arswitch/arswitch.c Fri May 11 20:53:20 2012 (r235288) @@ -0,0 +1,557 @@ +/*- + * Copyright (c) 2011-2012 Stefan Bethke. + * Copyright (c) 2012 Adrian Chadd. + * 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$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include +#include +#include + +#include "mdio_if.h" +#include "miibus_if.h" +#include "etherswitch_if.h" + +#if defined(DEBUG) +static SYSCTL_NODE(_debug, OID_AUTO, arswitch, CTLFLAG_RD, 0, "arswitch"); +#endif + +static inline int arswitch_portforphy(int phy); +static void arswitch_tick(void *arg); +static int arswitch_ifmedia_upd(struct ifnet *); +static void arswitch_ifmedia_sts(struct ifnet *, struct ifmediareq *); + +static void +arswitch_identify(driver_t *driver, device_t parent) +{ + device_t child; + + if (device_find_child(parent, driver->name, -1) == NULL) { + child = BUS_ADD_CHILD(parent, 0, driver->name, -1); + } +} + +static int +arswitch_probe(device_t dev) +{ + struct arswitch_softc *sc; + uint32_t id; + char *chipname, desc[256]; + + sc = device_get_softc(dev); + bzero(sc, sizeof(*sc)); + sc->page = -1; + id = arswitch_readreg(dev, AR8X16_REG_MASK_CTRL); + switch ((id & AR8X16_MASK_CTRL_VER_MASK) >> + AR8X16_MASK_CTRL_VER_SHIFT) { + case 1: + chipname = "AR8216"; + sc->sc_switchtype = AR8X16_SWITCH_AR8216; + break; + case 2: + chipname = "AR8226"; + sc->sc_switchtype = AR8X16_SWITCH_AR8226; + break; + case 16: + chipname = "AR8316"; + sc->sc_switchtype = AR8X16_SWITCH_AR8316; + break; + default: + chipname = NULL; + } + DPRINTF(dev, "chipname=%s, rev=%02x\n", chipname, + id & AR8X16_MASK_CTRL_REV_MASK); + if (chipname != NULL) { + snprintf(desc, sizeof(desc), + "Atheros %s Ethernet Switch", + chipname); + device_set_desc_copy(dev, desc); + return (BUS_PROBE_DEFAULT); + } + return (ENXIO); +} + +static int +arswitch_attach_phys(struct arswitch_softc *sc) +{ + int phy, err = 0; + char name[IFNAMSIZ]; + + /* PHYs need an interface, so we generate a dummy one */ + snprintf(name, IFNAMSIZ, "%sport", device_get_nameunit(sc->sc_dev)); + for (phy = 0; phy < sc->numphys; phy++) { + sc->ifp[phy] = if_alloc(IFT_ETHER); + sc->ifp[phy]->if_softc = sc; + sc->ifp[phy]->if_flags |= IFF_UP | IFF_BROADCAST | + IFF_DRV_RUNNING | IFF_SIMPLEX; + sc->ifname[phy] = malloc(strlen(name)+1, M_DEVBUF, M_WAITOK); + bcopy(name, sc->ifname[phy], strlen(name)+1); + if_initname(sc->ifp[phy], sc->ifname[phy], + arswitch_portforphy(phy)); + err = mii_attach(sc->sc_dev, &sc->miibus[phy], sc->ifp[phy], + arswitch_ifmedia_upd, arswitch_ifmedia_sts, \ + BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, 0); + DPRINTF(sc->sc_dev, "%s attached to pseudo interface %s\n", + device_get_nameunit(sc->miibus[phy]), + sc->ifp[phy]->if_xname); + if (err != 0) { + device_printf(sc->sc_dev, + "attaching PHY %d failed\n", + phy); + } + } + return (err); +} + +static int +arswitch_attach(device_t dev) +{ + struct arswitch_softc *sc; + int err = 0; + + sc = device_get_softc(dev); + + /* sc->sc_switchtype is already decided in arswitch_probe() */ + sc->sc_dev = dev; + mtx_init(&sc->sc_mtx, "arswitch", NULL, MTX_DEF); + sc->page = -1; + strlcpy(sc->info.es_name, device_get_desc(dev), + sizeof(sc->info.es_name)); + + /* + * Attach switch related functions + */ + if (AR8X16_IS_SWITCH(sc, AR8216)) + ar8216_attach(sc); + else if (AR8X16_IS_SWITCH(sc, AR8226)) + ar8226_attach(sc); + else if (AR8X16_IS_SWITCH(sc, AR8316)) + ar8316_attach(sc); + else + return (ENXIO); + + /* + * XXX these two should be part of the switch attach function + */ + sc->info.es_nports = 5; /* XXX technically 6, but 6th not used */ + sc->info.es_nvlangroups = 16; + + /* XXX Defaults for externally connected AR8316 */ + sc->numphys = 4; + sc->phy4cpu = 1; + sc->is_rgmii = 1; + sc->is_gmii = 0; + + (void) resource_int_value(device_get_name(dev), device_get_unit(dev), + "numphys", &sc->numphys); + (void) resource_int_value(device_get_name(dev), device_get_unit(dev), + "phy4cpu", &sc->phy4cpu); + (void) resource_int_value(device_get_name(dev), device_get_unit(dev), + "is_rgmii", &sc->is_rgmii); + (void) resource_int_value(device_get_name(dev), device_get_unit(dev), + "is_gmii", &sc->is_gmii); + +#ifdef NOTYET + arswitch_writereg(dev, AR8X16_REG_MASK_CTRL, + AR8X16_MASK_CTRL_SOFT_RESET); + DELAY(1000); + if (arswitch_readreg(dev, AR8X16_REG_MASK_CTRL) & + AR8X16_MASK_CTRL_SOFT_RESET) { + device_printf(dev, "unable to reset switch\n"); + return (ENXIO); + } + arswitch_modifyreg(dev, AR8X16_REG_GLOBAL_CTRL, + AR8X16_FLOOD_MASK_BCAST_TO_CPU, + AR8X16_FLOOD_MASK_BCAST_TO_CPU); +#endif + + err = sc->hal.arswitch_hw_setup(sc); + if (err != 0) + return (err); + + err = sc->hal.arswitch_hw_global_setup(sc); + if (err != 0) + return (err); + + /* + * Attach the PHYs and complete the bus enumeration. + */ + err = arswitch_attach_phys(sc); + if (err != 0) + return (err); + + bus_generic_probe(dev); + bus_enumerate_hinted_children(dev); + err = bus_generic_attach(dev); + if (err != 0) + return (err); + + callout_init_mtx(&sc->callout_tick, &sc->sc_mtx, 0); + arswitch_tick(sc); + + return (err); +} + +static int +arswitch_detach(device_t dev) +{ + struct arswitch_softc *sc = device_get_softc(dev); + int i; + + callout_drain(&sc->callout_tick); + + for (i=0; i < sc->numphys; i++) { + if (sc->miibus[i] != NULL) + device_delete_child(dev, sc->miibus[i]); + if (sc->ifp[i] != NULL) + if_free(sc->ifp[i]); + free(sc->ifname[i], M_DEVBUF); + } + + bus_generic_detach(dev); + mtx_destroy(&sc->sc_mtx); + + return (0); +} + +/* + * Convert PHY number to port number. PHY0 is connected to port 1, PHY1 to + * port 2, etc. + */ +static inline int +arswitch_portforphy(int phy) +{ + return (phy+1); +} + +static inline struct mii_data * +arswitch_miiforport(struct arswitch_softc *sc, int port) +{ + int phy = port-1; + + if (phy < 0 || phy >= sc->numphys) + return (NULL); + return (device_get_softc(sc->miibus[phy])); +} + +static inline struct ifnet * +arswitch_ifpforport(struct arswitch_softc *sc, int port) +{ + int phy = port-1; + + if (phy < 0 || phy >= sc->numphys) + return (NULL); + return (sc->ifp[phy]); +} + +/* + * Convert port status to ifmedia. + */ +static void +arswitch_update_ifmedia(int portstatus, u_int *media_status, u_int *media_active) +{ + *media_active = IFM_ETHER; + *media_status = IFM_AVALID; + + if ((portstatus & AR8X16_PORT_STS_LINK_UP) != 0) + *media_status |= IFM_ACTIVE; + else { + *media_active |= IFM_NONE; + return; + } + switch (portstatus & AR8X16_PORT_STS_SPEED_MASK) { + case AR8X16_PORT_STS_SPEED_10: + *media_active |= IFM_10_T; + break; + case AR8X16_PORT_STS_SPEED_100: + *media_active |= IFM_100_TX; + break; + case AR8X16_PORT_STS_SPEED_1000: + *media_active |= IFM_1000_T; + break; + } + if ((portstatus & AR8X16_PORT_STS_DUPLEX) == 0) + *media_active |= IFM_FDX; + else + *media_active |= IFM_HDX; + if ((portstatus & AR8X16_PORT_STS_TXFLOW) != 0) + *media_active |= IFM_ETH_TXPAUSE; + if ((portstatus & AR8X16_PORT_STS_RXFLOW) != 0) + *media_active |= IFM_ETH_RXPAUSE; +} + +/* + * Poll the status for all PHYs. We're using the switch port status because + * thats a lot quicker to read than talking to all the PHYs. Care must be + * taken that the resulting ifmedia_active is identical to what the PHY will + * compute, or gratuitous link status changes will occur whenever the PHYs + * update function is called. + */ +static void +arswitch_miipollstat(struct arswitch_softc *sc) +{ + int i; + struct mii_data *mii; + struct mii_softc *miisc; + int portstatus; + + for (i = 0; i < sc->numphys; i++) { + if (sc->miibus[i] == NULL) + continue; + mii = device_get_softc(sc->miibus[i]); + portstatus = arswitch_readreg(sc->sc_dev, + AR8X16_REG_PORT_STS(arswitch_portforphy(i))); +#if 0 + DPRINTF(sc->sc_dev, "p[%d]=%b\n", + arge_portforphy(i), + portstatus, + "\20\3TXMAC\4RXMAC\5TXFLOW\6RXFLOW\7" + "DUPLEX\11LINK_UP\12LINK_AUTO\13LINK_PAUSE"); +#endif + arswitch_update_ifmedia(portstatus, &mii->mii_media_status, + &mii->mii_media_active); + LIST_FOREACH(miisc, &mii->mii_phys, mii_list) { + if (IFM_INST(mii->mii_media.ifm_cur->ifm_media) != + miisc->mii_inst) + continue; + mii_phy_update(miisc, MII_POLLSTAT); + } + } +} + +static void +arswitch_tick(void *arg) +{ + struct arswitch_softc *sc = arg; + + arswitch_miipollstat(sc); + callout_reset(&sc->callout_tick, hz, arswitch_tick, sc); +} + +static etherswitch_info_t * +arswitch_getinfo(device_t dev) +{ + struct arswitch_softc *sc = device_get_softc(dev); + + return (&sc->info); +} + +static int +arswitch_getport(device_t dev, etherswitch_port_t *p) +{ + struct arswitch_softc *sc = device_get_softc(dev); + struct mii_data *mii; + struct ifmediareq *ifmr = &p->es_ifmr; + int err; + + if (p->es_port < 0 || p->es_port >= AR8X16_NUM_PORTS) + return (ENXIO); + p->es_vlangroup = 0; + + mii = arswitch_miiforport(sc, p->es_port); + if (p->es_port == 0) { + /* fill in fixed values for CPU port */ + ifmr->ifm_count = 0; + ifmr->ifm_current = ifmr->ifm_active = + IFM_ETHER | IFM_1000_T | IFM_FDX; + ifmr->ifm_mask = 0; + ifmr->ifm_status = IFM_ACTIVE | IFM_AVALID; + } else if (mii != NULL) { + err = ifmedia_ioctl(mii->mii_ifp, &p->es_ifr, + &mii->mii_media, SIOCGIFMEDIA); + if (err) + return (err); + } else { + return (ENXIO); + } + return (0); +} + +/* + * XXX doesn't yet work? + */ +static int +arswitch_setport(device_t dev, etherswitch_port_t *p) +{ + int err; + struct arswitch_softc *sc; + struct ifmedia *ifm; + struct mii_data *mii; + struct ifnet *ifp; + + /* + * XXX check the sc numphys, or the #define ? + */ + if (p->es_port < 0 || p->es_port >= AR8X16_NUM_PHYS) + return (ENXIO); + + sc = device_get_softc(dev); + + /* + * XXX TODO: don't set the CPU port? + */ + + mii = arswitch_miiforport(sc, p->es_port); + if (mii == NULL) + return (ENXIO); + + ifp = arswitch_ifpforport(sc, p->es_port); + + ifm = &mii->mii_media; + err = ifmedia_ioctl(ifp, &p->es_ifr, ifm, SIOCSIFMEDIA); + return (err); +} + +static int +arswitch_getvgroup(device_t dev, etherswitch_vlangroup_t *vg) +{ + + /* XXX not implemented yet */ + vg->es_vid = 0; + vg->es_member_ports = 0; + vg->es_untagged_ports = 0; + vg->es_fid = 0; + return (0); +} + +static int +arswitch_setvgroup(device_t dev, etherswitch_vlangroup_t *vg) +{ + + /* XXX not implemented yet */ + return (0); +} + +static void +arswitch_statchg(device_t dev) +{ + + DPRINTF(dev, "%s\n", __func__); +} + +static int +arswitch_ifmedia_upd(struct ifnet *ifp) +{ + struct arswitch_softc *sc = ifp->if_softc; + struct mii_data *mii = arswitch_miiforport(sc, ifp->if_dunit); + + if (mii == NULL) + return (ENXIO); + mii_mediachg(mii); + return (0); +} + +static void +arswitch_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) +{ + struct arswitch_softc *sc = ifp->if_softc; + struct mii_data *mii = arswitch_miiforport(sc, ifp->if_dunit); + + DPRINTF(sc->sc_dev, "%s\n", __func__); + + if (mii == NULL) + return; + mii_pollstat(mii); + ifmr->ifm_active = mii->mii_media_active; + ifmr->ifm_status = mii->mii_media_status; +} + +static device_method_t arswitch_methods[] = { + /* Device interface */ + DEVMETHOD(device_identify, arswitch_identify), + DEVMETHOD(device_probe, arswitch_probe), + DEVMETHOD(device_attach, arswitch_attach), + DEVMETHOD(device_detach, arswitch_detach), + + /* bus interface */ + DEVMETHOD(bus_add_child, device_add_child_ordered), + + /* MII interface */ + DEVMETHOD(miibus_readreg, arswitch_readphy), + DEVMETHOD(miibus_writereg, arswitch_writephy), + DEVMETHOD(miibus_statchg, arswitch_statchg), + + /* MDIO interface */ + DEVMETHOD(mdio_readreg, arswitch_readphy), + DEVMETHOD(mdio_writereg, arswitch_writephy), + + /* etherswitch interface */ + DEVMETHOD(etherswitch_getinfo, arswitch_getinfo), + DEVMETHOD(etherswitch_readreg, arswitch_readreg), + DEVMETHOD(etherswitch_writereg, arswitch_writereg), + DEVMETHOD(etherswitch_readphyreg, arswitch_readphy), + DEVMETHOD(etherswitch_writephyreg, arswitch_writephy), + DEVMETHOD(etherswitch_getport, arswitch_getport), + DEVMETHOD(etherswitch_setport, arswitch_setport), + DEVMETHOD(etherswitch_getvgroup, arswitch_getvgroup), + DEVMETHOD(etherswitch_setvgroup, arswitch_setvgroup), + + DEVMETHOD_END +}; + +DEFINE_CLASS_0(arswitch, arswitch_driver, arswitch_methods, + sizeof(struct arswitch_softc)); +static devclass_t arswitch_devclass; + +DRIVER_MODULE(arswitch, mdio, arswitch_driver, arswitch_devclass, 0, 0); +DRIVER_MODULE(miibus, arswitch, miibus_driver, miibus_devclass, 0, 0); +DRIVER_MODULE(mdio, arswitch, mdio_driver, mdio_devclass, 0, 0); +DRIVER_MODULE(etherswitch, arswitch, etherswitch_driver, etherswitch_devclass, 0, 0); +MODULE_VERSION(arswitch, 1); +MODULE_DEPEND(arswitch, miibus, 1, 1, 1); /* XXX which versions? */ +MODULE_DEPEND(arswitch, etherswitch, 1, 1, 1); /* XXX which versions? */ Added: head/sys/dev/etherswitch/arswitch/arswitch_8216.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/etherswitch/arswitch/arswitch_8216.c Fri May 11 20:53:20 2012 (r235288) @@ -0,0 +1,92 @@ +/*- + * Copyright (c) 2011-2012 Stefan Bethke. + * Copyright (c) 2012 Adrian Chadd. + * 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$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include "mdio_if.h" +#include "miibus_if.h" +#include "etherswitch_if.h" + +/* + * AR8216 specific functions + */ +static int +ar8216_hw_setup(struct arswitch_softc *sc) +{ + + return (0); +} + +/* + * Initialise other global values, for the AR8216. + */ +static int +ar8216_hw_global_setup(struct arswitch_softc *sc) +{ + + return (0); +} + +void +ar8216_attach(struct arswitch_softc *sc) +{ + + sc->hal.arswitch_hw_setup = ar8216_hw_setup; + sc->hal.arswitch_hw_global_setup = ar8216_hw_global_setup; +} Added: head/sys/dev/etherswitch/arswitch/arswitch_8216.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/etherswitch/arswitch/arswitch_8216.h Fri May 11 20:53:20 2012 (r235288) @@ -0,0 +1,34 @@ +/*- + * Copyright (c) 2011-2012 Stefan Bethke. + * 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$ + */ +#ifndef __ARSWITCH_8216_H__ +#define __ARSWITCH_8216_H__ + +extern void ar8216_attach(struct arswitch_softc *sc); + +#endif /* __ARSWITCH_8216_H__ */ + Added: head/sys/dev/etherswitch/arswitch/arswitch_8226.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/etherswitch/arswitch/arswitch_8226.c Fri May 11 20:53:20 2012 (r235288) @@ -0,0 +1,92 @@ +/*- + * Copyright (c) 2011-2012 Stefan Bethke. + * Copyright (c) 2012 Adrian Chadd. + * 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$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include "mdio_if.h" +#include "miibus_if.h" +#include "etherswitch_if.h" + +/* + * AR8226 specific functions + */ +static int +ar8226_hw_setup(struct arswitch_softc *sc) +{ + + return (0); +} + +/* + * Initialise other global values, for the AR8226. + */ +static int +ar8226_hw_global_setup(struct arswitch_softc *sc) +{ + + return (0); +} + +void +ar8226_attach(struct arswitch_softc *sc) +{ + + sc->hal.arswitch_hw_setup = ar8226_hw_setup; + sc->hal.arswitch_hw_global_setup = ar8226_hw_global_setup; +} Added: head/sys/dev/etherswitch/arswitch/arswitch_8226.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/etherswitch/arswitch/arswitch_8226.h Fri May 11 20:53:20 2012 (r235288) @@ -0,0 +1,34 @@ +/*- + * Copyright (c) 2011-2012 Stefan Bethke. + * 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$ + */ +#ifndef __ARSWITCH_8226_H__ +#define __ARSWITCH_8226_H__ + +extern void ar8226_attach(struct arswitch_softc *sc); + +#endif /* __ARSWITCH_8226_H__ */ + Added: head/sys/dev/etherswitch/arswitch/arswitch_8316.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/etherswitch/arswitch/arswitch_8316.c Fri May 11 20:53:20 2012 (r235288) @@ -0,0 +1,144 @@ +/*- + * Copyright (c) 2011-2012 Stefan Bethke. + * Copyright (c) 2012 Adrian Chadd. + * 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$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include "mdio_if.h" +#include "miibus_if.h" +#include "etherswitch_if.h" + +/* + * AR8316 specific functions + */ +static int +ar8316_hw_setup(struct arswitch_softc *sc) +{ + + /* + * Configure the switch mode based on whether: + * + * + The switch port is GMII/RGMII; + * + Port 4 is either connected to the CPU or to the internal switch. + */ + if (sc->is_rgmii && sc->phy4cpu) { + arswitch_writereg(sc->sc_dev, AR8X16_REG_MODE, + AR8X16_MODE_RGMII_PORT4_ISO); + device_printf(sc->sc_dev, + "%s: MAC port == RGMII, port 4 = dedicated PHY\n", + __func__); + } else if (sc->is_rgmii) { + arswitch_writereg(sc->sc_dev, AR8X16_REG_MODE, + AR8X16_MODE_RGMII_PORT4_SWITCH); + device_printf(sc->sc_dev, + "%s: MAC port == RGMII, port 4 = switch port\n", + __func__); + } else if (sc->is_gmii) { + arswitch_writereg(sc->sc_dev, AR8X16_REG_MODE, + AR8X16_MODE_GMII); + device_printf(sc->sc_dev, "%s: MAC port == GMII\n", __func__); + } else { + device_printf(sc->sc_dev, "%s: unknown switch PHY config\n", + __func__); + return (ENXIO); + } + + DELAY(1000); /* 1ms wait for things to settle */ + + /* + * If port 4 is RGMII, force workaround + */ + if (sc->is_rgmii && sc->phy4cpu) { + device_printf(sc->sc_dev, + "%s: port 4 RGMII workaround\n", + __func__); + + /* work around for phy4 rgmii mode */ + arswitch_writedbg(sc->sc_dev, 4, 0x12, 0x480c); + /* rx delay */ + arswitch_writedbg(sc->sc_dev, 4, 0x0, 0x824e); + /* tx delay */ + arswitch_writedbg(sc->sc_dev, 4, 0x5, 0x3d47); + DELAY(1000); /* 1ms, again to let things settle */ + } + + return (0); +} + +/* + * Initialise other global values, for the AR8316. + */ +static int +ar8316_hw_global_setup(struct arswitch_softc *sc) +{ + + arswitch_writereg(sc->sc_dev, 0x38, 0xc000050e); + arswitch_writereg(sc->sc_dev, AR8X16_REG_FLOOD_MASK, 0x003f003f); + arswitch_modifyreg(sc->sc_dev, AR8X16_REG_GLOBAL_CTRL, + AR8316_GLOBAL_CTRL_MTU_MASK, 9018 + 8 + 2); + + return (0); +} + +void +ar8316_attach(struct arswitch_softc *sc) +{ + + sc->hal.arswitch_hw_setup = ar8316_hw_setup; + sc->hal.arswitch_hw_global_setup = ar8316_hw_global_setup; +} Added: head/sys/dev/etherswitch/arswitch/arswitch_8316.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/etherswitch/arswitch/arswitch_8316.h Fri May 11 20:53:20 2012 (r235288) @@ -0,0 +1,34 @@ +/*- + * Copyright (c) 2011-2012 Stefan Bethke. + * 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$ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Fri May 11 20:56:04 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ECEAD1065670; Fri, 11 May 2012 20:56:04 +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 D63A38FC08; Fri, 11 May 2012 20:56:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BKu4Ej000209; Fri, 11 May 2012 20:56:04 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BKu4x2000203; Fri, 11 May 2012 20:56:04 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201205112056.q4BKu4x2000203@svn.freebsd.org> From: Adrian Chadd Date: Fri, 11 May 2012 20:56: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: r235289 - in head/sbin: . etherswitchcfg X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 20:56:05 -0000 Author: adrian Date: Fri May 11 20:56:04 2012 New Revision: 235289 URL: http://svn.freebsd.org/changeset/base/235289 Log: Add etherswitchcfg. Submitted by: Stefan Bethke Added: head/sbin/etherswitchcfg/ head/sbin/etherswitchcfg/Makefile (contents, props changed) head/sbin/etherswitchcfg/etherswitchcfg.8 (contents, props changed) head/sbin/etherswitchcfg/etherswitchcfg.c (contents, props changed) head/sbin/etherswitchcfg/ifmedia.c (contents, props changed) Modified: head/sbin/Makefile Modified: head/sbin/Makefile ============================================================================== --- head/sbin/Makefile Fri May 11 20:53:20 2012 (r235288) +++ head/sbin/Makefile Fri May 11 20:56:04 2012 (r235289) @@ -20,6 +20,7 @@ SUBDIR=adjkerntz \ dump \ dumpfs \ dumpon \ + etherswitchcfg \ ffsinfo \ fsck \ fsck_ffs \ Added: head/sbin/etherswitchcfg/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/etherswitchcfg/Makefile Fri May 11 20:56:04 2012 (r235289) @@ -0,0 +1,9 @@ +# @(#)Makefile 5.4 (Berkeley) 6/5/91 +# $FreeBSD$ + +PROG= etherswitchcfg +MAN= etherswitchcfg.8 +SRCS= etherswitchcfg.c ifmedia.c +CFLAGS+= -I${.CURDIR}/../../sys + +.include Added: head/sbin/etherswitchcfg/etherswitchcfg.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/etherswitchcfg/etherswitchcfg.8 Fri May 11 20:56:04 2012 (r235289) @@ -0,0 +1,114 @@ +.\" $FreeBSD$ +.Dd December 15, 2011 +.Dt ETHERSWITCHCFG 8 +.Os +.Sh NAME +.Nm etherswitchcfg +.Nd configure a built-in Ethernet switch +.Sh SYNOPSIS +.Nm +.Op Fl "f control file" +.Ar info +.Nm +.Op Fl "f control file" +.Ar phy +.Ar phy.register[=value] +.Nm +.Op Fl "f control file" +.Ar port%d +.Ar command parameter +.Nm +.Op Fl "f control file" +.Ar reg +.Ar register[=value] +.Nm +.Op Fl "f control file" +.Ar vlangroup%d +.Ar command parameter +.Sh DESCRIPTION +The +.Nm +utility is used to configure an Ethernet switch built into the system. +.Nm +accepts a number of options: +.Bl -tag -width ".Fl f" -compact +.It Fl "f control file" +Specifies the +.Xr etherswitch 4 +control file that represents the switch to be configured. +It defaults to +.Li /dev/etherswitch0 . +.It Fl m +When reporting port information, also list available media options for +that port. +.It Fl v +Produce more verbose output. +Without this flag, lines that represent inactive or empty configuration +options are omitted. +.El +.Ss phy +The phy command provides access to the registers of the PHYs attached +to or integrated into the switch controller. +PHY registers are specified as phy.register, +where +.Ar phy +is usually the port number, and +.Ar register +is the register number. +Both can be provided as decimal, octal or hexadecimal numbers in any of the formats +understood by +.Xr strtol 4 . +To set the register value, use the form instance.register=value. +.Ss port +The port command selects one of the ports of the switch. +It supports the following commands: +.Bl -tag -width ".Ar vlangroup number" -compact +.It Ar vlangroup number +Sets the VLAN group number that is used to process incoming frames that are not tagged. +.It Ar media mediaspec +Specifies the physical media configuration to be configured for a port. +.It Ar mediaopt mediaoption +Specifies a list of media options for a port. See +.Xr ifconfig 8 +for details on +.Ar media and +.Ar mediaopt . +.El +.Ss reg +The reg command provides access to the registers of the switch controller. +.Ss vlangroup +The vlangroup command selects one of the VLAN groups for configuration. +It supports the following commands: +.Bl -tag -width ".Ar vlangroup" -compact +.It Ar vlan VID +Sets the VLAN ID (802.1q VID) for this VLAN group. +Frames transmitted on tagged member ports of this group will be tagged +with this VID. +Incoming frames carrying this tag will be forwarded according to the +configuration of this VLAN group. +.It Ar members port,... +Configures which ports are to be a member of this VLAN group. +The port numbers are given as a comma-separated list. +Each port can optionally be followed by +.Dq t +to indicate that frames on this port are tagged. +.El +.Sh FILES +.Bl -tag -width /dev/etherswitch? -compact +.It Pa /dev/etherswitch? +Control file for the ethernet switch driver. +.El +.Sh EXAMPLES +Configure VLAN group 1 with a VID of 2 and makes ports 0 and 5 members, +while excluding all other ports. +Port 5 will send and receive tagged frames, while port 0 will be untagged. +Incoming untagged frames on port 0 are assigned to vlangroup1. +.Dl # etherswitchcfg vlangroup1 vlan 2 members 0,5t port0 vlangroup 1 +.Sh SEE ALSO +.Xr etherswitch 4 +.Sh HISTORY +.Nm +first appeared in +.Fx 10.0 . +.Sh AUTHORS +.An Stefan Bethke Added: head/sbin/etherswitchcfg/etherswitchcfg.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/etherswitchcfg/etherswitchcfg.c Fri May 11 20:56:04 2012 (r235289) @@ -0,0 +1,511 @@ +/*- + * Copyright (c) 2011-2012 Stefan Bethke. + * 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$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int get_media_subtype(int, const char *); +int get_media_mode(int, const char *); +int get_media_options(int, const char *); +int lookup_media_word(struct ifmedia_description *, const char *); +void print_media_word(int, int); +void print_media_word_ifconfig(int); + +/* some constants */ +#define IEEE802DOT1Q_VID_MAX 4094 +#define IFMEDIAREQ_NULISTENTRIES 256 + +enum cmdmode { + MODE_NONE = 0, + MODE_PORT, + MODE_VLANGROUP, + MODE_REGISTER, + MODE_PHYREG +}; + +struct cfg { + int fd; + int verbose; + int mediatypes; + const char *controlfile; + etherswitch_info_t info; + enum cmdmode mode; + int unit; +}; + +struct cmds { + enum cmdmode mode; + const char *name; + int args; + void (*f)(struct cfg *, char *argv[]); +}; +struct cmds cmds[]; + + +static void usage(void); + +static int +read_register(struct cfg *cfg, int r) +{ + struct etherswitch_reg er; + + er.reg = r; + if (ioctl(cfg->fd, IOETHERSWITCHGETREG, &er) != 0) + err(EX_OSERR, "ioctl(IOETHERSWITCHGETREG)"); + return (er.val); +} + +static void +write_register(struct cfg *cfg, int r, int v) +{ + struct etherswitch_reg er; + + er.reg = r; + er.val = v; + if (ioctl(cfg->fd, IOETHERSWITCHSETREG, &er) != 0) + err(EX_OSERR, "ioctl(IOETHERSWITCHSETREG)"); +} + +static int +read_phyregister(struct cfg *cfg, int phy, int reg) +{ + struct etherswitch_phyreg er; + + er.phy = phy; + er.reg = reg; + if (ioctl(cfg->fd, IOETHERSWITCHGETPHYREG, &er) != 0) + err(EX_OSERR, "ioctl(IOETHERSWITCHGETPHYREG)"); + return (er.val); +} + +static void +write_phyregister(struct cfg *cfg, int phy, int reg, int val) +{ + struct etherswitch_phyreg er; + + er.phy = phy; + er.reg = reg; + er.val = val; + if (ioctl(cfg->fd, IOETHERSWITCHSETPHYREG, &er) != 0) + err(EX_OSERR, "ioctl(IOETHERSWITCHSETPHYREG)"); +} + +static void +set_port_vlangroup(struct cfg *cfg, char *argv[]) +{ + int v; + etherswitch_port_t p; + + v = strtol(argv[1], NULL, 0); + if (v < 0 || v >= cfg->info.es_nvlangroups) + errx(EX_USAGE, "vlangroup must be between 0 and %d", cfg->info.es_nvlangroups-1); + p.es_port = cfg->unit; + if (ioctl(cfg->fd, IOETHERSWITCHGETPORT, &p) != 0) + err(EX_OSERR, "ioctl(IOETHERSWITCHGETPORT)"); + p.es_vlangroup = v; + if (ioctl(cfg->fd, IOETHERSWITCHSETPORT, &p) != 0) + err(EX_OSERR, "ioctl(IOETHERSWITCHSETPORT)"); +} + +static void +set_port_media(struct cfg *cfg, char *argv[]) +{ + etherswitch_port_t p; + int ifm_ulist[IFMEDIAREQ_NULISTENTRIES]; + int subtype; + + bzero(&p, sizeof(p)); + p.es_port = cfg->unit; + p.es_ifmr.ifm_ulist = ifm_ulist; + p.es_ifmr.ifm_count = IFMEDIAREQ_NULISTENTRIES; + if (ioctl(cfg->fd, IOETHERSWITCHGETPORT, &p) != 0) + err(EX_OSERR, "ioctl(IOETHERSWITCHGETPORT)"); + subtype = get_media_subtype(IFM_TYPE(ifm_ulist[0]), argv[1]); + p.es_ifr.ifr_media = (p.es_ifmr.ifm_current & IFM_IMASK) | + IFM_TYPE(ifm_ulist[0]) | subtype; + if (ioctl(cfg->fd, IOETHERSWITCHSETPORT, &p) != 0) + err(EX_OSERR, "ioctl(IOETHERSWITCHSETPORT)"); +} + +static void +set_port_mediaopt(struct cfg *cfg, char *argv[]) +{ + etherswitch_port_t p; + int ifm_ulist[IFMEDIAREQ_NULISTENTRIES]; + int options; + + bzero(&p, sizeof(p)); + p.es_port = cfg->unit; + p.es_ifmr.ifm_ulist = ifm_ulist; + p.es_ifmr.ifm_count = IFMEDIAREQ_NULISTENTRIES; + if (ioctl(cfg->fd, IOETHERSWITCHGETPORT, &p) != 0) + err(EX_OSERR, "ioctl(IOETHERSWITCHGETPORT)"); + options = get_media_options(IFM_TYPE(ifm_ulist[0]), argv[1]); + if (options == -1) + errx(EX_USAGE, "invalid media options \"%s\"", argv[1]); + if (options & IFM_HDX) { + p.es_ifr.ifr_media &= ~IFM_FDX; + options &= ~IFM_HDX; + } + p.es_ifr.ifr_media |= options; + if (ioctl(cfg->fd, IOETHERSWITCHSETPORT, &p) != 0) + err(EX_OSERR, "ioctl(IOETHERSWITCHSETPORT)"); +} + +static void +set_vlangroup_vid(struct cfg *cfg, char *argv[]) +{ + int v; + etherswitch_vlangroup_t vg; + + v = strtol(argv[1], NULL, 0); + if (v < 0 || v >= IEEE802DOT1Q_VID_MAX) + errx(EX_USAGE, "vlan must be between 0 and %d", IEEE802DOT1Q_VID_MAX); + vg.es_vlangroup = cfg->unit; + if (ioctl(cfg->fd, IOETHERSWITCHGETVLANGROUP, &vg) != 0) + err(EX_OSERR, "ioctl(IOETHERSWITCHGETVLANGROUP)"); + vg.es_vid = v; + if (ioctl(cfg->fd, IOETHERSWITCHSETVLANGROUP, &vg) != 0) + err(EX_OSERR, "ioctl(IOETHERSWITCHSETVLANGROUP)"); +} + +static void +set_vlangroup_members(struct cfg *cfg, char *argv[]) +{ + etherswitch_vlangroup_t vg; + int member, untagged; + char *c, *d; + int v; + + member = untagged = 0; + if (strcmp(argv[1], "none") != 0) { + for (c=argv[1]; *c; c=d) { + v = strtol(c, &d, 0); + if (d == c) + break; + if (v < 0 || v >= cfg->info.es_nports) + errx(EX_USAGE, "Member port must be between 0 and %d", cfg->info.es_nports-1); + if (d[0] == ',' || d[0] == '\0' || + ((d[0] == 't' || d[0] == 'T') && (d[1] == ',' || d[1] == '\0'))) { + if (d[0] == 't' || d[0] == 'T') { + untagged &= ~ETHERSWITCH_PORTMASK(v); + d++; + } else + untagged |= ETHERSWITCH_PORTMASK(v); + member |= ETHERSWITCH_PORTMASK(v); + d++; + } else + errx(EX_USAGE, "Invalid members specification \"%s\"", d); + } + } + vg.es_vlangroup = cfg->unit; + if (ioctl(cfg->fd, IOETHERSWITCHGETVLANGROUP, &vg) != 0) + err(EX_OSERR, "ioctl(IOETHERSWITCHGETVLANGROUP)"); + vg.es_member_ports = member; + vg.es_untagged_ports = untagged; + if (ioctl(cfg->fd, IOETHERSWITCHSETVLANGROUP, &vg) != 0) + err(EX_OSERR, "ioctl(IOETHERSWITCHSETVLANGROUP)"); +} + +static int +set_register(struct cfg *cfg, char *arg) +{ + int a, v; + char *c; + + a = strtol(arg, &c, 0); + if (c==arg) + return (1); + if (*c == '=') { + v = strtol(c+1, NULL, 0); + write_register(cfg, a, v); + } + printf("\treg 0x%04x=0x%04x\n", a, read_register(cfg, a)); + return (0); +} + +static int +set_phyregister(struct cfg *cfg, char *arg) +{ + int phy, reg, val; + char *c, *d; + + phy = strtol(arg, &c, 0); + if (c==arg) + return (1); + if (*c != '.') + return (1); + d = c+1; + reg = strtol(d, &c, 0); + if (d == c) + return (1); + if (*c == '=') { + val = strtol(c+1, NULL, 0); + write_phyregister(cfg, phy, reg, val); + } + printf("\treg %d.0x%02x=0x%04x\n", phy, reg, read_phyregister(cfg, phy, reg)); + return (0); +} + +static void +print_port(struct cfg *cfg, int port) +{ + etherswitch_port_t p; + int ifm_ulist[IFMEDIAREQ_NULISTENTRIES]; + int i; + + bzero(&p, sizeof(p)); + p.es_port = port; + p.es_ifmr.ifm_ulist = ifm_ulist; + p.es_ifmr.ifm_count = IFMEDIAREQ_NULISTENTRIES; + if (ioctl(cfg->fd, IOETHERSWITCHGETPORT, &p) != 0) + err(EX_OSERR, "ioctl(IOETHERSWITCHGETPORT)"); + printf("port%d:\n", port); + printf("\tvlangroup: %d\n", p.es_vlangroup); + printf("\tmedia: "); + print_media_word(p.es_ifmr.ifm_current, 1); + if (p.es_ifmr.ifm_active != p.es_ifmr.ifm_current) { + putchar(' '); + putchar('('); + print_media_word(p.es_ifmr.ifm_active, 0); + putchar(')'); + } + putchar('\n'); + printf("\tstatus: %s\n", (p.es_ifmr.ifm_status & IFM_ACTIVE) != 0 ? "active" : "no carrier"); + if (cfg->mediatypes) { + printf("\tsupported media:\n"); + if (p.es_ifmr.ifm_count > IFMEDIAREQ_NULISTENTRIES) + p.es_ifmr.ifm_count = IFMEDIAREQ_NULISTENTRIES; + for (i=0; ifd, IOETHERSWITCHGETVLANGROUP, &vg) != 0) + err(EX_OSERR, "ioctl(IOETHERSWITCHGETVLANGROUP)"); + if (cfg->verbose == 0 && vg.es_member_ports == 0) + return; + printf("vlangroup%d:\n", vlangroup); + printf("\tvlan: %d\n", vg.es_vid); + printf("\tmembers "); + comma = 0; + if (vg.es_member_ports != 0) + for (i=0; iinfo.es_nports; i++) { + if ((vg.es_member_ports & ETHERSWITCH_PORTMASK(i)) != 0) { + if (comma) + printf(","); + printf("%d", i); + if ((vg.es_untagged_ports & ETHERSWITCH_PORTMASK(i)) == 0) + printf("t"); + comma = 1; + } + } + else + printf("none"); + printf("\n"); +} + +static void +print_info(struct cfg *cfg) +{ + const char *c; + int i; + + c = strrchr(cfg->controlfile, '/'); + if (c != NULL) + c = c + 1; + else + c = cfg->controlfile; + if (cfg->verbose) + printf("%s: %s with %d ports and %d VLAN groups\n", + c, cfg->info.es_name, cfg->info.es_nports, cfg->info.es_nvlangroups); + for (i=0; iinfo.es_nports; i++) { + print_port(cfg, i); + } + for (i=0; iinfo.es_nvlangroups; i++) { + print_vlangroup(cfg, i); + } +} + +static void +usage(void) +{ + fprintf(stderr, "usage: etherswitchctl\n"); + exit(EX_USAGE); +} + +static void +newmode(struct cfg *cfg, enum cmdmode mode) +{ + if (mode == cfg->mode) + return; + switch (cfg->mode) { + case MODE_NONE: + break; + case MODE_PORT: + print_port(cfg, cfg->unit); + break; + case MODE_VLANGROUP: + print_vlangroup(cfg, cfg->unit); + break; + case MODE_REGISTER: + case MODE_PHYREG: + break; + } + cfg->mode = mode; +} + +int +main(int argc, char *argv[]) +{ + int ch; + struct cfg cfg; + int i; + + bzero(&cfg, sizeof(cfg)); + cfg.controlfile = "/dev/etherswitch0"; + while ((ch = getopt(argc, argv, "f:mv?")) != -1) + switch(ch) { + case 'f': + cfg.controlfile = optarg; + break; + case 'm': + cfg.mediatypes++; + break; + case 'v': + cfg.verbose++; + break; + case '?': + /* FALLTHROUGH */ + default: + usage(); + } + argc -= optind; + argv += optind; + cfg.fd = open(cfg.controlfile, O_RDONLY); + if (cfg.fd < 0) + err(EX_UNAVAILABLE, "Can't open control file: %s", cfg.controlfile); + if (ioctl(cfg.fd, IOETHERSWITCHGETINFO, &cfg.info) != 0) + err(EX_OSERR, "ioctl(IOETHERSWITCHGETINFO)"); + if (argc == 0) { + print_info(&cfg); + return (0); + } + cfg.mode = MODE_NONE; + while (argc > 0) { + switch(cfg.mode) { + case MODE_NONE: + if (strcmp(argv[0], "info") == 0) { + print_info(&cfg); + } else if (sscanf(argv[0], "port%d", &cfg.unit) == 1) { + if (cfg.unit < 0 || cfg.unit >= cfg.info.es_nports) + errx(EX_USAGE, "port unit must be between 0 and %d", cfg.info.es_nports); + newmode(&cfg, MODE_PORT); + } else if (sscanf(argv[0], "vlangroup%d", &cfg.unit) == 1) { + if (cfg.unit < 0 || cfg.unit >= cfg.info.es_nvlangroups) + errx(EX_USAGE, "port unit must be between 0 and %d", cfg.info.es_nvlangroups); + newmode(&cfg, MODE_VLANGROUP); + } else if (strcmp(argv[0], "phy") == 0) { + newmode(&cfg, MODE_PHYREG); + } else if (strcmp(argv[0], "reg") == 0) { + newmode(&cfg, MODE_REGISTER); + } else { + errx(EX_USAGE, "Unknown command \"%s\"", argv[0]); + } + break; + case MODE_PORT: + case MODE_VLANGROUP: + for(i=0; cmds[i].name != NULL; i++) { + if (cfg.mode == cmds[i].mode && strcmp(argv[0], cmds[i].name) == 0 + && argc >= cmds[i].args) { + (cmds[i].f)(&cfg, argv); + argc -= cmds[i].args; + argv += cmds[i].args; + break; + } + } + if (cmds[i].name == NULL) { + newmode(&cfg, MODE_NONE); + continue; + } + break; + case MODE_REGISTER: + if (set_register(&cfg, argv[0]) != 0) { + newmode(&cfg, MODE_NONE); + continue; + } + break; + case MODE_PHYREG: + if (set_phyregister(&cfg, argv[0]) != 0) { + newmode(&cfg, MODE_NONE); + continue; + } + break; + } + argc--; + argv++; + } + /* switch back to command mode to print configuration for last command */ + newmode(&cfg, MODE_NONE); + close(cfg.fd); + return (0); +} + +struct cmds cmds[] = { + { MODE_PORT, "vlangroup", 1, set_port_vlangroup }, + { MODE_PORT, "media", 1, set_port_media }, + { MODE_PORT, "mediaopt", 1, set_port_mediaopt }, + { MODE_VLANGROUP, "vlan", 1, set_vlangroup_vid }, + { MODE_VLANGROUP, "members", 1, set_vlangroup_members }, + { 0, NULL, 0, NULL } +}; Added: head/sbin/etherswitchcfg/ifmedia.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/etherswitchcfg/ifmedia.c Fri May 11 20:56:04 2012 (r235289) @@ -0,0 +1,812 @@ +/* $NetBSD: ifconfig.c,v 1.34 1997/04/21 01:17:58 lukem Exp $ */ +/* $FreeBSD$ */ + +/* + * Copyright (c) 1997 Jason R. Thorpe. + * 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. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed for the NetBSD Project + * by Jason R. Thorpe. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * 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. + */ + +/* + * Copyright (c) 1983, 1993 + * The Regents of the University of California. 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. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. + */ +/* + * based on sbin/ifconfig/ifmedia.c r221954 + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +void domediaopt(const char *, int, int); +int get_media_subtype(int, const char *); +int get_media_mode(int, const char *); +int get_media_options(int, const char *); +int lookup_media_word(struct ifmedia_description *, const char *); +void print_media_word(int, int); +void print_media_word_ifconfig(int); + +#if 0 +static struct ifmedia_description *get_toptype_desc(int); +static struct ifmedia_type_to_subtype *get_toptype_ttos(int); +static struct ifmedia_description *get_subtype_desc(int, + struct ifmedia_type_to_subtype *ttos); + +#define IFM_OPMODE(x) \ + ((x) & (IFM_IEEE80211_ADHOC | IFM_IEEE80211_HOSTAP | \ + IFM_IEEE80211_IBSS | IFM_IEEE80211_WDS | IFM_IEEE80211_MONITOR | \ + IFM_IEEE80211_MBSS)) +#define IFM_IEEE80211_STA 0 + +static void +media_status(int s) +{ + struct ifmediareq ifmr; + int *media_list, i; + + (void) memset(&ifmr, 0, sizeof(ifmr)); + (void) strncpy(ifmr.ifm_name, name, sizeof(ifmr.ifm_name)); + + if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) { + /* + * Interface doesn't support SIOC{G,S}IFMEDIA. + */ + return; + } + + if (ifmr.ifm_count == 0) { + warnx("%s: no media types?", name); + return; + } + + media_list = (int *)malloc(ifmr.ifm_count * sizeof(int)); + if (media_list == NULL) + err(1, "malloc"); + ifmr.ifm_ulist = media_list; + + if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) + err(1, "SIOCGIFMEDIA"); + + printf("\tmedia: "); + print_media_word(ifmr.ifm_current, 1); + if (ifmr.ifm_active != ifmr.ifm_current) { + putchar(' '); + putchar('('); + print_media_word(ifmr.ifm_active, 0); + putchar(')'); + } + + putchar('\n'); + + if (ifmr.ifm_status & IFM_AVALID) { + printf("\tstatus: "); + switch (IFM_TYPE(ifmr.ifm_active)) { + case IFM_ETHER: + case IFM_ATM: + if (ifmr.ifm_status & IFM_ACTIVE) + printf("active"); + else + printf("no carrier"); + break; + + case IFM_FDDI: + case IFM_TOKEN: + if (ifmr.ifm_status & IFM_ACTIVE) + printf("inserted"); + else + printf("no ring"); + break; + + case IFM_IEEE80211: + if (ifmr.ifm_status & IFM_ACTIVE) { + /* NB: only sta mode associates */ + if (IFM_OPMODE(ifmr.ifm_active) == IFM_IEEE80211_STA) + printf("associated"); + else + printf("running"); + } else + printf("no carrier"); + break; + } + putchar('\n'); + } + + if (ifmr.ifm_count > 0 && supmedia) { + printf("\tsupported media:\n"); + for (i = 0; i < ifmr.ifm_count; i++) { + printf("\t\t"); + print_media_word_ifconfig(media_list[i]); + putchar('\n'); + } + } + + free(media_list); +} + +struct ifmediareq * +ifmedia_getstate(int s) +{ + static struct ifmediareq *ifmr = NULL; + int *mwords; + + if (ifmr == NULL) { + ifmr = (struct ifmediareq *)malloc(sizeof(struct ifmediareq)); + if (ifmr == NULL) + err(1, "malloc"); + + (void) memset(ifmr, 0, sizeof(struct ifmediareq)); + (void) strncpy(ifmr->ifm_name, name, + sizeof(ifmr->ifm_name)); + + ifmr->ifm_count = 0; + ifmr->ifm_ulist = NULL; + + /* + * We must go through the motions of reading all + * supported media because we need to know both + * the current media type and the top-level type. + */ + + if (ioctl(s, SIOCGIFMEDIA, (caddr_t)ifmr) < 0) { + err(1, "SIOCGIFMEDIA"); + } + + if (ifmr->ifm_count == 0) + errx(1, "%s: no media types?", name); + + mwords = (int *)malloc(ifmr->ifm_count * sizeof(int)); + if (mwords == NULL) + err(1, "malloc"); + + ifmr->ifm_ulist = mwords; + if (ioctl(s, SIOCGIFMEDIA, (caddr_t)ifmr) < 0) + err(1, "SIOCGIFMEDIA"); + } + + return ifmr; +} + +static void +setifmediacallback(int s, void *arg) +{ + struct ifmediareq *ifmr = (struct ifmediareq *)arg; + static int did_it = 0; + + if (!did_it) { + ifr.ifr_media = ifmr->ifm_current; + if (ioctl(s, SIOCSIFMEDIA, (caddr_t)&ifr) < 0) + err(1, "SIOCSIFMEDIA (media)"); + free(ifmr->ifm_ulist); + free(ifmr); + did_it = 1; + } +} + +static void +setmedia(const char *val, int d, int s, const struct afswtch *afp) +{ + struct ifmediareq *ifmr; + int subtype; + + ifmr = ifmedia_getstate(s); + + /* + * We are primarily concerned with the top-level type. + * However, "current" may be only IFM_NONE, so we just look + * for the top-level type in the first "supported type" + * entry. + * + * (I'm assuming that all supported media types for a given + * interface will be the same top-level type..) + */ + subtype = get_media_subtype(IFM_TYPE(ifmr->ifm_ulist[0]), val); + + strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); + ifr.ifr_media = (ifmr->ifm_current & IFM_IMASK) | + IFM_TYPE(ifmr->ifm_ulist[0]) | subtype; + + ifmr->ifm_current = ifr.ifr_media; + callback_register(setifmediacallback, (void *)ifmr); +} + +static void +setmediaopt(const char *val, int d, int s, const struct afswtch *afp) +{ + + domediaopt(val, 0, s); +} + +static void +unsetmediaopt(const char *val, int d, int s, const struct afswtch *afp) +{ + + domediaopt(val, 1, s); +} + +static void +domediaopt(const char *val, int clear, int s) +{ + struct ifmediareq *ifmr; + int options; + + ifmr = ifmedia_getstate(s); + + options = get_media_options(IFM_TYPE(ifmr->ifm_ulist[0]), val); + + strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); + ifr.ifr_media = ifmr->ifm_current; + if (clear) + ifr.ifr_media &= ~options; + else { + if (options & IFM_HDX) { + ifr.ifr_media &= ~IFM_FDX; + options &= ~IFM_HDX; + } + ifr.ifr_media |= options; + } + ifmr->ifm_current = ifr.ifr_media; + callback_register(setifmediacallback, (void *)ifmr); +} + +static void +setmediainst(const char *val, int d, int s, const struct afswtch *afp) +{ + struct ifmediareq *ifmr; + int inst; + + ifmr = ifmedia_getstate(s); + + inst = atoi(val); + if (inst < 0 || inst > (int)IFM_INST_MAX) + errx(1, "invalid media instance: %s", val); + + strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); + ifr.ifr_media = (ifmr->ifm_current & ~IFM_IMASK) | inst << IFM_ISHIFT; + + ifmr->ifm_current = ifr.ifr_media; + callback_register(setifmediacallback, (void *)ifmr); +} + +static void +setmediamode(const char *val, int d, int s, const struct afswtch *afp) +{ + struct ifmediareq *ifmr; + int mode; + + ifmr = ifmedia_getstate(s); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Fri May 11 21:13:44 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 430E4106566C; Fri, 11 May 2012 21:13:44 +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 161488FC12; Fri, 11 May 2012 21:13:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BLDhQo000801; Fri, 11 May 2012 21:13:43 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BLDhlT000798; Fri, 11 May 2012 21:13:43 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201205112113.q4BLDhlT000798@svn.freebsd.org> From: Adrian Chadd Date: Fri, 11 May 2012 21:13: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: r235290 - head/sys/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: Fri, 11 May 2012 21:13:44 -0000 Author: adrian Date: Fri May 11 21:13:43 2012 New Revision: 235290 URL: http://svn.freebsd.org/changeset/base/235290 Log: Add switch support to AP96. Modified: head/sys/mips/conf/AP96 head/sys/mips/conf/AP96.hints Modified: head/sys/mips/conf/AP96 ============================================================================== --- head/sys/mips/conf/AP96 Fri May 11 20:56:04 2012 (r235289) +++ head/sys/mips/conf/AP96 Fri May 11 21:13:43 2012 (r235290) @@ -44,3 +44,6 @@ device firmware # Used by the above # Options required for miiproxy and mdiobus options ARGE_MDIO # Export an MDIO bus separate from arge device miiproxy # MDIO bus <-> MII PHY rendezvous + +device etherswitch +device arswitch Modified: head/sys/mips/conf/AP96.hints ============================================================================== --- head/sys/mips/conf/AP96.hints Fri May 11 20:56:04 2012 (r235289) +++ head/sys/mips/conf/AP96.hints Fri May 11 21:13:43 2012 (r235290) @@ -5,21 +5,17 @@ hint.argemdio.0.at="nexus0" hint.argemdio.0.maddr=0x19000000 hint.argemdio.0.msize=0x1000 hint.argemdio.0.order=0 +# This creates an automatic mdioproxy0! -# Create two mdioproxy instances - by default only one is created -# per mdiobus above. -hint.mdioproxy.0.at="mdio0" -hint.mdioproxy.1.at="mdio0" + +# The switch automatically probes off of mdio0, and will +# create an mdioproxy1. # TODO: RGMII -# XXX this port currently doesn't work with the current configuration. -hint.arge.0.phymask=0x0f +hint.arge.0.phymask=0x0 # Nothing attached here (XXX?) hint.arge.0.media=1000 hint.arge.0.fduplex=1 hint.arge.0.miimode=3 # RGMII -# For now, rendezouvs this on the arge0 mdiobus. -# Later, this will rendezvous via the AR8316 switch. -hint.arge.0.mdio=mdioproxy0 # TODO: RGMII hint.arge.1.phymask=0x10 @@ -27,7 +23,7 @@ hint.arge.1.phymask=0x10 # For now, rendezouvs this on the arge0 mdiobus. # Later, this will rendezvous via the AR8316 switch. hint.arge.1.miimode=3 # RGMII -hint.arge.1.mdio=mdioproxy1 +hint.arge.1.mdio=mdioproxy1 # off the switch mdiobus # ath0 - slot 17 hint.pcib.0.bus.0.17.0.ath_fixup_addr=0x1fff1000 From owner-svn-src-head@FreeBSD.ORG Fri May 11 21:22:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6E92F106566B; Fri, 11 May 2012 21:22:53 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 40B788FC0A; Fri, 11 May 2012 21:22:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BLMrHp001120; Fri, 11 May 2012 21:22:53 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BLMrOq001118; Fri, 11 May 2012 21:22:53 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <201205112122.q4BLMrOq001118@svn.freebsd.org> From: Jamie Gritton Date: Fri, 11 May 2012 21:22:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235291 - head/lib/libjail X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 21:22:53 -0000 Author: jamie Date: Fri May 11 21:22:52 2012 New Revision: 235291 URL: http://svn.freebsd.org/changeset/base/235291 Log: The linker isn't consistent in the ordering of dynamic sysctls, so don't assume that the unnamed final component of "security.jail.param.foo." is one less than the "foo" component. It might be one greater instead. Modified: head/lib/libjail/jail.c Modified: head/lib/libjail/jail.c ============================================================================== --- head/lib/libjail/jail.c Fri May 11 21:13:43 2012 (r235290) +++ head/lib/libjail/jail.c Fri May 11 21:22:52 2012 (r235291) @@ -855,7 +855,7 @@ jailparam_type(struct jailparam *jp) { char *p, *nname; size_t miblen, desclen; - int isarray; + int i, isarray; struct { int i; char s[MAXPATHLEN]; @@ -977,21 +977,33 @@ jailparam_type(struct jailparam *jp) } break; case CTLTYPE_NODE: - /* A node might be described by an empty-named child. */ + /* + * A node might be described by an empty-named child, + * which would be immediately before or after the node itself. + */ mib[1] = 1; - mib[(miblen / sizeof(int)) + 2] = - mib[(miblen / sizeof(int)) + 1] - 1; miblen += sizeof(int); - desclen = sizeof(desc.s); - if (sysctl(mib, (miblen / sizeof(int)) + 2, desc.s, &desclen, - NULL, 0) < 0) { - snprintf(jail_errmsg, JAIL_ERRMSGLEN, - "sysctl(0.1): %s", strerror(errno)); - return (-1); + for (i = -1; i <= 1; i += 2) { + mib[(miblen / sizeof(int)) + 1] = + mib[(miblen / sizeof(int))] + i; + desclen = sizeof(desc.s); + if (sysctl(mib, (miblen / sizeof(int)) + 2, desc.s, + &desclen, NULL, 0) < 0) { + if (errno == ENOENT) + continue; + snprintf(jail_errmsg, JAIL_ERRMSGLEN, + "sysctl(0.1): %s", strerror(errno)); + return (-1); + } + if (desclen == + sizeof(SJPARAM) + strlen(jp->jp_name) + 2 && + memcmp(SJPARAM ".", desc.s, sizeof(SJPARAM)) == 0 && + memcmp(jp->jp_name, desc.s + sizeof(SJPARAM), + desclen - sizeof(SJPARAM) - 2) == 0 && + desc.s[desclen - 2] == '.') + goto mib_desc; } - if (desc.s[desclen - 2] != '.') - goto unknown_parameter; - goto mib_desc; + goto unknown_parameter; default: snprintf(jail_errmsg, JAIL_ERRMSGLEN, "unknown type for %s", jp->jp_name); From owner-svn-src-head@FreeBSD.ORG Fri May 11 21:26:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E5A2106566B; Fri, 11 May 2012 21:26:00 +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 2A0598FC08; Fri, 11 May 2012 21:26:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BLQ0Br001259; Fri, 11 May 2012 21:26:00 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BLPxvO001257; Fri, 11 May 2012 21:25:59 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201205112125.q4BLPxvO001257@svn.freebsd.org> From: Warner Losh Date: Fri, 11 May 2012 21:25: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: r235292 - 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: Fri, 11 May 2012 21:26:00 -0000 Author: imp Date: Fri May 11 21:25:59 2012 New Revision: 235292 URL: http://svn.freebsd.org/changeset/base/235292 Log: Add pointers for how to setup debugging over firewire. Modified: head/share/man/man4/firewire.4 Modified: head/share/man/man4/firewire.4 ============================================================================== --- head/share/man/man4/firewire.4 Fri May 11 21:22:52 2012 (r235291) +++ head/share/man/man4/firewire.4 Fri May 11 21:25:59 2012 (r235292) @@ -82,12 +82,20 @@ manager, are dynamically assigned, after On the .Nm bus, every device is identified by an EUI 64 address. +.Pp +Debugging over the firewire interace is possible with the +.Xr dcons 4 +driver. +Please see +.Pa http://wiki.freebsd.org/DebugWithDcons +for details on how to setup debugging with firewire. .Sh FILES .Bl -tag -compact .It Pa /dev/fw0.0 .It Pa /dev/fwmem0.0 .El .Sh SEE ALSO +.Xr dcons 4 , .Xr fwe 4 , .Xr fwip 4 , .Xr fwohci 4 , From owner-svn-src-head@FreeBSD.ORG Fri May 11 21:52:06 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A8131065673; Fri, 11 May 2012 21:52:06 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0604E8FC18; Fri, 11 May 2012 21:52:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BLq5BM002052; Fri, 11 May 2012 21:52:05 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BLq5OT002050; Fri, 11 May 2012 21:52:05 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201205112152.q4BLq5OT002050@svn.freebsd.org> From: Xin LI Date: Fri, 11 May 2012 21:52:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235293 - head/usr.sbin/rtprio X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 21:52:06 -0000 Author: delphij Date: Fri May 11 21:52:05 2012 New Revision: 235293 URL: http://svn.freebsd.org/changeset/base/235293 Log: Fix the case where the utility is being used to run a command directly, this is a regression introduced with r228917. PR: bin/154042 Submitted by: Bugs Beastie MFC after: 1 week Modified: head/usr.sbin/rtprio/rtprio.c Modified: head/usr.sbin/rtprio/rtprio.c ============================================================================== --- head/usr.sbin/rtprio/rtprio.c Fri May 11 21:25:59 2012 (r235292) +++ head/usr.sbin/rtprio/rtprio.c Fri May 11 21:52:05 2012 (r235293) @@ -109,9 +109,12 @@ main(int argc, char *argv[]) if (argv[2][0] == '-') { proc = parseint(argv[2], "pid"); proc = abs(proc); - if (rtprio(RTP_SET, proc, &rtp) != 0) - err(1, "RTP_SET"); - } else { + } + + if (rtprio(RTP_SET, proc, &rtp) != 0) + err(1, "RTP_SET"); + + if (proc == 0) { execvp(argv[2], &argv[2]); err(1, "execvp: %s", argv[2]); } From owner-svn-src-head@FreeBSD.ORG Fri May 11 22:05:30 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2628106564A; Fri, 11 May 2012 22:05:30 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE2288FC14; Fri, 11 May 2012 22:05:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BM5U8d002519; Fri, 11 May 2012 22:05:30 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BM5UY9002517; Fri, 11 May 2012 22:05:30 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201205112205.q4BM5UY9002517@svn.freebsd.org> From: Joel Dahl Date: Fri, 11 May 2012 22:05: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: r235294 - head/usr.sbin/jail X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 22:05:30 -0000 Author: joel (doc committer) Date: Fri May 11 22:05:30 2012 New Revision: 235294 URL: http://svn.freebsd.org/changeset/base/235294 Log: Fix .Pp macro. Modified: head/usr.sbin/jail/jail.8 Modified: head/usr.sbin/jail/jail.8 ============================================================================== --- head/usr.sbin/jail/jail.8 Fri May 11 21:52:05 2012 (r235293) +++ head/usr.sbin/jail/jail.8 Fri May 11 22:05:30 2012 (r235294) @@ -204,7 +204,7 @@ and options can also remove running jails that aren't in the .Xr jail.conf 5 file, specified by name or jid. -.P +.Pp An argument of .Dq * is a wildcard that will operate on all jails, regardless of whether From owner-svn-src-head@FreeBSD.ORG Fri May 11 23:05:15 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1054F1065670; Fri, 11 May 2012 23:05:15 +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 EFECD8FC12; Fri, 11 May 2012 23:05:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BN5EWI004524; Fri, 11 May 2012 23:05:14 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BN5EgE004521; Fri, 11 May 2012 23:05:14 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201205112305.q4BN5EgE004521@svn.freebsd.org> From: Matthew D Fleming Date: Fri, 11 May 2012 23:05: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: r235297 - head/bin/kenv X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 23:05:15 -0000 Author: mdf Date: Fri May 11 23:05:14 2012 New Revision: 235297 URL: http://svn.freebsd.org/changeset/base/235297 Log: Add a -v and -N option to kenv(1), so it can be more easily used in scripts the way sysctl(8) is. The -N option, like in sysctl(8), displays only the kenv names, not their values. The -v option prints an individual kenv variable name with its value as name="value". This is the inverse of sysctl(8)'s -n flag, since the default behaviour of kenv(1) is already like sysctl(8) -n. Submitted by: Garrett Cooper < yanegomi AT gmail DOT com > MFC after: 1 week Modified: head/bin/kenv/kenv.1 head/bin/kenv/kenv.c Modified: head/bin/kenv/kenv.1 ============================================================================== --- head/bin/kenv/kenv.1 Fri May 11 22:41:58 2012 (r235296) +++ head/bin/kenv/kenv.1 Fri May 11 23:05:14 2012 (r235297) @@ -32,9 +32,9 @@ .Nd dump or modify the kernel environment .Sh SYNOPSIS .Nm -.Op Fl hq +.Op Fl hNq .Nm -.Op Fl q +.Op Fl qv .Ar variable Ns Op = Ns Ar value .Nm .Op Fl q @@ -54,6 +54,11 @@ name is specified, .Nm will only report that value. If the +.Fl N +option is specified, +.Nm +will only display variable names and not their values. +If the .Fl u option is specified, .Nm @@ -68,6 +73,13 @@ If the option is set, warnings normally printed as a result of being unable to perform the requested operation will be suppressed. .Pp +If the +.Fl v +option is set, the variable name will be printed out for the +environment variable in addition to the value when +.Nm +is executed with a variable name. +.Pp Variables can be added to the kernel environment using the .Pa /boot/loader.conf file, or also statically compiled into the kernel using the statement Modified: head/bin/kenv/kenv.c ============================================================================== --- head/bin/kenv/kenv.c Fri May 11 22:41:58 2012 (r235296) +++ head/bin/kenv/kenv.c Fri May 11 23:05:14 2012 (r235297) @@ -42,15 +42,17 @@ static int ksetenv(char *, char *); static int kunsetenv(char *); static int hflag = 0; +static int Nflag = 0; static int qflag = 0; static int uflag = 0; +static int vflag = 0; static void usage(void) { (void)fprintf(stderr, "%s\n%s\n%s\n", - "usage: kenv [-hq]", - " kenv [-q] variable[=value]", + "usage: kenv [-hNq]", + " kenv [-qv] variable[=value]", " kenv [-q] -u variable"); exit(1); } @@ -64,17 +66,23 @@ main(int argc, char **argv) error = 0; val = NULL; env = NULL; - while ((ch = getopt(argc, argv, "hqu")) != -1) { + while ((ch = getopt(argc, argv, "hNquv")) != -1) { switch (ch) { case 'h': hflag++; break; + case 'N': + Nflag++; + break; case 'q': qflag++; break; case 'u': uflag++; break; + case 'v': + vflag++; + break; default: usage(); } @@ -91,9 +99,9 @@ main(int argc, char **argv) argv++; argc--; } - if (hflag && (env != NULL)) + if ((hflag || Nflag) && env != NULL) usage(); - if ((argc > 0) || (uflag && (env == NULL))) + if (argc > 0 || ((uflag || vflag) && env == NULL)) usage(); if (env == NULL) { error = kdumpenv(); @@ -152,7 +160,10 @@ kdumpenv(void) if (cp == NULL) continue; *cp++ = '\0'; - printf("%s=\"%s\"\n", buf, cp); + if (Nflag) + printf("%s\n", buf); + else + printf("%s=\"%s\"\n", buf, cp); buf = cp; } return (0); @@ -167,7 +178,10 @@ kgetenv(char *env) ret = kenv(KENV_GET, env, buf, sizeof(buf)); if (ret == -1) return (ret); - printf("%s\n", buf); + if (vflag) + printf("%s=\"%s\"\n", env, buf); + else + printf("%s\n", buf); return (0); } From owner-svn-src-head@FreeBSD.ORG Fri May 11 23:41:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 67CA7106566C; Fri, 11 May 2012 23:41:53 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1815A8FC0C; Fri, 11 May 2012 23:41:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BNfq33005734; Fri, 11 May 2012 23:41:52 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BNfqva005732; Fri, 11 May 2012 23:41:52 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201205112341.q4BNfqva005732@svn.freebsd.org> From: Xin LI Date: Fri, 11 May 2012 23:41: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: r235300 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 23:41:53 -0000 Author: delphij Date: Fri May 11 23:41:52 2012 New Revision: 235300 URL: http://svn.freebsd.org/changeset/base/235300 Log: Release proc lock after setting signal queue. PR: kern/167727 Submitted by: Jinjun Gao MFC after: 2 weeks Modified: head/sys/kern/kern_kthread.c Modified: head/sys/kern/kern_kthread.c ============================================================================== --- head/sys/kern/kern_kthread.c Fri May 11 23:36:26 2012 (r235299) +++ head/sys/kern/kern_kthread.c Fri May 11 23:41:52 2012 (r235300) @@ -182,6 +182,7 @@ kproc_suspend(struct proc *p, int timo) return (EINVAL); } SIGADDSET(p->p_siglist, SIGSTOP); + PROC_UNLOCK(p); wakeup(p); return msleep(&p->p_siglist, &p->p_mtx, PPAUSE | PDROP, "suspkp", timo); } From owner-svn-src-head@FreeBSD.ORG Fri May 11 23:43:32 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6633106566B; Fri, 11 May 2012 23:43:32 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D217B8FC16; Fri, 11 May 2012 23:43:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4BNhWXw005831; Fri, 11 May 2012 23:43:32 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4BNhWh7005829; Fri, 11 May 2012 23:43:32 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201205112343.q4BNhWh7005829@svn.freebsd.org> From: Xin LI Date: Fri, 11 May 2012 23:43:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235301 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 23:43:33 -0000 Author: delphij Date: Fri May 11 23:43:32 2012 New Revision: 235301 URL: http://svn.freebsd.org/changeset/base/235301 Log: Revert previous revision, misunderstood the code :( Modified: head/sys/kern/kern_kthread.c Modified: head/sys/kern/kern_kthread.c ============================================================================== --- head/sys/kern/kern_kthread.c Fri May 11 23:41:52 2012 (r235300) +++ head/sys/kern/kern_kthread.c Fri May 11 23:43:32 2012 (r235301) @@ -182,7 +182,6 @@ kproc_suspend(struct proc *p, int timo) return (EINVAL); } SIGADDSET(p->p_siglist, SIGSTOP); - PROC_UNLOCK(p); wakeup(p); return msleep(&p->p_siglist, &p->p_mtx, PPAUSE | PDROP, "suspkp", timo); } From owner-svn-src-head@FreeBSD.ORG Sat May 12 00:04:01 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47FE9106566B; Sat, 12 May 2012 00:04:01 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-qa0-f49.google.com (mail-qa0-f49.google.com [209.85.216.49]) by mx1.freebsd.org (Postfix) with ESMTP id B27198FC08; Sat, 12 May 2012 00:04:00 +0000 (UTC) Received: by qabj40 with SMTP id j40so2266103qab.15 for ; Fri, 11 May 2012 17:04:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=C2UKwC0zNlAlL+rIJG9h1smL4yE8LDGKA35bQhBKRkc=; b=HlJVe81xht2F+u9p4kN02161P2KgM/Zu84ptLo5U7EfTHO2jEahU4L7DKs/s3iewX0 RFR0OS4d1wVTBFszLiOfakMBE8cCPxW9L4EojDfRcQmj6/jzXrwryLNrzkMPNBhW9JZI Nu+OM0aGxtsYdGO+88TUWQI7Z+6BAEuJcbkaL8pkPlZAClt5SMf+o+NHxr34StStz9bS a1fuXBPqxelZ566GrwLpfmIAtbYqjYhTCH++cNvYBNoymM041pOzH9ROSOfFz/Cux060 GPDnWVVUMckYnrOGZQmp619krWCEyBfuEt3tB24NBhACG9CmP89FW0NQZv5pKVMu5jIV Bk+A== MIME-Version: 1.0 Received: by 10.229.137.147 with SMTP id w19mr6481qct.132.1336781039802; Fri, 11 May 2012 17:03:59 -0700 (PDT) Received: by 10.229.81.1 with HTTP; Fri, 11 May 2012 17:03:59 -0700 (PDT) In-Reply-To: <201205112343.q4BNhWh7005829@svn.freebsd.org> References: <201205112343.q4BNhWh7005829@svn.freebsd.org> Date: Fri, 11 May 2012 17:03:59 -0700 Message-ID: From: Xin LI To: Xin LI Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r235301 - 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: Sat, 12 May 2012 00:04:01 -0000 On Fri, May 11, 2012 at 4:43 PM, Xin LI wrote: > Author: delphij > Date: Fri May 11 23:43:32 2012 > New Revision: 235301 > URL: http://svn.freebsd.org/changeset/base/235301 > > Log: > =C2=A0Revert previous revision, misunderstood the code :( > > Modified: > =C2=A0head/sys/kern/kern_kthread.c > > Modified: head/sys/kern/kern_kthread.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/kern_kthread.c =C2=A0 =C2=A0 =C2=A0 =C2=A0Fri May 11 23= :41:52 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r235300) > +++ head/sys/kern/kern_kthread.c =C2=A0 =C2=A0 =C2=A0 =C2=A0Fri May 11 23= :43:32 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r235301) > @@ -182,7 +182,6 @@ kproc_suspend(struct proc *p, int timo) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (EINVAL); > =C2=A0 =C2=A0 =C2=A0 =C2=A0} > =C2=A0 =C2=A0 =C2=A0 =C2=A0SIGADDSET(p->p_siglist, SIGSTOP); > - =C2=A0 =C2=A0 =C2=A0 PROC_UNLOCK(p); > =C2=A0 =C2=A0 =C2=A0 =C2=A0wakeup(p); > =C2=A0 =C2=A0 =C2=A0 =C2=A0return msleep(&p->p_siglist, &p->p_mtx, PPAUSE= | PDROP, "suspkp", timo); For the record, p->p_mtx is the mutex used by PROC_[UN]LOCK(), which has to be held while calling msleep(). Cheers, --=20 Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die From owner-svn-src-head@FreeBSD.ORG Sat May 12 00:30:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC7DF1065670; Sat, 12 May 2012 00:30:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D3A28FC0A; Sat, 12 May 2012 00:30:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4C0UsMF007267; Sat, 12 May 2012 00:30:54 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4C0Usdj007265; Sat, 12 May 2012 00:30:54 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205120030.q4C0Usdj007265@svn.freebsd.org> From: Glen Barber Date: Sat, 12 May 2012 00:30: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: r235302 - 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: Sat, 12 May 2012 00:30:54 -0000 Author: gjb (doc committer) Date: Sat May 12 00:30:54 2012 New Revision: 235302 URL: http://svn.freebsd.org/changeset/base/235302 Log: Bump .Dd Modified: head/share/man/man4/firewire.4 Modified: head/share/man/man4/firewire.4 ============================================================================== --- head/share/man/man4/firewire.4 Fri May 11 23:43:32 2012 (r235301) +++ head/share/man/man4/firewire.4 Sat May 12 00:30:54 2012 (r235302) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 1, 2006 +.Dd May 11, 2012 .Dt FIREWIRE 4 .Os .Sh NAME From owner-svn-src-head@FreeBSD.ORG Sat May 12 00:51:06 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 931641065672 for ; Sat, 12 May 2012 00:51:06 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx1.freebsd.org (Postfix) with ESMTP id 150A58FC12 for ; Sat, 12 May 2012 00:51:05 +0000 (UTC) Received: by wibhn6 with SMTP id hn6so656094wib.13 for ; Fri, 11 May 2012 17:51:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=/AO2ni/ns7UeF8hMo0rCnJ7VThr8VP5sW2ojzfj2tpg=; b=knUakCX+4QkIWQcrkgjyw4IR/RFagTne85KbCNuxc1J59Q1fKYvsbbxszpUZhdcsZM V8QBUsS+iU5pRcTbLGZrfoNWJUae/+S8Svbv2FpZWA3vsnhF1laTC5f0tH6zxQzm6UTh YGAwq81V+9HChSX8DS1ZXvWvnjpNvux73V9tY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding:x-gm-message-state; bh=/AO2ni/ns7UeF8hMo0rCnJ7VThr8VP5sW2ojzfj2tpg=; b=Ynv+NdOrok7jQngFBUJo74L6sQhzXY8S6o/NiJDpa9rgTJiDihRdH/3gzTF2+Ozwyk f0CUnH6FhYNYRmOoniM35XELZrAWn+2B4OP/3vdlGydckyC1Qi6fG6FmomV+q8CTc9c1 iZZLx0Zx1br7YdLLDVwnNTEi3wzKyAE5i4OqcY3J4h5YExR43BA+ED9XfTNVN3W57FSN o+9jCk2Q7IJlh3xQDMRUHDr084jtoqhXUJ8d2vWROXebus7XV8fXKt4K4wxpbrKJjpGD 5f67xTqZnkbf1SGAbem68G+orZzaXAGYG4sRrEEX2Bjy1IwRNlEbjb42nIGT6xI3DYdy eEyw== Received: by 10.180.92.9 with SMTP id ci9mr329601wib.15.1336783864182; Fri, 11 May 2012 17:51:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.120.6 with HTTP; Fri, 11 May 2012 17:50:33 -0700 (PDT) In-Reply-To: <201205111013.q4BADY9g076888@svn.freebsd.org> References: <201205111013.q4BADY9g076888@svn.freebsd.org> From: Eitan Adler Date: Fri, 11 May 2012 20:50:33 -0400 Message-ID: To: Ulrich Spoerlein Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQkIz3MQrjnFPmbU//5Z9odpUvYZIyVWQ942D4d38yDwD+4uRS9NQDQEvwG9Cv8mEEweyBdI Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r235265 - head/share/man/man7 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 00:51:06 -0000 On 11 May 2012 06:13, Ulrich Spoerlein wrote: > Author: uqs > Date: Fri May 11 10:13:34 2012 > New Revision: 235265 > URL: http://svn.freebsd.org/changeset/base/235265 > > Log: > =C2=A0Stop lying about default UFS blocksizes. > > =C2=A0This catches up with the year-old change to default blocksizes. Als= o > =C2=A0reduce the variants of spelling gigabyte from 3 down to 2 (GB and G= iB). > > =C2=A0Suggested by: arundel (about a year ago now ...) > > Modified: > =C2=A0head/share/man/man7/tuning.7 > > Modified: head/share/man/man7/tuning.7 There is active work going on with this page at http://wiki.freebsd.org/SystemTuning When the page is ready I will fix up the man page. Any changes made to the man page between then and now will almost certainly get lost. --=20 Eitan Adler From owner-svn-src-head@FreeBSD.ORG Sat May 12 00:51:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2EA0F106567B for ; Sat, 12 May 2012 00:51:49 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx1.freebsd.org (Postfix) with ESMTP id A36FB8FC1D for ; Sat, 12 May 2012 00:51:48 +0000 (UTC) Received: by wibhj8 with SMTP id hj8so11003wib.13 for ; Fri, 11 May 2012 17:51:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=zBgTh7omM9p03StQ2+Q6xOmfzJzQgG7X8ufix2cZ4yo=; b=U1+NbpLbBI7Yyh2zsgnWny3yDAKIGW/BI+PMVIceTQS8KbscL5158tk44yQ8rXxRN7 j839RnTsMwxIUCVyU+uDt5zjzR8spqPZ4n6wAYIOXeLqtmqaKDf9lQ4ZxJGYPFxBR6JN SLocO9yV+cDzgQ6XPddi7SIgUdpOw9qfwQBDU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=zBgTh7omM9p03StQ2+Q6xOmfzJzQgG7X8ufix2cZ4yo=; b=Kj0GjiSYAyV7euRBh9sw8t6xqKG6ffbNyEn+o5u0NJkuA3DwmJXZGzMWIpnff1doSE IVHtis4+ctEisaIceDjpZq+3CbGISMwnMK8VcZ2bo8Iz2TodU27wsNFM2zJ0cfG7VFlp /3nN2U7pTjEThOjFLaXQivUqBk6ikUVPhdIMraOQSLXVCDX8UlC1MhhhFi3YCV2PBUsV OS6mG278XboETzS1WLoM1MVt87OWbkXancF/coJPkkFb5p8HPRkr+oVZ7vFGcb66O9HP BHdGxokPD2Mawhfjhn0FjwH2nqXUgIeqZmXHbdaFadYxTVpt0cj0MIzLH5fa6DYuEhbG PyDg== Received: by 10.216.140.211 with SMTP id e61mr70470wej.98.1336783902368; Fri, 11 May 2012 17:51:42 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.223.120.6 with HTTP; Fri, 11 May 2012 17:51:12 -0700 (PDT) In-Reply-To: <20120512031923.N2476@besplex.bde.org> References: <201205111013.q4BADY9g076888@svn.freebsd.org> <20120512031923.N2476@besplex.bde.org> From: Eitan Adler Date: Fri, 11 May 2012 20:51:12 -0400 X-Google-Sender-Auth: KoTNkh4zcMpDBfJLozYECAxPnWQ Message-ID: To: Bruce Evans Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQnDO9YhBut9lMLz52axsooR4sbU+FyItynoTmjRq7W/vXDhl88ImlCjbtP/58pX1YW7JQ4z Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ulrich Spoerlein Subject: Re: svn commit: r235265 - head/share/man/man7 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 00:51:49 -0000 On 11 May 2012 13:47, Bruce Evans wrote: > Why not reduce it to 1 (no GakaBytes, aka GiB)? Can you please make your suggested changes on http://wiki.freebsd.org/SystemTuning ? -- Eitan Adler Source & Ports committer X11, Bugbusting teams From owner-svn-src-head@FreeBSD.ORG Sat May 12 02:49:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78438106566C; Sat, 12 May 2012 02:49:41 +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 4A09B8FC08; Sat, 12 May 2012 02:49:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4C2nfr3011971; Sat, 12 May 2012 02:49:41 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4C2nffA011969; Sat, 12 May 2012 02:49:41 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201205120249.q4C2nffA011969@svn.freebsd.org> From: Matthew D Fleming Date: Sat, 12 May 2012 02:49: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: r235316 - head/bin/kenv X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 02:49:41 -0000 Author: mdf Date: Sat May 12 02:49:40 2012 New Revision: 235316 URL: http://svn.freebsd.org/changeset/base/235316 Log: I forgot to bump the manpage date. Reminded by: Garrett Cooper MFC after: 3 days X-MFC-with: r235297 Modified: head/bin/kenv/kenv.1 Modified: head/bin/kenv/kenv.1 ============================================================================== --- head/bin/kenv/kenv.1 Sat May 12 00:55:49 2012 (r235315) +++ head/bin/kenv/kenv.1 Sat May 12 02:49:40 2012 (r235316) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 13, 2009 +.Dd May 11, 2012 .Dt KENV 1 .Os .Sh NAME From owner-svn-src-head@FreeBSD.ORG Sat May 12 03:25:48 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4682C106564A; Sat, 12 May 2012 03:25:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2EF218FC08; Sat, 12 May 2012 03:25:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4C3Pm5D013433; Sat, 12 May 2012 03:25:48 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4C3PlR6013371; Sat, 12 May 2012 03:25:47 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205120325.q4C3PlR6013371@svn.freebsd.org> From: Glen Barber Date: Sat, 12 May 2012 03:25: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: r235317 - in head: share/man/man4 usr.sbin/nfsd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 03:25:48 -0000 Author: gjb (doc committer) Date: Sat May 12 03:25:46 2012 New Revision: 235317 URL: http://svn.freebsd.org/changeset/base/235317 Log: General mdoc(7) and typo fixes. PR: 167776 Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org) MFC after: 3 days Modified: head/share/man/man4/acpi_hp.4 head/share/man/man4/acpi_wmi.4 head/share/man/man4/ahci.4 head/share/man/man4/ath.4 head/share/man/man4/atp.4 head/share/man/man4/bpf.4 head/share/man/man4/bridge.4 head/share/man/man4/capsicum.4 head/share/man/man4/ch.4 head/share/man/man4/cpuctl.4 head/share/man/man4/cxgbe.4 head/share/man/man4/dcons.4 head/share/man/man4/ddb.4 head/share/man/man4/epair.4 head/share/man/man4/fdt.4 head/share/man/man4/fdtbus.4 head/share/man/man4/gdb.4 head/share/man/man4/ip.4 head/share/man/man4/ipmi.4 head/share/man/man4/ipw.4 head/share/man/man4/isci.4 head/share/man/man4/isp.4 head/share/man/man4/iwn.4 head/share/man/man4/mac_none.4 head/share/man/man4/mac_stub.4 head/share/man/man4/mps.4 head/share/man/man4/net80211.4 head/share/man/man4/netmap.4 head/share/man/man4/ng_etf.4 head/share/man/man4/ng_nat.4 head/share/man/man4/ng_netflow.4 head/share/man/man4/ng_socket.4 head/share/man/man4/pcm.4 head/share/man/man4/pcn.4 head/share/man/man4/psm.4 head/share/man/man4/rl.4 head/share/man/man4/run.4 head/share/man/man4/ses.4 head/share/man/man4/siftr.4 head/share/man/man4/simplebus.4 head/share/man/man4/sis.4 head/share/man/man4/sk.4 head/share/man/man4/snd_hda.4 head/share/man/man4/snd_hdspe.4 head/share/man/man4/splash.4 head/share/man/man4/ste.4 head/share/man/man4/termios.4 head/share/man/man4/ti.4 head/share/man/man4/tl.4 head/share/man/man4/tws.4 head/share/man/man4/uhso.4 head/share/man/man4/ulpt.4 head/share/man/man4/umcs.4 head/share/man/man4/uslcom.4 head/share/man/man4/vr.4 head/share/man/man4/watchdog.4 head/share/man/man4/wb.4 head/share/man/man4/wpi.4 head/share/man/man4/xl.4 head/share/man/man4/xnb.4 head/usr.sbin/nfsd/nfsv4.4 Modified: head/share/man/man4/acpi_hp.4 ============================================================================== --- head/share/man/man4/acpi_hp.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/acpi_hp.4 Sat May 12 03:25:46 2012 (r235317) @@ -261,7 +261,7 @@ device driver first appeared in The .Nm driver was written by -.An Michael Gmelin Aq freebsd@grem.de +.An Michael Gmelin Aq freebsd@grem.de . .Pp It has been inspired by hp-wmi driver, which implements a subset of these features (hotkeys) on Linux. @@ -275,7 +275,7 @@ http://www.microsoft.com/whdc/system/pnp .El .Pp This manual page was written by -.An Michael Gmelin Aq freebsd@grem.de +.An Michael Gmelin Aq freebsd@grem.de . .Sh BUGS This driver is experimental and has only been tested on i386 on an HP Compaq 8510p which featured all supported wireless devices (WWAN/BT/WLAN). Modified: head/share/man/man4/acpi_wmi.4 ============================================================================== --- head/share/man/man4/acpi_wmi.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/acpi_wmi.4 Sat May 12 03:25:46 2012 (r235317) @@ -85,12 +85,12 @@ device driver first appeared in The .Nm driver was written by -.An Michael Gmelin Aq freebsd@grem.de +.An Michael Gmelin Aq freebsd@grem.de . .Pp -Work has been inspired by the Linux acpi-wmi driver written by Carlos Corbacho +Work has been inspired by the Linux acpi-wmi driver written by Carlos Corbacho. .Pp See http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx for the specification of ACPI-WMI. .Pp This manual page was written by -.An Michael Gmelin Aq freebsd@grem.de +.An Michael Gmelin Aq freebsd@grem.de . Modified: head/share/man/man4/ahci.4 ============================================================================== --- head/share/man/man4/ahci.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/ahci.4 Sat May 12 03:25:46 2012 (r235317) @@ -51,7 +51,7 @@ The following tunables are settable from .Xr loader 8 : .Bl -ohang .It Va hint.ahci. Ns Ar X Ns Va .msi -controls Message Signaled Interrupts (MSI) usage by the specified controller +controls Message Signaled Interrupts (MSI) usage by the specified controller. .Bl -tag -compact .It 0 MSI disabled; Modified: head/share/man/man4/ath.4 ============================================================================== --- head/share/man/man4/ath.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/ath.4 Sat May 12 03:25:46 2012 (r235317) @@ -186,7 +186,7 @@ ifconfig wlan0 meshid my_mesh mode 11a i .Ed .Pp Create two virtual 802.11a host-based access points, one with -with WEP enabled and one with no security, and bridge them to +WEP enabled and one with no security, and bridge them to the fxp0 (wired) device: .Bd -literal -offset indent ifconfig wlan0 create wlandev ath0 wlanmode hostap \e @@ -221,7 +221,7 @@ data frames failed. This should not happen. .It "ath%d: unable to setup a beacon xmit queue!" The request to the HAL to set up the transmit queue for 802.11 beacon frames -frames failed. +failed. This should not happen. .It "ath%d: 802.11 address: %s" The MAC address programmed in the EEPROM is displayed. Modified: head/share/man/man4/atp.4 ============================================================================== --- head/share/man/man4/atp.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/atp.4 Sat May 12 03:25:46 2012 (r235317) @@ -171,10 +171,10 @@ consoles as well as in X change it to: .Xr loader.conf 5 , .Xr xorg.conf 5 Pq Pa ports/x11/xorg , .Xr moused 8 , -.Xr sysctl 8 . +.Xr sysctl 8 .Sh AUTHORS .An -nosplit The .Nm driver was written by -.An Rohit Grover Aq rgrover1@gmail.com +.An Rohit Grover Aq rgrover1@gmail.com . Modified: head/share/man/man4/bpf.4 ============================================================================== --- head/share/man/man4/bpf.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/bpf.4 Sat May 12 03:25:46 2012 (r235317) @@ -642,7 +642,7 @@ struct bpf_xhdr { uint32_t bh_caplen; /* length of captured portion */ uint32_t bh_datalen; /* original length of packet */ u_short bh_hdrlen; /* length of bpf header (this struct - plus alignment padding */ + plus alignment padding) */ }; struct bpf_hdr { @@ -650,7 +650,7 @@ struct bpf_hdr { uint32_t bh_caplen; /* length of captured portion */ uint32_t bh_datalen; /* original length of packet */ u_short bh_hdrlen; /* length of bpf header (this struct - plus alignment padding */ + plus alignment padding) */ }; .Ed .Pp Modified: head/share/man/man4/bridge.4 ============================================================================== --- head/share/man/man4/bridge.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/bridge.4 Sat May 12 03:25:46 2012 (r235317) @@ -410,7 +410,8 @@ Note that .Fx 6.1, 6.2, 6.3, 7.0, 7.1, and 7.2 have a bug in the EtherIP protocol. For more details and workaround, see -.Xr gif 4 manual page. +.Xr gif 4 +manual page. .Sh SEE ALSO .Xr gif 4 , .Xr ipf 4 , Modified: head/share/man/man4/capsicum.4 ============================================================================== --- head/share/man/man4/capsicum.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/capsicum.4 Sat May 12 03:25:46 2012 (r235317) @@ -55,7 +55,7 @@ A process mode, entered by invoking in which access to global OS namespaces (such as the file system and PID namespaces) is restricted; only explicitly delegated rights, referenced by memory mappings or file descriptors, may be used. -Once set, the flag is inherited by future children proceses, and may not be +Once set, the flag is inherited by future children processes, and may not be cleared. .It capabilities File descriptors that wrap other file descriptors, masking operations that can Modified: head/share/man/man4/ch.4 ============================================================================== --- head/share/man/man4/ch.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/ch.4 Sat May 12 03:25:46 2012 (r235317) @@ -187,7 +187,7 @@ u_int cp_ndrives; /* number of drives * This call can be used by applications to query the dimensions of the jukebox before using the .Dv CHIGSTATUS -ioctl to query the jukebox' status. +ioctl to query the jukebox status. .It Dv CHIOIELEM Perform the .Sy INITIALIZE ELEMENT STATUS @@ -230,7 +230,8 @@ base address and number of elements for returned in the array of .Vt changer_element_status structures pointed to by the -.Va cesr_element_status field . +.Va cesr_element_status +field. The application must allocate enough memory for .Va cesr_element_count Modified: head/share/man/man4/cpuctl.4 ============================================================================== --- head/share/man/man4/cpuctl.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/cpuctl.4 Sat May 12 03:25:46 2012 (r235317) @@ -124,8 +124,8 @@ For additional information refer to .Sh RETURN VALUES .Bl -tag -width Er .It Bq Er ENXIO -The operation requested is not supported by the device (e.g. unsupported -architecture or the CPU is disabled) +The operation requested is not supported by the device (e.g., unsupported +architecture or the CPU is disabled). .It Bq Er EINVAL Incorrect request was supplied, or microcode image is not correct. .It Bq Er ENOMEM Modified: head/share/man/man4/cxgbe.4 ============================================================================== --- head/share/man/man4/cxgbe.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/cxgbe.4 Sat May 12 03:25:46 2012 (r235317) @@ -220,7 +220,7 @@ email all the specific information relat The .Nm device driver first appeared in -.Fx 9.0 +.Fx 9.0 . .Sh AUTHORS .An -nosplit The Modified: head/share/man/man4/dcons.4 ============================================================================== --- head/share/man/man4/dcons.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/dcons.4 Sat May 12 03:25:46 2012 (r235317) @@ -104,7 +104,7 @@ If you want to use as a .Xr gdb 1 port, add the following line into -.Xr loader.conf 5 +.Xr loader.conf 5 : .Bd -literal -offset indent dcons_gdb="1" .Ed Modified: head/share/man/man4/ddb.4 ============================================================================== --- head/share/man/man4/ddb.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/ddb.4 Sat May 12 03:25:46 2012 (r235317) @@ -1031,14 +1031,14 @@ Number of allocations requests to the gi .Pp The very same information might be gathered in the userspace with the help of -.Dq Nm vmstat Fl z +.Dq Nm vmstat Fl z . .\" .Pp .It Ic show Cm unpcb Ar addr Shows UNIX domain socket private control block .Vt struct unpcb present at the address -.Ar addr +.Ar addr . .\" .Pp .It Ic show Cm vmochk Modified: head/share/man/man4/epair.4 ============================================================================== --- head/share/man/man4/epair.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/epair.4 Sat May 12 03:25:46 2012 (r235317) @@ -33,7 +33,7 @@ .Os .Sh NAME .Nm epair -.Nd A pair of virtual back-to-back connected Ethernet interfaces. +.Nd A pair of virtual back-to-back connected Ethernet interfaces .Sh SYNOPSIS To compile this driver into the kernel, place the following line in your Modified: head/share/man/man4/fdt.4 ============================================================================== --- head/share/man/man4/fdt.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/fdt.4 Sat May 12 03:25:46 2012 (r235317) @@ -143,8 +143,10 @@ The primary option for enabling support in the kernel. It covers all low-level and infrastructure parts of .Nm kernel support, which primarily are the -.Xr fdtbus 4 and -.Xr simplebus 4 drivers, as well as helper routines and libraries. +.Xr fdtbus 4 +and +.Xr simplebus 4 +drivers, as well as helper routines and libraries. .It Va makeoptions FDT_DTS_FILE=.dts Specifies a preferred (default) device tree source (DTS) file for a given kernel. The indicated DTS file will be converted (compiled) into a binary form @@ -163,7 +165,7 @@ specified in order to embed it into the .Sh SEE ALSO .Xr fdtbus 4 , .Xr openfirm 4 , -.Xr simplebus 4 , +.Xr simplebus 4 .Sh STANDARDS IEEE Std 1275: IEEE Standard for Boot (Initialization Configuration) Firmware: Core Requirements and Practices Modified: head/share/man/man4/fdtbus.4 ============================================================================== --- head/share/man/man4/fdtbus.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/fdtbus.4 Sat May 12 03:25:46 2012 (r235317) @@ -51,7 +51,8 @@ represents peripherals typically found o The .Nm driver provides generic, common infrastructure for all -.Xr fdt 4 oriented device drivers, and its main responsibilities are the +.Xr fdt 4 +oriented device drivers, and its main responsibilities are the following: .Bl -bullet .It @@ -66,7 +67,7 @@ Managing SYS_RES_MEMORY, SYS_RES_IOPORT .Sh SEE ALSO .Xr fdt 4 , .Xr openfirm 4 , -.Xr simplebus 4 , +.Xr simplebus 4 .Sh STANDARDS IEEE Std 1275: IEEE Standard for Boot (Initialization Configuration) Firmware: Core Requirements and Practices Modified: head/share/man/man4/gdb.4 ============================================================================== --- head/share/man/man4/gdb.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/gdb.4 Sat May 12 03:25:46 2012 (r235317) @@ -508,7 +508,7 @@ pointed to by the local variable .It Ic checkmem Check unallocated memory for modifications. This assumes that the kernel has been compiled with -.Cd "options DIAGNOSTIC" +.Cd "options DIAGNOSTIC" . This causes the contents of free memory to be set to .Li 0xdeadc0de . .It Ic dmesg @@ -595,7 +595,7 @@ run the link at more than 9600 bps. Firewire connections do not have this problem. .Pp The debugging macros -.Dq "just growed" . +.Dq "just grown" . In general, the person who wrote them did so while looking for a specific problem, so they may not be general enough, and they may behave badly when used in ways for which they were not intended, even if those ways make sense. Modified: head/share/man/man4/ip.4 ============================================================================== --- head/share/man/man4/ip.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/ip.4 Sat May 12 03:25:46 2012 (r235317) @@ -215,7 +215,8 @@ before transmission. This is in contrast to the default behavior of the system, which is to transmit undirected broadcasts via the first network interface with the -.Dv IFF_BROADCAST flag set. +.Dv IFF_BROADCAST +flag set. .Pp This option allows applications to choose which interface is used to transmit an undirected broadcast @@ -235,12 +236,14 @@ sendto(s, msg, sizeof(msg), 0, &sin, siz .Ed .Pp It is the application's responsibility to set the -.Dv IP_TTL option +.Dv IP_TTL +option to an appropriate value in order to prevent broadcast storms. The application must have sufficient credentials to set the .Dv SO_BROADCAST socket level option, otherwise the -.Dv IP_ONESBCAST option has no effect. +.Dv IP_ONESBCAST +option has no effect. .Pp If the .Dv IP_BINDANY @@ -851,4 +854,5 @@ Before packets received on raw IP sockets had the .Va ip_hl subtracted from the -.Va ip_len field. +.Va ip_len +field. Modified: head/share/man/man4/ipmi.4 ============================================================================== --- head/share/man/man4/ipmi.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/ipmi.4 Sat May 12 03:25:46 2012 (r235317) @@ -130,7 +130,7 @@ Send a message to the interface. Possible error values: .Bl -tag -width Er .It Bq Er EFAULT -An address supplied was invalid +An address supplied was invalid. .It Bq Er ENOMEM Buffers could not be allowed for the command, out of memory. .El @@ -146,7 +146,7 @@ Get the slave LUN for source messages. .Ss Unimplemented Ioctls .Bl -tag -width indent .It Dv IPMICTL_REGISTER_FOR_CMD Pq Vt "struct ipmi_cmdspec" -Register to receive a specific command +Register to receive a specific command. Possible error values: .Bl -tag -width Er .It Bq Er EFAULT @@ -157,7 +157,7 @@ The network function/command is already Could not allocate memory. .El .It Dv IPMICTL_UNREGISTER_FOR_CMD Pq Vt "struct ipmi_cmdspec" -Unregister to receive a specific command +Unregister to receive a specific command. Possible error values: .Bl -tag -width Er .It Bq Er EFAULT Modified: head/share/man/man4/ipw.4 ============================================================================== --- head/share/man/man4/ipw.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/ipw.4 Sat May 12 03:25:46 2012 (r235317) @@ -147,9 +147,9 @@ This should not happen. .Xr wlan_tkip 4 , .Xr wlan_wep 4 , .Xr ifconfig 8 , -.Xr wpa_supplicant 8 . +.Xr wpa_supplicant 8 .Sh AUTHORS The original .Nm driver was written by -.An Damien Bergamini Aq damien.bergamini@free.fr +.An Damien Bergamini Aq damien.bergamini@free.fr . Modified: head/share/man/man4/isci.4 ============================================================================== --- head/share/man/man4/isci.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/isci.4 Sat May 12 03:25:46 2012 (r235317) @@ -98,7 +98,8 @@ to the kernel configuration file. The .Nm driver first appeared in -.Fx 8.3 and 9.1 . +.Fx 8.3 +and 9.1. .Sh AUTHORS .An -nosplit The Modified: head/share/man/man4/isp.4 ============================================================================== --- head/share/man/man4/isp.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/isp.4 Sat May 12 03:25:46 2012 (r235317) @@ -64,7 +64,7 @@ Ultra2 LVD (for the ISP1080 and ISP1280) ISP12160). .Pp Fibre Channel support uses FCP SCSI profile for -.Tn FibreChannel . +.Tn FibreChannel , and utilizes Class 3 and Class 2 connections (Qlogic 2100 is Class 3 only, minor patches to the Qlogic 2200 to force Class 2 mode). Support is available for Public and Private loops, and for Modified: head/share/man/man4/iwn.4 ============================================================================== --- head/share/man/man4/iwn.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/iwn.4 Sat May 12 03:25:46 2012 (r235317) @@ -179,4 +179,4 @@ This should not happen. The original .Nm driver was written by -.An Damien Bergamini Aq damien.bergamini@free.fr +.An Damien Bergamini Aq damien.bergamini@free.fr . Modified: head/share/man/man4/mac_none.4 ============================================================================== --- head/share/man/man4/mac_none.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/mac_none.4 Sat May 12 03:25:46 2012 (r235317) @@ -45,7 +45,7 @@ configuration file: .Cd "options MAC_NONE" .Ed .Pp -Alternately, to load the sample module at boot time, place the following line +Alternately, to load the none module at boot time, place the following line in your kernel configuration file: .Bd -ragged -offset indent .Cd "options MAC" @@ -59,7 +59,7 @@ mac_none_load="YES" .Sh DESCRIPTION The .Nm -policy module implements a sample MAC policy that has no effect on +policy module implements a none MAC policy that has no effect on access control in the system. Unlike .Xr mac_stub 4 , Modified: head/share/man/man4/mac_stub.4 ============================================================================== --- head/share/man/man4/mac_stub.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/mac_stub.4 Sat May 12 03:25:46 2012 (r235317) @@ -37,7 +37,7 @@ .Nm mac_stub .Nd "MAC policy stub module" .Sh SYNOPSIS -To compile the sample policy +To compile the stub policy into your kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent @@ -45,7 +45,7 @@ configuration file: .Cd "options MAC_STUB" .Ed .Pp -Alternately, to load the sample module at boot time, place the following line +Alternately, to load the stub module at boot time, place the following line in your kernel configuration file: .Bd -ragged -offset indent .Cd "options MAC" @@ -59,7 +59,7 @@ mac_stub_load="YES" .Sh DESCRIPTION The .Nm -policy module implements a sample MAC policy that has no effect on +policy module implements a stub MAC policy that has no effect on access control in the system. Unlike .Xr mac_none 4 , Modified: head/share/man/man4/mps.4 ============================================================================== --- head/share/man/man4/mps.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/mps.4 Sat May 12 03:25:46 2012 (r235317) @@ -209,7 +209,7 @@ Not endian safe. It only works on little endian machines (e.g. amd64 and i386). .It No userland utility available (e.g. -.Xr mptutil 8) +.Xr mptutil 8 ) . .It The driver probes devices sequentially. If your system has a large number of devices, the probe will take a while. Modified: head/share/man/man4/net80211.4 ============================================================================== --- head/share/man/man4/net80211.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/net80211.4 Sat May 12 03:25:46 2012 (r235317) @@ -366,7 +366,7 @@ Valid values are: 0 (do not promote, use legacy), 1 (promote to HT20), and -2 (promote to HT40), +2 (promote to HT40). .It Dv IEEE80211_IOC_HTPROTMODE Return, in .Va i_val , @@ -447,7 +447,7 @@ Return the number of SSIDs supported in .Va i_val . .It Dv IEEE80211_IOC_NUMWEPKEYS Return the number of WEP keys supported in -.Va i_val +.Va i_val . .It Dv IEEE80211_IOC_POWERSAVE Return the current powersaving mode in .Va i_val . @@ -923,8 +923,8 @@ using the value in .Va i_val . .It Dv IEEE80211_IOC_DTIM_PERIOD Set the period (in beacon intervals) between DTIM events to the value in -This request causes a running interface to be restarted. .Va i_val . +This request causes a running interface to be restarted. .It Dv IEEE80211_IOC_DWDS Set whether or not Dynamic WDS support is enabled using the value in .Va i_val . Modified: head/share/man/man4/netmap.4 ============================================================================== --- head/share/man/man4/netmap.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/netmap.4 Sat May 12 03:25:46 2012 (r235317) @@ -46,7 +46,7 @@ uses memory mapped buffers and metadata which is in charge of validating information through .Pa ioctl() and -.Pa select()/poll(). +.Pa select()/poll() . .Nm can exploit the parallelism in multiqueue devices and multicore systems. Modified: head/share/man/man4/ng_etf.4 ============================================================================== --- head/share/man/man4/ng_etf.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/ng_etf.4 Sat May 12 03:25:46 2012 (r235317) @@ -135,7 +135,6 @@ nghook -a etf: newproto & # Filter two random ethertypes to that hook. ngctl 'msg etf: setfilter { matchhook="newproto" ethertype=${MATCH1} } ngctl 'msg etf: setfilter { matchhook="newproto" ethertype=${MATCH2} } -DONE .Ed .Sh SHUTDOWN This node shuts down upon receipt of a Modified: head/share/man/man4/ng_nat.4 ============================================================================== --- head/share/man/man4/ng_nat.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/ng_nat.4 Sat May 12 03:25:46 2012 (r235317) @@ -61,7 +61,7 @@ After both hooks have been connected and a node is ready for aliasing operation. .It Dv NGM_NAT_SET_MODE Pq Li setmode Set node's operation mode using supplied -.Vt "struct ng_nat_mode". +.Vt "struct ng_nat_mode" . .Bd -literal struct ng_nat_mode { uint32_t flags; @@ -193,7 +193,7 @@ are also ignored after was used (they are effectively replaced by server pool). .It Dv NGM_NAT_LIST_REDIRECTS Pq Li listredirects Return list of configured static redirects as -.Vt "struct ng_nat_list_redirects". +.Vt "struct ng_nat_list_redirects" . .Bd -literal struct ng_nat_listrdrs_entry { uint32_t id; /* Anything except zero */ Modified: head/share/man/man4/ng_netflow.4 ============================================================================== --- head/share/man/man4/ng_netflow.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/ng_netflow.4 Sat May 12 03:25:46 2012 (r235317) @@ -218,7 +218,7 @@ struct ng_netflow_settemtu { }; .Ed .Pp -Default is 1500 bytes +Default is 1500 bytes. .It Dv NGM_NETFLOW_SHOW This control message asks a node to dump the entire contents of the flow cache. It is called from @@ -284,7 +284,7 @@ node in this example is connected to The latter sends us a copy of IP packets, which we analyze and free. On .Va fxp0: -we do not use tee, but send packets back to ether node. +we do not use tee, but send packets back to either node. .Bd -literal -offset indent /usr/sbin/ngctl -f- <<-SEQ # connect ng0's tee to iface0 hook Modified: head/share/man/man4/ng_socket.4 ============================================================================== --- head/share/man/man4/ng_socket.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/ng_socket.4 Sat May 12 03:25:46 2012 (r235317) @@ -93,7 +93,8 @@ socket must also be created using and associated with a .Nm node. -.Dv NG_DATA sockets do not automatically +.Dv NG_DATA +sockets do not automatically have nodes associated with them; they are bound to a specific node via the .Xr connect 2 system call. Modified: head/share/man/man4/pcm.4 ============================================================================== --- head/share/man/man4/pcm.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/pcm.4 Sat May 12 03:25:46 2012 (r235317) @@ -390,7 +390,7 @@ Quality values are 100dB stopband, 8 tap Continuation of the bandlimited SINC interpolator, with 100dB stopband, 36 taps and 90% bandwidth as quality values. .It 4 -Continuation of the bandlimited SINC inteprolator, with 100dB stopband, 164 +Continuation of the bandlimited SINC interprolator, with 100dB stopband, 164 taps and 97% bandwidth as quality values. .El .It Va hw.snd.feeder_rate_round @@ -519,7 +519,7 @@ By default only 2 channels are enabled. Available options include: .Bl -tag -width 2n .It s16le:1.0 -Mono +Mono. .It s16le:2.0 Stereo, 2 channels (left, right). .It s16le:2.1 Modified: head/share/man/man4/pcn.4 ============================================================================== --- head/share/man/man4/pcn.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/pcn.4 Sat May 12 03:25:46 2012 (r235317) @@ -104,7 +104,7 @@ The driver supports the following media options: .Bl -tag -width full-duplex .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .El Modified: head/share/man/man4/psm.4 ============================================================================== --- head/share/man/man4/psm.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/psm.4 Sat May 12 03:25:46 2012 (r235317) @@ -725,7 +725,7 @@ psm0: syncmask:xx, syncbits:yy .Pp The first line shows the command byte value of the keyboard controller just before the auxiliary port is probed. -It usually is 4D, 45, 47 or 65, depending on how the motherboard BIOS +It usually is 40, 45, 47 or 65, depending on how the motherboard BIOS initialized the keyboard controller upon power-up. .Pp The second line shows the result of the keyboard controller's Modified: head/share/man/man4/rl.4 ============================================================================== --- head/share/man/man4/rl.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/rl.4 Sat May 12 03:25:46 2012 (r235317) @@ -119,7 +119,7 @@ The driver supports the following media options: .Bl -tag -width xxxxxxxxxxxxxxxxxxxx .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .El Modified: head/share/man/man4/run.4 ============================================================================== --- head/share/man/man4/run.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/run.4 Sat May 12 03:25:46 2012 (r235317) @@ -208,7 +208,7 @@ This should not happen. .Xr wlan_xauth 4 , .Xr ifconfig 8 , .Xr hostapd 8 , -.Xr wpa_supplicant 8 . +.Xr wpa_supplicant 8 .Pp Ralink Technology: .Pa http://www.ralinktech.com/ Modified: head/share/man/man4/ses.4 ============================================================================== --- head/share/man/man4/ses.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/ses.4 Sat May 12 03:25:46 2012 (r235317) @@ -101,7 +101,7 @@ Set the status of a particular object. Get the associated help text for an object (not yet implemented). .Nm devices often have descriptive text for an object which can tell -you things like location (e.g, "left power supply"). +you things like location (e.g., "left power supply"). .It Dv SESIOC_INIT Initialize the enclosure. .El Modified: head/share/man/man4/siftr.4 ============================================================================== --- head/share/man/man4/siftr.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/siftr.4 Sat May 12 03:25:46 2012 (r235317) @@ -137,7 +137,7 @@ All messages are written in plain ASCII Note: The .Qq \e present in the example log messages in this section indicates a -line continuation and is not part of the actual log message +line continuation and is not part of the actual log message. .Pp The first type of log message is written to the file when the module is enabled and starts collecting data from the running kernel. The text below @@ -169,15 +169,15 @@ tick rate of the kernel in ticks per sec .El .Bl -tag -offset indent .It Va tcp_rtt_scale -smoothed RTT estimate scaling factor +smoothed RTT estimate scaling factor. .El .Bl -tag -offset indent .It Va sysname -operating system name +operating system name. .El .Bl -tag -offset indent .It Va sysver -operating system version +operating system version. .El .Bl -tag -offset indent .It Va ipmode Modified: head/share/man/man4/simplebus.4 ============================================================================== --- head/share/man/man4/simplebus.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/simplebus.4 Sat May 12 03:25:46 2012 (r235317) @@ -60,11 +60,12 @@ configuration data retrieved from the no Note the .Nm does not manage device resources and passes through any requests to the -.Xr fdtbus 4 layer. +.Xr fdtbus 4 +layer. .Sh SEE ALSO .Xr fdt 4 , .Xr fdtbus 4 , -.Xr openfirm 4 , +.Xr openfirm 4 .Sh STANDARDS Power.org Standard for Embedded Power Architecture Platform Requirements .Pq Vt ePAPR . Modified: head/share/man/man4/sis.4 ============================================================================== --- head/share/man/man4/sis.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/sis.4 Sat May 12 03:25:46 2012 (r235317) @@ -113,7 +113,7 @@ The driver supports the following media options: .Bl -tag -width full-duplex .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .El Modified: head/share/man/man4/sk.4 ============================================================================== --- head/share/man/man4/sk.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/sk.4 Sat May 12 03:25:46 2012 (r235317) @@ -127,7 +127,7 @@ The driver supports the following media options: .Bl -tag -width xxxxxxxxxxxxxxxxxxxx .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .El Modified: head/share/man/man4/snd_hda.4 ============================================================================== --- head/share/man/man4/snd_hda.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/snd_hda.4 Sat May 12 03:25:46 2012 (r235317) @@ -235,10 +235,10 @@ first pin in that association. .Pp The sequence numbers 14 and 15 has a special meaning for input associations. Their presence in association defines it as multiplexed or mixed respectively. -If none of them present and there are more then one pin in association, +If none of them are present and there are more than one pin in association, the association will provide multichannel input. .Pp -For multichannel input/output assotiations sequence numbers encode +For multichannel input/output associations sequence numbers encode channel pairs positions: 0 - Front, 1 - Center/LFE, 2 - Back, 3 - Front Wide Center, 4 - Side. Standard combinations are: (0) - Stereo; (0, 2), (0, 4) - Quadro; @@ -368,7 +368,7 @@ Original pin configuration written by BI .It Va dev.hdaa.%d.reconfig Setting this to a non-zero value makes driver to destroy existing pcm devices and process new pins configuration set via -.Va dev.hdaa.%d.nid%d_config. +.Va dev.hdaa.%d.nid%d_config . .It Va dev.pcm.%d.play.32bit , dev.pcm.%d.rec.32bit HDA controller uses 32bit representation for all samples of more then 16 bits. These variables allow to specify how many bits of these 32 should be @@ -586,7 +586,7 @@ subclass 3 (HDA), compatible with Intel .Pp The .Nm -driver supports more then two hundred different controllers and CODECs. +driver supports more than two hundred different controllers and CODECs. There is no sense to list all of them here, as in most cases specific CODEC configuration and wiring are more important then type of the CODEC itself. .Sh SEE ALSO Modified: head/share/man/man4/snd_hdspe.4 ============================================================================== --- head/share/man/man4/snd_hdspe.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/snd_hdspe.4 Sat May 12 03:25:46 2012 (r235317) @@ -29,7 +29,7 @@ .Os .Sh NAME .Nm snd_hdspe -.Nd "RME HDSPe brigde device driver" +.Nd "RME HDSPe bridge device driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: Modified: head/share/man/man4/splash.4 ============================================================================== --- head/share/man/man4/splash.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/splash.4 Sat May 12 03:25:46 2012 (r235317) @@ -234,8 +234,7 @@ first example above. .Pp To load a binary ASCII drawing and display this while booting, include the following into your -.Pa /boot/loader.conf -: +.Pa /boot/loader.conf : .Bd -literal -offset indent splash_txt_load="YES" bitmap_load="YES" Modified: head/share/man/man4/ste.4 ============================================================================== --- head/share/man/man4/ste.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/ste.4 Sat May 12 03:25:46 2012 (r235317) @@ -103,7 +103,7 @@ The driver supports the following media options: .Bl -tag -width xxxxxxxxxxxxxxxxxxxx .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .El Modified: head/share/man/man4/termios.4 ============================================================================== --- head/share/man/man4/termios.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/termios.4 Sat May 12 03:25:46 2012 (r235317) @@ -197,7 +197,8 @@ signal, or if the process group of the r process is orphaned, the .Xr read 2 returns -1 with -.Va errno set to +.Va errno +set to .Er EIO and no signal is sent. Modified: head/share/man/man4/ti.4 ============================================================================== --- head/share/man/man4/ti.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/ti.4 Sat May 12 03:25:46 2012 (r235317) @@ -144,7 +144,7 @@ or modes. .It 1000baseSX Set 1000Mbps (Gigabit Ethernet) operation. -Only full +Only .Ar full-duplex mode is supported at this speed. .El @@ -154,7 +154,7 @@ The driver supports the following media options: .Bl -tag -width xxxxxxxxxxxxxxxxxxxx .It full-duplex -Force full duplex operation +Force full-duplex operation. .It half-duplex Force half duplex operation. .El @@ -240,14 +240,14 @@ when either of the thresholds is exceede A value of 0 means that this parameter is ignored and receive BDs will only be returned when the receive max coalesced BDs value is reached. -The default valus is 170. +The default value is 170. .It Va dev.ti.%d.rx_max_coal_bds This value, receive max coalesced BDs, controls the number of receive buffer descriptors that will be coalesced before the NIC updates the receive return ring producer index. If this value is set to 0 it will disable receive buffer descriptor coalescing. -The default valus is 64. +The default value is 64. .It Va dev.ti.%d.ti_tx_coal_ticks This value, send coalesced ticks, controls the number of clock ticks (of 1 microseconds each) that must elapse before the NIC DMAs @@ -263,9 +263,9 @@ The default value is 2000. This value, send max coalesced BDs, controls the number of send buffer descriptors that will be coalesced before the NIC updates the send consumer index. -If this valus is set to 0 it will disable send buffer descriptor +If this value is set to 0 it will disable send buffer descriptor coalescing. -The default valus is 32. +The default value is 32. .It Va dev.ti.%d.tx_buf_ratio This value controls the ratio of the remaining memory in the NIC that should be devoted to transmit buffer vs. receive buffer. @@ -348,7 +348,7 @@ Write to the requested memory region on The argument is .Vt "struct tg_mem" . .It Dv ALT_READ_TG_REG -Read the requested register on the Tigon board. +Read the requested register from the Tigon board. The argument is .Vt "struct tg_reg" . .It Dv ALT_WRITE_TG_REG Modified: head/share/man/man4/tl.4 ============================================================================== --- head/share/man/man4/tl.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/tl.4 Sat May 12 03:25:46 2012 (r235317) @@ -82,9 +82,9 @@ option is only available on those PHYs t Also, the PHY will not advertise those modes that have been explicitly disabled using the following media options. .It 10baseT/UTP -Set 10Mbps operation +Set 10Mbps operation. .It 100baseTX -Set 100Mbps (Fast Ethernet) operation +Set 100Mbps (Fast Ethernet) operation. .It 10base5/AUI Enable AUI/BNC interface (useful only with the built-in PHY). .El @@ -94,7 +94,7 @@ The driver supports the following media options: .Bl -tag -width xxxxxxxxxxxxxxxxxxxx .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .It hw-loopback Modified: head/share/man/man4/tws.4 ============================================================================== --- head/share/man/man4/tws.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/tws.4 Sat May 12 03:25:46 2012 (r235317) @@ -74,13 +74,13 @@ prompt before booting the kernel or stor .Xr loader.conf 5 . .Bl -tag -width "hw.tws.use_32bit_sgls" .It Va hw.tws.cam_depth -The maximium queued CAM SIM requests for one controller. +The maximum queued CAM SIM requests for one controller. The default value is 256. .It Va hw.tws.enable_msi This tunable enables MSI support on the controller if set to a non-zero value. The default value is 0. .It Va hw.tws.queue_depth -The maximium queued requests for one controller. +The maximum queued requests for one controller. .It Va hw.tws.use_32bit_sgls Limit the driver to use only 32-bit SG elements regardless whether the operating system is running in 64-bit mode. Modified: head/share/man/man4/uhso.4 ============================================================================== --- head/share/man/man4/uhso.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/uhso.4 Sat May 12 03:25:46 2012 (r235317) @@ -100,7 +100,7 @@ mode to modem mode. This behavior can be disabled by setting .Va hw.usb.uhso.auto_switch to 0 using -.Xr sysctl 8 +.Xr sysctl 8 . .Sh FILES .Bl -tag -width "XXXXXX" .It Pa /dev/cuaU?.? Modified: head/share/man/man4/ulpt.4 ============================================================================== --- head/share/man/man4/ulpt.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/ulpt.4 Sat May 12 03:25:46 2012 (r235317) @@ -57,7 +57,7 @@ bi- or uni-directional protocol. The bits in the minor number select various features of the driver. .Bl -column "Minor Bit" "Functionxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -offset indent .Em "Minor Bit Function" -64 "Do not initialize (reset) the device on the port." +64 Do not initialize (reset) the device on the port. .El .Pp Some printers cannot handle the reset on open; in case of problems try the Modified: head/share/man/man4/umcs.4 ============================================================================== --- head/share/man/man4/umcs.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/umcs.4 Sat May 12 03:25:46 2012 (r235317) @@ -68,7 +68,7 @@ driver which makes it behave like a Different ports on device are presented as sub-units, like .Pa /dev/ttyU0.1 and -.Pa /dev/ttyU0.2 +.Pa /dev/ttyU0.2 . .Sh HARDWARE The .Nm Modified: head/share/man/man4/uslcom.4 ============================================================================== --- head/share/man/man4/uslcom.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/uslcom.4 Sat May 12 03:25:46 2012 (r235317) @@ -41,7 +41,7 @@ uslcom_load="YES" .Sh DESCRIPTION The .Nm -driver supports Silicon Laboratories CP2101/CP2102 based serial adapters. +driver supports Silicon Laboratories CP2101/CP2102 based USB serial adapters. .Sh HARDWARE The following devices should work with the .Nm Modified: head/share/man/man4/vr.4 ============================================================================== --- head/share/man/man4/vr.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/vr.4 Sat May 12 03:25:46 2012 (r235317) @@ -109,7 +109,7 @@ The driver supports the following media options: .Bl -tag -width xxxxxxxxxxxxxxxxxxxx .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .El Modified: head/share/man/man4/watchdog.4 ============================================================================== --- head/share/man/man4/watchdog.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/watchdog.4 Sat May 12 03:25:46 2012 (r235317) @@ -38,6 +38,7 @@ The .Nm facility is used for controlling hardware and software watchdogs. .Pp +The device .Pa /dev/fido responds to a single .Xr ioctl 2 Modified: head/share/man/man4/wb.4 ============================================================================== --- head/share/man/man4/wb.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/wb.4 Sat May 12 03:25:46 2012 (r235317) @@ -108,7 +108,7 @@ The driver supports the following media options: .Bl -tag -width xxxxxxxxxxxxxxxxxxxx .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .El Modified: head/share/man/man4/wpi.4 ============================================================================== --- head/share/man/man4/wpi.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/wpi.4 Sat May 12 03:25:46 2012 (r235317) @@ -56,7 +56,7 @@ The .Nm driver provides support for the .Tn Intel -3945ABG Wireless network adapter +3945ABG Wireless network adapter. .Nm supports .Cm station , @@ -124,7 +124,7 @@ Data transmission is not possible in thi .Xr wlan_tkip 4 , .Xr wlan_wep 4 , .Xr ifconfig 8 , -.Xr wpa_supplicant 8 . +.Xr wpa_supplicant 8 .Sh AUTHORS .An -nosplit The original Modified: head/share/man/man4/xl.4 ============================================================================== --- head/share/man/man4/xl.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/xl.4 Sat May 12 03:25:46 2012 (r235317) @@ -115,7 +115,7 @@ The driver supports the following media options: .Bl -tag -width xxxxxxxxxxxxxxxxxxxx .It full-duplex -Force full duplex operation +Force full duplex operation. .It half-duplex Force half duplex operation. .El Modified: head/share/man/man4/xnb.4 ============================================================================== --- head/share/man/man4/xnb.4 Sat May 12 02:49:40 2012 (r235316) +++ head/share/man/man4/xnb.4 Sat May 12 03:25:46 2012 (r235317) @@ -83,7 +83,7 @@ get traffic statistics. Runs a builtin suite of unit tests and displays the results. Does not affect the operation of the driver in any way. Note that the test suite simulates error conditions; this will result in -error messages being printed to the system system log. +error messages being printed to the system log. .El .Sh SEE ALSO .Xr arp 4 , @@ -104,7 +104,7 @@ driver was written by .Aq alans@spectralogic.com and .An John Suykerbuyk -.Aq johns@spectralogic.com +.Aq johns@spectralogic.com . .Sh CAVEATS Packets sent through Xennet pass over shared memory, so the protocol includes no form of link-layer checksum or CRC. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sat May 12 03:30:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 995961065833; Sat, 12 May 2012 03:30:51 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B86E8FC18; Sat, 12 May 2012 03:30:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4C3Upqg013614; Sat, 12 May 2012 03:30:51 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4C3Upoh013611; Sat, 12 May 2012 03:30:51 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201205120330.q4C3Upoh013611@svn.freebsd.org> From: Sean Bruno Date: Sat, 12 May 2012 03:30: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: r235318 - head/sys/dev/mfi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 03:30:51 -0000 Author: sbruno Date: Sat May 12 03:30:50 2012 New Revision: 235318 URL: http://svn.freebsd.org/changeset/base/235318 Log: Fix inappropriate data type for two bus_dmamap_t variables that were causing PAE to insta-panic on startup. Remove one unused variable that was commented out. Reviewed by: ambrisko@ Obtained from: jhb@ peter@ bz@ and countless others during BSDCAN MFC after: 3 days Modified: head/sys/dev/mfi/mfi_cam.c head/sys/dev/mfi/mfivar.h Modified: head/sys/dev/mfi/mfi_cam.c ============================================================================== --- head/sys/dev/mfi/mfi_cam.c Sat May 12 03:25:46 2012 (r235317) +++ head/sys/dev/mfi/mfi_cam.c Sat May 12 03:30:50 2012 (r235318) @@ -293,8 +293,8 @@ mfip_start(void *data) pt->header.data_len = csio->dxfer_len; pt->header.sense_len = MFI_SENSE_LEN; pt->header.cdb_len = csio->cdb_len; - pt->sense_addr_lo = cm->cm_sense_busaddr; - pt->sense_addr_hi = 0; + pt->sense_addr_lo = (uint32_t)cm->cm_sense_busaddr; + pt->sense_addr_hi = (uint32_t)((uint64_t)cm->cm_sense_busaddr >> 32); if (ccbh->flags & CAM_CDB_POINTER) bcopy(csio->cdb_io.cdb_ptr, &pt->cdb[0], csio->cdb_len); else Modified: head/sys/dev/mfi/mfivar.h ============================================================================== --- head/sys/dev/mfi/mfivar.h Sat May 12 03:25:46 2012 (r235317) +++ head/sys/dev/mfi/mfivar.h Sat May 12 03:30:50 2012 (r235318) @@ -176,7 +176,7 @@ struct mfi_softc { // Start: LSIP200113393 bus_dma_tag_t verbuf_h_dmat; bus_dmamap_t verbuf_h_dmamap; - uint32_t verbuf_h_busaddr; + bus_dmamap_t verbuf_h_busaddr; uint32_t *verbuf; void *kbuff_arr[MAX_IOCTL_SGE]; bus_dma_tag_t mfi_kbuff_arr_dmat[2]; @@ -232,7 +232,7 @@ struct mfi_softc { bus_dma_tag_t mfi_sense_dmat; bus_dmamap_t mfi_sense_dmamap; - uint32_t mfi_sense_busaddr; + bus_dmamap_t mfi_sense_busaddr; struct mfi_sense *mfi_sense; struct resource *mfi_irq; @@ -319,7 +319,6 @@ struct mfi_softc { uint8_t * request_message_pool; uint8_t * request_message_pool_align; uint8_t * request_desc_pool; - //uint32_t request_desc_busaddr; bus_addr_t request_msg_busaddr; bus_addr_t reply_frame_busaddr; bus_addr_t sg_frame_busaddr; From owner-svn-src-head@FreeBSD.ORG Sat May 12 03:46:44 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 17F3C106564A; Sat, 12 May 2012 03:46:44 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 020788FC12; Sat, 12 May 2012 03:46:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4C3khq1014131; Sat, 12 May 2012 03:46:43 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4C3khxe014118; Sat, 12 May 2012 03:46:43 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205120346.q4C3khxe014118@svn.freebsd.org> From: Glen Barber Date: Sat, 12 May 2012 03:46: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: r235319 - in head/share/man: man4 man7 man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 03:46:44 -0000 Author: gjb (doc committer) Date: Sat May 12 03:46:43 2012 New Revision: 235319 URL: http://svn.freebsd.org/changeset/base/235319 Log: Remove duplicate words in mdoc(7) pages. PR: 167810 Submitted by: Bryan Drewery {bryan!shatow%net} (hackers lounge) Found with: textproc/igor MFC after: 3 days Modified: head/share/man/man4/mk48txx.4 head/share/man/man4/mwl.4 head/share/man/man4/ng_patch.4 head/share/man/man4/ste.4 head/share/man/man4/vge.4 head/share/man/man7/tuning.7 head/share/man/man9/VOP_GETACL.9 head/share/man/man9/VOP_GETEXTATTR.9 head/share/man/man9/VOP_SETACL.9 head/share/man/man9/VOP_SETEXTATTR.9 head/share/man/man9/locking.9 head/share/man/man9/store.9 Modified: head/share/man/man4/mk48txx.4 ============================================================================== --- head/share/man/man4/mk48txx.4 Sat May 12 03:30:50 2012 (r235318) +++ head/share/man/man4/mk48txx.4 Sat May 12 03:46:43 2012 (r235319) @@ -123,7 +123,7 @@ function. The offset into the control registers of the .Tn Mostek chip, -which is set by the the +which is set by the .Fn mk48txx_attach function. .It Fa sc_year0 Modified: head/share/man/man4/mwl.4 ============================================================================== --- head/share/man/man4/mwl.4 Sat May 12 03:30:50 2012 (r235318) +++ head/share/man/man4/mwl.4 Sat May 12 03:46:43 2012 (r235319) @@ -144,7 +144,7 @@ ifconfig wlan0 create wlandev mwl0 wlanm ifconfig wlan0 meshid my_mesh mode 11a inet 192.168.0.10/24 .Ed .Pp -Create two virtual 802.11a host-based access points, one with +Create two virtual 802.11a host-based access points, one with WEP enabled and one with no security, and bridge them to the fxp0 (wired) device: .Bd -literal -offset indent Modified: head/share/man/man4/ng_patch.4 ============================================================================== --- head/share/man/man4/ng_patch.4 Sat May 12 03:30:50 2012 (r235318) +++ head/share/man/man4/ng_patch.4 Sat May 12 03:46:43 2012 (r235319) @@ -140,7 +140,7 @@ node allows to modify TTL and TOS/DSCP f Suppose you have two adjacent simplex links to remote network (e.g.\& satellite), so that the packets expiring in between will generate unwanted ICMP-replies which have to go forth, not back. -Thus you need to raise TTL of every packet entering link link by 2 +Thus you need to raise TTL of every packet entering link by 2 to ensure the TTL will not reach zero there. So you setup .Xr ipfw 8 Modified: head/share/man/man4/ste.4 ============================================================================== --- head/share/man/man4/ste.4 Sat May 12 03:30:50 2012 (r235318) +++ head/share/man/man4/ste.4 Sat May 12 03:46:43 2012 (r235319) @@ -136,7 +136,7 @@ Maximum number of time to delay RX inter The valid range is 0 to 209712 in units of 1us, the default is 150 (150us). The value 0 effectively disables the RX interrupt moderation. -The resolution of of timer is about 3.2us so finer tuning than +The resolution of timer is about 3.2us so finer tuning than 3.2us wouldn't be available. The interface does not need to be brought down and up again before a change takes effect. Modified: head/share/man/man4/vge.4 ============================================================================== --- head/share/man/man4/vge.4 Sat May 12 03:30:50 2012 (r235318) +++ head/share/man/man4/vge.4 Sat May 12 03:46:43 2012 (r235319) @@ -177,7 +177,7 @@ tunables: Maximum number of time to delay interrupts. The valid range is 0 to 5100 in units of 1us, the default is 150 (150us). -The resolution of of timer is about 20us so finer tuning than +The resolution of timer is about 20us so finer tuning than 20us wouldn't be available. The interface should be brought down and up again before a change takes effect. Modified: head/share/man/man7/tuning.7 ============================================================================== --- head/share/man/man7/tuning.7 Sat May 12 03:30:50 2012 (r235318) +++ head/share/man/man7/tuning.7 Sat May 12 03:46:43 2012 (r235319) @@ -447,7 +447,7 @@ the content of mapped buffer to the read Increasing this value to a higher setting, such as `25165824' might improve performance on systems where space for mapping pipe buffers is quickly exhausted. -This exhaustion is not fatal; however, and it will only cause pipes to +This exhaustion is not fatal; however, and it will only cause pipes to fall back to using double-copy. .Pp The Modified: head/share/man/man9/VOP_GETACL.9 ============================================================================== --- head/share/man/man9/VOP_GETACL.9 Sat May 12 03:30:50 2012 (r235318) +++ head/share/man/man9/VOP_GETACL.9 Sat May 12 03:46:43 2012 (r235319) @@ -79,7 +79,7 @@ Otherwise, an appropriate error code is .It Bq Er EINVAL The ACL type passed is invalid for this vnode. .It Bq Er EACCES -The the caller does not have the appropriate privilege. +The caller does not have the appropriate privilege. .It Bq Er ENOMEM Sufficient memory is not available to fulfill the request. .It Bq Er EOPNOTSUPP Modified: head/share/man/man9/VOP_GETEXTATTR.9 ============================================================================== --- head/share/man/man9/VOP_GETEXTATTR.9 Sat May 12 03:30:50 2012 (r235318) +++ head/share/man/man9/VOP_GETEXTATTR.9 Sat May 12 03:46:43 2012 (r235319) @@ -102,7 +102,7 @@ Otherwise, an appropriate error code is .It Bq Er ENOATTR The requested attribute was not defined for this vnode. .It Bq Er EACCES -The the caller does not have the appropriate privilege. +The caller does not have the appropriate privilege. .It Bq Er ENXIO The request was not valid in this file system for the specified vnode and attribute name. Modified: head/share/man/man9/VOP_SETACL.9 ============================================================================== --- head/share/man/man9/VOP_SETACL.9 Sat May 12 03:30:50 2012 (r235318) +++ head/share/man/man9/VOP_SETACL.9 Sat May 12 03:46:43 2012 (r235319) @@ -84,7 +84,7 @@ Otherwise, an appropriate error code is .It Bq Er EINVAL The ACL type passed is invalid for this vnode, or the ACL data is invalid. .It Bq Er EACCES -The the caller does not have the appropriate privilege. +The caller does not have the appropriate privilege. .It Bq Er ENOMEM Sufficient memory is not available to fulfill the request. .It Bq Er EOPNOTSUPP Modified: head/share/man/man9/VOP_SETEXTATTR.9 ============================================================================== --- head/share/man/man9/VOP_SETEXTATTR.9 Sat May 12 03:30:50 2012 (r235318) +++ head/share/man/man9/VOP_SETEXTATTR.9 Sat May 12 03:46:43 2012 (r235319) @@ -91,7 +91,7 @@ Otherwise, an appropriate error code is .Sh ERRORS .Bl -tag -width Er .It Bq Er EACCES -The the caller does not have the appropriate privilege. +The caller does not have the appropriate privilege. .It Bq Er ENXIO The request was not valid in this file system for the specified vnode and attribute name. Modified: head/share/man/man9/locking.9 ============================================================================== --- head/share/man/man9/locking.9 Sat May 12 03:30:50 2012 (r235318) +++ head/share/man/man9/locking.9 Sat May 12 03:46:43 2012 (r235319) @@ -280,7 +280,7 @@ This is often a bad idea because it gene good knowledge of all of the call graph above the place where .Fn mtx_sleep is being called and assumptions the calling code has made. -Because the lock gets dropped during sleep, one one must re-test all +Because the lock gets dropped during sleep, one must re-test all the assumptions that were made before, all the way up the call graph to the place where the lock was acquired. .Pp Modified: head/share/man/man9/store.9 ============================================================================== --- head/share/man/man9/store.9 Sat May 12 03:30:50 2012 (r235318) +++ head/share/man/man9/store.9 Sat May 12 03:46:43 2012 (r235319) @@ -76,13 +76,13 @@ Stores a byte of data to the user-space Stores a word of data to the user-space address .Pa base . .It Fn suword16 -Stores 16 bits of of data to the user-space address +Stores 16 bits of data to the user-space address .Pa base . .It Fn suword32 -Stores 32 bits of of data to the user-space address +Stores 32 bits of data to the user-space address .Pa base . .It Fn suword64 -Stores 64 bits of of data to the user-space address +Stores 64 bits of data to the user-space address .Pa base . .It Fn suswintr Stores a short word of data to the user-space address From owner-svn-src-head@FreeBSD.ORG Sat May 12 04:53:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 34463106566C; Sat, 12 May 2012 04:53:00 +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 1DF778FC0A; Sat, 12 May 2012 04:53:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4C4qx4a016216; Sat, 12 May 2012 04:52:59 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4C4qxdg016214; Sat, 12 May 2012 04:52:59 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201205120452.q4C4qxdg016214@svn.freebsd.org> From: Adrian Chadd Date: Sat, 12 May 2012 04:52: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: r235320 - head/sys/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: Sat, 12 May 2012 04:53:00 -0000 Author: adrian Date: Sat May 12 04:52:59 2012 New Revision: 235320 URL: http://svn.freebsd.org/changeset/base/235320 Log: Add in the AP93 configuration file. The AP93 has: * AR7240 - mips24k processor with integrated 10/100 switch and various other peripherals; * AR9283 - 2x2 2.4GHz 802.11n (with calibration data in flash); * 64MB RAM; * 16MB SPI flash. The switch code detects as an AR8216 at the present moment, which isn't _entirely_ strictly true. However, the MII/MDIO routing in AP93.hints works - the arge0 MAC connects to PHY4 in the switch, but via the switch internal MDIO bus. The switch connects to arge0's MDIO bus, but only to export the switch registers. Thanks to stb and ray for the switch work, and ray for helping determine what the correct switch hints should be for this thing. Added: head/sys/mips/conf/AP93 (contents, props changed) head/sys/mips/conf/AP93.hints (contents, props changed) Added: head/sys/mips/conf/AP93 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/AP93 Sat May 12 04:52:59 2012 (r235320) @@ -0,0 +1,138 @@ +# +# AP93 -- Kernel configuration file for FreeBSD/mips for Atheros AP93 reference +# board (AR7240) +# +# $FreeBSD$ +# + +ident AP93 + +# XXX The default load address in the Uboot environment is 0x80010000 +makeoptions KERNLOADADDR=0x80050000 +options HZ=1000 + +# The AP93 has 64mb of RAM; hard-code that +options AR71XX_REALMEM=64*1024*1024 + +# It's UBOOT, not Redboot - without this, things will hang at startup +options AR71XX_ENV_UBOOT + +makeoptions MODULES_OVERRIDE="ath ath_pci ath_ahb bridgestp if_bridge if_gif if_gre random wlan wlan_acl wlan_amrr wlan_ccmp wlan_rssadapt wlan_tkip wlan_wep wlan_xauth usb ar71xx" + +hints "AP93.hints" +include "../atheros/std.ar71xx" + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions MODULES_OVERRIDE="" + +options DDB +options KDB + +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +# Can't do IPv6 - it just doesn't fit. +# options INET6 +# options NFSCL #Network Filesystem Client +options PSEUDOFS #Pseudo-filesystem framework +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options ALQ + +# Debugging for use in -current +options DEADLKRES +options INVARIANTS +options INVARIANT_SUPPORT +options WITNESS +options WITNESS_SKIPSPIN +options FFS #Berkeley Fast Filesystem + +# Support uncompress lzma rootfs +device geom_uncompress +options GEOM_UNCOMPRESS +options ROOTDEVNAME=\"ufs:/dev/map/rootfs.uncompress\" + +# PCI bus +device pci +device ar724x_pci +# Enable the AR71xx EEPROM PCI(e) workaround +options AR71XX_ATH_EEPROM + +# NVRAM U-Boot Environment -> Kernel environment +device nvram2env + +# Wireless NIC cards +options IEEE80211_DEBUG +options IEEE80211_SUPPORT_MESH +options IEEE80211_SUPPORT_TDMA +options IEEE80211_ALQ + +device wlan # 802.11 support +device wlan_wep # 802.11 WEP support +device wlan_ccmp # 802.11 CCMP support +device wlan_tkip # 802.11 TKIP support +device wlan_xauth # 802.11 hostap support + +device ath # Atheros pci/cardbus NIC's +device ath_pci # PCI/PCIe bus glue +options ATH_DEBUG +options ATH_ENABLE_11N +options ATH_DIAGAPI +device firmware +options ATH_EEPROM_FIRMWARE + +device ath_hal +options AH_SUPPORT_AR5416 +options AH_DEBUG +options AH_DEBUG_ALQ + +device ath_rate_sample + +device mii +device arge +device miiproxy +options ARGE_DEBUG +options ARGE_MDIO +device etherswitch +device arswitch + +# USB devices - (todo: does AR7240 have OHCI, or just EHCI?) + +#device usb +options USB_EHCI_BIG_ENDIAN_DESC # handle big-endian byte order +options USB_DEBUG +options USB_HOST_ALIGN=32 +#device ehci + +# Mass storage +#device scbus +#device umass +#device da + +# Read MSDOS formatted disks +options GEOM_PART_BSD +options GEOM_PART_MBR +#options MSDOSFS + +# GPIO Bus +#device gpio +#device gpioled + +# SPI and flash +device spibus +device ar71xx_spi +device mx25l + +# The flash is statically partitioned; add in that +device geom_map + +device ar71xx_wdog + +# Serial +device uart + +# Network twiddling +device loop +device ether +device md +device bpf +device random +device if_bridge Added: head/sys/mips/conf/AP93.hints ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/AP93.hints Sat May 12 04:52:59 2012 (r235320) @@ -0,0 +1,197 @@ +# $FreeBSD$ + +hint.apb.0.at="nexus0" +hint.apb.0.irq=4 + +# uart0 +hint.uart.0.at="apb0" +# see atheros/uart_cpu_ar71xx.c why +3 +hint.uart.0.maddr=0x18020003 +hint.uart.0.msize=0x18 +hint.uart.0.irq=3 + +# arge0 MDIO bus +hint.argemdio.0.at="nexus0" +hint.argemdio.0.maddr=0x19000000 +hint.argemdio.0.msize=0x1000 +hint.argemdio.0.order=0 + +# arge1 MDIO bus doesn't exist on the AR7240 + +# arge0: MII; dedicated PHY 4 on switch, connected via internal switch +# MDIO bus. + +hint.arge.0.at="nexus0" +hint.arge.0.maddr=0x19000000 +hint.arge.0.msize=0x1000 +hint.arge.0.irq=2 +# hint.arge.0.eeprommac=0x83fe9ff0 +hint.arge.0.phymask=0x10 # PHY 4 +# hint.arge.0.miimode=2 # MII +hint.arge.0.mdio=mdioproxy1 # Hanging off the arswitch MDIO bus + +# arge1: connected to the LAN switch MAC, at 1000BaseTX / GMII. +hint.arge.1.at="nexus0" +hint.arge.1.maddr=0x1A000000 +hint.arge.1.msize=0x1000 +hint.arge.1.irq=3 + +hint.arge.1.phymask=0x0 +# hint.arge.1.miimode=1 # GMII +hint.arge.1.media=1000 # Force to 1000BaseTX/full +hint.arge.1.fduplex=1 + +# AR7240 switch config +# +# XXX TODO - have the AR7240 switch auto-detect correctly? +# XXX It detects as an AR8216, which isn't strictly true! +# +hint.arswitch.0.numphys=4 # 4 active switch PHYs (PHY 0 -> 3) +hint.arswitch.0.phy4cpu=1 # Yes, PHY 4 == dedicated PHY +hint.arswitch.0.is_rgmii=0 # No, not RGMII +hint.arswitch.0.is_gmii=0 # No, not GMII + +# ath0 hint - pcie slot 0 +hint.pcib.0.bus.0.0.0.ath_fixup_addr=0x1fff1000 +hint.pcib.0.bus.0.0.0.ath_fixup_size=4096 + +# ehci - note the 0x100 offset for the AR913x/AR724x +hint.ehci.0.at="nexus0" +hint.ehci.0.maddr=0x1b000100 +hint.ehci.0.msize=0x00ffff00 +hint.ehci.0.irq=1 + +# pci +hint.pcib.0.at="nexus0" +hint.pcib.0.irq=0 + +# ath +hint.ath.0.eeprom_firmware="pcib.0.bus.0.0.0.eeprom_firmware" + +# GPIO +hint.gpio.0.at="apb0" +hint.gpio.0.maddr=0x18040000 +hint.gpio.0.msize=0x1000 +hint.gpio.0.irq=2 + +# Signal leds +hint.gpioled.0.at="gpiobus0" +hint.gpioled.0.name="sig1" +hint.gpioled.0.pins=0x0001 # pin 0 +hint.gpioled.1.at="gpiobus0" +hint.gpioled.1.name="sig2" +hint.gpioled.1.pins=0x0002 # pin 1 +hint.gpioled.2.at="gpiobus0" +hint.gpioled.2.name="sig3" +hint.gpioled.2.pins=0x0800 # pin 11 +hint.gpioled.3.at="gpiobus0" +hint.gpioled.3.name="sig4" +hint.gpioled.3.pins=0x0080 # pin 7 + +# SPI controller/bus +hint.spi.0.at="nexus0" +hint.spi.0.maddr=0x1f000000 +hint.spi.0.msize=0x10 + +# SPI flash +hint.mx25l.0.at="spibus0" +hint.mx25l.0.cs=0 + +# Watchdog +hint.ar71xx_wdog.0.at="nexus0" + +# nvram mapping - XXX ? +hint.nvram.0.base=0x1f030000 +hint.nvram.0.maxsize=0x2000 +hint.nvram.0.flags=3 # 1 = No check, 2 = Format Generic +hint.nvram.1.base=0x1f032000 +hint.nvram.1.maxsize=0x4000 +hint.nvram.1.flags=3 # 1 = No check, 2 = Format Generic + +# GEOM_MAP +# +# From my AP93 environment: +# +# 256k - uboot +# 256k - uboot-env +# 3072k - spare-rootfs +# 1024k - spare-uImage +# 3072k - rootfs +# 1024k - uImage +# 64k - mib0 +# 64k - mib1 +# 4096k - ct +# 3392k - var +# 64k - ART + +# To make it useful for FreeBSD for now, treat spare rootfs, spare +# uimage and rootfs as 'rootfs'. + +hint.map.0.at="flash/spi0" +hint.map.0.start=0x00000000 +hint.map.0.end=0x00040000 +hint.map.0.name="uboot" +hint.map.0.readonly=1 + +hint.map.1.at="flash/spi0" +hint.map.1.start=0x00040000 +hint.map.1.end=0x00080000 +hint.map.1.name="uboot-env" +hint.map.1.readonly=1 + +hint.map.2.at="flash/spi0" +hint.map.2.start=0x00080000 +# hint.map.2.end=0x00380000 +hint.map.2.end=0x00780000 +# hint.map.2.name="spare-rootfs" +hint.map.2.name="rootfs" +hint.map.2.readonly=1 + +#hint.map.3.at="flash/spi0" +#hint.map.3.start=0x00380000 +#hint.map.3.end=0x00480000 +#hint.map.3.name="spare-uImage" +#hint.map.3.readonly=1 + +#hint.map.4.at="flash/spi0" +#hint.map.4.start=0x00480000 +#hint.map.4.end=0x00780000 +#hint.map.4.name="rootfs" +#hint.map.4.readonly=1 + +hint.map.3.at="flash/spi0" +hint.map.3.start=0x00780000 +hint.map.3.end=0x00880000 +hint.map.3.name="uImage" +hint.map.3.readonly=1 + +hint.map.4.at="flash/spi0" +hint.map.4.start=0x00880000 +hint.map.4.end=0x00890000 +hint.map.4.name="mib0" +hint.map.4.readonly=1 + +hint.map.5.at="flash/spi0" +hint.map.5.start=0x00890000 +hint.map.5.end=0x008a0000 +hint.map.5.name="mib1" +hint.map.5.readonly=1 + +hint.map.6.at="flash/spi0" +hint.map.6.start=0x008a0000 +hint.map.6.end=0x00ca0000 +hint.map.6.name="ct" +hint.map.6.readonly=1 + +hint.map.7.at="flash/spi0" +hint.map.7.start=0x00ca0000 +hint.map.7.end=0x00ff0000 +hint.map.7.name="var" +hint.map.7.readonly=1 + +hint.map.8.at="flash/spi0" +hint.map.8.start=0x00ff0000 +hint.map.8.end=0x01000000 # 64k ART +hint.map.8.name="ART" +hint.map.8.readonly=1 + From owner-svn-src-head@FreeBSD.ORG Sat May 12 05:05:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A19D5106566C; Sat, 12 May 2012 05:05:23 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D99B8FC14; Sat, 12 May 2012 05:05:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4C55N3N016639; Sat, 12 May 2012 05:05:23 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4C55Nsv016636; Sat, 12 May 2012 05:05:23 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201205120505.q4C55Nsv016636@svn.freebsd.org> From: Sean Bruno Date: Sat, 12 May 2012 05: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: r235321 - head/sys/dev/mfi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 05:05:23 -0000 Author: sbruno Date: Sat May 12 05:05:22 2012 New Revision: 235321 URL: http://svn.freebsd.org/changeset/base/235321 Log: Pointy hat to sleep deprived committer. Use a *real* variable type instead of one I made up. Background Music: Queen -- Bicycle Race Reviewed by: BSDCAN 2012 Hacker Lounge Audience Modified: head/sys/dev/mfi/mfivar.h Modified: head/sys/dev/mfi/mfivar.h ============================================================================== --- head/sys/dev/mfi/mfivar.h Sat May 12 04:52:59 2012 (r235320) +++ head/sys/dev/mfi/mfivar.h Sat May 12 05:05:22 2012 (r235321) @@ -176,7 +176,7 @@ struct mfi_softc { // Start: LSIP200113393 bus_dma_tag_t verbuf_h_dmat; bus_dmamap_t verbuf_h_dmamap; - bus_dmamap_t verbuf_h_busaddr; + bus_addr_t verbuf_h_busaddr; uint32_t *verbuf; void *kbuff_arr[MAX_IOCTL_SGE]; bus_dma_tag_t mfi_kbuff_arr_dmat[2]; @@ -232,7 +232,7 @@ struct mfi_softc { bus_dma_tag_t mfi_sense_dmat; bus_dmamap_t mfi_sense_dmamap; - bus_dmamap_t mfi_sense_busaddr; + bus_addr_t mfi_sense_busaddr; struct mfi_sense *mfi_sense; struct resource *mfi_irq; From owner-svn-src-head@FreeBSD.ORG Sat May 12 05:26:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EF4D6106564A; Sat, 12 May 2012 05:26:49 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D76A98FC16; Sat, 12 May 2012 05:26:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4C5QnHa017371; Sat, 12 May 2012 05:26:49 GMT (envelope-from jasone@svn.freebsd.org) Received: (from jasone@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4C5QnAq017354; Sat, 12 May 2012 05:26:49 GMT (envelope-from jasone@svn.freebsd.org) Message-Id: <201205120526.q4C5QnAq017354@svn.freebsd.org> From: Jason Evans Date: Sat, 12 May 2012 05:26: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: r235322 - in head/contrib/jemalloc: . doc include/jemalloc include/jemalloc/internal src X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 05:26:50 -0000 Author: jasone Date: Sat May 12 05:26:49 2012 New Revision: 235322 URL: http://svn.freebsd.org/changeset/base/235322 Log: Import jemalloc 3.0.0. This fixes memory zeroing bugs that manifested as jemalloc assertion failures for debug builds, or as calloc() sometimes returning non-zeroed memory for production builds. Modified: head/contrib/jemalloc/ChangeLog head/contrib/jemalloc/FREEBSD-diffs head/contrib/jemalloc/VERSION head/contrib/jemalloc/doc/jemalloc.3 head/contrib/jemalloc/include/jemalloc/internal/arena.h head/contrib/jemalloc/include/jemalloc/jemalloc.h head/contrib/jemalloc/src/arena.c head/contrib/jemalloc/src/jemalloc.c Modified: head/contrib/jemalloc/ChangeLog ============================================================================== --- head/contrib/jemalloc/ChangeLog Sat May 12 05:05:22 2012 (r235321) +++ head/contrib/jemalloc/ChangeLog Sat May 12 05:26:49 2012 (r235322) @@ -6,7 +6,7 @@ found in the git revision history: http://www.canonware.com/cgi-bin/gitweb.cgi?p=jemalloc.git git://canonware.com/jemalloc.git -* 3.0.0 (XXX not yet released) +* 3.0.0 (May 11, 2012) Although this version adds some major new features, the primary focus is on internal code cleanup that facilitates maintainability and portability, most @@ -23,6 +23,7 @@ found in the git revision history: + FreeBSD + Mac OS X Lion + MinGW + + Windows (no support yet for replacing the system malloc) - Add support for additional architectures: + MIPS + SH4 @@ -31,12 +32,13 @@ found in the git revision history: - Add nallocm(), which rounds a request size up to the nearest size class without actually allocating. - Implement aligned_alloc() (blame C11). - - Add the --disable-munmap option, and make it the default on Linux. - - Add the --with-mangling option. - - Add the --disable-experimental option. - Add the "thread.tcache.enabled" mallctl. - Add the "opt.prof_final" mallctl. - Update pprof (from gperftools 2.0). + - Add the --with-mangling option. + - Add the --disable-experimental option. + - Add the --disable-munmap option, and make it the default on Linux. + - Add the --enable-mremap option, which disables use of mremap(2) by default. Incompatible changes: - Enable stats by default. @@ -71,6 +73,7 @@ found in the git revision history: write-after-free memory corruption. - Fix a potential deadlock that could occur during interval- and growth-triggered heap profile dumps. + - Fix large calloc() zeroing bugs due to dropping chunk map unzeroed flags. - Fix chunk_alloc_dss() to stop claiming memory is zeroed. This bug could cause memory corruption and crashes with --enable-dss specified. - Fix fork-related bugs that could cause deadlock in children between fork Modified: head/contrib/jemalloc/FREEBSD-diffs ============================================================================== --- head/contrib/jemalloc/FREEBSD-diffs Sat May 12 05:05:22 2012 (r235321) +++ head/contrib/jemalloc/FREEBSD-diffs Sat May 12 05:26:49 2012 (r235322) @@ -1,5 +1,5 @@ diff --git a/doc/jemalloc.xml.in b/doc/jemalloc.xml.in -index 93c16dc..b5c5595 100644 +index 877c500..7d659a7 100644 --- a/doc/jemalloc.xml.in +++ b/doc/jemalloc.xml.in @@ -51,12 +51,23 @@ @@ -192,7 +192,7 @@ index 0000000..9efab93 +#define pthread_mutex_lock _pthread_mutex_lock +#define pthread_mutex_unlock _pthread_mutex_unlock diff --git a/src/jemalloc.c b/src/jemalloc.c -index d42e91d..cdf6222 100644 +index bc54cd7..fa9fcf0 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c @@ -8,6 +8,10 @@ malloc_tsd_data(, arenas, arena_t *, NULL) Modified: head/contrib/jemalloc/VERSION ============================================================================== --- head/contrib/jemalloc/VERSION Sat May 12 05:05:22 2012 (r235321) +++ head/contrib/jemalloc/VERSION Sat May 12 05:26:49 2012 (r235322) @@ -1 +1 @@ -1.0.0-335-g37b6f95dcd866f51c91488531a2efc3ed4c2b754 +3.0.0-0-gfc9b1dbf69f59d7ecfc4ac68da9847e017e1d046 Modified: head/contrib/jemalloc/doc/jemalloc.3 ============================================================================== --- head/contrib/jemalloc/doc/jemalloc.3 Sat May 12 05:05:22 2012 (r235321) +++ head/contrib/jemalloc/doc/jemalloc.3 Sat May 12 05:26:49 2012 (r235322) @@ -2,12 +2,12 @@ .\" Title: JEMALLOC .\" Author: Jason Evans .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 05/09/2012 +.\" Date: 05/11/2012 .\" Manual: User Manual -.\" Source: jemalloc 1.0.0-335-g37b6f95dcd866f51c91488531a2efc3ed4c2b754 +.\" Source: jemalloc 3.0.0-0-gfc9b1dbf69f59d7ecfc4ac68da9847e017e1d046 .\" Language: English .\" -.TH "JEMALLOC" "3" "05/09/2012" "jemalloc 1.0.0-335-g37b6f95dcd" "User Manual" +.TH "JEMALLOC" "3" "05/11/2012" "jemalloc 3.0.0-0-gfc9b1dbf69f5" "User Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -31,7 +31,7 @@ jemalloc \- general purpose memory allocation functions .SH "LIBRARY" .PP -This manual describes jemalloc 1\&.0\&.0\-335\-g37b6f95dcd866f51c91488531a2efc3ed4c2b754\&. More information can be found at the +This manual describes jemalloc 3\&.0\&.0\-0\-gfc9b1dbf69f59d7ecfc4ac68da9847e017e1d046\&. More information can be found at the \m[blue]\fBjemalloc website\fR\m[]\&\s-2\u[1]\d\s+2\&. .PP The following configuration options are enabled in libc\*(Aqs built\-in jemalloc: @@ -1003,12 +1003,12 @@ Total number of bytes in active pages al "stats\&.mapped" (\fBsize_t\fR) r\- [\fB\-\-enable\-stats\fR] .RS 4 Total number of bytes in chunks mapped on behalf of the application\&. This is a multiple of the chunk size, and is at least as large as -"stats\&.active"\&. This does not include inactive chunks embedded in the DSS\&. +"stats\&.active"\&. This does not include inactive chunks\&. .RE .PP "stats\&.chunks\&.current" (\fBsize_t\fR) r\- [\fB\-\-enable\-stats\fR] .RS 4 -Total number of chunks actively mapped on behalf of the application\&. This does not include inactive chunks embedded in the DSS\&. +Total number of chunks actively mapped on behalf of the application\&. This does not include inactive chunks\&. .RE .PP "stats\&.chunks\&.total" (\fBuint64_t\fR) r\- [\fB\-\-enable\-stats\fR] Modified: head/contrib/jemalloc/include/jemalloc/internal/arena.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/arena.h Sat May 12 05:05:22 2012 (r235321) +++ head/contrib/jemalloc/include/jemalloc/internal/arena.h Sat May 12 05:26:49 2012 (r235322) @@ -93,13 +93,13 @@ struct arena_chunk_map_s { * Run address (or size) and various flags are stored together. The bit * layout looks like (assuming 32-bit system): * - * ???????? ???????? ????---- ----dula + * ???????? ???????? ????nnnn nnnndula * * ? : Unallocated: Run address for first/last pages, unset for internal * pages. * Small: Run page offset. * Large: Run size for first page, unset for trailing pages. - * - : Unused. + * n : binind for small size class, BININD_INVALID for large size class. * d : dirty? * u : unzeroed? * l : large? @@ -118,14 +118,14 @@ struct arena_chunk_map_s { * [dula] : bit unset * * Unallocated (clean): - * ssssssss ssssssss ssss1111 1111du-a + * ssssssss ssssssss ssss++++ ++++du-a * xxxxxxxx xxxxxxxx xxxxxxxx xxxx-Uxx - * ssssssss ssssssss ssss1111 1111dU-a + * ssssssss ssssssss ssss++++ ++++dU-a * * Unallocated (dirty): - * ssssssss ssssssss ssss1111 1111D--a + * ssssssss ssssssss ssss++++ ++++D--a * xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx - * ssssssss ssssssss ssss1111 1111D--a + * ssssssss ssssssss ssss++++ ++++D--a * * Small: * pppppppp pppppppp ppppnnnn nnnnd--A @@ -133,15 +133,15 @@ struct arena_chunk_map_s { * pppppppp pppppppp ppppnnnn nnnnd--A * * Large: - * ssssssss ssssssss ssss1111 1111D-LA + * ssssssss ssssssss ssss++++ ++++D-LA * xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx - * -------- -------- ----1111 1111D-LA + * -------- -------- ----++++ ++++D-LA * * Large (sampled, size <= PAGE): * ssssssss ssssssss ssssnnnn nnnnD-LA * * Large (not sampled, size == PAGE): - * ssssssss ssssssss ssss1111 1111D-LA + * ssssssss ssssssss ssss++++ ++++D-LA */ size_t bits; #define CHUNK_MAP_BININD_SHIFT 4 @@ -591,6 +591,7 @@ arena_mapbits_unallocated_set(arena_chun mapbitsp = arena_mapbitsp_get(chunk, pageind); assert((size & PAGE_MASK) == 0); assert((flags & ~CHUNK_MAP_FLAGS_MASK) == 0); + assert((flags & (CHUNK_MAP_DIRTY|CHUNK_MAP_UNZEROED)) == flags); *mapbitsp = size | CHUNK_MAP_BININD_INVALID | flags; } @@ -611,12 +612,14 @@ arena_mapbits_large_set(arena_chunk_t *c size_t flags) { size_t *mapbitsp; + size_t unzeroed; mapbitsp = arena_mapbitsp_get(chunk, pageind); assert((size & PAGE_MASK) == 0); - assert((flags & ~CHUNK_MAP_FLAGS_MASK) == 0); - *mapbitsp = size | CHUNK_MAP_BININD_INVALID | flags | CHUNK_MAP_LARGE | - CHUNK_MAP_ALLOCATED; + assert((flags & CHUNK_MAP_DIRTY) == flags); + unzeroed = *mapbitsp & CHUNK_MAP_UNZEROED; /* Preserve unzeroed. */ + *mapbitsp = size | CHUNK_MAP_BININD_INVALID | flags | unzeroed | + CHUNK_MAP_LARGE | CHUNK_MAP_ALLOCATED; } JEMALLOC_INLINE void @@ -637,13 +640,15 @@ arena_mapbits_small_set(arena_chunk_t *c size_t binind, size_t flags) { size_t *mapbitsp; + size_t unzeroed; assert(binind < BININD_INVALID); mapbitsp = arena_mapbitsp_get(chunk, pageind); assert(pageind - runind >= map_bias); - assert((flags & ~CHUNK_MAP_FLAGS_MASK) == 0); + assert((flags & CHUNK_MAP_DIRTY) == flags); + unzeroed = *mapbitsp & CHUNK_MAP_UNZEROED; /* Preserve unzeroed. */ *mapbitsp = (runind << LG_PAGE) | (binind << CHUNK_MAP_BININD_SHIFT) | - flags | CHUNK_MAP_ALLOCATED; + flags | unzeroed | CHUNK_MAP_ALLOCATED; } JEMALLOC_INLINE void Modified: head/contrib/jemalloc/include/jemalloc/jemalloc.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/jemalloc.h Sat May 12 05:05:22 2012 (r235321) +++ head/contrib/jemalloc/include/jemalloc/jemalloc.h Sat May 12 05:26:49 2012 (r235322) @@ -7,12 +7,12 @@ extern "C" { #include #include -#define JEMALLOC_VERSION "1.0.0-335-g37b6f95dcd866f51c91488531a2efc3ed4c2b754" -#define JEMALLOC_VERSION_MAJOR 1 +#define JEMALLOC_VERSION "3.0.0-0-gfc9b1dbf69f59d7ecfc4ac68da9847e017e1d046" +#define JEMALLOC_VERSION_MAJOR 3 #define JEMALLOC_VERSION_MINOR 0 #define JEMALLOC_VERSION_BUGFIX 0 -#define JEMALLOC_VERSION_NREV 335 -#define JEMALLOC_VERSION_GID "37b6f95dcd866f51c91488531a2efc3ed4c2b754" +#define JEMALLOC_VERSION_NREV 0 +#define JEMALLOC_VERSION_GID "fc9b1dbf69f59d7ecfc4ac68da9847e017e1d046" #include "jemalloc_defs.h" #include "jemalloc_FreeBSD.h" Modified: head/contrib/jemalloc/src/arena.c ============================================================================== --- head/contrib/jemalloc/src/arena.c Sat May 12 05:05:22 2012 (r235321) +++ head/contrib/jemalloc/src/arena.c Sat May 12 05:26:49 2012 (r235322) @@ -44,6 +44,8 @@ static void arena_run_split(arena_t *are bool large, size_t binind, bool zero); static arena_chunk_t *arena_chunk_alloc(arena_t *arena); static void arena_chunk_dealloc(arena_t *arena, arena_chunk_t *chunk); +static arena_run_t *arena_run_alloc_helper(arena_t *arena, size_t size, + bool large, size_t binind, bool zero); static arena_run_t *arena_run_alloc(arena_t *arena, size_t size, bool large, size_t binind, bool zero); static void arena_purge(arena_t *arena, bool all); @@ -309,8 +311,7 @@ arena_run_split(arena_t *arena, arena_ru * small run, so that arena_dalloc_bin_run() has the ability to * conditionally trim clean pages. */ - arena_mapbits_small_set(chunk, run_ind, 0, binind, - arena_mapbits_unzeroed_get(chunk, run_ind) | flag_dirty); + arena_mapbits_small_set(chunk, run_ind, 0, binind, flag_dirty); /* * The first page will always be dirtied during small run * initialization, so a validation failure here would not @@ -320,16 +321,13 @@ arena_run_split(arena_t *arena, arena_ru arena_mapbits_unzeroed_get(chunk, run_ind) == 0) arena_chunk_validate_zeroed(chunk, run_ind); for (i = 1; i < need_pages - 1; i++) { - arena_mapbits_small_set(chunk, run_ind+i, i, - binind, arena_mapbits_unzeroed_get(chunk, - run_ind+i)); + arena_mapbits_small_set(chunk, run_ind+i, i, binind, 0); if (config_debug && flag_dirty == 0 && arena_mapbits_unzeroed_get(chunk, run_ind+i) == 0) arena_chunk_validate_zeroed(chunk, run_ind+i); } arena_mapbits_small_set(chunk, run_ind+need_pages-1, - need_pages-1, binind, arena_mapbits_unzeroed_get(chunk, - run_ind+need_pages-1) | flag_dirty); + need_pages-1, binind, flag_dirty); if (config_debug && flag_dirty == 0 && arena_mapbits_unzeroed_get(chunk, run_ind+need_pages-1) == 0) { @@ -351,17 +349,20 @@ arena_chunk_alloc(arena_t *arena) chunk = arena->spare; arena->spare = NULL; - /* Insert the run into the appropriate runs_avail_* tree. */ - if (arena_mapbits_dirty_get(chunk, map_bias) == 0) - runs_avail = &arena->runs_avail_clean; - else - runs_avail = &arena->runs_avail_dirty; + assert(arena_mapbits_allocated_get(chunk, map_bias) == 0); + assert(arena_mapbits_allocated_get(chunk, chunk_npages-1) == 0); assert(arena_mapbits_unallocated_size_get(chunk, map_bias) == arena_maxclass); assert(arena_mapbits_unallocated_size_get(chunk, chunk_npages-1) == arena_maxclass); assert(arena_mapbits_dirty_get(chunk, map_bias) == arena_mapbits_dirty_get(chunk, chunk_npages-1)); + + /* Insert the run into the appropriate runs_avail_* tree. */ + if (arena_mapbits_dirty_get(chunk, map_bias) == 0) + runs_avail = &arena->runs_avail_clean; + else + runs_avail = &arena->runs_avail_dirty; arena_avail_tree_insert(runs_avail, arena_mapp_get(chunk, map_bias)); } else { @@ -425,6 +426,15 @@ arena_chunk_dealloc(arena_t *arena, aren { arena_avail_tree_t *runs_avail; + assert(arena_mapbits_allocated_get(chunk, map_bias) == 0); + assert(arena_mapbits_allocated_get(chunk, chunk_npages-1) == 0); + assert(arena_mapbits_unallocated_size_get(chunk, map_bias) == + arena_maxclass); + assert(arena_mapbits_unallocated_size_get(chunk, chunk_npages-1) == + arena_maxclass); + assert(arena_mapbits_dirty_get(chunk, map_bias) == + arena_mapbits_dirty_get(chunk, chunk_npages-1)); + /* * Remove run from the appropriate runs_avail_* tree, so that the arena * does not use it. @@ -454,19 +464,12 @@ arena_chunk_dealloc(arena_t *arena, aren } static arena_run_t * -arena_run_alloc(arena_t *arena, size_t size, bool large, size_t binind, +arena_run_alloc_helper(arena_t *arena, size_t size, bool large, size_t binind, bool zero) { - arena_chunk_t *chunk; arena_run_t *run; arena_chunk_map_t *mapelm, key; - assert(size <= arena_maxclass); - assert((size & PAGE_MASK) == 0); - assert((large && binind == BININD_INVALID) || (large == false && binind - != BININD_INVALID)); - - /* Search the arena's chunks for the lowest best fit. */ key.bits = size | CHUNK_MAP_KEY; mapelm = arena_avail_tree_nsearch(&arena->runs_avail_dirty, &key); if (mapelm != NULL) { @@ -493,6 +496,26 @@ arena_run_alloc(arena_t *arena, size_t s return (run); } + return (NULL); +} + +static arena_run_t * +arena_run_alloc(arena_t *arena, size_t size, bool large, size_t binind, + bool zero) +{ + arena_chunk_t *chunk; + arena_run_t *run; + + assert(size <= arena_maxclass); + assert((size & PAGE_MASK) == 0); + assert((large && binind == BININD_INVALID) || (large == false && binind + != BININD_INVALID)); + + /* Search the arena's chunks for the lowest best fit. */ + run = arena_run_alloc_helper(arena, size, large, binind, zero); + if (run != NULL) + return (run); + /* * No usable runs. Create a new chunk from which to allocate the run. */ @@ -508,32 +531,7 @@ arena_run_alloc(arena_t *arena, size_t s * sufficient memory available while this one dropped arena->lock in * arena_chunk_alloc(), so search one more time. */ - mapelm = arena_avail_tree_nsearch(&arena->runs_avail_dirty, &key); - if (mapelm != NULL) { - arena_chunk_t *run_chunk = CHUNK_ADDR2BASE(mapelm); - size_t pageind = (((uintptr_t)mapelm - - (uintptr_t)run_chunk->map) / sizeof(arena_chunk_map_t)) - + map_bias; - - run = (arena_run_t *)((uintptr_t)run_chunk + (pageind << - LG_PAGE)); - arena_run_split(arena, run, size, large, binind, zero); - return (run); - } - mapelm = arena_avail_tree_nsearch(&arena->runs_avail_clean, &key); - if (mapelm != NULL) { - arena_chunk_t *run_chunk = CHUNK_ADDR2BASE(mapelm); - size_t pageind = (((uintptr_t)mapelm - - (uintptr_t)run_chunk->map) / sizeof(arena_chunk_map_t)) - + map_bias; - - run = (arena_run_t *)((uintptr_t)run_chunk + (pageind << - LG_PAGE)); - arena_run_split(arena, run, size, large, binind, zero); - return (run); - } - - return (NULL); + return (arena_run_alloc_helper(arena, size, large, binind, zero)); } static inline void @@ -588,6 +586,8 @@ arena_chunk_purge(arena_t *arena, arena_ */ if (chunk == arena->spare) { assert(arena_mapbits_dirty_get(chunk, map_bias) != 0); + assert(arena_mapbits_dirty_get(chunk, chunk_npages-1) != 0); + arena_chunk_alloc(arena); } @@ -600,14 +600,18 @@ arena_chunk_purge(arena_t *arena, arena_ npages = arena_mapbits_unallocated_size_get(chunk, pageind) >> LG_PAGE; assert(pageind + npages <= chunk_npages); - if (arena_mapbits_dirty_get(chunk, pageind)) { + assert(arena_mapbits_dirty_get(chunk, pageind) == + arena_mapbits_dirty_get(chunk, pageind+npages-1)); + if (arena_mapbits_dirty_get(chunk, pageind) != 0) { size_t i; arena_avail_tree_remove( &arena->runs_avail_dirty, mapelm); + arena_mapbits_unzeroed_set(chunk, pageind, + flag_unzeroed); arena_mapbits_large_set(chunk, pageind, - (npages << LG_PAGE), flag_unzeroed); + (npages << LG_PAGE), 0); /* * Update internal elements in the page map, so * that CHUNK_MAP_UNZEROED is properly set. @@ -617,8 +621,10 @@ arena_chunk_purge(arena_t *arena, arena_ pageind+i, flag_unzeroed); } if (npages > 1) { + arena_mapbits_unzeroed_set(chunk, + pageind+npages-1, flag_unzeroed); arena_mapbits_large_set(chunk, - pageind+npages-1, 0, flag_unzeroed); + pageind+npages-1, 0, 0); } if (config_stats) { @@ -842,6 +848,8 @@ arena_run_dalloc(arena_t *arena, arena_r * The run is dirty if the caller claims to have dirtied it, as well as * if it was already dirty before being allocated. */ + assert(arena_mapbits_dirty_get(chunk, run_ind) == + arena_mapbits_dirty_get(chunk, run_ind+run_pages-1)); if (arena_mapbits_dirty_get(chunk, run_ind) != 0) dirty = true; flag_dirty = dirty ? CHUNK_MAP_DIRTY : 0; @@ -941,9 +949,6 @@ arena_run_dalloc(arena_t *arena, arena_r if (size == arena_maxclass) { assert(run_ind == map_bias); assert(run_pages == (arena_maxclass >> LG_PAGE)); - assert(arena_mapbits_allocated_get(chunk, map_bias) == 0); - assert(arena_mapbits_unallocated_size_get(chunk, map_bias) == - arena_maxclass); arena_chunk_dealloc(arena, chunk); } @@ -974,10 +979,8 @@ arena_run_trim_head(arena_t *arena, aren * run first, in case of single-page runs. */ assert(arena_mapbits_large_size_get(chunk, pageind) == oldsize); - arena_mapbits_large_set(chunk, pageind+head_npages-1, 0, flag_dirty | - arena_mapbits_unzeroed_get(chunk, pageind+head_npages-1)); - arena_mapbits_large_set(chunk, pageind, oldsize-newsize, flag_dirty | - arena_mapbits_unzeroed_get(chunk, pageind)); + arena_mapbits_large_set(chunk, pageind+head_npages-1, 0, flag_dirty); + arena_mapbits_large_set(chunk, pageind, oldsize-newsize, flag_dirty); if (config_debug) { UNUSED size_t tail_npages = newsize >> LG_PAGE; @@ -986,8 +989,8 @@ arena_run_trim_head(arena_t *arena, aren assert(arena_mapbits_dirty_get(chunk, pageind+head_npages+tail_npages-1) == flag_dirty); } - arena_mapbits_large_set(chunk, pageind+head_npages, newsize, flag_dirty - | arena_mapbits_unzeroed_get(chunk, pageind+head_npages)); + arena_mapbits_large_set(chunk, pageind+head_npages, newsize, + flag_dirty); arena_run_dalloc(arena, run, false); } @@ -1008,10 +1011,8 @@ arena_run_trim_tail(arena_t *arena, aren * run first, in case of single-page runs. */ assert(arena_mapbits_large_size_get(chunk, pageind) == oldsize); - arena_mapbits_large_set(chunk, pageind+head_npages-1, 0, flag_dirty | - arena_mapbits_unzeroed_get(chunk, pageind+head_npages-1)); - arena_mapbits_large_set(chunk, pageind, newsize, flag_dirty | - arena_mapbits_unzeroed_get(chunk, pageind)); + arena_mapbits_large_set(chunk, pageind+head_npages-1, 0, flag_dirty); + arena_mapbits_large_set(chunk, pageind, newsize, flag_dirty); if (config_debug) { UNUSED size_t tail_npages = (oldsize - newsize) >> LG_PAGE; @@ -1021,8 +1022,7 @@ arena_run_trim_tail(arena_t *arena, aren pageind+head_npages+tail_npages-1) == flag_dirty); } arena_mapbits_large_set(chunk, pageind+head_npages, oldsize-newsize, - flag_dirty | arena_mapbits_unzeroed_get(chunk, - pageind+head_npages)); + flag_dirty); arena_run_dalloc(arena, (arena_run_t *)((uintptr_t)run + newsize), dirty); @@ -1524,16 +1524,14 @@ arena_dalloc_bin_run(arena_t *arena, are * trim the clean pages before deallocating the dirty portion of the * run. */ + assert(arena_mapbits_dirty_get(chunk, run_ind) == + arena_mapbits_dirty_get(chunk, run_ind+npages-1)); if (arena_mapbits_dirty_get(chunk, run_ind) == 0 && past - run_ind < npages) { - /* - * Trim clean pages. Convert to large run beforehand. Set the - * last map element first, in case this is a one-page run. - */ - arena_mapbits_large_set(chunk, run_ind+npages-1, 0, - arena_mapbits_unzeroed_get(chunk, run_ind+npages-1)); - arena_mapbits_large_set(chunk, run_ind, bin_info->run_size, - arena_mapbits_unzeroed_get(chunk, run_ind)); + /* Trim clean pages. Convert to large run beforehand. */ + assert(npages > 0); + arena_mapbits_large_set(chunk, run_ind, bin_info->run_size, 0); + arena_mapbits_large_set(chunk, run_ind+npages-1, 0, 0); arena_run_trim_tail(arena, chunk, run, (npages << LG_PAGE), ((past - run_ind) << LG_PAGE), false); /* npages = past - run_ind; */ Modified: head/contrib/jemalloc/src/jemalloc.c ============================================================================== --- head/contrib/jemalloc/src/jemalloc.c Sat May 12 05:05:22 2012 (r235321) +++ head/contrib/jemalloc/src/jemalloc.c Sat May 12 05:26:49 2012 (r235322) @@ -1626,6 +1626,12 @@ _malloc_prefork(void) { unsigned i; +#ifdef JEMALLOC_MUTEX_INIT_CB + if (malloc_initialized == false) + return; +#endif + assert(malloc_initialized); + /* Acquire all mutexes in a safe order. */ malloc_mutex_prefork(&arenas_lock); for (i = 0; i < narenas; i++) { @@ -1647,6 +1653,12 @@ _malloc_postfork(void) { unsigned i; +#ifdef JEMALLOC_MUTEX_INIT_CB + if (malloc_initialized == false) + return; +#endif + assert(malloc_initialized); + /* Release all mutexes, now that fork() has completed. */ chunk_dss_postfork_parent(); huge_postfork_parent(); @@ -1663,6 +1675,8 @@ jemalloc_postfork_child(void) { unsigned i; + assert(malloc_initialized); + /* Release all mutexes, now that fork() has completed. */ chunk_dss_postfork_child(); huge_postfork_child(); From owner-svn-src-head@FreeBSD.ORG Sat May 12 05:26:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DAC9106566B; Sat, 12 May 2012 05:26:50 +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 2781A8FC17; Sat, 12 May 2012 05:26:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4C5QoTk017382; Sat, 12 May 2012 05:26:50 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4C5QndP017376; Sat, 12 May 2012 05:26:49 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201205120526.q4C5QndP017376@svn.freebsd.org> From: Adrian Chadd Date: Sat, 12 May 2012 05:26: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: r235323 - in head/sys: conf dev/etherswitch/arswitch X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 05:26:50 -0000 Author: adrian Date: Sat May 12 05:26:49 2012 New Revision: 235323 URL: http://svn.freebsd.org/changeset/base/235323 Log: Further arswitch work: * Add in the AR724x support. It probes the same as an AR8216/AR8316, so just add in a hint to force the probe success rather than auto-detecting it. * Add in the missing entries from conf/files, lacking in the previous commit. The register values and CPU port / mirror port initialisation value was obtained from Linux OpenWRT ag71xx_ar7240.c. The DELAY(1000) to let things settle is my local workaround. For some reason, PHY4 doesn't seem to probe very reliably without it. It's quite possible that we're missing some MDIO bus initialisation code in if_arge for the AR724x case. As I dislike DELAY() workarounds in general, it's definitely worth trying to figure out why this is the case. Tested on: AP93 (AR7240) reference design Obtained from: Linux OpenWRT Added: head/sys/dev/etherswitch/arswitch/arswitch_7240.c (contents, props changed) head/sys/dev/etherswitch/arswitch/arswitch_7240.h (contents, props changed) Modified: head/sys/conf/files head/sys/dev/etherswitch/arswitch/arswitch.c head/sys/dev/etherswitch/arswitch/arswitchvar.h Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat May 12 05:26:49 2012 (r235322) +++ head/sys/conf/files Sat May 12 05:26:49 2012 (r235323) @@ -3688,3 +3688,16 @@ dev/xen/xenpci/evtchn.c optional dev/etherswitch/mdio_if.m optional miiproxy dev/etherswitch/mdio.c optional miiproxy dev/etherswitch/miiproxy.c optional miiproxy + +dev/etherswitch/etherswitch.c optional etherswitch +dev/etherswitch/etherswitch_if.m optional etherswitch + +dev/etherswitch/rtl8366/rtl8366rb.c optional rtl8366rb + +dev/etherswitch/arswitch/arswitch.c optional arswitch +dev/etherswitch/arswitch/arswitch_reg.c optional arswitch +dev/etherswitch/arswitch/arswitch_phy.c optional arswitch +dev/etherswitch/arswitch/arswitch_8216.c optional arswitch +dev/etherswitch/arswitch/arswitch_8226.c optional arswitch +dev/etherswitch/arswitch/arswitch_8316.c optional arswitch +dev/etherswitch/arswitch/arswitch_7240.c optional arswitch Modified: head/sys/dev/etherswitch/arswitch/arswitch.c ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitch.c Sat May 12 05:26:49 2012 (r235322) +++ head/sys/dev/etherswitch/arswitch/arswitch.c Sat May 12 05:26:49 2012 (r235323) @@ -59,6 +59,7 @@ #include #include +#include #include #include #include @@ -96,6 +97,15 @@ arswitch_probe(device_t dev) sc = device_get_softc(dev); bzero(sc, sizeof(*sc)); sc->page = -1; + + /* AR7240 probe */ + if (ar7240_probe(dev) == 0) { + chipname = "AR7240"; + sc->sc_switchtype = AR8X16_SWITCH_AR7240; + goto done; + } + + /* AR8xxx probe */ id = arswitch_readreg(dev, AR8X16_REG_MASK_CTRL); switch ((id & AR8X16_MASK_CTRL_VER_MASK) >> AR8X16_MASK_CTRL_VER_SHIFT) { @@ -114,6 +124,8 @@ arswitch_probe(device_t dev) default: chipname = NULL; } + +done: DPRINTF(dev, "chipname=%s, rev=%02x\n", chipname, id & AR8X16_MASK_CTRL_REV_MASK); if (chipname != NULL) { @@ -176,7 +188,9 @@ arswitch_attach(device_t dev) /* * Attach switch related functions */ - if (AR8X16_IS_SWITCH(sc, AR8216)) + if (AR8X16_IS_SWITCH(sc, AR7240)) + ar7240_attach(sc); + else if (AR8X16_IS_SWITCH(sc, AR8216)) ar8216_attach(sc); else if (AR8X16_IS_SWITCH(sc, AR8226)) ar8226_attach(sc); Added: head/sys/dev/etherswitch/arswitch/arswitch_7240.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/etherswitch/arswitch/arswitch_7240.c Sat May 12 05:26:49 2012 (r235323) @@ -0,0 +1,143 @@ +/*- + * Copyright (c) 2011-2012 Stefan Bethke. + * Copyright (c) 2012 Adrian Chadd. + * 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$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include /* XXX for probe */ +#include + +#include "mdio_if.h" +#include "miibus_if.h" +#include "etherswitch_if.h" + +/* XXX belongs in arswitch_7240_reg.h */ + +#define AR7240_REG_CPU_PORT 0x78 +#define AR7240_MIRROR_PORT_MASK 0x000000f0 +#define AR7240_MIRROR_PORT_S 4 +#define AR7240_CPU_PORT_EN 0x00000100 + +#define AR7240_REG_TAG_PRIORITY 0x70 + +/* + * AR7240 specific functions + */ +static int +ar7240_hw_setup(struct arswitch_softc *sc) +{ + + /* Enable CPU port; disable mirror port */ + arswitch_writereg(sc->sc_dev, AR7240_REG_CPU_PORT, + AR7240_CPU_PORT_EN | + (15 << AR7240_MIRROR_PORT_S)); + + /* + * Let things settle; probing PHY4 doesn't seem reliable + * without a litle delay. + */ + DELAY(1000); + + return (0); +} + +/* + * Initialise other global values for the AR7240. + */ +static int +ar7240_hw_global_setup(struct arswitch_softc *sc) +{ + + /* Setup TAG priority mapping */ + arswitch_writereg(sc->sc_dev, AR7240_REG_TAG_PRIORITY, 0xfa50); + + /* XXX MTU */ + + /* XXX Service Tag */ + + return (0); +} + +/* + * The AR7240 probes the same as the AR8216. + * + * However, the support is slightly different. + * + * So instead of checking the PHY revision or mask register contents, + * we simply fall back to a hint check. + */ +int +ar7240_probe(device_t dev) +{ + int is_7240 = 0; + + if (resource_int_value(device_get_name(dev), device_get_unit(dev), + "is_7240", &is_7240) != 0) + return (ENXIO); + + if (is_7240 == 0) + return (ENXIO); + + return (0); +} + +void +ar7240_attach(struct arswitch_softc *sc) +{ + + sc->hal.arswitch_hw_setup = ar7240_hw_setup; + sc->hal.arswitch_hw_global_setup = ar7240_hw_global_setup; +} Added: head/sys/dev/etherswitch/arswitch/arswitch_7240.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/etherswitch/arswitch/arswitch_7240.h Sat May 12 05:26:49 2012 (r235323) @@ -0,0 +1,35 @@ +/*- + * Copyright (c) 2011-2012 Stefan Bethke. + * 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$ + */ +#ifndef __ARSWITCH_7240_H__ +#define __ARSWITCH_7240_H__ + +extern int ar7240_probe(device_t dev); +extern void ar7240_attach(struct arswitch_softc *sc); + +#endif /* __ARSWITCH_7240_H__ */ + Modified: head/sys/dev/etherswitch/arswitch/arswitchvar.h ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitchvar.h Sat May 12 05:26:49 2012 (r235322) +++ head/sys/dev/etherswitch/arswitch/arswitchvar.h Sat May 12 05:26:49 2012 (r235323) @@ -30,6 +30,7 @@ typedef enum { AR8X16_SWITCH_NONE, + AR8X16_SWITCH_AR7240, AR8X16_SWITCH_AR8216, AR8X16_SWITCH_AR8226, AR8X16_SWITCH_AR8316, From owner-svn-src-head@FreeBSD.ORG Sat May 12 05:27:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD1141065927; Sat, 12 May 2012 05:27:14 +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 A82808FC19; Sat, 12 May 2012 05:27:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4C5RE0G017431; Sat, 12 May 2012 05:27:14 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4C5REAd017429; Sat, 12 May 2012 05:27:14 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201205120527.q4C5REAd017429@svn.freebsd.org> From: Adrian Chadd Date: Sat, 12 May 2012 05: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: r235324 - head/sys/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: Sat, 12 May 2012 05:27:14 -0000 Author: adrian Date: Sat May 12 05:27:14 2012 New Revision: 235324 URL: http://svn.freebsd.org/changeset/base/235324 Log: Now that there's a hint for it, add a "I'm an AR7240 switch!" hint. Modified: head/sys/mips/conf/AP93.hints Modified: head/sys/mips/conf/AP93.hints ============================================================================== --- head/sys/mips/conf/AP93.hints Sat May 12 05:26:49 2012 (r235323) +++ head/sys/mips/conf/AP93.hints Sat May 12 05:27:14 2012 (r235324) @@ -41,11 +41,10 @@ hint.arge.1.phymask=0x0 hint.arge.1.media=1000 # Force to 1000BaseTX/full hint.arge.1.fduplex=1 -# AR7240 switch config # -# XXX TODO - have the AR7240 switch auto-detect correctly? -# XXX It detects as an AR8216, which isn't strictly true! +# AR7240 switch config # +hint.arswitch.0.is_7240=1 # We need to be explicitly told this hint.arswitch.0.numphys=4 # 4 active switch PHYs (PHY 0 -> 3) hint.arswitch.0.phy4cpu=1 # Yes, PHY 4 == dedicated PHY hint.arswitch.0.is_rgmii=0 # No, not RGMII From owner-svn-src-head@FreeBSD.ORG Sat May 12 06:24:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7A270106566C; Sat, 12 May 2012 06:24:22 +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 4B0EC8FC0C; Sat, 12 May 2012 06:24:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4C6OMZk019218; Sat, 12 May 2012 06:24:22 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4C6OMZK019215; Sat, 12 May 2012 06:24:22 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201205120624.q4C6OMZK019215@svn.freebsd.org> From: Adrian Chadd Date: Sat, 12 May 2012 06:24: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: r235325 - head/sys/dev/etherswitch/arswitch X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 06:24:22 -0000 Author: adrian Date: Sat May 12 06:24:21 2012 New Revision: 235325 URL: http://svn.freebsd.org/changeset/base/235325 Log: * Remove the AR7240 register defines and reuse the AR8x16 defines. * Include a new register define to represent "disable port mirroring to CPU port". Obtained from: Patrick Kelsey Modified: head/sys/dev/etherswitch/arswitch/arswitch_7240.c head/sys/dev/etherswitch/arswitch/arswitchreg.h Modified: head/sys/dev/etherswitch/arswitch/arswitch_7240.c ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitch_7240.c Sat May 12 05:27:14 2012 (r235324) +++ head/sys/dev/etherswitch/arswitch/arswitch_7240.c Sat May 12 06:24:21 2012 (r235325) @@ -66,11 +66,6 @@ /* XXX belongs in arswitch_7240_reg.h */ -#define AR7240_REG_CPU_PORT 0x78 -#define AR7240_MIRROR_PORT_MASK 0x000000f0 -#define AR7240_MIRROR_PORT_S 4 -#define AR7240_CPU_PORT_EN 0x00000100 - #define AR7240_REG_TAG_PRIORITY 0x70 /* @@ -81,9 +76,8 @@ ar7240_hw_setup(struct arswitch_softc *s { /* Enable CPU port; disable mirror port */ - arswitch_writereg(sc->sc_dev, AR7240_REG_CPU_PORT, - AR7240_CPU_PORT_EN | - (15 << AR7240_MIRROR_PORT_S)); + arswitch_writereg(sc->sc_dev, AR8X16_REG_CPU_PORT, + AR8X16_CPU_PORT_EN | AR8X16_CPU_MIRROR_DIS); /* * Let things settle; probing PHY4 doesn't seem reliable Modified: head/sys/dev/etherswitch/arswitch/arswitchreg.h ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitchreg.h Sat May 12 05:27:14 2012 (r235324) +++ head/sys/dev/etherswitch/arswitch/arswitchreg.h Sat May 12 06:24:21 2012 (r235325) @@ -122,6 +122,9 @@ #define AR8X16_REG_CPU_PORT 0x0078 #define AR8X16_MIRROR_PORT_SHIFT 4 +#define AR8X16_MIRROR_PORT_MASK (0xf << AR8X16_MIRROR_PORT_SHIFT) +#define AR8X16_CPU_MIRROR_PORT(_p) ((_p) << AR8X16_MIRROR_PORT_SHIFT) +#define AR8X16_CPU_MIRROR_DIS AR8X16_CPU_MIRROR_PORT(0xf) #define AR8X16_CPU_PORT_EN (1 << 8) #define AR8X16_REG_MIB_FUNC0 0x0080 From owner-svn-src-head@FreeBSD.ORG Sat May 12 07:01:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4DD23106566B; Sat, 12 May 2012 07:01:22 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3922B8FC21; Sat, 12 May 2012 07:01:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4C71Mj5020326; Sat, 12 May 2012 07:01:22 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4C71MBu020324; Sat, 12 May 2012 07:01:22 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201205120701.q4C71MBu020324@svn.freebsd.org> From: Joel Dahl Date: Sat, 12 May 2012 07:01: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: r235326 - 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: Sat, 12 May 2012 07:01:22 -0000 Author: joel (doc committer) Date: Sat May 12 07:01:21 2012 New Revision: 235326 URL: http://svn.freebsd.org/changeset/base/235326 Log: mdoc: list items should be specified with the It macro. Modified: head/share/man/man4/ulpt.4 Modified: head/share/man/man4/ulpt.4 ============================================================================== --- head/share/man/man4/ulpt.4 Sat May 12 06:24:21 2012 (r235325) +++ head/share/man/man4/ulpt.4 Sat May 12 07:01:21 2012 (r235326) @@ -56,8 +56,8 @@ driver provides support for USB printers bi- or uni-directional protocol. The bits in the minor number select various features of the driver. .Bl -column "Minor Bit" "Functionxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -offset indent -.Em "Minor Bit Function" -64 Do not initialize (reset) the device on the port. +.It Em "Minor Bit" Ta Em "Function" +.It "64" Ta "Do not initialize (reset) the device on the port." .El .Pp Some printers cannot handle the reset on open; in case of problems try the From owner-svn-src-head@FreeBSD.ORG Sat May 12 07:38:04 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 547391065674; Sat, 12 May 2012 07:38:04 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id C48FF8FC08; Sat, 12 May 2012 07:38:03 +0000 (UTC) Received: from c122-106-171-232.carlnfd1.nsw.optusnet.com.au (c122-106-171-232.carlnfd1.nsw.optusnet.com.au [122.106.171.232]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q4C7bs8B009777 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 12 May 2012 17:37:55 +1000 Date: Sat, 12 May 2012 17:37:54 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Xin LI In-Reply-To: Message-ID: <20120512172928.U926@besplex.bde.org> References: <201205112343.q4BNhWh7005829@svn.freebsd.org> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-609456488-1336808274=:926" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI Subject: Re: svn commit: r235301 - 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: Sat, 12 May 2012 07:38:04 -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-609456488-1336808274=:926 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Fri, 11 May 2012, Xin LI wrote: >> Log: >> =C2=A0Revert previous revision, misunderstood the code :( >> >> Modified: >> =C2=A0head/sys/kern/kern_kthread.c >> >> Modified: head/sys/kern/kern_kthread.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/kern/kern_kthread.c =C2=A0 =C2=A0 =C2=A0 =C2=A0Fri May 11 2= 3:41:52 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r235300) >> +++ head/sys/kern/kern_kthread.c =C2=A0 =C2=A0 =C2=A0 =C2=A0Fri May 11 2= 3:43:32 2012 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r235301) >> @@ -182,7 +182,6 @@ kproc_suspend(struct proc *p, int timo) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (EINVAL); >> =C2=A0 =C2=A0 =C2=A0 =C2=A0} >> =C2=A0 =C2=A0 =C2=A0 =C2=A0SIGADDSET(p->p_siglist, SIGSTOP); >> - =C2=A0 =C2=A0 =C2=A0 PROC_UNLOCK(p); >> =C2=A0 =C2=A0 =C2=A0 =C2=A0wakeup(p); >> =C2=A0 =C2=A0 =C2=A0 =C2=A0return msleep(&p->p_siglist, &p->p_mtx, PPAUS= E | PDROP, "suspkp", timo); Please don't use mailer clients that corrupt whitespace to binary character= s. The above is unreadable in vi (but i remember it from the original). > For the record, p->p_mtx is the mutex used by PROC_[UN]LOCK(), which > has to be held while calling msleep(). Even if it weren't, dropping the lock before sleeping would give a classic race. Otherwise, PROC_UNLOCK() is a good obfuscation. p_mtx in the sleep call isn't similarly obfuscated. Some subsystems have a macro that obfuscates the name of their lock(s) too, but proc.h doesn't. kern/*.c has 23 hard-coded references of the form &somep->p_mtx. Bruce --0-609456488-1336808274=:926-- From owner-svn-src-head@FreeBSD.ORG Sat May 12 07:52:46 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A88E106566C; Sat, 12 May 2012 07:52:46 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85D218FC14; Sat, 12 May 2012 07:52:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4C7qkP4021852; Sat, 12 May 2012 07:52:46 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4C7qkWX021850; Sat, 12 May 2012 07:52:46 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201205120752.q4C7qkWX021850@svn.freebsd.org> From: Joel Dahl Date: Sat, 12 May 2012 07:52: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: r235327 - head/lib/libc/gmon X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 07:52:46 -0000 Author: joel (doc committer) Date: Sat May 12 07:52:45 2012 New Revision: 235327 URL: http://svn.freebsd.org/changeset/base/235327 Log: mdoc: end list context with El. Modified: head/lib/libc/gmon/moncontrol.3 Modified: head/lib/libc/gmon/moncontrol.3 ============================================================================== --- head/lib/libc/gmon/moncontrol.3 Sat May 12 07:01:21 2012 (r235326) +++ head/lib/libc/gmon/moncontrol.3 Sat May 12 07:52:45 2012 (r235327) @@ -104,6 +104,7 @@ The following environment variables affe .Bl -tag -width ".Ev PROFIL_USE_PID" .It PROFIL_USE_PID If set, the pid of the process is inserted into the filename. +.El .Sh FILES .Bl -tag -width progname.gmon -compact .It Pa progname.gmon From owner-svn-src-head@FreeBSD.ORG Sat May 12 09:03:31 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77002106566B; Sat, 12 May 2012 09:03:31 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 600258FC14; Sat, 12 May 2012 09:03:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4C93V4t024223; Sat, 12 May 2012 09:03:31 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4C93VpH024210; Sat, 12 May 2012 09:03:31 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205120903.q4C93VpH024210@svn.freebsd.org> From: Andriy Gapon Date: Sat, 12 May 2012 09:03: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: r235329 - in head/sys/boot: common i386/libi386 i386/loader i386/zfsboot sparc64/loader 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: Sat, 12 May 2012 09:03:31 -0000 Author: avg Date: Sat May 12 09:03:30 2012 New Revision: 235329 URL: http://svn.freebsd.org/changeset/base/235329 Log: zfsboot/zfsloader: support accessing filesystems within a pool In zfs loader zfs device name format now is "zfs:pool/fs", fully qualified file path is "zfs:pool/fs:/path/to/file" loader allows accessing files from various pools and filesystems as well as changing currdev to a different pool/filesystem. zfsboot accepts kernel/loader name in a format pool:fs:path/to/file or, as before, pool:path/to/file; in the latter case a default filesystem is used (pool root or bootfs). zfsboot passes guids of the selected pool and dataset to zfsloader to be used as its defaults. zfs support should be architecture independent and is provided in a separate library, but architectures wishing to use this zfs support still have to provide some glue code and their devdesc should be compatible with zfs_devdesc. arch_zfs_probe method is used to discover all disk devices that may be part of ZFS pool(s). libi386 unconditionally includes zfs support, but some zfs-specific functions are stubbed out as weak symbols. The strong definitions are provided in libzfsboot. This change mean that the size of i386_devspec becomes larger to match zfs_devspec. Backward-compatibility shims are provided for recently added sparc64 zfs boot support. Currently that architecture still works the old way and does not support the new features. TODO: - clear up pool root filesystem vs pool bootfs filesystem distinction - update sparc64 support - set vfs.root.mountfrom based on currdev (for zfs) Mid-future TODO: - loader sub-menu for selecting alternative boot environment Distant future TODO: - support accessing snapshots, using a snapshot as readonly root Reviewed by: marius (sparc64), Gavin Mu (sparc64) Tested by: Florian Wagner (x86), marius (sparc64) No objections: fs@, hackers@ MFC after: 1 month Added: head/sys/boot/zfs/devicename_stubs.c (contents, props changed) head/sys/boot/zfs/libzfs.h (contents, props changed) Modified: head/sys/boot/common/bootstrap.h head/sys/boot/i386/libi386/Makefile head/sys/boot/i386/libi386/devicename.c head/sys/boot/i386/libi386/libi386.h head/sys/boot/i386/loader/conf.c head/sys/boot/i386/loader/main.c head/sys/boot/i386/zfsboot/zfsboot.c head/sys/boot/sparc64/loader/main.c head/sys/boot/zfs/zfs.c head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/common/bootstrap.h ============================================================================== --- head/sys/boot/common/bootstrap.h Sat May 12 08:22:41 2012 (r235328) +++ head/sys/boot/common/bootstrap.h Sat May 12 09:03:30 2012 (r235329) @@ -317,6 +317,9 @@ struct arch_switch #else void (*arch_loadseg)(void *eh, void *ph, uint64_t delta); #endif + + /* Probe ZFS pool(s), if needed. */ + void (*arch_zfs_probe)(void); }; extern struct arch_switch archsw; Modified: head/sys/boot/i386/libi386/Makefile ============================================================================== --- head/sys/boot/i386/libi386/Makefile Sat May 12 08:22:41 2012 (r235328) +++ head/sys/boot/i386/libi386/Makefile Sat May 12 09:03:30 2012 (r235329) @@ -9,6 +9,8 @@ SRCS= biosacpi.c bioscd.c biosdisk.c bio elf64_freebsd.c \ i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \ smbios.c time.c vidconsole.c amd64_tramp.S spinconsole.c +.PATH: ${.CURDIR}/../../zfs +SRCS+= devicename_stubs.c # Enable PXE TFTP or NFS support, not both. .if defined(LOADER_TFTP_SUPPORT) Modified: head/sys/boot/i386/libi386/devicename.c ============================================================================== --- head/sys/boot/i386/libi386/devicename.c Sat May 12 08:22:41 2012 (r235328) +++ head/sys/boot/i386/libi386/devicename.c Sat May 12 09:03:30 2012 (r235329) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include "bootstrap.h" #include "libi386.h" +#include "../zfs/libzfs.h" static int i386_parsedev(struct i386_devdesc **dev, const char *devspec, const char **path); @@ -171,7 +172,6 @@ i386_parsedev(struct i386_devdesc **dev, case DEVT_CD: case DEVT_NET: - case DEVT_ZFS: unit = 0; if (*np && (*np != ':')) { @@ -192,7 +192,11 @@ i386_parsedev(struct i386_devdesc **dev, if (path != NULL) *path = (*cp == 0) ? cp : cp + 1; break; - + case DEVT_ZFS: + err = zfs_parsedev((struct zfs_devdesc *)idev, np, path); + if (err != 0) + goto fail; + break; default: err = EINVAL; goto fail; @@ -247,9 +251,10 @@ i386_fmtdev(void *vdev) break; case DEVT_NET: - case DEVT_ZFS: sprintf(buf, "%s%d:", dev->d_dev->dv_name, dev->d_unit); break; + case DEVT_ZFS: + return(zfs_fmtdev(vdev)); } return(buf); } Modified: head/sys/boot/i386/libi386/libi386.h ============================================================================== --- head/sys/boot/i386/libi386/libi386.h Sat May 12 08:22:41 2012 (r235328) +++ head/sys/boot/i386/libi386/libi386.h Sat May 12 09:03:30 2012 (r235329) @@ -30,7 +30,8 @@ /* * i386 fully-qualified device descriptor. * Note, this must match the 'struct devdesc' declaration - * in bootstrap.h. + * in bootstrap.h and also with struct zfs_devdesc for zfs + * support. */ struct i386_devdesc { @@ -49,6 +50,12 @@ struct i386_devdesc { void *data; } bioscd; + struct + { + void *data; + uint64_t pool_guid; + uint64_t root_guid; + } zfs; } d_kind; }; Modified: head/sys/boot/i386/loader/conf.c ============================================================================== --- head/sys/boot/i386/loader/conf.c Sat May 12 08:22:41 2012 (r235328) +++ head/sys/boot/i386/loader/conf.c Sat May 12 09:03:30 2012 (r235329) @@ -30,6 +30,9 @@ __FBSDID("$FreeBSD$"); #include #include #include "libi386/libi386.h" +#if defined(LOADER_ZFS_SUPPORT) +#include "../zfs/libzfs.h" +#endif /* * We could use linker sets for some or all of these, but @@ -50,10 +53,6 @@ __FBSDID("$FreeBSD$"); extern struct devsw fwohci; #endif -#if defined(LOADER_ZFS_SUPPORT) -extern struct devsw zfs_dev; -#endif - /* Exported for libstand */ struct devsw *devsw[] = { &bioscd, @@ -70,10 +69,6 @@ struct devsw *devsw[] = { NULL }; -#if defined(LOADER_ZFS_SUPPORT) -extern struct fs_ops zfs_fsops; -#endif - struct fs_ops *file_system[] = { &ufs_fsops, &ext2fs_fsops, Modified: head/sys/boot/i386/loader/main.c ============================================================================== --- head/sys/boot/i386/loader/main.c Sat May 12 08:22:41 2012 (r235328) +++ head/sys/boot/i386/loader/main.c Sat May 12 09:03:30 2012 (r235329) @@ -44,6 +44,10 @@ __FBSDID("$FreeBSD$"); #include "libi386/libi386.h" #include "btxv86.h" +#ifdef LOADER_ZFS_SUPPORT +#include "../zfs/libzfs.h" +#endif + CTASSERT(sizeof(struct bootargs) == BOOTARGS_SIZE); CTASSERT(offsetof(struct bootargs, bootinfo) == BA_BOOTINFO); CTASSERT(offsetof(struct bootargs, bootflags) == BA_BOOTFLAGS); @@ -62,6 +66,9 @@ static void extract_currdev(void); static int isa_inb(int port); static void isa_outb(int port, int value); void exit(int code); +#ifdef LOADER_ZFS_SUPPORT +static void i386_zfs_probe(void); +#endif /* from vers.c */ extern char bootprog_name[], bootprog_rev[], bootprog_date[], bootprog_maker[]; @@ -153,6 +160,9 @@ main(void) archsw.arch_readin = i386_readin; archsw.arch_isainb = isa_inb; archsw.arch_isaoutb = isa_outb; +#ifdef LOADER_ZFS_SUPPORT + archsw.arch_zfs_probe = i386_zfs_probe; +#endif /* * March through the device switch probing for things. @@ -196,8 +206,11 @@ main(void) static void extract_currdev(void) { - struct i386_devdesc new_currdev; - int biosdev = -1; + struct i386_devdesc new_currdev; +#ifdef LOADER_ZFS_SUPPORT + struct zfs_boot_args *zargs; +#endif + int biosdev = -1; /* Assume we are booting from a BIOS disk by default */ new_currdev.d_dev = &biosdisk; @@ -218,6 +231,24 @@ extract_currdev(void) new_currdev.d_kind.biosdisk.partition = 0; biosdev = -1; } +#ifdef LOADER_ZFS_SUPPORT + } else if ((kargs->bootflags & KARGS_FLAGS_ZFS) != 0) { + zargs = NULL; + /* check for new style extended argument */ + if ((kargs->bootflags & KARGS_FLAGS_EXTARG) != 0) + zargs = (struct zfs_boot_args *)(kargs + 1); + + if (zargs != NULL && zargs->size >= sizeof(*zargs)) { + /* sufficient data is provided */ + new_currdev.d_kind.zfs.pool_guid = zargs->pool; + new_currdev.d_kind.zfs.root_guid = zargs->root; + } else { + /* old style zfsboot block */ + new_currdev.d_kind.zfs.pool_guid = kargs->zfspool; + new_currdev.d_kind.zfs.root_guid = 0; + } + new_currdev.d_dev = &zfs_dev; +#endif } else if ((initial_bootdev & B_MAGICMASK) != B_DEVMAGIC) { /* The passed-in boot device is bad */ new_currdev.d_kind.biosdisk.slice = -1; @@ -238,7 +269,7 @@ extract_currdev(void) biosdev = 0x80 + B_UNIT(initial_bootdev); /* assume harddisk */ } new_currdev.d_type = new_currdev.d_dev->dv_type; - + /* * If we are booting off of a BIOS disk and we didn't succeed in determining * which one we booted off of, just use disk0: as a reasonable default. @@ -249,33 +280,11 @@ extract_currdev(void) "Guessed BIOS device 0x%x not found by probes, defaulting to disk0:\n", biosdev); new_currdev.d_unit = 0; } + env_setenv("currdev", EV_VOLATILE, i386_fmtdev(&new_currdev), i386_setcurrdev, env_nounset); env_setenv("loaddev", EV_VOLATILE, i386_fmtdev(&new_currdev), env_noset, env_nounset); - -#ifdef LOADER_ZFS_SUPPORT - /* - * If we were started from a ZFS-aware boot2, we can work out - * which ZFS pool we are booting from. - */ - if (kargs->bootflags & KARGS_FLAGS_ZFS) { - /* - * Dig out the pool guid and convert it to a 'unit number' - */ - uint64_t guid; - int unit; - char devname[32]; - extern int zfs_guid_to_unit(uint64_t); - - guid = kargs->zfspool; - unit = zfs_guid_to_unit(guid); - if (unit >= 0) { - sprintf(devname, "zfs%d", unit); - setenv("currdev", devname, 1); - } - } -#endif } COMMAND_SET(reboot, "reboot", "reboot the system", command_reboot); @@ -342,3 +351,30 @@ isa_outb(int port, int value) } } +#ifdef LOADER_ZFS_SUPPORT +static void +i386_zfs_probe(void) +{ + char devname[32]; + int unit, slice; + + /* + * Open all the disks we can find and see if we can reconstruct + * ZFS pools from them. Bogusly assumes that the disks are named + * diskN, diskNpM or diskNsM. + */ + for (unit = 0; unit < MAXBDDEV; unit++) { + sprintf(devname, "disk%d:", unit); + if (zfs_probe_dev(devname, NULL) == ENXIO) + continue; + for (slice = 1; slice <= 128; slice++) { + sprintf(devname, "disk%dp%d:", unit, slice); + zfs_probe_dev(devname, NULL); + } + for (slice = 1; slice <= 4; slice++) { + sprintf(devname, "disk%ds%d:", unit, slice); + zfs_probe_dev(devname, NULL); + } + } +} +#endif Modified: head/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- head/sys/boot/i386/zfsboot/zfsboot.c Sat May 12 08:22:41 2012 (r235328) +++ head/sys/boot/i386/zfsboot/zfsboot.c Sat May 12 09:03:30 2012 (r235329) @@ -43,6 +43,8 @@ __FBSDID("$FreeBSD$"); #include "cons.h" #include "bootargs.h" +#include "libzfs.h" + #define PATH_DOTCONFIG "/boot.config" #define PATH_CONFIG "/boot/config" #define PATH_BOOT3 "/boot/zfsloader" @@ -91,9 +93,12 @@ static const unsigned char dev_maj[NDEV] static char cmd[512]; static char cmddup[512]; static char kname[1024]; +static char rootname[256]; static int comspeed = SIOSPD; static struct bootinfo bootinfo; static uint32_t bootdev; +static struct zfs_boot_args zfsargs; +static struct zfsmount zfsmount; vm_offset_t high_heap_base; uint32_t bios_basemem, bios_extmem, high_heap_size; @@ -170,7 +175,7 @@ zfs_read(spa_t *spa, const dnode_phys_t /* * Current ZFS pool */ -spa_t *spa; +static spa_t *spa; /* * A wrapper for dskread that doesn't have to worry about whether the @@ -209,7 +214,7 @@ static int xfsread(const dnode_phys_t *dnode, off_t *offp, void *buf, size_t nbyte) { if ((size_t)zfs_read(spa, dnode, offp, buf, nbyte) != nbyte) { - printf("Invalid %s\n", "format"); + printf("Invalid format\n"); return -1; } return 0; @@ -529,10 +534,12 @@ main(void) } } - zfs_mount_pool(spa); - - if (zfs_lookup(spa, PATH_CONFIG, &dn) == 0 || - zfs_lookup(spa, PATH_DOTCONFIG, &dn) == 0) { + if (zfs_spa_init(spa) != 0 || zfs_mount(spa, 0, &zfsmount) != 0) { + printf("%s: failed to mount default pool %s\n", + BOOTPROG, spa->spa_name); + autoboot = 0; + } else if (zfs_lookup(&zfsmount, PATH_CONFIG, &dn) == 0 || + zfs_lookup(&zfsmount, PATH_DOTCONFIG, &dn) == 0) { off = 0; zfs_read(spa, &dn, &off, cmd, sizeof(cmd)); } @@ -567,11 +574,17 @@ main(void) /* Present the user with the boot2 prompt. */ for (;;) { - if (!autoboot || !OPT_CHECK(RBX_QUIET)) - printf("\nFreeBSD/x86 boot\n" - "Default: %s:%s\n" - "boot: ", - spa->spa_name, kname); + if (!autoboot || !OPT_CHECK(RBX_QUIET)) { + printf("\nFreeBSD/x86 boot\n"); + if (zfs_rlookup(spa, zfsmount.rootobj, rootname) != 0) + printf("Default: %s:<0x%llx>:%s\n" + "boot: ", + spa->spa_name, zfsmount.rootobj, kname); + else + printf("Default: %s:%s:%s\n" + "boot: ", + spa->spa_name, rootname, kname); + } if (ioctrl & IO_SERIAL) sio_flush(); if (!autoboot || keyhit(5)) @@ -607,7 +620,8 @@ load(void) uint32_t addr, x; int fmt, i, j; - if (zfs_lookup(spa, kname, &dn)) { + if (zfs_lookup(&zfsmount, kname, &dn)) { + printf("\nCan't find %s\n", kname); return; } off = 0; @@ -681,12 +695,16 @@ load(void) } bootinfo.bi_esymtab = VTOP(p); bootinfo.bi_kernelname = VTOP(kname); + zfsargs.size = sizeof(zfsargs); + zfsargs.pool = zfsmount.spa->spa_guid; + zfsargs.root = zfsmount.rootobj; __exec((caddr_t)addr, RB_BOOTINFO | (opts & RBX_MASK), bootdev, - KARGS_FLAGS_ZFS, + KARGS_FLAGS_ZFS | KARGS_FLAGS_EXTARG, (uint32_t) spa->spa_guid, (uint32_t) (spa->spa_guid >> 32), - VTOP(&bootinfo)); + VTOP(&bootinfo), + zfsargs); } static int @@ -738,7 +756,7 @@ parse(void) } if (c == '?') { dnode_phys_t dn; - if (zfs_lookup(spa, arg, &dn) == 0) { + if (zfs_lookup(&zfsmount, arg, &dn) == 0) { zap_list(spa, &dn); } return -1; @@ -760,17 +778,32 @@ parse(void) q = (char *) strchr(arg, ':'); if (q) { spa_t *newspa; + uint64_t newroot; *q++ = 0; newspa = spa_find_by_name(arg); if (newspa) { + arg = q; spa = newspa; - zfs_mount_pool(spa); + newroot = 0; + q = (char *) strchr(arg, ':'); + if (q) { + *q++ = 0; + if (zfs_lookup_dataset(spa, arg, &newroot)) { + printf("\nCan't find dataset %s in ZFS pool %s\n", + arg, spa->spa_name); + return -1; + } + arg = q; + } + if (zfs_mount(spa, newroot, &zfsmount)) { + printf("\nCan't mount ZFS dataset\n"); + return -1; + } } else { printf("\nCan't find ZFS pool %s\n", arg); return -1; } - arg = q; } if ((i = ep - arg)) { if ((size_t)i >= sizeof(kname)) Modified: head/sys/boot/sparc64/loader/main.c ============================================================================== --- head/sys/boot/sparc64/loader/main.c Sat May 12 08:22:41 2012 (r235328) +++ head/sys/boot/sparc64/loader/main.c Sat May 12 09:03:30 2012 (r235329) @@ -74,6 +74,8 @@ __FBSDID("$FreeBSD$"); #include "libofw.h" #include "dev_net.h" +#define MAXBDDEV 31 + extern char bootprog_name[], bootprog_rev[], bootprog_date[], bootprog_maker[]; enum { @@ -141,7 +143,7 @@ static vm_offset_t heapva; static phandle_t root; #ifdef LOADER_ZFS_SUPPORT -static int zfs_dev_init(void); +static int sparc64_zfs_dev_init(void); #include "zfs.c" #endif @@ -157,7 +159,7 @@ struct devsw *devsw[] = { &netdev, #endif #ifdef LOADER_ZFS_SUPPORT - &zfs_dev, + &zfs_dev_compat, #endif 0 }; @@ -733,7 +735,7 @@ tlb_init_sun4u(void) #ifdef LOADER_ZFS_SUPPORT static int -zfs_dev_init(void) +sparc64_zfs_dev_init(void) { struct vtoc8 vtoc; char devname[512]; @@ -868,6 +870,13 @@ main(int (*openfirm)(void *)) env_setenv("loaddev", EV_VOLATILE, bootpath, env_noset, env_nounset); +#ifdef LOADER_ZFS_SUPPORT + /* + * Patch up ZFS. + */ + zfs_dev_compat.dv_init = sparc64_zfs_dev_init; +#endif + /* * Initialize devices. */ Added: head/sys/boot/zfs/devicename_stubs.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/zfs/devicename_stubs.c Sat May 12 09:03:30 2012 (r235329) @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 2012 Andriy Gapon + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include "libzfs.h" + +__attribute__((weak)) +int +zfs_parsedev(struct zfs_devdesc *dev, const char *devspec, const char **path) +{ + return (EINVAL); +} + +__attribute__((weak)) +char * +zfs_fmtdev(void *vdev) +{ + static char buf[128]; + + return (buf); +} Added: head/sys/boot/zfs/libzfs.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/zfs/libzfs.h Sat May 12 09:03:30 2012 (r235329) @@ -0,0 +1,66 @@ +/*- + * Copyright (c) 2012 Andriy Gapon + * 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$ + */ + +#ifndef _BOOT_LIBZFS_H_ +#define _BOOT_LIBZFS_H_ + +#define ZFS_MAXNAMELEN 256 + +/* + * ZFS fully-qualified device descriptor. + * Note, this must match the 'struct devdesc' declaration in bootstrap.h. + * Arch-specific device descriptors should be binary compatible with this + * structure if they are to support ZFS. + */ +struct zfs_devdesc +{ + struct devsw *d_dev; + int d_type; + int d_unit; + void *d_opendata; + uint64_t pool_guid; + uint64_t root_guid; +}; + +struct zfs_boot_args +{ + uint32_t size; + uint32_t reserved; + uint64_t pool; + uint64_t root; +}; + +int zfs_parsedev(struct zfs_devdesc *dev, const char *devspec, + const char **path); +char *zfs_fmtdev(void *vdev); +int zfs_probe_dev(const char *devname, uint64_t *pool_guid); + +extern struct devsw zfs_dev; +extern struct fs_ops zfs_fsops; + +#endif /*_BOOT_LIBZFS_H_*/ Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Sat May 12 08:22:41 2012 (r235328) +++ head/sys/boot/zfs/zfs.c Sat May 12 09:03:30 2012 (r235329) @@ -43,9 +43,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include "zfsimpl.c" +#include "libzfs.h" -#define MAXBDDEV 31 +#include "zfsimpl.c" static int zfs_open(const char *path, struct open_file *f); static int zfs_write(struct open_file *f, void *buf, size_t size, size_t *resid); @@ -56,6 +56,7 @@ static int zfs_stat(struct open_file *f, static int zfs_readdir(struct open_file *f, struct dirent *d); struct devsw zfs_dev; +struct devsw zfs_dev_compat; struct fs_ops zfs_fsops = { "zfs", @@ -85,35 +86,20 @@ struct file { static int zfs_open(const char *upath, struct open_file *f) { - spa_t *spa = (spa_t *) f->f_devdata; + struct zfsmount *mount = (struct zfsmount *)f->f_devdata; struct file *fp; int rc; - if (f->f_dev != &zfs_dev) + if (f->f_dev != &zfs_dev && f->f_dev != &zfs_dev_compat) return (EINVAL); - rc = zfs_mount_pool(spa); - if (rc) - return (rc); - /* allocate file system specific data structure */ fp = malloc(sizeof(struct file)); bzero(fp, sizeof(struct file)); f->f_fsdata = (void *)fp; - if (spa->spa_root_objset.os_type != DMU_OST_ZFS) { - printf("Unexpected object set type %llu\n", - spa->spa_root_objset.os_type); - rc = EIO; - goto out; - } - - rc = zfs_lookup(spa, upath, &fp->f_dnode); - if (rc) - goto out; - + rc = zfs_lookup(mount, upath, &fp->f_dnode); fp->f_seekp = 0; -out: if (rc) { f->f_fsdata = NULL; free(fp); @@ -142,7 +128,7 @@ zfs_close(struct open_file *f) static int zfs_read(struct open_file *f, void *start, size_t size, size_t *resid /* out */) { - spa_t *spa = (spa_t *) f->f_devdata; + spa_t *spa = ((struct zfsmount *)f->f_devdata)->spa; struct file *fp = (struct file *)f->f_fsdata; struct stat sb; size_t n; @@ -216,7 +202,7 @@ zfs_seek(struct open_file *f, off_t offs static int zfs_stat(struct open_file *f, struct stat *sb) { - spa_t *spa = (spa_t *) f->f_devdata; + spa_t *spa = ((struct zfsmount *)f->f_devdata)->spa; struct file *fp = (struct file *)f->f_fsdata; return (zfs_dnode_stat(spa, &fp->f_dnode, sb)); @@ -225,7 +211,7 @@ zfs_stat(struct open_file *f, struct sta static int zfs_readdir(struct open_file *f, struct dirent *d) { - spa_t *spa = (spa_t *) f->f_devdata; + spa_t *spa = ((struct zfsmount *)f->f_devdata)->spa; struct file *fp = (struct file *)f->f_fsdata; mzap_ent_phys_t mze; struct stat sb; @@ -381,68 +367,33 @@ vdev_read(vdev_t *vdev, void *priv, off_ } } -/* - * Convert a pool guid to a 'unit number' suitable for use with zfs_dev_open. - */ -int -zfs_guid_to_unit(uint64_t guid) +static int +zfs_dev_init(void) { - spa_t *spa; - int unit; - - unit = 0; - STAILQ_FOREACH(spa, &zfs_pools, spa_link) { - if (spa->spa_guid == guid) - return unit; - unit++; - } - return (-1); + zfs_init(); + if (archsw.arch_zfs_probe == NULL) + return (ENXIO); + archsw.arch_zfs_probe(); + return (0); } -#if defined(__amd64__) || defined(__i386__) -static int -zfs_dev_init(void) +int +zfs_probe_dev(const char *devname, uint64_t *pool_guid) { - char devname[512]; - int unit, slice; + spa_t *spa; int fd; + int ret; - /* - * Open all the disks we can find and see if we can reconstruct - * ZFS pools from them. Bogusly assumes that the disks are named - * diskN, diskNpM or diskNsM. - */ - zfs_init(); - for (unit = 0; unit < MAXBDDEV; unit++) { - sprintf(devname, "disk%d:", unit); - fd = open(devname, O_RDONLY); - if (fd == -1) - continue; - - /* - * If we find a vdev, the zfs code will eat the fd, otherwise - * we close it. - */ - if (vdev_probe(vdev_read, (void*) (uintptr_t) fd, 0)) - close(fd); - - for (slice = 1; slice <= 128; slice++) { - sprintf(devname, "disk%dp%d:", unit, slice); - fd = open(devname, O_RDONLY); - if (fd == -1) { - sprintf(devname, "disk%ds%d:", unit, slice); - fd = open(devname, O_RDONLY); - if (fd == -1) - continue; - } - if (vdev_probe(vdev_read, (void*) (uintptr_t) fd, 0)) - close(fd); - } - } - + fd = open(devname, O_RDONLY); + if (fd == -1) + return (ENXIO); + ret = vdev_probe(vdev_read, (void *)(uintptr_t)fd, &spa); + if (ret != 0) + close(fd); + else if (pool_guid != NULL) + *pool_guid = spa->spa_guid; return (0); } -#endif /* * Print information about ZFS pools @@ -452,54 +403,85 @@ zfs_dev_print(int verbose) { spa_t *spa; char line[80]; - int unit; if (verbose) { spa_all_status(); return; } - unit = 0; STAILQ_FOREACH(spa, &zfs_pools, spa_link) { - sprintf(line, " zfs%d: %s\n", unit, spa->spa_name); + sprintf(line, " zfs:%s\n", spa->spa_name); pager_output(line); - unit++; } } /* * Attempt to open the pool described by (dev) for use by (f). */ -static int +static int +zfs_dev_open_spa(struct open_file *f, spa_t *spa, uint64_t root_guid) +{ + struct zfsmount *mount; + int rv; + + rv = zfs_spa_init(spa); + if (rv != 0) + return (rv); + mount = malloc(sizeof(*mount)); + rv = zfs_mount(spa, root_guid, mount); + if (rv != 0) { + free(mount); + return (rv); + } + if (mount->objset.os_type != DMU_OST_ZFS) { + printf("Unexpected object set type %llu\n", + mount->objset.os_type); + free(mount); + return (EIO); + } + f->f_devdata = mount; + return (0); +} + +static int zfs_dev_open(struct open_file *f, ...) { + va_list args; + struct zfs_devdesc *dev; + spa_t *spa; + int rv; + + va_start(args, f); + dev = va_arg(args, struct zfs_devdesc *); + va_end(args); + + spa = spa_find_by_guid(dev->pool_guid); + if (!spa) + return (ENXIO); + rv = zfs_dev_open_spa(f, spa, dev->root_guid); + if (rv != 0) + return (rv); + free(dev); + return (0); +} + +static int +zfs_dev_open_compat(struct open_file *f, ...) +{ va_list args; struct devdesc *dev; - int unit, i; spa_t *spa; + int rv; va_start(args, f); - dev = va_arg(args, struct devdesc*); + dev = va_arg(args, struct devdesc *); va_end(args); - /* - * We mostly ignore the stuff that devopen sends us. For now, - * use the unit to find a pool - later we will override the - * devname parsing so that we can name a pool and a fs within - * the pool. - */ - unit = dev->d_unit; - - i = 0; - STAILQ_FOREACH(spa, &zfs_pools, spa_link) { - if (i == unit) - break; - i++; - } - if (!spa) { + spa = spa_find_by_unit(dev->d_unit); + if (!spa) return (ENXIO); - } - - f->f_devdata = spa; + rv = zfs_dev_open_spa(f, spa, 0); + if (rv != 0) + return (rv); free(dev); return (0); } @@ -508,6 +490,7 @@ static int zfs_dev_close(struct open_file *f) { + free(f->f_devdata); f->f_devdata = NULL; return (0); } @@ -520,13 +503,114 @@ zfs_dev_strategy(void *devdata, int rw, } struct devsw zfs_dev = { - .dv_name = "zfs", - .dv_type = DEVT_ZFS, + .dv_name = "zfs", + .dv_type = DEVT_ZFS, .dv_init = zfs_dev_init, - .dv_strategy = zfs_dev_strategy, - .dv_open = zfs_dev_open, - .dv_close = zfs_dev_close, + .dv_strategy = zfs_dev_strategy, + .dv_open = zfs_dev_open, + .dv_close = zfs_dev_close, .dv_ioctl = noioctl, .dv_print = zfs_dev_print, .dv_cleanup = NULL }; + +struct devsw zfs_dev_compat = { + .dv_name = "zfs", + .dv_type = DEVT_ZFS, + .dv_init = zfs_dev_init, + .dv_strategy = zfs_dev_strategy, + .dv_open = zfs_dev_open_compat, + .dv_close = zfs_dev_close, + .dv_ioctl = noioctl, + .dv_print = zfs_dev_print, + .dv_cleanup = NULL +}; + +int +zfs_parsedev(struct zfs_devdesc *dev, const char *devspec, const char **path) +{ + static char rootname[ZFS_MAXNAMELEN]; + static char poolname[ZFS_MAXNAMELEN]; + spa_t *spa; + const char *end; + const char *np; + const char *sep; + int rv; + + np = devspec; + if (*np != ':') + return (EINVAL); + np++; + end = strchr(np, ':'); + if (end == NULL) + return (EINVAL); + sep = strchr(np, '/'); + if (sep == NULL || sep >= end) + sep = end; + memcpy(poolname, np, sep - np); + poolname[sep - np] = '\0'; + if (sep < end) { + sep++; + memcpy(rootname, sep, end - sep); + rootname[end - sep] = '\0'; + } + else + rootname[0] = '\0'; + + spa = spa_find_by_name(poolname); + if (!spa) + return (ENXIO); + rv = zfs_spa_init(spa); + if (rv != 0) + return (rv); + dev->pool_guid = spa->spa_guid; + if (rootname[0] != '\0') { + rv = zfs_lookup_dataset(spa, rootname, &dev->root_guid); + if (rv != 0) + return (rv); + } else + dev->root_guid = 0; + if (path != NULL) + *path = (*end == '\0') ? end : end + 1; + dev->d_dev = &zfs_dev; + dev->d_type = zfs_dev.dv_type; + return (0); +} + +char * +zfs_fmtdev(void *vdev) +{ + static char rootname[ZFS_MAXNAMELEN]; + static char buf[2 * ZFS_MAXNAMELEN + 8]; + struct zfs_devdesc *dev = (struct zfs_devdesc *)vdev; + spa_t *spa; + + buf[0] = '\0'; + if (dev->d_type != DEVT_ZFS) + return (buf); + + spa = spa_find_by_guid(dev->pool_guid); + if (spa == NULL) { + printf("ZFS: can't find pool by guid\n"); + return (buf); + } + if (zfs_spa_init(spa) != 0) { + printf("ZFS: can't init pool\n"); + return (buf); + } + if (dev->root_guid == 0 && zfs_get_root(spa, &dev->root_guid)) { + printf("ZFS: can't find root filesystem\n"); + return (buf); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sat May 12 09:07:42 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 525DD106566B; Sat, 12 May 2012 09:07:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C1668FC0C; Sat, 12 May 2012 09:07:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4C97gXC024380; Sat, 12 May 2012 09:07:42 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4C97gxC024378; Sat, 12 May 2012 09:07:42 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205120907.q4C97gxC024378@svn.freebsd.org> From: Andriy Gapon Date: Sat, 12 May 2012 09:07:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235330 - head/sys/boot/common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 09:07:42 -0000 Author: avg Date: Sat May 12 09:07:41 2012 New Revision: 235330 URL: http://svn.freebsd.org/changeset/base/235330 Log: zfs boot: try to set vfs.root.mountfrom from currdev as a fallback This way with the new zfsloader there is no need to explicitly set zfs root filesystem either via vfs.root.mountfrom or fstab. It should be automatically picked up from currdev which is by default is set from bootfs. Tested by: Florian Wagner (x86) MFC after: 1 month Modified: head/sys/boot/common/boot.c Modified: head/sys/boot/common/boot.c ============================================================================== --- head/sys/boot/common/boot.c Sat May 12 09:03:30 2012 (r235329) +++ head/sys/boot/common/boot.c Sat May 12 09:07:41 2012 (r235330) @@ -311,12 +311,12 @@ getrootmount(char *rootdev) if (getenv("vfs.root.mountfrom") != NULL) return(0); + error = 1; sprintf(lbuf, "%s/etc/fstab", rootdev); if ((fd = open(lbuf, O_RDONLY)) < 0) - return(1); + goto notfound; /* loop reading lines from /etc/fstab What was that about sscanf again? */ - error = 1; while (fgetstr(lbuf, sizeof(lbuf), fd) >= 0) { if ((lbuf[0] == 0) || (lbuf[0] == '#')) continue; @@ -377,6 +377,20 @@ getrootmount(char *rootdev) break; } close(fd); + +notfound: + if (error) { + const char *currdev; + + currdev = getenv("currdev"); + if (currdev != NULL && strncmp("zfs:", currdev, 4) == 0) { + cp = strdup(currdev); + cp[strlen(cp) - 1] = '\0'; + setenv("vfs.root.mountfrom", cp, 0); + error = 0; + } + } + return(error); } From owner-svn-src-head@FreeBSD.ORG Sat May 12 10:53:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EB0B106564A; Sat, 12 May 2012 10:53:50 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5017A8FC08; Sat, 12 May 2012 10:53:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CAroYZ031077; Sat, 12 May 2012 10:53:50 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CAromM031075; Sat, 12 May 2012 10:53:50 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201205121053.q4CAromM031075@svn.freebsd.org> From: Antoine Brodin Date: Sat, 12 May 2012 10: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: r235331 - 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: Sat, 12 May 2012 10:53:50 -0000 Author: antoine Date: Sat May 12 10:53:49 2012 New Revision: 235331 URL: http://svn.freebsd.org/changeset/base/235331 Log: Add more obsolete files. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sat May 12 09:07:41 2012 (r235330) +++ head/ObsoleteFiles.inc Sat May 12 10:53:49 2012 (r235331) @@ -40,9 +40,20 @@ # 20120505: new clang import installed a redundant internal header OLD_FILES+=usr/include/clang/3.1/stdalign.h +# 20120428: MD2 removed from libmd +OLD_FILES+=usr/include/md2.h +OLD_FILES+=usr/share/man/man3/MD2Data.3.gz +OLD_FILES+=usr/share/man/man3/MD2End.3.gz +OLD_FILES+=usr/share/man/man3/MD2File.3.gz +OLD_FILES+=usr/share/man/man3/MD2FileChunk.3.gz +OLD_FILES+=usr/share/man/man3/MD2Final.3.gz +OLD_FILES+=usr/share/man/man3/MD2Init.3.gz +OLD_FILES+=usr/share/man/man3/MD2Update.3.gz +OLD_FILES+=usr/share/man/man3/md2.3.gz # 20120425: libusb version bump (r234684) OLD_LIBS+=usr/lib/libusb.so.2 OLD_LIBS+=usr/lib32/libusb.so.2 +OLD_FILES+=usr/share/man/man3/libsub_get_active_config_descriptor.3.gz # 20120415: new clang import which bumps version from 3.0 to 3.1 OLD_FILES+=usr/include/clang/3.0/altivec.h OLD_FILES+=usr/include/clang/3.0/avxintrin.h @@ -59,6 +70,17 @@ OLD_FILES+=usr/include/clang/3.0/wmmintr OLD_FILES+=usr/include/clang/3.0/x86intrin.h OLD_FILES+=usr/include/clang/3.0/xmmintrin.h OLD_DIRS+=usr/include/clang/3.0 +# 20120412: BIND 9.8.1 release notes removed +OLD_FILES+=usr/share/doc/bind9/RELEASE-NOTES-BIND-9.8.1.pdf +OLD_FILES+=usr/share/doc/bind9/RELEASE-NOTES-BIND-9.8.1.txt +OLD_FILES+=usr/share/doc/bind9/RELEASE-NOTES-BIND-9.8.1.html +OLD_FILES+=usr/share/doc/bind9/release-notes.css +# 20120330: legacy(4) moved to x86 +OLD_FILES+=usr/include/machine/legacyvar.h +# 20120324: MPI headers updated +OLD_FILES+=usr/include/dev/mpt/mpilib/mpi_inb.h +# 20120322: hwpmc_mips24k.h removed +OLD_FILES+=usr/include/dev/hwpmc/hwpmc_mips24k.h # 20120322: Update heimdal to 1.5.1. OLD_FILES+=usr/include/krb5-v4compat.h \ usr/include/krb_err.h \ @@ -103,6 +125,8 @@ OLD_LIBS+=usr/lib/libasn1.so.10 \ # 20120309: Remove fifofs header files. OLD_FILES+=usr/include/fs/fifofs/fifo.h OLD_DIRS+=usr/include/fs/fifofs +# 20120304: xlocale cleanup +OLD_FILES+=usr/include/_xlocale_ctype.h # 20120225: libarchive 3.0.3 OLD_FILES+=usr/share/man/man3/archive_read_data_into_buffer.3.gz \ usr/share/man/man3/archive_read_support_compression_all.3.gz \ From owner-svn-src-head@FreeBSD.ORG Sat May 12 12:02:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B0EDB1065673; Sat, 12 May 2012 12:02:52 +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 9B1E18FC15; Sat, 12 May 2012 12:02:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CC2qX4033292; Sat, 12 May 2012 12:02:52 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CC2qSk033282; Sat, 12 May 2012 12:02:52 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201205121202.q4CC2qSk033282@svn.freebsd.org> From: Rick Macklem Date: Sat, 12 May 2012 12:02: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: r235332 - in head/sys: fs/nfsclient nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 12:02:52 -0000 Author: rmacklem Date: Sat May 12 12:02:51 2012 New Revision: 235332 URL: http://svn.freebsd.org/changeset/base/235332 Log: PR# 165923 reported intermittent write failures for dirty memory mapped pages being written back on an NFS mount. Since any thread can call VOP_PUTPAGES() to write back a dirty page, the credentials of that thread may not have write access to the file on an NFS server. (Often the uid is 0, which may be mapped to "nobody" in the NFS server.) Although there is no completely correct fix for this (NFS servers check access on every write RPC instead of at open/mmap time), this patch avoids the common cases by holding onto a credential that recently opened the file for writing and uses that credential for the write RPCs being done by VOP_PUTPAGES() for both NFS clients. Tested by: Joel Ray Holveck (joelh at juniper.net) PR: kern/165923 Reviewed by: kib MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clbio.c head/sys/fs/nfsclient/nfs_clnode.c head/sys/fs/nfsclient/nfs_clvnops.c head/sys/fs/nfsclient/nfsnode.h head/sys/nfsclient/nfs_bio.c head/sys/nfsclient/nfs_node.c head/sys/nfsclient/nfs_vnops.c head/sys/nfsclient/nfsnode.h Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Sat May 12 10:53:49 2012 (r235331) +++ head/sys/fs/nfsclient/nfs_clbio.c Sat May 12 12:02:51 2012 (r235332) @@ -281,7 +281,11 @@ ncl_putpages(struct vop_putpages_args *a vp = ap->a_vp; np = VTONFS(vp); td = curthread; /* XXX */ - cred = curthread->td_ucred; /* XXX */ + /* Set the cred to n_writecred for the write rpcs. */ + if (np->n_writecred != NULL) + cred = crhold(np->n_writecred); + else + cred = crhold(curthread->td_ucred); /* XXX */ nmp = VFSTONFS(vp->v_mount); pages = ap->a_m; count = ap->a_count; @@ -345,6 +349,7 @@ ncl_putpages(struct vop_putpages_args *a iomode = NFSWRITE_FILESYNC; error = ncl_writerpc(vp, &uio, cred, &iomode, &must_commit, 0); + crfree(cred); pmap_qremove(kva, npages); relpbuf(bp, &ncl_pbuf_freecnt); Modified: head/sys/fs/nfsclient/nfs_clnode.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clnode.c Sat May 12 10:53:49 2012 (r235331) +++ head/sys/fs/nfsclient/nfs_clnode.c Sat May 12 12:02:51 2012 (r235332) @@ -300,6 +300,8 @@ ncl_reclaim(struct vop_reclaim_args *ap) FREE((caddr_t)dp2, M_NFSDIROFF); } } + if (np->n_writecred != NULL) + crfree(np->n_writecred); FREE((caddr_t)np->n_fhp, M_NFSFH); if (np->n_v4 != NULL) FREE((caddr_t)np->n_v4, M_NFSV4NODE); Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Sat May 12 10:53:49 2012 (r235331) +++ head/sys/fs/nfsclient/nfs_clvnops.c Sat May 12 12:02:51 2012 (r235332) @@ -513,6 +513,7 @@ nfs_open(struct vop_open_args *ap) struct vattr vattr; int error; int fmode = ap->a_mode; + struct ucred *cred; if (vp->v_type != VREG && vp->v_type != VDIR && vp->v_type != VLNK) return (EOPNOTSUPP); @@ -604,7 +605,22 @@ nfs_open(struct vop_open_args *ap) } np->n_directio_opens++; } + + /* + * If this is an open for writing, capture a reference to the + * credentials, so they can be used by ncl_putpages(). Using + * these write credentials is preferable to the credentials of + * whatever thread happens to be doing the VOP_PUTPAGES() since + * the write RPCs are less likely to fail with EACCES. + */ + if ((fmode & FWRITE) != 0) { + cred = np->n_writecred; + np->n_writecred = crhold(ap->a_cred); + } else + cred = NULL; mtx_unlock(&np->n_mtx); + if (cred != NULL) + crfree(cred); vnode_create_vobject(vp, vattr.va_size, ap->a_td); return (0); } Modified: head/sys/fs/nfsclient/nfsnode.h ============================================================================== --- head/sys/fs/nfsclient/nfsnode.h Sat May 12 10:53:49 2012 (r235331) +++ head/sys/fs/nfsclient/nfsnode.h Sat May 12 12:02:51 2012 (r235332) @@ -123,6 +123,7 @@ struct nfsnode { int n_directio_asyncwr; u_int64_t n_change; /* old Change attribute */ struct nfsv4node *n_v4; /* extra V4 stuff */ + struct ucred *n_writecred; /* Cred. for putpages */ }; #define n_atim n_un1.nf_atim Modified: head/sys/nfsclient/nfs_bio.c ============================================================================== --- head/sys/nfsclient/nfs_bio.c Sat May 12 10:53:49 2012 (r235331) +++ head/sys/nfsclient/nfs_bio.c Sat May 12 12:02:51 2012 (r235332) @@ -275,7 +275,11 @@ nfs_putpages(struct vop_putpages_args *a vp = ap->a_vp; np = VTONFS(vp); td = curthread; /* XXX */ - cred = curthread->td_ucred; /* XXX */ + /* Set the cred to n_writecred for the write rpcs. */ + if (np->n_writecred != NULL) + cred = crhold(np->n_writecred); + else + cred = crhold(curthread->td_ucred); /* XXX */ nmp = VFSTONFS(vp->v_mount); pages = ap->a_m; count = ap->a_count; @@ -339,6 +343,7 @@ nfs_putpages(struct vop_putpages_args *a iomode = NFSV3WRITE_FILESYNC; error = (nmp->nm_rpcops->nr_writerpc)(vp, &uio, cred, &iomode, &must_commit); + crfree(cred); pmap_qremove(kva, npages); relpbuf(bp, &nfs_pbuf_freecnt); Modified: head/sys/nfsclient/nfs_node.c ============================================================================== --- head/sys/nfsclient/nfs_node.c Sat May 12 10:53:49 2012 (r235331) +++ head/sys/nfsclient/nfs_node.c Sat May 12 12:02:51 2012 (r235332) @@ -270,6 +270,8 @@ nfs_reclaim(struct vop_reclaim_args *ap) free((caddr_t)dp2, M_NFSDIROFF); } } + if (np->n_writecred != NULL) + crfree(np->n_writecred); if (np->n_fhsize > NFS_SMALLFH) { free((caddr_t)np->n_fhp, M_NFSBIGFH); } Modified: head/sys/nfsclient/nfs_vnops.c ============================================================================== --- head/sys/nfsclient/nfs_vnops.c Sat May 12 10:53:49 2012 (r235331) +++ head/sys/nfsclient/nfs_vnops.c Sat May 12 12:02:51 2012 (r235332) @@ -507,6 +507,7 @@ nfs_open(struct vop_open_args *ap) struct vattr vattr; int error; int fmode = ap->a_mode; + struct ucred *cred; if (vp->v_type != VREG && vp->v_type != VDIR && vp->v_type != VLNK) return (EOPNOTSUPP); @@ -563,7 +564,22 @@ nfs_open(struct vop_open_args *ap) } np->n_directio_opens++; } + + /* + * If this is an open for writing, capture a reference to the + * credentials, so they can be used by nfs_putpages(). Using + * these write credentials is preferable to the credentials of + * whatever thread happens to be doing the VOP_PUTPAGES() since + * the write RPCs are less likely to fail with EACCES. + */ + if ((fmode & FWRITE) != 0) { + cred = np->n_writecred; + np->n_writecred = crhold(ap->a_cred); + } else + cred = NULL; mtx_unlock(&np->n_mtx); + if (cred != NULL) + crfree(cred); vnode_create_vobject(vp, vattr.va_size, ap->a_td); return (0); } Modified: head/sys/nfsclient/nfsnode.h ============================================================================== --- head/sys/nfsclient/nfsnode.h Sat May 12 10:53:49 2012 (r235331) +++ head/sys/nfsclient/nfsnode.h Sat May 12 12:02:51 2012 (r235332) @@ -128,6 +128,7 @@ struct nfsnode { uint32_t n_namelen; int n_directio_opens; int n_directio_asyncwr; + struct ucred *n_writecred; /* Cred. for putpages */ }; #define n_atim n_un1.nf_atim From owner-svn-src-head@FreeBSD.ORG Sat May 12 13:55:37 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7EE0E106573A; Sat, 12 May 2012 13:55:37 +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 5F6578FC0A; Sat, 12 May 2012 13:55:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CDtbw9036776; Sat, 12 May 2012 13:55:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CDtbaD036768; Sat, 12 May 2012 13:55:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201205121355.q4CDtbaD036768@svn.freebsd.org> From: Alexander Motin Date: Sat, 12 May 2012 13:55:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235333 - in head/sys: cam dev/ahci dev/ata dev/mvs dev/siis X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 13:55:37 -0000 Author: mav Date: Sat May 12 13:55:36 2012 New Revision: 235333 URL: http://svn.freebsd.org/changeset/base/235333 Log: Add two functions xpt_batch_start() and xpt_batch_done() to the CAM SIM KPI to allow drivers to handle request completion directly without passing them to the CAM SWI thread removing extra context switch. Modify all ATA/SATA drivers to use them. Reviewed by: gibbs, ken MFC after: 2 weeks Modified: head/sys/cam/cam_sim.h head/sys/cam/cam_xpt.c head/sys/cam/cam_xpt_sim.h head/sys/dev/ahci/ahci.c head/sys/dev/ata/ata-all.c head/sys/dev/mvs/mvs.c head/sys/dev/siis/siis.c Modified: head/sys/cam/cam_sim.h ============================================================================== --- head/sys/cam/cam_sim.h Sat May 12 12:02:51 2012 (r235332) +++ head/sys/cam/cam_sim.h Sat May 12 13:55:36 2012 (r235333) @@ -106,6 +106,7 @@ struct cam_sim { #define CAM_SIM_MPSAFE 0x02 #define CAM_SIM_ON_DONEQ 0x04 #define CAM_SIM_POLLED 0x08 +#define CAM_SIM_BATCH 0x10 struct callout callout; struct cam_devq *devq; /* Device Queue to use for this SIM */ int refcount; /* References to the SIM. */ Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Sat May 12 12:02:51 2012 (r235332) +++ head/sys/cam/cam_xpt.c Sat May 12 13:55:36 2012 (r235333) @@ -4332,7 +4332,8 @@ xpt_done(union ccb *done_ccb) TAILQ_INSERT_TAIL(&sim->sim_doneq, &done_ccb->ccb_h, sim_links.tqe); done_ccb->ccb_h.pinfo.index = CAM_DONEQ_INDEX; - if ((sim->flags & (CAM_SIM_ON_DONEQ | CAM_SIM_POLLED)) == 0) { + if ((sim->flags & (CAM_SIM_ON_DONEQ | CAM_SIM_POLLED | + CAM_SIM_BATCH)) == 0) { mtx_lock(&cam_simq_lock); first = TAILQ_EMPTY(&cam_simq); TAILQ_INSERT_TAIL(&cam_simq, sim, links); @@ -4344,6 +4345,25 @@ xpt_done(union ccb *done_ccb) } } +void +xpt_batch_start(struct cam_sim *sim) +{ + + KASSERT((sim->flags & CAM_SIM_BATCH) == 0, ("Batch flag already set")); + sim->flags |= CAM_SIM_BATCH; +} + +void +xpt_batch_done(struct cam_sim *sim) +{ + + KASSERT((sim->flags & CAM_SIM_BATCH) != 0, ("Batch flag was not set")); + sim->flags &= ~CAM_SIM_BATCH; + if (!TAILQ_EMPTY(&sim->sim_doneq) && + (sim->flags & CAM_SIM_ON_DONEQ) == 0) + camisr_runqueue(&sim->sim_doneq); +} + union ccb * xpt_alloc_ccb() { Modified: head/sys/cam/cam_xpt_sim.h ============================================================================== --- head/sys/cam/cam_xpt_sim.h Sat May 12 12:02:51 2012 (r235332) +++ head/sys/cam/cam_xpt_sim.h Sat May 12 13:55:36 2012 (r235333) @@ -51,6 +51,8 @@ void xpt_release_devq_rl(struct cam_pat u_int count, int run_queue); int xpt_sim_opened(struct cam_sim *sim); void xpt_done(union ccb *done_ccb); +void xpt_batch_start(struct cam_sim *sim); +void xpt_batch_done(struct cam_sim *sim); #endif #endif /* _CAM_CAM_XPT_SIM_H */ Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Sat May 12 12:02:51 2012 (r235332) +++ head/sys/dev/ahci/ahci.c Sat May 12 13:55:36 2012 (r235333) @@ -1457,7 +1457,9 @@ ahci_ch_intr_locked(void *data) struct ahci_channel *ch = device_get_softc(dev); mtx_lock(&ch->mtx); + xpt_batch_start(ch->sim); ahci_ch_intr(data); + xpt_batch_done(ch->sim); mtx_unlock(&ch->mtx); } Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Sat May 12 12:02:51 2012 (r235332) +++ head/sys/dev/ata/ata-all.c Sat May 12 13:55:36 2012 (r235333) @@ -544,9 +544,11 @@ ata_interrupt(void *data) struct ata_channel *ch = (struct ata_channel *)data; mtx_lock(&ch->state_mtx); + xpt_batch_start(ch->sim); #endif ata_interrupt_locked(data); #ifdef ATA_CAM + xpt_batch_done(ch->sim); mtx_unlock(&ch->state_mtx); #endif } Modified: head/sys/dev/mvs/mvs.c ============================================================================== --- head/sys/dev/mvs/mvs.c Sat May 12 12:02:51 2012 (r235332) +++ head/sys/dev/mvs/mvs.c Sat May 12 13:55:36 2012 (r235333) @@ -654,7 +654,9 @@ mvs_ch_intr_locked(void *data) struct mvs_channel *ch = device_get_softc(dev); mtx_lock(&ch->mtx); + xpt_batch_start(ch->sim); mvs_ch_intr(data); + xpt_batch_done(ch->sim); mtx_unlock(&ch->mtx); } Modified: head/sys/dev/siis/siis.c ============================================================================== --- head/sys/dev/siis/siis.c Sat May 12 12:02:51 2012 (r235332) +++ head/sys/dev/siis/siis.c Sat May 12 13:55:36 2012 (r235333) @@ -830,7 +830,9 @@ siis_ch_intr_locked(void *data) struct siis_channel *ch = device_get_softc(dev); mtx_lock(&ch->mtx); + xpt_batch_start(ch->sim); siis_ch_intr(data); + xpt_batch_done(ch->sim); mtx_unlock(&ch->mtx); } From owner-svn-src-head@FreeBSD.ORG Sat May 12 14:37:26 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80BE5106564A; Sat, 12 May 2012 14:37:26 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B1D68FC19; Sat, 12 May 2012 14:37:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CEbQUA038128; Sat, 12 May 2012 14:37:26 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CEbQ4i038125; Sat, 12 May 2012 14:37:26 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201205121437.q4CEbQ4i038125@svn.freebsd.org> From: Rui Paulo Date: Sat, 12 May 2012 14:37: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: r235334 - head/sys/dev/vr X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 14:37:26 -0000 Author: rpaulo Date: Sat May 12 14:37:25 2012 New Revision: 235334 URL: http://svn.freebsd.org/changeset/base/235334 Log: Convert the if_vr(4) driver model to the interrupt filter model and use a taskqueue. This gives a 16% performance improvement under high load on slow systems, especially when vr shares an interrupt with another device, which is common with the Alix x86 boards. Contrary to the other devices, I left the interrupt processing for loop in because there was no significant difference in performance and this should avoid enqueuing more taskqueues unnecessarily. We also decided to move the vr_start_locked() call inside the for loop because we found out that it helps performance since TCP ACKs now have a chance to go out quicker. Reviewed by: yongari (older version, same idea) Discussed with: yongari, jhb Modified: head/sys/dev/vr/if_vr.c head/sys/dev/vr/if_vrreg.h Modified: head/sys/dev/vr/if_vr.c ============================================================================== --- head/sys/dev/vr/if_vr.c Sat May 12 13:55:36 2012 (r235333) +++ head/sys/dev/vr/if_vr.c Sat May 12 14:37:25 2012 (r235334) @@ -165,7 +165,8 @@ static void vr_txeof(struct vr_softc *); static void vr_tick(void *); static int vr_error(struct vr_softc *, uint16_t); static void vr_tx_underrun(struct vr_softc *); -static void vr_intr(void *); +static int vr_intr(void *); +static void vr_int_task(void *, int); static void vr_start(struct ifnet *); static void vr_start_locked(struct ifnet *); static int vr_encap(struct vr_softc *, struct mbuf **); @@ -658,6 +659,8 @@ vr_attach(device_t dev) ifp->if_snd.ifq_maxlen = VR_TX_RING_CNT - 1; IFQ_SET_READY(&ifp->if_snd); + TASK_INIT(&sc->vr_inttask, 0, vr_int_task, sc); + /* Configure Tx FIFO threshold. */ sc->vr_txthresh = VR_TXTHRESH_MIN; if (sc->vr_revid < REV_ID_VT6105_A0) { @@ -784,7 +787,7 @@ vr_attach(device_t dev) /* Hook interrupt last to avoid having to lock softc. */ error = bus_setup_intr(dev, sc->vr_irq, INTR_TYPE_NET | INTR_MPSAFE, - NULL, vr_intr, sc, &sc->vr_intrhand); + vr_intr, NULL, sc, &sc->vr_intrhand); if (error) { device_printf(dev, "couldn't set up irq\n"); @@ -826,6 +829,7 @@ vr_detach(device_t dev) vr_stop(sc); VR_UNLOCK(sc); callout_drain(&sc->vr_stat_callout); + taskqueue_drain(taskqueue_fast, &sc->vr_inttask); ether_ifdetach(ifp); } if (sc->vr_miibus) @@ -1653,10 +1657,30 @@ vr_tx_underrun(struct vr_softc *sc) vr_tx_start(sc); } -static void +static int vr_intr(void *arg) { struct vr_softc *sc; + uint16_t status; + + sc = (struct vr_softc *)arg; + + status = CSR_READ_2(sc, VR_ISR); + if (status == 0 || status == 0xffff || (status & VR_INTRS) == 0) + return (FILTER_STRAY); + + /* Disable interrupts. */ + CSR_WRITE_2(sc, VR_IMR, 0x0000); + + taskqueue_enqueue_fast(taskqueue_fast, &sc->vr_inttask); + + return (FILTER_HANDLED); +} + +static void +vr_int_task(void *arg, int npending) +{ + struct vr_softc *sc; struct ifnet *ifp; uint16_t status; @@ -1668,9 +1692,6 @@ vr_intr(void *arg) goto done_locked; status = CSR_READ_2(sc, VR_ISR); - if (status == 0 || status == 0xffff || (status & VR_INTRS) == 0) - goto done_locked; - ifp = sc->vr_ifp; #ifdef DEVICE_POLLING if ((ifp->if_capenable & IFCAP_POLLING) != 0) @@ -1685,9 +1706,6 @@ vr_intr(void *arg) goto done_locked; } - /* Disable interrupts. */ - CSR_WRITE_2(sc, VR_IMR, 0x0000); - for (; (status & VR_INTRS) != 0;) { CSR_WRITE_2(sc, VR_ISR, status); if ((status & (VR_ISR_BUSERR | VR_ISR_LINKSTAT2 | @@ -1707,15 +1725,16 @@ vr_intr(void *arg) vr_rx_start(sc); } vr_txeof(sc); + + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + vr_start_locked(ifp); + status = CSR_READ_2(sc, VR_ISR); } /* Re-enable interrupts. */ CSR_WRITE_2(sc, VR_IMR, VR_INTRS); - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - vr_start_locked(ifp); - done_locked: VR_UNLOCK(sc); } Modified: head/sys/dev/vr/if_vrreg.h ============================================================================== --- head/sys/dev/vr/if_vrreg.h Sat May 12 13:55:36 2012 (r235333) +++ head/sys/dev/vr/if_vrreg.h Sat May 12 14:37:25 2012 (r235334) @@ -738,6 +738,7 @@ struct vr_softc { #ifdef DEVICE_POLLING int rxcycles; #endif + struct task vr_inttask; }; #define VR_LOCK(_sc) mtx_lock(&(_sc)->vr_mtx) From owner-svn-src-head@FreeBSD.ORG Sat May 12 14:43:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D1FB3106564A; Sat, 12 May 2012 14:43:52 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD6498FC15; Sat, 12 May 2012 14:43:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CEhqvV038347; Sat, 12 May 2012 14:43:52 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CEhqQ1038345; Sat, 12 May 2012 14:43:52 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201205121443.q4CEhqQ1038345@svn.freebsd.org> From: Joel Dahl Date: Sat, 12 May 2012 14:43: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: r235335 - head/usr.sbin/jail X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 14:43:52 -0000 Author: joel (doc committer) Date: Sat May 12 14:43:52 2012 New Revision: 235335 URL: http://svn.freebsd.org/changeset/base/235335 Log: mdoc: remove redundant Pp and end a display block with Ed. Modified: head/usr.sbin/jail/jail.conf.5 Modified: head/usr.sbin/jail/jail.conf.5 ============================================================================== --- head/usr.sbin/jail/jail.conf.5 Sat May 12 14:37:25 2012 (r235334) +++ head/usr.sbin/jail/jail.conf.5 Sat May 12 14:43:52 2012 (r235335) @@ -41,7 +41,6 @@ A parameter statement looks like a C ass including a terminating semicolon. .Pp The general syntax of a jail definition is: -.Pp .Bd -literal -offset indent jailname { parameter = "value"; @@ -205,6 +204,7 @@ bar { mount.nodevfs; persist; // Required because there are no processes } +.Ed .Sh SEE ALSO .Xr jail_set 2 .Xr jail 8 From owner-svn-src-head@FreeBSD.ORG Sat May 12 14:46:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 99BE6106566B; Sat, 12 May 2012 14:46:49 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 84F108FC21; Sat, 12 May 2012 14:46:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CEknMv038484; Sat, 12 May 2012 14:46:49 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CEknMv038482; Sat, 12 May 2012 14:46:49 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201205121446.q4CEknMv038482@svn.freebsd.org> From: Joel Dahl Date: Sat, 12 May 2012 14:46: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: r235336 - head/sbin/growfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 14:46:49 -0000 Author: joel (doc committer) Date: Sat May 12 14:46:49 2012 New Revision: 235336 URL: http://svn.freebsd.org/changeset/base/235336 Log: mdoc: remove redundant paragraph macro. Modified: head/sbin/growfs/growfs.8 Modified: head/sbin/growfs/growfs.8 ============================================================================== --- head/sbin/growfs/growfs.8 Sat May 12 14:43:52 2012 (r235335) +++ head/sbin/growfs/growfs.8 Sat May 12 14:46:49 2012 (r235336) @@ -121,7 +121,6 @@ utility first appeared in .An The GROWFS team Aq growfs@Tomsoft.COM .An Edward Tomasz Napierala Aq trasz@FreeBSD.org .Sh BUGS -.Pp Normally .Nm writes cylinder group summary to disk and reads it again later for doing more From owner-svn-src-head@FreeBSD.ORG Sat May 12 15:08:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 54497106564A; Sat, 12 May 2012 15:08:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3BD378FC0A; Sat, 12 May 2012 15:08:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CF8NF5039272; Sat, 12 May 2012 15:08:23 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CF8MLI039258; Sat, 12 May 2012 15:08:22 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205121508.q4CF8MLI039258@svn.freebsd.org> From: Glen Barber Date: Sat, 12 May 2012 15:08: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: r235337 - in head: lib/libutil sbin/hastd sbin/iscontrol share/man/man5 share/termcap usr.sbin/jail usr.sbin/ntp/doc usr.sbin/wpa/hostapd usr.sbin/wpa/wpa_supplicant X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 15:08:23 -0000 Author: gjb (doc committer) Date: Sat May 12 15:08:22 2012 New Revision: 235337 URL: http://svn.freebsd.org/changeset/base/235337 Log: General mdoc(7) and typo fixes. PR: 167804 Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org) MFC after: 3 days Modified: head/lib/libutil/login.conf.5 head/sbin/hastd/hast.conf.5 head/sbin/iscontrol/iscsi.conf.5 head/share/man/man5/device.hints.5 head/share/man/man5/make.conf.5 head/share/man/man5/nsmb.conf.5 head/share/man/man5/portsnap.conf.5 head/share/man/man5/rc.conf.5 head/share/termcap/termcap.5 head/usr.sbin/jail/jail.conf.5 head/usr.sbin/ntp/doc/ntp.conf.5 head/usr.sbin/wpa/hostapd/hostapd.conf.5 head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 Modified: head/lib/libutil/login.conf.5 ============================================================================== --- head/lib/libutil/login.conf.5 Sat May 12 14:46:49 2012 (r235336) +++ head/lib/libutil/login.conf.5 Sat May 12 15:08:22 2012 (r235337) @@ -209,7 +209,8 @@ value. The syntax is the same as for the .Fl l argument of -.Xr cpuset 1 or the word +.Xr cpuset 1 +or the word .Ql default . If set to .Ql default Modified: head/sbin/hastd/hast.conf.5 ============================================================================== --- head/sbin/hastd/hast.conf.5 Sat May 12 14:46:49 2012 (r235336) +++ head/sbin/hastd/hast.conf.5 Sat May 12 15:08:22 2012 (r235337) @@ -37,7 +37,7 @@ .Xr hastd 8 daemon and the .Xr hastctl 8 -utility. +utility .Sh DESCRIPTION The .Nm @@ -439,7 +439,7 @@ resource tank { .Xr gethostname 3 , .Xr geom 4 , .Xr hastctl 8 , -.Xr hastd 8 . +.Xr hastd 8 .Sh AUTHORS The .Nm Modified: head/sbin/iscontrol/iscsi.conf.5 ============================================================================== --- head/sbin/iscontrol/iscsi.conf.5 Sat May 12 14:46:49 2012 (r235336) +++ head/sbin/iscontrol/iscsi.conf.5 Sat May 12 15:08:22 2012 (r235337) @@ -76,7 +76,7 @@ currently only 1. is the name by which the target is known, not to be confused with target address, either obtained via the target administrator, or from a -.Em discovery session. +.Em discovery session . .It Cm InitiatorName if not specified, defaults to .Sy iqn.2005-01.il.ac.huji.cs: @@ -146,7 +146,7 @@ see This value can only be reduced. .It Cm sockbufsize sets the receiver and transmitter socket buffer size to -.Em size, +.Em size , in kilobytes. The default is 128. .El Modified: head/share/man/man5/device.hints.5 ============================================================================== --- head/share/man/man5/device.hints.5 Sat May 12 14:46:49 2012 (r235336) +++ head/share/man/man5/device.hints.5 Sat May 12 15:08:22 2012 (r235337) @@ -162,7 +162,7 @@ hint.acpi.0.disabled="1" .Xr kenv 1 , .Xr loader.conf 5 , .Xr loader 8 , -.Xr resource_int_value 9 . +.Xr resource_int_value 9 .Sh HISTORY The .Nm Modified: head/share/man/man5/make.conf.5 ============================================================================== --- head/share/man/man5/make.conf.5 Sat May 12 14:46:49 2012 (r235336) +++ head/share/man/man5/make.conf.5 Sat May 12 15:08:22 2012 (r235337) @@ -575,7 +575,7 @@ files at build time. The value should include the full path to the .Pa .mc file(s), e.g., -.Pa /etc/mail/foo.mc +.Pa /etc/mail/foo.mc , .Pa /etc/mail/bar.mc . .It Va SENDMAIL_ALIASES .Pq Vt str Modified: head/share/man/man5/nsmb.conf.5 ============================================================================== --- head/share/man/man5/nsmb.conf.5 Sat May 12 14:46:49 2012 (r235336) +++ head/share/man/man5/nsmb.conf.5 Sat May 12 15:08:22 2012 (r235337) @@ -96,7 +96,6 @@ Possible keywords may include: .Bl -tag -width ".Pa /etc/nsmb.conf" .It Pa /etc/nsmb.conf The default remote mount-point configuration file. -.Pa "~/nsmb.conf" .It Pa ~/nsmb.conf The user specific remote mount-point configuration file. .El Modified: head/share/man/man5/portsnap.conf.5 ============================================================================== --- head/share/man/man5/portsnap.conf.5 Sat May 12 14:46:49 2012 (r235336) +++ head/share/man/man5/portsnap.conf.5 Sat May 12 15:08:22 2012 (r235337) @@ -47,7 +47,8 @@ specifies the source from which snapshot This is equivalent to the .Fl s Ar server option to -.Xr portsnap 8 , and will be ignored if the command-line +.Xr portsnap 8 , +and will be ignored if the command-line option is used. .Pp A line of the form @@ -58,7 +59,8 @@ belonging to an RSA keypair which is tru This is equivalent to the .Fl k Ar KEY option to -.Xr portsnap 8 , and will be ignored if the command-line +.Xr portsnap 8 , +and will be ignored if the command-line option is used. .Pp A line of the form @@ -68,7 +70,8 @@ snapshot of the ports tree. This is equivalent to the .Fl d Ar workdir option to -.Xr portsnap 8 , and will be ignored if the command-line option +.Xr portsnap 8 , +and will be ignored if the command-line option is used. .Pp A line of the form @@ -82,7 +85,8 @@ commands. This is equivalent to the .Fl p Ar portsdir option to -.Xr portsnap 8 , and will be ignored if the command-line option +.Xr portsnap 8 , +and will be ignored if the command-line option is used. .Pp If more than one line of any of the above forms is included in Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Sat May 12 14:46:49 2012 (r235336) +++ head/share/man/man5/rc.conf.5 Sat May 12 15:08:22 2012 (r235337) @@ -386,7 +386,7 @@ is used to set the hostname via DHCP, this variable should be set to an empty string. If this value remains unset when the system is done booting your console login will display the default hostname of -.Dq Amnesiac. +.Dq Amnesiac . .It Va nisdomainname .Pq Vt str The NIS domain name of this host, or @@ -1299,6 +1299,7 @@ ifconfig_ed0_name="net0" ifconfig_net0="inet 192.0.2.1 netmask 0xffffff00" .Ed .It Va ipv6_enable +.Pq Vt bool This variable is deprecated. Use .Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 @@ -1306,7 +1307,6 @@ and .Va ipv6_activate_all_interfaces if necessary. .Pp -.Pq Vt bool If the variable is .Dq Li YES , .Dq Li inet6 accept_rtadv @@ -1317,12 +1317,12 @@ and the is defined as .Dq Li YES . .It Va ipv6_prefer +.Pq Vt bool This variable is deprecated. Use .Va ip6addrctl_policy instead. .Pp -.Pq Vt bool If the variable is .Dq Li YES , the default address selection policy table set by @@ -3286,9 +3286,10 @@ is enabled, and a daemon is started for a non-default port, the .Va "moused_" Ns Ar XXX Ns Va "_flags" set of options has precedence over and replaces the default -.Va moused_flags (where +.Va moused_flags +(where .Ar XXX -is the name of the non-default port, i.e.\& +is the name of the non-default port, i.e.,\& .Ar ums0 ) . By setting .Va "moused_" Ns Ar XXX Ns Va "_flags" Modified: head/share/termcap/termcap.5 ============================================================================== --- head/share/termcap/termcap.5 Sat May 12 14:46:49 2012 (r235336) +++ head/share/termcap/termcap.5 Sat May 12 15:08:22 2012 (r235337) @@ -1821,7 +1821,7 @@ from the status line can be given as .Sy \&ts and .Sy \&fs . -.Pf ( Xr \&fs +.Pf ( Sy \&fs must leave the cursor position in the same place that it was before .Sy \&ts . If necessary, the @@ -2067,7 +2067,7 @@ for ^C. .Pp Other specific terminal problems may be corrected by adding more capabilities of the form -.Sy x Em x . +.Sy x Ns Em x . .Ss Similar Terminals If there are two very similar terminals, one can be defined as being just like the other with certain exceptions. Modified: head/usr.sbin/jail/jail.conf.5 ============================================================================== --- head/usr.sbin/jail/jail.conf.5 Sat May 12 14:46:49 2012 (r235336) +++ head/usr.sbin/jail/jail.conf.5 Sat May 12 15:08:22 2012 (r235337) @@ -37,7 +37,7 @@ A configuration file consists of one or more jail definitions statements, and parameter or variable statements within those jail definitions. A jail definition statement looks something like a C compound statement. -A parameter statement looks like a C assigment, +A parameter statement looks like a C assignment, including a terminating semicolon. .Pp The general syntax of a jail definition is: @@ -100,17 +100,17 @@ A token is any sequence of characters th the syntax of the configuration file (such as a semicolon or whitespace). If a value contains anything more than letters, numbers, dots, dashes -and undescores, it is advisable to put quote marks around that value. +and underscores, it is advisable to put quote marks around that value. Either single or double quotes may be used. .Pp -Special characters may be quoted by preceeding them with a backslash. +Special characters may be quoted by preceding them with a backslash. Common C-style backslash character codes are also supported, including control characters and octal or hex ASCII codes. A backslash at the end of a line will ignore the subsequent newline and continue the string at the start of the next line. .Ss Variables A string may use shell-style variable substitution. -A parameter or variable name preceeded by a dollar sign, and possibly +A parameter or variable name preceded by a dollar sign, and possibly enclosed in braces, will be replaced with the value of that parameter or variable. For example, a jail's path may be defined in terms of its name or @@ -121,7 +121,7 @@ path = "/var/jail/$name"; path = "/var/jail/${host.hostname}"; .Ed .Pp -Variable substition occurs in unquoted tokens or in double-quoted +Variable substitution occurs in unquoted tokens or in double-quoted strings, but not in single-quote strings. .Pp A variable is defined in the same way a parameter is, except that the Modified: head/usr.sbin/ntp/doc/ntp.conf.5 ============================================================================== --- head/usr.sbin/ntp/doc/ntp.conf.5 Sat May 12 14:46:49 2012 (r235336) +++ head/usr.sbin/ntp/doc/ntp.conf.5 Sat May 12 15:08:22 2012 (r235337) @@ -268,7 +268,7 @@ Options: All packets sent to and received from the server or peer are to include authentication fields encrypted using the autokey scheme described in -.Sx Authentication Options . +.Sx Authentication Commands . .It Cm burst when the server is reachable, send a burst of eight packets instead of the usual one. @@ -305,7 +305,7 @@ default is to include no encryption fiel .It Cm minpoll Ar minpoll .It Cm maxpoll Ar maxpoll These options specify the minimum and maximum poll intervals -for NTP messages, as a power of 2 in seconds +for NTP messages, as a power of 2 in seconds. The maximum poll interval defaults to 10 (1,024 s), but can be increased by the .Cm maxpoll @@ -363,7 +363,7 @@ Note that, in order to avoid accidental or malicious disruption in this mode, both the server and client should operate using symmetric-key or public-key authentication as described in -.Sx Authentication Options . +.Sx Authentication Commands . .It Ic manycastserver Ar address ... This command enables reception of manycast client messages to the multicast group address(es) (type m) specified. @@ -376,7 +376,7 @@ Note that, in order to avoid accidental or malicious disruption in this mode, both the server and client should operate using symmetric-key or public-key authentication as described in -.Sx Authentication Options . +.Sx Authentication Commands . .It Ic multicastclient Ar address ... This command enables reception of multicast server messages to the multicast group address(es) (type m) specified. @@ -389,7 +389,7 @@ Note that, in order to avoid accidental or malicious disruption in this mode, both the server and client should operate using symmetric-key or public-key authentication as described in -.Sx Authentication Options . +.Sx Authentication Commands . .El .Sh Authentication Support Authentication support allows the NTP client to verify that the @@ -466,7 +466,7 @@ of these checks and be discarded. Furthermore, the Autokey scheme requires a preliminary protocol exchange to obtain the server certificate, verify its -credentials and initialize the protocol +credentials and initialize the protocol. .Pp The .Cm auth @@ -669,7 +669,7 @@ using the host name, network address and all of which are bound together by the protocol specifically to deflect masquerade attacks. For this reason Autokey -includes the source and destinatino IP addresses in message digest +includes the source and destination IP addresses in message digest computations and so the same addresses must be available at both the server and client. For this reason operation @@ -796,7 +796,7 @@ The certificate extension fields must no a subject key identifier or a issuer key identifier field; however, an extended key usage field for a trusted host must contain the value -.Cm trustRoot ; . +.Cm trustRoot . Other extension fields are ignored. .Ss Authentication Commands .Bl -tag -width indent @@ -1068,10 +1068,11 @@ following form to the file generation se The first two fields show the date (Modified Julian Day) and time (seconds and fraction past UTC midnight). The next field shows the peer -address in dotted-quad notation, The final message field includes the +address in dotted-quad notation. +The final message field includes the message type and certain ancillary information. See the -.Sx Authentication Options +.Sx Authentication Commands section for further information. .It Cm loopstats Enables recording of loop filter statistics information. @@ -1155,7 +1156,7 @@ Time in hours since the system was last .It Packets received Cm 81965 Total number of packets received. .It Packets processed Cm 0 -Number of packets received in response to previous packets sent +Number of packets received in response to previous packets sent. .It Current version Cm 9546 Number of packets matching the current NTP version. .It Previous version Cm 56 @@ -1461,7 +1462,7 @@ subcommand specifies the minimum average spacing, while the .Cm minimum subcommand specifies the minimum packet spacing. -Packets that violate these minima are discarded +Packets that violate these minimum are discarded and a kiss-o'-death packet returned if enabled. The default minimum average and minimum are 5 and 2, respectively. @@ -1775,7 +1776,7 @@ It is often useful to narrow the range o servers which can be found by manycast client associations. Because manycast servers respond only when the client stratum is equal to or greater than the server stratum, -primary (stratum 1) servers fill find only primary servers +primary (stratum 1) servers will find only primary servers in TTL range, which is probably the most common objective. However, unless configured otherwise, all manycast clients in TTL range will eventually find all primary servers @@ -1955,7 +1956,7 @@ peers remaining. This value defaults to 1, but can be changed to any number from 1 to 15. .It Cm minclock Ar minclock -The clustering algorithm repeatedly casts out outlyer +The clustering algorithm repeatedly casts out outerlayer associations until no more than .Cm minclock associations remain. @@ -1965,7 +1966,7 @@ configured sources. .It Cm minsane Ar minsane This is the minimum number of candidates available to the clock selection algorithm in order to produce -one or more truechimers for the clustering algorithm. +one or more true chimers for the clustering algorithm. If fewer than this number are available, the clock is undisciplined and allowed to run free. The default is 1 Modified: head/usr.sbin/wpa/hostapd/hostapd.conf.5 ============================================================================== --- head/usr.sbin/wpa/hostapd/hostapd.conf.5 Sat May 12 14:46:49 2012 (r235336) +++ head/usr.sbin/wpa/hostapd/hostapd.conf.5 Sat May 12 15:08:22 2012 (r235337) @@ -173,7 +173,7 @@ This conversion uses SSID so the PSK cha used and the SSID is changed. .It Va wpa_psk_file Optionally, WPA PSKs can be read from a separate text file (containing a -list of (PSK,MAC address) pairs. +list of PSK,MAC address pairs). .It Va wpa_key_mgmt Set of accepted key management algorithms (WPA-PSK, WPA-EAP, or both). .It Va wpa_pairwise Modified: head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 ============================================================================== --- head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 Sat May 12 14:46:49 2012 (r235336) +++ head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 Sat May 12 15:08:22 2012 (r235337) @@ -316,7 +316,7 @@ This can be used to achieve forward secr If the .Va dh_file is in DSA parameters format, it will be automatically converted -into DH params. +into DH parameters. .It Va subject_match Substring to be matched against the subject of the authentication server certificate. @@ -370,7 +370,7 @@ TLS Message Length field in all TLS mess fragmented. .It Li sim_min_num_chal=3 can be used to configure EAP-SIM to require three -challenges (by default, it accepts 2 or 3) +challenges (by default, it accepts 2 or 3). .It Li fast_provisioning=1 option enables in-line provisioning of EAP-FAST credentials (PAC). From owner-svn-src-head@FreeBSD.ORG Sat May 12 15:11:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2A58106566B; Sat, 12 May 2012 15:11:53 +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 B55F78FC15; Sat, 12 May 2012 15:11:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CFBrJW039433; Sat, 12 May 2012 15:11:53 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CFBr09039427; Sat, 12 May 2012 15:11:53 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201205121511.q4CFBr09039427@svn.freebsd.org> From: Adrian Chadd Date: Sat, 12 May 2012 15:11:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235338 - head/sys/dev/bwi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 15:11:54 -0000 Author: adrian Date: Sat May 12 15:11:53 2012 New Revision: 235338 URL: http://svn.freebsd.org/changeset/base/235338 Log: Add opt_wlan.h includes, so IEEE80211_* configuration changes are correctly picked up. Noticed by: Justin Hibbits, whilst debugging @ BSDCan Modified: head/sys/dev/bwi/bwimac.c head/sys/dev/bwi/bwiphy.c head/sys/dev/bwi/bwirf.c head/sys/dev/bwi/if_bwi.c head/sys/dev/bwi/if_bwi_pci.c Modified: head/sys/dev/bwi/bwimac.c ============================================================================== --- head/sys/dev/bwi/bwimac.c Sat May 12 15:08:22 2012 (r235337) +++ head/sys/dev/bwi/bwimac.c Sat May 12 15:11:53 2012 (r235338) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_bwi.h" +#include "opt_wlan.h" #include #include Modified: head/sys/dev/bwi/bwiphy.c ============================================================================== --- head/sys/dev/bwi/bwiphy.c Sat May 12 15:08:22 2012 (r235337) +++ head/sys/dev/bwi/bwiphy.c Sat May 12 15:11:53 2012 (r235338) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" +#include "opt_wlan.h" #include #include Modified: head/sys/dev/bwi/bwirf.c ============================================================================== --- head/sys/dev/bwi/bwirf.c Sat May 12 15:08:22 2012 (r235337) +++ head/sys/dev/bwi/bwirf.c Sat May 12 15:11:53 2012 (r235338) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_bwi.h" +#include "opt_wlan.h" #include #include Modified: head/sys/dev/bwi/if_bwi.c ============================================================================== --- head/sys/dev/bwi/if_bwi.c Sat May 12 15:08:22 2012 (r235337) +++ head/sys/dev/bwi/if_bwi.c Sat May 12 15:11:53 2012 (r235338) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_bwi.h" +#include "opt_wlan.h" #include #include Modified: head/sys/dev/bwi/if_bwi_pci.c ============================================================================== --- head/sys/dev/bwi/if_bwi_pci.c Sat May 12 15:08:22 2012 (r235337) +++ head/sys/dev/bwi/if_bwi_pci.c Sat May 12 15:11:53 2012 (r235338) @@ -34,6 +34,8 @@ __FBSDID("$FreeBSD$"); * PCI/Cardbus front-end for the Broadcom Wireless LAN controller driver. */ +#include "opt_wlan.h" + #include #include #include From owner-svn-src-head@FreeBSD.ORG Sat May 12 16:08:06 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 430711065672; Sat, 12 May 2012 16:08:06 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E47C8FC18; Sat, 12 May 2012 16:08:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CG86qo041272; Sat, 12 May 2012 16:08:06 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CG85Ha041270; Sat, 12 May 2012 16:08:05 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201205121608.q4CG85Ha041270@svn.freebsd.org> From: Joel Dahl Date: Sat, 12 May 2012 16:08: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: r235340 - head/lib/libc/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: Sat, 12 May 2012 16:08:06 -0000 Author: joel (doc committer) Date: Sat May 12 16:08:05 2012 New Revision: 235340 URL: http://svn.freebsd.org/changeset/base/235340 Log: Remove tab from kernel configuration option. This is consistent with the rest of our manual pages. Modified: head/lib/libc/sys/setfib.2 Modified: head/lib/libc/sys/setfib.2 ============================================================================== --- head/lib/libc/sys/setfib.2 Sat May 12 15:52:19 2012 (r235339) +++ head/lib/libc/sys/setfib.2 Sat May 12 16:08:05 2012 (r235340) @@ -52,7 +52,7 @@ may be retrieved by the sysctl. The system maximum is set in the kernel configuration file with .Bd -ragged -offset indent -.Cd "options ROUTETABLES=" Ns Em N +.Cd "options ROUTETABLES=" Ns Em N .Ed .Pp or in From owner-svn-src-head@FreeBSD.ORG Sat May 12 16:12:37 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B952E1065670; Sat, 12 May 2012 16:12:37 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A3E48FC0A; Sat, 12 May 2012 16:12:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CGCbqd041523; Sat, 12 May 2012 16:12:37 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CGCb3D041517; Sat, 12 May 2012 16:12:37 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205121612.q4CGCb3D041517@svn.freebsd.org> From: Glen Barber Date: Sat, 12 May 2012 16:12:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235342 - in head: share/man/man5 tools/build/options X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 16:12:37 -0000 Author: gjb (doc committer) Date: Sat May 12 16:12:36 2012 New Revision: 235342 URL: http://svn.freebsd.org/changeset/base/235342 Log: Regenerate src.conf(5) for mdoc(7) and typo corrections. PR: 167804 Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org) MFC after: 3 days Modified: head/share/man/man5/src.conf.5 head/tools/build/options/WITHOUT_BINUTILS head/tools/build/options/WITHOUT_ZONEINFO head/tools/build/options/WITH_CLANG_IS_CC head/tools/build/options/WITH_SHARED_TOOLCHAIN Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Sat May 12 16:10:56 2012 (r235341) +++ head/share/man/man5/src.conf.5 Sat May 12 16:12:36 2012 (r235342) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 221733 2011-05-10 13:01:11Z ru .\" $FreeBSD$ -.Dd May 11, 2012 +.Dd May 12, 2012 .Dt SRC.CONF 5 .Os .Sh NAME @@ -209,7 +209,7 @@ This requires ports/textproc/libxml2 to .It Va WITHOUT_BINUTILS .\" from FreeBSD: head/tools/build/options/WITHOUT_BINUTILS 222090 2011-05-19 05:13:25Z imp Set to not install binutils (as, c++-filt, gconv, gnu-ar, gnu-randlib, -ld, nm, objcopy, objdump, readelf, size and strip) +ld, nm, objcopy, objdump, readelf, size and strip). .Bf -symbolic The option does not generally work for build targets, unless some alternative toolchain is enabled. @@ -294,12 +294,10 @@ Set to build additional clang and llvm t .It Va WITH_CLANG_IS_CC .\" from FreeBSD: head/tools/build/options/WITH_CLANG_IS_CC 232322 2012-02-29 22:58:51Z dim Set to install the Clang C/C++ compiler as -.Pa /usr/bin/cc -, +.Pa /usr/bin/cc , .Pa /usr/bin/c++ and -.Pa /usr/bin/cpp -. +.Pa /usr/bin/cpp . .It Va WITHOUT_CPP .\" from FreeBSD: head/tools/build/options/WITHOUT_CPP 156932 2006-03-21 07:50:50Z ru Set to not build @@ -900,7 +898,7 @@ Set to build the toolchain binaries shar The set includes .Xr cc 1 , .Xr make 1 -and neccessary utilites like assembler, linker and library archive manager. +and necessary utilities like assembler, linker and library archive manager. .It Va WITHOUT_SOURCELESS .\" from FreeBSD: head/tools/build/options/WITHOUT_SOURCELESS 230972 2012-02-04 00:54:43Z rmh Set to not build kernel modules that include sourceless code (either microcode or native code for host CPU). @@ -1018,7 +1016,7 @@ protocols (usable only via 802.1X). Set to not build ZFS file system. .It Va WITHOUT_ZONEINFO .\" from FreeBSD: head/tools/build/options/WITHOUT_ZONEINFO 171994 2007-08-27 20:01:08Z remko -Set to not build the timezone database +Set to not build the timezone database. .El .Sh FILES .Bl -tag -compact Modified: head/tools/build/options/WITHOUT_BINUTILS ============================================================================== --- head/tools/build/options/WITHOUT_BINUTILS Sat May 12 16:10:56 2012 (r235341) +++ head/tools/build/options/WITHOUT_BINUTILS Sat May 12 16:12:36 2012 (r235342) @@ -1,6 +1,6 @@ .\" $FreeBSD$ Set to not install binutils (as, c++-filt, gconv, gnu-ar, gnu-randlib, -ld, nm, objcopy, objdump, readelf, size and strip) +ld, nm, objcopy, objdump, readelf, size and strip). .Bf -symbolic The option does not generally work for build targets, unless some alternative toolchain is enabled. Modified: head/tools/build/options/WITHOUT_ZONEINFO ============================================================================== --- head/tools/build/options/WITHOUT_ZONEINFO Sat May 12 16:10:56 2012 (r235341) +++ head/tools/build/options/WITHOUT_ZONEINFO Sat May 12 16:12:36 2012 (r235342) @@ -1,2 +1,2 @@ .\" $FreeBSD$ -Set to not build the timezone database +Set to not build the timezone database. Modified: head/tools/build/options/WITH_CLANG_IS_CC ============================================================================== --- head/tools/build/options/WITH_CLANG_IS_CC Sat May 12 16:10:56 2012 (r235341) +++ head/tools/build/options/WITH_CLANG_IS_CC Sat May 12 16:12:36 2012 (r235342) @@ -1,8 +1,6 @@ .\" $FreeBSD$ Set to install the Clang C/C++ compiler as -.Pa /usr/bin/cc -, +.Pa /usr/bin/cc , .Pa /usr/bin/c++ and -.Pa /usr/bin/cpp -. +.Pa /usr/bin/cpp . Modified: head/tools/build/options/WITH_SHARED_TOOLCHAIN ============================================================================== --- head/tools/build/options/WITH_SHARED_TOOLCHAIN Sat May 12 16:10:56 2012 (r235341) +++ head/tools/build/options/WITH_SHARED_TOOLCHAIN Sat May 12 16:12:36 2012 (r235342) @@ -3,4 +3,4 @@ Set to build the toolchain binaries shar The set includes .Xr cc 1 , .Xr make 1 -and neccessary utilites like assembler, linker and library archive manager. +and necessary utilities like assembler, linker and library archive manager. From owner-svn-src-head@FreeBSD.ORG Sat May 12 16:36:55 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C7BC11065677; Sat, 12 May 2012 16:36:55 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 737D78FC0C; Sat, 12 May 2012 16:36:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CGatVj042299; Sat, 12 May 2012 16:36:55 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CGatfn042297; Sat, 12 May 2012 16:36:55 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205121636.q4CGatfn042297@svn.freebsd.org> From: Andriy Gapon Date: Sat, 12 May 2012 16:36: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: r235343 - head/sys/cddl/boot/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: Sat, 12 May 2012 16:36:55 -0000 Author: avg Date: Sat May 12 16:36:54 2012 New Revision: 235343 URL: http://svn.freebsd.org/changeset/base/235343 Log: add a zfs spa_t change missed in r235329 sys/cddl/boot is obviously not under sys/boot... Pointed out by: Jan Beich Pointyhat to: avg MFC after: 1 month Modified: head/sys/cddl/boot/zfs/zfsimpl.h Modified: head/sys/cddl/boot/zfs/zfsimpl.h ============================================================================== --- head/sys/cddl/boot/zfs/zfsimpl.h Sat May 12 16:12:36 2012 (r235342) +++ head/sys/cddl/boot/zfs/zfsimpl.h Sat May 12 16:36:54 2012 (r235343) @@ -1327,5 +1327,5 @@ typedef struct spa { struct uberblock spa_uberblock; /* best uberblock so far */ vdev_list_t spa_vdevs; /* list of all toplevel vdevs */ objset_phys_t spa_mos; /* MOS for this pool */ - objset_phys_t spa_root_objset; /* current mounted ZPL objset */ + int spa_inited; /* initialized */ } spa_t; From owner-svn-src-head@FreeBSD.ORG Sat May 12 17:14:56 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DBE1106564A; Sat, 12 May 2012 17:14:56 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 392708FC08; Sat, 12 May 2012 17:14:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CHEugE043570; Sat, 12 May 2012 17:14:56 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CHEuCT043567; Sat, 12 May 2012 17:14:56 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201205121714.q4CHEuCT043567@svn.freebsd.org> From: Joel Dahl Date: Sat, 12 May 2012 17:14: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: r235344 - in head/sbin: ipfw mdconfig X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 17:14:56 -0000 Author: joel (doc committer) Date: Sat May 12 17:14:55 2012 New Revision: 235344 URL: http://svn.freebsd.org/changeset/base/235344 Log: mdoc: use Po and Pc macros instead of parens. Also avoid starting a line with Ns. Modified: head/sbin/ipfw/ipfw.8 head/sbin/mdconfig/mdconfig.8 Modified: head/sbin/ipfw/ipfw.8 ============================================================================== --- head/sbin/ipfw/ipfw.8 Sat May 12 16:36:54 2012 (r235343) +++ head/sbin/ipfw/ipfw.8 Sat May 12 17:14:55 2012 (r235344) @@ -1535,9 +1535,9 @@ Matches packets with the corresponding I .It Cm recv | xmit | via Brq Ar ifX | Ar if Ns Cm * | Ar table Ns Pq Ar number Ns Op , Ns Ar value | Ar ipno | Ar any Matches packets received, transmitted or going through, respectively, the interface specified by exact name -.Ns No ( Ar ifX Ns No ), +.Po Ar ifX Pc , by device name -.Ns No ( Ar if Ns Ar * Ns No ), +.Po Ar if* Pc , by IP address, or through some interface. .Pp The Modified: head/sbin/mdconfig/mdconfig.8 ============================================================================== --- head/sbin/mdconfig/mdconfig.8 Sat May 12 16:36:54 2012 (r235343) +++ head/sbin/mdconfig/mdconfig.8 Sat May 12 17:14:55 2012 (r235344) @@ -235,10 +235,11 @@ chmod 1777 /tmp .Ed .Pp Create a 5MB file-backed disk -.Ns ( Fl a +.Po Fl a and .Fl t Ar vnode -are implied): +are implied +.Pc : .Bd -literal -offset indent dd if=/dev/zero of=somebackingfile bs=1k count=5k mdconfig -f somebackingfile -u 0 @@ -250,10 +251,11 @@ mount /dev/md0c /mnt Create an .Xr md 4 device out of an ISO 9660 CD image file -.Ns ( Fl a +.Po Fl a and .Fl t Ar vnode -are implied), using the first available +are implied +.Pc , using the first available .Xr md 4 device, and then mount the new memory disk: .Bd -literal -offset indent From owner-svn-src-head@FreeBSD.ORG Sat May 12 17:41:43 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 078DC106566B; Sat, 12 May 2012 17:41:42 +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 979C18FC15; Sat, 12 May 2012 17:41:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CHfgHo044447; Sat, 12 May 2012 17:41:42 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CHfgJw044443; Sat, 12 May 2012 17:41:42 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201205121741.q4CHfgJw044443@svn.freebsd.org> From: Adrian Chadd Date: Sat, 12 May 2012 17:41: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: r235345 - head/sys/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: Sat, 12 May 2012 17:41:43 -0000 Author: adrian Date: Sat May 12 17:41:42 2012 New Revision: 235345 URL: http://svn.freebsd.org/changeset/base/235345 Log: Flip on WN1043ND switch PHY support. * Add the i2c bitbang bus; * Add the etherswitch/rtl8366rb drivers; * "fix" the USB GPIO configuration so USB actually works. Submitted by: Stefan Bethke Modified: head/sys/mips/conf/AR91XX_BASE head/sys/mips/conf/TP-WN1043ND head/sys/mips/conf/TP-WN1043ND.hints Modified: head/sys/mips/conf/AR91XX_BASE ============================================================================== --- head/sys/mips/conf/AR91XX_BASE Sat May 12 17:14:55 2012 (r235344) +++ head/sys/mips/conf/AR91XX_BASE Sat May 12 17:41:42 2012 (r235345) @@ -35,7 +35,7 @@ options _KPOSIX_PRIORITY_SCHEDULING #Po # PMC options HWPMC_HOOKS -device hwpmc +#device hwpmc # options NFS_LEGACYRPC # Debugging for use in -current Modified: head/sys/mips/conf/TP-WN1043ND ============================================================================== --- head/sys/mips/conf/TP-WN1043ND Sat May 12 17:14:55 2012 (r235344) +++ head/sys/mips/conf/TP-WN1043ND Sat May 12 17:41:42 2012 (r235345) @@ -15,6 +15,18 @@ hints "TP-WN1043ND.hints" # Force the board memory - 32mb options AR71XX_REALMEM=32*1024*1024 +# i2c GPIO bus +device gpioiic +device iicbb +device iicbus +device iic + +# ethernet switch device +device etherswitch + +# RTL8366RB support +device rtl8366rb + # read MSDOS formatted disks - USB options MSDOSFS options GEOM_PART_BSD @@ -33,3 +45,7 @@ device geom_map # Boot off of the rootfs, as defined in the geom_map setup. options ROOTDEVNAME=\"ufs:map/rootfs.uzip\" + +# Etherswitch support +device etherswitch +device rtl8366rb Modified: head/sys/mips/conf/TP-WN1043ND.hints ============================================================================== --- head/sys/mips/conf/TP-WN1043ND.hints Sat May 12 17:14:55 2012 (r235344) +++ head/sys/mips/conf/TP-WN1043ND.hints Sat May 12 17:41:42 2012 (r235345) @@ -82,7 +82,7 @@ hint.map.4.readonly=1 # Don't flip on anything that isn't already enabled. # This includes leaving the SPI CS1/CS2 pins as GPIO pins as they're # not used here. -hint.gpio.0.function_set=0x00000000 +hint.gpio.0.function_set=0x00002000 hint.gpio.0.function_clear=0x00000000 # These are the GPIO LEDs and buttons which can be software controlled. @@ -102,9 +102,9 @@ hint.gpio.0.pinmask=0x001c02ae # Pin 20 - "GPIO20" # LEDs are configured separately and driven by the LED device -hint.gpioled.0.at="gpiobus0" -hint.gpioled.0.name="usb" -hint.gpioled.0.pins=0x0002 +#hint.gpioled.0.at="gpiobus0" +#hint.gpioled.0.name="usb" +#hint.gpioled.0.pins=0x0002 hint.gpioled.1.at="gpiobus0" hint.gpioled.1.name="system" @@ -117,3 +117,17 @@ hint.gpioled.2.pins=0x0020 hint.gpioled.3.at="gpiobus0" hint.gpioled.3.name="wlan" hint.gpioled.3.pins=0x0200 + +# GPIO I2C bus +hint.gpioiic.0.at="gpiobus0" +hint.gpioiic.0.pins=0xc0000 +hint.gpioiic.0.scl=1 +hint.gpioiic.0.sda=0 + +# I2C bus +# Don't be strict about I2C protocol - the relaxed semantics are required +# by the realtek switch PHY. +hint.iicbus.0.strict=0 + +# Bit bang bus - override default delay +#hint.iicbb.0.udelay=3 From owner-svn-src-head@FreeBSD.ORG Sat May 12 17:42:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C1BD71065688; Sat, 12 May 2012 17:42:22 +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 ACB8D8FC0A; Sat, 12 May 2012 17:42:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CHgMax044507; Sat, 12 May 2012 17:42:22 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CHgM5V044505; Sat, 12 May 2012 17:42:22 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201205121742.q4CHgM5V044505@svn.freebsd.org> From: Adrian Chadd Date: Sat, 12 May 2012 17: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: r235346 - head/sys/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: Sat, 12 May 2012 17:42:22 -0000 Author: adrian Date: Sat May 12 17:42:22 2012 New Revision: 235346 URL: http://svn.freebsd.org/changeset/base/235346 Log: Revert this - I disabled it whilst hwpmc is/was broken. Modified: head/sys/mips/conf/AR91XX_BASE Modified: head/sys/mips/conf/AR91XX_BASE ============================================================================== --- head/sys/mips/conf/AR91XX_BASE Sat May 12 17:41:42 2012 (r235345) +++ head/sys/mips/conf/AR91XX_BASE Sat May 12 17:42:22 2012 (r235346) @@ -35,7 +35,7 @@ options _KPOSIX_PRIORITY_SCHEDULING #Po # PMC options HWPMC_HOOKS -#device hwpmc +device hwpmc # options NFS_LEGACYRPC # Debugging for use in -current From owner-svn-src-head@FreeBSD.ORG Sat May 12 18:10:28 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CB18106564A; Sat, 12 May 2012 18:10:28 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC1028FC1E; Sat, 12 May 2012 18:10:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CIARYv045469; Sat, 12 May 2012 18:10:27 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CIARFV045467; Sat, 12 May 2012 18:10:27 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205121810.q4CIARFV045467@svn.freebsd.org> From: Glen Barber Date: Sat, 12 May 2012 18:10: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: r235347 - 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: Sat, 12 May 2012 18:10:28 -0000 Author: gjb (doc committer) Date: Sat May 12 18:10:27 2012 New Revision: 235347 URL: http://svn.freebsd.org/changeset/base/235347 Log: Docuement requirement to alter some sysctls when using igb(4) with jumbo frames. PR: 153738 Submitted by: Tom Judge (tom!tomjudge.com) Discussed with: jfv (in part, a long time ago...) MFC after: 1 week Modified: head/share/man/man4/igb.4 Modified: head/share/man/man4/igb.4 ============================================================================== --- head/share/man/man4/igb.4 Sat May 12 17:42:22 2012 (r235346) +++ head/share/man/man4/igb.4 Sat May 12 18:10:27 2012 (r235347) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 11, 2011 +.Dd May 12, 2012 .Dt IGB 4 .Os .Sh NAME @@ -160,6 +160,14 @@ The minimum is 80, and the maximum is 40 .It Va hw.igb.enable_aim If set to 1, enable Adaptive Interrupt Moderation. The default is to enable Adaptive Interrupt Moderation. +.It Va kern.ipc.nmbclusters +The maximum number of mbuf clusters allowed. +If the system has more than one igb card or jumbo frames are +enabled, this value will need to be increased. +.It Va kern.ipc.nmbjumbo9k +The maximum number of mbuf 9k jumbo clusters allowed. +Increasing this to allow for at least 8192 extra clusters +per interface can allow for an mtu of 8192. .El .Sh FILES .Bl -tag -width /dev/led/igb* From owner-svn-src-head@FreeBSD.ORG Sat May 12 18:11:28 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5460B106564A; Sat, 12 May 2012 18:11:28 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F2718FC1E; Sat, 12 May 2012 18:11:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CIBRth045562; Sat, 12 May 2012 18:11:27 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CIBRlA045558; Sat, 12 May 2012 18:11:27 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201205121811.q4CIBRlA045558@svn.freebsd.org> From: Marius Strobl Date: Sat, 12 May 2012 18:11: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: r235348 - in head/sys/arm: at91 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: Sat, 12 May 2012 18:11:28 -0000 Author: marius Date: Sat May 12 18:11:26 2012 New Revision: 235348 URL: http://svn.freebsd.org/changeset/base/235348 Log: Add glue/support for the SAM9XE512-based Ethernut 5 boards. Currently, all integrated and on-board peripherals except the DataFlash (at91_spi(4) and at45d(4) still need to be unb0rken) and NAND Flash (missing NAND framework) are working. AFAICT, this makes FreeBSD the first operating system besides Nut/OS supporting Ethernut 5 out of tree. Added: head/sys/arm/at91/board_ethernut5.c (contents, props changed) head/sys/arm/at91/std.ethernut5 (contents, props changed) head/sys/arm/conf/ETHERNUT5 (contents, props changed) head/sys/arm/conf/ETHERNUT5.hints (contents, props changed) Modified: head/sys/arm/at91/files.at91sam9 Added: head/sys/arm/at91/board_ethernut5.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/at91/board_ethernut5.c Sat May 12 18:11:26 2012 (r235348) @@ -0,0 +1,146 @@ +/*- + * Copyright (c) 2012 Marius Strobl + * 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. + */ + +/* + * Ethernut 5 board support + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +long +board_init(void) +{ + + /* + * DBGU + */ + /* DRXD */ + at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB14, 0); + /* DTXD */ + at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB15, 1); + + /* + * EMAC + */ + /* ETX0 */ + at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA12, 0); + /* ETX1 */ + at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA13, 0); + /* ERX0 */ + at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA14, 0); + /* ERX1 */ + at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA15, 0); + /* ETXEN */ + at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA16, 0); + /* ERXDV */ + at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA17, 0); + /* ERXER */ + at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA18, 0); + /* ETXCK */ + at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA19, 0); + /* EMDC */ + at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA20, 0); + /* EMDIO */ + at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA21, 0); + + /* + * MMC + */ + /* MCDA0 */ + at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA6, 1); + /* MCCDA */ + at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA7, 1); + /* MCCK */ + at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA8, 1); + /* MCDA1 */ + at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA9, 1); + /* MCDA2 */ + at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA10, 1); + /* MCDA3 */ + at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA11, 1); + + /* + * SPI0 + */ + /* MISO */ + at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA0, 0); + /* MOSI */ + at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA1, 0); + /* SPCK */ + at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA2, 0); + /* NPCS0 */ + at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA3, 0); + + /* + * TWI + */ + /* TWD */ + at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA23, 1); + /* TWCK */ + at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA24, 1); + + /* + * USART0 + */ + /* TXD0 */ + at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB4, 1); + /* RXD0 */ + at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB5, 0); + /* DSR0 */ + at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB22, 0); + /* DCD0 */ + at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB23, 0); + /* DTR0 */ + at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB24, 1); + /* RI0 */ + at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB25, 0); + /* RTS0 */ + at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB26, 1); + /* CTS0 */ + at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB27, 0); + + /* + * USART2 + */ + /* RTS2 */ + at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA4, 1); + /* CTS2 */ + at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA5, 0); + /* TXD2 */ + at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB8, 1); + /* RXD2 */ + at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB9, 0); + + return (at91_ramsize()); +} Modified: head/sys/arm/at91/files.at91sam9 ============================================================================== --- head/sys/arm/at91/files.at91sam9 Sat May 12 18:10:27 2012 (r235347) +++ head/sys/arm/at91/files.at91sam9 Sat May 12 18:11:26 2012 (r235348) @@ -31,6 +31,7 @@ arm/at91/at91sam9260.c optional at91sam # # All the boards we support # +arm/at91/board_ethernut5.c optional at91_board_ethernut5 arm/at91/board_hl201.c optional at91_board_hl201 arm/at91/board_sam9g20ek.c optional at91_board_sam9g20ek arm/at91/board_qila9g20.c optional at91_board_qila9g20 Added: head/sys/arm/at91/std.ethernut5 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/at91/std.ethernut5 Sat May 12 18:11:26 2012 (r235348) @@ -0,0 +1,14 @@ +# $FreeBSD$ +include "../at91/std.at91sam9" + +options STARTUP_PAGETABLE_ADDR=0x20800000 +makeoptions KERNPHYSADDR=0x20000000 +makeoptions KERNVIRTADDR=0xc0000000 +options KERNPHYSADDR=0x20000000 +options KERNVIRTADDR=0xc0000000 + +# SAM9XE512 w/ 90.3168 MHz master clock +options AT91C_MASTER_CLOCK=90316800 + +device at91_board_ethernut5 +nodevice at91sam9g20 Added: head/sys/arm/conf/ETHERNUT5 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/ETHERNUT5 Sat May 12 18:11:26 2012 (r235348) @@ -0,0 +1,158 @@ +# Kernel configuration for Ethernut 5 boards +# +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +ident ETHERNUT5 + +include "../at91/std.ethernut5" + +# To statically compile in device wiring instead of /boot/device.hints +hints "ETHERNUT5.hints" + +#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols + +options SCHED_4BSD # 4BSD scheduler +#options PREEMPTION # Enable kernel thread preemption +options INET # InterNETworking +#options INET6 # IPv6 communications protocols +#options SCTP # Stream Control Transmission Protocol +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES # Enable FFS soft updates support +#options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +#options UFS_GJOURNAL # Enable gjournal-based UFS journaling +#options MD_ROOT # MD is a potential root device +options NFSCL # New Network Filesystem Client +#options NFSD # New Network Filesystem Server +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL +#options MSDOSFS # MSDOS Filesystem +#options CD9660 # ISO 9660 Filesystem +#options PROCFS # Process filesystem (requires PSEUDOFS) +#options PSEUDOFS # Pseudo-filesystem framework +#options GEOM_PART_GPT # GUID Partition Tables. +#options GEOM_LABEL # Provides labelization +#options COMPAT_FREEBSD5 # Compatible with FreeBSD5 +#options COMPAT_FREEBSD6 # Compatible with FreeBSD6 +#options COMPAT_FREEBSD7 # Compatible with FreeBSD7 +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE # ktrace(1) support +#options STACK # stack(9) support +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. +#options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) +#options AUDIT # Security event auditing +#options CAPABILITY_MODE # Capsicum capability mode +#options CAPABILITIES # Capsicum capabilities +#options MAC # TrustedBSD MAC Framework +#options INCLUDE_CONFIG_FILE # Include this file in kernel + +# required for netbooting +options BOOTP_NFSROOT +options BOOTP +options BOOTP_NFSV3 +options BOOTP_WIRED_TO=ate0 +options BOOTP_COMPAT + +# alternatively, boot from a MMC/SD memory card +#options ROOTDEVNAME=\"ufs:/dev/mmcsd0a\" + +# kernel/memory size reduction +options MUTEX_NOINLINE +options NO_FFS_SNAPSHOT +options NO_SWAPPING +options NO_SYSCTL_DESCR +options RWLOCK_NOINLINE + +# Debugging support. Always need this: +#options KDB # Enable kernel debugger support. +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic. +# For full debugger support use this instead: +#options DDB # Support DDB. +#options GDB # Support remote GDB. +#options DEADLKRES # Enable the deadlock resolver +#options INVARIANTS # Enable calls of extra sanity checking +#options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones + +# The `bpf' device enables the Berkeley Packet Filter. +# Be aware of the administrative consequences of enabling this! +# Note that 'bpf' is required for DHCP. +device bpf # Berkeley packet filter + +# Ethernet +device mii # Minimal MII support +device ate # Atmel AT91 Ethernet friver + +# I2C +device at91_twi # Atmel AT91 Two-wire Interface +device iic # I2C generic I/O device driver +device iicbus # I2C bus system +device pcf8563 # NXP PCF8563 clock/calendar + +# MMC/SD +device at91_mci # Atmel AT91 Multimedia Card Interface +options AT91_MCI_HAS_4WIRE +device mmc # MMC/SD bus +device mmcsd # MMC/SD memory card + +# DataFlash - totally b0rken drivers +#device at91_spi # Atmel AT91 Serial Peripheral Interface +#device spibus # SPI bus +#device at45d # Atmel AT45D +#device geom_map # GEOM partition mapping + +# Pseudo devices. +device loop # Network loopback +device random # Entropy device +device ether # Ethernet support +#device vlan # 802.1Q VLAN support +#device tun # Packet tunnel. +#device md # Memory "disks" +#device gif # IPv6 and IPv4 tunneling +#device faith # IPv6-to-IPv4 relaying (translation) +#device firmware # firmware assist module + +# SCSI peripherals +#device scbus # SCSI bus (required for ATA/SCSI) +#device ch # SCSI media changers +#device da # Direct Access (disks) +#device sa # Sequential Access (tape etc) +#device cd # CD +#device pass # Passthrough device (direct ATA/SCSI access) +#device ses # SCSI Environmental Services (and SAF-TE) +#device ctl # CAM Target Layer + +# Serial (COM) ports +device uart # Multi-uart driver +options ALT_BREAK_TO_DEBUGGER + +# USB support +#options USB_DEBUG # enable debug msgs +device ohci # OHCI PCI->USB interface +device usb # USB Bus (required) +#device umass # Disks/Mass storage - Requires scbus and da + +# watchdog +device at91_wdt # Atmel AT91 Watchdog Timer Added: head/sys/arm/conf/ETHERNUT5.hints ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/ETHERNUT5.hints Sat May 12 18:11:26 2012 (r235348) @@ -0,0 +1,45 @@ +# $FreeBSD$ + +# Atmel AT45DB21D +hint.at45d.0.at="spibus0" +hint.at45d.0.addr=0x00 +# user 132 kbytes +hint.map.0.at="flash/spi0" +hint.map.0.start=0x00000000 +hint.map.0.end=0x00020fff +hint.map.0.name="user" +hint.map.0.readonly=1 +# setup 132 kbytes +hint.map.1.at="flash/spi0" +hint.map.1.start=0x00021000 +hint.map.1.end=0x00041fff +hint.map.1.name="setup" +hint.map.1.readonly=1 +# uboot 528 kbytes +hint.map.2.at="flash/spi0" +hint.map.2.start=0x00042000 +hint.map.2.end=0x000c5fff +hint.map.2.name="uboot" +hint.map.2.readonly=1 +# kernel 2640 kbytes +hint.map.3.at="flash/spi0" +hint.map.3.start=0x000c6000 +hint.map.3.end=0x00359fff +hint.map.3.name="kernel" +#hint.map.3.readonly=1 +# nutos 3432 kbytes +hint.map.4.at="flash/spi0" +hint.map.4.start=0x0035a000 +hint.map.4.end=0x003ddfff +hint.map.4.name="nutos" +hint.map.4.readonly=1 +# env 3960 kbytes +hint.map.5.at="flash/spi0" +hint.map.5.start=0x003de000 +hint.map.5.end=0x003fefff +hint.map.5.name="env" +hint.map.5.readonly=1 + +# NXP PCF8563 clock/calendar +hint.pcf8563_rtc.0.at="iicbus0" +hint.pcf8563_rtc.0.addr=0xa2 From owner-svn-src-head@FreeBSD.ORG Sat May 12 19:43:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73BDF1065744; Sat, 12 May 2012 19:43:23 +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 5EC058FC14; Sat, 12 May 2012 19:43:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CJhNix048451; Sat, 12 May 2012 19:43:23 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CJhNHl048448; Sat, 12 May 2012 19:43:23 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201205121943.q4CJhNHl048448@svn.freebsd.org> From: Adrian Chadd Date: Sat, 12 May 2012 19:43: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: r235351 - head/sys/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: Sat, 12 May 2012 19:43:23 -0000 Author: adrian Date: Sat May 12 19:43:22 2012 New Revision: 235351 URL: http://svn.freebsd.org/changeset/base/235351 Log: Remove duplicate config bits. Submitted by: juli Modified: head/sys/mips/conf/TP-WN1043ND Modified: head/sys/mips/conf/TP-WN1043ND ============================================================================== --- head/sys/mips/conf/TP-WN1043ND Sat May 12 19:26:15 2012 (r235350) +++ head/sys/mips/conf/TP-WN1043ND Sat May 12 19:43:22 2012 (r235351) @@ -45,7 +45,3 @@ device geom_map # Boot off of the rootfs, as defined in the geom_map setup. options ROOTDEVNAME=\"ufs:map/rootfs.uzip\" - -# Etherswitch support -device etherswitch -device rtl8366rb From owner-svn-src-head@FreeBSD.ORG Sat May 12 19:53:45 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9BAD01065676; Sat, 12 May 2012 19:53:45 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6DEE68FC0A; Sat, 12 May 2012 19:53:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CJrjtB048840; Sat, 12 May 2012 19:53:45 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CJrjh4048838; Sat, 12 May 2012 19:53:45 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201205121953.q4CJrjh4048838@svn.freebsd.org> From: Joel Dahl Date: Sat, 12 May 2012 19:53: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: r235353 - 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: Sat, 12 May 2012 19:53:45 -0000 Author: joel (doc committer) Date: Sat May 12 19:53:44 2012 New Revision: 235353 URL: http://svn.freebsd.org/changeset/base/235353 Log: Minor mdoc nit. Modified: head/share/man/man4/ddb.4 Modified: head/share/man/man4/ddb.4 ============================================================================== --- head/share/man/man4/ddb.4 Sat May 12 19:52:59 2012 (r235352) +++ head/share/man/man4/ddb.4 Sat May 12 19:53:44 2012 (r235353) @@ -1305,7 +1305,7 @@ command may be used to define a script b Scripts consist of a series of .Nm commands separated with the -.Ic ; +.Ql \&; character. For example: .Bd -literal -offset indent From owner-svn-src-head@FreeBSD.ORG Sat May 12 19:59:39 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E892E106566B; Sat, 12 May 2012 19:59:38 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 908E88FC08; Sat, 12 May 2012 19:59:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CJxcB2049114; Sat, 12 May 2012 19:59:38 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CJxcgX049107; Sat, 12 May 2012 19:59:38 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201205121959.q4CJxcgX049107@svn.freebsd.org> From: Joel Dahl Date: Sat, 12 May 2012 19:59: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: r235355 - in head: sbin/etherswitchcfg sbin/mdconfig share/man/man4 usr.bin/stdbuf usr.sbin/jail usr.sbin/wpa/hostapd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 19:59:39 -0000 Author: joel (doc committer) Date: Sat May 12 19:59:37 2012 New Revision: 235355 URL: http://svn.freebsd.org/changeset/base/235355 Log: Remove end of line whitespace. Modified: head/sbin/etherswitchcfg/etherswitchcfg.8 head/sbin/mdconfig/mdconfig.8 head/share/man/man4/firewire.4 head/usr.bin/stdbuf/stdbuf.1 head/usr.sbin/jail/jail.8 head/usr.sbin/wpa/hostapd/hostapd.conf.5 Modified: head/sbin/etherswitchcfg/etherswitchcfg.8 ============================================================================== --- head/sbin/etherswitchcfg/etherswitchcfg.8 Sat May 12 19:54:57 2012 (r235354) +++ head/sbin/etherswitchcfg/etherswitchcfg.8 Sat May 12 19:59:37 2012 (r235355) @@ -71,7 +71,7 @@ Specifies the physical media configurati Specifies a list of media options for a port. See .Xr ifconfig 8 for details on -.Ar media and +.Ar media and .Ar mediaopt . .El .Ss reg Modified: head/sbin/mdconfig/mdconfig.8 ============================================================================== --- head/sbin/mdconfig/mdconfig.8 Sat May 12 19:54:57 2012 (r235354) +++ head/sbin/mdconfig/mdconfig.8 Sat May 12 19:59:37 2012 (r235355) @@ -128,7 +128,7 @@ If the .Fl v option is specified, show all details. .It Fl n -When printing +When printing .Xr md 4 device names, print only the unit number without the .Xr md 4 Modified: head/share/man/man4/firewire.4 ============================================================================== --- head/share/man/man4/firewire.4 Sat May 12 19:54:57 2012 (r235354) +++ head/share/man/man4/firewire.4 Sat May 12 19:59:37 2012 (r235355) @@ -83,11 +83,11 @@ On the .Nm bus, every device is identified by an EUI 64 address. .Pp -Debugging over the firewire interace is possible with the -.Xr dcons 4 +Debugging over the firewire interace is possible with the +.Xr dcons 4 driver. Please see -.Pa http://wiki.freebsd.org/DebugWithDcons +.Pa http://wiki.freebsd.org/DebugWithDcons for details on how to setup debugging with firewire. .Sh FILES .Bl -tag -compact Modified: head/usr.bin/stdbuf/stdbuf.1 ============================================================================== --- head/usr.bin/stdbuf/stdbuf.1 Sat May 12 19:54:57 2012 (r235354) +++ head/usr.bin/stdbuf/stdbuf.1 Sat May 12 19:59:37 2012 (r235355) @@ -108,7 +108,7 @@ utility first appeared in .An -nosplit The original idea of the .Nm -command comes from +command comes from .An Padraig Brady who implemented it in the GNU coreutils. .An Jeremie Le Hen Modified: head/usr.sbin/jail/jail.8 ============================================================================== --- head/usr.sbin/jail/jail.8 Sat May 12 19:54:57 2012 (r235354) +++ head/usr.sbin/jail/jail.8 Sat May 12 19:59:37 2012 (r235355) @@ -78,12 +78,12 @@ perform: .Bl -tag -width indent .It Fl c Create a new jail. -The jail +The jail .Va jid and .Va name parameters (if specified) on the command line, -or any jails +or any jails must not refer to an existing jail. .It Fl m Modify an existing jail. @@ -215,7 +215,7 @@ this is the surest way for to remove all jails. If hierarchical jails exist, a partial-matching wildcard definition may be specified. -For example, an argument of +For example, an argument of .Dq foo.* would apply to jails with names like .Dq foo.bar Modified: head/usr.sbin/wpa/hostapd/hostapd.conf.5 ============================================================================== --- head/usr.sbin/wpa/hostapd/hostapd.conf.5 Sat May 12 19:54:57 2012 (r235354) +++ head/usr.sbin/wpa/hostapd/hostapd.conf.5 Sat May 12 19:59:37 2012 (r235355) @@ -67,7 +67,7 @@ The following parameters are recognized: Interface name. Should be set in .Dq hostap -mode. Make certain that there are no spaces after the interface name, +mode. Make certain that there are no spaces after the interface name, or hostapd will complain that the interface does not exist. .It Va debug Debugging mode: 0 = no, 1 = minimal, 2 = verbose, 3 = msg dumps, 4 = From owner-svn-src-head@FreeBSD.ORG Sat May 12 20:03:06 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A288E106564A; Sat, 12 May 2012 20:03:06 +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 8DB298FC0C; Sat, 12 May 2012 20:03:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CK36Q8049286; Sat, 12 May 2012 20:03:06 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CK368v049284; Sat, 12 May 2012 20:03:06 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205122003.q4CK368v049284@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 12 May 2012 20:03: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: r235356 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 20:03:06 -0000 Author: kib Date: Sat May 12 20:03:06 2012 New Revision: 235356 URL: http://svn.freebsd.org/changeset/base/235356 Log: Make the vm_page_array_size long. Remove redundand zero initialization for vm_page_array_size and nearby variablees. Sponsored by: The FreeBSD Foundation Reviewed by: alc MFC after: 1 month Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sat May 12 19:59:37 2012 (r235355) +++ head/sys/vm/vm_page.c Sat May 12 20:03:06 2012 (r235356) @@ -121,10 +121,10 @@ struct vpglocks vm_page_queue_free_lock; struct vpglocks pa_lock[PA_LOCK_COUNT]; -vm_page_t vm_page_array = 0; -int vm_page_array_size = 0; -long first_page = 0; -int vm_page_zero_count = 0; +vm_page_t vm_page_array; +long vm_page_array_size; +long first_page; +int vm_page_zero_count; static int boot_pages = UMA_BOOT_PAGES; TUNABLE_INT("vm.boot_pages", &boot_pages); From owner-svn-src-head@FreeBSD.ORG Sat May 12 20:06:18 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 211A7106566B; Sat, 12 May 2012 20:06:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C4E48FC08; Sat, 12 May 2012 20:06:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CK6HuC049419; Sat, 12 May 2012 20:06:17 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CK6HlN049417; Sat, 12 May 2012 20:06:17 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205122006.q4CK6HlN049417@svn.freebsd.org> From: Glen Barber Date: Sat, 12 May 2012 20:06: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: r235357 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 20:06:18 -0000 Author: gjb (doc committer) Date: Sat May 12 20:06:17 2012 New Revision: 235357 URL: http://svn.freebsd.org/changeset/base/235357 Log: Fix an mdoc(7) nit. Modified: head/share/man/man9/bus_space.9 Modified: head/share/man/man9/bus_space.9 ============================================================================== --- head/share/man/man9/bus_space.9 Sat May 12 20:03:06 2012 (r235356) +++ head/share/man/man9/bus_space.9 Sat May 12 20:06:17 2012 (r235357) @@ -1610,7 +1610,7 @@ Access to these types of memory regions .Fn bus_space_*_stream_N functions. .Pp -.Bl -tag -compact +.Bl -tag -compact -width Fn .It Fn bus_space_read_stream_1 .It Fn bus_space_read_stream_2 .It Fn bus_space_read_stream_4 From owner-svn-src-head@FreeBSD.ORG Sat May 12 20:08:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 081641065670; Sat, 12 May 2012 20:08:17 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E7BDA8FC16; Sat, 12 May 2012 20:08:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CK8GLZ049514; Sat, 12 May 2012 20:08:16 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CK8G9e049512; Sat, 12 May 2012 20:08:16 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205122008.q4CK8G9e049512@svn.freebsd.org> From: Glen Barber Date: Sat, 12 May 2012 20:08:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235358 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 20:08:17 -0000 Author: gjb (doc committer) Date: Sat May 12 20:08:16 2012 New Revision: 235358 URL: http://svn.freebsd.org/changeset/base/235358 Log: Set formatting width and offset in DB_COMMAND(9). Modified: head/share/man/man9/DB_COMMAND.9 Modified: head/share/man/man9/DB_COMMAND.9 ============================================================================== --- head/share/man/man9/DB_COMMAND.9 Sat May 12 20:06:17 2012 (r235357) +++ head/share/man/man9/DB_COMMAND.9 Sat May 12 20:08:16 2012 (r235358) @@ -71,7 +71,7 @@ The general command syntax: .Ar address Ns Op Li , Ns Ar count , translates into the following parameters for .Fa command_function : -.Bl -tag +.Bl -tag -width Fa -offset indent .It Fa addr The address passed to the command as an argument. .It Fa have_addr From owner-svn-src-head@FreeBSD.ORG Sat May 12 20:10:18 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E2791065679; Sat, 12 May 2012 20:10:18 +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 8A17B8FC08; Sat, 12 May 2012 20:10:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CKAIV4049608; Sat, 12 May 2012 20:10:18 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CKAIwg049606; Sat, 12 May 2012 20:10:18 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205122010.q4CKAIwg049606@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 12 May 2012 20:10: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: r235359 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 20:10:18 -0000 Author: kib Date: Sat May 12 20:10:18 2012 New Revision: 235359 URL: http://svn.freebsd.org/changeset/base/235359 Log: Commit the change forgotten in r235356. Sponsored by: The FreeBSD Foundation Reviewed by: alc MFC after: 1 month Modified: head/sys/vm/vm_page.h Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Sat May 12 20:08:16 2012 (r235358) +++ head/sys/vm/vm_page.h Sat May 12 20:10:18 2012 (r235359) @@ -312,7 +312,7 @@ struct vnode; extern int vm_page_zero_count; extern vm_page_t vm_page_array; /* First resident page in table */ -extern int vm_page_array_size; /* number of vm_page_t's */ +extern long vm_page_array_size; /* number of vm_page_t's */ extern long first_page; /* first physical page number */ #define VM_PAGE_IS_FREE(m) (((m)->flags & PG_FREE) != 0) From owner-svn-src-head@FreeBSD.ORG Sat May 12 20:11:36 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 47CE71065672; Sat, 12 May 2012 20:11:36 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 30DFC8FC1D; Sat, 12 May 2012 20:11:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CKBaTO049699; Sat, 12 May 2012 20:11:36 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CKBZ8Z049688; Sat, 12 May 2012 20:11:35 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201205122011.q4CKBZ8Z049688@svn.freebsd.org> From: Michael Tuexen Date: Sat, 12 May 2012 20:11: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: r235360 - in head/sys: netinet netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 20:11:36 -0000 Author: tuexen Date: Sat May 12 20:11:35 2012 New Revision: 235360 URL: http://svn.freebsd.org/changeset/base/235360 Log: Provide in the association change notification the received ABORT chunk if case of SCTP_COMM_LOST or SCTP_CANT_STR_ASSOC as required by RFC 6458. MFC after: 3 days Modified: head/sys/netinet/sctp_asconf.c head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_timer.c head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctputil.c head/sys/netinet/sctputil.h head/sys/netinet6/sctp6_usrreq.c Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Sat May 12 20:10:18 2012 (r235359) +++ head/sys/netinet/sctp_asconf.c Sat May 12 20:11:35 2012 (r235360) @@ -1789,8 +1789,7 @@ sctp_handle_asconf_ack(struct mbuf *m, i */ if (serial_num == (asoc->asconf_seq_out + 1)) { SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf_ack: got unexpected next serial number! Aborting asoc!\n"); - sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_CAUSE_ILLEGAL_ASCONF_ACK, NULL, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, NULL, SCTP_SO_NOT_LOCKED); *abort_no_unlock = 1; return; } Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Sat May 12 20:10:18 2012 (r235359) +++ head/sys/netinet/sctp_indata.c Sat May 12 20:11:35 2012 (r235360) @@ -607,9 +607,7 @@ protocol_error: *ippp = ((control->sinfo_stream << 16) | control->sinfo_ssn); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_1; - sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; @@ -892,8 +890,7 @@ sctp_queue_data_for_reasm(struct sctp_tc } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_2; - sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; } else if (asoc->fragmented_delivery_inprogress && (chk->rec.data.rcv_flags & SCTP_DATA_FIRST_FRAG) == SCTP_DATA_FIRST_FRAG) { @@ -924,8 +921,7 @@ sctp_queue_data_for_reasm(struct sctp_tc *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_3; - sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; } else if (asoc->fragmented_delivery_inprogress) { /* @@ -961,8 +957,7 @@ sctp_queue_data_for_reasm(struct sctp_tc *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_4; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; } else if ((asoc->fragment_flags & SCTP_DATA_UNORDERED) != SCTP_DATA_UNORDERED && @@ -995,8 +990,7 @@ sctp_queue_data_for_reasm(struct sctp_tc } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_5; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; } } @@ -1090,8 +1084,7 @@ sctp_queue_data_for_reasm(struct sctp_tc } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_6; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1127,9 +1120,7 @@ sctp_queue_data_for_reasm(struct sctp_tc *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_7; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1166,9 +1157,7 @@ sctp_queue_data_for_reasm(struct sctp_tc *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_8; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1202,9 +1191,7 @@ sctp_queue_data_for_reasm(struct sctp_tc } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_9; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1247,9 +1234,7 @@ sctp_queue_data_for_reasm(struct sctp_tc *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_10; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1289,9 +1274,7 @@ sctp_queue_data_for_reasm(struct sctp_tc } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_11; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1328,9 +1311,7 @@ sctp_queue_data_for_reasm(struct sctp_tc } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_12; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1367,9 +1348,7 @@ sctp_queue_data_for_reasm(struct sctp_tc *ippp = ((chk->rec.data.stream_number << 16) | chk->rec.data.stream_seq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_13; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return; } @@ -1531,7 +1510,7 @@ sctp_process_a_data_chunk(struct sctp_tc struct mbuf *op_err; op_err = sctp_generate_invmanparam(SCTP_CAUSE_OUT_OF_RESC); - sctp_abort_an_association(stcb->sctp_ep, stcb, 0, op_err, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); } @@ -1678,8 +1657,7 @@ sctp_process_a_data_chunk(struct sctp_tc } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_14; - sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); } @@ -1942,9 +1920,7 @@ failed_pdapi_express_del: *ippp = ((strmno << 16) | strmseq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_15; - sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); } else { @@ -1980,9 +1956,7 @@ failed_pdapi_express_del: *ippp = ((strmno << 16) | strmseq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_16; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); } @@ -2027,9 +2001,7 @@ failed_pdapi_express_del: *ippp = ((strmno << 16) | strmseq); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_17; - sctp_abort_an_association(stcb->sctp_ep, - stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); *abort_flag = 1; return (0); } @@ -3878,7 +3850,7 @@ sctp_express_handle_sack(struct sctp_tcb *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_25); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_25; - sctp_abort_an_association(stcb->sctp_ep, stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); return; #endif } @@ -4240,7 +4212,7 @@ again: *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_24); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_24; - sctp_abort_an_association(stcb->sctp_ep, stcb, SCTP_RESPONSE_TO_USER_REQ, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); } else { struct sctp_nets *netp; @@ -4463,7 +4435,7 @@ sctp_handle_sack(struct mbuf *m, int off *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_25); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_25; - sctp_abort_an_association(stcb->sctp_ep, stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); return; } } @@ -4966,7 +4938,7 @@ sctp_handle_sack(struct mbuf *m, int off *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_31); } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_31; - sctp_abort_an_association(stcb->sctp_ep, stcb, SCTP_RESPONSE_TO_USER_REQ, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); return; } else { struct sctp_nets *netp; @@ -5421,8 +5393,7 @@ sctp_handle_forward_tsn(struct sctp_tcb *ippp = new_cum_tsn; } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_33; - sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, oper, SCTP_SO_NOT_LOCKED); return; } SCTP_STAT_INCR(sctps_fwdtsn_map_over); Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sat May 12 20:10:18 2012 (r235359) +++ head/sys/netinet/sctp_input.c Sat May 12 20:11:35 2012 (r235360) @@ -428,7 +428,7 @@ sctp_process_init_ack(struct mbuf *m, in &abort_flag, (struct sctp_chunkhdr *)cp, &nat_friendly); if (abort_flag) { /* Send an abort and notify peer */ - sctp_abort_an_association(stcb->sctp_ep, stcb, SCTP_CAUSE_PROTOCOL_VIOLATION, op_err, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); *abort_no_unlock = 1; return (-1); } @@ -739,7 +739,7 @@ sctp_handle_nat_missing_state(struct sct static void -sctp_handle_abort(struct sctp_abort_chunk *cp, +sctp_handle_abort(struct sctp_abort_chunk *abort, struct sctp_tcb *stcb, struct sctp_nets *net) { #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) @@ -747,43 +747,42 @@ sctp_handle_abort(struct sctp_abort_chun #endif uint16_t len; + uint16_t error; SCTPDBG(SCTP_DEBUG_INPUT2, "sctp_handle_abort: handling ABORT\n"); if (stcb == NULL) return; - len = ntohs(cp->ch.chunk_length); + len = ntohs(abort->ch.chunk_length); if (len > sizeof(struct sctp_chunkhdr)) { /* * Need to check the cause codes for our two magic nat * aborts which don't kill the assoc necessarily. */ - struct sctp_abort_chunk *cpnext; struct sctp_missing_nat_state *natc; - uint16_t cause; - cpnext = cp; - cpnext++; - natc = (struct sctp_missing_nat_state *)cpnext; - cause = ntohs(natc->cause); - if (cause == SCTP_CAUSE_NAT_COLLIDING_STATE) { + natc = (struct sctp_missing_nat_state *)(abort + 1); + error = ntohs(natc->cause); + if (error == SCTP_CAUSE_NAT_COLLIDING_STATE) { SCTPDBG(SCTP_DEBUG_INPUT2, "Received Colliding state abort flags:%x\n", - cp->ch.chunk_flags); + abort->ch.chunk_flags); if (sctp_handle_nat_colliding_state(stcb)) { return; } - } else if (cause == SCTP_CAUSE_NAT_MISSING_STATE) { + } else if (error == SCTP_CAUSE_NAT_MISSING_STATE) { SCTPDBG(SCTP_DEBUG_INPUT2, "Received missing state abort flags:%x\n", - cp->ch.chunk_flags); + abort->ch.chunk_flags); if (sctp_handle_nat_missing_state(stcb, net)) { return; } } + } else { + error = 0; } /* stop any receive timers */ sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_6); /* notify user of the abort and clean up... */ - sctp_abort_notification(stcb, 0, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, error, abort, SCTP_SO_NOT_LOCKED); /* free the tcb */ SCTP_STAT_INCR_COUNTER32(sctps_aborted); if ((SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) || @@ -1174,7 +1173,7 @@ sctp_handle_error(struct sctp_chunkhdr * asoc->stale_cookie_count++; if (asoc->stale_cookie_count > asoc->max_init_times) { - sctp_abort_notification(stcb, 0, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 0, NULL, SCTP_SO_NOT_LOCKED); /* now free the asoc */ #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(stcb->sctp_ep); Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sat May 12 20:10:18 2012 (r235359) +++ head/sys/netinet/sctp_output.c Sat May 12 20:11:35 2012 (r235360) @@ -6573,9 +6573,7 @@ sctp_sendall_iterator(struct sctp_inpcb * dis-appearing on us. */ atomic_add_int(&stcb->asoc.refcnt, 1); - sctp_abort_an_association(inp, stcb, - SCTP_RESPONSE_TO_USER_REQ, - m, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(inp, stcb, m, SCTP_SO_NOT_LOCKED); /* * sctp_abort_an_association calls sctp_free_asoc() * free association will NOT free it since we @@ -6669,7 +6667,6 @@ sctp_sendall_iterator(struct sctp_inpcb abort_anyway: atomic_add_int(&stcb->asoc.refcnt, 1); sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_RESPONSE_TO_USER_REQ, NULL, SCTP_SO_NOT_LOCKED); atomic_add_int(&stcb->asoc.refcnt, -1); goto no_chunk_output; @@ -9504,7 +9501,7 @@ sctp_chunk_retransmission(struct sctp_in chk->snd_count, SCTP_BASE_SYSCTL(sctp_max_retran_chunk)); atomic_add_int(&stcb->asoc.refcnt, 1); - sctp_abort_an_association(stcb->sctp_ep, stcb, 0, NULL, so_locked); + sctp_abort_an_association(stcb->sctp_ep, stcb, NULL, so_locked); SCTP_TCB_LOCK(stcb); atomic_subtract_int(&stcb->asoc.refcnt, 1); return (SCTP_RETRAN_EXIT); @@ -13138,9 +13135,7 @@ sctp_lower_sosend(struct socket *so, atomic_add_int(&stcb->asoc.refcnt, -1); free_cnt_applied = 0; /* release this lock, otherwise we hang on ourselves */ - sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_RESPONSE_TO_USER_REQ, - mm, SCTP_SO_LOCKED); + sctp_abort_an_association(stcb->sctp_ep, stcb, mm, SCTP_SO_LOCKED); /* now relock the stcb so everything is sane */ hold_tcblock = 0; stcb = NULL; @@ -13695,7 +13690,6 @@ dataless_eof: free_cnt_applied = 0; } sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_RESPONSE_TO_USER_REQ, NULL, SCTP_SO_LOCKED); /* * now relock the stcb so everything Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sat May 12 20:10:18 2012 (r235359) +++ head/sys/netinet/sctp_pcb.c Sat May 12 20:11:35 2012 (r235360) @@ -6347,7 +6347,7 @@ sctp_load_addresses_from_init(struct sct * abort this guy */ sctp_abort_an_association(stcb_tmp->sctp_ep, - stcb_tmp, 1, NULL, 0); + stcb_tmp, NULL, SCTP_SO_NOT_LOCKED); goto add_it_now; } SCTP_TCB_UNLOCK(stcb_tmp); @@ -6438,7 +6438,7 @@ sctp_load_addresses_from_init(struct sct * abort this guy */ sctp_abort_an_association(stcb_tmp->sctp_ep, - stcb_tmp, 1, NULL, 0); + stcb_tmp, NULL, SCTP_SO_NOT_LOCKED); goto add_it_now6; } SCTP_TCB_UNLOCK(stcb_tmp); Modified: head/sys/netinet/sctp_timer.c ============================================================================== --- head/sys/netinet/sctp_timer.c Sat May 12 20:10:18 2012 (r235359) +++ head/sys/netinet/sctp_timer.c Sat May 12 20:11:35 2012 (r235360) @@ -167,7 +167,7 @@ sctp_threshold_management(struct sctp_in *ippp = htonl(SCTP_FROM_SCTP_TIMER + SCTP_LOC_1); } inp->last_abort_code = SCTP_FROM_SCTP_TIMER + SCTP_LOC_1; - sctp_abort_an_association(inp, stcb, SCTP_FAILED_THRESHOLD, oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(inp, stcb, oper, SCTP_SO_NOT_LOCKED); return (1); } return (0); @@ -1066,8 +1066,7 @@ sctp_cookie_timer(struct sctp_inpcb *inp *ippp = htonl(SCTP_FROM_SCTP_TIMER + SCTP_LOC_3); } inp->last_abort_code = SCTP_FROM_SCTP_TIMER + SCTP_LOC_4; - sctp_abort_an_association(inp, stcb, SCTP_INTERNAL_ERROR, - oper, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(inp, stcb, oper, SCTP_SO_NOT_LOCKED); } else { #ifdef INVARIANTS panic("Cookie timer expires in wrong state?"); Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Sat May 12 20:10:18 2012 (r235359) +++ head/sys/netinet/sctp_usrreq.c Sat May 12 20:11:35 2012 (r235360) @@ -229,11 +229,9 @@ sctp_notify(struct sctp_inpcb *inp, struct socket *so; #endif - /* protection */ - int reason; struct icmp *icmph; - + /* protection */ if ((inp == NULL) || (stcb == NULL) || (net == NULL) || (sh == NULL) || (to == NULL)) { if (stcb) @@ -285,8 +283,7 @@ sctp_notify(struct sctp_inpcb *inp, * now is dead. In either case treat it like a OOTB abort * with no TCB */ - reason = SCTP_PEER_FAULTY; - sctp_abort_notification(stcb, reason, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 0, NULL, SCTP_SO_NOT_LOCKED); #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(inp); atomic_add_int(&stcb->asoc.refcnt, 1); @@ -1098,7 +1095,6 @@ sctp_shutdown(struct socket *so) } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_USRREQ + SCTP_LOC_6; sctp_abort_an_association(stcb->sctp_ep, stcb, - SCTP_RESPONSE_TO_USER_REQ, op_err, SCTP_SO_LOCKED); goto skip_unlock; } else { Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sat May 12 20:10:18 2012 (r235359) +++ head/sys/netinet/sctputil.c Sat May 12 20:11:35 2012 (r235360) @@ -1725,8 +1725,7 @@ sctp_timeout_handler(void *t) break; } SCTP_STAT_INCR(sctps_timoshutdownguard); - sctp_abort_an_association(inp, stcb, - SCTP_SHUTDOWN_GUARD_EXPIRES, NULL, SCTP_SO_NOT_LOCKED); + sctp_abort_an_association(inp, stcb, NULL, SCTP_SO_NOT_LOCKED); /* no need to unlock on tcb its gone */ goto out_decr; @@ -2593,7 +2592,7 @@ sctp_pad_lastmbuf(struct mbuf *m, int pa static void sctp_notify_assoc_change(uint16_t state, struct sctp_tcb *stcb, - uint16_t error, int so_locked + uint16_t error, struct sctp_abort_chunk *abort, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif @@ -2602,7 +2601,7 @@ sctp_notify_assoc_change(uint16_t state, struct mbuf *m_notify; struct sctp_assoc_change *sac; struct sctp_queued_to_read *control; - size_t len; + size_t notif_len, abort_len; unsigned int i; #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) @@ -2652,16 +2651,27 @@ sctp_notify_assoc_change(uint16_t state, /* event not enabled */ return; } - len = sizeof(struct sctp_assoc_change); + notif_len = sizeof(struct sctp_assoc_change); + if (abort != NULL) { + abort_len = htons(abort->ch.chunk_length); + } else { + abort_len = 0; + } if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { - len += SCTP_ASSOC_SUPPORTS_MAX; + notif_len += SCTP_ASSOC_SUPPORTS_MAX; + } else if ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC)) { + notif_len += abort_len; } - m_notify = sctp_get_mbuf_for_msg(len, 0, M_DONTWAIT, 1, MT_DATA); - if (m_notify == NULL) - /* no space left */ - return; - SCTP_BUF_LEN(m_notify) = 0; - + m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA); + if (m_notify == NULL) { + /* Retry with smaller value. */ + notif_len = sizeof(struct sctp_assoc_change); + m_notify = sctp_get_mbuf_for_msg(notif_len, 0, M_DONTWAIT, 1, MT_DATA); + if (m_notify == NULL) { + return; + } + } + SCTP_BUF_NEXT(m_notify) = NULL; sac = mtod(m_notify, struct sctp_assoc_change *); sac->sac_type = SCTP_ASSOC_CHANGE; sac->sac_flags = 0; @@ -2672,25 +2682,29 @@ sctp_notify_assoc_change(uint16_t state, sac->sac_outbound_streams = stcb->asoc.streamoutcnt; sac->sac_inbound_streams = stcb->asoc.streamincnt; sac->sac_assoc_id = sctp_get_associd(stcb); - if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { - i = 0; - if (stcb->asoc.peer_supports_prsctp) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_PR; - } - if (stcb->asoc.peer_supports_auth) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_AUTH; + if (notif_len > sizeof(struct sctp_assoc_change)) { + if ((state == SCTP_COMM_UP) || (state == SCTP_RESTART)) { + i = 0; + if (stcb->asoc.peer_supports_prsctp) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_PR; + } + if (stcb->asoc.peer_supports_auth) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_AUTH; + } + if (stcb->asoc.peer_supports_asconf) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_ASCONF; + } + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_MULTIBUF; + if (stcb->asoc.peer_supports_strreset) { + sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_RE_CONFIG; + } + sac->sac_length += i; + } else if ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC)) { + memcpy(sac->sac_info, abort, abort_len); + sac->sac_length += abort_len; } - if (stcb->asoc.peer_supports_asconf) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_ASCONF; - } - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_MULTIBUF; - if (stcb->asoc.peer_supports_strreset) { - sac->sac_info[i++] = SCTP_ASSOC_SUPPORTS_RE_CONFIG; - } - sac->sac_length += i; } SCTP_BUF_LEN(m_notify) = sac->sac_length; - SCTP_BUF_NEXT(m_notify) = NULL; control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination, 0, 0, stcb->asoc.context, 0, 0, 0, m_notify); @@ -3500,7 +3514,7 @@ sctp_ulp_notify(uint32_t notification, s switch (notification) { case SCTP_NOTIFY_ASSOC_UP: if (stcb->asoc.assoc_up_sent == 0) { - sctp_notify_assoc_change(SCTP_COMM_UP, stcb, error, so_locked); + sctp_notify_assoc_change(SCTP_COMM_UP, stcb, error, NULL, so_locked); stcb->asoc.assoc_up_sent = 1; } if (stcb->asoc.adaptation_needed && (stcb->asoc.adaptation_sent == 0)) { @@ -3512,7 +3526,7 @@ sctp_ulp_notify(uint32_t notification, s } break; case SCTP_NOTIFY_ASSOC_DOWN: - sctp_notify_assoc_change(SCTP_SHUTDOWN_COMP, stcb, error, so_locked); + sctp_notify_assoc_change(SCTP_SHUTDOWN_COMP, stcb, error, NULL, so_locked); break; case SCTP_NOTIFY_INTERFACE_DOWN: { @@ -3563,9 +3577,9 @@ sctp_ulp_notify(uint32_t notification, s case SCTP_NOTIFY_ASSOC_ABORTED: if ((stcb) && (((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_WAIT) || ((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_ECHOED))) { - sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, error, so_locked); + sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, error, data, so_locked); } else { - sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, so_locked); + sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, data, so_locked); } break; case SCTP_NOTIFY_PEER_OPENED_STREAM: @@ -3573,7 +3587,7 @@ sctp_ulp_notify(uint32_t notification, s case SCTP_NOTIFY_STREAM_OPENED_OK: break; case SCTP_NOTIFY_ASSOC_RESTART: - sctp_notify_assoc_change(SCTP_RESTART, stcb, error, so_locked); + sctp_notify_assoc_change(SCTP_RESTART, stcb, error, NULL, so_locked); if (stcb->asoc.peer_supports_auth == 0) { sctp_ulp_notify(SCTP_NOTIFY_NO_PEER_AUTH, stcb, 0, NULL, so_locked); @@ -3742,7 +3756,8 @@ sctp_report_all_outbound(struct sctp_tcb } void -sctp_abort_notification(struct sctp_tcb *stcb, int error, int so_locked +sctp_abort_notification(struct sctp_tcb *stcb, uint16_t error, + struct sctp_abort_chunk *abort, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif @@ -3763,7 +3778,7 @@ sctp_abort_notification(struct sctp_tcb } /* Tell them we lost the asoc */ sctp_report_all_outbound(stcb, 1, so_locked); - sctp_ulp_notify(SCTP_NOTIFY_ASSOC_ABORTED, stcb, error, NULL, so_locked); + sctp_ulp_notify(SCTP_NOTIFY_ASSOC_ABORTED, stcb, error, abort, so_locked); } void @@ -3782,7 +3797,7 @@ sctp_abort_association(struct sctp_inpcb if (stcb != NULL) { /* We have a TCB to abort, send notification too */ vtag = stcb->asoc.peer_vtag; - sctp_abort_notification(stcb, 0, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 0, NULL, SCTP_SO_NOT_LOCKED); /* get the assoc vrf id and table id */ vrf_id = stcb->asoc.vrf_id; stcb->asoc.state |= SCTP_STATE_WAS_ABORTED; @@ -3876,7 +3891,7 @@ none_in: void sctp_abort_an_association(struct sctp_inpcb *inp, struct sctp_tcb *stcb, - int error, struct mbuf *op_err, + struct mbuf *op_err, int so_locked #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED @@ -3904,8 +3919,9 @@ sctp_abort_an_association(struct sctp_in stcb->asoc.state |= SCTP_STATE_WAS_ABORTED; } /* notify the ulp */ - if ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) - sctp_abort_notification(stcb, error, so_locked); + if ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) { + sctp_abort_notification(stcb, 0, NULL, so_locked); + } /* notify the peer */ sctp_send_abort_tcb(stcb, op_err, so_locked); SCTP_STAT_INCR_COUNTER32(sctps_aborted); Modified: head/sys/netinet/sctputil.h ============================================================================== --- head/sys/netinet/sctputil.h Sat May 12 20:10:18 2012 (r235359) +++ head/sys/netinet/sctputil.h Sat May 12 20:11:35 2012 (r235360) @@ -179,7 +179,8 @@ sctp_report_all_outbound(struct sctp_tcb int sctp_expand_mapping_array(struct sctp_association *, uint32_t); void -sctp_abort_notification(struct sctp_tcb *, int, int +sctp_abort_notification(struct sctp_tcb *, uint16_t, + struct sctp_abort_chunk *, int #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED #endif @@ -193,7 +194,7 @@ sctp_abort_association(struct sctp_inpcb /* We choose to abort via user input */ void -sctp_abort_an_association(struct sctp_inpcb *, struct sctp_tcb *, int, +sctp_abort_an_association(struct sctp_inpcb *, struct sctp_tcb *, struct mbuf *, int #if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) SCTP_UNUSED Modified: head/sys/netinet6/sctp6_usrreq.c ============================================================================== --- head/sys/netinet6/sctp6_usrreq.c Sat May 12 20:10:18 2012 (r235359) +++ head/sys/netinet6/sctp6_usrreq.c Sat May 12 20:11:35 2012 (r235360) @@ -388,10 +388,8 @@ sctp6_notify(struct sctp_inpcb *inp, struct socket *so; #endif - /* protection */ - int reason; - + /* protection */ if ((inp == NULL) || (stcb == NULL) || (net == NULL) || (sh == NULL) || (to == NULL)) { if (stcb) @@ -441,8 +439,7 @@ sctp6_notify(struct sctp_inpcb *inp, * now is dead. In either case treat it like a OOTB abort * with no TCB */ - reason = SCTP_PEER_FAULTY; - sctp_abort_notification(stcb, reason, SCTP_SO_NOT_LOCKED); + sctp_abort_notification(stcb, 0, NULL, SCTP_SO_NOT_LOCKED); #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(inp); atomic_add_int(&stcb->asoc.refcnt, 1); From owner-svn-src-head@FreeBSD.ORG Sat May 12 20:23:31 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 346AD1065672; Sat, 12 May 2012 20:23:31 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 09C8A8FC12; Sat, 12 May 2012 20:23:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CKNUqD050409; Sat, 12 May 2012 20:23:30 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CKNUHs050406; Sat, 12 May 2012 20:23:30 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205122023.q4CKNUHs050406@svn.freebsd.org> From: Andriy Gapon Date: Sat, 12 May 2012 20:23: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: r235361 - head/sys/boot/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: Sat, 12 May 2012 20:23:31 -0000 Author: avg Date: Sat May 12 20:23:30 2012 New Revision: 235361 URL: http://svn.freebsd.org/changeset/base/235361 Log: zfs boot code: use %j and uintmax_t instead %ll and uint64_t in printfs This is to silence warnings that result from different definitions of uint64_t on different architectures, specifically i386 and sparc64. MFC after: 1 month Modified: head/sys/boot/zfs/zfs.c head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Sat May 12 20:11:35 2012 (r235360) +++ head/sys/boot/zfs/zfs.c Sat May 12 20:23:30 2012 (r235361) @@ -433,8 +433,8 @@ zfs_dev_open_spa(struct open_file *f, sp return (rv); } if (mount->objset.os_type != DMU_OST_ZFS) { - printf("Unexpected object set type %llu\n", - mount->objset.os_type); + printf("Unexpected object set type %ju\n", + (uintmax_t)mount->objset.os_type); free(mount); return (EIO); } Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Sat May 12 20:11:35 2012 (r235360) +++ head/sys/boot/zfs/zfsimpl.c Sat May 12 20:23:30 2012 (r235361) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); */ #include +#include #include "zfsimpl.h" #include "zfssubr.c" @@ -290,7 +291,7 @@ nvlist_print(const unsigned char *nvlist case DATA_TYPE_UINT64: { uint64_t val; xdr_uint64_t(&p, &val); - printf(" = 0x%llx\n", val); + printf(" = 0x%jx\n", (uintmax_t)val); break; } @@ -350,7 +351,7 @@ vdev_read_phys(vdev_t *vdev, const blkpt psize = size; } - /*printf("ZFS: reading %d bytes at 0x%llx to %p\n", psize, offset, buf);*/ + /*printf("ZFS: reading %d bytes at 0x%jx to %p\n", psize, (uintmax_t)offset, buf);*/ rc = vdev->v_phys_read(vdev, vdev->v_read_priv, offset, buf, psize); if (rc) return (rc); @@ -1375,7 +1376,7 @@ mzap_list(spa_t *spa, const dnode_phys_t for (i = 0; i < chunks; i++) { mze = &mz->mz_chunk[i]; if (mze->mze_name[0]) - //printf("%-32s 0x%llx\n", mze->mze_name, mze->mze_value); + //printf("%-32s 0x%jx\n", mze->mze_name, (uintmax_t)mze->mze_value); printf("%s\n", mze->mze_name); } @@ -1449,7 +1450,7 @@ fzap_list(spa_t *spa, const dnode_phys_t */ value = fzap_leaf_value(&zl, zc); - printf("%s 0x%llx\n", name, value); + printf("%s 0x%jx\n", name, (uintmax_t)value); } } @@ -1649,7 +1650,7 @@ zfs_rlookup(spa_t *spa, uint64_t objnum, *p = '\0'; if (objset_get_dnode(spa, &spa->spa_mos, objnum, &dataset)) { - printf("ZFS: can't find dataset %llu\n", objnum); + printf("ZFS: can't find dataset %ju\n", (uintmax_t)objnum); return (EIO); } ds = (dsl_dataset_phys_t *)&dataset.dn_bonus; @@ -1751,13 +1752,14 @@ zfs_mount_dataset(spa_t *spa, uint64_t o dsl_dataset_phys_t *ds; if (objset_get_dnode(spa, &spa->spa_mos, objnum, &dataset)) { - printf("ZFS: can't find dataset %llu\n", objnum); + printf("ZFS: can't find dataset %ju\n", (uintmax_t)objnum); return (EIO); } ds = (dsl_dataset_phys_t *) &dataset.dn_bonus; if (zio_read(spa, &ds->ds_bp, objset)) { - printf("ZFS: can't read object set for dataset %llu\n", objnum); + printf("ZFS: can't read object set for dataset %ju\n", + (uintmax_t)objnum); return (EIO); } @@ -1921,8 +1923,8 @@ zfs_lookup(const struct zfsmount *mount, spa = mount->spa; if (mount->objset.os_type != DMU_OST_ZFS) { - printf("ZFS: unexpected object set type %llu\n", - mount->objset.os_type); + printf("ZFS: unexpected object set type %ju\n", + (uintmax_t)mount->objset.os_type); return (EIO); } From owner-svn-src-head@FreeBSD.ORG Sat May 12 20:24:47 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 908FD106566C; Sat, 12 May 2012 20:24:47 +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 7C1528FC0C; Sat, 12 May 2012 20:24:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CKOl5d050478; Sat, 12 May 2012 20:24:47 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CKOl2a050476; Sat, 12 May 2012 20:24:47 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205122024.q4CKOl2a050476@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 12 May 2012 20:24: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: r235362 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 20:24:47 -0000 Author: kib Date: Sat May 12 20:24:46 2012 New Revision: 235362 URL: http://svn.freebsd.org/changeset/base/235362 Log: Assert that fictitious or unmanaged pages do not appear on active/inactive lists. Sponsored by: The FreeBSD Foundation Reviewed by: alc MFC after: 1 month Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Sat May 12 20:23:30 2012 (r235361) +++ head/sys/vm/vm_pageout.c Sat May 12 20:24:46 2012 (r235362) @@ -805,6 +805,11 @@ rescan0: if (m->flags & PG_MARKER) continue; + KASSERT((m->flags & PG_FICTITIOUS) == 0, + ("Fictitious page %p cannot be in inactive queue", m)); + KASSERT((m->oflags & VPO_UNMANAGED) == 0, + ("Unmanaged page %p cannot be in inactive queue", m)); + /* * Lock the page. */ @@ -1143,6 +1148,10 @@ unlock_and_continue: m = next; continue; } + KASSERT((m->flags & PG_FICTITIOUS) == 0, + ("Fictitious page %p cannot be in active queue", m)); + KASSERT((m->oflags & VPO_UNMANAGED) == 0, + ("Unmanaged page %p cannot be in active queue", m)); if (!vm_pageout_page_lock(m, &next)) { vm_page_unlock(m); m = next; From owner-svn-src-head@FreeBSD.ORG Sat May 12 20:27:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F180106566B; Sat, 12 May 2012 20:27:14 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A8288FC0C; Sat, 12 May 2012 20:27:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CKREmK050592; Sat, 12 May 2012 20:27:14 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CKREOu050589; Sat, 12 May 2012 20:27:14 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201205122027.q4CKREOu050589@svn.freebsd.org> From: Joel Dahl Date: Sat, 12 May 2012 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: r235363 - head/lib/libc/stdio X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 20:27:14 -0000 Author: joel (doc committer) Date: Sat May 12 20:27:13 2012 New Revision: 235363 URL: http://svn.freebsd.org/changeset/base/235363 Log: Minor mdoc nits. Modified: head/lib/libc/stdio/scanf.3 head/lib/libc/stdio/wscanf.3 Modified: head/lib/libc/stdio/scanf.3 ============================================================================== --- head/lib/libc/stdio/scanf.3 Sat May 12 20:24:46 2012 (r235362) +++ head/lib/libc/stdio/scanf.3 Sat May 12 20:27:13 2012 (r235363) @@ -370,10 +370,10 @@ The string is to be made up of character (or not in) a particular set; the set is defined by the characters between the open bracket -.Cm [ +.Cm \&[ character and a close bracket -.Cm ] +.Cm \&] character. The set .Em excludes Modified: head/lib/libc/stdio/wscanf.3 ============================================================================== --- head/lib/libc/stdio/wscanf.3 Sat May 12 20:24:46 2012 (r235362) +++ head/lib/libc/stdio/wscanf.3 Sat May 12 20:27:13 2012 (r235363) @@ -365,10 +365,10 @@ The string is to be made up of character (or not in) a particular set; the set is defined by the characters between the open bracket -.Cm [ +.Cm \&[ character and a close bracket -.Cm ] +.Cm \&] character. The set .Em excludes From owner-svn-src-head@FreeBSD.ORG Sat May 12 20:27:34 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DAC810657DC; Sat, 12 May 2012 20:27:34 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 16F718FC0C; Sat, 12 May 2012 20:27:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CKRXaF050651; Sat, 12 May 2012 20:27:33 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CKRXT4050642; Sat, 12 May 2012 20:27:33 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201205122027.q4CKRXT4050642@svn.freebsd.org> From: Andriy Gapon Date: Sat, 12 May 2012 20:27:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235364 - in head/sys/boot: . ofw/libofw sparc64/loader 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: Sat, 12 May 2012 20:27:34 -0000 Author: avg Date: Sat May 12 20:27:33 2012 New Revision: 235364 URL: http://svn.freebsd.org/changeset/base/235364 Log: sparc64/zfs boot: take advantage of new libzfsboot capabilities Also drop the now unneeded compatibility shims. Tested by: marius MFC after: 1 month Modified: head/sys/boot/Makefile.sparc64 head/sys/boot/ofw/libofw/Makefile head/sys/boot/ofw/libofw/devicename.c head/sys/boot/ofw/libofw/libofw.h head/sys/boot/sparc64/loader/Makefile head/sys/boot/sparc64/loader/main.c head/sys/boot/zfs/zfs.c head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/Makefile.sparc64 ============================================================================== --- head/sys/boot/Makefile.sparc64 Sat May 12 20:27:13 2012 (r235363) +++ head/sys/boot/Makefile.sparc64 Sat May 12 20:27:33 2012 (r235364) @@ -1,3 +1,4 @@ # $FreeBSD$ SUBDIR+= ofw +SUBDIR+= zfs Modified: head/sys/boot/ofw/libofw/Makefile ============================================================================== --- head/sys/boot/ofw/libofw/Makefile Sat May 12 20:27:13 2012 (r235363) +++ head/sys/boot/ofw/libofw/Makefile Sat May 12 20:27:33 2012 (r235364) @@ -6,6 +6,8 @@ INTERNALLIB= SRCS= devicename.c elf_freebsd.c ofw_console.c ofw_copy.c ofw_disk.c \ ofw_memory.c ofw_module.c ofw_net.c ofw_reboot.c \ ofw_time.c openfirm.c +.PATH: ${.CURDIR}/../../zfs +SRCS+= devicename_stubs.c CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ Modified: head/sys/boot/ofw/libofw/devicename.c ============================================================================== --- head/sys/boot/ofw/libofw/devicename.c Sat May 12 20:27:13 2012 (r235363) +++ head/sys/boot/ofw/libofw/devicename.c Sat May 12 20:27:33 2012 (r235364) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include "bootstrap.h" #include "libofw.h" +#include "../zfs/libzfs.h" static int ofw_parsedev(struct ofw_devdesc **, const char *, const char **); @@ -81,6 +82,7 @@ ofw_parsedev(struct ofw_devdesc **dev, c char *ep; char name[256]; char type[64]; + int err; int len; int i; @@ -114,14 +116,11 @@ found: idev->d_dev = dv; idev->d_type = dv->dv_type; if (idev->d_type == DEVT_ZFS) { - idev->d_unit = 0; - p = name + strlen(dv->dv_name); - if (*p && (*p != ':')) { - idev->d_unit = strtol(p, &ep, 0); - if (ep == p) { - free(idev); - return (EUNIT); - } + p = devspec + strlen(dv->dv_name); + err = zfs_parsedev((struct zfs_devdesc *)idev, p, path); + if (err != 0) { + free(idev); + return (err); } } Modified: head/sys/boot/ofw/libofw/libofw.h ============================================================================== --- head/sys/boot/ofw/libofw/libofw.h Sat May 12 20:27:13 2012 (r235363) +++ head/sys/boot/ofw/libofw/libofw.h Sat May 12 20:27:33 2012 (r235364) @@ -33,7 +33,13 @@ struct ofw_devdesc { int d_type; int d_unit; ihandle_t d_handle; - char d_path[256]; + union { + char d_path[256]; + struct { + uint64_t pool_guid; + uint64_t root_guid; + }; + }; }; extern int ofw_getdev(void **vdev, const char *devspec, const char **path); Modified: head/sys/boot/sparc64/loader/Makefile ============================================================================== --- head/sys/boot/sparc64/loader/Makefile Sat May 12 20:27:13 2012 (r235363) +++ head/sys/boot/sparc64/loader/Makefile Sat May 12 20:27:33 2012 (r235364) @@ -37,6 +37,7 @@ CFLAGS+= -DLOADER_CD9660_SUPPORT CFLAGS+= -DLOADER_ZFS_SUPPORT CFLAGS+= -I${.CURDIR}/../../zfs CFLAGS+= -I${.CURDIR}/../../../cddl/boot/zfs +LIBZFSBOOT= ${.OBJDIR}/../../zfs/libzfsboot.a .endif .if ${LOADER_GZIP_SUPPORT} == "yes" CFLAGS+= -DLOADER_GZIP_SUPPORT @@ -83,8 +84,8 @@ CFLAGS+= -I${.CURDIR}/../../ofw/libofw/ # where to get libstand from CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ -DPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND} -LDADD= ${LIBFICL} ${LIBOFW} -lstand +DPADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSTAND} +LDADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} -lstand vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version \ Modified: head/sys/boot/sparc64/loader/main.c ============================================================================== --- head/sys/boot/sparc64/loader/main.c Sat May 12 20:27:13 2012 (r235363) +++ head/sys/boot/sparc64/loader/main.c Sat May 12 20:27:33 2012 (r235364) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #ifdef LOADER_ZFS_SUPPORT #include +#include "../zfs/libzfs.h" #endif #include @@ -74,7 +75,7 @@ __FBSDID("$FreeBSD$"); #include "libofw.h" #include "dev_net.h" -#define MAXBDDEV 31 +#define MAXDEV 31 extern char bootprog_name[], bootprog_rev[], bootprog_date[], bootprog_maker[]; @@ -142,11 +143,6 @@ static vm_offset_t heapva; static phandle_t root; -#ifdef LOADER_ZFS_SUPPORT -static int sparc64_zfs_dev_init(void); -#include "zfs.c" -#endif - /* * Machine dependent structures that the machine independent * loader part uses. @@ -159,7 +155,7 @@ struct devsw *devsw[] = { &netdev, #endif #ifdef LOADER_ZFS_SUPPORT - &zfs_dev_compat, + &zfs_dev, #endif 0 }; @@ -733,39 +729,20 @@ tlb_init_sun4u(void) } #ifdef LOADER_ZFS_SUPPORT - -static int -sparc64_zfs_dev_init(void) +static void +sparc64_zfs_probe(void) { struct vtoc8 vtoc; - char devname[512]; - spa_t *spa; - vdev_t *vdev; + struct zfs_devdesc zfs_currdev; + char devname[32]; uint64_t guid; int fd, part, unit; - zfs_init(); - - guid = 0; /* Get the GUID of the ZFS pool on the boot device. */ - fd = open(getenv("currdev"), O_RDONLY); - if (fd != -1) { - if (vdev_probe(vdev_read, (void *)(uintptr_t) fd, &spa) == 0) - guid = spa->spa_guid; - close(fd); - } - - /* Clean up the environment to let ZFS work. */ - while ((vdev = STAILQ_FIRST(&zfs_vdevs)) != NULL) { - STAILQ_REMOVE_HEAD(&zfs_vdevs, v_alllink); - free(vdev); - } - while ((spa = STAILQ_FIRST(&zfs_pools)) != NULL) { - STAILQ_REMOVE_HEAD(&zfs_pools, spa_link); - free(spa); - } + guid = 0; + zfs_probe_dev(getenv("currdev"), &guid); - for (unit = 0; unit < MAXBDDEV; unit++) { + for (unit = 0; unit < MAXDEV; unit++) { /* Find freebsd-zfs slices in the VTOC. */ sprintf(devname, "disk%d:", unit); fd = open(devname, O_RDONLY); @@ -783,29 +760,23 @@ sparc64_zfs_dev_init(void) VTOC_TAG_FREEBSD_ZFS) continue; sprintf(devname, "disk%d:%c", unit, part + 'a'); - fd = open(devname, O_RDONLY); - if (fd == -1) + if (zfs_probe_dev(devname, NULL) == ENXIO) break; - - if (vdev_probe(vdev_read, (void*)(uintptr_t) fd, 0)) - close(fd); } } if (guid != 0) { - unit = zfs_guid_to_unit(guid); - if (unit >= 0) { - /* Update the environment for ZFS. */ - sprintf(devname, "zfs%d", unit); - env_setenv("currdev", EV_VOLATILE, devname, - ofw_setcurrdev, env_nounset); - env_setenv("loaddev", EV_VOLATILE, devname, - env_noset, env_nounset); - } + zfs_currdev.pool_guid = guid; + zfs_currdev.root_guid = 0; + zfs_currdev.d_dev = &zfs_dev; + zfs_currdev.d_type = zfs_currdev.d_dev->dv_type; + /* Update the environment for ZFS. */ + env_setenv("currdev", EV_VOLATILE, zfs_fmtdev(&zfs_currdev), + ofw_setcurrdev, env_nounset); + env_setenv("loaddev", EV_VOLATILE, zfs_fmtdev(&zfs_currdev), + env_noset, env_nounset); } - return (0); } - #endif /* LOADER_ZFS_SUPPORT */ int @@ -825,6 +796,9 @@ main(int (*openfirm)(void *)) archsw.arch_copyout = ofw_copyout; archsw.arch_readin = sparc64_readin; archsw.arch_autoload = sparc64_autoload; +#ifdef LOADER_ZFS_SUPPORT + archsw.arch_zfs_probe = sparc64_zfs_probe; +#endif if (init_heap() == (vm_offset_t)-1) OF_exit(); @@ -870,13 +844,6 @@ main(int (*openfirm)(void *)) env_setenv("loaddev", EV_VOLATILE, bootpath, env_noset, env_nounset); -#ifdef LOADER_ZFS_SUPPORT - /* - * Patch up ZFS. - */ - zfs_dev_compat.dv_init = sparc64_zfs_dev_init; -#endif - /* * Initialize devices. */ Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Sat May 12 20:27:13 2012 (r235363) +++ head/sys/boot/zfs/zfs.c Sat May 12 20:27:33 2012 (r235364) @@ -418,16 +418,26 @@ zfs_dev_print(int verbose) * Attempt to open the pool described by (dev) for use by (f). */ static int -zfs_dev_open_spa(struct open_file *f, spa_t *spa, uint64_t root_guid) +zfs_dev_open(struct open_file *f, ...) { + va_list args; + struct zfs_devdesc *dev; struct zfsmount *mount; + spa_t *spa; int rv; + va_start(args, f); + dev = va_arg(args, struct zfs_devdesc *); + va_end(args); + + spa = spa_find_by_guid(dev->pool_guid); + if (!spa) + return (ENXIO); rv = zfs_spa_init(spa); if (rv != 0) return (rv); mount = malloc(sizeof(*mount)); - rv = zfs_mount(spa, root_guid, mount); + rv = zfs_mount(spa, dev->root_guid, mount); if (rv != 0) { free(mount); return (rv); @@ -439,49 +449,6 @@ zfs_dev_open_spa(struct open_file *f, sp return (EIO); } f->f_devdata = mount; - return (0); -} - -static int -zfs_dev_open(struct open_file *f, ...) -{ - va_list args; - struct zfs_devdesc *dev; - spa_t *spa; - int rv; - - va_start(args, f); - dev = va_arg(args, struct zfs_devdesc *); - va_end(args); - - spa = spa_find_by_guid(dev->pool_guid); - if (!spa) - return (ENXIO); - rv = zfs_dev_open_spa(f, spa, dev->root_guid); - if (rv != 0) - return (rv); - free(dev); - return (0); -} - -static int -zfs_dev_open_compat(struct open_file *f, ...) -{ - va_list args; - struct devdesc *dev; - spa_t *spa; - int rv; - - va_start(args, f); - dev = va_arg(args, struct devdesc *); - va_end(args); - - spa = spa_find_by_unit(dev->d_unit); - if (!spa) - return (ENXIO); - rv = zfs_dev_open_spa(f, spa, 0); - if (rv != 0) - return (rv); free(dev); return (0); } @@ -514,18 +481,6 @@ struct devsw zfs_dev = { .dv_cleanup = NULL }; -struct devsw zfs_dev_compat = { - .dv_name = "zfs", - .dv_type = DEVT_ZFS, - .dv_init = zfs_dev_init, - .dv_strategy = zfs_dev_strategy, - .dv_open = zfs_dev_open_compat, - .dv_close = zfs_dev_close, - .dv_ioctl = noioctl, - .dv_print = zfs_dev_print, - .dv_cleanup = NULL -}; - int zfs_parsedev(struct zfs_devdesc *dev, const char *devspec, const char **path) { Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Sat May 12 20:27:13 2012 (r235363) +++ head/sys/boot/zfs/zfsimpl.c Sat May 12 20:27:33 2012 (r235364) @@ -646,38 +646,6 @@ spa_find_by_name(const char *name) return (0); } -#ifndef BOOT2 -static spa_t * -spa_find_by_unit(int unit) -{ - spa_t *spa; - - STAILQ_FOREACH(spa, &zfs_pools, spa_link) { - if (unit == 0) - return (spa); - unit--; - } - - return (0); -} - -static int -zfs_guid_to_unit(uint64_t guid) -{ - spa_t *spa; - int unit; - - unit = 0; - STAILQ_FOREACH(spa, &zfs_pools, spa_link) { - if (spa->spa_guid == guid) - return (unit); - unit++; - } - - return (-1); -} -#endif - static spa_t * spa_create(uint64_t guid) { From owner-svn-src-head@FreeBSD.ORG Sat May 12 20:27:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10F141065705; Sat, 12 May 2012 20:27:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F03228FC08; Sat, 12 May 2012 20:27:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CKRpLf050699; Sat, 12 May 2012 20:27:51 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CKRp1Q050697; Sat, 12 May 2012 20:27:51 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205122027.q4CKRp1Q050697@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 12 May 2012 20:27: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: r235365 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 20:27:52 -0000 Author: kib Date: Sat May 12 20:27:51 2012 New Revision: 235365 URL: http://svn.freebsd.org/changeset/base/235365 Log: Assert that the page passed to vm_page_putfake() is unmanaged. Sponsored by: The FreeBSD Foundation Reviewed by: alc MFC after: 1 month Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sat May 12 20:27:33 2012 (r235364) +++ head/sys/vm/vm_page.c Sat May 12 20:27:51 2012 (r235365) @@ -666,6 +666,7 @@ void vm_page_putfake(vm_page_t m) { + KASSERT((m->oflags & VPO_UNMANAGED) != 0, ("managed %p", m)); KASSERT((m->flags & PG_FICTITIOUS) != 0, ("vm_page_putfake: bad page %p", m)); uma_zfree(fakepg_zone, m); From owner-svn-src-head@FreeBSD.ORG Sat May 12 20:34:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63DD3106564A; Sat, 12 May 2012 20:34:23 +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 35D8B8FC0C; Sat, 12 May 2012 20:34:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CKYNVh050991; Sat, 12 May 2012 20:34:23 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CKYMB9050988; Sat, 12 May 2012 20:34:22 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205122034.q4CKYMB9050988@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 12 May 2012 20:34: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: r235366 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 20:34:23 -0000 Author: kib Date: Sat May 12 20:34:22 2012 New Revision: 235366 URL: http://svn.freebsd.org/changeset/base/235366 Log: Split the code from vm_page_getfake() to initialize the fake page struct vm_page into new interface vm_page_initfake(). Handle the case of fake page re-initialization with changed memattr. Sponsored by: The FreeBSD Foundation Reviewed by: alc MFC after: 1 month Modified: head/sys/vm/vm_page.c head/sys/vm/vm_page.h Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sat May 12 20:27:51 2012 (r235365) +++ head/sys/vm/vm_page.c Sat May 12 20:34:22 2012 (r235366) @@ -646,6 +646,22 @@ vm_page_getfake(vm_paddr_t paddr, vm_mem vm_page_t m; m = uma_zalloc(fakepg_zone, M_WAITOK | M_ZERO); + vm_page_initfake(m, paddr, memattr); + return (m); +} + +void +vm_page_initfake(vm_page_t m, vm_paddr_t paddr, vm_memattr_t memattr) +{ + + if ((m->flags & PG_FICTITIOUS) != 0) { + /* + * The page's memattr might have changed since the + * previous initialization. Update the pmap to the + * new memattr. + */ + goto memattr; + } m->phys_addr = paddr; m->queue = PQ_NONE; /* Fictitious pages don't use "segind". */ @@ -653,8 +669,8 @@ vm_page_getfake(vm_paddr_t paddr, vm_mem /* Fictitious pages don't use "order" or "pool". */ m->oflags = VPO_BUSY | VPO_UNMANAGED; m->wire_count = 1; +memattr: pmap_page_set_memattr(m, memattr); - return (m); } /* Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Sat May 12 20:27:51 2012 (r235365) +++ head/sys/vm/vm_page.h Sat May 12 20:34:22 2012 (r235366) @@ -391,6 +391,7 @@ void vm_page_dontneed(vm_page_t); void vm_page_deactivate (vm_page_t); vm_page_t vm_page_find_least(vm_object_t, vm_pindex_t); vm_page_t vm_page_getfake(vm_paddr_t paddr, vm_memattr_t memattr); +void vm_page_initfake(vm_page_t m, vm_paddr_t paddr, vm_memattr_t memattr); void vm_page_insert (vm_page_t, vm_object_t, vm_pindex_t); boolean_t vm_page_is_cached(vm_object_t object, vm_pindex_t pindex); vm_page_t vm_page_lookup (vm_object_t, vm_pindex_t); From owner-svn-src-head@FreeBSD.ORG Sat May 12 20:36:13 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3E0291065670; Sat, 12 May 2012 20:36:13 +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 293178FC14; Sat, 12 May 2012 20:36:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CKaDj4051087; Sat, 12 May 2012 20:36:13 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CKaCpc051085; Sat, 12 May 2012 20:36:12 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201205122036.q4CKaCpc051085@svn.freebsd.org> From: Adrian Chadd Date: Sat, 12 May 2012 20:36: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: r235367 - head/sys/dev/etherswitch/arswitch X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 20:36:13 -0000 Author: adrian Date: Sat May 12 20:36:12 2012 New Revision: 235367 URL: http://svn.freebsd.org/changeset/base/235367 Log: * Add in the AR7240 global control field for setting the maximum frame size for the AR7240. * Include SM/MS macros, thanks to ath_hal(4). * This field is for normal packets, VLAN and other headers are added to this by the switch device. * Set the MTU to 1536, to match what is done in Linux. Use the SM macro to write this field. Obtained from: Atheros (AR7240 datasheet), Linux OpenWRT (MTU default) Modified: head/sys/dev/etherswitch/arswitch/arswitchreg.h Modified: head/sys/dev/etherswitch/arswitch/arswitchreg.h ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitchreg.h Sat May 12 20:34:22 2012 (r235366) +++ head/sys/dev/etherswitch/arswitch/arswitchreg.h Sat May 12 20:36:12 2012 (r235367) @@ -29,6 +29,15 @@ #ifndef __AR8X16_SWITCHREG_H__ #define __AR8X16_SWITCHREG_H__ +/* XXX doesn't belong here; stolen shamelessly from ath_hal/ah_internal.h */ +/* + * Register manipulation macros that expect bit field defines + * to follow the convention that an _S suffix is appended for + * a shift count, while the field mask has no suffix. + */ +#define SM(_v, _f) (((_v) << _f##_S) & (_f)) +#define MS(_v, _f) (((_v) & (_f)) >> _f##_S) + /* Atheros specific MII registers */ #define MII_ATH_DBG_ADDR 0x1d #define MII_ATH_DBG_DATA 0x1e @@ -77,8 +86,13 @@ #define AR8X16_REG_GLOBAL_CTRL 0x0030 #define AR8216_GLOBAL_CTRL_MTU_MASK 0x00000fff +#define AR8216_GLOBAL_CTRL_MTU_MASK_S 0 #define AR8316_GLOBAL_CTRL_MTU_MASK 0x00007fff +#define AR8316_GLOBAL_CTRL_MTU_MASK_S 0 #define AR8236_GLOBAL_CTRL_MTU_MASK 0x00007fff +#define AR8236_GLOBAL_CTRL_MTU_MASK_S 0 +#define AR7240_GLOBAL_CTRL_MTU_MASK 0x00003fff +#define AR7240_GLOBAL_CTRL_MTU_MASK_S 0 #define AR8X16_REG_VLAN_CTRL 0x0040 #define AR8X16_VLAN_OP 0x00000007 From owner-svn-src-head@FreeBSD.ORG Sat May 12 20:39:42 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 189581065675; Sat, 12 May 2012 20:39:42 +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 044C68FC20; Sat, 12 May 2012 20:39:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CKdfpF051327; Sat, 12 May 2012 20:39:41 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CKdfQS051325; Sat, 12 May 2012 20:39:41 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201205122039.q4CKdfQS051325@svn.freebsd.org> From: Adrian Chadd Date: Sat, 12 May 2012 20:39: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: r235369 - head/sys/dev/etherswitch/arswitch X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 20:39:42 -0000 Author: adrian Date: Sat May 12 20:39:41 2012 New Revision: 235369 URL: http://svn.freebsd.org/changeset/base/235369 Log: Document what the flood register setting does. Modified: head/sys/dev/etherswitch/arswitch/arswitch_8316.c Modified: head/sys/dev/etherswitch/arswitch/arswitch_8316.c ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitch_8316.c Sat May 12 20:38:18 2012 (r235368) +++ head/sys/dev/etherswitch/arswitch/arswitch_8316.c Sat May 12 20:39:41 2012 (r235369) @@ -128,7 +128,14 @@ ar8316_hw_global_setup(struct arswitch_s { arswitch_writereg(sc->sc_dev, 0x38, 0xc000050e); - arswitch_writereg(sc->sc_dev, AR8X16_REG_FLOOD_MASK, 0x003f003f); + + /* + * Flood address table misses to all ports, and enable forwarding of + * broadcasts to the cpu port. + */ + arswitch_writereg(sc->sc_dev, AR8X16_REG_FLOOD_MASK, + AR8X16_FLOOD_MASK_BCAST_TO_CPU | 0x003f003f); + arswitch_modifyreg(sc->sc_dev, AR8X16_REG_GLOBAL_CTRL, AR8316_GLOBAL_CTRL_MTU_MASK, 9018 + 8 + 2); From owner-svn-src-head@FreeBSD.ORG Sat May 12 20:40:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 833A61065677; Sat, 12 May 2012 20:40:14 +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 6843E8FC0A; Sat, 12 May 2012 20:40:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CKeEaf051391; Sat, 12 May 2012 20:40:14 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CKeEjI051389; Sat, 12 May 2012 20:40:14 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201205122040.q4CKeEjI051389@svn.freebsd.org> From: Adrian Chadd Date: Sat, 12 May 2012 20:40: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: r235370 - head/sys/dev/etherswitch/arswitch X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 20:40:14 -0000 Author: adrian Date: Sat May 12 20:40:13 2012 New Revision: 235370 URL: http://svn.freebsd.org/changeset/base/235370 Log: .. oops, include setting the MTU. Modified: head/sys/dev/etherswitch/arswitch/arswitch_7240.c Modified: head/sys/dev/etherswitch/arswitch/arswitch_7240.c ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitch_7240.c Sat May 12 20:39:41 2012 (r235369) +++ head/sys/dev/etherswitch/arswitch/arswitch_7240.c Sat May 12 20:40:13 2012 (r235370) @@ -98,7 +98,10 @@ ar7240_hw_global_setup(struct arswitch_s /* Setup TAG priority mapping */ arswitch_writereg(sc->sc_dev, AR7240_REG_TAG_PRIORITY, 0xfa50); - /* XXX MTU */ + /* MTU */ + arswitch_modifyreg(sc->sc_dev, AR8X16_REG_GLOBAL_CTRL, + AR7240_GLOBAL_CTRL_MTU_MASK, + SM(1536, AR7240_GLOBAL_CTRL_MTU_MASK)); /* XXX Service Tag */ From owner-svn-src-head@FreeBSD.ORG Sat May 12 20:41:40 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3B98106566B; Sat, 12 May 2012 20:41:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B4FF78FC17; Sat, 12 May 2012 20:41:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CKfe1K051468; Sat, 12 May 2012 20:41:40 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CKfeYI051463; Sat, 12 May 2012 20:41:40 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205122041.q4CKfeYI051463@svn.freebsd.org> From: Glen Barber Date: Sat, 12 May 2012 20:41: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: r235371 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 20:41:41 -0000 Author: gjb (doc committer) Date: Sat May 12 20:41:40 2012 New Revision: 235371 URL: http://svn.freebsd.org/changeset/base/235371 Log: Fix mdoc(7) markup. Modified: head/share/man/man9/DECLARE_GEOM_CLASS.9 head/share/man/man9/namei.9 head/share/man/man9/usbdi.9 Modified: head/share/man/man9/DECLARE_GEOM_CLASS.9 ============================================================================== --- head/share/man/man9/DECLARE_GEOM_CLASS.9 Sat May 12 20:40:13 2012 (r235370) +++ head/share/man/man9/DECLARE_GEOM_CLASS.9 Sat May 12 20:41:40 2012 (r235371) @@ -49,7 +49,7 @@ modules GEOM classes and it is the only The arguments to .Fn DECLARE_GEOM_CLASS are: -.Bl -tag -offset indent +.Bl -tag -offset indent -width Fa .It Fa class The .Vt g_class Modified: head/share/man/man9/namei.9 ============================================================================== --- head/share/man/man9/namei.9 Sat May 12 20:40:13 2012 (r235370) +++ head/share/man/man9/namei.9 Sat May 12 20:41:40 2012 (r235371) @@ -316,7 +316,7 @@ If successful, .Fn namei will return 0, otherwise it will return an error. .Sh FILES -.Bl -tag +.Bl -tag -width Pa .It Pa src/sys/kern/vfs_lookup.c .El .Sh ERRORS Modified: head/share/man/man9/usbdi.9 ============================================================================== --- head/share/man/man9/usbdi.9 Sat May 12 20:40:13 2012 (r235370) +++ head/share/man/man9/usbdi.9 Sat May 12 20:41:40 2012 (r235371) @@ -435,7 +435,7 @@ The value of this field is given in mill device speed. . Depending on the endpoint type, this field has different meaning: -.Bl -tag +.Bl -tag -width "UE_ISOCHRONOUS" .It UE_INTERRUPT "0" use the default interrupt interval based on endpoint descriptor. "Else" use the given value for polling rate. @@ -461,7 +461,7 @@ timeout of 250ms will be used. .Fa frames field sets the maximum number of frames. If zero is specified it will yield the following results: -.Bl -tag +.Bl -tag -width "UE_INTERRUPT" .It UE_BULK xfer->nframes = 1; .It UE_INTERRUPT @@ -487,7 +487,7 @@ be used when setting up the given USB tr .Fa flags field has type "struct usb_xfer_flags" and allows one to set initial flags an USB transfer. Valid flags are: -.Bl -tag +.Bl -tag -width "force_short_xfer" .It force_short_xfer This flag forces the last transmitted USB packet to be short. A short packet has a length of less than "xfer->max_packet_size", which @@ -507,7 +507,7 @@ This flag causes a failing USB transfer queue except in the case of "xfer->error" equal to "USB_ERR_CANCELLED". No other USB transfers in the affected PIPE queue will be started until either: -.Bl -tag +.Bl -tag -width "1" .It 1 The failing USB transfer is stopped using "usbd_transfer_stop()". .It 2 @@ -574,7 +574,7 @@ flag can not be changed during operation . . .It stall_pipe -.Bl -tag +.Bl -tag -width "Device Side Mode" .It Device Side Mode Setting this flag will cause STALL pids to be sent to the endpoint belonging to this transfer before the transfer is started. From owner-svn-src-head@FreeBSD.ORG Sat May 12 20:42:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BDB81065672; Sat, 12 May 2012 20:42:57 +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 4798C8FC1A; Sat, 12 May 2012 20:42:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CKgvfP051547; Sat, 12 May 2012 20:42:57 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CKgvWJ051542; Sat, 12 May 2012 20:42:57 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205122042.q4CKgvWJ051542@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 12 May 2012 20:42: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: r235372 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 20:42:57 -0000 Author: kib Date: Sat May 12 20:42:56 2012 New Revision: 235372 URL: http://svn.freebsd.org/changeset/base/235372 Log: Add a facility to register a range of physical addresses to be used for allocation of fictitious pages, for which PHYS_TO_VM_PAGE() returns proper fictitious vm_page_t. The range should be de-registered after consumer stopped using it. De-inline the PHYS_TO_VM_PAGE() since it now carries code to iterate over registered ranges. A hash container might be developed instead of range registration interface, and fake pages could be put automatically into the hash, were PHYS_TO_VM_PAGE() could look them up later. This should be considered before the MFC of the commit is done. Sponsored by: The FreeBSD Foundation Reviewed by: alc MFC after: 1 month Modified: head/sys/vm/vm_page.c head/sys/vm/vm_page.h head/sys/vm/vm_phys.c head/sys/vm/vm_phys.h Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sat May 12 20:41:40 2012 (r235371) +++ head/sys/vm/vm_page.c Sat May 12 20:42:56 2012 (r235372) @@ -633,6 +633,30 @@ vm_page_unhold_pages(vm_page_t *ma, int mtx_unlock(mtx); } +vm_page_t +PHYS_TO_VM_PAGE(vm_paddr_t pa) +{ + vm_page_t m; + +#ifdef VM_PHYSSEG_SPARSE + m = vm_phys_paddr_to_vm_page(pa); + if (m == NULL) + m = vm_phys_fictitious_to_vm_page(pa); + return (m); +#elif defined(VM_PHYSSEG_DENSE) + long pi; + + pi = atop(pa); + if (pi >= first_page && pi < vm_page_array_size) { + m = &vm_page_array[pi - first_page]; + return (m); + } + return (vm_phys_fictitious_to_vm_page(pa)); +#else +#error "Either VM_PHYSSEG_DENSE or VM_PHYSSEG_SPARSE must be defined." +#endif +} + /* * vm_page_getfake: * Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Sat May 12 20:41:40 2012 (r235371) +++ head/sys/vm/vm_page.h Sat May 12 20:42:56 2012 (r235372) @@ -321,19 +321,7 @@ extern long first_page; /* first physi vm_page_t vm_phys_paddr_to_vm_page(vm_paddr_t pa); -static __inline vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa); - -static __inline vm_page_t -PHYS_TO_VM_PAGE(vm_paddr_t pa) -{ -#ifdef VM_PHYSSEG_SPARSE - return (vm_phys_paddr_to_vm_page(pa)); -#elif defined(VM_PHYSSEG_DENSE) - return (&vm_page_array[atop(pa) - first_page]); -#else -#error "Either VM_PHYSSEG_DENSE or VM_PHYSSEG_SPARSE must be defined." -#endif -} +vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa); extern struct vpglocks vm_page_queue_lock; Modified: head/sys/vm/vm_phys.c ============================================================================== --- head/sys/vm/vm_phys.c Sat May 12 20:41:40 2012 (r235371) +++ head/sys/vm/vm_phys.c Sat May 12 20:42:56 2012 (r235372) @@ -87,6 +87,15 @@ static struct vm_phys_seg vm_phys_segs[V static int vm_phys_nsegs; +#define VM_PHYS_FICTITIOUS_NSEGS 8 +static struct vm_phys_fictitious_seg { + vm_paddr_t start; + vm_paddr_t end; + vm_page_t first_page; +} vm_phys_fictitious_segs[VM_PHYS_FICTITIOUS_NSEGS]; +static struct mtx vm_phys_fictitious_reg_mtx; +MALLOC_DEFINE(M_FICT_PAGES, "", ""); + static struct vm_freelist vm_phys_free_queues[VM_RAW_NFREELIST][VM_NFREEPOOL][VM_NFREEORDER]; static struct vm_freelist @@ -366,6 +375,8 @@ vm_phys_init(void) for (flind = 0; flind < vm_nfreelists; flind++) vm_phys_lookup_lists[0][flind] = &vm_phys_free_queues[flind]; #endif + + mtx_init(&vm_phys_fictitious_reg_mtx, "vmfctr", NULL, MTX_DEF); } /* @@ -510,6 +521,112 @@ vm_phys_paddr_to_vm_page(vm_paddr_t pa) return (NULL); } +vm_page_t +vm_phys_fictitious_to_vm_page(vm_paddr_t pa) +{ + struct vm_phys_fictitious_seg *seg; + vm_page_t m; + int segind; + + m = NULL; + for (segind = 0; segind < VM_PHYS_FICTITIOUS_NSEGS; segind++) { + seg = &vm_phys_fictitious_segs[segind]; + if (pa >= seg->start && pa < seg->end) { + m = &seg->first_page[atop(pa - seg->start)]; + KASSERT((m->flags & PG_FICTITIOUS) != 0, + ("%p not fictitious", m)); + break; + } + } + return (m); +} + +int +vm_phys_fictitious_reg_range(vm_paddr_t start, vm_paddr_t end, + vm_memattr_t memattr) +{ + struct vm_phys_fictitious_seg *seg; + vm_page_t fp; + long i, page_count; + int segind; +#ifdef VM_PHYSSEG_DENSE + long pi; + boolean_t malloced; +#endif + + page_count = (end - start) / PAGE_SIZE; + +#ifdef VM_PHYSSEG_DENSE + pi = atop(start); + if (pi >= first_page && atop(end) < vm_page_array_size) { + fp = &vm_page_array[pi - first_page]; + malloced = FALSE; + } else +#endif + { + fp = malloc(page_count * sizeof(struct vm_page), M_FICT_PAGES, + M_WAITOK | M_ZERO); +#ifdef VM_PHYSSEG_DENSE + malloced = TRUE; +#endif + } + for (i = 0; i < page_count; i++) { + vm_page_initfake(&fp[i], start + PAGE_SIZE * i, memattr); + pmap_page_init(&fp[i]); + fp[i].oflags &= ~(VPO_BUSY | VPO_UNMANAGED); + } + mtx_lock(&vm_phys_fictitious_reg_mtx); + for (segind = 0; segind < VM_PHYS_FICTITIOUS_NSEGS; segind++) { + seg = &vm_phys_fictitious_segs[segind]; + if (seg->start == 0 && seg->end == 0) { + seg->start = start; + seg->end = end; + seg->first_page = fp; + mtx_unlock(&vm_phys_fictitious_reg_mtx); + return (0); + } + } + mtx_unlock(&vm_phys_fictitious_reg_mtx); +#ifdef VM_PHYSSEG_DENSE + if (malloced) +#endif + free(fp, M_FICT_PAGES); + return (EBUSY); +} + +void +vm_phys_fictitious_unreg_range(vm_paddr_t start, vm_paddr_t end) +{ + struct vm_phys_fictitious_seg *seg; + vm_page_t fp; + int segind; +#ifdef VM_PHYSSEG_DENSE + long pi; +#endif + +#ifdef VM_PHYSSEG_DENSE + pi = atop(start); +#endif + + mtx_lock(&vm_phys_fictitious_reg_mtx); + for (segind = 0; segind < VM_PHYS_FICTITIOUS_NSEGS; segind++) { + seg = &vm_phys_fictitious_segs[segind]; + if (seg->start == start && seg->end == end) { + seg->start = seg->end = 0; + fp = seg->first_page; + seg->first_page = NULL; + mtx_unlock(&vm_phys_fictitious_reg_mtx); +#ifdef VM_PHYSSEG_DENSE + if (pi < first_page || atop(end) >= vm_page_array_size) +#endif + free(fp, M_FICT_PAGES); + return; + } + } + mtx_unlock(&vm_phys_fictitious_reg_mtx); + KASSERT(0, ("Unregistering not registered fictitious range")); +} + /* * Find the segment containing the given physical address. */ Modified: head/sys/vm/vm_phys.h ============================================================================== --- head/sys/vm/vm_phys.h Sat May 12 20:41:40 2012 (r235371) +++ head/sys/vm/vm_phys.h Sat May 12 20:42:56 2012 (r235372) @@ -57,6 +57,10 @@ vm_page_t vm_phys_alloc_contig(u_long np u_long alignment, vm_paddr_t boundary); vm_page_t vm_phys_alloc_freelist_pages(int flind, int pool, int order); vm_page_t vm_phys_alloc_pages(int pool, int order); +int vm_phys_fictitious_reg_range(vm_paddr_t start, vm_paddr_t end, + vm_memattr_t memattr); +void vm_phys_fictitious_unreg_range(vm_paddr_t start, vm_paddr_t end); +vm_page_t vm_phys_fictitious_to_vm_page(vm_paddr_t pa); void vm_phys_free_contig(vm_page_t m, u_long npages); void vm_phys_free_pages(vm_page_t m, int order); void vm_phys_init(void); From owner-svn-src-head@FreeBSD.ORG Sat May 12 20:46:19 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E6D741065672; Sat, 12 May 2012 20:46:19 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D20C28FC1B; Sat, 12 May 2012 20:46:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CKkJFC051700; Sat, 12 May 2012 20:46:19 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CKkJWD051697; Sat, 12 May 2012 20:46:19 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205122046.q4CKkJWD051697@svn.freebsd.org> From: Glen Barber Date: Sat, 12 May 2012 20:46: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: r235373 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 20:46:20 -0000 Author: gjb (doc committer) Date: Sat May 12 20:46:19 2012 New Revision: 235373 URL: http://svn.freebsd.org/changeset/base/235373 Log: mdoc(7) markup cleanup. Modified: head/share/man/man9/eventtimers.9 head/share/man/man9/fail.9 Modified: head/share/man/man9/eventtimers.9 ============================================================================== --- head/share/man/man9/eventtimers.9 Sat May 12 20:42:56 2012 (r235372) +++ head/share/man/man9/eventtimers.9 Sat May 12 20:46:19 2012 (r235373) @@ -86,7 +86,7 @@ struct eventtimer { Event timers are responsible for generating interrupts at specified time or periodically, to run different time-based events. Subsystem consists of three main parts: -.Bl -tag +.Bl -tag -width "Consumers" .It Drivers Manage hardware to generate requested time events. .It Consumers @@ -107,7 +107,7 @@ Driver API is built around eventtimer st To register its functionality driver allocates that structure and calls .Fn et_register . Driver should fill following fields there: -.Bl -tag +.Bl -tag -width Va .It Va et_name Unique name of the event timer for management purposes. .It Va et_flags Modified: head/share/man/man9/fail.9 ============================================================================== --- head/share/man/man9/fail.9 Sat May 12 20:42:56 2012 (r235372) +++ head/share/man/man9/fail.9 Sat May 12 20:46:19 2012 (r235373) @@ -166,7 +166,7 @@ A pid can optionally be specified. The fail point term is only executed when invoked by a process with a matching p_pid. .Sh EXAMPLES -.Bl -tag +.Bl -tag -width Sy .It Sy sysctl debug.fail_point.foobar="2.1%return(5)" 21/1000ths of the time, execute .Fa code From owner-svn-src-head@FreeBSD.ORG Sat May 12 20:49:59 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8D28E1065679; Sat, 12 May 2012 20:49:59 +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 6D5068FC26; Sat, 12 May 2012 20:49:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CKnxNd051887; Sat, 12 May 2012 20:49:59 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CKnx67051882; Sat, 12 May 2012 20:49:59 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205122049.q4CKnx67051882@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 12 May 2012 20:49: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: r235375 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 20:49:59 -0000 Author: kib Date: Sat May 12 20:49:58 2012 New Revision: 235375 URL: http://svn.freebsd.org/changeset/base/235375 Log: Add new pager type, OBJT_MGTDEVICE. It provides the device pager which carries fictitous managed pages. In particular, the consumers of the new object type can remove all mappings of the device page with pmap_remove_all(). The range of physical addresses used for fake page allocation shall be registered with vm_phys_fictitious_reg_range() interface to allow the PHYS_TO_VM_PAGE() to work in pmap. Most likely, only i386 and amd64 pmaps can handle fictitious managed pages right now. Sponsored by: The FreeBSD Foundation Reviewed by: alc MFC after: 1 month Modified: head/sys/vm/device_pager.c head/sys/vm/vm.h head/sys/vm/vm_pager.c head/sys/vm/vm_pager.h Modified: head/sys/vm/device_pager.c ============================================================================== --- head/sys/vm/device_pager.c Sat May 12 20:49:02 2012 (r235374) +++ head/sys/vm/device_pager.c Sat May 12 20:49:58 2012 (r235375) @@ -61,6 +61,7 @@ static void dev_pager_putpages(vm_object boolean_t, int *); static boolean_t dev_pager_haspage(vm_object_t, vm_pindex_t, int *, int *); +static void dev_pager_free_page(vm_object_t object, vm_page_t m); /* list of device pager objects */ static struct pagerlst dev_pager_object_list; @@ -76,6 +77,14 @@ struct pagerops devicepagerops = { .pgo_haspage = dev_pager_haspage, }; +struct pagerops mgtdevicepagerops = { + .pgo_alloc = dev_pager_alloc, + .pgo_dealloc = dev_pager_dealloc, + .pgo_getpages = dev_pager_getpages, + .pgo_putpages = dev_pager_putpages, + .pgo_haspage = dev_pager_haspage, +}; + static int old_dev_pager_ctor(void *handle, vm_ooffset_t size, vm_prot_t prot, vm_ooffset_t foff, struct ucred *cred, u_short *color); static void old_dev_pager_dtor(void *handle); @@ -115,7 +124,7 @@ cdev_pager_allocate(void *handle, enum o vm_pindex_t pindex; u_short color; - if (tp != OBJT_DEVICE) + if (tp != OBJT_DEVICE && tp != OBJT_MGTDEVICE) return (NULL); /* @@ -196,6 +205,24 @@ cdev_pager_free_page(vm_object_t object, { VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); + if (object->type == OBJT_MGTDEVICE) { + KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("unmanaged %p", m)); + pmap_remove_all(m); + vm_page_lock(m); + vm_page_remove(m); + vm_page_unlock(m); + } else if (object->type == OBJT_DEVICE) + dev_pager_free_page(object, m); +} + +static void +dev_pager_free_page(vm_object_t object, vm_page_t m) +{ + + VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); + KASSERT((object->type == OBJT_DEVICE && + (m->oflags & VPO_UNMANAGED) != 0), + ("Managed device or page obj %p m %p", object, m)); TAILQ_REMOVE(&object->un_pager.devp.devp_pglist, m, pageq); vm_page_putfake(m); } @@ -213,11 +240,15 @@ dev_pager_dealloc(object) TAILQ_REMOVE(&dev_pager_object_list, object, pager_object_list); mtx_unlock(&dev_pager_mtx); VM_OBJECT_LOCK(object); - /* - * Free up our fake pages. - */ - while ((m = TAILQ_FIRST(&object->un_pager.devp.devp_pglist)) != NULL) - cdev_pager_free_page(object, m); + + if (object->type == OBJT_DEVICE) { + /* + * Free up our fake pages. + */ + while ((m = TAILQ_FIRST(&object->un_pager.devp.devp_pglist)) + != NULL) + dev_pager_free_page(object, m); + } } static int @@ -240,8 +271,15 @@ dev_pager_getpages(vm_object_t object, v } if (error == VM_PAGER_OK) { - TAILQ_INSERT_TAIL(&object->un_pager.devp.devp_pglist, - ma[reqpage], pageq); + KASSERT((object->type == OBJT_DEVICE && + (ma[reqpage]->oflags & VPO_UNMANAGED) != 0) || + (object->type == OBJT_MGTDEVICE && + (ma[reqpage]->oflags & VPO_UNMANAGED) == 0), + ("Wrong page type %p %p", ma[reqpage], object)); + if (object->type == OBJT_DEVICE) { + TAILQ_INSERT_TAIL(&object->un_pager.devp.devp_pglist, + ma[reqpage], pageq); + } } return (error); Modified: head/sys/vm/vm.h ============================================================================== --- head/sys/vm/vm.h Sat May 12 20:49:02 2012 (r235374) +++ head/sys/vm/vm.h Sat May 12 20:49:58 2012 (r235375) @@ -83,7 +83,7 @@ typedef u_char vm_prot_t; /* protection #define VM_PROT_DEFAULT VM_PROT_ALL enum obj_type { OBJT_DEFAULT, OBJT_SWAP, OBJT_VNODE, OBJT_DEVICE, OBJT_PHYS, - OBJT_DEAD, OBJT_SG }; + OBJT_DEAD, OBJT_SG, OBJT_MGTDEVICE }; typedef u_char objtype_t; union vm_map_object; Modified: head/sys/vm/vm_pager.c ============================================================================== --- head/sys/vm/vm_pager.c Sat May 12 20:49:02 2012 (r235374) +++ head/sys/vm/vm_pager.c Sat May 12 20:49:58 2012 (r235375) @@ -159,7 +159,8 @@ struct pagerops *pagertab[] = { &devicepagerops, /* OBJT_DEVICE */ &physpagerops, /* OBJT_PHYS */ &deadpagerops, /* OBJT_DEAD */ - &sgpagerops /* OBJT_SG */ + &sgpagerops, /* OBJT_SG */ + &mgtdevicepagerops, /* OBJT_MGTDEVICE */ }; static const int npagers = sizeof(pagertab) / sizeof(pagertab[0]); Modified: head/sys/vm/vm_pager.h ============================================================================== --- head/sys/vm/vm_pager.h Sat May 12 20:49:02 2012 (r235374) +++ head/sys/vm/vm_pager.h Sat May 12 20:49:58 2012 (r235375) @@ -71,6 +71,7 @@ extern struct pagerops vnodepagerops; extern struct pagerops devicepagerops; extern struct pagerops physpagerops; extern struct pagerops sgpagerops; +extern struct pagerops mgtdevicepagerops; /* * get/put return values From owner-svn-src-head@FreeBSD.ORG Sat May 12 20:53:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C432F1065675; Sat, 12 May 2012 20:53:00 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B0B8B8FC14; Sat, 12 May 2012 20:53:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CKr0X2052032; Sat, 12 May 2012 20:53:00 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CKr0KB052030; Sat, 12 May 2012 20:53:00 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205122053.q4CKr0KB052030@svn.freebsd.org> From: Glen Barber Date: Sat, 12 May 2012 20:53: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: r235376 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 20:53:00 -0000 Author: gjb (doc committer) Date: Sat May 12 20:53:00 2012 New Revision: 235376 URL: http://svn.freebsd.org/changeset/base/235376 Log: Remove leading .Ns macro to silence mdoc(7) warning. Modified: head/share/man/man9/spl.9 Modified: head/share/man/man9/spl.9 ============================================================================== --- head/share/man/man9/spl.9 Sat May 12 20:49:58 2012 (r235375) +++ head/share/man/man9/spl.9 Sat May 12 20:53:00 2012 (r235376) @@ -112,8 +112,7 @@ The system automatically arranges for in the .Em xxx group to be called at a priority >= -.Ns spl Ns Em xxx -\&(). +.Em spl Ns Fn xxx .Pp The function .Fn splx From owner-svn-src-head@FreeBSD.ORG Sat May 12 21:08:08 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A686106566C; Sat, 12 May 2012 21:08:08 +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 2B0DE8FC14; Sat, 12 May 2012 21:08:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CL88tu052543; Sat, 12 May 2012 21:08:08 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CL87tq052540; Sat, 12 May 2012 21:08:07 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201205122108.q4CL87tq052540@svn.freebsd.org> From: Adrian Chadd Date: Sat, 12 May 2012 21:08: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: r235377 - head/sys/dev/etherswitch/arswitch X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 21:08:08 -0000 Author: adrian Date: Sat May 12 21:08:07 2012 New Revision: 235377 URL: http://svn.freebsd.org/changeset/base/235377 Log: Setup the CPU port and broadcast map on the AR7240, rather than depending upon the bootloader initialising it. The aim is to eventually support a full switch set and reinitialisation rather than relying on a consistent bootloader setup. Remove the port flood config from arswitch.c, it's not yet used and it's totally incorrect. Whilst I'm here, also add in a comment describing why the full switch reset is disabled. Obtained from: Linux (OpenWRT) - Values Modified: head/sys/dev/etherswitch/arswitch/arswitch.c head/sys/dev/etherswitch/arswitch/arswitch_7240.c Modified: head/sys/dev/etherswitch/arswitch/arswitch.c ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitch.c Sat May 12 20:53:00 2012 (r235376) +++ head/sys/dev/etherswitch/arswitch/arswitch.c Sat May 12 21:08:07 2012 (r235377) @@ -220,6 +220,15 @@ arswitch_attach(device_t dev) (void) resource_int_value(device_get_name(dev), device_get_unit(dev), "is_gmii", &sc->is_gmii); + /* + * This requires much more setup depending upon each chip, including: + * + * + Proper reinitialisation of the PHYs; + * + Initialising the VLAN table; + * + Initialising the port access table and CPU flood/broadcast + * configuration; + * + Other things I haven't yet thought of. + */ #ifdef NOTYET arswitch_writereg(dev, AR8X16_REG_MASK_CTRL, AR8X16_MASK_CTRL_SOFT_RESET); @@ -229,9 +238,6 @@ arswitch_attach(device_t dev) device_printf(dev, "unable to reset switch\n"); return (ENXIO); } - arswitch_modifyreg(dev, AR8X16_REG_GLOBAL_CTRL, - AR8X16_FLOOD_MASK_BCAST_TO_CPU, - AR8X16_FLOOD_MASK_BCAST_TO_CPU); #endif err = sc->hal.arswitch_hw_setup(sc); Modified: head/sys/dev/etherswitch/arswitch/arswitch_7240.c ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitch_7240.c Sat May 12 20:53:00 2012 (r235376) +++ head/sys/dev/etherswitch/arswitch/arswitch_7240.c Sat May 12 21:08:07 2012 (r235377) @@ -64,10 +64,6 @@ #include "miibus_if.h" #include "etherswitch_if.h" -/* XXX belongs in arswitch_7240_reg.h */ - -#define AR7240_REG_TAG_PRIORITY 0x70 - /* * AR7240 specific functions */ @@ -96,14 +92,20 @@ ar7240_hw_global_setup(struct arswitch_s { /* Setup TAG priority mapping */ - arswitch_writereg(sc->sc_dev, AR7240_REG_TAG_PRIORITY, 0xfa50); + arswitch_writereg(sc->sc_dev, AR8X16_REG_TAG_PRIO, 0xfa50); + + /* Enable broadcast frames transmitted to the CPU */ + arswitch_writereg(sc->sc_dev, AR8X16_REG_FLOOD_MASK, + AR8X16_FLOOD_MASK_BCAST_TO_CPU | 0x003f003f); - /* MTU */ + /* Setup MTU */ arswitch_modifyreg(sc->sc_dev, AR8X16_REG_GLOBAL_CTRL, AR7240_GLOBAL_CTRL_MTU_MASK, SM(1536, AR7240_GLOBAL_CTRL_MTU_MASK)); - /* XXX Service Tag */ + /* Service Tag */ + arswitch_modifyreg(sc->sc_dev, AR8X16_REG_SERVICE_TAG, + AR8X16_SERVICE_TAG_MASK, 0); return (0); } From owner-svn-src-head@FreeBSD.ORG Sat May 12 21:15:21 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C8E131065674; Sat, 12 May 2012 21:15:21 +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 9AB1F8FC1A; Sat, 12 May 2012 21:15:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CLFLiS052822; Sat, 12 May 2012 21:15:21 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CLFLbY052821; Sat, 12 May 2012 21:15:21 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201205122115.q4CLFLbY052821@svn.freebsd.org> From: "George V. Neville-Neil" Date: Sat, 12 May 2012 21:15: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: r235378 - head/cddl/contrib/dtracetoolkit/dist X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 21:15:21 -0000 Author: gnn Date: Sat May 12 21:15:21 2012 New Revision: 235378 URL: http://svn.freebsd.org/changeset/base/235378 Log: Import dtracetoolkit into cddl/contrib Added: head/cddl/contrib/dtracetoolkit/dist/ - copied from r235377, vendor/dtracetoolkit/dist/ From owner-svn-src-head@FreeBSD.ORG Sat May 12 21:23:32 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C27E106564A; Sat, 12 May 2012 21:23:32 +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 E26738FC15; Sat, 12 May 2012 21:23:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CLNVEb053120; Sat, 12 May 2012 21:23:31 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CLNVqs053119; Sat, 12 May 2012 21:23:31 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201205122123.q4CLNVqs053119@svn.freebsd.org> From: "George V. Neville-Neil" Date: Sat, 12 May 2012 21:23: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: r235379 - head/cddl/contrib/dtracetoolkit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 21:23:32 -0000 Author: gnn Date: Sat May 12 21:23:31 2012 New Revision: 235379 URL: http://svn.freebsd.org/changeset/base/235379 Log: Revert previous failed cp. Deleted: head/cddl/contrib/dtracetoolkit/ From owner-svn-src-head@FreeBSD.ORG Sat May 12 21:25:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0649C106566B; Sat, 12 May 2012 21:25:49 +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 CCA158FC0A; Sat, 12 May 2012 21:25:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CLPmRi053245; Sat, 12 May 2012 21:25:48 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CLPmod053244; Sat, 12 May 2012 21:25:48 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201205122125.q4CLPmod053244@svn.freebsd.org> From: "George V. Neville-Neil" Date: Sat, 12 May 2012 21:25: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: r235380 - head/cddl/contrib/dtracetoolkit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 21:25:49 -0000 Author: gnn Date: Sat May 12 21:25:48 2012 New Revision: 235380 URL: http://svn.freebsd.org/changeset/base/235380 Log: Import dtracetoolkit into cddl/contrib Added: head/cddl/contrib/dtracetoolkit/ - copied from r235379, vendor/dtracetoolkit/dist/ From owner-svn-src-head@FreeBSD.ORG Sat May 12 22:20:56 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 59F9C106564A; Sat, 12 May 2012 22:20:56 +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 2B0E78FC14; Sat, 12 May 2012 22:20:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4CMKu9r055104; Sat, 12 May 2012 22:20:56 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4CMKt7n055102; Sat, 12 May 2012 22:20:55 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201205122220.q4CMKt7n055102@svn.freebsd.org> From: Rick Macklem Date: Sat, 12 May 2012 22:20: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: r235381 - 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: Sat, 12 May 2012 22:20:56 -0000 Author: rmacklem Date: Sat May 12 22:20:55 2012 New Revision: 235381 URL: http://svn.freebsd.org/changeset/base/235381 Log: Fix two cases in the new NFS server where a tsleep() is used, when the code should actually protect the tested variable with a mutex. Since the tsleep()s had a 10sec timeout, the race would have only delayed the allocation of a new clientid for a client. The sleeps will also rarely occur, since having a callback in progress when a client acquires a new clientid, is unlikely. in practice, since having a callback in progress when a fresh clientid is being acquired by a client is unlikely. MFC after: 1 month Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdstate.c Sat May 12 21:25:48 2012 (r235380) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Sat May 12 22:20:55 2012 (r235381) @@ -331,11 +331,13 @@ nfsrv_setclient(struct nfsrv_descript *n * Must wait until any outstanding callback on the old clp * completes. */ + NFSLOCKSTATE(); while (clp->lc_cbref) { clp->lc_flags |= LCL_WAKEUPWANTED; - (void) tsleep((caddr_t)clp, PZERO - 1, + (void)mtx_sleep(clp, NFSSTATEMUTEXPTR, PZERO - 1, "nfsd clp", 10 * hz); } + NFSUNLOCKSTATE(); nfsrv_zapclient(clp, p); *new_clpp = NULL; goto out; @@ -385,10 +387,13 @@ nfsrv_setclient(struct nfsrv_descript *n * Must wait until any outstanding callback on the old clp * completes. */ + NFSLOCKSTATE(); while (clp->lc_cbref) { clp->lc_flags |= LCL_WAKEUPWANTED; - (void) tsleep((caddr_t)clp, PZERO - 1, "nfsd clp", 10 * hz); + (void)mtx_sleep(clp, NFSSTATEMUTEXPTR, PZERO - 1, "nfsd clp", + 10 * hz); } + NFSUNLOCKSTATE(); nfsrv_zapclient(clp, p); *new_clpp = NULL; @@ -3816,11 +3821,9 @@ nfsrv_docallback(struct nfsclient *clp, clp->lc_cbref--; if ((clp->lc_flags & LCL_WAKEUPWANTED) && clp->lc_cbref == 0) { clp->lc_flags &= ~LCL_WAKEUPWANTED; - NFSUNLOCKSTATE(); - wakeup((caddr_t)clp); - } else { - NFSUNLOCKSTATE(); + wakeup(clp); } + NFSUNLOCKSTATE(); NFSEXITCODE(error); return (error);