From owner-svn-src-head@FreeBSD.ORG Sun Jun 24 00:38:15 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 46DAF106564A; Sun, 24 Jun 2012 00:38:15 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id DD4F78FC0A; Sun, 24 Jun 2012 00:38:14 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id q5O0cDZh045433; Sun, 24 Jun 2012 02:38:13 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id q5O0cDjR045432; Sun, 24 Jun 2012 02:38:13 +0200 (CEST) (envelope-from marius) Date: Sun, 24 Jun 2012 02:38:13 +0200 From: Marius Strobl To: John Baldwin Message-ID: <20120624003813.GA45417@alchemy.franken.de> References: <201206131504.q5DF4opt031336@svn.freebsd.org> <20120623221626.GH69382@alchemy.franken.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120623221626.GH69382@alchemy.franken.de> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237008 - head/sys/dev/pci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jun 2012 00:38:15 -0000 On Sun, Jun 24, 2012 at 12:16:26AM +0200, Marius Strobl wrote: > On Wed, Jun 13, 2012 at 03:04:50PM +0000, John Baldwin wrote: > > Author: jhb > > Date: Wed Jun 13 15:04:50 2012 > > New Revision: 237008 > > URL: http://svn.freebsd.org/changeset/base/237008 > > > > Log: > > Fix a couple of bugs that prevented windows in PCI-PCI bridges from > > growing "downward" (moving the start address down). First, an off by > > one error caused the end address to be moved down an extra alignment > > chunk unnecessarily. Second, when aligning the new candidate starting > > address, the wrong bits were masked off. > > > > Unfortunately, this now panics a sparc64 machine on the first attempt > to use a grown resource via bus_space(9) for me: > pcib3: at device 0.0 on pci2 > pcib2: allocated I/O port range (0x1000-0x1fff) for rid 1c of pcib3 > pcib2: allocated memory range (0x200000-0x3ffffff) for rid 20 of pcib3 > pcib3: domain 0 > pcib3: secondary bus 5 > pcib3: subordinate bus 5 > pcib3: I/O decode 0x1000-0x1fff > pcib3: memory decode 0x200000-0x3ffffff > pcib3: no prefetched decode > pcib3: Subtractively decoded bridge. > <...> > pci3: on pcib3 > <...> > isab0: at device 30.0 on pci3 > isa0: on isab0 > <...> > rtc0: at port 0x70-0x73 on isa0 > pcib3: attempting to grow I/O port window for (0x70-0x73,0x4) > front candidate range: 0x70-0x73 > pcib3: grew I/O port window to 0x70-0x1fff > panic: start address is not aligned > Alternatively, this may also be a data access trap, which also indicates > that some invalid address being used for the access. Eh, the type of panic obviously is based on whether the kernel is built with INVARIANTS enabled or not ... trying to figure out too many regressions in head concurrently ... > > before: > rtc0: at port 0x70-0x73 on isa0 > pcib3: attempting to grow I/O port window for (0x70-0x73,0x4) > pcib2: allocated I/O port range (0x70-0x73) for rid 0 of rtc0 > > Shouldn't a subtractively decoded resource actually be outside of > the window of the parent PCI-PCI bridge, i.e. it seems we shouldn't > try to grow the window in that case? The below patch fixes this for > me, I'm not sure whether that actually is the right approach though. > > Marius > > Index: pci_pci.c > =================================================================== > --- pci_pci.c (revision 237511) > +++ pci_pci.c (working copy) > @@ -1038,7 +1038,7 @@ pcib_alloc_resource(device_t dev, device_t child, > case SYS_RES_IOPORT: > r = pcib_suballoc_resource(sc, &sc->io, child, type, rid, start, > end, count, flags); > - if (r != NULL) > + if (r != NULL || (sc->flags & PCIB_SUBTRACTIVE) != 0) > break; > if (pcib_grow_window(sc, &sc->io, type, start, end, count, > flags) == 0) > @@ -1062,7 +1062,7 @@ pcib_alloc_resource(device_t dev, device_t child, > } > r = pcib_suballoc_resource(sc, &sc->mem, child, type, rid, > start, end, count, flags); > - if (r != NULL) > + if (r != NULL || (sc->flags & PCIB_SUBTRACTIVE) != 0) > break; > if (flags & RF_PREFETCHABLE) { > if (pcib_grow_window(sc, &sc->pmem, type, start, end, From owner-svn-src-head@FreeBSD.ORG Sun Jun 24 04:15: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 87E851065670; Sun, 24 Jun 2012 04:15:59 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 706898FC08; Sun, 24 Jun 2012 04:15: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 q5O4FxQU086467; Sun, 24 Jun 2012 04:15:59 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5O4FwP8086451; Sun, 24 Jun 2012 04:15:58 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201206240415.q5O4FwP8086451@svn.freebsd.org> From: Andrew Turner Date: Sun, 24 Jun 2012 04:15: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: r237517 - in head: include sys/arm/include sys/ia64/include sys/mips/include sys/powerpc/include sys/sparc64/include sys/sys sys/x86/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, 24 Jun 2012 04:15:59 -0000 Author: andrew Date: Sun Jun 24 04:15:58 2012 New Revision: 237517 URL: http://svn.freebsd.org/changeset/base/237517 Log: Make the wchar_t type machine dependent. This is required for ARM EABI. Section 7.1.1 of the Procedure Call for the ARM Architecture (AAPCS) defines wchar_t as either an unsigned int or an unsigned short with the former preferred. Because of this requirement we need to move the definition of __wchar_t to a machine dependent header. It also cleans up the macros defining the limits of wchar_t by defining __WCHAR_MIN and __WCHAR_MAX in the same machine dependent header then using them to define WCHAR_MIN and WCHAR_MAX respectively. Discussed with: bde Modified: head/include/wchar.h head/sys/arm/include/_stdint.h head/sys/arm/include/_types.h head/sys/ia64/include/_stdint.h head/sys/ia64/include/_types.h head/sys/mips/include/_stdint.h head/sys/mips/include/_types.h head/sys/powerpc/include/_stdint.h head/sys/powerpc/include/_types.h head/sys/sparc64/include/_stdint.h head/sys/sparc64/include/_types.h head/sys/sys/_types.h head/sys/sys/stdint.h head/sys/x86/include/_stdint.h head/sys/x86/include/_types.h Modified: head/include/wchar.h ============================================================================== --- head/include/wchar.h Sun Jun 24 01:32:42 2012 (r237516) +++ head/include/wchar.h Sun Jun 24 04:15:58 2012 (r237517) @@ -88,10 +88,8 @@ typedef __wint_t wint_t; #define _WINT_T_DECLARED #endif -#ifndef WCHAR_MIN -#define WCHAR_MIN __INT_MIN -#define WCHAR_MAX __INT_MAX -#endif +#define WCHAR_MIN __WCHAR_MIN +#define WCHAR_MAX __WCHAR_MAX #ifndef WEOF #define WEOF ((wint_t)-1) Modified: head/sys/arm/include/_stdint.h ============================================================================== --- head/sys/arm/include/_stdint.h Sun Jun 24 01:32:42 2012 (r237516) +++ head/sys/arm/include/_stdint.h Sun Jun 24 04:15:58 2012 (r237517) @@ -149,12 +149,6 @@ /* Limit of size_t. */ #define SIZE_MAX UINT32_MAX -#ifndef WCHAR_MIN /* Also possibly defined in */ -/* Limits of wchar_t. */ -#define WCHAR_MIN INT32_MIN -#define WCHAR_MAX INT32_MAX -#endif - /* Limits of wint_t. */ #define WINT_MIN INT32_MIN #define WINT_MAX INT32_MAX Modified: head/sys/arm/include/_types.h ============================================================================== --- head/sys/arm/include/_types.h Sun Jun 24 01:32:42 2012 (r237516) +++ head/sys/arm/include/_types.h Sun Jun 24 04:15:58 2012 (r237517) @@ -105,6 +105,16 @@ typedef __uint32_t __vm_paddr_t; typedef __uint64_t __vm_pindex_t; typedef __uint32_t __vm_size_t; +#ifdef __ARM_EABI__ +typedef unsigned int __wchar_t; +#define __WCHAR_MIN 0 /* min value for a wchar_t */ +#define __WCHAR_MAX __UINT_MAX /* max value for a wchar_t */ +#else +typedef int __wchar_t; +#define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ +#define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */ +#endif + /* * Unusual type definitions. */ Modified: head/sys/ia64/include/_stdint.h ============================================================================== --- head/sys/ia64/include/_stdint.h Sun Jun 24 01:32:42 2012 (r237516) +++ head/sys/ia64/include/_stdint.h Sun Jun 24 04:15:58 2012 (r237517) @@ -149,12 +149,6 @@ /* Limit of size_t. */ #define SIZE_MAX UINT64_MAX -#ifndef WCHAR_MIN /* Also possibly defined in */ -/* Limits of wchar_t. */ -#define WCHAR_MIN INT32_MIN -#define WCHAR_MAX INT32_MAX -#endif - /* Limits of wint_t. */ #define WINT_MIN INT32_MIN #define WINT_MAX INT32_MAX Modified: head/sys/ia64/include/_types.h ============================================================================== --- head/sys/ia64/include/_types.h Sun Jun 24 01:32:42 2012 (r237516) +++ head/sys/ia64/include/_types.h Sun Jun 24 04:15:58 2012 (r237517) @@ -96,6 +96,10 @@ typedef __int64_t __vm_ooffset_t; typedef __uint64_t __vm_paddr_t; typedef __uint64_t __vm_pindex_t; typedef __uint64_t __vm_size_t; +typedef int __wchar_t; + +#define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ +#define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */ /* * Unusual type definitions. Modified: head/sys/mips/include/_stdint.h ============================================================================== --- head/sys/mips/include/_stdint.h Sun Jun 24 01:32:42 2012 (r237516) +++ head/sys/mips/include/_stdint.h Sun Jun 24 04:15:58 2012 (r237517) @@ -186,12 +186,6 @@ #define SIG_ATOMIC_MIN INT32_MIN #define SIG_ATOMIC_MAX INT32_MAX -#ifndef WCHAR_MIN /* Also possibly defined in */ -/* Limits of wchar_t. */ -#define WCHAR_MIN INT32_MIN -#define WCHAR_MAX INT32_MAX -#endif - /* Limits of wint_t. */ #define WINT_MIN INT32_MIN #define WINT_MAX INT32_MAX Modified: head/sys/mips/include/_types.h ============================================================================== --- head/sys/mips/include/_types.h Sun Jun 24 01:32:42 2012 (r237516) +++ head/sys/mips/include/_types.h Sun Jun 24 04:15:58 2012 (r237517) @@ -145,6 +145,10 @@ typedef __uint32_t __vm_paddr_t; typedef __int64_t __vm_ooffset_t; typedef __uint64_t __vm_pindex_t; +typedef int __wchar_t; + +#define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ +#define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */ /* * Unusual type definitions. Modified: head/sys/powerpc/include/_stdint.h ============================================================================== --- head/sys/powerpc/include/_stdint.h Sun Jun 24 01:32:42 2012 (r237516) +++ head/sys/powerpc/include/_stdint.h Sun Jun 24 04:15:58 2012 (r237517) @@ -189,12 +189,6 @@ #define SIZE_MAX UINT32_MAX #endif -#ifndef WCHAR_MIN /* Also possibly defined in */ -/* Limits of wchar_t. */ -#define WCHAR_MIN INT32_MIN -#define WCHAR_MAX INT32_MAX -#endif - /* Limits of wint_t. */ #define WINT_MIN INT32_MIN #define WINT_MAX INT32_MAX Modified: head/sys/powerpc/include/_types.h ============================================================================== --- head/sys/powerpc/include/_types.h Sun Jun 24 01:32:42 2012 (r237516) +++ head/sys/powerpc/include/_types.h Sun Jun 24 04:15:58 2012 (r237517) @@ -133,6 +133,10 @@ typedef __uint32_t __vm_size_t; #endif typedef __int64_t __vm_ooffset_t; typedef __uint64_t __vm_pindex_t; +typedef int __wchar_t; + +#define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ +#define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */ /* * Unusual type definitions. Modified: head/sys/sparc64/include/_stdint.h ============================================================================== --- head/sys/sparc64/include/_stdint.h Sun Jun 24 01:32:42 2012 (r237516) +++ head/sys/sparc64/include/_stdint.h Sun Jun 24 04:15:58 2012 (r237517) @@ -149,12 +149,6 @@ /* Limit of size_t. */ #define SIZE_MAX UINT64_MAX -#ifndef WCHAR_MIN /* Also possibly defined in */ -/* Limits of wchar_t. */ -#define WCHAR_MIN INT32_MIN -#define WCHAR_MAX INT32_MAX -#endif - /* Limits of wint_t. */ #define WINT_MIN INT32_MIN #define WINT_MAX INT32_MAX Modified: head/sys/sparc64/include/_types.h ============================================================================== --- head/sys/sparc64/include/_types.h Sun Jun 24 01:32:42 2012 (r237516) +++ head/sys/sparc64/include/_types.h Sun Jun 24 04:15:58 2012 (r237517) @@ -92,6 +92,10 @@ typedef __int64_t __vm_ooffset_t; typedef __uint64_t __vm_paddr_t; typedef __uint64_t __vm_pindex_t; typedef __uint64_t __vm_size_t; +typedef int __wchar_t; + +#define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ +#define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */ /* * Unusual type definitions. Modified: head/sys/sys/_types.h ============================================================================== --- head/sys/sys/_types.h Sun Jun 24 01:32:42 2012 (r237516) +++ head/sys/sys/_types.h Sun Jun 24 04:15:58 2012 (r237517) @@ -80,14 +80,13 @@ typedef int __cpusetid_t; /* cpuset ide * ANSI C), but they use __ct_rune_t instead of int. * * NOTE: rune_t is not covered by ANSI nor other standards, and should not - * be instantiated outside of lib/libc/locale. Use wchar_t. wchar_t and - * rune_t must be the same type. Also, wint_t must be no narrower than - * wchar_t, and should be able to hold all members of the largest - * character set plus one extra value (WEOF), and must be at least 16 bits. + * be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and + * rune_t must be the same type. Also, wint_t should be able to hold all + * members of the largest character set plus one extra value (WEOF), and + * must be at least 16 bits. */ typedef int __ct_rune_t; /* arg type for ctype funcs */ typedef __ct_rune_t __rune_t; /* rune_t (see above) */ -typedef __ct_rune_t __wchar_t; /* wchar_t (see above) */ typedef __ct_rune_t __wint_t; /* wint_t (see above) */ typedef __uint32_t __dev_t; /* device number */ Modified: head/sys/sys/stdint.h ============================================================================== --- head/sys/sys/stdint.h Sun Jun 24 01:32:42 2012 (r237516) +++ head/sys/sys/stdint.h Sun Jun 24 04:15:58 2012 (r237517) @@ -71,4 +71,8 @@ typedef __uintmax_t uintmax_t; #define __WORDSIZE 32 #endif +/* Limits of wchar_t. */ +#define WCHAR_MIN __WCHAR_MIN +#define WCHAR_MAX __WCHAR_MAX + #endif /* !_SYS_STDINT_H_ */ Modified: head/sys/x86/include/_stdint.h ============================================================================== --- head/sys/x86/include/_stdint.h Sun Jun 24 01:32:42 2012 (r237516) +++ head/sys/x86/include/_stdint.h Sun Jun 24 04:15:58 2012 (r237517) @@ -180,12 +180,6 @@ #define SIZE_MAX UINT32_MAX #endif -#ifndef WCHAR_MIN /* Also possibly defined in */ -/* Limits of wchar_t. */ -#define WCHAR_MIN INT32_MIN -#define WCHAR_MAX INT32_MAX -#endif - /* Limits of wint_t. */ #define WINT_MIN INT32_MIN #define WINT_MAX INT32_MAX Modified: head/sys/x86/include/_types.h ============================================================================== --- head/sys/x86/include/_types.h Sun Jun 24 01:32:42 2012 (r237516) +++ head/sys/x86/include/_types.h Sun Jun 24 04:15:58 2012 (r237517) @@ -142,6 +142,10 @@ typedef __uint32_t __vm_size_t; #endif typedef __int64_t __vm_ooffset_t; typedef __uint64_t __vm_pindex_t; +typedef int __wchar_t; + +#define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ +#define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */ /* * Unusual type definitions. From owner-svn-src-head@FreeBSD.ORG Sun Jun 24 04:29:03 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 D9423106566C; Sun, 24 Jun 2012 04:29:03 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C16768FC0C; Sun, 24 Jun 2012 04:29:03 +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 q5O4T33h087021; Sun, 24 Jun 2012 04:29:03 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5O4T3D7087012; Sun, 24 Jun 2012 04:29:03 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201206240429.q5O4T3D7087012@svn.freebsd.org> From: "Kenneth D. Merry" Date: Sun, 24 Jun 2012 04:29:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237518 - in head: share/man/man9 sys/cam/scsi sys/dev/xen/blkfront sys/geom X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 24 Jun 2012 04:29:04 -0000 Author: ken Date: Sun Jun 24 04:29:03 2012 New Revision: 237518 URL: http://svn.freebsd.org/changeset/base/237518 Log: Fix a bug which causes a panic in daopen(). The panic is caused by a da(4) instance going away while GEOM is still probing it. In this case, the GEOM disk class instance has been created by disk_create(), and the taste of the disk is queued in the GEOM event queue. While that event is queued, the da(4) instance goes away. When the open call comes into the da(4) driver, it dereferences the freed (but non-NULL) peripheral pointer provided by GEOM, which results in a panic. The solution is to add a callback to the GEOM disk code that is called when all of its resources are cleaned up. This is implemented inside GEOM by adding an optional callback that is called when all consumers have detached from a provider, and the provider is about to be deleted. scsi_cd.c, scsi_da.c: In the register routine for the cd(4) and da(4) routines, acquire a reference to the CAM peripheral instance just before we call disk_create(). Use the new GEOM disk d_gone() callback to register a callback (dadiskgonecb()/cddiskgonecb()) that decrements the peripheral reference count once GEOM has finished cleaning up its resources. In the cd(4) driver, clean up open and close behavior slightly. GEOM makes sure we only get one open() and one close call, so there is no need to set an open flag and decrement the reference count if we are not the first open. In the cd(4) driver, use cam_periph_release_locked() in a couple of error scenarios to avoid extra mutex calls. geom.h: Add a new, optional, providergone callback that is called when a provider is about to be deleted. geom_disk.h: Add a new d_gone() callback to the GEOM disk interface. Bump the DISK_VERSION to version 2. This probably should have been done after a couple of previous changes, especially the addition of the d_getattr() callback. geom_disk.c: Add a providergone callback for the disk class, g_disk_providergone(), that calls the user's d_gone() callback if it exists. Bump the DISK_VERSION to 2. geom_subr.c: In g_destroy_provider(), call the providergone callback if it has been provided. In g_new_geomf(), propagate the class's providergone callback to the new geom instance. blkfront.c: Callers of disk_create() are supposed to pass in DISK_VERSION, not an explicit disk API version number. Update the blkfront driver to do that. disk.9: Update the disk(9) man page to include information on the new d_gone() callback, as well as the previously added d_getattr() callback, d_descr field, and HBA PCI ID fields. MFC after: 5 days Modified: head/share/man/man9/disk.9 head/sys/cam/scsi/scsi_cd.c head/sys/cam/scsi/scsi_da.c head/sys/dev/xen/blkfront/blkfront.c head/sys/geom/geom.h head/sys/geom/geom_disk.c head/sys/geom/geom_disk.h head/sys/geom/geom_subr.c Modified: head/share/man/man9/disk.9 ============================================================================== --- head/share/man/man9/disk.9 Sun Jun 24 04:15:58 2012 (r237517) +++ head/share/man/man9/disk.9 Sun Jun 24 04:29:03 2012 (r237518) @@ -145,6 +145,16 @@ Optional: if configured with .Xr dumpon 8 , this function is invoked from a very restricted system state after a kernel panic to record a copy of the system RAM to the disk. +.It Vt "disk_getattr_t *" Va d_getattr +Optional: if this method is provided, it gives the disk driver the +opportunity to override the default GEOM response to BIO_GETATTR requests. +This function should return -1 if the attribute is not handled, 0 if the +attribute is handled, or an errno to be passed to g_io_deliver(). +.It Vt "disk_gone_t *" Va d_gone +Optional: if this method is provided, it will be called after disk_gone() +is called, once GEOM has finished its cleanup process. +Once this callback is called, it is safe for the disk driver to free all of +its resources, as it will not be receiving further calls from GEOM. .El .Ss Mandatory Media Properties The following fields identify the size and granularity of the disk device. @@ -180,7 +190,23 @@ Please see .Pa src/sys/geom/notes for details. .It Vt char Va d_ident[DISK_IDENT_SIZE] -This field can and should be used to store disk's serial number. +This field can and should be used to store disk's serial number if the +d_getattr method described above isn't implemented, or if it does not +support the GEOM::ident attribute. +.It Vt char Va d_descr[DISK_IDENT_SIZE] +This field can be used to store the disk vendor and product description. +.It Vt uint16_t Va d_hba_vendor +This field can be used to store the PCI vendor ID for the HBA connected to +the disk. +.It Vt uint16_t Va d_hba_device +This field can be used to store the PCI device ID for the HBA connected to +the disk. +.It Vt uint16_t Va d_hba_subvendor +This field can be used to store the PCI subvendor ID for the HBA connected to +the disk. +.It Vt uint16_t Va d_hba_subdevice +This field can be used to store the PCI subdevice ID for the HBA connected to +the disk. .El .Ss Driver Private Data This field may be used by the device driver to store a pointer to Modified: head/sys/cam/scsi/scsi_cd.c ============================================================================== --- head/sys/cam/scsi/scsi_cd.c Sun Jun 24 04:15:58 2012 (r237517) +++ head/sys/cam/scsi/scsi_cd.c Sun Jun 24 04:29:03 2012 (r237518) @@ -103,8 +103,7 @@ typedef enum { CD_FLAG_RETRY_UA = 0x0200, CD_FLAG_VALID_MEDIA = 0x0400, CD_FLAG_VALID_TOC = 0x0800, - CD_FLAG_SCTX_INIT = 0x1000, - CD_FLAG_OPEN = 0x2000 + CD_FLAG_SCTX_INIT = 0x1000 } cd_flags; typedef enum { @@ -358,6 +357,20 @@ cdinit(void) } } +/* + * Callback from GEOM, called when it has finished cleaning up its + * resources. + */ +static void +cddiskgonecb(struct disk *dp) +{ + struct cam_periph *periph; + + periph = (struct cam_periph *)dp->d_drv1; + + cam_periph_release(periph); +} + static void cdoninvalidate(struct cam_periph *periph) { @@ -389,7 +402,7 @@ cdoninvalidate(struct cam_periph *periph camq_remove(&softc->changer->devq, softc->pinfo.index); disk_gone(softc->disk); - xpt_print(periph->path, "lost device\n"); + xpt_print(periph->path, "lost device, %d refs\n", periph->refcount); } static void @@ -726,6 +739,7 @@ cdregister(struct cam_periph *periph, vo softc->disk->d_open = cdopen; softc->disk->d_close = cdclose; softc->disk->d_strategy = cdstrategy; + softc->disk->d_gone = cddiskgonecb; softc->disk->d_ioctl = cdioctl; softc->disk->d_name = "cd"; cam_strvis(softc->disk->d_descr, cgd->inq_data.vendor, @@ -747,6 +761,19 @@ cdregister(struct cam_periph *periph, vo softc->disk->d_hba_device = cpi.hba_device; softc->disk->d_hba_subvendor = cpi.hba_subvendor; softc->disk->d_hba_subdevice = cpi.hba_subdevice; + + /* + * Acquire a reference to the periph before we register with GEOM. + * We'll release this reference once GEOM calls us back (via + * dadiskgonecb()) telling us that our provider has been freed. + */ + if (cam_periph_acquire(periph) != CAM_REQ_CMP) { + xpt_print(periph->path, "%s: lost periph during " + "registration!\n", __func__); + cam_periph_lock(periph); + return (CAM_REQ_CMP_ERR); + } + disk_create(softc->disk, DISK_VERSION); cam_periph_lock(periph); @@ -1000,14 +1027,14 @@ cdopen(struct disk *dp) cam_periph_lock(periph); if (softc->flags & CD_FLAG_INVALID) { + cam_periph_release_locked(periph); cam_periph_unlock(periph); - cam_periph_release(periph); return(ENXIO); } if ((error = cam_periph_hold(periph, PRIBIO | PCATCH)) != 0) { + cam_periph_release_locked(periph); cam_periph_unlock(periph); - cam_periph_release(periph); return (error); } @@ -1024,14 +1051,7 @@ cdopen(struct disk *dp) CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("leaving cdopen\n")); cam_periph_unhold(periph); - /* Closes aren't symmetrical with opens, so fix up the refcounting. */ - if ((softc->flags & CD_FLAG_OPEN) == 0) { - softc->flags |= CD_FLAG_OPEN; - cam_periph_unlock(periph); - } else { - cam_periph_unlock(periph); - cam_periph_release(periph); - } + cam_periph_unlock(periph); return (0); } @@ -1070,11 +1090,11 @@ cdclose(struct disk *dp) /* * We'll check the media and toc again at the next open(). */ - softc->flags &= ~(CD_FLAG_VALID_MEDIA|CD_FLAG_VALID_TOC|CD_FLAG_OPEN); + softc->flags &= ~(CD_FLAG_VALID_MEDIA|CD_FLAG_VALID_TOC); cam_periph_unhold(periph); + cam_periph_release_locked(periph); cam_periph_unlock(periph); - cam_periph_release(periph); return (0); } Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Sun Jun 24 04:15:58 2012 (r237517) +++ head/sys/cam/scsi/scsi_da.c Sun Jun 24 04:29:03 2012 (r237518) @@ -1233,6 +1233,20 @@ dainit(void) } } +/* + * Callback from GEOM, called when it has finished cleaning up its + * resources. + */ +static void +dadiskgonecb(struct disk *dp) +{ + struct cam_periph *periph; + + periph = (struct cam_periph *)dp->d_drv1; + + cam_periph_release(periph); +} + static void daoninvalidate(struct cam_periph *periph) { @@ -1255,7 +1269,12 @@ daoninvalidate(struct cam_periph *periph bioq_flush(&softc->bio_queue, NULL, ENXIO); bioq_flush(&softc->delete_queue, NULL, ENXIO); + /* + * Tell GEOM that we've gone away, we'll get a callback when it is + * done cleaning up its resources. + */ disk_gone(softc->disk); + xpt_print(periph->path, "lost device - %d outstanding, %d refs\n", softc->outstanding_cmds, periph->refcount); } @@ -1633,6 +1652,7 @@ daregister(struct cam_periph *periph, vo softc->disk->d_strategy = dastrategy; softc->disk->d_dump = dadump; softc->disk->d_getattr = dagetattr; + softc->disk->d_gone = dadiskgonecb; softc->disk->d_name = "da"; softc->disk->d_drv1 = periph; if (cpi.maxio == 0) @@ -1655,6 +1675,19 @@ daregister(struct cam_periph *periph, vo softc->disk->d_hba_device = cpi.hba_device; softc->disk->d_hba_subvendor = cpi.hba_subvendor; softc->disk->d_hba_subdevice = cpi.hba_subdevice; + + /* + * Acquire a reference to the periph before we register with GEOM. + * We'll release this reference once GEOM calls us back (via + * dadiskgonecb()) telling us that our provider has been freed. + */ + if (cam_periph_acquire(periph) != CAM_REQ_CMP) { + xpt_print(periph->path, "%s: lost periph during " + "registration!\n", __func__); + mtx_lock(periph->sim->mtx); + return (CAM_REQ_CMP_ERR); + } + disk_create(softc->disk, DISK_VERSION); mtx_lock(periph->sim->mtx); Modified: head/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- head/sys/dev/xen/blkfront/blkfront.c Sun Jun 24 04:15:58 2012 (r237517) +++ head/sys/dev/xen/blkfront/blkfront.c Sun Jun 24 04:29:03 2012 (r237518) @@ -230,7 +230,7 @@ xlvbd_add(struct xb_softc *sc, blkif_sec sc->xb_disk->d_mediasize = sectors * sector_size; sc->xb_disk->d_maxsize = sc->max_request_size; sc->xb_disk->d_flags = 0; - disk_create(sc->xb_disk, DISK_VERSION_00); + disk_create(sc->xb_disk, DISK_VERSION); return error; } Modified: head/sys/geom/geom.h ============================================================================== --- head/sys/geom/geom.h Sun Jun 24 04:15:58 2012 (r237517) +++ head/sys/geom/geom.h Sun Jun 24 04:29:03 2012 (r237518) @@ -76,6 +76,7 @@ typedef void g_orphan_t (struct g_consum typedef void g_start_t (struct bio *); typedef void g_spoiled_t (struct g_consumer *); typedef void g_attrchanged_t (struct g_consumer *, const char *attr); +typedef void g_provgone_t (struct g_provider *); typedef void g_dumpconf_t (struct sbuf *, const char *indent, struct g_geom *, struct g_consumer *, struct g_provider *); @@ -102,6 +103,7 @@ struct g_class { g_start_t *start; g_spoiled_t *spoiled; g_attrchanged_t *attrchanged; + g_provgone_t *providergone; g_dumpconf_t *dumpconf; g_access_t *access; g_orphan_t *orphan; @@ -133,6 +135,7 @@ struct g_geom { g_start_t *start; g_spoiled_t *spoiled; g_attrchanged_t *attrchanged; + g_provgone_t *providergone; g_dumpconf_t *dumpconf; g_access_t *access; g_orphan_t *orphan; Modified: head/sys/geom/geom_disk.c ============================================================================== --- head/sys/geom/geom_disk.c Sun Jun 24 04:15:58 2012 (r237517) +++ head/sys/geom/geom_disk.c Sun Jun 24 04:29:03 2012 (r237518) @@ -75,6 +75,7 @@ static g_fini_t g_disk_fini; static g_start_t g_disk_start; static g_ioctl_t g_disk_ioctl; static g_dumpconf_t g_disk_dumpconf; +static g_provgone_t g_disk_providergone; static struct g_class g_disk_class = { .name = "DISK", @@ -84,6 +85,7 @@ static struct g_class g_disk_class = { .start = g_disk_start, .access = g_disk_access, .ioctl = g_disk_ioctl, + .providergone = g_disk_providergone, .dumpconf = g_disk_dumpconf, }; @@ -487,6 +489,25 @@ g_disk_create(void *arg, int flag) g_error_provider(pp, 0); } +/* + * We get this callback after all of the consumers have gone away, and just + * before the provider is freed. If the disk driver provided a d_gone + * callback, let them know that it is okay to free resources -- they won't + * be getting any more accesses from GEOM. + */ +static void +g_disk_providergone(struct g_provider *pp) +{ + struct disk *dp; + struct g_disk_softc *sc; + + sc = (struct g_disk_softc *)pp->geom->softc; + dp = sc->dp; + + if (dp->d_gone != NULL) + dp->d_gone(dp); +} + static void g_disk_destroy(void *ptr, int flag) { @@ -550,7 +571,7 @@ void disk_create(struct disk *dp, int version) { - if (version != DISK_VERSION_00 && version != DISK_VERSION_01) { + if (version != DISK_VERSION_02) { printf("WARNING: Attempt to add disk %s%d %s", dp->d_name, dp->d_unit, " using incompatible ABI version of disk(9)\n"); Modified: head/sys/geom/geom_disk.h ============================================================================== --- head/sys/geom/geom_disk.h Sun Jun 24 04:15:58 2012 (r237517) +++ head/sys/geom/geom_disk.h Sun Jun 24 04:29:03 2012 (r237518) @@ -50,6 +50,7 @@ typedef int disk_open_t(struct disk *); typedef int disk_close_t(struct disk *); typedef void disk_strategy_t(struct bio *bp); typedef int disk_getattr_t(struct bio *bp); +typedef void disk_gone_t(struct disk *); typedef int disk_ioctl_t(struct disk *, u_long cmd, void *data, int fflag, struct thread *td); /* NB: disk_ioctl_t SHALL be cast'able to d_ioctl_t */ @@ -77,6 +78,7 @@ struct disk { disk_ioctl_t *d_ioctl; dumper_t *d_dump; disk_getattr_t *d_getattr; + disk_gone_t *d_gone; /* Info fields from driver to geom_disk.c. Valid when open */ u_int d_sectorsize; @@ -110,7 +112,8 @@ void disk_attr_changed(struct disk *dp, #define DISK_VERSION_00 0x58561059 #define DISK_VERSION_01 0x5856105a -#define DISK_VERSION DISK_VERSION_01 +#define DISK_VERSION_02 0x5856105b +#define DISK_VERSION DISK_VERSION_02 #endif /* _KERNEL */ #endif /* _GEOM_GEOM_DISK_H_ */ Modified: head/sys/geom/geom_subr.c ============================================================================== --- head/sys/geom/geom_subr.c Sun Jun 24 04:15:58 2012 (r237517) +++ head/sys/geom/geom_subr.c Sun Jun 24 04:29:03 2012 (r237518) @@ -351,6 +351,7 @@ g_new_geomf(struct g_class *mp, const ch gp->start = mp->start; gp->spoiled = mp->spoiled; gp->attrchanged = mp->attrchanged; + gp->providergone = mp->providergone; gp->dumpconf = mp->dumpconf; gp->access = mp->access; gp->orphan = mp->orphan; @@ -634,6 +635,13 @@ g_destroy_provider(struct g_provider *pp LIST_REMOVE(pp, provider); gp = pp->geom; devstat_remove_entry(pp->stat); + /* + * If a callback was provided, send notification that the provider + * is now gone. + */ + if (gp->providergone != NULL) + gp->providergone(pp); + g_free(pp); if ((gp->flags & G_GEOM_WITHER)) g_do_wither(); From owner-svn-src-head@FreeBSD.ORG Sun Jun 24 05:59: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 3B2D1106566B; Sun, 24 Jun 2012 05:59:33 +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 0C5678FC08; Sun, 24 Jun 2012 05:59: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 q5O5xWvC090691; Sun, 24 Jun 2012 05:59:32 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5O5xWTo090688; Sun, 24 Jun 2012 05:59:32 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201206240559.q5O5xWTo090688@svn.freebsd.org> From: Adrian Chadd Date: Sun, 24 Jun 2012 05:59: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: r237519 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 24 Jun 2012 05:59:33 -0000 Author: adrian Date: Sun Jun 24 05:59:32 2012 New Revision: 237519 URL: http://svn.freebsd.org/changeset/base/237519 Log: Sometimes the AR5416 sends back radar PHY errors with both the PHY error and the CRC error bits set. The radar payload is correct. When this happens, the stack doesn't see them PHY error frames and isn't interpreted as a PHY error. So, no radar detection and no radiotap PHY error handling. Now, this may introduce some weird issues if the MAC sends up some other combination of CRC error + PHY error frames; this commit would break that and mark them as PHY errors instead of CRC errors. I may tinker with this a little more to pass radar/early radar/spectral frames up as PHY errors if the CRC bit is set, to restore the previous behaviour (where if CRC is set on a PHY error frame, it's marked as a CRC error rather than PHY error.) Tested on: AR5416, over the air, to a USRP N200 which is generating a large number of a variety of radar pulses. TODO: Test on AR9130, AR9160, AR9280 (and maybe radar pulses on 2GHz on AR9285/AR9287.) PR: kern/169362 Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Sun Jun 24 04:29:03 2012 (r237518) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Sun Jun 24 05:59:32 2012 (r237519) @@ -228,15 +228,23 @@ ar5416ProcRxDesc(struct ath_hal *ah, str * Consequently we filter them out here so we don't * confuse and/or complicate drivers. */ - if (ads->ds_rxstatus8 & AR_CRCErr) - rs->rs_status |= HAL_RXERR_CRC; - else if (ads->ds_rxstatus8 & AR_PHYErr) { + + /* + * The AR5416 sometimes sets both AR_CRCErr and AR_PHYErr + * when reporting radar pulses. In this instance, + * clear HAL_RXERR_CRC and set HAL_RXERR_PHY. + * + * See PR kern/169362. + */ + if (ads->ds_rxstatus8 & AR_PHYErr) { u_int phyerr; rs->rs_status |= HAL_RXERR_PHY; phyerr = MS(ads->ds_rxstatus8, AR_PHYErrCode); rs->rs_phyerr = phyerr; - } else if (ads->ds_rxstatus8 & AR_DecryptCRCErr) + } else if (ads->ds_rxstatus8 & AR_CRCErr) + rs->rs_status |= HAL_RXERR_CRC; + else if (ads->ds_rxstatus8 & AR_DecryptCRCErr) rs->rs_status |= HAL_RXERR_DECRYPT; else if (ads->ds_rxstatus8 & AR_MichaelErr) rs->rs_status |= HAL_RXERR_MIC; From owner-svn-src-head@FreeBSD.ORG Sun Jun 24 06:36: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 4C570106567B; Sun, 24 Jun 2012 06:36:44 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail14.syd.optusnet.com.au (mail14.syd.optusnet.com.au [211.29.132.195]) by mx1.freebsd.org (Postfix) with ESMTP id 9CD758FC0C; Sun, 24 Jun 2012 06:36: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 mail14.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q5O6aO5W014629 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 24 Jun 2012 16:36:26 +1000 Date: Sun, 24 Jun 2012 16:36:24 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Alexander Motin In-Reply-To: <4FE6209B.7050809@FreeBSD.org> Message-ID: <20120624142958.C850@besplex.bde.org> References: <201206220713.q5M7DVH0063098@svn.freebsd.org> <20120622073455.GE69382@alchemy.franken.de> <20120622074817.GA2337@deviant.kiev.zoral.com.ua> <20120623131757.GB46065@alchemy.franken.de> <20120623140556.GU2337@deviant.kiev.zoral.com.ua> <20120624005418.W2417@besplex.bde.org> <4FE6209B.7050809@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Davide Italiano , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org, Bruce Evans , Marius Strobl , Konstantin Belousov Subject: Re: svn commit: r237434 - in head/lib/libc: amd64/sys gen i386/sys include 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, 24 Jun 2012 06:36:44 -0000 On Sat, 23 Jun 2012, Alexander Motin wrote: > On 06/23/12 18:26, Bruce Evans wrote: >> On Sat, 23 Jun 2012, Konstantin Belousov wrote: >>> On Sat, Jun 23, 2012 at 03:17:57PM +0200, Marius Strobl wrote: >>>> So apart from introducing code to constantly synchronize the >>>> TICK counters, using the timecounters on the host busses also >>>> seems to be the only viable solution for userland. The latter >>>> should be doable but is long-winded as besides duplicating >>>> portions of the corresponding device drivers in userland, it >>>> probably also means to get some additional infrastructure >>>> like being able to memory map registers for devices on the >>>> nexus(4) level in place ... >> >> There is little point in optimizations to avoid syscalls for hardware. >> On x86, a syscall takes 100-400 nsec extra, so if the hardware takes >> 500-2000 nsec then reduction the total time by 100-400 nsec is not >> very useful. > > Just out of curiosity I've run my own binuptime() micro-benchmarks: > - on Core i5-650: > TSC 11ns > HPET 433ns > ACPI-fast 515ns > i8254 3736ns The TSC is surprisingly fast and the others are depressingly slow, although about the fastest I've seen for bus-based timecounters. On Athlon64, rdtsc() takes 6.5 cycles, but I thought all P-state invariant TSCs took > 40 cycles. rdtsc() takes 65 cycles on FreeBSD x86 cluster machines (core2 Xeon), except on freefall (P4(?) Xeon). I hardly believe 11ns. That's 44 cycles at 4GHz. IIRC, the Athlon64 at 2.2GHz took 29nsec for binuptime() last time I measured it (long ago, when it still had the statistics counter pessimization). > - on dual-socket Xeon E5645: > TSC 15ns > HPET 580ns > ACPI-fast 1118ns > i8254 3911ns > > I think it could be useful to have that small benchmark in base kernel. I think kib put one in src/tools for userland. I mostly use a userland one. Except for the TSC, the overhead for the kernel parts can be estimate accurately from userland, since it is so large. This is more normal slowness for ACPI-[!]fast. freefall still uses ACPI-fast and it takes a minimum of 1396 and an average of 1729nsec from usrerland (load average 1.3). Other x86 cluster machines now use TSC-[s]low, and it takes a minimum of 481 and an average of 533nsec (now the swing from 481 to 533 is given by its gratuitous impreciseness and not by system load). BTW, the i8254 timecounter can be made about 3/2 times faster if anyone cared, by reading only the low 8 bits of the timer. This would require running clock interrupts at >= 4kHz so that the top 8 bits are rarely needed (great for a tickless kernel :-), or maybe by using a fuzzier timer to determine when the top bits are needed. At ~2500ns, it would be only slightly slower than the slowest ACPI-fast, and faster than ACPI-safe. OTOH, I have measured i8254 timer reads taking 138000ns (on UP with interrupts disabled) on a system where they normally take only 4000ns. Apparently the ISA bus waits for other bus activity (DMA?) for that long. Does this happen for other buses? Extra bridges for ISA can't help. >> ... >> The new timeout code to support tickless kernels looks like it will give >> large pessimizations unless the timecounter is fast. Instead of using >> the tick counter (1 atomic increment on every clock tick) and some >> getbinuptime() calls in places like select(), it uses the hardware >> timecounter via binuptime() in most places (since without a tick counter >> and without clock interrupts updating the timehands periodically, it takes >> a hardware timecounter read to determine the time). So callout_reset() >> might start taking thousands of nsec for per call, depending on how slow >> the timecounter is. This fix is probably to use a fuzzy time for long >> long timeouts and to discourage use of short timeouts and/or to turn them >> into long or fuzzy timeouts so that they are not very useful. > > The new timeout code is still in active development and optimization was not > the first priority yet. My idea was to use much faster getbinuptime() for > periods above let's say 100ms. You would need to run non-tickless with a clock interrupt frequency of >= 10Hz to keep getbinuptime() working. Seems like a bad thing to aim for. Better not use bintimes at all. I would try using pseudo-ticks, (where the tick counter is advanced on every not-very-periodic clock interrupt and at some other times when you know that clock interrupts have been stopped, and maybe at other interesting places (all interrupts and all syscalls?)). Only call binuptime() every few thousand pseudo-ticks to prevent long-term drift. Timeouts would become longer and fuzzier than now, but that is a feature (it inhibits using them for busy-waiting). You know when you scheduled clock interrupts and can advance the tick counter to represent the interval between clock interrupts fairly accurately (say to within 10%). The fuzziness comes mainly from not scheduling clock interrupts very often, so that for example when something asks for a sleep of 1 tick now, it might take 100 times longer because there isn't a clock interrupt for 100 times longer. You also should schedule clock interrupts just because something asks for a short timeout. > Legacy ticks-oriented callout_reset() > functions are by default not supposed to provide sub-tick resolution and with > some assumptions could use getbinuptime(). For new interfaces it depends on > caller, how will it get present time. Even 1 tick is too short. Using binuptime() encourages asking for much shorter intervals. Even for long sleeps, many places try to micro-sleep for the residual time after waking up early. E.g., nanotime(), select() and poll(). These places can also ask for an initial sleep with a resolution of nsec, usec or msec, respectively. If the timeout code actually honors these requests, then it would generate lots of clock interrupts and even more overheads by allowing more timeouts to actually expire. OTOH, supporting nano-sleeps allows nanotime() to actually approach its name. > I understand that integer tick counter is as fast as nothing else can ever > be. But sorry, 32bit counter doesn't fit present goals. To have more we need On the contrary, it becomes more adequate than with periodic ticks, since you need to reduce the tick frequency, so 32 bit works for longer. > some artificial atomicity -- exactly what getbinuptime() implements. Why would you need any atomicity? Timeouts become fuzzier (because you can't afford to generate clock interrupts to keep them as short as possible, and want to generate even fewer clock interrupts than now). Who cares if a non-atomic comparison results on more fuzziness. OTOH, if a timeout actually expires, it would be good to maintain the invariant that it never expires early, and some sort of clock that is known to never run fast (relative to all earlier times measured on it) is needed to ensure this, and some atomicity is also required for this. I think most timeouts never expire (because most are for emergency conditions), so checking the time accurately only when a timeout expires according to a fuzzy clock may be efficient enouugh. The problem is the initial time read for converting a relative time to an absolute expiry time -- unless that is accurate, the expiry time is fuzzy. > What I > would like to see there is tc_tick removal to make tc_windup() called for > every hardclock tick. That would break it. People can set HZ to 10KHz or more (I once tried 1MHz with lapic_timer, and it worked more or less correctly). Calling it that often would make the timehands cycle too fast, and tc_tick is used to prevent this. You could "fix" this by increasing the number of timehands from 10 to 1000[0..] according to HZ. > Having new tick-irrelevant callout interfaces we > probably won't so much need to increase HZ too high any more, while this > simplification would make ticks and getbinuptime() precision equal, solving > some of your valid arguments against the last. People increase HZ to do bogus polling. A periodic timer for this is at least as efficient as possible. The periodic timer for this is hung off hardclock() (hardclock() calls hardclock_device_poll() unconditionally iff DEVICE_POLLING is configured). This avoids the overhead of re-arming the period timer on every clock tick. It would be a good pessimization to use the standard callout interface for this. A tickless kernel should go the other way and not call tc_ticktock() every clock tick. It should do the tc_tick counting itself (since it uses virtual ticks or at least ticks of a highly variable and fuzzy length and only it should have a vague idea about the tick lengths). It needs to call tc_windup() often enough. Only the timecounter code really knows how often this is, but this must have some interaction with the tickless code since lots of ticks (clock interrupts) may be needed to keep timecounters working. The main problem is that hardware timecounters may wrap if you don't call them often enough. This problem is largest for the i8254 timecounter when the clock interrupt source is also the i8254. Then: - clock interrupts must be scheduled at least as often as the i8254 wraps (at least every 54.9ms, so HZ must be > 18 with periodic ticks). Else the time must be recovered from somewhere else and the timecounter reinitialized before any timecounter interface is used again (same as after resume, except you might have to do this every 54.9ms) - the timecounter must be read at least as often as its hardware wraps. This is normally accomplished by reading it on every clock interrupt. tc_tick must be 1 for this. A bug in the current initialization of tc_tick is now clear: suppose someone uses the i8254 timecounter and has HZ > 1000. Then tc_tick > 1 and the timecounter is broken. The i8254 can easily support much larger HZ than this. I used to try to keep pcaudio maintained to test corner cases in timers. pcaudio set the i8254 interrupt frequency to 62.5 kHz (?), though it only called hardclock at a frequency of HZ (normally 100). The timecounter read in tc_windup() is now inadequate for avoiding wrap. So the pcaudio low-level code virtualized the timecounter hardware by updating counts on every i8254 interrupt. Only the low-level code sees every interrupt. Other timecounter hardware that wraps too often should probably be handled similarly, but clock interrupts (possibly from another source) would be needed to keep it going. I don't know of any other x86 hardware timecounters that wrap too fast. The 32 bits of the TSC that are used wrap after ~1 second at 4GHz. Apart from the problems with the i8254, there are few or no reasons to call tc_windup() very often. Every 1 second is probably enough. I always use HZ=100 and every 1/100 second is enough. The default is at most every 1/1000 second. This seems to be mainly to keep the i8254 working up to the default HZ although it is broken above that. ntpd only updates things every 64 seconds or so. By calling tc_windup() very often, you mainly see each of thse updates take effect after only 1-10 msec. The most interesting case is after a leap second is inserted. Now it is good to see the leap second immediately, and even a delay of 1 msec may be too long. Bruce From owner-svn-src-head@FreeBSD.ORG Sun Jun 24 06:37: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 950A71065673; Sun, 24 Jun 2012 06:37:29 +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 7FB1A8FC16; Sun, 24 Jun 2012 06:37: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 q5O6bTGZ092274; Sun, 24 Jun 2012 06:37:29 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5O6bTHN092272; Sun, 24 Jun 2012 06:37:29 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201206240637.q5O6bTHN092272@svn.freebsd.org> From: Adrian Chadd Date: Sun, 24 Jun 2012 06:37: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: r237521 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 24 Jun 2012 06:37:29 -0000 Author: adrian Date: Sun Jun 24 06:37:28 2012 New Revision: 237521 URL: http://svn.freebsd.org/changeset/base/237521 Log: On second thought, let's just set both CRC and PHY errors together on frames that have it and let the upper layer sort it out. PR: kern/169362 Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Sun Jun 24 06:00:29 2012 (r237520) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Sun Jun 24 06:37:28 2012 (r237521) @@ -231,8 +231,9 @@ ar5416ProcRxDesc(struct ath_hal *ah, str /* * The AR5416 sometimes sets both AR_CRCErr and AR_PHYErr - * when reporting radar pulses. In this instance, - * clear HAL_RXERR_CRC and set HAL_RXERR_PHY. + * when reporting radar pulses. In this instance + * set HAL_RXERR_PHY as well as HAL_RXERR_CRC and + * let the driver layer figure out what to do. * * See PR kern/169362. */ @@ -242,7 +243,9 @@ ar5416ProcRxDesc(struct ath_hal *ah, str rs->rs_status |= HAL_RXERR_PHY; phyerr = MS(ads->ds_rxstatus8, AR_PHYErrCode); rs->rs_phyerr = phyerr; - } else if (ads->ds_rxstatus8 & AR_CRCErr) + } + + if (ads->ds_rxstatus8 & AR_CRCErr) rs->rs_status |= HAL_RXERR_CRC; else if (ads->ds_rxstatus8 & AR_DecryptCRCErr) rs->rs_status |= HAL_RXERR_DECRYPT; From owner-svn-src-head@FreeBSD.ORG Sun Jun 24 07:01: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 E5A3E1065670; Sun, 24 Jun 2012 07:01:49 +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 D04468FC0A; Sun, 24 Jun 2012 07:01: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 q5O71nC1093566; Sun, 24 Jun 2012 07:01:49 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5O71nu1093561; Sun, 24 Jun 2012 07:01:49 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201206240701.q5O71nu1093561@svn.freebsd.org> From: Adrian Chadd Date: Sun, 24 Jun 2012 07:01: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: r237522 - in head/sys: conf 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: Sun, 24 Jun 2012 07:01:50 -0000 Author: adrian Date: Sun Jun 24 07:01:49 2012 New Revision: 237522 URL: http://svn.freebsd.org/changeset/base/237522 Log: Introduce an optional ath(4) radiotap vendor extension. This includes a few new fields in each RXed frame: * per chain RX RSSI (ctl and ext); * current RX chainmask; * EVM information; * PHY error code; * basic RX status bits (CRC error, PHY error, etc). This is primarily to allow me to do some userland PHY error processing for radar and spectral scan data. However since EVM and per-chain RSSI is provided, others may find it useful for a variety of tasks. The default is to not compile in the radiotap vendor extensions, primarily because tcpdump doesn't seem to handle the particular vendor extension layout I'm using, and I'd rather not break existing code out there that may be (badly) parsing the radiotap data. Instead, add the option 'ATH_ENABLE_RADIOTAP_VENDOR_EXT' to your kernel configuration file to enable these options. Modified: head/sys/conf/options head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_rx.c head/sys/dev/ath/if_athioctl.h Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Sun Jun 24 06:37:28 2012 (r237521) +++ head/sys/conf/options Sun Jun 24 07:01:49 2012 (r237522) @@ -783,6 +783,7 @@ ATH_TX99_DIAG opt_ath.h ATH_ENABLE_11N opt_ath.h ATH_ENABLE_DFS opt_ath.h ATH_EEPROM_FIRMWARE opt_ath.h +ATH_ENABLE_RADIOTAP_VENDOR_EXT opt_ath.h # options for the Atheros hal AH_SUPPORT_AR5416 opt_ah.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sun Jun 24 06:37:28 2012 (r237521) +++ head/sys/dev/ath/if_ath.c Sun Jun 24 07:01:49 2012 (r237522) @@ -799,11 +799,26 @@ ath_attach(u_int16_t devid, struct ath_s ic->ic_update_chw = ath_update_chw; #endif /* ATH_ENABLE_11N */ +#ifdef ATH_ENABLE_RADIOTAP_VENDOR_EXT + /* + * There's one vendor bitmap entry in the RX radiotap + * header; make sure that's taken into account. + */ + ieee80211_radiotap_attachv(ic, + &sc->sc_tx_th.wt_ihdr, sizeof(sc->sc_tx_th), 0, + ATH_TX_RADIOTAP_PRESENT, + &sc->sc_rx_th.wr_ihdr, sizeof(sc->sc_rx_th), 1, + ATH_RX_RADIOTAP_PRESENT); +#else + /* + * No vendor bitmap/extensions are present. + */ ieee80211_radiotap_attach(ic, &sc->sc_tx_th.wt_ihdr, sizeof(sc->sc_tx_th), ATH_TX_RADIOTAP_PRESENT, &sc->sc_rx_th.wr_ihdr, sizeof(sc->sc_rx_th), ATH_RX_RADIOTAP_PRESENT); +#endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */ /* * Setup dynamic sysctl's now that country code and Modified: head/sys/dev/ath/if_ath_rx.c ============================================================================== --- head/sys/dev/ath/if_ath_rx.c Sun Jun 24 06:37:28 2012 (r237521) +++ head/sys/dev/ath/if_ath_rx.c Sun Jun 24 07:01:49 2012 (r237522) @@ -354,6 +354,55 @@ ath_recv_mgmt(struct ieee80211_node *ni, } } +#ifdef ATH_ENABLE_RADIOTAP_VENDOR_EXT +static void +ath_rx_tap_vendor(struct ifnet *ifp, struct mbuf *m, + const struct ath_rx_status *rs, u_int64_t tsf, int16_t nf) +{ + struct ath_softc *sc = ifp->if_softc; + + /* Fill in the extension bitmap */ + sc->sc_rx_th.wr_ext_bitmap = htole32(1 << ATH_RADIOTAP_VENDOR_HEADER); + + /* Fill in the vendor header */ + sc->sc_rx_th.wr_vh.vh_oui[0] = 0x7f; + sc->sc_rx_th.wr_vh.vh_oui[1] = 0x03; + sc->sc_rx_th.wr_vh.vh_oui[2] = 0x00; + + /* XXX what should this be? */ + sc->sc_rx_th.wr_vh.vh_sub_ns = 0; + sc->sc_rx_th.wr_vh.vh_skip_len = + htole16(sizeof(struct ath_radiotap_vendor_hdr)); + + /* General version info */ + sc->sc_rx_th.wr_v.vh_version = 1; + + sc->sc_rx_th.wr_v.vh_rx_chainmask = sc->sc_rxchainmask; + + /* rssi */ + sc->sc_rx_th.wr_v.rssi_ctl[0] = rs->rs_rssi_ctl[0]; + sc->sc_rx_th.wr_v.rssi_ctl[1] = rs->rs_rssi_ctl[1]; + sc->sc_rx_th.wr_v.rssi_ctl[2] = rs->rs_rssi_ctl[2]; + sc->sc_rx_th.wr_v.rssi_ext[0] = rs->rs_rssi_ext[0]; + sc->sc_rx_th.wr_v.rssi_ext[1] = rs->rs_rssi_ext[1]; + sc->sc_rx_th.wr_v.rssi_ext[2] = rs->rs_rssi_ext[2]; + + /* evm */ + sc->sc_rx_th.wr_v.evm[0] = rs->rs_evm0; + sc->sc_rx_th.wr_v.evm[1] = rs->rs_evm1; + sc->sc_rx_th.wr_v.evm[2] = rs->rs_evm2; + /* XXX TODO: extend this to include 3-stream EVM */ + + /* phyerr info */ + if (rs->rs_status & HAL_RXERR_PHY) + sc->sc_rx_th.wr_v.vh_phyerr_code = rs->rs_phyerr; + else + sc->sc_rx_th.wr_v.vh_phyerr_code = 0xff; + sc->sc_rx_th.wr_v.vh_rs_status = rs->rs_status; + sc->sc_rx_th.wr_v.vh_rssi = rs->rs_rssi; +} +#endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */ + static void ath_rx_tap(struct ifnet *ifp, struct mbuf *m, const struct ath_rx_status *rs, u_int64_t tsf, int16_t nf) @@ -552,6 +601,9 @@ rx_error: m->m_pkthdr.len = m->m_len = len; bf->bf_m = NULL; ath_rx_tap(ifp, m, rs, rstamp, nf); +#ifdef ATH_ENABLE_RADIOTAP_VENDOR_EXT + ath_rx_tap_vendor(ifp, m, rs, rstamp, nf); +#endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */ ieee80211_radiotap_rx_all(ic, m); m_freem(m); } @@ -646,8 +698,12 @@ rx_accept: * material required by ieee80211_input. Note that * noise setting is filled in above. */ - if (ieee80211_radiotap_active(ic)) + if (ieee80211_radiotap_active(ic)) { ath_rx_tap(ifp, m, rs, rstamp, nf); +#ifdef ATH_ENABLE_RADIOTAP_VENDOR_EXT + ath_rx_tap_vendor(ifp, m, rs, rstamp, nf); +#endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */ + } /* * From this point on we assume the frame is at least Modified: head/sys/dev/ath/if_athioctl.h ============================================================================== --- head/sys/dev/ath/if_athioctl.h Sun Jun 24 06:37:28 2012 (r237521) +++ head/sys/dev/ath/if_athioctl.h Sun Jun 24 07:01:49 2012 (r237522) @@ -187,7 +187,7 @@ struct ath_diag { /* * Radio capture format. */ -#define ATH_RX_RADIOTAP_PRESENT ( \ +#define ATH_RX_RADIOTAP_PRESENT_BASE ( \ (1 << IEEE80211_RADIOTAP_TSFT) | \ (1 << IEEE80211_RADIOTAP_FLAGS) | \ (1 << IEEE80211_RADIOTAP_RATE) | \ @@ -197,8 +197,80 @@ struct ath_diag { (1 << IEEE80211_RADIOTAP_XCHANNEL) | \ 0) +#ifdef ATH_ENABLE_RADIOTAP_VENDOR_EXT +#define ATH_RX_RADIOTAP_PRESENT \ + (ATH_RX_RADIOTAP_PRESENT_BASE | \ + (1 << IEEE80211_RADIOTAP_VENDOREXT) | \ + (1 << IEEE80211_RADIOTAP_EXT) | \ + 0) +#else +#define ATH_RX_RADIOTAP_PRESENT ATH_RX_RADIOTAP_PRESENT_BASE +#endif /* ATH_ENABLE_RADIOTAP_PRESENT */ + +#ifdef ATH_ENABLE_RADIOTAP_VENDOR_EXT +/* + * This is higher than the vendor bitmap used inside + * the Atheros reference codebase. + */ + +/* Bit 8 */ +#define ATH_RADIOTAP_VENDOR_HEADER 8 + +/* + * Using four chains makes all the fields in the + * per-chain info header be 4-byte aligned. + */ +#define ATH_RADIOTAP_MAX_CHAINS 4 + +/* + * The vendor radiotap header data needs to be: + * + * + Aligned to a 4 byte address + * + .. so all internal fields are 4 bytes aligned; + * + .. and no 64 bit fields are allowed. + * + * So padding is required to ensure this is the case. + * + * Note that because of the lack of alignment with the + * vendor header (6 bytes), the first field must be + * two bytes so it can be accessed by alignment-strict + * platform (eg MIPS.) + */ +struct ath_radiotap_vendor_hdr { /* 30 bytes */ + uint8_t vh_version; /* 1 */ + uint8_t vh_rx_chainmask; /* 1 */ + + /* At this point it should be 4 byte aligned */ + uint32_t evm[ATH_RADIOTAP_MAX_CHAINS]; /* 4 * 4 = 16 */ + + uint8_t rssi_ctl[ATH_RADIOTAP_MAX_CHAINS]; /* 4 */ + uint8_t rssi_ext[ATH_RADIOTAP_MAX_CHAINS]; /* 4 */ + + uint8_t vh_phyerr_code; /* Phy error code, or 0xff */ + uint8_t vh_rs_status; /* RX status */ + uint8_t vh_rssi; /* Raw RSSI */ + uint8_t vh_pad1[1]; /* Pad to 4 byte boundary */ +} __packed; +#endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */ + struct ath_rx_radiotap_header { struct ieee80211_radiotap_header wr_ihdr; + +#ifdef ATH_ENABLE_RADIOTAP_VENDOR_EXT + /* Vendor extension header bitmap */ + uint32_t wr_ext_bitmap; /* 4 */ + + /* + * This padding is needed because: + * + the radiotap header is 8 bytes; + * + the extension bitmap is 4 bytes; + * + the tsf is 8 bytes, so it must start on an 8 byte + * boundary. + */ + uint32_t wr_pad1; +#endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */ + + /* Normal radiotap fields */ u_int64_t wr_tsf; u_int8_t wr_flags; u_int8_t wr_rate; @@ -210,6 +282,26 @@ struct ath_rx_radiotap_header { u_int16_t wr_chan_freq; u_int8_t wr_chan_ieee; int8_t wr_chan_maxpow; + +#ifdef ATH_ENABLE_RADIOTAP_VENDOR_EXT + /* + * Vendor header section, as required by the + * presence of the vendor extension bit and bitmap + * entry. + * + * XXX This must be aligned to a 4 byte address? + * XXX or 8 byte address? + */ + struct ieee80211_radiotap_vendor_header wr_vh; /* 6 bytes */ + + /* + * Because of the lack of alignment enforced by the above + * header, this vendor section won't be aligned in any + * useful way. So, this will include a two-byte version + * value which will force the structure to be 4-byte aligned. + */ + struct ath_radiotap_vendor_hdr wr_v; +#endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */ } __packed; #define ATH_TX_RADIOTAP_PRESENT ( \ From owner-svn-src-head@FreeBSD.ORG Sun Jun 24 07:03: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 014101065675; Sun, 24 Jun 2012 07:03:23 +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 E0ADA8FC0C; Sun, 24 Jun 2012 07:03: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 q5O73Msu093663; Sun, 24 Jun 2012 07:03:22 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5O73MvB093661; Sun, 24 Jun 2012 07:03:22 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201206240703.q5O73MvB093661@svn.freebsd.org> From: Eitan Adler Date: Sun, 24 Jun 2012 07:03: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: r237523 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jun 2012 07:03:23 -0000 Author: eadler Date: Sun Jun 24 07:03:22 2012 New Revision: 237523 URL: http://svn.freebsd.org/changeset/base/237523 Log: Remove the assert added in r237286 The use of assertions in libraries is not widely accepted. Requested by: bde, scottl Approved by: cperciva MFC after: 3 days X-MFC-With: r237286 Modified: head/lib/libc/gen/syslog.c Modified: head/lib/libc/gen/syslog.c ============================================================================== --- head/lib/libc/gen/syslog.c Sun Jun 24 07:01:49 2012 (r237522) +++ head/lib/libc/gen/syslog.c Sun Jun 24 07:03:22 2012 (r237523) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -414,7 +413,6 @@ void closelog(void) { THREAD_LOCK(); - assert(LogFile >= -1); if (LogFile != -1) { (void)_close(LogFile); LogFile = -1; From owner-svn-src-head@FreeBSD.ORG Sun Jun 24 07:13: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 6827A106567A; Sun, 24 Jun 2012 07:13:05 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail30.syd.optusnet.com.au (mail30.syd.optusnet.com.au [211.29.133.193]) by mx1.freebsd.org (Postfix) with ESMTP id DA7F48FC16; Sun, 24 Jun 2012 07:13:04 +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 mail30.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q5O7CuHZ002266 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 24 Jun 2012 17:12:57 +1000 Date: Sun, 24 Jun 2012 17:12:56 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Eitan Adler In-Reply-To: <201206240703.q5O73MvB093661@svn.freebsd.org> Message-ID: <20120624171237.H1297@besplex.bde.org> References: <201206240703.q5O73MvB093661@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: r237523 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jun 2012 07:13:05 -0000 On Sun, 24 Jun 2012, Eitan Adler wrote: > Log: > Remove the assert added in r237286 > The use of assertions in libraries is not widely accepted. > > Requested by: bde, scottl > Approved by: cperciva Thanks. Bruce From owner-svn-src-head@FreeBSD.ORG Sun Jun 24 07:54: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 8F4611065670; Sun, 24 Jun 2012 07:54:29 +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 78E368FC08; Sun, 24 Jun 2012 07:54: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 q5O7sTeU096046; Sun, 24 Jun 2012 07:54:29 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5O7sTck096044; Sun, 24 Jun 2012 07:54:29 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201206240754.q5O7sTck096044@svn.freebsd.org> From: Joel Dahl Date: Sun, 24 Jun 2012 07:54: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: r237525 - head/lib/libedit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 24 Jun 2012 07:54:29 -0000 Author: joel (doc committer) Date: Sun Jun 24 07:54:28 2012 New Revision: 237525 URL: http://svn.freebsd.org/changeset/base/237525 Log: Fix mandoc "Oc breaks Op" warning. Modified: head/lib/libedit/editrc.5 Modified: head/lib/libedit/editrc.5 ============================================================================== --- head/lib/libedit/editrc.5 Sun Jun 24 07:10:34 2012 (r237524) +++ head/lib/libedit/editrc.5 Sun Jun 24 07:54:28 2012 (r237525) @@ -90,7 +90,7 @@ shell. The following builtin commands are available: .Bl -tag -width 4n .It Ic bind Oo Fl a Oc Oo Fl e Oc Oo Fl k Oc Oo Fl l Oc Oo Fl r Oc \ -Oo Fl s Oc Oo Fl v Oc Oo Ar key Op Ar command Oc +Oo Fl s Oc Oo Fl v Oc Oo Ar key Oo Ar command Oc Oc Without options, list all bound keys, and the editor command to which each is bound. If From owner-svn-src-head@FreeBSD.ORG Sun Jun 24 08:09:07 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 560CC1065670; Sun, 24 Jun 2012 08:09:07 +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 407D88FC08; Sun, 24 Jun 2012 08:09: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 q5O8978V096750; Sun, 24 Jun 2012 08:09:07 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5O897Wv096746; Sun, 24 Jun 2012 08:09:07 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201206240809.q5O897Wv096746@svn.freebsd.org> From: Adrian Chadd Date: Sun, 24 Jun 2012 08:09: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: r237526 - in head/sys/dev/ath: . ath_dfs/null X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 24 Jun 2012 08:09:07 -0000 Author: adrian Date: Sun Jun 24 08:09:06 2012 New Revision: 237526 URL: http://svn.freebsd.org/changeset/base/237526 Log: Change the ath_dfs_process_phy_err() method to take an mbuf rather than a buffer pointer. For large radar pulses, the AR9130 and later will return a series of FFT results for software processing. These can overflow a single 2KB buffer on longer pulses. This would result in undefined buffer behaviour. Modified: head/sys/dev/ath/ath_dfs/null/dfs_null.c head/sys/dev/ath/if_ath_rx.c head/sys/dev/ath/if_athdfs.h Modified: head/sys/dev/ath/ath_dfs/null/dfs_null.c ============================================================================== --- head/sys/dev/ath/ath_dfs/null/dfs_null.c Sun Jun 24 07:54:28 2012 (r237525) +++ head/sys/dev/ath/ath_dfs/null/dfs_null.c Sun Jun 24 08:09:06 2012 (r237526) @@ -102,7 +102,7 @@ __FBSDID("$FreeBSD$"); int ath_dfs_attach(struct ath_softc *sc) { - return 1; + return (1); } /* @@ -111,11 +111,12 @@ ath_dfs_attach(struct ath_softc *sc) int ath_dfs_detach(struct ath_softc *sc) { - return 1; + return (1); } /* - * Enable radar check + * Enable radar check. Return 1 if the driver should + * enable radar PHY errors, or 0 if not. */ int ath_dfs_radar_enable(struct ath_softc *sc, struct ieee80211_channel *chan) @@ -163,9 +164,12 @@ ath_dfs_radar_enable(struct ath_softc *s /* * Process DFS related PHY errors + * + * The mbuf is not "ours" and if we want a copy, we have + * to take a copy. It'll be freed after this function returns. */ void -ath_dfs_process_phy_err(struct ath_softc *sc, const char *buf, +ath_dfs_process_phy_err(struct ath_softc *sc, struct mbuf *m, uint64_t tsf, struct ath_rx_status *rxstat) { @@ -182,7 +186,7 @@ int ath_dfs_process_radar_event(struct ath_softc *sc, struct ieee80211_channel *chan) { - return 0; + return (0); } /* @@ -195,7 +199,7 @@ ath_dfs_process_radar_event(struct ath_s int ath_dfs_tasklet_needed(struct ath_softc *sc, struct ieee80211_channel *chan) { - return 0; + return (0); } /* @@ -272,7 +276,7 @@ bad: free(indata, M_TEMP); if ((ad->ad_id & ATH_DIAG_DYN) && outdata != NULL) free(outdata, M_TEMP); - return error; + return (error); } /* @@ -282,5 +286,5 @@ int ath_dfs_get_thresholds(struct ath_softc *sc, HAL_PHYERR_PARAM *param) { ath_hal_getdfsthresh(sc->sc_ah, param); - return 1; + return (1); } Modified: head/sys/dev/ath/if_ath_rx.c ============================================================================== --- head/sys/dev/ath/if_ath_rx.c Sun Jun 24 07:54:28 2012 (r237525) +++ head/sys/dev/ath/if_ath_rx.c Sun Jun 24 08:09:06 2012 (r237526) @@ -536,7 +536,7 @@ ath_rx_pkt(struct ath_softc *sc, struct bf->bf_dmamap, BUS_DMASYNC_POSTREAD); /* Now pass it to the radar processing code */ - ath_dfs_process_phy_err(sc, mtod(m, char *), rstamp, rs); + ath_dfs_process_phy_err(sc, m, rstamp, rs); } /* Be suitably paranoid about receiving phy errors out of the stats array bounds */ Modified: head/sys/dev/ath/if_athdfs.h ============================================================================== --- head/sys/dev/ath/if_athdfs.h Sun Jun 24 07:54:28 2012 (r237525) +++ head/sys/dev/ath/if_athdfs.h Sun Jun 24 08:09:06 2012 (r237526) @@ -35,7 +35,7 @@ extern int ath_dfs_attach(struct ath_sof extern int ath_dfs_detach(struct ath_softc *sc); extern int ath_dfs_radar_enable(struct ath_softc *, struct ieee80211_channel *chan); -extern void ath_dfs_process_phy_err(struct ath_softc *sc, const char *buf, +extern void ath_dfs_process_phy_err(struct ath_softc *sc, struct mbuf *m, uint64_t tsf, struct ath_rx_status *rxstat); extern int ath_dfs_process_radar_event(struct ath_softc *sc, struct ieee80211_channel *chan); From owner-svn-src-head@FreeBSD.ORG Sun Jun 24 08:28: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 DFADE106566B; Sun, 24 Jun 2012 08:28:06 +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 CB6098FC12; Sun, 24 Jun 2012 08:28: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 q5O8S61M097565; Sun, 24 Jun 2012 08:28:06 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5O8S6Kf097563; Sun, 24 Jun 2012 08:28:06 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201206240828.q5O8S6Kf097563@svn.freebsd.org> From: Adrian Chadd Date: Sun, 24 Jun 2012 08:28: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: r237527 - 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: Sun, 24 Jun 2012 08:28:07 -0000 Author: adrian Date: Sun Jun 24 08:28:06 2012 New Revision: 237527 URL: http://svn.freebsd.org/changeset/base/237527 Log: Shuffle these initialisations to where they should be. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sun Jun 24 08:09:06 2012 (r237526) +++ head/sys/dev/ath/if_ath.c Sun Jun 24 08:28:06 2012 (r237527) @@ -723,6 +723,13 @@ ath_attach(u_int16_t devid, struct ath_s #endif /* + * Initial aggregation settings. + */ + sc->sc_hwq_limit = ATH_AGGR_MIN_QDEPTH; + sc->sc_tid_hwq_lo = ATH_AGGR_SCHED_LOW; + sc->sc_tid_hwq_hi = ATH_AGGR_SCHED_HIGH; + + /* * Check if the hardware requires PCI register serialisation. * Some of the Owl based MACs require this. */ @@ -1824,13 +1831,6 @@ ath_init(void *arg) sc->sc_beacons = 0; /* - * Initial aggregation settings. - */ - sc->sc_hwq_limit = ATH_AGGR_MIN_QDEPTH; - sc->sc_tid_hwq_lo = ATH_AGGR_SCHED_LOW; - sc->sc_tid_hwq_hi = ATH_AGGR_SCHED_HIGH; - - /* * Setup the hardware after reset: the key cache * is filled as needed and the receive engine is * set going. Frame transmit is handled entirely From owner-svn-src-head@FreeBSD.ORG Sun Jun 24 08:43: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 91AAE106566B; Sun, 24 Jun 2012 08:43:34 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D1D08FC0A; Sun, 24 Jun 2012 08:43: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 q5O8hYMw098201; Sun, 24 Jun 2012 08:43:34 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5O8hYmo098199; Sun, 24 Jun 2012 08:43:34 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201206240843.q5O8hYmo098199@svn.freebsd.org> From: Andrew Turner Date: Sun, 24 Jun 2012 08:43: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: r237528 - head/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: Sun, 24 Jun 2012 08:43:34 -0000 Author: andrew Date: Sun Jun 24 08:43:34 2012 New Revision: 237528 URL: http://svn.freebsd.org/changeset/base/237528 Log: Create a symlink to sys/elf32.h, sys/elf64.h, and sys/elf_common.h. When building libelf in the bootstrap stage this would include the tree versions of, for example, sys/_types.h. This would work as long as the tree's version of this file was close enough to the system's version of the file. If, however, there was a change in the tree such that the location of a typedef was moved this would cause problems. In this case the version of sys/_types.h in the tree no longer defines __wchar_t and expects it to to be defined in machine/_types.h, however we pick up machine/_types.h from the system and find it is not defined there. The solution is to restrict the parts of sys er include from the tree to those that are needed. This fixes the recent Tinderbox failure. Pointy Hat to: andrew Modified: head/lib/libelf/Makefile Modified: head/lib/libelf/Makefile ============================================================================== --- head/lib/libelf/Makefile Sun Jun 24 08:28:06 2012 (r237527) +++ head/lib/libelf/Makefile Sun Jun 24 08:43:34 2012 (r237528) @@ -55,9 +55,23 @@ SRCS= elf_begin.c \ ${GENSRCS} INCS= libelf.h gelf.h +# +# We need to link against the correct version of these files. One +# solution is to include ../../sys in the include path. This causes +# problems when a header file in sys depends on a file in another +# part of the tree, e.g. a machine dependent header. +# +SRCS+= sys/elf32.h sys/elf64.h sys/elf_common.h + GENSRCS= libelf_fsize.c libelf_msize.c libelf_convert.c CLEANFILES= ${GENSRCS} -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../sys +CFLAGS+= -I${.CURDIR} -I. + +sys/elf32.h sys/elf64.h sys/elf_common.h: sys + ln -sf ${.CURDIR}/../../sys/${.TARGET} ${.TARGET} + +sys: + mkdir -p ${.OBJDIR}/sys SHLIB_MAJOR= 1 From owner-svn-src-head@FreeBSD.ORG Sun Jun 24 08:47: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 9F571106564A; Sun, 24 Jun 2012 08:47: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 88EF48FC0A; Sun, 24 Jun 2012 08:47: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 q5O8lK9i098504; Sun, 24 Jun 2012 08:47:20 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5O8lK29098498; Sun, 24 Jun 2012 08:47:20 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201206240847.q5O8lK29098498@svn.freebsd.org> From: Adrian Chadd Date: Sun, 24 Jun 2012 08:47: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: r237529 - in head/sys/dev/ath: . ath_dfs/null ath_rate/amrr ath_rate/onoe ath_rate/sample X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 24 Jun 2012 08:47:20 -0000 Author: adrian Date: Sun Jun 24 08:47:19 2012 New Revision: 237529 URL: http://svn.freebsd.org/changeset/base/237529 Log: In a complete lack of foresight on my part, my previous commit broke the assumption that ath_softc doesn't change size based on build time configuration. I picked up on this because suddenly radar stuff didn't work; and although the ath_dfs code was setting sc_dodfs=1, the main ath driver saw sc_dodfs=0. So for now, include opt_ath.h in driver source files. This seems like the sane thing to do anyway. I'll have to do a pass over the code at some later stage and turn the radiotap TX/RX structs into malloc'ed memory, rather than in-line inside of ath_softc. I'd rather like to keep ath_softc the same layout regardless of configuration parameters. Pointy hat to: adrian Modified: head/sys/dev/ath/ath_dfs/null/dfs_null.c head/sys/dev/ath/ath_rate/amrr/amrr.c head/sys/dev/ath/ath_rate/onoe/onoe.c head/sys/dev/ath/ath_rate/sample/sample.c head/sys/dev/ath/if_ath_ahb.c Modified: head/sys/dev/ath/ath_dfs/null/dfs_null.c ============================================================================== --- head/sys/dev/ath/ath_dfs/null/dfs_null.c Sun Jun 24 08:43:34 2012 (r237528) +++ head/sys/dev/ath/ath_dfs/null/dfs_null.c Sun Jun 24 08:47:19 2012 (r237529) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); /* * This implements an empty DFS module. */ +#include "opt_ath.h" #include "opt_inet.h" #include "opt_wlan.h" Modified: head/sys/dev/ath/ath_rate/amrr/amrr.c ============================================================================== --- head/sys/dev/ath/ath_rate/amrr/amrr.c Sun Jun 24 08:43:34 2012 (r237528) +++ head/sys/dev/ath/ath_rate/amrr/amrr.c Sun Jun 24 08:47:19 2012 (r237529) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); * "IEEE 802.11 Rate Adaptation: A Practical Approach" by * Mathieu Lacage, Hossein Manshaei, Thierry Turletti */ +#include "opt_ath.h" #include "opt_inet.h" #include "opt_wlan.h" Modified: head/sys/dev/ath/ath_rate/onoe/onoe.c ============================================================================== --- head/sys/dev/ath/ath_rate/onoe/onoe.c Sun Jun 24 08:43:34 2012 (r237528) +++ head/sys/dev/ath/ath_rate/onoe/onoe.c Sun Jun 24 08:47:19 2012 (r237529) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); /* * Atsushi Onoe's rate control algorithm. */ +#include "opt_ath.h" #include "opt_inet.h" #include "opt_wlan.h" Modified: head/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- head/sys/dev/ath/ath_rate/sample/sample.c Sun Jun 24 08:43:34 2012 (r237528) +++ head/sys/dev/ath/ath_rate/sample/sample.c Sun Jun 24 08:47:19 2012 (r237529) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); /* * John Bicket's SampleRate control algorithm. */ +#include "opt_ath.h" #include "opt_inet.h" #include "opt_wlan.h" #include "opt_ah.h" Modified: head/sys/dev/ath/if_ath_ahb.c ============================================================================== --- head/sys/dev/ath/if_ath_ahb.c Sun Jun 24 08:43:34 2012 (r237528) +++ head/sys/dev/ath/if_ath_ahb.c Sun Jun 24 08:47:19 2012 (r237529) @@ -35,6 +35,8 @@ __FBSDID("$FreeBSD$"); * AHB bus front-end for the Atheros Wireless LAN controller driver. */ +#include "opt_ath.h" + #include #include #include From owner-svn-src-head@FreeBSD.ORG Sun Jun 24 09:19: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 E9B38106567B; Sun, 24 Jun 2012 09:19:24 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D49968FC15; Sun, 24 Jun 2012 09:19: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 q5O9JO66000224; Sun, 24 Jun 2012 09:19:24 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5O9JO7n000222; Sun, 24 Jun 2012 09:19:24 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201206240919.q5O9JO7n000222@svn.freebsd.org> From: Andrew Turner Date: Sun, 24 Jun 2012 09:19: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: r237531 - head/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: Sun, 24 Jun 2012 09:19:25 -0000 Author: andrew Date: Sun Jun 24 09:19:24 2012 New Revision: 237531 URL: http://svn.freebsd.org/changeset/base/237531 Log: Add the sys directory we create to the list of items to clean. Modified: head/lib/libelf/Makefile Modified: head/lib/libelf/Makefile ============================================================================== --- head/lib/libelf/Makefile Sun Jun 24 09:12:49 2012 (r237530) +++ head/lib/libelf/Makefile Sun Jun 24 09:19:24 2012 (r237531) @@ -65,6 +65,7 @@ SRCS+= sys/elf32.h sys/elf64.h sys/elf_c GENSRCS= libelf_fsize.c libelf_msize.c libelf_convert.c CLEANFILES= ${GENSRCS} +CLEANDIRS= sys CFLAGS+= -I${.CURDIR} -I. sys/elf32.h sys/elf64.h sys/elf_common.h: sys From owner-svn-src-head@FreeBSD.ORG Sun Jun 24 17:30: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 E46DE1065673; Sun, 24 Jun 2012 17:30:54 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD4EC8FC1A; Sun, 24 Jun 2012 17: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 q5OHUsMi022543; Sun, 24 Jun 2012 17:30:54 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5OHUsF9022536; Sun, 24 Jun 2012 17:30:54 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201206241730.q5OHUsF9022536@svn.freebsd.org> From: Matt Jacob Date: Sun, 24 Jun 2012 17: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: r237537 - head/sys/dev/isp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 24 Jun 2012 17:30:55 -0000 Author: mjacob Date: Sun Jun 24 17:30:54 2012 New Revision: 237537 URL: http://svn.freebsd.org/changeset/base/237537 Log: Clean up multi-id mode so it's driven by the f/w loaded, not by some hint setting. Do more preparations for FC-Tape. Clean up resource counting for 24XX or later chipsets so we find out after EXEC_FIRMWARE what is actually supported. Set target mode exchange count based upon whether or not we are supporting simultaneous target/initiator mode. Clean up some old (pre-24XX) xfwoption and zfwoption issues. Sponsored by: Spectralogic MFC after: 3 days Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h head/sys/dev/isp/isp_pci.c head/sys/dev/isp/ispmbox.h head/sys/dev/isp/ispvar.h Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Sun Jun 24 17:02:28 2012 (r237536) +++ head/sys/dev/isp/isp.c Sun Jun 24 17:30:54 2012 (r237537) @@ -1088,7 +1088,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d isp->isp_fwattr = mbs.param[6]; } if (IS_24XX(isp) && (isp->isp_fwattr & ISP2400_FW_ATTR_EXTNDED)) { - isp->isp_fwattr ^= ISP2400_FW_ATTR_EXTNDED; isp->isp_fwattr |= (((uint64_t) mbs.param[15]) << 16) | (((uint64_t) mbs.param[16]) << 32) | (((uint64_t) mbs.param[17]) << 48); } } else if (IS_SCSI(isp)) { @@ -1140,7 +1139,8 @@ isp_reset(ispsoftc_t *isp, int do_load_d } fwt &= ~ISP2400_FW_ATTR_EXTNDED; if (fwt) { - ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s (unknown 0x%jx)", buf, (uintmax_t)fwt); + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s (unknown 0x%08x%08x)", buf, + (uint32_t) (fwt >> 32), (uint32_t) fwt); } isp_prt(isp, ISP_LOGCONFIG, "%s", buf); } else if (IS_FC(isp)) { @@ -1183,12 +1183,23 @@ isp_reset(ispsoftc_t *isp, int do_load_d ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s 2K-Login", buf); } if (fwt != 0) { - ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s (unknown 0x%jx)", buf, (uintmax_t)fwt); + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s (unknown 0x%08x%08x)", buf, + (uint32_t) (fwt >> 32), (uint32_t) fwt); } isp_prt(isp, ISP_LOGCONFIG, "%s", buf); } - if (!IS_24XX(isp)) { + if (IS_24XX(isp)) { + MBSINIT(&mbs, MBOX_GET_RESOURCE_COUNT, MBLOGALL, 0); + isp_mboxcmd(isp, &mbs); + if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { + ISP_RESET0(isp); + return; + } + if (isp->isp_maxcmds >= mbs.param[3]) { + isp->isp_maxcmds = mbs.param[3]; + } + } else { MBSINIT(&mbs, MBOX_GET_FIRMWARE_STATUS, MBLOGALL, 0); isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { @@ -1206,11 +1217,12 @@ isp_reset(ispsoftc_t *isp, int do_load_d * Only make this check for non-SCSI cards (I'm not sure firmware attributes * work for them). */ - if (IS_FC(isp) && ISP_CAP_MULTI_ID(isp) == 0 && isp->isp_nchan > 1) { - isp_prt(isp, ISP_LOGWARN, "non-MULTIID f/w loaded, only can enable 1 of %d channels", isp->isp_nchan); - isp->isp_nchan = 1; + if (IS_FC(isp) && isp->isp_nchan > 1) { + if (!IS_24XX(isp) || (fwt & ISP2400_FW_ATTR_MULTIID) == 0) { + isp_prt(isp, ISP_LOGWARN, "non-MULTIID f/w loaded, only can enable 1 of %d channels", isp->isp_nchan); + isp->isp_nchan = 1; + } } - for (i = 0; i < isp->isp_nchan; i++) { isp_fw_state(isp, i); } @@ -1697,21 +1709,39 @@ isp_fibre_init(ispsoftc_t *isp) */ if (IS_2200(isp) || IS_23XX(isp)) { icbp->icb_fwoptions |= ICBOPT_EXTENDED; + + icbp->icb_xfwoptions = fcp->isp_xfwoptions; + /* * Prefer or force Point-To-Point instead Loop? */ switch (isp->isp_confopts & ISP_CFG_PORT_PREF) { case ISP_CFG_NPORT: + icbp->icb_xfwoptions &= ~ICBXOPT_TOPO_MASK; icbp->icb_xfwoptions |= ICBXOPT_PTP_2_LOOP; break; case ISP_CFG_NPORT_ONLY: + icbp->icb_xfwoptions &= ~ICBXOPT_TOPO_MASK; icbp->icb_xfwoptions |= ICBXOPT_PTP_ONLY; break; case ISP_CFG_LPORT_ONLY: + icbp->icb_xfwoptions &= ~ICBXOPT_TOPO_MASK; icbp->icb_xfwoptions |= ICBXOPT_LOOP_ONLY; break; default: - icbp->icb_xfwoptions |= ICBXOPT_LOOP_2_PTP; + /* + * Let NVRAM settings define it if they are sane + */ + switch (icbp->icb_xfwoptions & ICBXOPT_TOPO_MASK) { + case ICBXOPT_PTP_2_LOOP: + case ICBXOPT_PTP_ONLY: + case ICBXOPT_LOOP_ONLY: + case ICBXOPT_LOOP_2_PTP: + break; + default: + icbp->icb_xfwoptions &= ~ICBXOPT_TOPO_MASK; + icbp->icb_xfwoptions |= ICBXOPT_LOOP_2_PTP; + } break; } if (IS_2200(isp)) { @@ -1737,15 +1767,24 @@ isp_fibre_init(ispsoftc_t *isp) icbp->icb_xfwoptions |= ICBXOPT_ZIO; icbp->icb_idelaytimer = 10; } + icbp->icb_zfwoptions = fcp->isp_zfwoptions; if (isp->isp_confopts & ISP_CFG_ONEGB) { + icbp->icb_zfwoptions &= ~ICBZOPT_RATE_MASK; icbp->icb_zfwoptions |= ICBZOPT_RATE_ONEGB; } else if (isp->isp_confopts & ISP_CFG_TWOGB) { + icbp->icb_zfwoptions &= ~ICBZOPT_RATE_MASK; icbp->icb_zfwoptions |= ICBZOPT_RATE_TWOGB; } else { - icbp->icb_zfwoptions |= ICBZOPT_RATE_AUTO; - } - if (fcp->isp_zfwoptions & ICBZOPT_50_OHM) { - icbp->icb_zfwoptions |= ICBZOPT_50_OHM; + switch (icbp->icb_zfwoptions & ICBZOPT_RATE_MASK) { + case ICBZOPT_RATE_ONEGB: + case ICBZOPT_RATE_TWOGB: + case ICBZOPT_RATE_AUTO: + break; + default: + icbp->icb_zfwoptions &= ~ICBZOPT_RATE_MASK; + icbp->icb_zfwoptions |= ICBZOPT_RATE_AUTO; + break; + } } } } @@ -1915,16 +1954,13 @@ isp_fibre_init_2400(ispsoftc_t *isp) icbp->icb_execthrottle = ICB_DFLT_THROTTLE; } + /* + * Set target exchange count. Take half if we are supporting both roles. + */ if (icbp->icb_fwoptions1 & ICB2400_OPT1_TGT_ENABLE) { - /* - * Get current resource count - */ - MBSINIT(&mbs, MBOX_GET_RESOURCE_COUNT, MBLOGALL, 0); - isp_mboxcmd(isp, &mbs); - if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { - return; - } - icbp->icb_xchgcnt = mbs.param[3]; + icbp->icb_xchgcnt = isp->isp_maxcmds; + if ((icbp->icb_fwoptions1 & ICB2400_OPT1_INI_DISABLE) == 0) + icbp->icb_xchgcnt >>= 1; } @@ -2511,15 +2547,12 @@ isp_get_wwn(ispsoftc_t *isp, int chan, i MBSINIT(&mbs, MBOX_GET_PORT_NAME, MBLOGALL & ~MBOX_COMMAND_PARAM_ERROR, 500000); if (ISP_CAP_2KLOGIN(isp)) { mbs.param[1] = loopid; - mbs.ibits = (1 << 10); if (nodename) { mbs.param[10] = 1; } - if (ISP_CAP_MULTI_ID(isp)) { - mbs.ibits |= (1 << 9); - mbs.param[9] = chan; - } + mbs.param[9] = chan; } else { + mbs.ibits = 3; mbs.param[1] = loopid << 8; if (nodename) { mbs.param[1] |= 1; @@ -7013,7 +7046,7 @@ static const uint32_t mbpfc[] = { ISP_FC_OPMAP(0x00, 0x00), /* 0x3f: */ ISP_FC_OPMAP(0x03, 0x01), /* 0x40: MBOX_LOOP_PORT_BYPASS */ ISP_FC_OPMAP(0x03, 0x01), /* 0x41: MBOX_LOOP_PORT_ENABLE */ - ISP_FC_OPMAP_HALF(0x3, 0xcf, 0x0, 0x07), /* 0x42: MBOX_GET_RESOURCE_COUNT */ + ISP_FC_OPMAP_HALF(0x0, 0x01, 0x3, 0xcf), /* 0x42: MBOX_GET_RESOURCE_COUNT */ ISP_FC_OPMAP(0x01, 0x01), /* 0x43: MBOX_REQUEST_OFFLINE_MODE */ ISP_FC_OPMAP(0x00, 0x00), /* 0x44: */ ISP_FC_OPMAP(0x00, 0x00), /* 0x45: */ @@ -7053,7 +7086,7 @@ static const uint32_t mbpfc[] = { ISP_FC_OPMAP(0x07, 0x01), /* 0x67: MBOX_CLEAR_TASK_SET */ ISP_FC_OPMAP(0x07, 0x01), /* 0x68: MBOX_ABORT_TASK_SET */ ISP_FC_OPMAP(0x01, 0x07), /* 0x69: MBOX_GET_FW_STATE */ - ISP_FC_OPMAP(0x03, 0xcf), /* 0x6a: MBOX_GET_PORT_NAME */ + ISP_FC_OPMAP_HALF(0x6, 0x03, 0x0, 0xcf), /* 0x6a: MBOX_GET_PORT_NAME */ ISP_FC_OPMAP(0xcf, 0x01), /* 0x6b: MBOX_GET_LINK_STATUS */ ISP_FC_OPMAP(0x0f, 0x01), /* 0x6c: MBOX_INIT_LIP_RESET */ ISP_FC_OPMAP(0x00, 0x00), /* 0x6d: */ Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Sun Jun 24 17:02:28 2012 (r237536) +++ head/sys/dev/isp/isp_freebsd.c Sun Jun 24 17:30:54 2012 (r237537) @@ -2210,6 +2210,7 @@ isp_handle_platform_atio7(ispsoftc_t *is tstate_t *tptr; struct ccb_accept_tio *atiop; atio_private_data_t *atp = NULL; + atio_private_data_t *oatp; inot_private_data_t *ntp; did = (aep->at_hdr.d_id[0] << 16) | (aep->at_hdr.d_id[1] << 8) | aep->at_hdr.d_id[2]; @@ -2304,6 +2305,7 @@ isp_handle_platform_atio7(ispsoftc_t *is * it and go to noresrc. */ if (tptr->restart_queue) { + isp_prt(isp, ISP_LOGTDEBUG0, "%s: restart queue refilling", __func__); if (restart_queue) { ntp = tptr->restart_queue; tptr->restart_queue = restart_queue; @@ -2340,15 +2342,15 @@ isp_handle_platform_atio7(ispsoftc_t *is isp_prt(isp, ISP_LOGTDEBUG0, "[0x%x] out of atps", aep->at_rxid); goto noresrc; } - if (isp_get_atpd(isp, tptr, aep->at_rxid)) { - isp_prt(isp, ISP_LOGTDEBUG0, "[0x%x] tag wraparound in isp_handle_platforms_atio7 (N-Port Handle 0x%04x S_ID 0x%04x OX_ID 0x%04x)\n", - aep->at_rxid, nphdl, sid, aep->at_hdr.ox_id); + oatp = isp_get_atpd(isp, tptr, aep->at_rxid); + if (oatp) { + isp_prt(isp, ISP_LOGTDEBUG0, "[0x%x] tag wraparound in isp_handle_platforms_atio7 (N-Port Handle 0x%04x S_ID 0x%04x OX_ID 0x%04x) oatp state %d\n", + aep->at_rxid, nphdl, sid, aep->at_hdr.ox_id, oatp->state); /* * It's not a "no resource" condition- but we can treat it like one */ goto noresrc; } - atp->tag = aep->at_rxid; atp->state = ATPD_STATE_ATIO; SLIST_REMOVE_HEAD(&tptr->atios, sim_links.sle); @@ -2394,6 +2396,7 @@ isp_handle_platform_atio7(ispsoftc_t *is atp->nphdl = nphdl; atp->portid = sid; atp->oxid = aep->at_hdr.ox_id; + atp->rxid = aep->at_hdr.rx_id; atp->cdb0 = atiop->cdb_io.cdb_bytes[0]; atp->tattr = aep->at_cmnd.fcp_cmnd_task_attribute & FCP_CMND_TASK_ATTR_MASK; atp->state = ATPD_STATE_CAM; Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Sun Jun 24 17:02:28 2012 (r237536) +++ head/sys/dev/isp/isp_freebsd.h Sun Jun 24 17:30:54 2012 (r237537) @@ -62,7 +62,7 @@ #include "opt_isp.h" #define ISP_PLATFORM_VERSION_MAJOR 7 -#define ISP_PLATFORM_VERSION_MINOR 0 +#define ISP_PLATFORM_VERSION_MINOR 10 /* * Efficiency- get rid of SBus code && tests unless we need them. @@ -93,13 +93,14 @@ typedef struct { uint32_t orig_datalen; uint32_t bytes_xfered; uint32_t last_xframt; - uint32_t tag; + uint32_t tag; /* typically f/w RX_ID */ uint32_t lun; uint32_t nphdl; uint32_t sid; uint32_t portid; + uint16_t rxid; /* wire rxid */ + uint16_t oxid; /* wire oxid */ uint32_t - oxid : 16, cdb0 : 8, : 1, dead : 1, Modified: head/sys/dev/isp/isp_pci.c ============================================================================== --- head/sys/dev/isp/isp_pci.c Sun Jun 24 17:02:28 2012 (r237536) +++ head/sys/dev/isp/isp_pci.c Sun Jun 24 17:30:54 2012 (r237537) @@ -374,6 +374,7 @@ static devclass_t isp_devclass; DRIVER_MODULE(isp, pci, isp_pci_driver, isp_devclass, 0, 0); MODULE_DEPEND(isp, cam, 1, 1, 1); MODULE_DEPEND(isp, firmware, 1, 1, 1); +static int isp_nvports = 0; static int isp_pci_probe(device_t dev) @@ -451,7 +452,7 @@ isp_pci_probe(device_t dev) } static void -isp_get_generic_options(device_t dev, ispsoftc_t *isp, int *nvp) +isp_get_generic_options(device_t dev, ispsoftc_t *isp) { int tval; @@ -483,12 +484,10 @@ isp_get_generic_options(device_t dev, is if (bootverbose) { isp->isp_dblev |= ISP_LOGCONFIG|ISP_LOGINFO; } - tval = 0; + tval = -1; (void) resource_int_value(device_get_name(dev), device_get_unit(dev), "vports", &tval); if (tval > 0 && tval < 127) { - *nvp = tval; - } else { - *nvp = 0; + isp_nvports = tval; } tval = 1; (void) resource_int_value(device_get_name(dev), device_get_unit(dev), "autoconfig", &tval); @@ -527,7 +526,7 @@ static void isp_get_specific_options(device_t dev, int chan, ispsoftc_t *isp) { const char *sptr; - int tval; + int tval = 0; if (resource_int_value(device_get_name(dev), device_get_unit(dev), "iid", &tval)) { if (IS_FC(isp)) { @@ -648,7 +647,6 @@ static int isp_pci_attach(device_t dev) { int i, m1, m2, locksetup = 0; - int isp_nvports = 0; uint32_t data, cmd, linesz, did; struct isp_pcisoftc *pcs; ispsoftc_t *isp; @@ -670,7 +668,8 @@ isp_pci_attach(device_t dev) /* * Get Generic Options */ - isp_get_generic_options(dev, isp, &isp_nvports); + isp_nvports = 0; + isp_get_generic_options(dev, isp); /* * Check to see if options have us disabled @@ -876,21 +875,16 @@ isp_pci_attach(device_t dev) /* * Make sure that SERR, PERR, WRITE INVALIDATE and BUSMASTER are set. */ - cmd |= PCIM_CMD_SEREN | PCIM_CMD_PERRESPEN | - PCIM_CMD_BUSMASTEREN | PCIM_CMD_INVEN; - + cmd |= PCIM_CMD_SEREN | PCIM_CMD_PERRESPEN | PCIM_CMD_BUSMASTEREN | PCIM_CMD_INVEN; if (IS_2300(isp)) { /* per QLogic errata */ cmd &= ~PCIM_CMD_INVEN; } - if (IS_2322(isp) || pci_get_devid(dev) == PCI_QLOGIC_ISP6312) { cmd &= ~PCIM_CMD_INTX_DISABLE; } - if (IS_24XX(isp)) { cmd &= ~PCIM_CMD_INTX_DISABLE; } - pci_write_config(dev, PCIR_COMMAND, cmd, 2); /* Modified: head/sys/dev/isp/ispmbox.h ============================================================================== --- head/sys/dev/isp/ispmbox.h Sun Jun 24 17:02:28 2012 (r237536) +++ head/sys/dev/isp/ispmbox.h Sun Jun 24 17:30:54 2012 (r237537) @@ -851,21 +851,36 @@ typedef struct { #define ISP2400_FW_ATTR_EXPFW 0x2000 #define ISP2400_FW_ATTR_EXTNDED 0x8000 -#define ISP_CAP_FCTAPE(isp) \ - (IS_24XX(isp)? 1 : (isp->isp_fwattr & ISP_FW_ATTR_FCTAPE)) +/* + * These are either manifestly true or are dependent on f/w attributes + */ #define ISP_CAP_TMODE(isp) \ (IS_24XX(isp)? 1 : (isp->isp_fwattr & ISP_FW_ATTR_TMODE)) #define ISP_CAP_SCCFW(isp) \ (IS_24XX(isp)? 1 : (isp->isp_fwattr & ISP_FW_ATTR_SCCLUN)) #define ISP_CAP_2KLOGIN(isp) \ (IS_24XX(isp)? 1 : (isp->isp_fwattr & ISP_FW_ATTR_2KLOGINS)) + +/* + * This is only true for 24XX cards with this f/w attribute + */ #define ISP_CAP_MULTI_ID(isp) \ (IS_24XX(isp)? (isp->isp_fwattr & ISP2400_FW_ATTR_MULTIID) : 0) - #define ISP_GET_VPIDX(isp, tag) \ (ISP_CAP_MULTI_ID(isp) ? tag : 0) /* + * This is true manifestly or is dependent on a f/w attribute + * but may or may not actually be *enabled*. In any case, it + * is enabled on a per-channel basis. + */ +#define ISP_CAP_FCTAPE(isp) \ + (IS_24XX(isp)? 1 : (isp->isp_fwattr & ISP_FW_ATTR_FCTAPE)) + +#define ISP_FCTAPE_ENABLED(isp, chan) \ + (IS_24XX(isp)? (FCPARAM(isp, chan)->isp_xfwoptions & ICB2400_OPT2_FCTAPE) != 0 : (FCPARAM(isp, chan)->isp_xfwoptions & ICBXOPT_FCTAPE) != 0) + +/* * Reduced Interrupt Operation Response Queue Entries */ Modified: head/sys/dev/isp/ispvar.h ============================================================================== --- head/sys/dev/isp/ispvar.h Sun Jun 24 17:02:28 2012 (r237536) +++ head/sys/dev/isp/ispvar.h Sun Jun 24 17:30:54 2012 (r237537) @@ -678,7 +678,7 @@ struct ispsoftc { #define ISP_RUNSTATE 4 /* - * ISP Configuration Options + * ISP Runtime Configuration Options */ #define ISP_CFG_NORELOAD 0x80 /* don't download f/w */ #define ISP_CFG_NONVRAM 0x40 /* ignore NVRAM */ From owner-svn-src-head@FreeBSD.ORG Sun Jun 24 18:14: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 29001106566C; Sun, 24 Jun 2012 18:14:08 +0000 (UTC) (envelope-from br@jail.io) Received: from mx.bsdpad.com (mx.bsdpad.com [46.4.68.80]) by mx1.freebsd.org (Postfix) with ESMTP id D47108FC12; Sun, 24 Jun 2012 18:14:07 +0000 (UTC) Received: from mx.bsdpad.com ([46.4.68.80] helo=jail.io) by mx.bsdpad.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SirJk-000EIy-Ta; Sun, 24 Jun 2012 22:13:49 +0400 Received: (from br@localhost) by jail.io (8.14.5/8.14.5/Submit) id q5OIDmKx054991; Sun, 24 Jun 2012 18:13:48 GMT (envelope-from br) Date: Sun, 24 Jun 2012 22:13:48 +0400 From: Ruslan Bukin To: Jung-uk Kim Message-ID: <20120624181348.GA54897@jail.io> References: <201206220040.q5M0ejNk045397@svn.freebsd.org> <20120622095847.GC2337@deviant.kiev.zoral.com.ua> <4FE494FA.1030907@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4FE494FA.1030907@FreeBSD.org> 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 Subject: Re: svn commit: r237412 - in head: sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/components/disa... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 24 Jun 2012 18:14:08 -0000 On Fri, Jun 22, 2012 at 11:53:30AM -0400, Jung-uk Kim wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 2012-06-22 05:58:47 -0400, Konstantin Belousov wrote: > > On Fri, Jun 22, 2012 at 12:40:45AM +0000, Jung-uk Kim wrote: > >> Author: jkim Date: Fri Jun 22 00:40:44 2012 New Revision: 237412 > >> URL: http://svn.freebsd.org/changeset/base/237412 > >> > >> Log: Merge ACPICA 20120620. > > > > I think it is caused by import, malloc is called while spinlock is > > held: > > > > ACPI: Executed 1 blocks of module-level executable AML code acpi0: > > Power Button (fixed) panic: blockable sleep lock (sleep mutex) 16 @ > > /usr/home/kostik/work/build/bsd/DEV/src/sys/vm/uma_core.c:2040 > > cpuid = 0 KDB: stack backtrace: db_trace_self_wrapper() at > > 0xffffffff80279d0a = db_trace_self_wrapper+0x2a panic() at > > 0xffffffff80325a28 = panic+0x1d8 witness_checkorder() at > > 0xffffffff80377938 = witness_checkorder+0x1d8 _mtx_lock_flags() at > > 0xffffffff80313777 = _mtx_lock_flags+0x87 uma_zalloc_arg() at > > 0xffffffff804db97a = uma_zalloc_arg+0x2ea malloc() at > > 0xffffffff8030f7cd = malloc+0xbd AcpiUtAllocate() at > > 0xffffffff802704f1 = AcpiUtAllocate+0x31 AcpiUtAllocateZeroed() at > > 0xffffffff80270559 = AcpiUtAllocateZeroed+0x19 > > AcpiSetupGpeForWake() at 0xffffffff8025becc = > > AcpiSetupGpeForWake+0xfc acpi_probe_child() at 0xffffffff802848e9 = > > acpi_probe_child+0x2b9 AcpiNsWalkNamespace() at 0xffffffff802686ef > > = AcpiNsWalkNamespace+0x15f AcpiWalkNamespace() at > > 0xffffffff80268c0f = AcpiWalkNamespace+0xbf acpi_attach() at > > 0xffffffff80283e43 = acpi_attach+0x993 device_attach() at > > 0xffffffff8035ab62 = device_attach+0x72 bus_generic_attach() at > > 0xffffffff8035bd3a = bus_generic_attach+0x1a nexus_acpi_attach() at > > 0xffffffff804fbd89 = nexus_acpi_attach+0x69 device_attach() at > > 0xffffffff8035ab62 = device_attach+0x72 bus_generic_new_pass() at > > 0xffffffff8035bf46 = bus_generic_new_pass+0xd6 bus_set_pass() at > > 0xffffffff803597ba = bus_set_pass+0x7a configure() at > > 0xffffffff804fd51a = configure+0xa mi_startup() at > > 0xffffffff802d5c17 = mi_startup+0x77 btext() at 0xffffffff802531cc > > = btext+0x2c KDB: enter: panic [ thread pid 0 tid 100000 ] Stopped > > at 0xffffffff8035fffb = kdb_enter+0x3b: movq > > $0,0x1027d62(%rip) db> show alllocks Process 0 (kernel) thread > > 0xffffffff80837cc0 (100000) exclusive sleep mutex Giant (Giant) r = > > 0 (0xffffffff8133a900) locked @ > > /usr/home/kostik/work/build/bsd/DEV/src/sys/kern/kern_module.c:116 > > exclusive spin mutex ACPI lock (0xfffffe000321da80) (ACPI lock > > (0xfffffe000321da80)) r = 0 (0xfffffe000321da80) locked @ > > /usr/home/kostik/work/build/bsd/DEV/src/sys/dev/acpica/Osd/OsdSynch.c:535 > > Hmm... > > > I was afraid it might happen. I'll look into it ASAP. > > Sorry for the trouble, > I have the same problem on server & laptop -Ruslan From owner-svn-src-head@FreeBSD.ORG Sun Jun 24 21:25: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 888CB1065670; Sun, 24 Jun 2012 21:25:55 +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 727D38FC21; Sun, 24 Jun 2012 21:25: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 q5OLPtA3032321; Sun, 24 Jun 2012 21:25:55 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5OLPtPL032314; Sun, 24 Jun 2012 21:25:55 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201206242125.q5OLPtPL032314@svn.freebsd.org> From: Michael Tuexen Date: Sun, 24 Jun 2012 21:25: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: r237540 - 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: Sun, 24 Jun 2012 21:25:55 -0000 Author: tuexen Date: Sun Jun 24 21:25:54 2012 New Revision: 237540 URL: http://svn.freebsd.org/changeset/base/237540 Log: Do packet logging in a consistent way. MFC after: 3 days Modified: head/sys/netinet/sctp_bsd_addr.c head/sys/netinet/sctp_bsd_addr.h head/sys/netinet/sctp_input.c head/sys/netinet/sctp_os_bsd.h head/sys/netinet/sctp_output.c head/sys/netinet6/sctp6_usrreq.c Modified: head/sys/netinet/sctp_bsd_addr.c ============================================================================== --- head/sys/netinet/sctp_bsd_addr.c Sun Jun 24 18:38:16 2012 (r237539) +++ head/sys/netinet/sctp_bsd_addr.c Sun Jun 24 21:25:54 2012 (r237540) @@ -422,11 +422,12 @@ sctp_get_mbuf_for_msg(unsigned int space #ifdef SCTP_PACKET_LOGGING void -sctp_packet_log(struct mbuf *m, int length) +sctp_packet_log(struct mbuf *m) { int *lenat, thisone; void *copyto; uint32_t *tick_tock; + int length; int total_len; int grabbed_lock = 0; int value, newval, thisend, thisbegin; @@ -436,6 +437,7 @@ sctp_packet_log(struct mbuf *m, int leng * (value) -ticks of log (ticks) o -ip packet o -as logged - * where this started (thisbegin) x <--end points here */ + length = SCTP_HEADER_LEN(m); total_len = SCTP_SIZE32((length + (4 * sizeof(int)))); /* Log a packet to the buffer. */ if (total_len > SCTP_PACKET_LOG_SIZE) { Modified: head/sys/netinet/sctp_bsd_addr.h ============================================================================== --- head/sys/netinet/sctp_bsd_addr.h Sun Jun 24 18:38:16 2012 (r237539) +++ head/sys/netinet/sctp_bsd_addr.h Sun Jun 24 21:25:54 2012 (r237540) @@ -53,7 +53,7 @@ void sctp_gather_internal_ifa_flags(stru #ifdef SCTP_PACKET_LOGGING -void sctp_packet_log(struct mbuf *m, int length); +void sctp_packet_log(struct mbuf *m); int sctp_copy_out_packet_log(uint8_t * target, int length); #endif Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sun Jun 24 18:38:16 2012 (r237539) +++ head/sys/netinet/sctp_input.c Sun Jun 24 21:25:54 2012 (r237540) @@ -5932,9 +5932,9 @@ sctp_input_with_port(struct mbuf *i_pak, } } #endif -#ifdef SCTP_PACKET_LOGGING +#ifdef SCTP_PACKET_LOGGING if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) - sctp_packet_log(m, mlen); + sctp_packet_log(m); #endif if (m->m_flags & M_FLOWID) { mflowid = m->m_pkthdr.flowid; Modified: head/sys/netinet/sctp_os_bsd.h ============================================================================== --- head/sys/netinet/sctp_os_bsd.h Sun Jun 24 18:38:16 2012 (r237539) +++ head/sys/netinet/sctp_os_bsd.h Sun Jun 24 21:25:54 2012 (r237540) @@ -365,7 +365,7 @@ typedef struct callout sctp_os_timer_t; */ #define SCTP_HEADER_TO_CHAIN(m) (m) #define SCTP_DETACH_HEADER_FROM_CHAIN(m) -#define SCTP_HEADER_LEN(m) (m->m_pkthdr.len) +#define SCTP_HEADER_LEN(m) ((m)->m_pkthdr.len) #define SCTP_GET_HEADER_FOR_OUTPUT(o_pak) 0 #define SCTP_RELEASE_HEADER(m) #define SCTP_RELEASE_PKT(m) sctp_m_freem(m) Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sun Jun 24 18:38:16 2012 (r237539) +++ head/sys/netinet/sctp_output.c Sun Jun 24 21:25:54 2012 (r237540) @@ -4107,10 +4107,6 @@ sctp_lowlevel_chunk_output(struct sctp_i sctp_m_freem(m); return (ENOMEM); } -#ifdef SCTP_PACKET_LOGGING - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) - sctp_packet_log(m, packet_length); -#endif SCTP_ATTACH_CHAIN(o_pak, m, packet_length); if (port) { #if defined(SCTP_WITH_NO_CSUM) @@ -4131,6 +4127,10 @@ sctp_lowlevel_chunk_output(struct sctp_i SCTP_STAT_INCR(sctps_sendhwcrc); #endif } +#ifdef SCTP_PACKET_LOGGING + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) + sctp_packet_log(o_pak); +#endif /* send it out. table id is taken from stcb */ #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) if ((SCTP_BASE_SYSCTL(sctp_output_unlocked)) && (so_locked)) { @@ -4459,10 +4459,6 @@ sctp_lowlevel_chunk_output(struct sctp_i SCTP_LTRACE_ERR_RET(inp, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, ENOMEM); return (ENOMEM); } -#ifdef SCTP_PACKET_LOGGING - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) - sctp_packet_log(m, packet_length); -#endif SCTP_ATTACH_CHAIN(o_pak, m, packet_length); if (port) { #if defined(SCTP_WITH_NO_CSUM) @@ -4490,6 +4486,10 @@ sctp_lowlevel_chunk_output(struct sctp_i SCTP_SOCKET_UNLOCK(so, 0); } #endif +#ifdef SCTP_PACKET_LOGGING + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) + sctp_packet_log(o_pak); +#endif SCTP_IP6_OUTPUT(ret, o_pak, (struct route_in6 *)ro, &ifp, stcb, vrf_id); #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) if ((SCTP_BASE_SYSCTL(sctp_output_unlocked)) && (so_locked)) { @@ -11067,11 +11067,6 @@ sctp_send_resp_msg(struct mbuf *m, struc } } iph_out->ip_len = len; -#ifdef SCTP_PACKET_LOGGING - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) { - sctp_packet_log(mout, len); - } -#endif if (port) { #if defined(SCTP_WITH_NO_CSUM) SCTP_STAT_INCR(sctps_sendnocrc); @@ -11091,6 +11086,11 @@ sctp_send_resp_msg(struct mbuf *m, struc SCTP_STAT_INCR(sctps_sendhwcrc); #endif } +#ifdef SCTP_PACKET_LOGGING + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) { + sctp_packet_log(o_pak); + } +#endif SCTP_IP_OUTPUT(ret, o_pak, &ro, NULL, vrf_id); /* Free the route if we got one back */ if (ro.ro_rt) { @@ -11101,11 +11101,6 @@ sctp_send_resp_msg(struct mbuf *m, struc #ifdef INET6 if (ip6_out != NULL) { ip6_out->ip6_plen = len - sizeof(struct ip6_hdr); -#ifdef SCTP_PACKET_LOGGING - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) { - sctp_packet_log(mout, len); - } -#endif if (port) { #if defined(SCTP_WITH_NO_CSUM) SCTP_STAT_INCR(sctps_sendnocrc); @@ -11125,6 +11120,11 @@ sctp_send_resp_msg(struct mbuf *m, struc SCTP_STAT_INCR(sctps_sendhwcrc); #endif } +#ifdef SCTP_PACKET_LOGGING + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) { + sctp_packet_log(o_pak); + } +#endif SCTP_IP6_OUTPUT(ret, o_pak, NULL, NULL, NULL, vrf_id); } #endif Modified: head/sys/netinet6/sctp6_usrreq.c ============================================================================== --- head/sys/netinet6/sctp6_usrreq.c Sun Jun 24 18:38:16 2012 (r237539) +++ head/sys/netinet6/sctp6_usrreq.c Sun Jun 24 21:25:54 2012 (r237540) @@ -100,10 +100,12 @@ sctp6_input(struct mbuf **i_pak, int *of return (-1); } m = SCTP_HEADER_TO_CHAIN(*i_pak); - pkt_len = SCTP_HEADER_LEN((*i_pak)); + pkt_len = SCTP_HEADER_LEN(*i_pak); -#ifdef SCTP_PACKET_LOGGING - sctp_packet_log(m, pkt_len); +#ifdef SCTP_PACKET_LOGGING + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) { + sctp_packet_log(m); + } #endif if (m->m_flags & M_FLOWID) { mflowid = m->m_pkthdr.flowid; From owner-svn-src-head@FreeBSD.ORG Sun Jun 24 22:22: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 3A7961065674; Sun, 24 Jun 2012 22:22:45 +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 0BEA78FC17; Sun, 24 Jun 2012 22:22: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 q5OMMilm034616; Sun, 24 Jun 2012 22:22:44 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5OMMigF034614; Sun, 24 Jun 2012 22:22:44 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201206242222.q5OMMigF034614@svn.freebsd.org> From: Michael Tuexen Date: Sun, 24 Jun 2012 22:22:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237541 - 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, 24 Jun 2012 22:22:45 -0000 Author: tuexen Date: Sun Jun 24 22:22:44 2012 New Revision: 237541 URL: http://svn.freebsd.org/changeset/base/237541 Log: Remove redundant check. MFC after: 3 days Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sun Jun 24 21:25:54 2012 (r237540) +++ head/sys/netinet/sctp_input.c Sun Jun 24 22:22:44 2012 (r237541) @@ -2392,7 +2392,7 @@ sctp_handle_cookie_echo(struct mbuf *m, uint8_t calc_sig[SCTP_SIGNATURE_SIZE], tmp_sig[SCTP_SIGNATURE_SIZE]; uint8_t *sig; uint8_t cookie_ok = 0; - unsigned int size_of_pkt, sig_offset, cookie_offset; + unsigned int sig_offset, cookie_offset; unsigned int cookie_len; struct timeval now; struct timeval time_expires; @@ -2434,7 +2434,6 @@ sctp_handle_cookie_echo(struct mbuf *m, lsin->sin_len = sizeof(*lsin); lsin->sin_port = sh->dest_port; lsin->sin_addr.s_addr = iph->ip_dst.s_addr; - size_of_pkt = SCTP_GET_IPV4_LENGTH(iph); break; } #endif @@ -2452,7 +2451,6 @@ sctp_handle_cookie_echo(struct mbuf *m, ip6 = mtod(m, struct ip6_hdr *); lsin6->sin6_port = sh->dest_port; lsin6->sin6_addr = ip6->ip6_dst; - size_of_pkt = SCTP_GET_IPV6_LENGTH(ip6) + iphlen; break; } #endif @@ -2476,11 +2474,10 @@ sctp_handle_cookie_echo(struct mbuf *m, */ return (NULL); } - if (cookie_len > size_of_pkt || - cookie_len < sizeof(struct sctp_cookie_echo_chunk) + + if (cookie_len < sizeof(struct sctp_cookie_echo_chunk) + sizeof(struct sctp_init_chunk) + sizeof(struct sctp_init_ack_chunk) + SCTP_SIGNATURE_SIZE) { - /* cookie too long! or too small */ + /* cookie too small */ return (NULL); } /* @@ -2488,11 +2485,6 @@ sctp_handle_cookie_echo(struct mbuf *m, * calculated in the sctp_hmac_m() call). */ sig_offset = offset + cookie_len - SCTP_SIGNATURE_SIZE; - if (sig_offset > size_of_pkt) { - /* packet not correct size! */ - /* XXX this may already be accounted for earlier... */ - return (NULL); - } m_sig = m_split(m, sig_offset, M_DONTWAIT); if (m_sig == NULL) { /* out of memory or ?? */ From owner-svn-src-head@FreeBSD.ORG Sun Jun 24 23:12: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 071A9106567A; Sun, 24 Jun 2012 23:12:25 +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 E513D8FC08; Sun, 24 Jun 2012 23:12: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 q5ONCOdB036709; Sun, 24 Jun 2012 23:12:24 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5ONCOoO036703; Sun, 24 Jun 2012 23:12:24 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201206242312.q5ONCOoO036703@svn.freebsd.org> From: Michael Tuexen Date: Sun, 24 Jun 2012 23:12: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: r237542 - 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: Sun, 24 Jun 2012 23:12:25 -0000 Author: tuexen Date: Sun Jun 24 23:12:24 2012 New Revision: 237542 URL: http://svn.freebsd.org/changeset/base/237542 Log: Pass the packet length explicitly around. MFC after: 3 days Modified: head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_output.h head/sys/netinet6/sctp6_usrreq.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Sun Jun 24 22:22:44 2012 (r237541) +++ head/sys/netinet/sctp_indata.c Sun Jun 24 23:12:24 2012 (r237542) @@ -2762,7 +2762,7 @@ sctp_process_data(struct mbuf **mm, int /* * we need to report rwnd overrun drops. */ - sctp_send_packet_dropped(stcb, net, *mm, iphlen, 0); + sctp_send_packet_dropped(stcb, net, *mm, length, iphlen, 0); } if (num_chunks) { /* Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sun Jun 24 22:22:44 2012 (r237541) +++ head/sys/netinet/sctp_input.c Sun Jun 24 23:12:24 2012 (r237542) @@ -6013,7 +6013,7 @@ sctp_input_with_port(struct mbuf *i_pak, #endif } if ((inp) && (stcb)) { - sctp_send_packet_dropped(stcb, net, m, iphlen, 1); + sctp_send_packet_dropped(stcb, net, m, mlen + iphlen, iphlen, 1); sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_INPUT_ERROR, SCTP_SO_NOT_LOCKED); } else if ((inp != NULL) && (stcb == NULL)) { refcount_up = 1; Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sun Jun 24 22:22:44 2012 (r237541) +++ head/sys/netinet/sctp_output.c Sun Jun 24 23:12:24 2012 (r237542) @@ -11312,21 +11312,15 @@ sctp_send_ecn_echo(struct sctp_tcb *stcb void sctp_send_packet_dropped(struct sctp_tcb *stcb, struct sctp_nets *net, - struct mbuf *m, int iphlen, int bad_crc) + struct mbuf *m, int len, int iphlen, int bad_crc) { struct sctp_association *asoc; struct sctp_pktdrop_chunk *drp; struct sctp_tmit_chunk *chk; uint8_t *datap; - int len; int was_trunc = 0; struct ip *iph; - -#ifdef INET6 - struct ip6_hdr *ip6h; - -#endif - int fullsz = 0, extra = 0; + int fullsz = 0; long spc; int offset; struct sctp_chunkhdr *ch, chunk_buf; @@ -11356,23 +11350,8 @@ sctp_send_packet_dropped(struct sctp_tcb sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED); return; } - switch (iph->ip_v) { -#ifdef INET - case IPVERSION: - /* IPv4 */ - len = chk->send_size = iph->ip_len; - break; -#endif -#ifdef INET6 - case IPV6_VERSION >> 4: - /* IPv6 */ - ip6h = mtod(m, struct ip6_hdr *); - len = chk->send_size = htons(ip6h->ip6_plen); - break; -#endif - default: - return; - } + len -= iphlen; + chk->send_size = len; /* Validate that we do not have an ABORT in here. */ offset = iphlen + sizeof(struct sctphdr); ch = (struct sctp_chunkhdr *)sctp_m_getptr(m, offset, @@ -11408,7 +11387,7 @@ sctp_send_packet_dropped(struct sctp_tcb /* * only send 1 mtu worth, trim off the excess on the end. */ - fullsz = len - extra; + fullsz = len; len = min(stcb->asoc.smallest_mtu, MCLBYTES) - SCTP_MAX_OVERHEAD; was_trunc = 1; } Modified: head/sys/netinet/sctp_output.h ============================================================================== --- head/sys/netinet/sctp_output.h Sun Jun 24 22:22:44 2012 (r237541) +++ head/sys/netinet/sctp_output.h Sun Jun 24 23:12:24 2012 (r237542) @@ -162,7 +162,7 @@ void sctp_send_ecn_echo(struct sctp_tcb void sctp_send_packet_dropped(struct sctp_tcb *, struct sctp_nets *, struct mbuf *, - int, int); + int, int, int); Modified: head/sys/netinet6/sctp6_usrreq.c ============================================================================== --- head/sys/netinet6/sctp6_usrreq.c Sun Jun 24 22:22:44 2012 (r237541) +++ head/sys/netinet6/sctp6_usrreq.c Sun Jun 24 23:12:24 2012 (r237542) @@ -183,7 +183,7 @@ sctp6_input(struct mbuf **i_pak, int *of } /* in6p's ref-count increased && stcb locked */ if ((in6p) && (stcb)) { - sctp_send_packet_dropped(stcb, net, m, iphlen, 1); + sctp_send_packet_dropped(stcb, net, m, pkt_len, iphlen, 1); sctp_chunk_output((struct sctp_inpcb *)in6p, stcb, SCTP_OUTPUT_FROM_INPUT_ERROR, SCTP_SO_NOT_LOCKED); } else if ((in6p != NULL) && (stcb == NULL)) { refcount_up = 1; From owner-svn-src-head@FreeBSD.ORG Mon Jun 25 03:06: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 DAB9F106566C; Mon, 25 Jun 2012 03:06:30 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8AA1A8FC08; Mon, 25 Jun 2012 03:06: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 q5P36ULx046377; Mon, 25 Jun 2012 03:06:30 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5P36Umu046375; Mon, 25 Jun 2012 03:06:30 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201206250306.q5P36Umu046375@svn.freebsd.org> From: Matt Jacob Date: Mon, 25 Jun 2012 03:06: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: r237544 - head/sys/dev/isp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 25 Jun 2012 03:06:31 -0000 Author: mjacob Date: Mon Jun 25 03:06:29 2012 New Revision: 237544 URL: http://svn.freebsd.org/changeset/base/237544 Log: Unbreak register tests for parallel SCSI. You can't overwrite registers 7 and 8. MFC after: 3 days Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Mon Jun 25 01:48:18 2012 (r237543) +++ head/sys/dev/isp/isp.c Mon Jun 25 03:06:29 2012 (r237544) @@ -710,8 +710,11 @@ isp_reset(ispsoftc_t *isp, int do_load_d 0x6666, 0x6677, 0x1122, 0x33ff, 0x0000, 0x0001, 0x1000, 0x1010, }; + int nmbox = ISP_NMBOX(isp); + if (IS_SCSI(isp)) + nmbox = 6; MBSINIT(&mbs, MBOX_MAILBOX_REG_TEST, MBLOGALL, 0); - for (i = 1; i < ISP_NMBOX(isp); i++) { + for (i = 1; i < nmbox; i++) { mbs.param[i] = patterns[i]; } isp_mboxcmd(isp, &mbs); @@ -719,7 +722,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d ISP_RESET0(isp); return; } - for (i = 1; i < ISP_NMBOX(isp); i++) { + for (i = 1; i < nmbox; i++) { if (mbs.param[i] != patterns[i]) { ISP_RESET0(isp); isp_prt(isp, ISP_LOGERR, "Register Test Failed at Register %d: should have 0x%04x but got 0x%04x", i, patterns[i], mbs.param[i]); From owner-svn-src-head@FreeBSD.ORG Mon Jun 25 03:48: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 F29541065674; Mon, 25 Jun 2012 03:48:11 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mail.kirov.so-ups.ru (ns.kirov.so-ups.ru [178.74.170.1]) by mx1.freebsd.org (Postfix) with ESMTP id 636D58FC08; Mon, 25 Jun 2012 03:48:11 +0000 (UTC) Received: from kas30pipe.localhost (localhost.kirov.so-ups.ru [127.0.0.1]) by mail.kirov.so-ups.ru (Postfix) with SMTP id F1E2FB8027; Mon, 25 Jun 2012 07:48:01 +0400 (MSK) Received: from kirov.so-ups.ru (unknown [172.21.81.1]) by mail.kirov.so-ups.ru (Postfix) with ESMTP id EC3D8B8024; Mon, 25 Jun 2012 07:48:01 +0400 (MSK) Received: by ns.kirov.so-ups.ru (Postfix, from userid 1010) id E48BFBA054; Mon, 25 Jun 2012 07:48:01 +0400 (MSK) Received: from [127.0.0.1] (unknown [10.118.3.52]) by ns.kirov.so-ups.ru (Postfix) with ESMTP id AD068BA043; Mon, 25 Jun 2012 07:48:01 +0400 (MSK) Message-ID: <4FE7DF6F.6020007@FreeBSD.org> Date: Mon, 25 Jun 2012 07:47:59 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: "Kenneth D. Merry" References: <201206240429.q5O4T3D7087012@svn.freebsd.org> In-Reply-To: <201206240429.q5O4T3D7087012@svn.freebsd.org> X-Enigmail-Version: 1.4.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig47FE5512055CB5C1C8DF0872" X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0284], KAS30/Release X-SpamTest-Info: Not protected Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237518 - in head: share/man/man9 sys/cam/scsi sys/dev/xen/blkfront sys/geom X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 25 Jun 2012 03:48:12 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig47FE5512055CB5C1C8DF0872 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable On 24.06.2012 8:29, Kenneth D. Merry wrote: > Author: ken > Date: Sun Jun 24 04:29:03 2012 > New Revision: 237518 > URL: http://svn.freebsd.org/changeset/base/237518 >=20 > Log: > Fix a bug which causes a panic in daopen(). The panic is caused by > a da(4) instance going away while GEOM is still probing it. > =20 > In this case, the GEOM disk class instance has been created by > disk_create(), and the taste of the disk is queued in the GEOM > event queue. > =20 > While that event is queued, the da(4) instance goes away. When the > open call comes into the da(4) driver, it dereferences the freed > (but non-NULL) peripheral pointer provided by GEOM, which results > in a panic. > =20 > The solution is to add a callback to the GEOM disk code that is > called when all of its resources are cleaned up. This is > implemented inside GEOM by adding an optional callback that is > called when all consumers have detached from a provider, and the > provider is about to be deleted. > =20 > geom.h: Add a new, optional, providergone callback that > is called when a provider is about to be deleted. > =20 > MFC after: 5 days This will break ABI. If you want to merge this change, it is better to use one of spare field in the geom structures. > @@ -102,6 +103,7 @@ struct g_class { > g_start_t *start; > g_spoiled_t *spoiled; > g_attrchanged_t *attrchanged; > + g_provgone_t *providergone; > g_dumpconf_t *dumpconf; > g_access_t *access; > g_orphan_t *orphan; > @@ -133,6 +135,7 @@ struct g_geom { > g_start_t *start; > g_spoiled_t *spoiled; > g_attrchanged_t *attrchanged; > + g_provgone_t *providergone; > g_dumpconf_t *dumpconf; > g_access_t *access; > g_orphan_t *orphan; --=20 WBR, Andrey V. Elsukov --------------enig47FE5512055CB5C1C8DF0872 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) iQEcBAEBAgAGBQJP599zAAoJEAHF6gQQyKF6SR4H/27Fly46TutKiwWR5aa0MwtI Pit/4fppncPdkWlXnPubNkUfczwCDIKA5XRQQlgSEVVHeSJoSI5LSVMwGShNDQPE 9j6k8xyoI+D2v9lCqHKjgDm8xc3Ju3tw7vjkSZVjaiZ0rrpMUlnh/iwDZWgYIyu3 UUGl/T9VtBV49VeLR3GAk8F/mnr/SQ6pBCCIWeZ8148t9DyZI3AOewSv4kqjXy9/ +8sZcoFo+vKGEpFfU3VkdpiAmL9HTQBN20zWAVX6p/QqPOWsiwo8VhNrPZ70Qk5G 2DnRw8UgS+a498Ur8WFRMjob6XEN2y45yNkg7CisxS1VcZ5Pejq9isHnW9bk848= =5UXk -----END PGP SIGNATURE----- --------------enig47FE5512055CB5C1C8DF0872-- From owner-svn-src-head@FreeBSD.ORG Mon Jun 25 04:26: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 5431A106566B; Mon, 25 Jun 2012 04:26:11 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F5678FC19; Mon, 25 Jun 2012 04:26: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 q5P4QBTA049885; Mon, 25 Jun 2012 04:26:11 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5P4QBSA049883; Mon, 25 Jun 2012 04:26:11 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201206250426.q5P4QBSA049883@svn.freebsd.org> From: "Kenneth D. Merry" Date: Mon, 25 Jun 2012 04:26: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: r237545 - head/sys/geom X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 25 Jun 2012 04:26:11 -0000 Author: ken Date: Mon Jun 25 04:26:10 2012 New Revision: 237545 URL: http://svn.freebsd.org/changeset/base/237545 Log: Consume spare fields for the providergone pointers added to the g_class and g_geom structures in change 237518. The original change would have broken the ABI. Suggested by: ae MFC after: 4 days Modified: head/sys/geom/geom.h Modified: head/sys/geom/geom.h ============================================================================== --- head/sys/geom/geom.h Mon Jun 25 03:06:29 2012 (r237544) +++ head/sys/geom/geom.h Mon Jun 25 04:26:10 2012 (r237545) @@ -103,12 +103,11 @@ struct g_class { g_start_t *start; g_spoiled_t *spoiled; g_attrchanged_t *attrchanged; - g_provgone_t *providergone; g_dumpconf_t *dumpconf; g_access_t *access; g_orphan_t *orphan; g_ioctl_t *ioctl; - void *spare1; + g_provgone_t *providergone; void *spare2; /* * The remaining elements are private @@ -135,12 +134,11 @@ struct g_geom { g_start_t *start; g_spoiled_t *spoiled; g_attrchanged_t *attrchanged; - g_provgone_t *providergone; g_dumpconf_t *dumpconf; g_access_t *access; g_orphan_t *orphan; g_ioctl_t *ioctl; - void *spare0; + g_provgone_t *providergone; void *spare1; void *softc; unsigned flags; From owner-svn-src-head@FreeBSD.ORG Mon Jun 25 04:26: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 C47F11065680; Mon, 25 Jun 2012 04:26:35 +0000 (UTC) (envelope-from ken@kdm.org) Received: from nargothrond.kdm.org (nargothrond.kdm.org [70.56.43.81]) by mx1.freebsd.org (Postfix) with ESMTP id 6E93F8FC15; Mon, 25 Jun 2012 04:26:35 +0000 (UTC) Received: from nargothrond.kdm.org (localhost [127.0.0.1]) by nargothrond.kdm.org (8.14.2/8.14.2) with ESMTP id q5P4QYN6055657; Sun, 24 Jun 2012 22:26:34 -0600 (MDT) (envelope-from ken@nargothrond.kdm.org) Received: (from ken@localhost) by nargothrond.kdm.org (8.14.2/8.14.2/Submit) id q5P4QY1k055656; Sun, 24 Jun 2012 22:26:34 -0600 (MDT) (envelope-from ken) Date: Sun, 24 Jun 2012 22:26:34 -0600 From: "Kenneth D. Merry" To: "Andrey V. Elsukov" Message-ID: <20120625042634.GA55640@nargothrond.kdm.org> References: <201206240429.q5O4T3D7087012@svn.freebsd.org> <4FE7DF6F.6020007@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FE7DF6F.6020007@FreeBSD.org> User-Agent: Mutt/1.4.2i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r237518 - in head: share/man/man9 sys/cam/scsi sys/dev/xen/blkfront sys/geom X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 25 Jun 2012 04:26:35 -0000 On Mon, Jun 25, 2012 at 07:47:59 +0400, Andrey V. Elsukov wrote: > On 24.06.2012 8:29, Kenneth D. Merry wrote: > > Author: ken > > Date: Sun Jun 24 04:29:03 2012 > > New Revision: 237518 > > URL: http://svn.freebsd.org/changeset/base/237518 > > > > Log: > > Fix a bug which causes a panic in daopen(). The panic is caused by > > a da(4) instance going away while GEOM is still probing it. > > > > In this case, the GEOM disk class instance has been created by > > disk_create(), and the taste of the disk is queued in the GEOM > > event queue. > > > > While that event is queued, the da(4) instance goes away. When the > > open call comes into the da(4) driver, it dereferences the freed > > (but non-NULL) peripheral pointer provided by GEOM, which results > > in a panic. > > > > The solution is to add a callback to the GEOM disk code that is > > called when all of its resources are cleaned up. This is > > implemented inside GEOM by adding an optional callback that is > > called when all consumers have detached from a provider, and the > > provider is about to be deleted. > > > > > geom.h: Add a new, optional, providergone callback that > > is called when a provider is about to be deleted. > > > > MFC after: 5 days > > This will break ABI. If you want to merge this change, > it is better to use one of spare field in the geom structures. Done, thanks! Ken -- Kenneth Merry ken@FreeBSD.ORG From owner-svn-src-head@FreeBSD.ORG Mon Jun 25 05:41: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 03663106564A; Mon, 25 Jun 2012 05:41:17 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E04A88FC08; Mon, 25 Jun 2012 05: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 q5P5fGBq052892; Mon, 25 Jun 2012 05:41:16 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5P5fGIv052885; Mon, 25 Jun 2012 05:41:16 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201206250541.q5P5fGIv052885@svn.freebsd.org> From: Kevin Lo Date: Mon, 25 Jun 2012 05: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: r237546 - in head: sys/dev/mfi sys/dev/mps sys/dev/mpt sys/kern tools/tools/net80211/w00t/redir tools/tools/net80211/wesside/dics X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 25 Jun 2012 05:41:17 -0000 Author: kevlo Date: Mon Jun 25 05:41:16 2012 New Revision: 237546 URL: http://svn.freebsd.org/changeset/base/237546 Log: Correct sizeof usage Obtained from: DragonFly Modified: head/sys/dev/mfi/mfi_tbolt.c head/sys/dev/mps/mps_sas.c head/sys/dev/mpt/mpt_cam.c head/sys/kern/subr_firmware.c head/tools/tools/net80211/w00t/redir/buddy.c head/tools/tools/net80211/wesside/dics/dics.c Modified: head/sys/dev/mfi/mfi_tbolt.c ============================================================================== --- head/sys/dev/mfi/mfi_tbolt.c Mon Jun 25 04:26:10 2012 (r237545) +++ head/sys/dev/mfi/mfi_tbolt.c Mon Jun 25 05:41:16 2012 (r237546) @@ -1078,7 +1078,7 @@ mfi_tbolt_build_mpt_cmd(struct mfi_softc if (!req_desc) return NULL; - bzero(req_desc, sizeof(req_desc)); + bzero(req_desc, sizeof(*req_desc)); req_desc->header.RequestFlags = (MPI2_REQ_DESCRIPT_FLAGS_SCSI_IO << MFI_REQ_DESCRIPT_FLAGS_TYPE_SHIFT); req_desc->header.SMID = index; Modified: head/sys/dev/mps/mps_sas.c ============================================================================== --- head/sys/dev/mps/mps_sas.c Mon Jun 25 04:26:10 2012 (r237545) +++ head/sys/dev/mps/mps_sas.c Mon Jun 25 05:41:16 2012 (r237546) @@ -2214,7 +2214,7 @@ mpssas_scsiio_complete(struct mps_softc sense_len = min(returned_sense_len, ccb->csio.sense_len - ccb->csio.sense_resid); bzero(&ccb->csio.sense_data, - sizeof(&ccb->csio.sense_data)); + sizeof(ccb->csio.sense_data)); bcopy(cm->cm_sense, &ccb->csio.sense_data, sense_len); ccb->ccb_h.status |= CAM_AUTOSNS_VALID; } Modified: head/sys/dev/mpt/mpt_cam.c ============================================================================== --- head/sys/dev/mpt/mpt_cam.c Mon Jun 25 04:26:10 2012 (r237545) +++ head/sys/dev/mpt/mpt_cam.c Mon Jun 25 05:41:16 2012 (r237546) @@ -3187,7 +3187,7 @@ mpt_scsi_reply_frame_handler(struct mpt_ else ccb->csio.sense_resid = 0; - bzero(&ccb->csio.sense_data, sizeof(&ccb->csio.sense_data)); + bzero(&ccb->csio.sense_data, sizeof(ccb->csio.sense_data)); bcopy(req->sense_vbuf, &ccb->csio.sense_data, min(ccb->csio.sense_len, sense_returned)); } Modified: head/sys/kern/subr_firmware.c ============================================================================== --- head/sys/kern/subr_firmware.c Mon Jun 25 04:26:10 2012 (r237545) +++ head/sys/kern/subr_firmware.c Mon Jun 25 05:41:16 2012 (r237546) @@ -198,7 +198,7 @@ firmware_register(const char *imagename, free(str, M_TEMP); return NULL; } - bzero(frp, sizeof(frp)); /* start from a clean record */ + bzero(frp, sizeof(*frp)); /* start from a clean record */ frp->fw.name = str; frp->fw.data = data; frp->fw.datasize = datasize; Modified: head/tools/tools/net80211/w00t/redir/buddy.c ============================================================================== --- head/tools/tools/net80211/w00t/redir/buddy.c Mon Jun 25 04:26:10 2012 (r237545) +++ head/tools/tools/net80211/w00t/redir/buddy.c Mon Jun 25 05:41:16 2012 (r237546) @@ -125,7 +125,7 @@ int main(int argc, char *argv[]) int len; int raw; - memset(&s_in, 0, sizeof(&s_in)); + memset(&s_in, 0, sizeof(s_in)); s_in.sin_family = PF_INET; s_in.sin_port = htons(666); s_in.sin_addr.s_addr = INADDR_ANY; Modified: head/tools/tools/net80211/wesside/dics/dics.c ============================================================================== --- head/tools/tools/net80211/wesside/dics/dics.c Mon Jun 25 04:26:10 2012 (r237545) +++ head/tools/tools/net80211/wesside/dics/dics.c Mon Jun 25 05:41:16 2012 (r237546) @@ -332,7 +332,7 @@ int main(int argc, char *argv[]) { sip = argv[1]; - memset(&s_in, 0, sizeof(&s_in)); + memset(&s_in, 0, sizeof(s_in)); us = socket (PF_INET, SOCK_DGRAM, IPPROTO_UDP); if (s == -1) { perror("socket()"); From owner-svn-src-head@FreeBSD.ORG Mon Jun 25 05:47: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 DA7141065673; Mon, 25 Jun 2012 05:47:13 +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 376328FC16; Mon, 25 Jun 2012 05:47: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 q5P5lDNu053178; Mon, 25 Jun 2012 05:47:13 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5P5lCN6053176; Mon, 25 Jun 2012 05:47:13 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201206250547.q5P5lCN6053176@svn.freebsd.org> From: Kevin Lo Date: Mon, 25 Jun 2012 05:47: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: r237547 - head/sys/dev/re X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2012 05:47:14 -0000 Author: kevlo Date: Mon Jun 25 05:47:12 2012 New Revision: 237547 URL: http://svn.freebsd.org/changeset/base/237547 Log: Fix size of the bcopy when extracting ethernet address Obtained from: DragonFly Modified: head/sys/dev/re/if_re.c Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Mon Jun 25 05:41:16 2012 (r237546) +++ head/sys/dev/re/if_re.c Mon Jun 25 05:47:12 2012 (r237547) @@ -1527,7 +1527,7 @@ re_attach(device_t dev) re_read_eeprom(sc, (caddr_t)as, RL_EE_EADDR, 3); for (i = 0; i < ETHER_ADDR_LEN / 2; i++) as[i] = le16toh(as[i]); - bcopy(as, eaddr, sizeof(eaddr)); + bcopy(as, eaddr, ETHER_ADDR_LEN); } if (sc->rl_type == RL_8169) { From owner-svn-src-head@FreeBSD.ORG Mon Jun 25 07:13: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 9C1D4106566B; Mon, 25 Jun 2012 07:13:25 +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 867EF8FC0A; Mon, 25 Jun 2012 07:13: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 q5P7DPNV057020; Mon, 25 Jun 2012 07:13:25 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5P7DP5V057017; Mon, 25 Jun 2012 07:13:25 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201206250713.q5P7DP5V057017@svn.freebsd.org> From: Alan Cox Date: Mon, 25 Jun 2012 07:13:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237551 - head/sys/amd64/amd64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 25 Jun 2012 07:13:25 -0000 Author: alc Date: Mon Jun 25 07:13:25 2012 New Revision: 237551 URL: http://svn.freebsd.org/changeset/base/237551 Log: Add PV chunk and list locking to pmap_change_wiring(), pmap_protect(), and pmap_remove(). The execution of these functions is no longer serialized by the pvh global lock. Make some stylistic changes to the affected code for the sake of consistency with related code elsewhere in the pmap. Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Mon Jun 25 07:11:03 2012 (r237550) +++ head/sys/amd64/amd64/pmap.c Mon Jun 25 07:13:25 2012 (r237551) @@ -257,8 +257,11 @@ static void free_pv_chunk(struct pv_chun static void free_pv_entry(pmap_t pmap, pv_entry_t pv); static pv_entry_t get_pv_entry(pmap_t pmap, boolean_t try); static int popcnt_pc_map_elem(uint64_t elem); -static void reserve_pv_entry(pmap_t pmap, int needed); -static void pmap_pv_demote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); +static vm_page_t reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **lockp); +static void reserve_pv_entries(pmap_t pmap, int needed, + struct rwlock **lockp); +static void pmap_pv_demote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa, + struct rwlock **lockp); static boolean_t pmap_pv_insert_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa, struct rwlock **lockp); static void pmap_pv_promote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); @@ -269,6 +272,8 @@ static int pmap_pvh_wired_mappings(struc static int pmap_change_attr_locked(vm_offset_t va, vm_size_t size, int mode); static boolean_t pmap_demote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va); +static boolean_t pmap_demote_pde_locked(pmap_t pmap, pd_entry_t *pde, + vm_offset_t va, struct rwlock **lockp); static boolean_t pmap_demote_pdpe(pmap_t pmap, pdp_entry_t *pdpe, vm_offset_t va); static boolean_t pmap_enter_pde(pmap_t pmap, vm_offset_t va, vm_page_t m, @@ -287,9 +292,10 @@ static boolean_t pmap_protect_pde(pmap_t vm_prot_t prot); static void pmap_pte_attr(pt_entry_t *pte, int cache_bits); static int pmap_remove_pde(pmap_t pmap, pd_entry_t *pdq, vm_offset_t sva, - vm_page_t *free); + vm_page_t *free, struct rwlock **lockp); static int pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, - vm_offset_t sva, pd_entry_t ptepde, vm_page_t *free); + vm_offset_t sva, pd_entry_t ptepde, vm_page_t *free, + struct rwlock **lockp); static void pmap_remove_pt_page(pmap_t pmap, vm_page_t mpte); static void pmap_remove_page(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, vm_page_t *free); @@ -2094,9 +2100,9 @@ SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_ * exacerbating the shortage of free pv entries. */ static vm_page_t -pmap_pv_reclaim(pmap_t locked_pmap) +reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **lockp) { - struct pch newtail; + struct pch new_tail; struct pv_chunk *pc; struct md_page *pvh; pd_entry_t *pde; @@ -2108,13 +2114,15 @@ pmap_pv_reclaim(pmap_t locked_pmap) uint64_t inuse; int bit, field, freed; - rw_assert(&pvh_global_lock, RA_WLOCKED); + rw_assert(&pvh_global_lock, RA_LOCKED); PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED); pmap = NULL; free = m_pc = NULL; - TAILQ_INIT(&newtail); + TAILQ_INIT(&new_tail); + mtx_lock(&pv_chunks_mutex); while ((pc = TAILQ_FIRST(&pv_chunks)) != NULL && free == NULL) { TAILQ_REMOVE(&pv_chunks, pc, pc_lru); + mtx_unlock(&pv_chunks_mutex); if (pmap != pc->pc_pmap) { if (pmap != NULL) { pmap_invalidate_all(pmap); @@ -2123,11 +2131,17 @@ pmap_pv_reclaim(pmap_t locked_pmap) } pmap = pc->pc_pmap; /* Avoid deadlock and lock recursion. */ - if (pmap > locked_pmap) + if (pmap > locked_pmap) { + if (*lockp != NULL) { + rw_wunlock(*lockp); + *lockp = NULL; + } PMAP_LOCK(pmap); - else if (pmap != locked_pmap && !PMAP_TRYLOCK(pmap)) { + } else if (pmap != locked_pmap && + !PMAP_TRYLOCK(pmap)) { pmap = NULL; - TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); + TAILQ_INSERT_TAIL(&new_tail, pc, pc_lru); + mtx_lock(&pv_chunks_mutex); continue; } } @@ -2156,6 +2170,7 @@ pmap_pv_reclaim(pmap_t locked_pmap) vm_page_dirty(m); if ((tpte & PG_A) != 0) vm_page_aflag_set(m, PGA_REFERENCED); + CHANGE_PV_LIST_LOCK_TO_VM_PAGE(lockp, m); TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); if (TAILQ_EMPTY(&m->md.pv_list) && (m->flags & PG_FICTITIOUS) == 0) { @@ -2171,32 +2186,36 @@ pmap_pv_reclaim(pmap_t locked_pmap) } } if (freed == 0) { - TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); + TAILQ_INSERT_TAIL(&new_tail, pc, pc_lru); + mtx_lock(&pv_chunks_mutex); continue; } /* Every freed mapping is for a 4 KB page. */ pmap_resident_count_dec(pmap, freed); - PV_STAT(pv_entry_frees += freed); - PV_STAT(pv_entry_spare += freed); + PV_STAT(atomic_add_long(&pv_entry_frees, freed)); + PV_STAT(atomic_add_int(&pv_entry_spare, freed)); PV_STAT(atomic_subtract_long(&pv_entry_count, freed)); TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); if (pc->pc_map[0] == PC_FREE0 && pc->pc_map[1] == PC_FREE1 && pc->pc_map[2] == PC_FREE2) { - PV_STAT(pv_entry_spare -= _NPCPV); - PV_STAT(pc_chunk_count--); - PV_STAT(pc_chunk_frees++); + PV_STAT(atomic_subtract_int(&pv_entry_spare, _NPCPV)); + PV_STAT(atomic_subtract_int(&pc_chunk_count, 1)); + PV_STAT(atomic_add_int(&pc_chunk_frees, 1)); /* Entire chunk is free; return it. */ m_pc = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); dump_drop_page(m_pc->phys_addr); + mtx_lock(&pv_chunks_mutex); break; } TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); - TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); + TAILQ_INSERT_TAIL(&new_tail, pc, pc_lru); + mtx_lock(&pv_chunks_mutex); /* One freed pv entry in locked_pmap is sufficient. */ if (pmap == locked_pmap) break; } - TAILQ_CONCAT(&pv_chunks, &newtail, pc_lru); + TAILQ_CONCAT(&pv_chunks, &new_tail, pc_lru); + mtx_unlock(&pv_chunks_mutex); if (pmap != NULL) { pmap_invalidate_all(pmap); if (pmap != locked_pmap) @@ -2273,6 +2292,7 @@ get_pv_entry(pmap_t pmap, boolean_t try) int bit, field; pv_entry_t pv; struct pv_chunk *pc; + struct rwlock *lock; vm_page_t m; rw_assert(&pvh_global_lock, RA_LOCKED); @@ -2310,7 +2330,10 @@ retry: PV_STAT(pc_chunk_tryfail++); return (NULL); } - m = pmap_pv_reclaim(pmap); + lock = NULL; + m = reclaim_pv_chunk(pmap, &lock); + if (lock != NULL) + rw_wunlock(lock); if (m == NULL) goto retry; } @@ -2355,7 +2378,7 @@ popcnt_pc_map_elem(uint64_t elem) * exceeds the given count, "needed". */ static void -reserve_pv_entry(pmap_t pmap, int needed) +reserve_pv_entries(pmap_t pmap, int needed, struct rwlock **lockp) { struct pch new_tail; struct pv_chunk *pc; @@ -2368,8 +2391,8 @@ reserve_pv_entry(pmap_t pmap, int needed /* * Newly allocated PV chunks must be stored in a private list until * the required number of PV chunks have been allocated. Otherwise, - * pmap_pv_reclaim() could recycle one of these chunks. In contrast, - * these chunks must be added to the pmap upon allocation. + * reclaim_pv_chunk() could recycle one of these chunks. In + * contrast, these chunks must be added to the pmap upon allocation. */ TAILQ_INIT(&new_tail); retry: @@ -2388,7 +2411,7 @@ retry: m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED); if (m == NULL) { - m = pmap_pv_reclaim(pmap); + m = reclaim_pv_chunk(pmap, lockp); if (m == NULL) goto retry; } @@ -2422,7 +2445,7 @@ pmap_pvh_remove(struct md_page *pvh, pma { pv_entry_t pv; - rw_assert(&pvh_global_lock, RA_WLOCKED); + rw_assert(&pvh_global_lock, RA_LOCKED); TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { if (pmap == PV_PMAP(pv) && va == pv->pv_va) { TAILQ_REMOVE(&pvh->pv_list, pv, pv_list); @@ -2438,17 +2461,19 @@ pmap_pvh_remove(struct md_page *pvh, pma * entries for each of the 4KB page mappings. */ static void -pmap_pv_demote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa) +pmap_pv_demote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa, + struct rwlock **lockp) { struct md_page *pvh; pv_entry_t pv; vm_offset_t va_last; vm_page_t m; - rw_assert(&pvh_global_lock, RA_WLOCKED); + rw_assert(&pvh_global_lock, RA_LOCKED); KASSERT((pa & PDRMASK) == 0, ("pmap_pv_demote_pde: pa is not 2mpage aligned")); - reserve_pv_entry(pmap, NPTEPG - 1); + reserve_pv_entries(pmap, NPTEPG - 1, lockp); + CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, pa); /* * Transfer the 2mpage's pv entry for this mapping to the first @@ -2491,11 +2516,11 @@ pmap_pv_promote_pde(pmap_t pmap, vm_offs ("pmap_pv_promote_pde: pa is not 2mpage aligned")); /* - * Transfer the first page's pv entry for this mapping to the - * 2mpage's pv list. Aside from avoiding the cost of a call - * to get_pv_entry(), a transfer avoids the possibility that - * get_pv_entry() calls pmap_pv_reclaim() and that pmap_pv_reclaim() - * removes one of the mappings that is being promoted. + * Transfer the first page's pv entry for this mapping to the 2mpage's + * pv list. Aside from avoiding the cost of a call to get_pv_entry(), + * a transfer avoids the possibility that get_pv_entry() calls + * reclaim_pv_chunk() and that reclaim_pv_chunk() removes one of the + * mappings that is being promoted. */ m = PHYS_TO_VM_PAGE(pa); va = trunc_2mpage(va); @@ -2589,6 +2614,20 @@ pmap_fill_ptp(pt_entry_t *firstpte, pt_e static boolean_t pmap_demote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va) { + struct rwlock *lock; + boolean_t rv; + + lock = NULL; + rv = pmap_demote_pde_locked(pmap, pde, va, &lock); + if (lock != NULL) + rw_wunlock(lock); + return (rv); +} + +static boolean_t +pmap_demote_pde_locked(pmap_t pmap, pd_entry_t *pde, vm_offset_t va, + struct rwlock **lockp) +{ pd_entry_t newpde, oldpde; pt_entry_t *firstpte, newpte; vm_paddr_t mptepa; @@ -2623,7 +2662,8 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t DMAP_MAX_ADDRESS ? VM_ALLOC_INTERRUPT : VM_ALLOC_NORMAL) | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED)) == NULL) { free = NULL; - pmap_remove_pde(pmap, pde, trunc_2mpage(va), &free); + pmap_remove_pde(pmap, pde, trunc_2mpage(va), &free, + lockp); pmap_invalidate_page(pmap, trunc_2mpage(va)); pmap_free_zero_pages(free); CTR2(KTR_PMAP, "pmap_demote_pde: failure for va %#lx" @@ -2683,16 +2723,16 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t /* * Demote the pv entry. This depends on the earlier demotion * of the mapping. Specifically, the (re)creation of a per- - * page pv entry might trigger the execution of pmap_pv_reclaim(), + * page pv entry might trigger the execution of reclaim_pv_chunk(), * which might reclaim a newly (re)created per-page pv entry * and destroy the associated mapping. In order to destroy * the mapping, the PDE must have already changed from mapping * the 2mpage to referencing the page table page. */ if ((oldpde & PG_MANAGED) != 0) - pmap_pv_demote_pde(pmap, va, oldpde & PG_PS_FRAME); + pmap_pv_demote_pde(pmap, va, oldpde & PG_PS_FRAME, lockp); - pmap_pde_demotions++; + atomic_add_long(&pmap_pde_demotions, 1); CTR2(KTR_PMAP, "pmap_demote_pde: success for va %#lx" " in pmap %p", va, pmap); return (TRUE); @@ -2703,7 +2743,7 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t */ static int pmap_remove_pde(pmap_t pmap, pd_entry_t *pdq, vm_offset_t sva, - vm_page_t *free) + vm_page_t *free, struct rwlock **lockp) { struct md_page *pvh; pd_entry_t oldpde; @@ -2725,6 +2765,7 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t pmap_invalidate_page(kernel_pmap, sva); pmap_resident_count_dec(pmap, NBPDR / PAGE_SIZE); if (oldpde & PG_MANAGED) { + CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, oldpde & PG_PS_FRAME); pvh = pa_to_pvh(oldpde & PG_PS_FRAME); pmap_pvh_free(pvh, pmap, sva); eva = sva + NBPDR; @@ -2740,7 +2781,7 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t } } if (pmap == kernel_pmap) { - if (!pmap_demote_pde(pmap, pdq, sva)) + if (!pmap_demote_pde_locked(pmap, pdq, sva, lockp)) panic("pmap_remove_pde: failed demotion"); } else { mpte = pmap_lookup_pt_page(pmap, sva); @@ -2762,7 +2803,7 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t */ static int pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, vm_offset_t va, - pd_entry_t ptepde, vm_page_t *free) + pd_entry_t ptepde, vm_page_t *free, struct rwlock **lockp) { struct md_page *pvh; pt_entry_t oldpte; @@ -2779,6 +2820,7 @@ pmap_remove_pte(pmap_t pmap, pt_entry_t vm_page_dirty(m); if (oldpte & PG_A) vm_page_aflag_set(m, PGA_REFERENCED); + CHANGE_PV_LIST_LOCK_TO_VM_PAGE(lockp, m); pmap_pvh_free(&m->md, pmap, va); if (TAILQ_EMPTY(&m->md.pv_list) && (m->flags & PG_FICTITIOUS) == 0) { @@ -2796,6 +2838,7 @@ pmap_remove_pte(pmap_t pmap, pt_entry_t static void pmap_remove_page(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, vm_page_t *free) { + struct rwlock *lock; pt_entry_t *pte; PMAP_LOCK_ASSERT(pmap, MA_OWNED); @@ -2804,7 +2847,10 @@ pmap_remove_page(pmap_t pmap, vm_offset_ pte = pmap_pde_to_pte(pde, va); if ((*pte & PG_V) == 0) return; - pmap_remove_pte(pmap, pte, va, *pde, free); + lock = NULL; + pmap_remove_pte(pmap, pte, va, *pde, free, &lock); + if (lock != NULL) + rw_wunlock(lock); pmap_invalidate_page(pmap, va); } @@ -2817,6 +2863,7 @@ pmap_remove_page(pmap_t pmap, vm_offset_ void pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { + struct rwlock *lock; vm_offset_t va, va_next; pml4_entry_t *pml4e; pdp_entry_t *pdpe; @@ -2833,7 +2880,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva anyvalid = 0; - rw_wlock(&pvh_global_lock); + rw_rlock(&pvh_global_lock); PMAP_LOCK(pmap); /* @@ -2849,6 +2896,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva } } + lock = NULL; for (; sva < eva; sva = va_next) { if (pmap->pm_stats.resident_count == 0) @@ -2901,9 +2949,10 @@ pmap_remove(pmap_t pmap, vm_offset_t sva */ if ((ptpaddr & PG_G) == 0) anyvalid = 1; - pmap_remove_pde(pmap, pde, sva, &free); + pmap_remove_pde(pmap, pde, sva, &free, &lock); continue; - } else if (!pmap_demote_pde(pmap, pde, sva)) { + } else if (!pmap_demote_pde_locked(pmap, pde, sva, + &lock)) { /* The large page mapping was destroyed. */ continue; } else @@ -2932,7 +2981,8 @@ pmap_remove(pmap_t pmap, vm_offset_t sva anyvalid = 1; else if (va == va_next) va = sva; - if (pmap_remove_pte(pmap, pte, sva, ptpaddr, &free)) { + if (pmap_remove_pte(pmap, pte, sva, ptpaddr, &free, + &lock)) { sva += PAGE_SIZE; break; } @@ -2940,10 +2990,12 @@ pmap_remove(pmap_t pmap, vm_offset_t sva if (va != va_next) pmap_invalidate_range(pmap, va, sva); } + if (lock != NULL) + rw_wunlock(lock); out: if (anyvalid) pmap_invalidate_all(pmap); - rw_wunlock(&pvh_global_lock); + rw_runlock(&pvh_global_lock); PMAP_UNLOCK(pmap); pmap_free_zero_pages(free); } @@ -3135,12 +3187,12 @@ resume: } else { if (!pv_lists_locked) { pv_lists_locked = TRUE; - if (!rw_try_wlock(&pvh_global_lock)) { + if (!rw_try_rlock(&pvh_global_lock)) { if (anychanged) pmap_invalidate_all( pmap); PMAP_UNLOCK(pmap); - rw_wlock(&pvh_global_lock); + rw_rlock(&pvh_global_lock); goto resume; } } @@ -3191,7 +3243,7 @@ retry: if (anychanged) pmap_invalidate_all(pmap); if (pv_lists_locked) - rw_wunlock(&pvh_global_lock); + rw_runlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3862,9 +3914,9 @@ pmap_change_wiring(pmap_t pmap, vm_offse { pd_entry_t *pde; pt_entry_t *pte; - boolean_t are_queues_locked; + boolean_t pv_lists_locked; - are_queues_locked = FALSE; + pv_lists_locked = FALSE; /* * Wiring is not a hardware characteristic so there is no need to @@ -3875,11 +3927,11 @@ retry: pde = pmap_pde(pmap, va); if ((*pde & PG_PS) != 0) { if (!wired != ((*pde & PG_W) == 0)) { - if (!are_queues_locked) { - are_queues_locked = TRUE; - if (!rw_try_wlock(&pvh_global_lock)) { + if (!pv_lists_locked) { + pv_lists_locked = TRUE; + if (!rw_try_rlock(&pvh_global_lock)) { PMAP_UNLOCK(pmap); - rw_wlock(&pvh_global_lock); + rw_rlock(&pvh_global_lock); goto retry; } } @@ -3897,8 +3949,8 @@ retry: atomic_clear_long(pte, PG_W); } out: - if (are_queues_locked) - rw_wunlock(&pvh_global_lock); + if (pv_lists_locked) + rw_runlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } From owner-svn-src-head@FreeBSD.ORG Mon Jun 25 09:46:07 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 745771065679; Mon, 25 Jun 2012 09:46:07 +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 5F04C8FC15; Mon, 25 Jun 2012 09:46: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 q5P9k7WO063692; Mon, 25 Jun 2012 09:46:07 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5P9k7Fn063689; Mon, 25 Jun 2012 09:46:07 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201206250946.q5P9k7Fn063689@svn.freebsd.org> From: Ulrich Spoerlein Date: Mon, 25 Jun 2012 09:46: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: r237560 - in head/sys/modules: rdma/krping toecore X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 25 Jun 2012 09:46:07 -0000 Author: uqs Date: Mon Jun 25 09:46:06 2012 New Revision: 237560 URL: http://svn.freebsd.org/changeset/base/237560 Log: Fix 'make depend'. Modified: head/sys/modules/rdma/krping/Makefile head/sys/modules/toecore/Makefile Modified: head/sys/modules/rdma/krping/Makefile ============================================================================== --- head/sys/modules/rdma/krping/Makefile Mon Jun 25 09:41:47 2012 (r237559) +++ head/sys/modules/rdma/krping/Makefile Mon Jun 25 09:46:06 2012 (r237560) @@ -5,8 +5,8 @@ RDMA= ${.CURDIR}/../../../contrib/rdma/k KMOD= krping SRCS= krping.c krping_dev.c getopt.c -SRCS+= bus_if.h device_if.h opt_sched.h pci_if.h pcib_if.h -SRCS+= vnode_if.h -CFLAGS+= -I${.CURDIR}/../../../ofed/include +SRCS+= bus_if.h device_if.h pci_if.h pcib_if.h vnode_if.h +SRCS+= opt_sched.h opt_inet.h opt_inet6.h +CFLAGS+= -I${.CURDIR}/../../../ofed/include .include Modified: head/sys/modules/toecore/Makefile ============================================================================== --- head/sys/modules/toecore/Makefile Mon Jun 25 09:41:47 2012 (r237559) +++ head/sys/modules/toecore/Makefile Mon Jun 25 09:46:06 2012 (r237560) @@ -4,6 +4,6 @@ KMOD= toecore SRCS= toecore.c -SRCS+= opt_ofed.h +SRCS+= opt_ofed.h opt_inet.h opt_inet6.h .include From owner-svn-src-head@FreeBSD.ORG Mon Jun 25 11:52: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 63B521065670; Mon, 25 Jun 2012 11:52:27 +0000 (UTC) (envelope-from monthadar@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F28A8FC0A; Mon, 25 Jun 2012 11:52: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 q5PBqRfo072178; Mon, 25 Jun 2012 11:52:27 GMT (envelope-from monthadar@svn.freebsd.org) Received: (from monthadar@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5PBqRHK072176; Mon, 25 Jun 2012 11:52:27 GMT (envelope-from monthadar@svn.freebsd.org) Message-Id: <201206251152.q5PBqRHK072176@svn.freebsd.org> From: Monthadar Al Jaberi Date: Mon, 25 Jun 2012 11:52: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: r237561 - head/sys/net80211 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2012 11:52:27 -0000 Author: monthadar Date: Mon Jun 25 11:52:26 2012 New Revision: 237561 URL: http://svn.freebsd.org/changeset/base/237561 Log: Mesh mode, potential garbage in QoS subfield. * qos[1] subfield is never assigned a value before this statement. qos[1] can potentially be OR:ed with garbage. Make it an assignment instead; * Remove brackets around if statement; Approved by: adrian Modified: head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Mon Jun 25 09:46:06 2012 (r237560) +++ head/sys/net80211/ieee80211_output.c Mon Jun 25 11:52:26 2012 (r237561) @@ -1313,9 +1313,9 @@ ieee80211_encap(struct ieee80211vap *vap if (ic->ic_wme.wme_wmeChanParams.cap_wmeParams[ac].wmep_noackPolicy) qos[0] |= IEEE80211_QOS_ACKPOLICY_NOACK; #ifdef IEEE80211_SUPPORT_MESH - if (vap->iv_opmode == IEEE80211_M_MBSS) { - qos[1] |= IEEE80211_QOS_MC; - } else + if (vap->iv_opmode == IEEE80211_M_MBSS) + qos[1] = IEEE80211_QOS_MC; + else #endif qos[1] = 0; wh->i_fc[0] |= IEEE80211_FC0_SUBTYPE_QOS; From owner-svn-src-head@FreeBSD.ORG Mon Jun 25 14:27: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 CB29B106566C; Mon, 25 Jun 2012 14:27:53 +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 9E33C8FC15; Mon, 25 Jun 2012 14:27:53 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 07153B915; Mon, 25 Jun 2012 10:27:53 -0400 (EDT) From: John Baldwin To: Marius Strobl Date: Mon, 25 Jun 2012 10:00:08 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201206131504.q5DF4opt031336@svn.freebsd.org> <20120623221626.GH69382@alchemy.franken.de> In-Reply-To: <20120623221626.GH69382@alchemy.franken.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201206251000.09052.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 25 Jun 2012 10:27:53 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237008 - head/sys/dev/pci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2012 14:27:53 -0000 On Saturday, June 23, 2012 6:16:26 pm Marius Strobl wrote: > On Wed, Jun 13, 2012 at 03:04:50PM +0000, John Baldwin wrote: > > Author: jhb > > Date: Wed Jun 13 15:04:50 2012 > > New Revision: 237008 > > URL: http://svn.freebsd.org/changeset/base/237008 > > > > Log: > > Fix a couple of bugs that prevented windows in PCI-PCI bridges from > > growing "downward" (moving the start address down). First, an off by > > one error caused the end address to be moved down an extra alignment > > chunk unnecessarily. Second, when aligning the new candidate starting > > address, the wrong bits were masked off. > > > > Unfortunately, this now panics a sparc64 machine on the first attempt > to use a grown resource via bus_space(9) for me: > pcib3: at device 0.0 on pci2 > pcib2: allocated I/O port range (0x1000-0x1fff) for rid 1c of pcib3 > pcib2: allocated memory range (0x200000-0x3ffffff) for rid 20 of pcib3 > pcib3: domain 0 > pcib3: secondary bus 5 > pcib3: subordinate bus 5 > pcib3: I/O decode 0x1000-0x1fff > pcib3: memory decode 0x200000-0x3ffffff > pcib3: no prefetched decode > pcib3: Subtractively decoded bridge. > <...> > pci3: on pcib3 > <...> > isab0: at device 30.0 on pci3 > isa0: on isab0 > <...> > rtc0: at port 0x70-0x73 on isa0 > pcib3: attempting to grow I/O port window for (0x70-0x73,0x4) > front candidate range: 0x70-0x73 > pcib3: grew I/O port window to 0x70-0x1fff > panic: start address is not aligned > Alternatively, this may also be a data access trap, which also indicates > that some invalid address being used for the access. I think this was fixed in the next commit to this file (I had gotten the mask bits on 'front' wrong). Yes, it should be fixed by r237271: Old version: (gdb) p/x (0x70 & (~(1ul << 12) - 1)) $1 = 0x70 Fixed version: (gdb) p/x (0x70 & (~((1ul << 12) - 1))) $2 = 0x0 > before: > rtc0: at port 0x70-0x73 on isa0 > pcib3: attempting to grow I/O port window for (0x70-0x73,0x4) > pcib2: allocated I/O port range (0x70-0x73) for rid 0 of rtc0 > > Shouldn't a subtractively decoded resource actually be outside of > the window of the parent PCI-PCI bridge, i.e. it seems we shouldn't > try to grow the window in that case? The below patch fixes this for > me, I'm not sure whether that actually is the right approach though. Well, I've seen subtractive bridges with programmed windows, and the resource will decode properly either way. What the current code does is allow the request to pass up the tree if growing fails. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Jun 25 16:52:28 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 F009A106566B; Mon, 25 Jun 2012 16:52:27 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DBA128FC0A; Mon, 25 Jun 2012 16:52: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 q5PGqR14084472; Mon, 25 Jun 2012 16:52:27 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5PGqRG0084470; Mon, 25 Jun 2012 16:52:27 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201206251652.q5PGqRG0084470@svn.freebsd.org> From: Navdeep Parhar Date: Mon, 25 Jun 2012 16:52: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: r237563 - head/sys/ofed/include/linux X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2012 16:52:28 -0000 Author: np Date: Mon Jun 25 16:52:27 2012 New Revision: 237563 URL: http://svn.freebsd.org/changeset/base/237563 Log: Fix clang warning when compiling iw_cxgb. Reported by: rene, dim Modified: head/sys/ofed/include/linux/workqueue.h Modified: head/sys/ofed/include/linux/workqueue.h ============================================================================== --- head/sys/ofed/include/linux/workqueue.h Mon Jun 25 12:30:51 2012 (r237562) +++ head/sys/ofed/include/linux/workqueue.h Mon Jun 25 16:52:27 2012 (r237563) @@ -129,7 +129,7 @@ _create_workqueue_common(char *name, int wq = kmalloc(sizeof(*wq), M_WAITOK); wq->taskqueue = taskqueue_create((name), M_WAITOK, taskqueue_thread_enqueue, &wq->taskqueue); - taskqueue_start_threads(&wq->taskqueue, cpus, PWAIT, (name)); + taskqueue_start_threads(&wq->taskqueue, cpus, PWAIT, "%s", name); return (wq); } From owner-svn-src-head@FreeBSD.ORG Mon Jun 25 17:08:19 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 528CF1065676; Mon, 25 Jun 2012 17:08:19 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id DDAA38FC15; Mon, 25 Jun 2012 17:08:18 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id q5PH8CuD058940; Mon, 25 Jun 2012 19:08:12 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id q5PH8CjT058939; Mon, 25 Jun 2012 19:08:12 +0200 (CEST) (envelope-from marius) Date: Mon, 25 Jun 2012 19:08:11 +0200 From: Marius Strobl To: John Baldwin Message-ID: <20120625170811.GI69382@alchemy.franken.de> References: <201206131504.q5DF4opt031336@svn.freebsd.org> <20120623221626.GH69382@alchemy.franken.de> <201206251000.09052.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201206251000.09052.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237008 - head/sys/dev/pci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2012 17:08:19 -0000 On Mon, Jun 25, 2012 at 10:00:08AM -0400, John Baldwin wrote: > On Saturday, June 23, 2012 6:16:26 pm Marius Strobl wrote: > > On Wed, Jun 13, 2012 at 03:04:50PM +0000, John Baldwin wrote: > > > Author: jhb > > > Date: Wed Jun 13 15:04:50 2012 > > > New Revision: 237008 > > > URL: http://svn.freebsd.org/changeset/base/237008 > > > > > > Log: > > > Fix a couple of bugs that prevented windows in PCI-PCI bridges from > > > growing "downward" (moving the start address down). First, an off by > > > one error caused the end address to be moved down an extra alignment > > > chunk unnecessarily. Second, when aligning the new candidate starting > > > address, the wrong bits were masked off. > > > > > > > Unfortunately, this now panics a sparc64 machine on the first attempt > > to use a grown resource via bus_space(9) for me: > > pcib3: at device 0.0 on pci2 > > pcib2: allocated I/O port range (0x1000-0x1fff) for rid 1c of pcib3 > > pcib2: allocated memory range (0x200000-0x3ffffff) for rid 20 of pcib3 > > pcib3: domain 0 > > pcib3: secondary bus 5 > > pcib3: subordinate bus 5 > > pcib3: I/O decode 0x1000-0x1fff > > pcib3: memory decode 0x200000-0x3ffffff > > pcib3: no prefetched decode > > pcib3: Subtractively decoded bridge. > > <...> > > pci3: on pcib3 > > <...> > > isab0: at device 30.0 on pci3 > > isa0: on isab0 > > <...> > > rtc0: at port 0x70-0x73 on isa0 > > pcib3: attempting to grow I/O port window for (0x70-0x73,0x4) > > front candidate range: 0x70-0x73 > > pcib3: grew I/O port window to 0x70-0x1fff > > panic: start address is not aligned > > Alternatively, this may also be a data access trap, which also indicates > > that some invalid address being used for the access. > > I think this was fixed in the next commit to this file (I had gotten the > mask bits on 'front' wrong). Yes, it should be fixed by r237271: > > Old version: > > (gdb) p/x (0x70 & (~(1ul << 12) - 1)) > $1 = 0x70 > > Fixed version: > > (gdb) p/x (0x70 & (~((1ul << 12) - 1))) > $2 = 0x0 Well, a stock r237433 still panics with a data access trap when trying to use the resource via bus_space(9). So while the math for growing the window is probably right now, there still is a problem. > > > before: > > rtc0: at port 0x70-0x73 on isa0 > > pcib3: attempting to grow I/O port window for (0x70-0x73,0x4) > > pcib2: allocated I/O port range (0x70-0x73) for rid 0 of rtc0 > > > > Shouldn't a subtractively decoded resource actually be outside of > > the window of the parent PCI-PCI bridge, i.e. it seems we shouldn't > > try to grow the window in that case? The below patch fixes this for > > me, I'm not sure whether that actually is the right approach though. > > Well, I've seen subtractive bridges with programmed windows, and the resource > will decode properly either way. What the current code does is allow the > request to pass up the tree if growing fails. By growing the window to 0x0-0x1fff in this case we are effectively turning the formerly subtractively decoded resource in a positively decodeded one. Maybe there's some additional bit, probably in the PCI-ISA bridge, that needs to be switch for that, too? In any case, growing the window in this case and by that changing the type of decoding seems like a strange approach to me. Why do subtractive decoders exist in the first place when the windows alternatively could be grown/set up to only just do positive decoding instead? Marius From owner-svn-src-head@FreeBSD.ORG Mon Jun 25 17:15:10 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 47F9B1065670; Mon, 25 Jun 2012 17:15:10 +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 31AF98FC15; Mon, 25 Jun 2012 17:15:10 +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 q5PHFAuf085472; Mon, 25 Jun 2012 17:15:10 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5PHF9lF085463; Mon, 25 Jun 2012 17:15:09 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201206251715.q5PHF9lF085463@svn.freebsd.org> From: Michael Tuexen Date: Mon, 25 Jun 2012 17:15: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: r237565 - 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: Mon, 25 Jun 2012 17:15:10 -0000 Author: tuexen Date: Mon Jun 25 17:15:09 2012 New Revision: 237565 URL: http://svn.freebsd.org/changeset/base/237565 Log: Whitespace cleanup. MFC after: 3 days Modified: head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_sysctl.c head/sys/netinet/sctp_sysctl.h head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctputil.c head/sys/netinet6/sctp6_usrreq.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Mon Jun 25 17:12:51 2012 (r237564) +++ head/sys/netinet/sctp_indata.c Mon Jun 25 17:15:09 2012 (r237565) @@ -1529,7 +1529,7 @@ sctp_process_a_data_chunk(struct sctp_tc */ if (stcb->sctp_socket->so_rcv.sb_cc) { /* some to read, wake-up */ -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; so = SCTP_INP_SO(stcb->sctp_ep); @@ -1545,7 +1545,7 @@ sctp_process_a_data_chunk(struct sctp_tc } #endif sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif } @@ -3982,7 +3982,7 @@ sctp_express_handle_sack(struct sctp_tcb } /* sa_ignore NO_NULL_CHK */ if (stcb->sctp_socket) { -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; #endif @@ -3991,7 +3991,7 @@ sctp_express_handle_sack(struct sctp_tcb /* sa_ignore NO_NULL_CHK */ sctp_wakeup_log(stcb, 1, SCTP_WAKESND_FROM_SACK); } -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(stcb->sctp_ep); atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); @@ -4005,7 +4005,7 @@ sctp_express_handle_sack(struct sctp_tcb } #endif sctp_sowwakeup_locked(stcb->sctp_ep, stcb->sctp_socket); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif } else { @@ -4734,7 +4734,7 @@ sctp_handle_sack(struct mbuf *m, int off } /* sa_ignore NO_NULL_CHK */ if ((wake_him) && (stcb->sctp_socket)) { -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; #endif @@ -4742,7 +4742,7 @@ sctp_handle_sack(struct mbuf *m, int off if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) { sctp_wakeup_log(stcb, wake_him, SCTP_WAKESND_FROM_SACK); } -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(stcb->sctp_ep); atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); @@ -4756,7 +4756,7 @@ sctp_handle_sack(struct mbuf *m, int off } #endif sctp_sowwakeup_locked(stcb->sctp_ep, stcb->sctp_socket); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif } else { Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Mon Jun 25 17:12:51 2012 (r237564) +++ head/sys/netinet/sctp_input.c Mon Jun 25 17:15:09 2012 (r237565) @@ -757,7 +757,7 @@ static void sctp_handle_abort(struct sctp_abort_chunk *abort, struct sctp_tcb *stcb, struct sctp_nets *net) { -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; #endif @@ -807,7 +807,7 @@ sctp_handle_abort(struct sctp_abort_chun #ifdef SCTP_ASOCLOG_OF_TSNS sctp_print_out_track_log(stcb); #endif -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(stcb->sctp_ep); atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); @@ -818,7 +818,7 @@ sctp_handle_abort(struct sctp_abort_chun stcb->asoc.state |= SCTP_STATE_WAS_ABORTED; (void)sctp_free_assoc(stcb->sctp_ep, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_6); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif SCTPDBG(SCTP_DEBUG_INPUT2, "sctp_handle_abort: finished\n"); @@ -860,7 +860,7 @@ sctp_handle_shutdown(struct sctp_shutdow struct sctp_association *asoc; int some_on_streamwheel; -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; #endif @@ -892,7 +892,7 @@ sctp_handle_shutdown(struct sctp_shutdow asoc->control_pdapi->pdapi_aborted = 1; asoc->control_pdapi = NULL; SCTP_INP_READ_UNLOCK(stcb->sctp_ep); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(stcb->sctp_ep); atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); @@ -906,7 +906,7 @@ sctp_handle_shutdown(struct sctp_shutdow } #endif sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif } @@ -966,7 +966,7 @@ sctp_handle_shutdown_ack(struct sctp_shu { struct sctp_association *asoc; -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; so = SCTP_INP_SO(stcb->sctp_ep); @@ -1000,7 +1000,7 @@ sctp_handle_shutdown_ack(struct sctp_shu asoc->control_pdapi->pdapi_aborted = 1; asoc->control_pdapi = NULL; SCTP_INP_READ_UNLOCK(stcb->sctp_ep); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); SCTP_SOCKET_LOCK(so, 1); @@ -1013,7 +1013,7 @@ sctp_handle_shutdown_ack(struct sctp_shu } #endif sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif } @@ -1037,7 +1037,7 @@ sctp_handle_shutdown_ack(struct sctp_shu } SCTP_STAT_INCR_COUNTER32(sctps_shutdown); /* free the TCB but first save off the ep */ -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); SCTP_SOCKET_LOCK(so, 1); @@ -1046,7 +1046,7 @@ sctp_handle_shutdown_ack(struct sctp_shu #endif (void)sctp_free_assoc(stcb->sctp_ep, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_10); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif } @@ -1132,7 +1132,7 @@ sctp_handle_error(struct sctp_chunkhdr * struct sctp_association *asoc; int adjust; -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; #endif @@ -1195,7 +1195,7 @@ sctp_handle_error(struct sctp_chunkhdr * asoc->max_init_times) { sctp_abort_notification(stcb, 0, 0, NULL, SCTP_SO_NOT_LOCKED); /* now free the asoc */ -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(stcb->sctp_ep); atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); @@ -1205,7 +1205,7 @@ sctp_handle_error(struct sctp_chunkhdr * #endif (void)sctp_free_assoc(stcb->sctp_ep, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_11); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif return (-1); @@ -1580,7 +1580,7 @@ sctp_process_cookie_existing(struct mbuf (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) && (inp->sctp_socket->so_qlimit == 0) ) { -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; #endif @@ -1592,7 +1592,7 @@ sctp_process_cookie_existing(struct mbuf */ stcb->sctp_ep->sctp_flags |= SCTP_PCB_FLAGS_CONNECTED; -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(stcb->sctp_ep); atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); @@ -1605,7 +1605,7 @@ sctp_process_cookie_existing(struct mbuf } #endif soisconnected(stcb->sctp_socket); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif } @@ -1798,13 +1798,13 @@ sctp_process_cookie_existing(struct mbuf if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) && (inp->sctp_socket->so_qlimit == 0)) { -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; #endif stcb->sctp_ep->sctp_flags |= SCTP_PCB_FLAGS_CONNECTED; -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(stcb->sctp_ep); atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); @@ -1817,7 +1817,7 @@ sctp_process_cookie_existing(struct mbuf } #endif soisconnected(stcb->sctp_socket); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif } @@ -2029,7 +2029,7 @@ sctp_process_cookie_new(struct mbuf *m, struct sockaddr_in6 *sin6; #endif -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; so = SCTP_INP_SO(inp); @@ -2133,14 +2133,14 @@ sctp_process_cookie_new(struct mbuf *m, sh, op_err, use_mflowid, mflowid, vrf_id, port); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_TCB_UNLOCK(stcb); SCTP_SOCKET_LOCK(so, 1); SCTP_TCB_LOCK(stcb); #endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_16); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif atomic_subtract_int(&stcb->asoc.refcnt, 1); @@ -2165,13 +2165,13 @@ sctp_process_cookie_new(struct mbuf *m, retval = 0; if (retval < 0) { atomic_add_int(&stcb->asoc.refcnt, 1); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_TCB_UNLOCK(stcb); SCTP_SOCKET_LOCK(so, 1); SCTP_TCB_LOCK(stcb); #endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_16); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif atomic_subtract_int(&stcb->asoc.refcnt, 1); @@ -2182,13 +2182,13 @@ sctp_process_cookie_new(struct mbuf *m, init_offset + sizeof(struct sctp_init_chunk), initack_offset, sh, init_src)) { atomic_add_int(&stcb->asoc.refcnt, 1); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_TCB_UNLOCK(stcb); SCTP_SOCKET_LOCK(so, 1); SCTP_TCB_LOCK(stcb); #endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_17); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif atomic_subtract_int(&stcb->asoc.refcnt, 1); @@ -2211,13 +2211,13 @@ sctp_process_cookie_new(struct mbuf *m, SCTPDBG(SCTP_DEBUG_AUTH1, "COOKIE-ECHO: AUTH failed\n"); atomic_add_int(&stcb->asoc.refcnt, 1); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_TCB_UNLOCK(stcb); SCTP_SOCKET_LOCK(so, 1); SCTP_TCB_LOCK(stcb); #endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_18); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif atomic_subtract_int(&stcb->asoc.refcnt, 1); @@ -2274,13 +2274,13 @@ sctp_process_cookie_new(struct mbuf *m, #endif default: atomic_add_int(&stcb->asoc.refcnt, 1); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_TCB_UNLOCK(stcb); SCTP_SOCKET_LOCK(so, 1); SCTP_TCB_LOCK(stcb); #endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_19); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif atomic_subtract_int(&stcb->asoc.refcnt, 1); @@ -2301,7 +2301,7 @@ sctp_process_cookie_new(struct mbuf *m, * a bit of protection is worth having.. */ stcb->sctp_ep->sctp_flags |= SCTP_PCB_FLAGS_CONNECTED; -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); SCTP_SOCKET_LOCK(so, 1); @@ -2313,7 +2313,7 @@ sctp_process_cookie_new(struct mbuf *m, } #endif soisconnected(stcb->sctp_socket); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif } else if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) && @@ -2780,7 +2780,7 @@ sctp_handle_cookie_echo(struct mbuf *m, if (so == NULL) { struct mbuf *op_err; -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *pcb_so; #endif @@ -2791,7 +2791,7 @@ sctp_handle_cookie_echo(struct mbuf *m, sh, op_err, use_mflowid, mflowid, vrf_id, port); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) pcb_so = SCTP_INP_SO(*inp_p); atomic_add_int(&(*stcb)->asoc.refcnt, 1); SCTP_TCB_UNLOCK((*stcb)); @@ -2800,7 +2800,7 @@ sctp_handle_cookie_echo(struct mbuf *m, atomic_subtract_int(&(*stcb)->asoc.refcnt, 1); #endif (void)sctp_free_assoc(*inp_p, *stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_20); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(pcb_so, 1); #endif return (NULL); @@ -2890,13 +2890,13 @@ sctp_handle_cookie_echo(struct mbuf *m, * Pull it from the incomplete queue and wake the * guy */ -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) atomic_add_int(&(*stcb)->asoc.refcnt, 1); SCTP_TCB_UNLOCK((*stcb)); SCTP_SOCKET_LOCK(so, 1); #endif soisconnected(so); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_TCB_LOCK((*stcb)); atomic_subtract_int(&(*stcb)->asoc.refcnt, 1); SCTP_SOCKET_UNLOCK(so, 1); @@ -2954,12 +2954,12 @@ sctp_handle_cookie_ack(struct sctp_cooki sctp_ulp_notify(SCTP_NOTIFY_ASSOC_UP, stcb, 0, NULL, SCTP_SO_NOT_LOCKED); if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) { -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; #endif stcb->sctp_ep->sctp_flags |= SCTP_PCB_FLAGS_CONNECTED; -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(stcb->sctp_ep); atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); @@ -2970,7 +2970,7 @@ sctp_handle_cookie_ack(struct sctp_cooki if ((stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) == 0) { soisconnected(stcb->sctp_socket); } -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif } @@ -3198,7 +3198,7 @@ sctp_handle_shutdown_complete(struct sct { struct sctp_association *asoc; -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; #endif @@ -3233,7 +3233,7 @@ sctp_handle_shutdown_complete(struct sct /* free the TCB */ SCTPDBG(SCTP_DEBUG_INPUT2, "sctp_handle_shutdown_complete: calls free-asoc\n"); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(stcb->sctp_ep); atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); @@ -3242,7 +3242,7 @@ sctp_handle_shutdown_complete(struct sct atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif (void)sctp_free_assoc(stcb->sctp_ep, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_23); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif return; @@ -4429,7 +4429,7 @@ __attribute__((noinline)) int auth_skipped = 0; int asconf_cnt = 0; -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; #endif @@ -4787,7 +4787,7 @@ process_control_chunks: } *offset = length; if (stcb) { -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(inp); atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); @@ -4796,7 +4796,7 @@ process_control_chunks: atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_27); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif } @@ -5207,7 +5207,7 @@ process_control_chunks: if ((stcb) && (stcb->asoc.total_output_queue_size)) { ; } else if (stcb) { -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(inp); atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); @@ -5216,7 +5216,7 @@ process_control_chunks: atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_27); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif *offset = length; @@ -5370,7 +5370,7 @@ process_control_chunks: *fwd_tsn_seen = 1; if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) { /* We are not interested anymore */ -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(inp); atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); @@ -5379,7 +5379,7 @@ process_control_chunks: atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_29); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif *offset = length; @@ -5415,7 +5415,7 @@ process_control_chunks: } if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) { /* We are not interested anymore */ -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(inp); atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); @@ -5424,7 +5424,7 @@ process_control_chunks: atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_30); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif *offset = length; Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Mon Jun 25 17:12:51 2012 (r237564) +++ head/sys/netinet/sctp_output.c Mon Jun 25 17:15:09 2012 (r237565) @@ -3892,7 +3892,7 @@ sctp_lowlevel_chunk_output(struct sctp_i struct udphdr *udp = NULL; uint8_t tos_value; -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so = NULL; #endif @@ -4132,14 +4132,14 @@ sctp_lowlevel_chunk_output(struct sctp_i sctp_packet_log(o_pak); #endif /* send it out. table id is taken from stcb */ -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) if ((SCTP_BASE_SYSCTL(sctp_output_unlocked)) && (so_locked)) { so = SCTP_INP_SO(inp); SCTP_SOCKET_UNLOCK(so, 0); } #endif SCTP_IP_OUTPUT(ret, o_pak, ro, stcb, vrf_id); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) if ((SCTP_BASE_SYSCTL(sctp_output_unlocked)) && (so_locked)) { atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); @@ -4480,7 +4480,7 @@ sctp_lowlevel_chunk_output(struct sctp_i #endif } /* send it out. table id is taken from stcb */ -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) if ((SCTP_BASE_SYSCTL(sctp_output_unlocked)) && (so_locked)) { so = SCTP_INP_SO(inp); SCTP_SOCKET_UNLOCK(so, 0); @@ -4491,7 +4491,7 @@ sctp_lowlevel_chunk_output(struct sctp_i sctp_packet_log(o_pak); #endif SCTP_IP6_OUTPUT(ret, o_pak, (struct route_in6 *)ro, &ifp, stcb, vrf_id); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) if ((SCTP_BASE_SYSCTL(sctp_output_unlocked)) && (so_locked)) { atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); Modified: head/sys/netinet/sctp_sysctl.c ============================================================================== --- head/sys/netinet/sctp_sysctl.c Mon Jun 25 17:12:51 2012 (r237564) +++ head/sys/netinet/sctp_sysctl.c Mon Jun 25 17:15:09 2012 (r237565) @@ -665,7 +665,7 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS) #ifdef SCTP_DEBUG RANGECHK(SCTP_BASE_SYSCTL(sctp_debug_on), SCTPCTL_DEBUG_MIN, SCTPCTL_DEBUG_MAX); #endif -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) RANGECHK(SCTP_BASE_SYSCTL(sctp_output_unlocked), SCTPCTL_OUTPUT_UNLOCKED_MIN, SCTPCTL_OUTPUT_UNLOCKED_MAX); #endif } @@ -1125,7 +1125,7 @@ SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUT #endif -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, output_unlocked, CTLTYPE_UINT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_output_unlocked), 0, sysctl_sctp_check, "IU", SCTPCTL_OUTPUT_UNLOCKED_DESC); Modified: head/sys/netinet/sctp_sysctl.h ============================================================================== --- head/sys/netinet/sctp_sysctl.h Mon Jun 25 17:12:51 2012 (r237564) +++ head/sys/netinet/sctp_sysctl.h Mon Jun 25 17:15:09 2012 (r237565) @@ -531,7 +531,7 @@ struct sctp_sysctl { #endif -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) #define SCTPCTL_OUTPUT_UNLOCKED_DESC "Unlock socket when sending packets down to IP." #define SCTPCTL_OUTPUT_UNLOCKED_MIN 0 #define SCTPCTL_OUTPUT_UNLOCKED_MAX 1 Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Mon Jun 25 17:12:51 2012 (r237564) +++ head/sys/netinet/sctp_usrreq.c Mon Jun 25 17:15:09 2012 (r237565) @@ -224,7 +224,7 @@ sctp_notify(struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net) { -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; #endif @@ -283,7 +283,7 @@ sctp_notify(struct sctp_inpcb *inp, * with no TCB */ sctp_abort_notification(stcb, 1, 0, NULL, SCTP_SO_NOT_LOCKED); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(inp); atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); @@ -292,7 +292,7 @@ sctp_notify(struct sctp_inpcb *inp, atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_2); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); /* SCTP_TCB_UNLOCK(stcb); MT: I think this is not needed. */ #endif @@ -5842,7 +5842,7 @@ sctp_ctloutput(struct socket *so, struct if (INP_CHECK_SOCKAF(so, AF_INET6)) error = ip6_ctloutput(so, sopt); #endif /* INET6 */ -#if defined(INET) && defined (INET6) +#if defined(INET) && defined(INET6) else #endif #ifdef INET Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Mon Jun 25 17:12:51 2012 (r237564) +++ head/sys/netinet/sctputil.c Mon Jun 25 17:15:09 2012 (r237565) @@ -1412,7 +1412,7 @@ sctp_timeout_handler(void *t) struct sctp_nets *net; struct sctp_timer *tmr; -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; #endif @@ -1777,7 +1777,7 @@ sctp_timeout_handler(void *t) /* Can we free it yet? */ SCTP_INP_DECR_REF(inp); sctp_timer_stop(SCTP_TIMER_TYPE_ASOCKILL, inp, stcb, NULL, SCTP_FROM_SCTPUTIL + SCTP_LOC_1); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(inp); atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); @@ -1786,7 +1786,7 @@ sctp_timeout_handler(void *t) atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_2); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif /* @@ -2600,7 +2600,7 @@ sctp_notify_assoc_change(uint16_t state, size_t notif_len, abort_len; unsigned int i; -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; #endif @@ -2698,7 +2698,7 @@ set_error: } } /* Wake ANY sleepers */ -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(stcb->sctp_ep); if (!so_locked) { atomic_add_int(&stcb->asoc.refcnt, 1); @@ -2719,7 +2719,7 @@ set_error: } sorwakeup(stcb->sctp_socket); sowwakeup(stcb->sctp_socket); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) if (!so_locked) { SCTP_SOCKET_UNLOCK(so, 1); } @@ -3134,7 +3134,7 @@ sctp_notify_partial_delivery_indication( } if (stcb->sctp_ep && stcb->sctp_socket) { /* This should always be the case */ -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; so = SCTP_INP_SO(stcb->sctp_ep); @@ -3151,7 +3151,7 @@ sctp_notify_partial_delivery_indication( } #endif sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) if (!so_locked) { SCTP_SOCKET_UNLOCK(so, 1); } @@ -3173,7 +3173,7 @@ sctp_notify_shutdown_event(struct sctp_t if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) { /* mark socket closed for read/write and wakeup! */ -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; so = SCTP_INP_SO(stcb->sctp_ep); @@ -3188,7 +3188,7 @@ sctp_notify_shutdown_event(struct sctp_t } #endif socantsendmore(stcb->sctp_socket); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif } @@ -3830,7 +3830,7 @@ sctp_abort_association(struct sctp_inpcb { uint32_t vtag; -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; #endif @@ -3849,7 +3849,7 @@ sctp_abort_association(struct sctp_inpcb vrf_id, port); if (stcb != NULL) { /* Ok, now lets free it */ -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(inp); atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); @@ -3863,7 +3863,7 @@ sctp_abort_association(struct sctp_inpcb SCTP_STAT_DECR_GAUGE32(sctps_currestab); } (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_4); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif } @@ -3942,12 +3942,12 @@ sctp_abort_an_association(struct sctp_in #endif ) { -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; #endif -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(inp); #endif if (stcb == NULL) { @@ -3977,7 +3977,7 @@ sctp_abort_an_association(struct sctp_in #ifdef SCTP_ASOCLOG_OF_TSNS sctp_print_out_track_log(stcb); #endif -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) if (!so_locked) { atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); @@ -3987,7 +3987,7 @@ sctp_abort_an_association(struct sctp_in } #endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_5); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) if (!so_locked) { SCTP_SOCKET_UNLOCK(so, 1); } @@ -4475,7 +4475,7 @@ sctp_add_to_readq(struct sctp_inpcb *inp if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_ZERO_COPY_ACTIVE)) { SCTP_ZERO_COPY_EVENT(inp, inp->sctp_socket); } else { -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; so = SCTP_INP_SO(inp); @@ -4496,7 +4496,7 @@ sctp_add_to_readq(struct sctp_inpcb *inp } #endif sctp_sorwakeup(inp, inp->sctp_socket); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) if (!so_locked) { SCTP_SOCKET_UNLOCK(so, 1); } @@ -4629,7 +4629,7 @@ get_out: if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_ZERO_COPY_ACTIVE)) { SCTP_ZERO_COPY_EVENT(inp, inp->sctp_socket); } else { -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; so = SCTP_INP_SO(inp); @@ -4648,7 +4648,7 @@ get_out: } #endif sctp_sorwakeup(inp, inp->sctp_socket); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); #endif } @@ -4905,7 +4905,7 @@ sctp_release_pr_sctp_chunk(struct sctp_t SCTP_TCB_SEND_UNLOCK(stcb); } if (do_wakeup_routine) { -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; so = SCTP_INP_SO(stcb->sctp_ep); @@ -4923,7 +4923,7 @@ sctp_release_pr_sctp_chunk(struct sctp_t } #endif sctp_sowwakeup(stcb->sctp_ep, stcb->sctp_socket); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) if (!so_locked) { SCTP_SOCKET_UNLOCK(so, 1); } Modified: head/sys/netinet6/sctp6_usrreq.c ============================================================================== --- head/sys/netinet6/sctp6_usrreq.c Mon Jun 25 17:12:51 2012 (r237564) +++ head/sys/netinet6/sctp6_usrreq.c Mon Jun 25 17:15:09 2012 (r237565) @@ -395,7 +395,7 @@ sctp6_notify(struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net) { -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; #endif @@ -450,7 +450,7 @@ sctp6_notify(struct sctp_inpcb *inp, * with no TCB */ sctp_abort_notification(stcb, 1, 0, NULL, SCTP_SO_NOT_LOCKED); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) so = SCTP_INP_SO(inp); atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); @@ -459,7 +459,7 @@ sctp6_notify(struct sctp_inpcb *inp, atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_2); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) +#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); /* SCTP_TCB_UNLOCK(stcb); MT: I think this is not needed. */ #endif From owner-svn-src-head@FreeBSD.ORG Mon Jun 25 17:50: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 428D21065674; Mon, 25 Jun 2012 17:50:12 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E4B38FC18; Mon, 25 Jun 2012 17:50: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 q5PHoCXM086905; Mon, 25 Jun 2012 17:50:12 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5PHoBIi086903; Mon, 25 Jun 2012 17:50:11 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201206251750.q5PHoBIi086903@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Mon, 25 Jun 2012 17:50: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: r237566 - head/sys/mips/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2012 17:50:12 -0000 Author: gonzo Date: Mon Jun 25 17:50:11 2012 New Revision: 237566 URL: http://svn.freebsd.org/changeset/base/237566 Log: Handle case when result of pmap_pte is NULL. This issue was uncovered by r237367 Modified: head/sys/mips/mips/pmap.c Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Mon Jun 25 17:15:09 2012 (r237565) +++ head/sys/mips/mips/pmap.c Mon Jun 25 17:50:11 2012 (r237566) @@ -765,6 +765,7 @@ pmap_extract(pmap_t pmap, vm_offset_t va vm_page_t pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_prot_t prot) { + pt_entry_t *ptep; pt_entry_t pte; vm_page_t m; vm_paddr_t pa; @@ -773,8 +774,9 @@ pmap_extract_and_hold(pmap_t pmap, vm_of pa = 0; PMAP_LOCK(pmap); retry: - pte = *pmap_pte(pmap, va); - if (pte != 0 && pte_test(&pte, PTE_V) && + ptep = pmap_pte(pmap, va); + if ((ptep != NULL) && ((pte = *ptep) != 0) && + pte_test(&pte, PTE_V) && (pte_test(&pte, PTE_D) || (prot & VM_PROT_WRITE) == 0)) { if (vm_page_pa_tryrelock(pmap, TLBLO_PTE_TO_PA(pte), &pa)) goto retry; From owner-svn-src-head@FreeBSD.ORG Mon Jun 25 18:46: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 1E451106567D; Mon, 25 Jun 2012 18:46:58 +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 D45668FC0C; Mon, 25 Jun 2012 18:46:57 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 33A28B98A; Mon, 25 Jun 2012 14:46:57 -0400 (EDT) From: John Baldwin To: Marius Strobl Date: Mon, 25 Jun 2012 14:24:24 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201206131504.q5DF4opt031336@svn.freebsd.org> <201206251000.09052.jhb@freebsd.org> <20120625170811.GI69382@alchemy.franken.de> In-Reply-To: <20120625170811.GI69382@alchemy.franken.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201206251424.24621.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 25 Jun 2012 14:46:57 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237008 - head/sys/dev/pci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2012 18:46:58 -0000 On Monday, June 25, 2012 1:08:11 pm Marius Strobl wrote: > On Mon, Jun 25, 2012 at 10:00:08AM -0400, John Baldwin wrote: > > On Saturday, June 23, 2012 6:16:26 pm Marius Strobl wrote: > > > On Wed, Jun 13, 2012 at 03:04:50PM +0000, John Baldwin wrote: > > > > Author: jhb > > > > Date: Wed Jun 13 15:04:50 2012 > > > > New Revision: 237008 > > > > URL: http://svn.freebsd.org/changeset/base/237008 > > > > > > > > Log: > > > > Fix a couple of bugs that prevented windows in PCI-PCI bridges from > > > > growing "downward" (moving the start address down). First, an off by > > > > one error caused the end address to be moved down an extra alignment > > > > chunk unnecessarily. Second, when aligning the new candidate starting > > > > address, the wrong bits were masked off. > > > > > > > > > > Unfortunately, this now panics a sparc64 machine on the first attempt > > > to use a grown resource via bus_space(9) for me: > > > pcib3: at device 0.0 on pci2 > > > pcib2: allocated I/O port range (0x1000-0x1fff) for rid 1c of pcib3 > > > pcib2: allocated memory range (0x200000-0x3ffffff) for rid 20 of pcib3 > > > pcib3: domain 0 > > > pcib3: secondary bus 5 > > > pcib3: subordinate bus 5 > > > pcib3: I/O decode 0x1000-0x1fff > > > pcib3: memory decode 0x200000-0x3ffffff > > > pcib3: no prefetched decode > > > pcib3: Subtractively decoded bridge. > > > <...> > > > pci3: on pcib3 > > > <...> > > > isab0: at device 30.0 on pci3 > > > isa0: on isab0 > > > <...> > > > rtc0: at port 0x70-0x73 on isa0 > > > pcib3: attempting to grow I/O port window for (0x70-0x73,0x4) > > > front candidate range: 0x70-0x73 > > > pcib3: grew I/O port window to 0x70-0x1fff > > > panic: start address is not aligned > > > Alternatively, this may also be a data access trap, which also indicates > > > that some invalid address being used for the access. > > > > I think this was fixed in the next commit to this file (I had gotten the > > mask bits on 'front' wrong). Yes, it should be fixed by r237271: > > > > Old version: > > > > (gdb) p/x (0x70 & (~(1ul << 12) - 1)) > > $1 = 0x70 > > > > Fixed version: > > > > (gdb) p/x (0x70 & (~((1ul << 12) - 1))) > > $2 = 0x0 > > Well, a stock r237433 still panics with a data access trap when > trying to use the resource via bus_space(9). So while the math for > growing the window is probably right now, there still is a problem. Hmm. It would be interesting to know if it used to grow before (it might not have due to the bugs I fixed in the growing code). > > > > > before: > > > rtc0: at port 0x70-0x73 on isa0 > > > pcib3: attempting to grow I/O port window for (0x70-0x73,0x4) > > > pcib2: allocated I/O port range (0x70-0x73) for rid 0 of rtc0 > > > > > > Shouldn't a subtractively decoded resource actually be outside of > > > the window of the parent PCI-PCI bridge, i.e. it seems we shouldn't > > > try to grow the window in that case? The below patch fixes this for > > > me, I'm not sure whether that actually is the right approach though. > > > > Well, I've seen subtractive bridges with programmed windows, and the resource > > will decode properly either way. What the current code does is allow the > > request to pass up the tree if growing fails. > > By growing the window to 0x0-0x1fff in this case we are effectively > turning the formerly subtractively decoded resource in a positively > decodeded one. Maybe there's some additional bit, probably in the > PCI-ISA bridge, that needs to be switch for that, too? In any case, > growing the window in this case and by that changing the type of > decoding seems like a strange approach to me. Why do subtractive > decoders exist in the first place when the windows alternatively > could be grown/set up to only just do positive decoding instead? The PCI-ISA bridge should already be decoding that range. Note that subtractive decoding is slower (it has to wait for an extra cycle to give other devices a chance to snag a request). I would not mind a tunable to control growing or not growing a window on a subtractively decoded bridge. Does the firmware assign a window to this bridge btw? We probably should not allocate a new window for a subtractively decoded bridge, but if the firmware has already assigned a window, growing an existing window seems less problematic. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Jun 25 19:01: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 B36151065689; Mon, 25 Jun 2012 19:01:05 +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 BD6BF8FC1A; Mon, 25 Jun 2012 19:01: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 q5PJ146i089890; Mon, 25 Jun 2012 19:01:04 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5PJ14DB089886; Mon, 25 Jun 2012 19:01:04 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201206251901.q5PJ14DB089886@svn.freebsd.org> From: Xin LI Date: Mon, 25 Jun 2012 19:01: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: r237568 - head/crypto/openssh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 25 Jun 2012 19:01:05 -0000 Author: delphij Date: Mon Jun 25 19:01:04 2012 New Revision: 237568 URL: http://svn.freebsd.org/changeset/base/237568 Log: MFV (r237567): Fetch both ECDSA and RSA keys by default in ssh-keyscan(1). Approved by: des Obtained from: OpenSSH portable MFC after: 1 week Modified: head/crypto/openssh/ssh-keyscan.1 head/crypto/openssh/ssh-keyscan.c Directory Properties: head/crypto/openssh/ (props changed) Modified: head/crypto/openssh/ssh-keyscan.1 ============================================================================== --- head/crypto/openssh/ssh-keyscan.1 Mon Jun 25 18:54:02 2012 (r237567) +++ head/crypto/openssh/ssh-keyscan.1 Mon Jun 25 19:01:04 2012 (r237568) @@ -1,4 +1,4 @@ -.\" $OpenBSD: ssh-keyscan.1,v 1.29 2010/08/31 11:54:45 djm Exp $ +.\" $OpenBSD: ssh-keyscan.1,v 1.30 2012/04/11 13:34:17 djm Exp $ .\" $FreeBSD$ .\" .\" Copyright 1995, 1996 by David Mazieres . @@ -7,7 +7,7 @@ .\" permitted provided that due credit is given to the author and the .\" OpenBSD project by leaving this copyright notice intact. .\" -.Dd August 31, 2010 +.Dd April 11 2012 .Dt SSH-KEYSCAN 1 .Os .Sh NAME @@ -95,8 +95,11 @@ or .Dq rsa for protocol version 2. Multiple values may be specified by separating them with commas. -The default is -.Dq rsa . +The default is to fetch +.Dq rsa +and +.Dq ecdsa +keys. .It Fl v Verbose mode. Causes Modified: head/crypto/openssh/ssh-keyscan.c ============================================================================== --- head/crypto/openssh/ssh-keyscan.c Mon Jun 25 18:54:02 2012 (r237567) +++ head/crypto/openssh/ssh-keyscan.c Mon Jun 25 19:01:04 2012 (r237568) @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keyscan.c,v 1.85 2011/03/15 10:36:02 okan Exp $ */ +/* $OpenBSD: ssh-keyscan.c,v 1.86 2012/04/11 13:34:17 djm Exp $ */ /* * Copyright 1995, 1996 by David Mazieres . * @@ -57,7 +57,7 @@ int ssh_port = SSH_DEFAULT_PORT; #define KT_RSA 4 #define KT_ECDSA 8 -int get_keytypes = KT_RSA; /* Get only RSA keys by default */ +int get_keytypes = KT_RSA|KT_ECDSA;/* Get RSA and ECDSA keys by default */ int hash_hosts = 0; /* Hash hostname on output */ From owner-svn-src-head@FreeBSD.ORG Mon Jun 25 19: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 73E7E1065672; Mon, 25 Jun 2012 19:13:44 +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 5D5558FC08; Mon, 25 Jun 2012 19: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 q5PJDiLA090431; Mon, 25 Jun 2012 19:13:44 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5PJDihX090427; Mon, 25 Jun 2012 19:13:44 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201206251913.q5PJDihX090427@svn.freebsd.org> From: Michael Tuexen Date: Mon, 25 Jun 2012 19:13:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237569 - 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: Mon, 25 Jun 2012 19:13:44 -0000 Author: tuexen Date: Mon Jun 25 19:13:43 2012 New Revision: 237569 URL: http://svn.freebsd.org/changeset/base/237569 Log: Unify sctp_input() and sctp6_input(). MFC after: 3 days Modified: head/sys/netinet/sctp_input.c head/sys/netinet6/sctp6_usrreq.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Mon Jun 25 19:01:04 2012 (r237568) +++ head/sys/netinet/sctp_input.c Mon Jun 25 19:13:43 2012 (r237569) @@ -5885,12 +5885,12 @@ sctp_input_with_port(struct mbuf *i_pak, uint8_t ecn_bits; struct ip *ip; struct sctphdr *sh; + struct sctp_chunkhdr *ch; struct sctp_inpcb *inp = NULL; - struct sctp_nets *net; struct sctp_tcb *stcb = NULL; - struct sctp_chunkhdr *ch; + struct sctp_nets *net = NULL; int refcount_up = 0; - int length, mlen, offset; + int length, offset; uint32_t mflowid; uint8_t use_mflowid; @@ -5899,19 +5899,12 @@ sctp_input_with_port(struct mbuf *i_pak, #endif + iphlen = off; if (SCTP_GET_PKT_VRFID(i_pak, vrf_id)) { SCTP_RELEASE_PKT(i_pak); return; } - mlen = SCTP_HEADER_LEN(i_pak); - iphlen = off; m = SCTP_HEADER_TO_CHAIN(i_pak); - - net = NULL; - SCTP_STAT_INCR(sctps_recvpackets); - SCTP_STAT_INCR_COUNTER64(sctps_inpackets); - - #ifdef SCTP_MBUF_LOGGING /* Log in any input mbufs */ if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MBUF_LOGGING_ENABLE) { @@ -5925,8 +5918,9 @@ sctp_input_with_port(struct mbuf *i_pak, } #endif #ifdef SCTP_PACKET_LOGGING - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) { sctp_packet_log(m); + } #endif if (m->m_flags & M_FLOWID) { mflowid = m->m_pkthdr.flowid; @@ -5935,17 +5929,11 @@ sctp_input_with_port(struct mbuf *i_pak, mflowid = 0; use_mflowid = 0; } - /* - * Must take out the iphlen, since mlen expects this (only effect lb - * case) - */ - mlen -= iphlen; - - /* - * Get IP, SCTP, and first chunk header together in first mbuf. - */ + SCTP_STAT_INCR(sctps_recvpackets); + SCTP_STAT_INCR_COUNTER64(sctps_inpackets); + /* Get IP, SCTP, and first chunk header together in the first mbuf. */ ip = mtod(m, struct ip *); - offset = iphlen + sizeof(*sh) + sizeof(*ch); + offset = iphlen + sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr); if (SCTP_BUF_LEN(m) < offset) { if ((m = m_pullup(m, offset)) == 0) { SCTP_STAT_INCR(sctps_hdrops); @@ -5953,28 +5941,26 @@ sctp_input_with_port(struct mbuf *i_pak, } ip = mtod(m, struct ip *); } - /* validate mbuf chain length with IP payload length */ - if (mlen < (SCTP_GET_IPV4_LENGTH(ip) - iphlen)) { + sh = (struct sctphdr *)((caddr_t)ip + iphlen); + ch = (struct sctp_chunkhdr *)((caddr_t)sh + sizeof(struct sctphdr)); + offset -= sizeof(struct sctp_chunkhdr); + length = ip->ip_len + iphlen; + /* Validate mbuf chain length with IP payload length. */ + if (SCTP_HEADER_LEN(i_pak) != length) { + SCTPDBG(SCTP_DEBUG_INPUT1, + "sctp_input() length:%d reported length:%d\n", length, SCTP_HEADER_LEN(i_pak)); SCTP_STAT_INCR(sctps_hdrops); goto bad; } - sh = (struct sctphdr *)((caddr_t)ip + iphlen); - ch = (struct sctp_chunkhdr *)((caddr_t)sh + sizeof(*sh)); - SCTPDBG(SCTP_DEBUG_INPUT1, - "sctp_input() length:%d iphlen:%d\n", mlen, iphlen); - /* SCTP does not allow broadcasts or multicasts */ if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) { goto bad; } if (SCTP_IS_IT_BROADCAST(ip->ip_dst, m)) { - /* - * We only look at broadcast if its a front state, All - * others we will not have a tcb for anyway. - */ goto bad; } - /* validate SCTP checksum */ + SCTPDBG(SCTP_DEBUG_INPUT1, + "sctp_input() length:%d iphlen:%d\n", length, iphlen); SCTPDBG(SCTP_DEBUG_CRCOFFLOAD, "sctp_input(): Packet of length %d received on %s with csum_flags 0x%x.\n", m->m_pkthdr.len, @@ -5985,21 +5971,18 @@ sctp_input_with_port(struct mbuf *i_pak, #else if (m->m_pkthdr.csum_flags & CSUM_SCTP_VALID) { SCTP_STAT_INCR(sctps_recvhwcrc); - goto sctp_skip_csum_4; + goto sctp_skip_csum; } - check = sh->checksum; /* save incoming checksum */ - sh->checksum = 0; /* prepare for calc */ + check = sh->checksum; + sh->checksum = 0; calc_check = sctp_calculate_cksum(m, iphlen); sh->checksum = check; SCTP_STAT_INCR(sctps_recvswcrc); if (calc_check != check) { SCTPDBG(SCTP_DEBUG_INPUT1, "Bad CSUM on SCTP packet calc_check:%x check:%x m:%p mlen:%d iphlen:%d\n", - calc_check, check, m, mlen, iphlen); - - stcb = sctp_findassociation_addr(m, - offset - sizeof(*ch), - sh, ch, &inp, &net, - vrf_id); + calc_check, check, m, length, iphlen); + stcb = sctp_findassociation_addr(m, offset, + sh, ch, &inp, &net, vrf_id); if ((net) && (port)) { if (net->port == 0) { sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr)); @@ -6013,7 +5996,7 @@ sctp_input_with_port(struct mbuf *i_pak, #endif } if ((inp) && (stcb)) { - sctp_send_packet_dropped(stcb, net, m, mlen + iphlen, iphlen, 1); + sctp_send_packet_dropped(stcb, net, m, length, iphlen, 1); sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_INPUT_ERROR, SCTP_SO_NOT_LOCKED); } else if ((inp != NULL) && (stcb == NULL)) { refcount_up = 1; @@ -6022,18 +6005,14 @@ sctp_input_with_port(struct mbuf *i_pak, SCTP_STAT_INCR_COUNTER32(sctps_checksumerrors); goto bad; } -sctp_skip_csum_4: +sctp_skip_csum: #endif /* destination port of 0 is illegal, based on RFC2960. */ if (sh->dest_port == 0) { SCTP_STAT_INCR(sctps_hdrops); goto bad; } - /* - * Locate pcb and tcb for datagram sctp_findassociation_addr() wants - * IP/SCTP/first chunk header... - */ - stcb = sctp_findassociation_addr(m, offset - sizeof(*ch), + stcb = sctp_findassociation_addr(m, offset, sh, ch, &inp, &net, vrf_id); if ((net) && (port)) { if (net->port == 0) { @@ -6047,27 +6026,10 @@ sctp_skip_csum_4: net->flowidset = 1; #endif } - /* inp's ref-count increased && stcb locked */ if (inp == NULL) { - struct sctp_init_chunk *init_chk, chunk_buf; - SCTP_STAT_INCR(sctps_noport); if (badport_bandlim(BANDLIM_SCTP_OOTB) < 0) goto bad; - SCTPDBG(SCTP_DEBUG_INPUT1, - "Sending a ABORT from packet entry!\n"); - if (ch->chunk_type == SCTP_INITIATION) { - /* - * we do a trick here to get the INIT tag, dig in - * and get the tag from the INIT and put it in the - * common header. - */ - init_chk = (struct sctp_init_chunk *)sctp_m_getptr(m, - iphlen + sizeof(*sh), sizeof(*init_chk), - (uint8_t *) & chunk_buf); - if (init_chk != NULL) - sh->v_tag = init_chk->init.initiate_tag; - } if (ch->chunk_type == SCTP_SHUTDOWN_ACK) { sctp_send_shutdown_complete2(m, sh, use_mflowid, mflowid, @@ -6091,7 +6053,7 @@ sctp_skip_csum_4: refcount_up = 1; } #ifdef IPSEC - /* + /*- * I very much doubt any of the IPSEC stuff will work but I have no * idea, so I will leave it in place. */ @@ -6100,28 +6062,22 @@ sctp_skip_csum_4: SCTP_STAT_INCR(sctps_hdrops); goto bad; } -#endif /* IPSEC */ - - /* - * common chunk processing - */ - length = ip->ip_len + iphlen; - offset -= sizeof(struct sctp_chunkhdr); +#endif ecn_bits = ip->ip_tos; - /* sa_ignore NO_NULL_CHK */ sctp_common_input_processing(&m, iphlen, offset, length, sh, ch, inp, stcb, net, ecn_bits, use_mflowid, mflowid, vrf_id, port); - /* inp's ref-count reduced && stcb unlocked */ if (m) { sctp_m_freem(m); } if ((inp) && (refcount_up)) { /* reduce ref-count */ + SCTP_INP_WLOCK(inp); SCTP_INP_DECR_REF(inp); + SCTP_INP_WUNLOCK(inp); } return; bad: @@ -6130,7 +6086,9 @@ bad: } if ((inp) && (refcount_up)) { /* reduce ref-count */ + SCTP_INP_WLOCK(inp); SCTP_INP_DECR_REF(inp); + SCTP_INP_WUNLOCK(inp); } if (m) { sctp_m_freem(m); Modified: head/sys/netinet6/sctp6_usrreq.c ============================================================================== --- head/sys/netinet6/sctp6_usrreq.c Mon Jun 25 19:01:04 2012 (r237568) +++ head/sys/netinet6/sctp6_usrreq.c Mon Jun 25 19:13:43 2012 (r237569) @@ -68,22 +68,17 @@ int sctp6_input(struct mbuf **i_pak, int *offp, int proto) { struct mbuf *m; + int iphlen; + uint32_t vrf_id = 0; + uint8_t ecn_bits; struct ip6_hdr *ip6; struct sctphdr *sh; - struct sctp_inpcb *in6p = NULL; - struct sctp_nets *net; - int refcount_up = 0; - uint32_t vrf_id = 0; - -#ifdef IPSEC - struct inpcb *in6p_ip; - -#endif struct sctp_chunkhdr *ch; - int length, offset, iphlen; - uint8_t ecn_bits; + struct sctp_inpcb *inp = NULL; struct sctp_tcb *stcb = NULL; - int pkt_len = 0; + struct sctp_nets *net = NULL; + int refcount_up = 0; + int length, offset; uint32_t mflowid; uint8_t use_mflowid; @@ -91,17 +86,26 @@ sctp6_input(struct mbuf **i_pak, int *of uint32_t check, calc_check; #endif - int off = *offp; uint16_t port = 0; - /* get the VRF and table id's */ + iphlen = *offp; if (SCTP_GET_PKT_VRFID(*i_pak, vrf_id)) { SCTP_RELEASE_PKT(*i_pak); - return (-1); + return (IPPROTO_DONE); } m = SCTP_HEADER_TO_CHAIN(*i_pak); - pkt_len = SCTP_HEADER_LEN(*i_pak); - +#ifdef SCTP_MBUF_LOGGING + /* Log in any input mbufs */ + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MBUF_LOGGING_ENABLE) { + struct mbuf *mat; + + for (mat = m; mat; mat = SCTP_BUF_NEXT(mat)) { + if (SCTP_BUF_IS_EXTENDED(mat)) { + sctp_log_mb(mat, SCTP_MBUF_INPUT); + } + } + } +#endif #ifdef SCTP_PACKET_LOGGING if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) { sctp_packet_log(m); @@ -114,42 +118,38 @@ sctp6_input(struct mbuf **i_pak, int *of mflowid = 0; use_mflowid = 0; } + SCTP_STAT_INCR(sctps_recvpackets); + SCTP_STAT_INCR_COUNTER64(sctps_inpackets); + /* Get IP, SCTP, and first chunk header together in the first mbuf. */ ip6 = mtod(m, struct ip6_hdr *); - /* Ensure that (sctphdr + sctp_chunkhdr) in a row. */ - IP6_EXTHDR_GET(sh, struct sctphdr *, m, off, - (int)(sizeof(*sh) + sizeof(*ch))); + offset = iphlen + sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr); + IP6_EXTHDR_GET(sh, struct sctphdr *, m, iphlen, + (int)(sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr))); if (sh == NULL) { SCTP_STAT_INCR(sctps_hdrops); return (IPPROTO_DONE); } ch = (struct sctp_chunkhdr *)((caddr_t)sh + sizeof(struct sctphdr)); - iphlen = off; - offset = iphlen + sizeof(*sh) + sizeof(*ch); - SCTPDBG(SCTP_DEBUG_INPUT1, - "sctp6_input() length:%d iphlen:%d\n", pkt_len, iphlen); - - -#if defined(NFAITH) && NFAITH > 0 - + offset -= sizeof(struct sctp_chunkhdr); if (faithprefix_p != NULL && (*faithprefix_p) (&ip6->ip6_dst)) { /* XXX send icmp6 host/port unreach? */ goto bad; } -#endif /* NFAITH defined and > 0 */ - SCTP_STAT_INCR(sctps_recvpackets); - SCTP_STAT_INCR_COUNTER64(sctps_inpackets); - SCTPDBG(SCTP_DEBUG_INPUT1, "V6 input gets a packet iphlen:%d pktlen:%d\n", - iphlen, pkt_len); - if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { - /* No multi-cast support in SCTP */ + length = ntohs(ip6->ip6_plen) + iphlen; + /* Validate mbuf chain length with IP payload length. */ + if (SCTP_HEADER_LEN(*i_pak) != length) { + SCTPDBG(SCTP_DEBUG_INPUT1, + "sctp6_input() length:%d reported length:%d\n", length, SCTP_HEADER_LEN(*i_pak)); + SCTP_STAT_INCR(sctps_hdrops); goto bad; } - /* destination port of 0 is illegal, based on RFC2960. */ - if (sh->dest_port == 0) + if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { goto bad; - + } + SCTPDBG(SCTP_DEBUG_INPUT1, + "sctp6_input() length:%d iphlen:%d\n", length, iphlen); SCTPDBG(SCTP_DEBUG_CRCOFFLOAD, - "sctp_input(): Packet of length %d received on %s with csum_flags 0x%x.\n", + "sctp6_input(): Packet of length %d received on %s with csum_flags 0x%x.\n", m->m_pkthdr.len, if_name(m->m_pkthdr.rcvif), m->m_pkthdr.csum_flags); @@ -160,15 +160,16 @@ sctp6_input(struct mbuf **i_pak, int *of SCTP_STAT_INCR(sctps_recvhwcrc); goto sctp_skip_csum; } - check = sh->checksum; /* save incoming checksum */ - sh->checksum = 0; /* prepare for calc */ + check = sh->checksum; + sh->checksum = 0; calc_check = sctp_calculate_cksum(m, iphlen); + sh->checksum = check; SCTP_STAT_INCR(sctps_recvswcrc); if (calc_check != check) { - SCTPDBG(SCTP_DEBUG_INPUT1, "Bad CSUM on SCTP packet calc_check:%x check:%x m:%p phlen:%d\n", - calc_check, check, m, iphlen); - stcb = sctp_findassociation_addr(m, offset - sizeof(*ch), - sh, ch, &in6p, &net, vrf_id); + SCTPDBG(SCTP_DEBUG_INPUT1, "Bad CSUM on SCTP packet calc_check:%x check:%x m:%p mlen:%d iphlen:%d\n", + calc_check, check, m, length, iphlen); + stcb = sctp_findassociation_addr(m, offset, + sh, ch, &inp, &net, vrf_id); if ((net) && (port)) { if (net->port == 0) { sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr)); @@ -181,28 +182,25 @@ sctp6_input(struct mbuf **i_pak, int *of net->flowidset = 1; #endif } - /* in6p's ref-count increased && stcb locked */ - if ((in6p) && (stcb)) { - sctp_send_packet_dropped(stcb, net, m, pkt_len, iphlen, 1); - sctp_chunk_output((struct sctp_inpcb *)in6p, stcb, SCTP_OUTPUT_FROM_INPUT_ERROR, SCTP_SO_NOT_LOCKED); - } else if ((in6p != NULL) && (stcb == NULL)) { + if ((inp) && (stcb)) { + sctp_send_packet_dropped(stcb, net, m, length, iphlen, 1); + sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_INPUT_ERROR, SCTP_SO_NOT_LOCKED); + } else if ((inp != NULL) && (stcb == NULL)) { refcount_up = 1; } SCTP_STAT_INCR(sctps_badsum); SCTP_STAT_INCR_COUNTER32(sctps_checksumerrors); goto bad; } - sh->checksum = calc_check; - sctp_skip_csum: #endif - net = NULL; - /* - * Locate pcb and tcb for datagram sctp_findassociation_addr() wants - * IP/SCTP/first chunk header... - */ - stcb = sctp_findassociation_addr(m, offset - sizeof(*ch), - sh, ch, &in6p, &net, vrf_id); + /* destination port of 0 is illegal, based on RFC2960. */ + if (sh->dest_port == 0) { + SCTP_STAT_INCR(sctps_hdrops); + goto bad; + } + stcb = sctp_findassociation_addr(m, offset, + sh, ch, &inp, &net, vrf_id); if ((net) && (port)) { if (net->port == 0) { sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr)); @@ -215,25 +213,10 @@ sctp_skip_csum: net->flowidset = 1; #endif } - /* in6p's ref-count increased */ - if (in6p == NULL) { - struct sctp_init_chunk *init_chk, chunk_buf; - + if (inp == NULL) { SCTP_STAT_INCR(sctps_noport); - if (ch->chunk_type == SCTP_INITIATION) { - /* - * we do a trick here to get the INIT tag, dig in - * and get the tag from the INIT and put it in the - * common header. - */ - init_chk = (struct sctp_init_chunk *)sctp_m_getptr(m, - iphlen + sizeof(*sh), sizeof(*init_chk), - (uint8_t *) & chunk_buf); - if (init_chk) - sh->v_tag = init_chk->init.initiate_tag; - else - sh->v_tag = 0; - } + if (badport_bandlim(BANDLIM_SCTP_OOTB) < 0) + goto bad; if (ch->chunk_type == SCTP_SHUTDOWN_ACK) { sctp_send_shutdown_complete2(m, sh, use_mflowid, mflowid, @@ -257,55 +240,46 @@ sctp_skip_csum: refcount_up = 1; } #ifdef IPSEC - /* - * Check AH/ESP integrity. + /*- + * I very much doubt any of the IPSEC stuff will work but I have no + * idea, so I will leave it in place. */ - in6p_ip = (struct inpcb *)in6p; - if (in6p_ip && (ipsec6_in_reject(m, in6p_ip))) { -/* XXX */ + if (inp && ipsec6_in_reject(m, &inp->ip_inp.inp)) { MODULE_GLOBAL(ipsec6stat).in_polvio++; + SCTP_STAT_INCR(sctps_hdrops); goto bad; } -#endif /* IPSEC */ +#endif - /* - * CONTROL chunk processing - */ - offset -= sizeof(*ch); ecn_bits = ((ntohl(ip6->ip6_flow) >> 20) & 0x000000ff); - - /* Length now holds the total packet length payload + iphlen */ - length = ntohs(ip6->ip6_plen) + iphlen; - /* sa_ignore NO_NULL_CHK */ sctp_common_input_processing(&m, iphlen, offset, length, sh, ch, - in6p, stcb, net, ecn_bits, + inp, stcb, net, ecn_bits, use_mflowid, mflowid, vrf_id, port); - /* inp's ref-count reduced && stcb unlocked */ - /* XXX this stuff below gets moved to appropriate parts later... */ - if (m) + if (m) { sctp_m_freem(m); - if ((in6p) && refcount_up) { + } + if ((inp) && (refcount_up)) { /* reduce ref-count */ - SCTP_INP_WLOCK(in6p); - SCTP_INP_DECR_REF(in6p); - SCTP_INP_WUNLOCK(in6p); + SCTP_INP_WLOCK(inp); + SCTP_INP_DECR_REF(inp); + SCTP_INP_WUNLOCK(inp); } return (IPPROTO_DONE); - bad: if (stcb) { SCTP_TCB_UNLOCK(stcb); } - if ((in6p) && refcount_up) { + if ((inp) && (refcount_up)) { /* reduce ref-count */ - SCTP_INP_WLOCK(in6p); - SCTP_INP_DECR_REF(in6p); - SCTP_INP_WUNLOCK(in6p); + SCTP_INP_WLOCK(inp); + SCTP_INP_DECR_REF(inp); + SCTP_INP_WUNLOCK(inp); } - if (m) + if (m) { sctp_m_freem(m); + } return (IPPROTO_DONE); } From owner-svn-src-head@FreeBSD.ORG Mon Jun 25 20:56: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 2BB91106566C; Mon, 25 Jun 2012 20:56:33 +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 F09988FC0C; Mon, 25 Jun 2012 20:56: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 q5PKuWT1094974; Mon, 25 Jun 2012 20:56:32 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5PKuW6M094972; Mon, 25 Jun 2012 20:56:32 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201206252056.q5PKuW6M094972@svn.freebsd.org> From: Xin LI Date: Mon, 25 Jun 2012 20:56: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: r237571 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2012 20:56:33 -0000 Author: delphij Date: Mon Jun 25 20:56:32 2012 New Revision: 237571 URL: http://svn.freebsd.org/changeset/base/237571 Log: Fix a LOR acquiring the if_afdata lock while holding an rtentry lock. Possibly do some entra work in case we would not get into the ifa0 != NULL paths later as we already do for the mltaddr before. XXX We should possibly error in case in6_setscope fails. Reference: http://lists.freebsd.org/pipermail/freebsd-net/2011-September/029829.html Submitted by: bz MFC after: 1 week Modified: head/sys/netinet6/in6.c Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Mon Jun 25 19:59:08 2012 (r237570) +++ head/sys/netinet6/in6.c Mon Jun 25 20:56:32 2012 (r237571) @@ -1330,6 +1330,7 @@ in6_purgeaddr_mc(struct ifnet *ifp, stru struct sockaddr_in6 mltaddr, mltmask; struct in6_multi_mship *imm; struct rtentry *rt; + struct sockaddr_in6 sin6; int error; /* @@ -1356,6 +1357,19 @@ in6_purgeaddr_mc(struct ifnet *ifp, stru if ((error = in6_setscope(&mltaddr.sin6_addr, ifp, NULL)) != 0) return (error); + /* + * As for the mltaddr above, proactively prepare the sin6 to avoid + * rtentry un- and re-locking. + */ + if (ifa0 != NULL) { + bzero(&sin6, sizeof(sin6)); + sin6.sin6_len = sizeof(sin6); + sin6.sin6_family = AF_INET6; + memcpy(&sin6.sin6_addr, &satosin6(ifa0->ifa_addr)->sin6_addr, + sizeof(sin6.sin6_addr)); + in6_setscope(&sin6.sin6_addr, ifa0->ifa_ifp, NULL); + } + rt = in6_rtalloc1((struct sockaddr *)&mltaddr, 0, 0UL, RT_DEFAULT_FIB); if (rt != NULL && rt->rt_gateway != NULL && (memcmp(&satosin6(rt->rt_gateway)->sin6_addr, @@ -1382,15 +1396,7 @@ in6_purgeaddr_mc(struct ifnet *ifp, stru /* * Replace the gateway of the route. */ - struct sockaddr_in6 sa; - - bzero(&sa, sizeof(sa)); - sa.sin6_len = sizeof(struct sockaddr_in6); - sa.sin6_family = AF_INET6; - memcpy(&sa.sin6_addr, &satosin6(ifa0->ifa_addr)->sin6_addr, - sizeof(sa.sin6_addr)); - in6_setscope(&sa.sin6_addr, ifa0->ifa_ifp, NULL); - memcpy(rt->rt_gateway, &sa, sizeof(sa)); + memcpy(rt->rt_gateway, &sin6, sizeof(sin6)); RTFREE_LOCKED(rt); } } else { @@ -1432,15 +1438,7 @@ in6_purgeaddr_mc(struct ifnet *ifp, stru /* * Replace the gateway of the route. */ - struct sockaddr_in6 sa; - - bzero(&sa, sizeof(sa)); - sa.sin6_len = sizeof(struct sockaddr_in6); - sa.sin6_family = AF_INET6; - memcpy(&sa.sin6_addr, &satosin6(ifa0->ifa_addr)->sin6_addr, - sizeof(sa.sin6_addr)); - in6_setscope(&sa.sin6_addr, ifa0->ifa_ifp, NULL); - memcpy(rt->rt_gateway, &sa, sizeof(sa)); + memcpy(rt->rt_gateway, &sin6, sizeof(sin6)); RTFREE_LOCKED(rt); } } else { From owner-svn-src-head@FreeBSD.ORG Mon Jun 25 21:33: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 C1BF5106564A; Mon, 25 Jun 2012 21:33:45 +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 930468FC08; Mon, 25 Jun 2012 21:33: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 q5PLXj1s096535; Mon, 25 Jun 2012 21:33:45 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5PLXjsY096533; Mon, 25 Jun 2012 21:33:45 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201206252133.q5PLXjsY096533@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 25 Jun 2012 21:33: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: r237572 - 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: Mon, 25 Jun 2012 21:33:45 -0000 Author: trasz Date: Mon Jun 25 21:33:45 2012 New Revision: 237572 URL: http://svn.freebsd.org/changeset/base/237572 Log: Add missing MLINKS for whatever -> if_whatever. Reviewed by: brueffer MFC after: 1 week Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Mon Jun 25 20:56:32 2012 (r237571) +++ head/share/man/man4/Makefile Mon Jun 25 21:33:45 2012 (r237572) @@ -547,8 +547,11 @@ MAN= aac.4 \ MLINKS= ae.4 if_ae.4 MLINKS+=age.4 if_age.4 MLINKS+=agp.4 agpgart.4 +MLINKS+=alc.4 if_alc.4 MLINKS+=ale.4 if_ale.4 MLINKS+=altq.4 ALTQ.4 +MLINKS+=ath.4 if_ath.4 +MLINKS+=ath_pci.4 if_ath_pci.4 MLINKS+=an.4 if_an.4 MLINKS+=aue.4 if_aue.4 MLINKS+=axe.4 if_axe.4 @@ -558,9 +561,13 @@ MLINKS+=bge.4 if_bge.4 MLINKS+=bktr.4 brooktree.4 MLINKS+=bridge.4 if_bridge.4 MLINKS+=bwi.4 if_bwi.4 +MLINKS+=bwn.4 if_bwn.4 MLINKS+=cas.4 if_cas.4 +MLINKS+=cdce.4 if_cdce.4 MLINKS+=crypto.4 cryptodev.4 MLINKS+=cue.4 if_cue.4 +MLINKS+=cxgb.4 if_cxgb.4 +MLINKS+=cxgbe.4 if_cxgbe.4 MLINKS+=dc.4 if_dc.4 MLINKS+=de.4 if_de.4 MLINKS+=disc.4 if_disc.4 @@ -606,14 +613,19 @@ MLINKS+=ixgbe.4 if_ixgbe.4 MLINKS+=jme.4 if_jme.4 MLINKS+=kue.4 if_kue.4 MLINKS+=lagg.4 trunk.4 +MLINKS+=lagg.4 if_lagg.4 MLINKS+=le.4 if_le.4 MLINKS+=lge.4 if_lge.4 +MLINKS+=lmc.4 if_lmc.4 MLINKS+=lo.4 loop.4 MLINKS+=lp.4 plip.4 MLINKS+=malo.4 if_malo.4 MLINKS+=md.4 vn.4 MLINKS+=mem.4 kmem.4 MLINKS+=mn.4 if_mn.4 +MLINKS+=mos.4 if_mos.4 +MLINKS+=msk.4 if_msk.4 +MLINKS+=mwl.4 if_mwl.4 MLINKS+=mxge.4 if_mxge.4 MLINKS+=my.4 if_my.4 MLINKS+=${_ndis.4} ${_if_ndis.4} @@ -633,11 +645,13 @@ MLINKS+=re.4 if_re.4 MLINKS+=rl.4 if_rl.4 MLINKS+=rue.4 if_rue.4 MLINKS+=rum.4 if_rum.4 +MLINKS+=run.4 if_run.4 MLINKS+=scsi.4 CAM.4 \ scsi.4 cam.4 \ scsi.4 scbus.4 \ scsi.4 SCSI.4 MLINKS+=sf.4 if_sf.4 +MLINKS+=sge.4 if_sge.4 MLINKS+=sis.4 if_sis.4 MLINKS+=sk.4 if_sk.4 MLINKS+=smp.4 SMP.4 @@ -669,6 +683,7 @@ MLINKS+=vge.4 if_vge.4 MLINKS+=vlan.4 if_vlan.4 MLINKS+=vpo.4 imm.4 MLINKS+=vr.4 if_vr.4 +MLINKS+=vte.4 if_vte.4 MLINKS+=${_vtnet.4} ${_if_vtnet.4} MLINKS+=${_vxge.4} ${_if_vxge.4} MLINKS+=watchdog.4 SW_WATCHDOG.4 @@ -749,6 +764,9 @@ MLINKS+=lindev.4 full.4 .if ${MACHINE_CPUARCH} == "amd64" _qlxgb.4= qlxgb.4 _sfxge.4= sfxge.4 + +MLINKS+=qlxgb.4 if_qlxgb.4 +MLINKS+=sfxge.4 if_sfxge.4 .endif .if ${MACHINE_CPUARCH} == "powerpc" From owner-svn-src-head@FreeBSD.ORG Mon Jun 25 21:37: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 BEF79106566B; Mon, 25 Jun 2012 21:37:51 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 2360A8FC15; Mon, 25 Jun 2012 21:37:51 +0000 (UTC) Message-ID: <4FE8DA2E.2060209@FreeBSD.org> Date: Mon, 25 Jun 2012 17:37:50 -0400 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120612 Thunderbird/13.0 MIME-Version: 1.0 To: Ruslan Bukin References: <201206220040.q5M0ejNk045397@svn.freebsd.org> <20120622095847.GC2337@deviant.kiev.zoral.com.ua> <4FE494FA.1030907@FreeBSD.org> <20120624181348.GA54897@jail.io> In-Reply-To: <20120624181348.GA54897@jail.io> X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=UTF-8 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: r237412 - in head: sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/components/disa... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 25 Jun 2012 21:37:51 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2012-06-24 14:13:48 -0400, Ruslan Bukin wrote: > On Fri, Jun 22, 2012 at 11:53:30AM -0400, Jung-uk Kim wrote: >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 >> >> On 2012-06-22 05:58:47 -0400, Konstantin Belousov wrote: >>> On Fri, Jun 22, 2012 at 12:40:45AM +0000, Jung-uk Kim wrote: >>>> Author: jkim Date: Fri Jun 22 00:40:44 2012 New Revision: >>>> 237412 URL: http://svn.freebsd.org/changeset/base/237412 >>>> >>>> Log: Merge ACPICA 20120620. >>> >>> I think it is caused by import, malloc is called while spinlock >>> is held: >>> >>> ACPI: Executed 1 blocks of module-level executable AML code >>> acpi0: Power Button (fixed) panic: blockable sleep lock (sleep >>> mutex) 16 @ >>> /usr/home/kostik/work/build/bsd/DEV/src/sys/vm/uma_core.c:2040 >>> cpuid = 0 KDB: stack backtrace: db_trace_self_wrapper() at >>> 0xffffffff80279d0a = db_trace_self_wrapper+0x2a panic() at >>> 0xffffffff80325a28 = panic+0x1d8 witness_checkorder() at >>> 0xffffffff80377938 = witness_checkorder+0x1d8 _mtx_lock_flags() >>> at 0xffffffff80313777 = _mtx_lock_flags+0x87 uma_zalloc_arg() >>> at 0xffffffff804db97a = uma_zalloc_arg+0x2ea malloc() at >>> 0xffffffff8030f7cd = malloc+0xbd AcpiUtAllocate() at >>> 0xffffffff802704f1 = AcpiUtAllocate+0x31 AcpiUtAllocateZeroed() >>> at 0xffffffff80270559 = AcpiUtAllocateZeroed+0x19 >>> AcpiSetupGpeForWake() at 0xffffffff8025becc = >>> AcpiSetupGpeForWake+0xfc acpi_probe_child() at >>> 0xffffffff802848e9 = acpi_probe_child+0x2b9 >>> AcpiNsWalkNamespace() at 0xffffffff802686ef = >>> AcpiNsWalkNamespace+0x15f AcpiWalkNamespace() at >>> 0xffffffff80268c0f = AcpiWalkNamespace+0xbf acpi_attach() at >>> 0xffffffff80283e43 = acpi_attach+0x993 device_attach() at >>> 0xffffffff8035ab62 = device_attach+0x72 bus_generic_attach() >>> at 0xffffffff8035bd3a = bus_generic_attach+0x1a >>> nexus_acpi_attach() at 0xffffffff804fbd89 = >>> nexus_acpi_attach+0x69 device_attach() at 0xffffffff8035ab62 = >>> device_attach+0x72 bus_generic_new_pass() at 0xffffffff8035bf46 >>> = bus_generic_new_pass+0xd6 bus_set_pass() at >>> 0xffffffff803597ba = bus_set_pass+0x7a configure() at >>> 0xffffffff804fd51a = configure+0xa mi_startup() at >>> 0xffffffff802d5c17 = mi_startup+0x77 btext() at >>> 0xffffffff802531cc = btext+0x2c KDB: enter: panic [ thread pid >>> 0 tid 100000 ] Stopped at 0xffffffff8035fffb = >>> kdb_enter+0x3b: movq $0,0x1027d62(%rip) db> show alllocks >>> Process 0 (kernel) thread 0xffffffff80837cc0 (100000) exclusive >>> sleep mutex Giant (Giant) r = 0 (0xffffffff8133a900) locked @ >>> /usr/home/kostik/work/build/bsd/DEV/src/sys/kern/kern_module.c:116 >>> exclusive spin mutex ACPI lock (0xfffffe000321da80) (ACPI >>> lock (0xfffffe000321da80)) r = 0 (0xfffffe000321da80) locked @ >>> /usr/home/kostik/work/build/bsd/DEV/src/sys/dev/acpica/Osd/OsdSynch.c:535 >> >> >>> Hmm... >>> >> I was afraid it might happen. I'll look into it ASAP. >> >> Sorry for the trouble, >> > > I have the same problem on server & laptop > > -Ruslan . > I submitted this patch and I am waiting for confirmation: http://people.freebsd.org/~jkim/evxfgpe.diff Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/o2i4ACgkQmlay1b9qnVOQxwCcDkT6IRp7BhI0OqC2drumJ7wP R3kAoISjm6sEyxQ6TF6hbgNxv9JA07Xe =ityD -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Mon Jun 25 21:51: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 D83791065673; Mon, 25 Jun 2012 21:51:40 +0000 (UTC) (envelope-from issyl0@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B8F998FC08; Mon, 25 Jun 2012 21:51: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 q5PLpech097385; Mon, 25 Jun 2012 21:51:40 GMT (envelope-from issyl0@svn.freebsd.org) Received: (from issyl0@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5PLpeX3097379; Mon, 25 Jun 2012 21:51:40 GMT (envelope-from issyl0@svn.freebsd.org) Message-Id: <201206252151.q5PLpeX3097379@svn.freebsd.org> From: Isabell Long Date: Mon, 25 Jun 2012 21:51: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: r237573 - in head/lib/libc: stdlib stdtime X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 25 Jun 2012 21:51:41 -0000 Author: issyl0 (doc committer) Date: Mon Jun 25 21:51:40 2012 New Revision: 237573 URL: http://svn.freebsd.org/changeset/base/237573 Log: Add more locale-specific functions to the relevant man pages and Makefiles: - libc/stdtime/strftime.3 - libc/stdtime/strptime.3 - libc/stdlib/strfmon.3 Reviewed by: theraven Approved by: gabor (mentor) Modified: head/lib/libc/stdlib/Makefile.inc head/lib/libc/stdlib/strfmon.3 head/lib/libc/stdtime/Makefile.inc head/lib/libc/stdtime/strftime.3 head/lib/libc/stdtime/strptime.3 Modified: head/lib/libc/stdlib/Makefile.inc ============================================================================== --- head/lib/libc/stdlib/Makefile.inc Mon Jun 25 21:33:45 2012 (r237572) +++ head/lib/libc/stdlib/Makefile.inc Mon Jun 25 21:51:40 2012 (r237573) @@ -42,6 +42,7 @@ MLINKS+=rand.3 rand_r.3 rand.3 srand.3 r MLINKS+=random.3 initstate.3 random.3 setstate.3 random.3 srandom.3 \ random.3 srandomdev.3 MLINKS+=radixsort.3 sradixsort.3 +MLINKS+=strfmon.3 strfmon_l.3 MLINKS+=strtod.3 strtof.3 strtod.3 strtold.3 MLINKS+=strtol.3 strtoll.3 strtol.3 strtoq.3 strtol.3 strtoimax.3 MLINKS+=strtoul.3 strtoull.3 strtoul.3 strtouq.3 strtoul.3 strtoumax.3 Modified: head/lib/libc/stdlib/strfmon.3 ============================================================================== --- head/lib/libc/stdlib/strfmon.3 Mon Jun 25 21:33:45 2012 (r237572) +++ head/lib/libc/stdlib/strfmon.3 Mon Jun 25 21:51:40 2012 (r237573) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 12, 2002 +.Dd June 25, 2012 .Dt STRFMON 3 .Os .Sh NAME @@ -36,6 +36,8 @@ .In monetary.h .Ft ssize_t .Fn strfmon "char * restrict s" "size_t maxsize" "const char * restrict format" "..." +.Ft ssize_t +.Fn strfmon_l "char * restrict s" "size_t maxsize" "locale_t loc" "const char * restrict format" "..." .Sh DESCRIPTION The .Fn strfmon @@ -47,6 +49,12 @@ No more than .Fa maxsize bytes are placed into the array. .Pp +The +.Fn strfmon_l +function does the same as +.Fn strfmon +but takes an explicit locale rather than using the current locale. +.Pp The format string is composed of zero or more directives: ordinary characters (not .Cm % ) , @@ -129,6 +137,11 @@ the contents of the array are indetermin and .Va errno is set to indicate the error. +.Pp +The +.Fn strfmon_l +function returns the same values as +.Fn strfmon . .Sh ERRORS The .Fn strfmon @@ -149,6 +162,10 @@ The function conforms to .St -p1003.1-2001 . +The +.Fn strfmon_l +function conforms to +.St -p1003.1-2008 . .Sh AUTHORS .An -nosplit The Modified: head/lib/libc/stdtime/Makefile.inc ============================================================================== --- head/lib/libc/stdtime/Makefile.inc Mon Jun 25 21:33:45 2012 (r237572) +++ head/lib/libc/stdtime/Makefile.inc Mon Jun 25 21:51:40 2012 (r237573) @@ -18,4 +18,6 @@ MLINKS+=ctime.3 asctime.3 ctime.3 diffti ctime.3 localtime.3 ctime.3 mktime.3 ctime.3 timegm.3 \ ctime.3 ctime_r.3 ctime.3 localtime_r.3 ctime.3 gmtime_r.3 \ ctime.3 asctime_r.3 +MLINKS+=strftime.3 strftime_l.3 +MLINKS+=strptime.3 strptime_l.3 MLINKS+=time2posix.3 posix2time.3 Modified: head/lib/libc/stdtime/strftime.3 ============================================================================== --- head/lib/libc/stdtime/strftime.3 Mon Jun 25 21:33:45 2012 (r237572) +++ head/lib/libc/stdtime/strftime.3 Mon Jun 25 21:51:40 2012 (r237573) @@ -32,7 +32,7 @@ .\" @(#)strftime.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd November 4, 2004 +.Dd June 25, 2012 .Dt STRFTIME 3 .Os .Sh NAME @@ -49,6 +49,8 @@ .Fa "const char * restrict format" .Fa "const struct tm * restrict timeptr" .Fc +.Ft size_t +.Fn strftime_l "char *restrict buf" "size_t maxsize" "const char * restrict format" "const struct tm *restrict timeptr" "locale_t loc" .Sh DESCRIPTION The .Fn strftime @@ -58,6 +60,11 @@ into the buffer .Fa buf according to the string pointed to by .Fa format . +The function +.Fn strftime_l +does the same as +.Fn strftime +but takes an explicit locale rather than using the current locale. .Pp The .Fa format @@ -268,6 +275,10 @@ The peculiar week number and year in the and .Ql \&%V are defined in ISO 8601: 1988. +The +.Fn strftime_l +function conforms to +.St -p1003.1-2008 . .Sh BUGS There is no conversion specification for the phase of the moon. .Pp Modified: head/lib/libc/stdtime/strptime.3 ============================================================================== --- head/lib/libc/stdtime/strptime.3 Mon Jun 25 21:33:45 2012 (r237572) +++ head/lib/libc/stdtime/strptime.3 Mon Jun 25 21:51:40 2012 (r237573) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" " -.Dd January 4, 2003 +.Dd June 25, 2012 .Dt STRPTIME 3 .Os .Sh NAME @@ -41,6 +41,10 @@ .Fa "const char * restrict format" .Fa "struct tm * restrict timeptr" .Fc +.In time.h +.In xlocale.h +.Ft char * +.Fn strptime_l "const char * restrict buf" "const char * restrict format" "struct tm * restrict timeptr" "locale_t loc" .Sh DESCRIPTION The .Fn strptime @@ -53,6 +57,11 @@ and fills in the elements of the structu The resulting values will be relative to the local time zone. Thus, it can be considered the reverse operation of .Xr strftime 3 . +The +.Fn strptime_l +function does the same as +.Fn strptime , +but takes an explicit locale rather than using the current locale. .Pp The .Fa format @@ -104,6 +113,9 @@ that has not been required to satisfy th It returns .Dv NULL if one of the conversions failed. +.Fn strptime_l +returns the same values as +.Fn strptime . .Sh SEE ALSO .Xr date 1 , .Xr scanf 3 , From owner-svn-src-head@FreeBSD.ORG Mon Jun 25 21:56: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 75810106566C; Mon, 25 Jun 2012 21:56:37 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4692D8FC1C; Mon, 25 Jun 2012 21:56: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 q5PLubwB097619; Mon, 25 Jun 2012 21:56:37 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5PLub35097616; Mon, 25 Jun 2012 21:56:37 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201206252156.q5PLub35097616@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 25 Jun 2012 21:56: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: r237574 - in head: share/mk usr.sbin/crunch/crunchgen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 25 Jun 2012 21:56:37 -0000 Author: obrien Date: Mon Jun 25 21:56:36 2012 New Revision: 237574 URL: http://svn.freebsd.org/changeset/base/237574 Log: Ensure crunchen uses the same make binary as the rest of the build. Submitted by: Simon Gerraty Modified: head/share/mk/bsd.crunchgen.mk head/usr.sbin/crunch/crunchgen/crunchgen.c Modified: head/share/mk/bsd.crunchgen.mk ============================================================================== --- head/share/mk/bsd.crunchgen.mk Mon Jun 25 21:51:40 2012 (r237573) +++ head/share/mk/bsd.crunchgen.mk Mon Jun 25 21:56:36 2012 (r237574) @@ -105,7 +105,7 @@ $(CONF): Makefile .MAKEFLAGS:= ${.MAKEFLAGS:N-P} .ORDER: $(OUTPUTS) objs $(OUTPUTS): $(CONF) - MAKEOBJDIRPREFIX=${CRUNCHOBJS} crunchgen -fq -m $(OUTMK) \ + MAKE=${MAKE} MAKEOBJDIRPREFIX=${CRUNCHOBJS} crunchgen -fq -m $(OUTMK) \ -c $(OUTC) $(CONF) $(PROG): $(OUTPUTS) objs Modified: head/usr.sbin/crunch/crunchgen/crunchgen.c ============================================================================== --- head/usr.sbin/crunch/crunchgen/crunchgen.c Mon Jun 25 21:51:40 2012 (r237573) +++ head/usr.sbin/crunch/crunchgen/crunchgen.c Mon Jun 25 21:56:36 2012 (r237574) @@ -92,6 +92,7 @@ char outmkname[MAXPATHLEN], outcfname[MA char tempfname[MAXPATHLEN], cachename[MAXPATHLEN], curfilename[MAXPATHLEN]; char outhdrname[MAXPATHLEN] ; /* user-supplied header for *.mk */ char *objprefix; /* where are the objects ? */ +char *path_make; int linenum = -1; int goterror = 0; @@ -127,6 +128,10 @@ int main(int argc, char **argv) readcache = 1; *outmkname = *outcfname = *execfname = '\0'; + path_make = getenv("MAKE"); + if (path_make == NULL || *path_make == '\0') + path_make = "make"; + p = getenv("MAKEOBJDIRPREFIX"); if (p == NULL || *p == '\0') objprefix = "/usr/obj"; /* default */ @@ -599,7 +604,8 @@ void gen_outputs(void) gen_output_makefile(); status(""); fprintf(stderr, - "Run \"make -f %s\" to build crunched binary.\n", outmkname); + "Run \"%s -f %s\" to build crunched binary.\n", + path_make, outmkname); } /* @@ -720,16 +726,16 @@ void fillin_program_objs(prog_t *p, char fprintf(f, "loop:\n\t@echo 'OBJS= '${%s}\n", objvar); fprintf(f, "crunchgen_objs:\n" - "\t@cd %s && make -f %s $(BUILDOPTS) $(%s_OPTS)", - p->srcdir, tempfname, p->ident); + "\t@cd %s && %s -f %s $(BUILDOPTS) $(%s_OPTS)", + p->srcdir, path_make, tempfname, p->ident); for (s = p->buildopts; s != NULL; s = s->next) fprintf(f, " %s", s->str); fprintf(f, " loop\n"); fclose(f); - snprintf(line, MAXLINELEN, "cd %s && make -f %s -B crunchgen_objs", - p->srcdir, tempfname); + snprintf(line, MAXLINELEN, "cd %s && %s -f %s -B crunchgen_objs", + p->srcdir, path_make, tempfname); if ((f = popen(line, "r")) == NULL) { warn("submake pipe"); goterror = 1; From owner-svn-src-head@FreeBSD.ORG Mon Jun 25 22:05: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 63FCF106564A for ; Mon, 25 Jun 2012 22:05:05 +0000 (UTC) (envelope-from isabell@issyl0.co.uk) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id DCFFF8FC0A for ; Mon, 25 Jun 2012 22:05:00 +0000 (UTC) Received: by eabm6 with SMTP id m6so1760994eab.13 for ; Mon, 25 Jun 2012 15:04:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent :x-gm-message-state; bh=W/OyNE19F0FokFuS6+f+zeNLFowyHDzLDsTVdF7yDsY=; b=oV/+uJs/4emnKnzypqOzMhbzXR3+iXBCJgp56uuR3pazUVTBZa2nEIbXLX3FZUjZiB NqPWo5hoDzdKn7h6vhyp7xAGMLP9pYwdzNUnaJuQZXJVZ9pAOWTj8TdInlfGY/LoEbtZ GEQK4xK9nnQTMtXjKyTAer8dcY122nlhv1l8uaC2vdh8bFwekeCiHVzZRYoPCEUPc0x/ GVgTP1lxb0kAjD7sOkULeWJ3qCI3066TZjLToJ+FT1r3FVmJHEjxZCvbwfKRAhR23N3J XE/FqEaVND5Z0peU9MYoDYUYMNRH7+vmCkfUljbVk8AZ1ZbOKS02Fdiaf3wVhPi6mkTH U3OQ== Received: by 10.14.48.71 with SMTP id u47mr2611661eeb.205.1340661898955; Mon, 25 Jun 2012 15:04:58 -0700 (PDT) Received: from sky.issyl0.co.uk ([2001:ba8:1f1:f1f0::2]) by mx.google.com with ESMTPS id x52sm142837058eea.11.2012.06.25.15.04.57 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 25 Jun 2012 15:04:58 -0700 (PDT) Sender: Isabell Long Date: Mon, 25 Jun 2012 23:04:55 +0100 From: Isabell Long To: Isabell Long Message-ID: <20120625220455.GB1449@sky.issyl0.co.uk> References: <201206252151.q5PLpeX3097379@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201206252151.q5PLpeX3097379@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-Gm-Message-State: ALoCoQk7q9Osg2r/jEOcwnPcyHESGL9NUxu1dENXhZ0oRk1QOJYDFac8DuokBJ1BYip4vU44JyeD Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237573 - in head/lib/libc: stdlib stdtime X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 25 Jun 2012 22:05:05 -0000 On Mon, Jun 25, 2012 at 09:51:40PM +0000, Isabell Long wrote: > Author: issyl0 (doc committer) > Date: Mon Jun 25 21:51:40 2012 > New Revision: 237573 > URL: http://svn.freebsd.org/changeset/base/237573 > > Log: > Add more locale-specific functions to the relevant man pages and > Makefiles: > - libc/stdtime/strftime.3 > - libc/stdtime/strptime.3 > - libc/stdlib/strfmon.3 I forgot to add the MFC time! 5 days. :-) From owner-svn-src-head@FreeBSD.ORG Mon Jun 25 22:39: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 8969D106566B; Mon, 25 Jun 2012 22:39:38 +0000 (UTC) (envelope-from bjk@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5BB2A8FC21; Mon, 25 Jun 2012 22:39: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 q5PMdcID099948; Mon, 25 Jun 2012 22:39:38 GMT (envelope-from bjk@svn.freebsd.org) Received: (from bjk@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5PMdclY099946; Mon, 25 Jun 2012 22:39:38 GMT (envelope-from bjk@svn.freebsd.org) Message-Id: <201206252239.q5PMdclY099946@svn.freebsd.org> From: Benjamin Kaduk Date: Mon, 25 Jun 2012 22:39: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: r237581 - 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, 25 Jun 2012 22:39:38 -0000 Author: bjk (doc committer) Date: Mon Jun 25 22:39:37 2012 New Revision: 237581 URL: http://svn.freebsd.org/changeset/base/237581 Log: Explicitly mention that setting the change and expiry times to zero is equivalent to leaving the time unset. [1] Wordsmith in the compat support section. Use a full path to nologin(8) in the context of setting it as a user's shell, keeping a separate cross-reference. PR: docs/169354 [1] Approved by: hrs (mentor) MFC after: 3 weeks Modified: head/share/man/man5/passwd.5 Modified: head/share/man/man5/passwd.5 ============================================================================== --- head/share/man/man5/passwd.5 Mon Jun 25 22:22:39 2012 (r237580) +++ head/share/man/man5/passwd.5 Mon Jun 25 22:39:37 2012 (r237581) @@ -35,7 +35,7 @@ .\" From: @(#)passwd.5 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd May 8, 2007 +.Dd June 23, 2012 .Dt PASSWD 5 .Os .Sh NAME @@ -203,7 +203,8 @@ field is the number of seconds from the .Dv UTC , until the password for the account must be changed. -This field may be left empty to turn off the password aging feature. +This field may be left empty to turn off the password aging feature; +a value of zero is equivalent to leaving the field empty. .Pp The .Ar expire @@ -211,7 +212,8 @@ field is the number of seconds from the .Dv UTC , until the account expires. -This field may be left empty to turn off the account aging feature. +This field may be left empty to turn off the account aging feature; +a value of zero is equivalent to leaving the field empty. .Pp The .Ar gecos @@ -271,7 +273,8 @@ as it is done for system accounts, is to set its .Ar shell to -.Xr nologin 8 . +.Pa /sbin/nologin +.Pq see Xr nologin 8 . .Sh HESIOD SUPPORT If .Sq Li dns @@ -363,7 +366,7 @@ fields, the specified numbers will overr from the Hesiod domain or the .Tn NIS maps. -As well, if the +Likewise, if the .Ar gecos , .Ar dir or @@ -399,7 +402,8 @@ The additional fields .Ar change and .Ar expire -are added, but are turned off by default. +are added, but are turned off by default +.Pq setting these fields to zero is equivalent to leaving them blank . Class is currently not implemented, but change and expire are; to set them, use the current day in seconds from the epoch + whatever number of seconds of offset you want. From owner-svn-src-head@FreeBSD.ORG Mon Jun 25 23:07:19 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 06E0C106566C; Mon, 25 Jun 2012 23:07:19 +0000 (UTC) (envelope-from bjk@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E130C8FC08; Mon, 25 Jun 2012 23:07:18 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q5PN7ITk052611; Mon, 25 Jun 2012 23:07:18 GMT (envelope-from bjk@freebsd.org) Received: from localhost (bjk@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) with ESMTP id q5PN7IeS052608; Mon, 25 Jun 2012 23:07:18 GMT (envelope-from bjk@freebsd.org) X-Authentication-Warning: freefall.freebsd.org: bjk owned process doing -bs Date: Mon, 25 Jun 2012 23:07:18 +0000 (UTC) From: Benjamin Kaduk To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <201206252239.q5PMdclY099946@svn.freebsd.org> Message-ID: References: <201206252239.q5PMdclY099946@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Benjamin Kaduk Subject: Re: svn commit: r237581 - 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, 25 Jun 2012 23:07:19 -0000 On Mon, 25 Jun 2012, Benjamin Kaduk wrote: > Author: bjk (doc committer) > Date: Mon Jun 25 22:39:37 2012 > New Revision: 237581 > URL: http://svn.freebsd.org/changeset/base/237581 > > Log: > Explicitly mention that setting the change and expiry times to zero is > equivalent to leaving the time unset. [1] > > Wordsmith in the compat support section. > > Use a full path to nologin(8) in the context of setting it as a user's shell, > keeping a separate cross-reference. > > PR: docs/169354 [1] > Approved by: hrs (mentor) > MFC after: 3 weeks Due to popular request, I am dropping the MFC timer to 5 days. -Ben From owner-svn-src-head@FreeBSD.ORG Tue Jun 26 00:34: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 35A1F1065670; Tue, 26 Jun 2012 00:34:35 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 205488FC0A; Tue, 26 Jun 2012 00:34: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 q5Q0YYIM005149; Tue, 26 Jun 2012 00:34:34 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5Q0YYlY005146; Tue, 26 Jun 2012 00:34:34 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201206260034.q5Q0YYlY005146@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 26 Jun 2012 00:34:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237587 - head/sys/dev/cxgbe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 26 Jun 2012 00:34:35 -0000 Author: np Date: Tue Jun 26 00:34:34 2012 New Revision: 237587 URL: http://svn.freebsd.org/changeset/base/237587 Log: Allow cxgbe(4) running within a VM to attach to its devices that have been exported via PCI passthrough. - Do not check for a specific physical function (PF) before claiming a device. Different PFs have different device-ids so this check is redundant anyway. - Obtain the PF# from the WHOAMI register instead of pci_get_function(). - Setup the memory windows using the real BAR0 address, not what the VM says it is. Obtained from: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Mon Jun 25 23:40:58 2012 (r237586) +++ head/sys/dev/cxgbe/t4_main.c Tue Jun 26 00:34:34 2012 (r237587) @@ -355,21 +355,20 @@ static int t4_mod_event(module_t, int, v struct t4_pciids { uint16_t device; - uint8_t mpf; char *desc; } t4_pciids[] = { - {0xa000, 0, "Chelsio Terminator 4 FPGA"}, - {0x4400, 4, "Chelsio T440-dbg"}, - {0x4401, 4, "Chelsio T420-CR"}, - {0x4402, 4, "Chelsio T422-CR"}, - {0x4403, 4, "Chelsio T440-CR"}, - {0x4404, 4, "Chelsio T420-BCH"}, - {0x4405, 4, "Chelsio T440-BCH"}, - {0x4406, 4, "Chelsio T440-CH"}, - {0x4407, 4, "Chelsio T420-SO"}, - {0x4408, 4, "Chelsio T420-CX"}, - {0x4409, 4, "Chelsio T420-BT"}, - {0x440a, 4, "Chelsio T404-BT"}, + {0xa000, "Chelsio Terminator 4 FPGA"}, + {0x4400, "Chelsio T440-dbg"}, + {0x4401, "Chelsio T420-CR"}, + {0x4402, "Chelsio T422-CR"}, + {0x4403, "Chelsio T440-CR"}, + {0x4404, "Chelsio T420-BCH"}, + {0x4405, "Chelsio T440-BCH"}, + {0x4406, "Chelsio T440-CH"}, + {0x4407, "Chelsio T420-SO"}, + {0x4408, "Chelsio T420-CX"}, + {0x4409, "Chelsio T420-BT"}, + {0x440a, "Chelsio T404-BT"}, }; #ifdef TCP_OFFLOAD @@ -387,13 +386,17 @@ t4_probe(device_t dev) int i; uint16_t v = pci_get_vendor(dev); uint16_t d = pci_get_device(dev); + uint8_t f = pci_get_function(dev); if (v != PCI_VENDOR_ID_CHELSIO) return (ENXIO); + /* Attach only to PF0 of the FPGA */ + if (d == 0xa000 && f != 0) + return (ENXIO); + for (i = 0; i < ARRAY_SIZE(t4_pciids); i++) { - if (d == t4_pciids[i].device && - pci_get_function(dev) == t4_pciids[i].mpf) { + if (d == t4_pciids[i].device) { device_set_desc(dev, t4_pciids[i].desc); return (BUS_PROBE_DEFAULT); } @@ -415,8 +418,6 @@ t4_attach(device_t dev) sc = device_get_softc(dev); sc->dev = dev; - sc->pf = pci_get_function(dev); - sc->mbox = sc->pf; pci_enable_busmaster(dev); if (pci_find_cap(dev, PCIY_EXPRESS, &i) == 0) { @@ -443,6 +444,15 @@ t4_attach(device_t dev) if (rc != 0) goto done; /* error message displayed already */ + /* + * This is the real PF# to which we're attaching. Works from within PCI + * passthrough environments too, where pci_get_function() could return a + * different PF# depending on the passthrough configuration. We need to + * use the real PF# in all our communication with the firmware. + */ + sc->pf = G_SOURCEPF(t4_read_reg(sc, A_PL_WHOAMI)); + sc->mbox = sc->pf; + memset(sc->chan_map, 0xff, sizeof(sc->chan_map)); sc->an_handler = an_not_handled; for (i = 0; i < ARRAY_SIZE(sc->cpl_handler); i++) @@ -1277,9 +1287,17 @@ map_bars(struct adapter *sc) static void setup_memwin(struct adapter *sc) { - u_long bar0; + uint32_t bar0; - bar0 = rman_get_start(sc->regs_res); + /* + * Read low 32b of bar0 indirectly via the hardware backdoor mechanism. + * Works from within PCI passthrough environments too, where + * rman_get_start() can return a different value. We need to program + * the memory window decoders with the actual addresses that will be + * coming across the PCIe link. + */ + bar0 = t4_hw_pci_read_cfg4(sc, PCIR_BAR(0)); + bar0 &= (uint32_t) PCIM_BAR_MEM_BASE; t4_write_reg(sc, PCIE_MEM_ACCESS_REG(A_PCIE_MEM_ACCESS_BASE_WIN, 0), (bar0 + MEMWIN0_BASE) | V_BIR(0) | @@ -1292,6 +1310,9 @@ setup_memwin(struct adapter *sc) t4_write_reg(sc, PCIE_MEM_ACCESS_REG(A_PCIE_MEM_ACCESS_BASE_WIN, 2), (bar0 + MEMWIN2_BASE) | V_BIR(0) | V_WINDOW(ilog2(MEMWIN2_APERTURE) - 10)); + + /* flush */ + t4_read_reg(sc, PCIE_MEM_ACCESS_REG(A_PCIE_MEM_ACCESS_BASE_WIN, 2)); } static int From owner-svn-src-head@FreeBSD.ORG Tue Jun 26 05:34: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 B8624106564A; Tue, 26 Jun 2012 05:34:32 +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 A30AA8FC0A; Tue, 26 Jun 2012 05:34: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 q5Q5YWu4017586; Tue, 26 Jun 2012 05:34:32 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5Q5YWKs017584; Tue, 26 Jun 2012 05:34:32 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201206260534.q5Q5YWKs017584@svn.freebsd.org> From: Joel Dahl Date: Tue, 26 Jun 2012 05:34: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: r237591 - 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: Tue, 26 Jun 2012 05:34:32 -0000 Author: joel (doc committer) Date: Tue Jun 26 05:34:31 2012 New Revision: 237591 URL: http://svn.freebsd.org/changeset/base/237591 Log: Remove end of line whitespace. Modified: head/lib/libc/stdlib/strfmon.3 Modified: head/lib/libc/stdlib/strfmon.3 ============================================================================== --- head/lib/libc/stdlib/strfmon.3 Tue Jun 26 03:05:42 2012 (r237590) +++ head/lib/libc/stdlib/strfmon.3 Tue Jun 26 05:34:31 2012 (r237591) @@ -53,7 +53,7 @@ The .Fn strfmon_l function does the same as .Fn strfmon -but takes an explicit locale rather than using the current locale. +but takes an explicit locale rather than using the current locale. .Pp The format string is composed of zero or more directives: ordinary characters (not From owner-svn-src-head@FreeBSD.ORG Tue Jun 26 06:02:43 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 E02F8106566C; Tue, 26 Jun 2012 06:02: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 BFD508FC17; Tue, 26 Jun 2012 06:02: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 q5Q62hCZ018731; Tue, 26 Jun 2012 06:02:43 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5Q62hSg018729; Tue, 26 Jun 2012 06:02:43 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201206260602.q5Q62hSg018729@svn.freebsd.org> From: Alan Cox Date: Tue, 26 Jun 2012 06:02: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: r237592 - head/sys/amd64/amd64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 26 Jun 2012 06:02:44 -0000 Author: alc Date: Tue Jun 26 06:02:43 2012 New Revision: 237592 URL: http://svn.freebsd.org/changeset/base/237592 Log: Add PV list locking to pmap_enter(). Its execution is no longer serialized by the pvh global lock. Add a needed atomic operation to pmap_object_init_pt(). Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Tue Jun 26 05:34:31 2012 (r237591) +++ head/sys/amd64/amd64/pmap.c Tue Jun 26 06:02:43 2012 (r237592) @@ -264,7 +264,8 @@ static void pmap_pv_demote_pde(pmap_t pm struct rwlock **lockp); static boolean_t pmap_pv_insert_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa, struct rwlock **lockp); -static void pmap_pv_promote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); +static void pmap_pv_promote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa, + struct rwlock **lockp); static void pmap_pvh_free(struct md_page *pvh, pmap_t pmap, vm_offset_t va); static pv_entry_t pmap_pvh_remove(struct md_page *pvh, pmap_t pmap, vm_offset_t va); @@ -287,7 +288,8 @@ static boolean_t pmap_is_referenced_pvh( static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); static vm_page_t pmap_lookup_pt_page(pmap_t pmap, vm_offset_t va); static void pmap_pde_attr(pd_entry_t *pde, int cache_bits); -static void pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va); +static void pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va, + struct rwlock **lockp); static boolean_t pmap_protect_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t sva, vm_prot_t prot); static void pmap_pte_attr(pt_entry_t *pte, int cache_bits); @@ -305,10 +307,13 @@ static void pmap_update_pde(pmap_t pmap, pd_entry_t newpde); static void pmap_update_pde_invalidate(vm_offset_t va, pd_entry_t newpde); -static vm_page_t pmap_allocpde(pmap_t pmap, vm_offset_t va, int flags); -static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags); +static vm_page_t _pmap_allocpte(pmap_t pmap, vm_pindex_t ptepindex, + struct rwlock **lockp); +static vm_page_t pmap_allocpde(pmap_t pmap, vm_offset_t va, + struct rwlock **lockp); +static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, + struct rwlock **lockp); -static vm_page_t _pmap_allocpte(pmap_t pmap, vm_pindex_t ptepindex, int flags); static int _pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_page_t* free); static int pmap_unuse_pt(pmap_t, vm_offset_t, pd_entry_t, vm_page_t *); @@ -1686,8 +1691,10 @@ pmap_pinit(pmap_t pmap) } /* - * this routine is called if the page table page is not - * mapped correctly. + * This routine is called if the desired page table page does not exist. + * + * If page table page allocation fails, this routine may sleep before + * returning NULL. It sleeps only if a lock pointer was given. * * Note: If a page allocation fails at page table level two or three, * one or two pages may be held during the wait, only to be released @@ -1695,25 +1702,26 @@ pmap_pinit(pmap_t pmap) * race conditions. */ static vm_page_t -_pmap_allocpte(pmap_t pmap, vm_pindex_t ptepindex, int flags) +_pmap_allocpte(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp) { vm_page_t m, pdppg, pdpg; - KASSERT((flags & (M_NOWAIT | M_WAITOK)) == M_NOWAIT || - (flags & (M_NOWAIT | M_WAITOK)) == M_WAITOK, - ("_pmap_allocpte: flags is neither M_NOWAIT nor M_WAITOK")); - PMAP_LOCK_ASSERT(pmap, MA_OWNED); + /* * Allocate a page table page. */ if ((m = vm_page_alloc(NULL, ptepindex, VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) { - if (flags & M_WAITOK) { + if (lockp != NULL) { + if (*lockp != NULL) { + rw_wunlock(*lockp); + *lockp = NULL; + } PMAP_UNLOCK(pmap); - rw_wunlock(&pvh_global_lock); + rw_runlock(&pvh_global_lock); VM_WAIT; - rw_wlock(&pvh_global_lock); + rw_rlock(&pvh_global_lock); PMAP_LOCK(pmap); } @@ -1754,7 +1762,7 @@ _pmap_allocpte(pmap_t pmap, vm_pindex_t if ((*pml4 & PG_V) == 0) { /* Have to allocate a new pdp, recurse */ if (_pmap_allocpte(pmap, NUPDE + NUPDPE + pml4index, - flags) == NULL) { + lockp) == NULL) { --m->wire_count; atomic_subtract_int(&cnt.v_wire_count, 1); vm_page_free_zero(m); @@ -1787,7 +1795,7 @@ _pmap_allocpte(pmap_t pmap, vm_pindex_t if ((*pml4 & PG_V) == 0) { /* Have to allocate a new pd, recurse */ if (_pmap_allocpte(pmap, NUPDE + pdpindex, - flags) == NULL) { + lockp) == NULL) { --m->wire_count; atomic_subtract_int(&cnt.v_wire_count, 1); vm_page_free_zero(m); @@ -1801,7 +1809,7 @@ _pmap_allocpte(pmap_t pmap, vm_pindex_t if ((*pdp & PG_V) == 0) { /* Have to allocate a new pd, recurse */ if (_pmap_allocpte(pmap, NUPDE + pdpindex, - flags) == NULL) { + lockp) == NULL) { --m->wire_count; atomic_subtract_int(&cnt.v_wire_count, 1); @@ -1827,15 +1835,12 @@ _pmap_allocpte(pmap_t pmap, vm_pindex_t } static vm_page_t -pmap_allocpde(pmap_t pmap, vm_offset_t va, int flags) +pmap_allocpde(pmap_t pmap, vm_offset_t va, struct rwlock **lockp) { vm_pindex_t pdpindex, ptepindex; pdp_entry_t *pdpe; vm_page_t pdpg; - KASSERT((flags & (M_NOWAIT | M_WAITOK)) == M_NOWAIT || - (flags & (M_NOWAIT | M_WAITOK)) == M_WAITOK, - ("pmap_allocpde: flags is neither M_NOWAIT nor M_WAITOK")); retry: pdpe = pmap_pdpe(pmap, va); if (pdpe != NULL && (*pdpe & PG_V) != 0) { @@ -1846,24 +1851,20 @@ retry: /* Allocate a pd page. */ ptepindex = pmap_pde_pindex(va); pdpindex = ptepindex >> NPDPEPGSHIFT; - pdpg = _pmap_allocpte(pmap, NUPDE + pdpindex, flags); - if (pdpg == NULL && (flags & M_WAITOK)) + pdpg = _pmap_allocpte(pmap, NUPDE + pdpindex, lockp); + if (pdpg == NULL && lockp != NULL) goto retry; } return (pdpg); } static vm_page_t -pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags) +pmap_allocpte(pmap_t pmap, vm_offset_t va, struct rwlock **lockp) { vm_pindex_t ptepindex; pd_entry_t *pd; vm_page_t m; - KASSERT((flags & (M_NOWAIT | M_WAITOK)) == M_NOWAIT || - (flags & (M_NOWAIT | M_WAITOK)) == M_WAITOK, - ("pmap_allocpte: flags is neither M_NOWAIT nor M_WAITOK")); - /* * Calculate pagetable page index */ @@ -1879,7 +1880,7 @@ retry: * normal 4K page. */ if (pd != NULL && (*pd & (PG_PS | PG_V)) == (PG_PS | PG_V)) { - if (!pmap_demote_pde(pmap, pd, va)) { + if (!pmap_demote_pde_locked(pmap, pd, va, lockp)) { /* * Invalidation of the 2MB page mapping may have caused * the deallocation of the underlying PD page. @@ -1900,8 +1901,8 @@ retry: * Here if the pte page isn't mapped, or if it has been * deallocated. */ - m = _pmap_allocpte(pmap, ptepindex, flags); - if (m == NULL && (flags & M_WAITOK)) + m = _pmap_allocpte(pmap, ptepindex, lockp); + if (m == NULL && lockp != NULL) goto retry; } return (m); @@ -2504,16 +2505,18 @@ pmap_pv_demote_pde(pmap_t pmap, vm_offse * for the 2MB page mapping. */ static void -pmap_pv_promote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa) +pmap_pv_promote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa, + struct rwlock **lockp) { struct md_page *pvh; pv_entry_t pv; vm_offset_t va_last; vm_page_t m; - rw_assert(&pvh_global_lock, RA_WLOCKED); + rw_assert(&pvh_global_lock, RA_LOCKED); KASSERT((pa & PDRMASK) == 0, ("pmap_pv_promote_pde: pa is not 2mpage aligned")); + CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, pa); /* * Transfer the first page's pv entry for this mapping to the 2mpage's @@ -3255,7 +3258,8 @@ retry: * identical characteristics. */ static void -pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va) +pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va, + struct rwlock **lockp) { pd_entry_t newpde; pt_entry_t *firstpte, oldpte, pa, *pte; @@ -3273,7 +3277,7 @@ pmap_promote_pde(pmap_t pmap, pd_entry_t setpde: newpde = *firstpte; if ((newpde & ((PG_FRAME & PDRMASK) | PG_A | PG_V)) != (PG_A | PG_V)) { - pmap_pde_p_failures++; + atomic_add_long(&pmap_pde_p_failures, 1); CTR2(KTR_PMAP, "pmap_promote_pde: failure for va %#lx" " in pmap %p", va, pmap); return; @@ -3298,7 +3302,7 @@ setpde: setpte: oldpte = *pte; if ((oldpte & (PG_FRAME | PG_A | PG_V)) != pa) { - pmap_pde_p_failures++; + atomic_add_long(&pmap_pde_p_failures, 1); CTR2(KTR_PMAP, "pmap_promote_pde: failure for va %#lx" " in pmap %p", va, pmap); return; @@ -3317,7 +3321,7 @@ setpte: " in pmap %p", oldpteva, pmap); } if ((oldpte & PG_PTE_PROMOTE) != (newpde & PG_PTE_PROMOTE)) { - pmap_pde_p_failures++; + atomic_add_long(&pmap_pde_p_failures, 1); CTR2(KTR_PMAP, "pmap_promote_pde: failure for va %#lx" " in pmap %p", va, pmap); return; @@ -3342,7 +3346,7 @@ setpte: * Promote the pv entries. */ if ((newpde & PG_MANAGED) != 0) - pmap_pv_promote_pde(pmap, va, newpde & PG_PS_FRAME); + pmap_pv_promote_pde(pmap, va, newpde & PG_PS_FRAME, lockp); /* * Propagate the PAT index to its proper position. @@ -3358,7 +3362,7 @@ setpte: else pde_store(pde, PG_PS | newpde); - pmap_pde_promotions++; + atomic_add_long(&pmap_pde_promotions, 1); CTR2(KTR_PMAP, "pmap_promote_pde: success for va %#lx" " in pmap %p", va, pmap); } @@ -3379,6 +3383,7 @@ void pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m, vm_prot_t prot, boolean_t wired) { + struct rwlock *lock; pd_entry_t *pde; pt_entry_t *pte; pt_entry_t newpte, origpte; @@ -3398,7 +3403,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, mpte = NULL; - rw_wlock(&pvh_global_lock); + lock = NULL; + rw_rlock(&pvh_global_lock); PMAP_LOCK(pmap); /* @@ -3406,7 +3412,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, * resident, we are creating it here. */ if (va < VM_MAXUSER_ADDRESS) - mpte = pmap_allocpte(pmap, va, M_WAITOK); + mpte = pmap_allocpte(pmap, va, &lock); pde = pmap_pde(pmap, va); if (pde != NULL && (*pde & PG_V) != 0) { @@ -3460,6 +3466,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, pmap->pm_stats.wired_count--; if (origpte & PG_MANAGED) { om = PHYS_TO_VM_PAGE(opa); + CHANGE_PV_LIST_LOCK_TO_VM_PAGE(&lock, om); pv = pmap_pvh_remove(&om->md, pmap, va); } if (mpte != NULL) { @@ -3479,6 +3486,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, ("pmap_enter: managed mapping within the clean submap")); if (pv == NULL) pv = get_pv_entry(pmap, FALSE); + CHANGE_PV_LIST_LOCK_TO_VM_PAGE(&lock, m); pv->pv_va = va; TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); pa |= PG_MANAGED; @@ -3534,11 +3542,13 @@ validate: if ((newpte & PG_RW) == 0) invlva = TRUE; } - if ((origpte & PG_MANAGED) != 0 && - TAILQ_EMPTY(&om->md.pv_list) && - ((om->flags & PG_FICTITIOUS) != 0 || - TAILQ_EMPTY(&pa_to_pvh(opa)->pv_list))) - vm_page_aflag_clear(om, PGA_WRITEABLE); + if ((origpte & PG_MANAGED) != 0) { + CHANGE_PV_LIST_LOCK_TO_VM_PAGE(&lock, om); + if (TAILQ_EMPTY(&om->md.pv_list) && + ((om->flags & PG_FICTITIOUS) != 0 || + TAILQ_EMPTY(&pa_to_pvh(opa)->pv_list))) + vm_page_aflag_clear(om, PGA_WRITEABLE); + } if (invlva) pmap_invalidate_page(pmap, va); } else @@ -3552,9 +3562,11 @@ validate: if ((mpte == NULL || mpte->wire_count == NPTEPG) && pg_ps_enabled && (m->flags & PG_FICTITIOUS) == 0 && vm_reserv_level_iffullpop(m) == 0) - pmap_promote_pde(pmap, pde, va); + pmap_promote_pde(pmap, pde, va, &lock); - rw_wunlock(&pvh_global_lock); + if (lock != NULL) + rw_wunlock(lock); + rw_runlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3573,7 +3585,7 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t rw_assert(&pvh_global_lock, RA_LOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - if ((mpde = pmap_allocpde(pmap, va, M_NOWAIT)) == NULL) { + if ((mpde = pmap_allocpde(pmap, va, NULL)) == NULL) { CTR2(KTR_PMAP, "pmap_enter_pde: failure for va %#lx" " in pmap %p", va, pmap); return (FALSE); @@ -3735,7 +3747,9 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ /* * If the page table page is mapped, we just increment - * the hold count, and activate it. + * the hold count, and activate it. Otherwise, we + * attempt to allocate a page table page. If this + * attempt fails, we don't retry. Instead, we give up. */ if (ptepa && (*ptepa & PG_V) != 0) { if (*ptepa & PG_PS) @@ -3743,8 +3757,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ mpte = PHYS_TO_VM_PAGE(*ptepa & PG_FRAME); mpte->wire_count++; } else { - mpte = _pmap_allocpte(pmap, ptepindex, - M_NOWAIT); + mpte = _pmap_allocpte(pmap, ptepindex, NULL); if (mpte == NULL) return (mpte); } @@ -3870,7 +3883,7 @@ pmap_object_init_pt(pmap_t pmap, vm_offs PMAP_LOCK(pmap); for (pa = ptepa | pmap_cache_bits(pat_mode, 1); pa < ptepa + size; pa += NBPDR) { - pdpg = pmap_allocpde(pmap, addr, M_NOWAIT); + pdpg = pmap_allocpde(pmap, addr, NULL); if (pdpg == NULL) { /* * The creation of mappings below is only an @@ -3888,7 +3901,7 @@ pmap_object_init_pt(pmap_t pmap, vm_offs pde_store(pde, pa | PG_PS | PG_M | PG_A | PG_U | PG_RW | PG_V); pmap_resident_count_inc(pmap, NBPDR / PAGE_SIZE); - pmap_pde_mappings++; + atomic_add_long(&pmap_pde_mappings, 1); } else { /* Continue on if the PDE is already valid. */ pdpg->wire_count--; @@ -4020,7 +4033,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm continue; if (srcptepaddr & PG_PS) { - dstmpde = pmap_allocpde(dst_pmap, addr, M_NOWAIT); + dstmpde = pmap_allocpde(dst_pmap, addr, NULL); if (dstmpde == NULL) break; pde = (pd_entry_t *) @@ -4058,7 +4071,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm dstmpte->pindex == pmap_pde_pindex(addr)) dstmpte->wire_count++; else if ((dstmpte = pmap_allocpte(dst_pmap, - addr, M_NOWAIT)) == NULL) + addr, NULL)) == NULL) goto out; dst_pte = (pt_entry_t *) PHYS_TO_DMAP(VM_PAGE_TO_PHYS(dstmpte)); From owner-svn-src-head@FreeBSD.ORG Tue Jun 26 07:56: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 63708106564A; Tue, 26 Jun 2012 07:56:16 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4DE178FC0C; Tue, 26 Jun 2012 07:56: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 q5Q7uGFb023346; Tue, 26 Jun 2012 07:56:16 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5Q7uGFu023344; Tue, 26 Jun 2012 07:56:16 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201206260756.q5Q7uGFu023344@svn.freebsd.org> From: Adrian Chadd Date: Tue, 26 Jun 2012 07:56:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237593 - 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: Tue, 26 Jun 2012 07:56:16 -0000 Author: adrian Date: Tue Jun 26 07:56:15 2012 New Revision: 237593 URL: http://svn.freebsd.org/changeset/base/237593 Log: Make sure the BAR TX session pause is correctly unpaused when a node is reassociating. PR: kern/169432 Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Tue Jun 26 06:02:43 2012 (r237592) +++ head/sys/dev/ath/if_ath_tx.c Tue Jun 26 07:56:15 2012 (r237593) @@ -4330,6 +4330,9 @@ ath_addba_response(struct ieee80211_node /* * Stop ADDBA on a queue. + * + * This can be called whilst BAR TX is currently active on the queue, + * so make sure this is unblocked before continuing. */ void ath_addba_stop(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap) @@ -4341,9 +4344,21 @@ ath_addba_stop(struct ieee80211_node *ni DPRINTF(sc, ATH_DEBUG_SW_TX_CTRL, "%s: called\n", __func__); - /* Pause TID traffic early, so there aren't any races */ + /* + * Pause TID traffic early, so there aren't any races + * Unblock the pending BAR held traffic, if it's currently paused. + */ ATH_TXQ_LOCK(sc->sc_ac2q[atid->ac]); ath_tx_tid_pause(sc, atid); + if (atid->bar_wait) { + /* + * bar_unsuspend() expects bar_tx == 1, as it should be + * called from the TX completion path. This quietens + * the warning. It's cleared for us anyway. + */ + atid->bar_tx = 1; + ath_tx_tid_bar_unsuspend(sc, atid); + } ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]); /* There's no need to hold the TXQ lock here */ From owner-svn-src-head@FreeBSD.ORG Tue Jun 26 10:14: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 1A90F106566C; Tue, 26 Jun 2012 10:14:01 +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 675228FC0A; Tue, 26 Jun 2012 10:14:00 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:293b:9cd4:4eeb:59af] (unknown [IPv6:2001:7b8:3a7:0:293b:9cd4:4eeb:59af]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 61C145C59; Tue, 26 Jun 2012 12:13:52 +0200 (CEST) Message-ID: <4FE98B60.1020102@FreeBSD.org> Date: Tue, 26 Jun 2012 12:13:52 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120619 Thunderbird/14.0 MIME-Version: 1.0 To: Jung-uk Kim References: <201206220040.q5M0ejNk045397@svn.freebsd.org> <20120622095847.GC2337@deviant.kiev.zoral.com.ua> <4FE494FA.1030907@FreeBSD.org> <20120624181348.GA54897@jail.io> <4FE8DA2E.2060209@FreeBSD.org> In-Reply-To: <4FE8DA2E.2060209@FreeBSD.org> X-Enigmail-Version: 1.5a1pre Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Konstantin Belousov , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Ruslan Bukin Subject: Re: svn commit: r237412 - in head: sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/components/disa... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 26 Jun 2012 10:14:01 -0000 On 2012-06-25 23:37, Jung-uk Kim wrote: ... > I submitted this patch and I am waiting for confirmation: > > http://people.freebsd.org/~jkim/evxfgpe.diff I've tested your diff, and it made the panic disappear for me. Thanks! From owner-svn-src-head@FreeBSD.ORG Tue Jun 26 14:51: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 CE38E106564A; Tue, 26 Jun 2012 14:51:36 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A4598FC08; Tue, 26 Jun 2012 14:51: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 q5QEpaAZ046525; Tue, 26 Jun 2012 14:51:36 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5QEpaCA046515; Tue, 26 Jun 2012 14:51:36 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201206261451.q5QEpaCA046515@svn.freebsd.org> From: "Kenneth D. Merry" Date: Tue, 26 Jun 2012 14:51: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: r237601 - in head: share/examples/scsi_target sys/cam/ctl sys/dev/aic7xxx sys/dev/firewire sys/dev/mpt X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2012 14:51:36 -0000 Author: ken Date: Tue Jun 26 14:51:35 2012 New Revision: 237601 URL: http://svn.freebsd.org/changeset/base/237601 Log: Fix an issue that caused the kernel to panic inside CTL when trying to attach to target capable HBAs that implement the old immediate notify (XPT_IMMED_NOTIFY) and notify acknowledge (XPT_NOTIFY_ACK) CCBs. The new API has been in place since SVN change 196008 in 2009. The solution is two-fold: fix CTL to handle the responses from the HBAs, and convert the HBA drivers in question to use the new API. These drivers have not been tested with CTL, so how well they will interoperate with CTL is unknown. scsi_target.c: Update the userland target example code to use the new immediate notify API. scsi_ctl.c: Detect when an immediate notify CCB is returned with CAM_REQ_INVALID or CAM_PROVIDE_FAIL status, and just free it. Fix a duplicate assignment. aic79xx.c, aic79xx_osm.c: Update the aic79xx driver to use the new API. Target mode is not enabled on for this driver, so the changes will have no practical effect. aic7xxx.c, aic7xxx_osm.c: Update the aic7xxx driver to use the new API. sbp_targ.c: Update the firewire target code to work with the new API. mpt_cam.c: Update the mpt(4) driver to work with the new API. Target mode is only enabled for Fibre Channel mpt(4) devices. MFC after: 3 days Modified: head/share/examples/scsi_target/scsi_target.c head/sys/cam/ctl/scsi_ctl.c head/sys/dev/aic7xxx/aic79xx.c head/sys/dev/aic7xxx/aic79xx_osm.c head/sys/dev/aic7xxx/aic7xxx.c head/sys/dev/aic7xxx/aic7xxx_osm.c head/sys/dev/firewire/sbp_targ.c head/sys/dev/mpt/mpt_cam.c Modified: head/share/examples/scsi_target/scsi_target.c ============================================================================== --- head/share/examples/scsi_target/scsi_target.c Tue Jun 26 11:13:58 2012 (r237600) +++ head/share/examples/scsi_target/scsi_target.c Tue Jun 26 14:51:35 2012 (r237601) @@ -88,7 +88,7 @@ static void handle_read(void); /* static int work_atio(struct ccb_accept_tio *); */ static void queue_io(struct ccb_scsiio *); static int run_queue(struct ccb_accept_tio *); -static int work_inot(struct ccb_immed_notify *); +static int work_inot(struct ccb_immediate_notify *); static struct ccb_scsiio * get_ctio(void); /* static void free_ccb(union ccb *); */ @@ -387,7 +387,7 @@ init_ccbs() warn("malloc INOT"); return (-1); } - inot->ccb_h.func_code = XPT_IMMED_NOTIFY; + inot->ccb_h.func_code = XPT_IMMEDIATE_NOTIFY; send_ccb((union ccb *)inot, /*priority*/1); } @@ -495,8 +495,8 @@ request_loop() /* Start one more transfer. */ retval = work_atio(&ccb->atio); break; - case XPT_IMMED_NOTIFY: - retval = work_inot(&ccb->cin); + case XPT_IMMEDIATE_NOTIFY: + retval = work_inot(&ccb->cin1); break; default: warnx("Unhandled ccb type %#x on workq", @@ -651,7 +651,7 @@ work_atio(struct ccb_accept_tio *atio) warnx("ATIO with %u bytes sense received", atio->sense_len); } - sense = &atio->sense_data; + sense = (struct scsi_sense_data_fixed *)&atio->sense_data; tcmd_sense(ctio->init_id, ctio, sense->flags, sense->add_sense_code, sense->add_sense_code_qual); send_ccb((union ccb *)ctio, /*priority*/1); @@ -772,16 +772,14 @@ run_queue(struct ccb_accept_tio *atio) } static int -work_inot(struct ccb_immed_notify *inot) +work_inot(struct ccb_immediate_notify *inot) { cam_status status; - int sense; if (debug) warnx("Working on INOT %p", inot); status = inot->ccb_h.status; - sense = (status & CAM_AUTOSNS_VALID) != 0; status &= CAM_STATUS_MASK; switch (status) { @@ -794,7 +792,7 @@ work_inot(struct ccb_immed_notify *inot) abort_all_pending(); break; case CAM_MESSAGE_RECV: - switch (inot->message_args[0]) { + switch (inot->arg) { case MSG_TASK_COMPLETE: case MSG_INITIATOR_DET_ERR: case MSG_ABORT_TASK_SET: @@ -805,7 +803,7 @@ work_inot(struct ccb_immed_notify *inot) case MSG_ABORT_TASK: case MSG_CLEAR_TASK_SET: default: - warnx("INOT message %#x", inot->message_args[0]); + warnx("INOT message %#x", inot->arg); break; } break; @@ -817,17 +815,6 @@ work_inot(struct ccb_immed_notify *inot) break; } - /* If there is sense data, use it */ - if (sense != 0) { - struct scsi_sense_data_fixed *sense; - - sense = (struct scsi_sense_data_fixed *)&inot->sense_data; - tcmd_sense(inot->initiator_id, NULL, sense->flags, - sense->add_sense_code, sense->add_sense_code_qual); - if (debug) - warnx("INOT has sense: %#x", sense->flags); - } - /* Requeue on SIM */ TAILQ_REMOVE(&work_queue, &inot->ccb_h, periph_links.tqe); send_ccb((union ccb *)inot, /*priority*/1); Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Tue Jun 26 11:13:58 2012 (r237600) +++ head/sys/cam/ctl/scsi_ctl.c Tue Jun 26 14:51:35 2012 (r237601) @@ -558,7 +558,6 @@ ctlferegister(struct cam_periph *periph, TAILQ_INIT(&softc->work_queue); softc->periph = periph; - softc->parent_softc = bus_softc; callout_init_mtx(&softc->dma_callout, sim->mtx, /*flags*/ 0); periph->softc = softc; @@ -628,12 +627,22 @@ ctlferegister(struct cam_periph *periph, xpt_action(new_ccb); softc->inots_sent++; status = new_ccb->ccb_h.status; - if (status != CAM_REQ_INPROG) { - free(new_ccb, M_CTLFE); + if ((status & CAM_STATUS_MASK) != CAM_REQ_INPROG) { + /* + * Note that we don't free the CCB here. If the + * status is not CAM_REQ_INPROG, then we're + * probably talking to a SIM that says it is + * target-capable but doesn't support the + * XPT_IMMEDIATE_NOTIFY CCB. i.e. it supports the + * older API. In that case, it'll call xpt_done() + * on the CCB, and we need to free it in our done + * routine as a result. + */ break; } } - if (i == 0) { + if ((i == 0) + || (status != CAM_REQ_INPROG)) { xpt_print(periph->path, "%s: could not allocate immediate " "notify CCBs, status 0x%x\n", __func__, status); return (CAM_REQ_CMP_ERR); @@ -1460,12 +1469,29 @@ ctlfedone(struct cam_periph *periph, uni */ send_ctl_io = 0; break; + case CAM_REQ_INVALID: + case CAM_PROVIDE_FAIL: default: - xpt_print(periph->path, "%s: " - "unsupported CAM status 0x%x\n", - __func__, status); - send_ctl_io = 0; - break; + /* + * We should only get here if we're talking + * to a talking to a SIM that is target + * capable but supports the old API. In + * that case, we need to just free the CCB. + * If we actually send a notify acknowledge, + * it will send that back with an error as + * well. + */ + + if ((status != CAM_REQ_INVALID) + && (status != CAM_PROVIDE_FAIL)) + xpt_print(periph->path, "%s: " + "unsupported CAM status " + "0x%x\n", __func__, status); + + ctl_free_io(io); + ctlfe_free_ccb(periph, done_ccb); + + return; } if (send_ctl_io != 0) { ctl_queue(io); Modified: head/sys/dev/aic7xxx/aic79xx.c ============================================================================== --- head/sys/dev/aic7xxx/aic79xx.c Tue Jun 26 11:13:58 2012 (r237600) +++ head/sys/dev/aic7xxx/aic79xx.c Tue Jun 26 14:51:35 2012 (r237601) @@ -8561,7 +8561,7 @@ void ahd_send_lstate_events(struct ahd_softc *ahd, struct ahd_tmode_lstate *lstate) { struct ccb_hdr *ccbh; - struct ccb_immed_notify *inot; + struct ccb_immediate_notify *inot; while (lstate->event_r_idx != lstate->event_w_idx && (ccbh = SLIST_FIRST(&lstate->immed_notifies)) != NULL) { @@ -8569,19 +8569,18 @@ ahd_send_lstate_events(struct ahd_softc event = &lstate->event_buffer[lstate->event_r_idx]; SLIST_REMOVE_HEAD(&lstate->immed_notifies, sim_links.sle); - inot = (struct ccb_immed_notify *)ccbh; + inot = (struct ccb_immediate_notify *)ccbh; switch (event->event_type) { case EVENT_TYPE_BUS_RESET: ccbh->status = CAM_SCSI_BUS_RESET|CAM_DEV_QFRZN; break; default: ccbh->status = CAM_MESSAGE_RECV|CAM_DEV_QFRZN; - inot->message_args[0] = event->event_type; - inot->message_args[1] = event->event_arg; + inot->arg = event->event_type; + inot->seq_id = event->event_arg; break; } inot->initiator_id = event->initiator_id; - inot->sense_len = 0; xpt_done((union ccb *)inot); lstate->event_r_idx++; if (lstate->event_r_idx == AHD_TMODE_EVENT_BUFFER_SIZE) Modified: head/sys/dev/aic7xxx/aic79xx_osm.c ============================================================================== --- head/sys/dev/aic7xxx/aic79xx_osm.c Tue Jun 26 11:13:58 2012 (r237600) +++ head/sys/dev/aic7xxx/aic79xx_osm.c Tue Jun 26 14:51:35 2012 (r237601) @@ -601,8 +601,8 @@ ahd_action(struct cam_sim *sim, union cc break; } #ifdef AHD_TARGET_MODE - case XPT_NOTIFY_ACK: - case XPT_IMMED_NOTIFY: + case XPT_NOTIFY_ACKNOWLEDGE: + case XPT_IMMEDIATE_NOTIFY: { struct ahd_tmode_tstate *tstate; struct ahd_tmode_lstate *lstate; @@ -1189,7 +1189,7 @@ ahd_abort_ccb(struct ahd_softc *ahd, str switch (abort_ccb->ccb_h.func_code) { #ifdef AHD_TARGET_MODE case XPT_ACCEPT_TARGET_IO: - case XPT_IMMED_NOTIFY: + case XPT_IMMEDIATE_NOTIFY: case XPT_CONT_TARGET_IO: { struct ahd_tmode_tstate *tstate; @@ -1207,7 +1207,7 @@ ahd_abort_ccb(struct ahd_softc *ahd, str if (abort_ccb->ccb_h.func_code == XPT_ACCEPT_TARGET_IO) list = &lstate->accept_tios; - else if (abort_ccb->ccb_h.func_code == XPT_IMMED_NOTIFY) + else if (abort_ccb->ccb_h.func_code == XPT_IMMEDIATE_NOTIFY) list = &lstate->immed_notifies; else list = NULL; Modified: head/sys/dev/aic7xxx/aic7xxx.c ============================================================================== --- head/sys/dev/aic7xxx/aic7xxx.c Tue Jun 26 11:13:58 2012 (r237600) +++ head/sys/dev/aic7xxx/aic7xxx.c Tue Jun 26 14:51:35 2012 (r237601) @@ -6368,7 +6368,7 @@ void ahc_send_lstate_events(struct ahc_softc *ahc, struct ahc_tmode_lstate *lstate) { struct ccb_hdr *ccbh; - struct ccb_immed_notify *inot; + struct ccb_immediate_notify *inot; while (lstate->event_r_idx != lstate->event_w_idx && (ccbh = SLIST_FIRST(&lstate->immed_notifies)) != NULL) { @@ -6376,19 +6376,18 @@ ahc_send_lstate_events(struct ahc_softc event = &lstate->event_buffer[lstate->event_r_idx]; SLIST_REMOVE_HEAD(&lstate->immed_notifies, sim_links.sle); - inot = (struct ccb_immed_notify *)ccbh; + inot = (struct ccb_immediate_notify *)ccbh; switch (event->event_type) { case EVENT_TYPE_BUS_RESET: ccbh->status = CAM_SCSI_BUS_RESET|CAM_DEV_QFRZN; break; default: ccbh->status = CAM_MESSAGE_RECV|CAM_DEV_QFRZN; - inot->message_args[0] = event->event_type; - inot->message_args[1] = event->event_arg; + inot->arg = event->event_type; + inot->seq_id = event->event_arg; break; } inot->initiator_id = event->initiator_id; - inot->sense_len = 0; xpt_done((union ccb *)inot); lstate->event_r_idx++; if (lstate->event_r_idx == AHC_TMODE_EVENT_BUFFER_SIZE) Modified: head/sys/dev/aic7xxx/aic7xxx_osm.c ============================================================================== --- head/sys/dev/aic7xxx/aic7xxx_osm.c Tue Jun 26 11:13:58 2012 (r237600) +++ head/sys/dev/aic7xxx/aic7xxx_osm.c Tue Jun 26 14:51:35 2012 (r237601) @@ -568,8 +568,8 @@ ahc_action(struct cam_sim *sim, union cc } break; } - case XPT_NOTIFY_ACK: - case XPT_IMMED_NOTIFY: + case XPT_NOTIFY_ACKNOWLEDGE: + case XPT_IMMEDIATE_NOTIFY: { struct ahc_tmode_tstate *tstate; struct ahc_tmode_lstate *lstate; @@ -1248,7 +1248,7 @@ ahc_abort_ccb(struct ahc_softc *ahc, str abort_ccb = ccb->cab.abort_ccb; switch (abort_ccb->ccb_h.func_code) { case XPT_ACCEPT_TARGET_IO: - case XPT_IMMED_NOTIFY: + case XPT_IMMEDIATE_NOTIFY: case XPT_CONT_TARGET_IO: { struct ahc_tmode_tstate *tstate; @@ -1266,7 +1266,7 @@ ahc_abort_ccb(struct ahc_softc *ahc, str if (abort_ccb->ccb_h.func_code == XPT_ACCEPT_TARGET_IO) list = &lstate->accept_tios; - else if (abort_ccb->ccb_h.func_code == XPT_IMMED_NOTIFY) + else if (abort_ccb->ccb_h.func_code == XPT_IMMEDIATE_NOTIFY) list = &lstate->immed_notifies; else list = NULL; Modified: head/sys/dev/firewire/sbp_targ.c ============================================================================== --- head/sys/dev/firewire/sbp_targ.c Tue Jun 26 11:13:58 2012 (r237600) +++ head/sys/dev/firewire/sbp_targ.c Tue Jun 26 14:51:35 2012 (r237601) @@ -533,7 +533,7 @@ sbp_targ_send_lstate_events(struct sbp_t { #if 0 struct ccb_hdr *ccbh; - struct ccb_immed_notify *inot; + struct ccb_immediate_notify *inot; printf("%s: not implemented yet\n", __func__); #endif @@ -908,7 +908,7 @@ sbp_targ_abort_ccb(struct sbp_targ_softc if (accb->ccb_h.func_code == XPT_ACCEPT_TARGET_IO) list = &lstate->accept_tios; - else if (accb->ccb_h.func_code == XPT_IMMED_NOTIFY) + else if (accb->ccb_h.func_code == XPT_IMMEDIATE_NOTIFY) list = &lstate->immed_notifies; else return (CAM_UA_ABORT); @@ -1301,8 +1301,8 @@ sbp_targ_action1(struct cam_sim *sim, un } } break; - case XPT_NOTIFY_ACK: /* recycle notify ack */ - case XPT_IMMED_NOTIFY: /* Add Immediate Notify Resource */ + case XPT_NOTIFY_ACKNOWLEDGE: /* recycle notify ack */ + case XPT_IMMEDIATE_NOTIFY: /* Add Immediate Notify Resource */ if (status != CAM_REQ_CMP) { ccb->ccb_h.status = status; xpt_done(ccb); @@ -1349,7 +1349,7 @@ sbp_targ_action1(struct cam_sim *sim, un switch (accb->ccb_h.func_code) { case XPT_ACCEPT_TARGET_IO: - case XPT_IMMED_NOTIFY: + case XPT_IMMEDIATE_NOTIFY: ccb->ccb_h.status = sbp_targ_abort_ccb(sc, ccb); break; case XPT_CONT_TARGET_IO: Modified: head/sys/dev/mpt/mpt_cam.c ============================================================================== --- head/sys/dev/mpt/mpt_cam.c Tue Jun 26 11:13:58 2012 (r237600) +++ head/sys/dev/mpt/mpt_cam.c Tue Jun 26 14:51:35 2012 (r237601) @@ -3411,7 +3411,7 @@ mpt_action(struct cam_sim *sim, union cc CAMLOCK_2_MPTLOCK(mpt); switch (accb->ccb_h.func_code) { case XPT_ACCEPT_TARGET_IO: - case XPT_IMMED_NOTIFY: + case XPT_IMMEDIATE_NOTIFY: ccb->ccb_h.status = mpt_abort_target_ccb(mpt, ccb); break; case XPT_CONT_TARGET_IO: @@ -3785,8 +3785,8 @@ mpt_action(struct cam_sim *sim, union cc } break; } - case XPT_NOTIFY_ACK: /* recycle notify ack */ - case XPT_IMMED_NOTIFY: /* Add Immediate Notify Resource */ + case XPT_NOTIFY_ACKNOWLEDGE: /* recycle notify ack */ + case XPT_IMMEDIATE_NOTIFY: /* Add Immediate Notify Resource */ case XPT_ACCEPT_TARGET_IO: /* Add Accept Target IO Resource */ { tgt_resource_t *trtp; @@ -3813,7 +3813,7 @@ mpt_action(struct cam_sim *sim, union cc "Put FREE ATIO %p lun %d\n", ccb, lun); STAILQ_INSERT_TAIL(&trtp->atios, &ccb->ccb_h, sim_links.stqe); - } else if (ccb->ccb_h.func_code == XPT_IMMED_NOTIFY) { + } else if (ccb->ccb_h.func_code == XPT_IMMEDIATE_NOTIFY) { mpt_lprt(mpt, MPT_PRT_DEBUG1, "Put FREE INOT lun %d\n", lun); STAILQ_INSERT_TAIL(&trtp->inots, &ccb->ccb_h, @@ -4822,7 +4822,7 @@ mpt_abort_target_ccb(struct mpt_softc *m if (accb->ccb_h.func_code == XPT_ACCEPT_TARGET_IO) { lp = &trtp->atios; - } else if (accb->ccb_h.func_code == XPT_IMMED_NOTIFY) { + } else if (accb->ccb_h.func_code == XPT_IMMEDIATE_NOTIFY) { lp = &trtp->inots; } else { return (CAM_REQ_INVALID); @@ -5043,11 +5043,11 @@ static void mpt_scsi_tgt_tsk_mgmt(struct mpt_softc *mpt, request_t *req, mpt_task_mgmt_t fc, tgt_resource_t *trtp, int init_id) { - struct ccb_immed_notify *inot; + struct ccb_immediate_notify *inot; mpt_tgt_state_t *tgt; tgt = MPT_TGT_STATE(mpt, req); - inot = (struct ccb_immed_notify *) STAILQ_FIRST(&trtp->inots); + inot = (struct ccb_immediate_notify *) STAILQ_FIRST(&trtp->inots); if (inot == NULL) { mpt_lprt(mpt, MPT_PRT_WARN, "no INOTSs- sending back BSY\n"); mpt_scsi_tgt_status(mpt, NULL, req, SCSI_STATUS_BUSY, NULL); @@ -5057,35 +5057,35 @@ mpt_scsi_tgt_tsk_mgmt(struct mpt_softc * mpt_lprt(mpt, MPT_PRT_DEBUG1, "Get FREE INOT %p lun %d\n", inot, inot->ccb_h.target_lun); - memset(&inot->sense_data, 0, sizeof (inot->sense_data)); - inot->sense_len = 0; - memset(inot->message_args, 0, sizeof (inot->message_args)); inot->initiator_id = init_id; /* XXX */ - /* * This is a somewhat grotesque attempt to map from task management * to old style SCSI messages. God help us all. */ switch (fc) { case MPT_ABORT_TASK_SET: - inot->message_args[0] = MSG_ABORT_TAG; + inot->arg = MSG_ABORT_TAG; break; case MPT_CLEAR_TASK_SET: - inot->message_args[0] = MSG_CLEAR_TASK_SET; + inot->arg = MSG_CLEAR_TASK_SET; break; case MPT_TARGET_RESET: - inot->message_args[0] = MSG_TARGET_RESET; + inot->arg = MSG_TARGET_RESET; break; case MPT_CLEAR_ACA: - inot->message_args[0] = MSG_CLEAR_ACA; + inot->arg = MSG_CLEAR_ACA; break; case MPT_TERMINATE_TASK: - inot->message_args[0] = MSG_ABORT_TAG; + inot->arg = MSG_ABORT_TAG; break; default: - inot->message_args[0] = MSG_NOOP; + inot->arg = MSG_NOOP; break; } + /* + * XXX KDM we need the sequence/tag number for the target of the + * task management operation, especially if it is an abort. + */ tgt->ccb = (union ccb *) inot; inot->ccb_h.status = CAM_MESSAGE_RECV|CAM_DEV_QFRZN; MPTLOCK_2_CAMLOCK(mpt); From owner-svn-src-head@FreeBSD.ORG Tue Jun 26 16:45:19 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 12F981065676; Tue, 26 Jun 2012 16:45:19 +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 EA7A88FC08; Tue, 26 Jun 2012 16:45: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 q5QGjI19051359; Tue, 26 Jun 2012 16:45:18 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5QGjIa6051357; Tue, 26 Jun 2012 16:45:18 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201206261645.q5QGjIa6051357@svn.freebsd.org> From: Alan Cox Date: Tue, 26 Jun 2012 16:45: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: r237604 - head/sys/amd64/amd64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 26 Jun 2012 16:45:19 -0000 Author: alc Date: Tue Jun 26 16:45:18 2012 New Revision: 237604 URL: http://svn.freebsd.org/changeset/base/237604 Log: Introduce RELEASE_PV_LIST_LOCK(). Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Tue Jun 26 15:30:35 2012 (r237603) +++ head/sys/amd64/amd64/pmap.c Tue Jun 26 16:45:18 2012 (r237604) @@ -189,6 +189,15 @@ __FBSDID("$FreeBSD$"); #define CHANGE_PV_LIST_LOCK_TO_VM_PAGE(lockp, m) \ CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, VM_PAGE_TO_PHYS(m)) +#define RELEASE_PV_LIST_LOCK(lockp) do { \ + struct rwlock **_lockp = (lockp); \ + \ + if (*_lockp != NULL) { \ + rw_wunlock(*_lockp); \ + *_lockp = NULL; \ + } \ +} while (0) + #define VM_PAGE_TO_PV_LIST_LOCK(m) \ PHYS_TO_PV_LIST_LOCK(VM_PAGE_TO_PHYS(m)) @@ -1714,10 +1723,7 @@ _pmap_allocpte(pmap_t pmap, vm_pindex_t if ((m = vm_page_alloc(NULL, ptepindex, VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) { if (lockp != NULL) { - if (*lockp != NULL) { - rw_wunlock(*lockp); - *lockp = NULL; - } + RELEASE_PV_LIST_LOCK(lockp); PMAP_UNLOCK(pmap); rw_runlock(&pvh_global_lock); VM_WAIT; @@ -2133,10 +2139,7 @@ reclaim_pv_chunk(pmap_t locked_pmap, str pmap = pc->pc_pmap; /* Avoid deadlock and lock recursion. */ if (pmap > locked_pmap) { - if (*lockp != NULL) { - rw_wunlock(*lockp); - *lockp = NULL; - } + RELEASE_PV_LIST_LOCK(lockp); PMAP_LOCK(pmap); } else if (pmap != locked_pmap && !PMAP_TRYLOCK(pmap)) { From owner-svn-src-head@FreeBSD.ORG Tue Jun 26 18:08:04 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 A6CE2106566B; Tue, 26 Jun 2012 18:08:04 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 91E788FC19; Tue, 26 Jun 2012 18:08: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 q5QI84fW054765; Tue, 26 Jun 2012 18:08:04 GMT (envelope-from takawata@svn.freebsd.org) Received: (from takawata@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5QI84Ih054761; Tue, 26 Jun 2012 18:08:04 GMT (envelope-from takawata@svn.freebsd.org) Message-Id: <201206261808.q5QI84Ih054761@svn.freebsd.org> From: Takanori Watanabe Date: Tue, 26 Jun 2012 18:08: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: r237605 - in head/sys: dev/nand modules/nand X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 26 Jun 2012 18:08:04 -0000 Author: takawata Date: Tue Jun 26 18:08:03 2012 New Revision: 237605 URL: http://svn.freebsd.org/changeset/base/237605 Log: Add nand core module and module dependency information. Reviewed by:gber Added: head/sys/modules/nand/ head/sys/modules/nand/Makefile (contents, props changed) Modified: head/sys/dev/nand/nand.c head/sys/dev/nand/nandsim.c Modified: head/sys/dev/nand/nand.c ============================================================================== --- head/sys/dev/nand/nand.c Tue Jun 26 16:45:18 2012 (r237604) +++ head/sys/dev/nand/nand.c Tue Jun 26 18:08:03 2012 (r237605) @@ -830,3 +830,5 @@ nand_erase_blocks(struct nand_chip *chip return (err); } + +MODULE_VERSION(nand, 1); Modified: head/sys/dev/nand/nandsim.c ============================================================================== --- head/sys/dev/nand/nandsim.c Tue Jun 26 16:45:18 2012 (r237604) +++ head/sys/dev/nand/nandsim.c Tue Jun 26 18:08:03 2012 (r237605) @@ -663,3 +663,5 @@ nandsim_modevent(module_t mod __unused, DEV_MODULE(nandsim, nandsim_modevent, NULL); MODULE_VERSION(nandsim, 1); +MODULE_DEPEND(nandsim, nand, 1, 1, 1); +MODULE_DEPEND(nandsim, alq, 1, 1, 1); Added: head/sys/modules/nand/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/nand/Makefile Tue Jun 26 18:08:03 2012 (r237605) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../dev/nand + +KMOD = nand +SRCS= nand.c nand_bbt.c nand_cdev.c nand_generic.c nand_geom.c \ + nand_id.c nandbus.c nandbus_if.c nand_if.c nfc_if.c \ + nand_if.h device_if.h bus_if.h nfc_if.h nandbus_if.h + +MFILES= kern/bus_if.m kern/device_if.m dev/nand/nfc_if.m \ + dev/nand/nand_if.m dev/nand/nandbus_if.m + +.include From owner-svn-src-head@FreeBSD.ORG Tue Jun 26 21:14: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 C98C1106564A; Tue, 26 Jun 2012 21:14:53 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 3097A8FC1A; Tue, 26 Jun 2012 21:14:53 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id q5QLEjpp066251; Tue, 26 Jun 2012 23:14:45 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id q5QLEjT7066250; Tue, 26 Jun 2012 23:14:45 +0200 (CEST) (envelope-from marius) Date: Tue, 26 Jun 2012 23:14:45 +0200 From: Marius Strobl To: John Baldwin Message-ID: <20120626211445.GB63893@alchemy.franken.de> References: <201206131504.q5DF4opt031336@svn.freebsd.org> <201206251000.09052.jhb@freebsd.org> <20120625170811.GI69382@alchemy.franken.de> <201206251424.24621.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201206251424.24621.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237008 - head/sys/dev/pci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2012 21:14:53 -0000 On Mon, Jun 25, 2012 at 02:24:24PM -0400, John Baldwin wrote: > On Monday, June 25, 2012 1:08:11 pm Marius Strobl wrote: > > On Mon, Jun 25, 2012 at 10:00:08AM -0400, John Baldwin wrote: > > > On Saturday, June 23, 2012 6:16:26 pm Marius Strobl wrote: > > > > On Wed, Jun 13, 2012 at 03:04:50PM +0000, John Baldwin wrote: > > > > > Author: jhb > > > > > Date: Wed Jun 13 15:04:50 2012 > > > > > New Revision: 237008 > > > > > URL: http://svn.freebsd.org/changeset/base/237008 > > > > > > > > > > Log: > > > > > Fix a couple of bugs that prevented windows in PCI-PCI bridges from > > > > > growing "downward" (moving the start address down). First, an off by > > > > > one error caused the end address to be moved down an extra alignment > > > > > chunk unnecessarily. Second, when aligning the new candidate starting > > > > > address, the wrong bits were masked off. > > > > > > > > > > > > > Unfortunately, this now panics a sparc64 machine on the first attempt > > > > to use a grown resource via bus_space(9) for me: > > > > pcib3: at device 0.0 on pci2 > > > > pcib2: allocated I/O port range (0x1000-0x1fff) for rid 1c of pcib3 > > > > pcib2: allocated memory range (0x200000-0x3ffffff) for rid 20 of pcib3 > > > > pcib3: domain 0 > > > > pcib3: secondary bus 5 > > > > pcib3: subordinate bus 5 > > > > pcib3: I/O decode 0x1000-0x1fff > > > > pcib3: memory decode 0x200000-0x3ffffff > > > > pcib3: no prefetched decode > > > > pcib3: Subtractively decoded bridge. > > > > <...> > > > > pci3: on pcib3 > > > > <...> > > > > isab0: at device 30.0 on pci3 > > > > isa0: on isab0 > > > > <...> > > > > rtc0: at port 0x70-0x73 on isa0 > > > > pcib3: attempting to grow I/O port window for (0x70-0x73,0x4) > > > > front candidate range: 0x70-0x73 > > > > pcib3: grew I/O port window to 0x70-0x1fff > > > > panic: start address is not aligned > > > > Alternatively, this may also be a data access trap, which also indicates > > > > that some invalid address being used for the access. > > > > > > I think this was fixed in the next commit to this file (I had gotten the > > > mask bits on 'front' wrong). Yes, it should be fixed by r237271: > > > > > > Old version: > > > > > > (gdb) p/x (0x70 & (~(1ul << 12) - 1)) > > > $1 = 0x70 > > > > > > Fixed version: > > > > > > (gdb) p/x (0x70 & (~((1ul << 12) - 1))) > > > $2 = 0x0 > > > > Well, a stock r237433 still panics with a data access trap when > > trying to use the resource via bus_space(9). So while the math for > > growing the window is probably right now, there still is a problem. > > Hmm. It would be interesting to know if it used to grow before (it might > not have due to the bugs I fixed in the growing code). Prior to r237008 growing was attempted but failed due to the bug. See the "before:" snippet in my original email. > > > > > > > > before: > > > > rtc0: at port 0x70-0x73 on isa0 > > > > pcib3: attempting to grow I/O port window for (0x70-0x73,0x4) > > > > pcib2: allocated I/O port range (0x70-0x73) for rid 0 of rtc0 > > > > > > > > Shouldn't a subtractively decoded resource actually be outside of > > > > the window of the parent PCI-PCI bridge, i.e. it seems we shouldn't > > > > try to grow the window in that case? The below patch fixes this for > > > > me, I'm not sure whether that actually is the right approach though. > > > > > > Well, I've seen subtractive bridges with programmed windows, and the resource > > > will decode properly either way. What the current code does is allow the > > > request to pass up the tree if growing fails. > > > > By growing the window to 0x0-0x1fff in this case we are effectively > > turning the formerly subtractively decoded resource in a positively > > decodeded one. Maybe there's some additional bit, probably in the > > PCI-ISA bridge, that needs to be switch for that, too? In any case, > > growing the window in this case and by that changing the type of > > decoding seems like a strange approach to me. Why do subtractive > > decoders exist in the first place when the windows alternatively > > could be grown/set up to only just do positive decoding instead? > > The PCI-ISA bridge should already be decoding that range. Note that > subtractive decoding is slower (it has to wait for an extra cycle to > give other devices a chance to snag a request). I would not mind a > tunable to control growing or not growing a window on a subtractively > decoded bridge. Does the firmware assign a window to this bridge > btw? We probably should not allocate a new window for a subtractively > decoded bridge, but if the firmware has already assigned a window, > growing an existing window seems less problematic. > Yes, it does but switching to positive decoding nevertheless is problematic in this case. According to the PCI 2.3 specification, a child wanting its addresses to be decoded subtractively needs to provide special DEVSEL# behavior. It seems that it should work for a bridge to actually positively decoding such transactions, but I'm not familiar with the physical layer of PCI and thus not sure. On the other hand, both the PCI-ISA and PCI-PCI bridges in question are ALi/ULi crap and based on fun I had with their chips in the past, I also wouldn't be surprised their again being a magic bit in the configuration space needing to be set to make this work. Unfortunately, I don't have a datasheet for this M5249 PCI-PCI bridge. If we'd implement a tunable for changing the decoding of subtractive bridges, the way to go would seem to be to have it off by default in order to preserve pre-NEW_PCIB/ r237008 as at this time it's unknown how many bridges are affected. If you'd want to keep the new/current behavior by default, introducing something like a PCIB_SUBTRACTIVE_FORCED flag along a PCI_QUIRK_SUB_FORCED quirk in addition to a tuneable defaulting to on probably would be a good idea. From owner-svn-src-head@FreeBSD.ORG Tue Jun 26 22:16: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 D7063106564A; Tue, 26 Jun 2012 22:16: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 BEF648FC08; Tue, 26 Jun 2012 22:16: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 q5QMGrZZ065418; Tue, 26 Jun 2012 22:16:53 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5QMGrTc065408; Tue, 26 Jun 2012 22:16:53 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201206262216.q5QMGrTc065408@svn.freebsd.org> From: Adrian Chadd Date: Tue, 26 Jun 2012 22:16: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: r237611 - in head/sys/dev/ath: . ath_hal ath_hal/ar5416 ath_hal/ar9002 ath_hal/ar9003 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 26 Jun 2012 22:16:54 -0000 Author: adrian Date: Tue Jun 26 22:16:53 2012 New Revision: 237611 URL: http://svn.freebsd.org/changeset/base/237611 Log: Bring over the initial 802.11n bluetooth coexistence support code. The Linux ath9k btcoex code is based off of this code. Note this doesn't actually implement functional btcoex; there's some driver glue and a whole lot of verification that is required. On the other hand, I do have the AR9285+BT and AR9287+BT NICs which this code supports.. Obtained from: Qualcomm Atheros, Linux ath9k Added: head/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.c (contents, props changed) head/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.h (contents, props changed) head/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c (contents, props changed) head/sys/dev/ath/ath_hal/ar9003/ar9300_btcoex.h (contents, props changed) Modified: head/sys/dev/ath/ath_hal/ah.h head/sys/dev/ath/ath_hal/ar5416/ar5416.h head/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c head/sys/dev/ath/ath_hal/ar9002/ar9285.h head/sys/dev/ath/if_ath_led.c Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Tue Jun 26 21:45:47 2012 (r237610) +++ head/sys/dev/ath/ath_hal/ah.h Tue Jun 26 22:16:53 2012 (r237611) @@ -421,13 +421,13 @@ typedef enum { } HAL_INT; typedef enum { - HAL_GPIO_MUX_OUTPUT = 0, - HAL_GPIO_MUX_PCIE_ATTENTION_LED = 1, - HAL_GPIO_MUX_PCIE_POWER_LED = 2, - HAL_GPIO_MUX_TX_FRAME = 3, - HAL_GPIO_MUX_RX_CLEAR_EXTERNAL = 4, - HAL_GPIO_MUX_MAC_NETWORK_LED = 5, - HAL_GPIO_MUX_MAC_POWER_LED = 6 + HAL_GPIO_OUTPUT_MUX_AS_OUTPUT = 0, + HAL_GPIO_OUTPUT_MUX_PCIE_ATTENTION_LED = 1, + HAL_GPIO_OUTPUT_MUX_PCIE_POWER_LED = 2, + HAL_GPIO_OUTPUT_MUX_MAC_NETWORK_LED = 3, + HAL_GPIO_OUTPUT_MUX_MAC_POWER_LED = 4, + HAL_GPIO_OUTPUT_MUX_AS_WLAN_ACTIVE = 5, + HAL_GPIO_OUTPUT_MUX_AS_TX_FRAME = 6 } HAL_GPIO_MUX_TYPE; typedef enum { @@ -777,6 +777,139 @@ struct hal_dfs_event { }; typedef struct hal_dfs_event HAL_DFS_EVENT; +/* + * BT Co-existence definitions + */ +typedef enum { + HAL_BT_MODULE_CSR_BC4 = 0, /* CSR BlueCore v4 */ + HAL_BT_MODULE_JANUS = 1, /* Kite + Valkyrie combo */ + HAL_BT_MODULE_HELIUS = 2, /* Kiwi + Valkyrie combo */ + HAL_MAX_BT_MODULES +} HAL_BT_MODULE; + +typedef struct { + HAL_BT_MODULE bt_module; + u_int8_t bt_coex_config; + u_int8_t bt_gpio_bt_active; + u_int8_t bt_gpio_bt_priority; + u_int8_t bt_gpio_wlan_active; + u_int8_t bt_active_polarity; + HAL_BOOL bt_single_ant; + u_int8_t bt_dutyCycle; + u_int8_t bt_isolation; + u_int8_t bt_period; +} HAL_BT_COEX_INFO; + +typedef enum { + HAL_BT_COEX_MODE_LEGACY = 0, /* legacy rx_clear mode */ + HAL_BT_COEX_MODE_UNSLOTTED = 1, /* untimed/unslotted mode */ + HAL_BT_COEX_MODE_SLOTTED = 2, /* slotted mode */ + HAL_BT_COEX_MODE_DISALBED = 3, /* coexistence disabled */ +} HAL_BT_COEX_MODE; + +typedef enum { + HAL_BT_COEX_CFG_NONE, /* No bt coex enabled */ + HAL_BT_COEX_CFG_2WIRE_2CH, /* 2-wire with 2 chains */ + HAL_BT_COEX_CFG_2WIRE_CH1, /* 2-wire with ch1 */ + HAL_BT_COEX_CFG_2WIRE_CH0, /* 2-wire with ch0 */ + HAL_BT_COEX_CFG_3WIRE, /* 3-wire */ + HAL_BT_COEX_CFG_MCI /* MCI */ +} HAL_BT_COEX_CFG; + +typedef enum { + HAL_BT_COEX_SET_ACK_PWR = 0, /* Change ACK power setting */ + HAL_BT_COEX_LOWER_TX_PWR, /* Change transmit power */ + HAL_BT_COEX_ANTENNA_DIVERSITY, /* Enable RX diversity for Kite */ +} HAL_BT_COEX_SET_PARAMETER; + +#define HAL_BT_COEX_FLAG_LOW_ACK_PWR 0x00000001 +#define HAL_BT_COEX_FLAG_LOWER_TX_PWR 0x00000002 +/* Check Rx Diversity is allowed */ +#define HAL_BT_COEX_FLAG_ANT_DIV_ALLOW 0x00000004 +/* Check Diversity is on or off */ +#define HAL_BT_COEX_FLAG_ANT_DIV_ENABLE 0x00000008 + +#define HAL_BT_COEX_ANTDIV_CONTROL1_ENABLE 0x0b +/* main: LNA1, alt: LNA2 */ +#define HAL_BT_COEX_ANTDIV_CONTROL2_ENABLE 0x09 +#define HAL_BT_COEX_ANTDIV_CONTROL1_FIXED_A 0x04 +#define HAL_BT_COEX_ANTDIV_CONTROL2_FIXED_A 0x09 +#define HAL_BT_COEX_ANTDIV_CONTROL1_FIXED_B 0x02 +#define HAL_BT_COEX_ANTDIV_CONTROL2_FIXED_B 0x06 + +#define HAL_BT_COEX_ISOLATION_FOR_NO_COEX 30 + +#define HAL_BT_COEX_ANT_DIV_SWITCH_COM 0x66666666 + +#define HAL_BT_COEX_HELIUS_CHAINMASK 0x02 + +#define HAL_BT_COEX_LOW_ACK_POWER 0x0 +#define HAL_BT_COEX_HIGH_ACK_POWER 0x3f3f3f + +typedef enum { + HAL_BT_COEX_NO_STOMP = 0, + HAL_BT_COEX_STOMP_ALL, + HAL_BT_COEX_STOMP_LOW, + HAL_BT_COEX_STOMP_NONE, + HAL_BT_COEX_STOMP_ALL_FORCE, + HAL_BT_COEX_STOMP_LOW_FORCE, +} HAL_BT_COEX_STOMP_TYPE; + +typedef struct { + /* extend rx_clear after tx/rx to protect the burst (in usec). */ + u_int8_t bt_time_extend; + + /* + * extend rx_clear as long as txsm is + * transmitting or waiting for ack. + */ + HAL_BOOL bt_txstate_extend; + + /* + * extend rx_clear so that when tx_frame + * is asserted, rx_clear will drop. + */ + HAL_BOOL bt_txframe_extend; + + /* + * coexistence mode + */ + HAL_BT_COEX_MODE bt_mode; + + /* + * treat BT high priority traffic as + * a quiet collision + */ + HAL_BOOL bt_quiet_collision; + + /* + * invert rx_clear as WLAN_ACTIVE + */ + HAL_BOOL bt_rxclear_polarity; + + /* + * slotted mode only. indicate the time in usec + * from the rising edge of BT_ACTIVE to the time + * BT_PRIORITY can be sampled to indicate priority. + */ + u_int8_t bt_priority_time; + + /* + * slotted mode only. indicate the time in usec + * from the rising edge of BT_ACTIVE to the time + * BT_PRIORITY can be sampled to indicate tx/rx and + * BT_FREQ is sampled. + */ + u_int8_t bt_first_slot_time; + + /* + * slotted mode only. rx_clear and bt_ant decision + * will be held the entire time that BT_ACTIVE is asserted, + * otherwise the decision is made before every slot boundry. + */ + HAL_BOOL bt_hold_rxclear; +} HAL_BT_COEX_CONFIG; + typedef struct { int ah_debug; /* only used if AH_DEBUG is defined */ Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416.h Tue Jun 26 21:45:47 2012 (r237610) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416.h Tue Jun 26 22:16:53 2012 (r237611) @@ -132,6 +132,28 @@ struct ath_hal_5416 { int initPDADC; int ah_need_an_top2_fixup; /* merlin or later chips that may need this workaround */ + + /* + * Bluetooth coexistence static setup according to the registry + */ + HAL_BT_MODULE ah_btModule; /* Bluetooth module identifier */ + uint8_t ah_btCoexConfigType; /* BT coex configuration */ + uint8_t ah_btActiveGpioSelect; /* GPIO pin for BT_ACTIVE */ + uint8_t ah_btPriorityGpioSelect; /* GPIO pin for BT_PRIORITY */ + uint8_t ah_wlanActiveGpioSelect; /* GPIO pin for WLAN_ACTIVE */ + uint8_t ah_btActivePolarity; /* Polarity of BT_ACTIVE */ + HAL_BOOL ah_btCoexSingleAnt; /* Single or dual antenna configuration */ + uint8_t ah_btWlanIsolation; /* Isolation between BT and WLAN in dB */ + + /* + * Bluetooth coexistence runtime settings + */ + HAL_BOOL ah_btCoexEnabled; /* If Bluetooth coexistence is enabled */ + uint32_t ah_btCoexMode; /* Register setting for AR_BT_COEX_MODE */ + uint32_t ah_btCoexBTWeight; /* Register setting for AR_BT_COEX_WEIGHT */ + uint32_t ah_btCoexWLANWeight; /* Register setting for AR_BT_COEX_WEIGHT */ + uint32_t ah_btCoexMode2; /* Register setting for AR_BT_COEX_MODE2 */ + uint32_t ah_btCoexFlag; /* Special tuning flags for BT coex */ }; #define AH5416(_ah) ((struct ath_hal_5416 *)(_ah)) @@ -173,6 +195,21 @@ extern void ar5416SetStaBeaconTimers(str const HAL_BEACON_STATE *); extern uint64_t ar5416GetNextTBTT(struct ath_hal *); +/* ar5416_btcoex.c */ +extern void ar5416SetBTCoexInfo(struct ath_hal *ah, + HAL_BT_COEX_INFO *btinfo); +extern void ar5416BTCoexConfig(struct ath_hal *ah, + HAL_BT_COEX_CONFIG *btconf); +extern void ar5416BTCoexSetQcuThresh(struct ath_hal *ah, int qnum); +extern void ar5416BTCoexSetWeights(struct ath_hal *ah, uint32_t stompType); +extern void ar5416BTCoexSetupBmissThresh(struct ath_hal *ah, + uint32_t thresh); +extern void ar5416BTCoexSetParameter(struct ath_hal *ah, uint32_t type, + uint32_t value); +extern void ar5416BTCoexDisable(struct ath_hal *ah); +extern int ar5416BTCoexEnable(struct ath_hal *ah); +extern void ar5416InitBTCoex(struct ath_hal *ah); + extern HAL_BOOL ar5416EepromRead(struct ath_hal *, u_int off, uint16_t *data); extern HAL_BOOL ar5416EepromWrite(struct ath_hal *, u_int off, uint16_t data); Added: head/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.c Tue Jun 26 22:16:53 2012 (r237611) @@ -0,0 +1,385 @@ +/* + * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2005 Atheros Communications, Inc. + * Copyright (c) 2008-2010, Atheros Communications Inc. + * + * Permission to use, copy, modify, and/or 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. + * + * $FreeBSD$ + */ + +#include "opt_ah.h" + +#include "ah.h" +#include "ah_internal.h" +#include "ah_devid.h" +#ifdef AH_DEBUG +#include "ah_desc.h" /* NB: for HAL_PHYERR* */ +#endif + +#include "ar5416/ar5416.h" +#include "ar5416/ar5416reg.h" +#include "ar5416/ar5416phy.h" +#include "ar5416/ar5416desc.h" /* AR5416_CONTTXMODE */ +#include "ar5416/ar5416_btcoex.h" + +void +ar5416SetBTCoexInfo(struct ath_hal *ah, HAL_BT_COEX_INFO *btinfo) +{ + struct ath_hal_5416 *ahp = AH5416(ah); + + ahp->ah_btModule = btinfo->bt_module; + ahp->ah_btCoexConfigType = btinfo->bt_coex_config; + ahp->ah_btActiveGpioSelect = btinfo->bt_gpio_bt_active; + ahp->ah_btPriorityGpioSelect = btinfo->bt_gpio_bt_priority; + ahp->ah_wlanActiveGpioSelect = btinfo->bt_gpio_wlan_active; + ahp->ah_btActivePolarity = btinfo->bt_active_polarity; + ahp->ah_btCoexSingleAnt = btinfo->bt_single_ant; + ahp->ah_btWlanIsolation = btinfo->bt_isolation; +} + +void +ar5416BTCoexConfig(struct ath_hal *ah, HAL_BT_COEX_CONFIG *btconf) +{ + struct ath_hal_5416 *ahp = AH5416(ah); + HAL_BOOL rxClearPolarity = btconf->bt_rxclear_polarity; + + /* + * For Kiwi and Osprey, the polarity of rx_clear is active high. + * The bt_rxclear_polarity flag from ath(4) needs to be inverted. + */ + if (AR_SREV_KIWI(ah)) { + rxClearPolarity = !btconf->bt_rxclear_polarity; + } + + ahp->ah_btCoexMode = (ahp->ah_btCoexMode & AR_BT_QCU_THRESH) | + SM(btconf->bt_time_extend, AR_BT_TIME_EXTEND) | + SM(btconf->bt_txstate_extend, AR_BT_TXSTATE_EXTEND) | + SM(btconf->bt_txframe_extend, AR_BT_TX_FRAME_EXTEND) | + SM(btconf->bt_mode, AR_BT_MODE) | + SM(btconf->bt_quiet_collision, AR_BT_QUIET) | + SM(rxClearPolarity, AR_BT_RX_CLEAR_POLARITY) | + SM(btconf->bt_priority_time, AR_BT_PRIORITY_TIME) | + SM(btconf->bt_first_slot_time, AR_BT_FIRST_SLOT_TIME); + + ahp->ah_btCoexMode2 |= SM(btconf->bt_hold_rxclear, + AR_BT_HOLD_RX_CLEAR); + + if (ahp->ah_btCoexSingleAnt == AH_FALSE) { + /* Enable ACK to go out even though BT has higher priority. */ + ahp->ah_btCoexMode2 |= AR_BT_DISABLE_BT_ANT; + } +} + +void +ar5416BTCoexSetQcuThresh(struct ath_hal *ah, int qnum) +{ + struct ath_hal_5416 *ahp = AH5416(ah); + + ahp->ah_btCoexMode |= SM(qnum, AR_BT_QCU_THRESH); +} + +void +ar5416BTCoexSetWeights(struct ath_hal *ah, u_int32_t stompType) +{ + struct ath_hal_5416 *ahp = AH5416(ah); + + if (AR_SREV_KIWI_10_OR_LATER(ah)) { + /* TODO: TX RX seperate is not enabled. */ + switch (stompType) { + case HAL_BT_COEX_STOMP_ALL: + ahp->ah_btCoexBTWeight = AR5416_BT_WGHT; + ahp->ah_btCoexWLANWeight = AR5416_STOMP_ALL_WLAN_WGHT; + break; + case HAL_BT_COEX_STOMP_LOW: + ahp->ah_btCoexBTWeight = AR5416_BT_WGHT; + ahp->ah_btCoexWLANWeight = AR5416_STOMP_LOW_WLAN_WGHT; + break; + case HAL_BT_COEX_STOMP_ALL_FORCE: + ahp->ah_btCoexBTWeight = AR5416_BT_WGHT; + ahp->ah_btCoexWLANWeight = + AR5416_STOMP_ALL_FORCE_WLAN_WGHT; + break; + case HAL_BT_COEX_STOMP_LOW_FORCE: + ahp->ah_btCoexBTWeight = AR5416_BT_WGHT; + ahp->ah_btCoexWLANWeight = + AR5416_STOMP_LOW_FORCE_WLAN_WGHT; + break; + case HAL_BT_COEX_STOMP_NONE: + case HAL_BT_COEX_NO_STOMP: + ahp->ah_btCoexBTWeight = AR5416_BT_WGHT; + ahp->ah_btCoexWLANWeight = AR5416_STOMP_NONE_WLAN_WGHT; + break; + default: + /* There is a forceWeight from registry */ + ahp->ah_btCoexBTWeight = stompType & 0xffff; + ahp->ah_btCoexWLANWeight = stompType >> 16; + break; + } + } else { + switch (stompType) { + case HAL_BT_COEX_STOMP_ALL: + ahp->ah_btCoexBTWeight = AR5416_BT_WGHT; + ahp->ah_btCoexWLANWeight = AR5416_STOMP_ALL_WLAN_WGHT; + break; + case HAL_BT_COEX_STOMP_LOW: + ahp->ah_btCoexBTWeight = AR5416_BT_WGHT; + ahp->ah_btCoexWLANWeight = AR5416_STOMP_LOW_WLAN_WGHT; + break; + case HAL_BT_COEX_STOMP_ALL_FORCE: + ahp->ah_btCoexBTWeight = AR5416_BT_WGHT; + ahp->ah_btCoexWLANWeight = + AR5416_STOMP_ALL_FORCE_WLAN_WGHT; + break; + case HAL_BT_COEX_STOMP_LOW_FORCE: + ahp->ah_btCoexBTWeight = AR5416_BT_WGHT; + ahp->ah_btCoexWLANWeight = + AR5416_STOMP_LOW_FORCE_WLAN_WGHT; + break; + case HAL_BT_COEX_STOMP_NONE: + case HAL_BT_COEX_NO_STOMP: + ahp->ah_btCoexBTWeight = AR5416_BT_WGHT; + ahp->ah_btCoexWLANWeight = AR5416_STOMP_NONE_WLAN_WGHT; + break; + default: + /* There is a forceWeight from registry */ + ahp->ah_btCoexBTWeight = stompType & 0xffff; + ahp->ah_btCoexWLANWeight = stompType >> 16; + break; + } + } +} + +void +ar5416BTCoexSetupBmissThresh(struct ath_hal *ah, u_int32_t thresh) +{ + struct ath_hal_5416 *ahp = AH5416(ah); + + ahp->ah_btCoexMode2 |= SM(thresh, AR_BT_BCN_MISS_THRESH); +} + +/* + * There is no antenna diversity for Owl, Kiwi, etc. + * + * Kite will override this particular method. + */ +static void +ar5416BTCoexAntennaDiversity(struct ath_hal *ah) +{ +} + +void +ar5416BTCoexSetParameter(struct ath_hal *ah, u_int32_t type, u_int32_t value) +{ + struct ath_hal_5416 *ahp = AH5416(ah); + + switch (type) { + case HAL_BT_COEX_SET_ACK_PWR: + if (value) { + ahp->ah_btCoexFlag |= HAL_BT_COEX_FLAG_LOW_ACK_PWR; + OS_REG_WRITE(ah, AR_TPC, HAL_BT_COEX_LOW_ACK_POWER); + } else { + ahp->ah_btCoexFlag &= ~HAL_BT_COEX_FLAG_LOW_ACK_PWR; + OS_REG_WRITE(ah, AR_TPC, HAL_BT_COEX_HIGH_ACK_POWER); + } + break; + case HAL_BT_COEX_ANTENNA_DIVERSITY: + /* This is overridden for Kite */ + break; +#if 0 + case HAL_BT_COEX_LOWER_TX_PWR: + if (value) { + if ((ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_LOWER_TX_PWR) == 0) { + ahp->ah_btCoexFlag |= HAL_BT_COEX_FLAG_LOWER_TX_PWR; + AH_PRIVATE(ah)->ah_config.ath_hal_desc_tpc = 1; + ar5416SetTxPowerLimit(ah, AH_PRIVATE(ah)->ah_power_limit, AH_PRIVATE(ah)->ah_extra_txpow, 0); + } + } + else { + if (ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_LOWER_TX_PWR) { + ahp->ah_btCoexFlag &= ~HAL_BT_COEX_FLAG_LOWER_TX_PWR; + AH_PRIVATE(ah)->ah_config.ath_hal_desc_tpc = 0; + ar5416SetTxPowerLimit(ah, AH_PRIVATE(ah)->ah_power_limit, AH_PRIVATE(ah)->ah_extra_txpow, 0); + } + } + break; +#endif + default: + break; + } +} + +void +ar5416BTCoexDisable(struct ath_hal *ah) +{ + struct ath_hal_5416 *ahp = AH5416(ah); + + /* Always drive rx_clear_external output as 0 */ + ar5416GpioSet(ah, ahp->ah_wlanActiveGpioSelect, 0); + ar5416GpioCfgOutput(ah, ahp->ah_wlanActiveGpioSelect, + HAL_GPIO_OUTPUT_MUX_AS_OUTPUT); + + if (AR_SREV_9271(ah)) { + /* + * Set wlanActiveGpio to input when disabling BT-COEX to + * reduce power consumption + */ + ar5416GpioCfgInput(ah, ahp->ah_wlanActiveGpioSelect); + } + + if (ahp->ah_btCoexSingleAnt == AH_TRUE) { + OS_REG_RMW_FIELD(ah, AR_QUIET1, AR_QUIET1_QUIET_ACK_CTS_ENABLE, + 1); + OS_REG_RMW_FIELD(ah, AR_MISC_MODE, AR_PCU_BT_ANT_PREVENT_RX, + 0); + } + + OS_REG_WRITE(ah, AR_BT_COEX_MODE, AR_BT_QUIET | AR_BT_MODE); + OS_REG_WRITE(ah, AR_BT_COEX_WEIGHT, 0); + if (AR_SREV_KIWI_10_OR_LATER(ah)) + OS_REG_WRITE(ah, AR_BT_COEX_WEIGHT2, 0); + OS_REG_WRITE(ah, AR_BT_COEX_MODE2, 0); + + ahp->ah_btCoexEnabled = AH_FALSE; +} + +int +ar5416BTCoexEnable(struct ath_hal *ah) +{ + struct ath_hal_5416 *ahp = AH5416(ah); + + /* Program coex mode and weight registers to actually enable coex */ + OS_REG_WRITE(ah, AR_BT_COEX_MODE, ahp->ah_btCoexMode); + OS_REG_WRITE(ah, AR_BT_COEX_WEIGHT, + SM(ahp->ah_btCoexWLANWeight & 0xFFFF, AR_BT_WL_WGHT) | + SM(ahp->ah_btCoexBTWeight & 0xFFFF, AR_BT_BT_WGHT)); + if (AR_SREV_KIWI_10_OR_LATER(ah)) { + OS_REG_WRITE(ah, AR_BT_COEX_WEIGHT2, + SM(ahp->ah_btCoexWLANWeight >> 16, AR_BT_WL_WGHT)); + } + OS_REG_WRITE(ah, AR_BT_COEX_MODE2, ahp->ah_btCoexMode2); + +#if 0 + /* Added Select GPIO5~8 instaed SPI */ + if (AR_SREV_9271(ah)) { + val = OS_REG_READ(ah, AR9271_CLOCK_CONTROL); + val &= 0xFFFFFEFF; + OS_REG_WRITE(ah, AR9271_CLOCK_CONTROL, val); + } +#endif + + if (ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_LOW_ACK_PWR) + OS_REG_WRITE(ah, AR_TPC, HAL_BT_COEX_LOW_ACK_POWER); + else + OS_REG_WRITE(ah, AR_TPC, HAL_BT_COEX_HIGH_ACK_POWER); + + if (ahp->ah_btCoexSingleAnt == AH_TRUE) { + OS_REG_RMW_FIELD(ah, AR_QUIET1, + AR_QUIET1_QUIET_ACK_CTS_ENABLE, 1); + /* XXX should update miscMode? */ + OS_REG_RMW_FIELD(ah, AR_MISC_MODE, + AR_PCU_BT_ANT_PREVENT_RX, 1); + } else { + OS_REG_RMW_FIELD(ah, AR_QUIET1, + AR_QUIET1_QUIET_ACK_CTS_ENABLE, 1); + /* XXX should update miscMode? */ + OS_REG_RMW_FIELD(ah, AR_MISC_MODE, + AR_PCU_BT_ANT_PREVENT_RX, 0); + } + + if (ahp->ah_btCoexConfigType == HAL_BT_COEX_CFG_3WIRE) { + /* For 3-wire, configure the desired GPIO port for rx_clear */ + ar5416GpioCfgOutput(ah, ahp->ah_wlanActiveGpioSelect, + HAL_GPIO_OUTPUT_MUX_AS_WLAN_ACTIVE); + } else { + /* + * For 2-wire, configure the desired GPIO port + * for TX_FRAME output + */ + ar5416GpioCfgOutput(ah, ahp->ah_wlanActiveGpioSelect, + HAL_GPIO_OUTPUT_MUX_AS_TX_FRAME); + } + + /* + * Enable a weak pull down on BT_ACTIVE. + * When BT device is disabled, BT_ACTIVE might be floating. + */ + OS_REG_RMW(ah, AR_GPIO_PDPU, + (0x2 << (ahp->ah_btActiveGpioSelect * 2)), + (0x3 << (ahp->ah_btActiveGpioSelect * 2))); + + ahp->ah_btCoexEnabled = AH_TRUE; + + return (0); +} + +void +ar5416InitBTCoex(struct ath_hal *ah) +{ + struct ath_hal_5416 *ahp = AH5416(ah); + + if (ahp->ah_btCoexConfigType == HAL_BT_COEX_CFG_3WIRE) { + OS_REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL, + (AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB | + AR_GPIO_INPUT_EN_VAL_BT_ACTIVE_BB)); + + /* + * Set input mux for bt_prority_async and + * bt_active_async to GPIO pins + */ + OS_REG_RMW_FIELD(ah, AR_GPIO_INPUT_MUX1, + AR_GPIO_INPUT_MUX1_BT_ACTIVE, + ahp->ah_btActiveGpioSelect); + OS_REG_RMW_FIELD(ah, AR_GPIO_INPUT_MUX1, + AR_GPIO_INPUT_MUX1_BT_PRIORITY, + ahp->ah_btPriorityGpioSelect); + + /* + * Configure the desired GPIO ports for input + */ + ar5416GpioCfgInput(ah, ahp->ah_btActiveGpioSelect); + ar5416GpioCfgInput(ah, ahp->ah_btPriorityGpioSelect); + + if (AR_SREV_KITE(ah)) + ar5416BTCoexAntennaDiversity(ah); + + if (ahp->ah_btCoexEnabled) + ar5416BTCoexEnable(ah); + else + ar5416BTCoexDisable(ah); + } else if (ahp->ah_btCoexConfigType != HAL_BT_COEX_CFG_NONE) { + /* 2-wire */ + if (ahp->ah_btCoexEnabled) { + /* Connect bt_active_async to baseband */ + OS_REG_CLR_BIT(ah, AR_GPIO_INPUT_EN_VAL, + (AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_DEF | + AR_GPIO_INPUT_EN_VAL_BT_FREQUENCY_DEF)); + OS_REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL, + AR_GPIO_INPUT_EN_VAL_BT_ACTIVE_BB); + + /* + * Set input mux for bt_prority_async and + * bt_active_async to GPIO pins + */ + OS_REG_RMW_FIELD(ah, AR_GPIO_INPUT_MUX1, + AR_GPIO_INPUT_MUX1_BT_ACTIVE, + ahp->ah_btActiveGpioSelect); + + /* Configure the desired GPIO ports for input */ + ar5416GpioCfgInput(ah, ahp->ah_btActiveGpioSelect); + + /* Enable coexistence on initialization */ + ar5416BTCoexEnable(ah); + } + } +} Added: head/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.h Tue Jun 26 22:16:53 2012 (r237611) @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2011 Atheros Communications, Inc. + * + * Permission to use, copy, modify, and/or 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. + * + * $FreeBSD$ + */ + +#ifndef __ATH_AR5416_BTCOEX_H__ +#define __ATH_AR5416_BTCOEX_H__ +/* + * Weight table configurations. + */ +#define AR5416_BT_WGHT 0xff55 +#define AR5416_STOMP_ALL_WLAN_WGHT 0xfcfc +#define AR5416_STOMP_LOW_WLAN_WGHT 0xa8a8 +#define AR5416_STOMP_NONE_WLAN_WGHT 0x0000 +#define AR5416_STOMP_ALL_FORCE_WLAN_WGHT 0xffff // Stomp BT even when WLAN is idle +#define AR5416_STOMP_LOW_FORCE_WLAN_WGHT 0xaaaa // Stomp BT even when WLAN is idle + +#define AR9300_BT_WGHT 0xcccc4444 +#define AR9300_STOMP_ALL_WLAN_WGHT0 0xfffffff0 +#define AR9300_STOMP_ALL_WLAN_WGHT1 0xfffffff0 +#define AR9300_STOMP_LOW_WLAN_WGHT0 0x88888880 +#define AR9300_STOMP_LOW_WLAN_WGHT1 0x88888880 +#define AR9300_STOMP_NONE_WLAN_WGHT0 0x00000000 +#define AR9300_STOMP_NONE_WLAN_WGHT1 0x00000000 +#define AR9300_STOMP_ALL_FORCE_WLAN_WGHT0 0xffffffff // Stomp BT even when WLAN is idle +#define AR9300_STOMP_ALL_FORCE_WLAN_WGHT1 0xffffffff +#define AR9300_STOMP_LOW_FORCE_WLAN_WGHT0 0x88888888 // Stomp BT even when WLAN is idle +#define AR9300_STOMP_LOW_FORCE_WLAN_WGHT1 0x88888888 + +#define JUPITER_STOMP_ALL_WLAN_WGHT0 0x00007d00 +#define JUPITER_STOMP_ALL_WLAN_WGHT1 0x7d7d7d00 +#define JUPITER_STOMP_ALL_WLAN_WGHT2 0x7d7d7d00 +#define JUPITER_STOMP_ALL_WLAN_WGHT3 0x7d7d7d7d +#define JUPITER_STOMP_LOW_WLAN_WGHT0 0x00007d00 +#define JUPITER_STOMP_LOW_WLAN_WGHT1 0x7d3b3b00 +#define JUPITER_STOMP_LOW_WLAN_WGHT2 0x3b3b3b00 +#define JUPITER_STOMP_LOW_WLAN_WGHT3 0x3b3b3b3b +#define JUPITER_STOMP_NONE_WLAN_WGHT0 0x00007d00 +#define JUPITER_STOMP_NONE_WLAN_WGHT1 0x7d000000 +#define JUPITER_STOMP_NONE_WLAN_WGHT2 0x00000000 +#define JUPITER_STOMP_NONE_WLAN_WGHT3 0x00000000 +#define JUPITER_STOMP_ALL_FORCE_WLAN_WGHT0 0x00007d7d +#define JUPITER_STOMP_ALL_FORCE_WLAN_WGHT1 0x7d7d7d00 +#define JUPITER_STOMP_ALL_FORCE_WLAN_WGHT2 0x7d7d7d7d +#define JUPITER_STOMP_ALL_FORCE_WLAN_WGHT3 0x7d7d7d7d +#define JUPITER_STOMP_LOW_FORCE_WLAN_WGHT0 0x00003b3b +#define JUPITER_STOMP_LOW_FORCE_WLAN_WGHT1 0x3b3b3b00 +#define JUPITER_STOMP_LOW_FORCE_WLAN_WGHT2 0x3b3b3b3b +#define JUPITER_STOMP_LOW_FORCE_WLAN_WGHT3 0x3b3b3b3b + +#endif /* __ATH_AR5416_BTCOEX_H__ */ Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c Tue Jun 26 21:45:47 2012 (r237610) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c Tue Jun 26 22:16:53 2012 (r237611) @@ -85,23 +85,49 @@ ar5416GpioCfgOutput(struct ath_hal *ah, { uint32_t gpio_shift, reg; +#define N(a) (sizeof(a) / sizeof(a[0])) + HALASSERT(gpio < AH_PRIVATE(ah)->ah_caps.halNumGpioPins); + /* + * This table maps the HAL GPIO pins to the actual hardware + * values. + */ + static const u_int32_t MuxSignalConversionTable[] = { + AR_GPIO_OUTPUT_MUX_AS_OUTPUT, + AR_GPIO_OUTPUT_MUX_AS_PCIE_ATTENTION_LED, + AR_GPIO_OUTPUT_MUX_AS_PCIE_POWER_LED, + AR_GPIO_OUTPUT_MUX_AS_MAC_NETWORK_LED, + AR_GPIO_OUTPUT_MUX_AS_PCIE_POWER_LED, + AR_GPIO_OUTPUT_MUX_AS_RX_CLEAR_EXTERNAL, + AR_GPIO_OUTPUT_MUX_AS_TX_FRAME, + }; + HALDEBUG(ah, HAL_DEBUG_GPIO, "%s: gpio=%d, type=%d\n", __func__, gpio, type); - /* NB: type maps directly to hardware */ - /* XXX this may not actually be the case, for anything but output */ - cfgOutputMux(ah, gpio, type); - gpio_shift = gpio << 1; /* 2 bits per output mode */ + /* + * Convert HAL signal type definitions to hardware-specific values. + */ + if (type >= N(MuxSignalConversionTable)) { + ath_hal_printf(ah, "%s: mux %d is invalid!\n", + __func__, + type); + return AH_FALSE; + } + cfgOutputMux(ah, gpio, MuxSignalConversionTable[type]); + + /* 2 bits per output mode */ + gpio_shift = gpio << 1; + /* Always drive, rather than tristate/drive low/drive high */ reg = OS_REG_READ(ah, AR_GPIO_OE_OUT); reg &= ~(AR_GPIO_OE_OUT_DRV << gpio_shift); - /* Always drive, rather than tristate/drive low/drive high */ reg |= AR_GPIO_OE_OUT_DRV_ALL << gpio_shift; OS_REG_WRITE(ah, AR_GPIO_OE_OUT, reg); return AH_TRUE; +#undef N } /* Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9285.h Tue Jun 26 21:45:47 2012 (r237610) +++ head/sys/dev/ath/ath_hal/ar9002/ar9285.h Tue Jun 26 22:16:53 2012 (r237611) @@ -86,4 +86,9 @@ extern HAL_BOOL ar9285SetTransmitPower(s extern HAL_BOOL ar9285SetBoardValues(struct ath_hal *, const struct ieee80211_channel *); +/* ar9285_btcoex.h */ +extern void ar9285BTCoexAntennaDiversity(struct ath_hal *ah); +extern void ar9285BTCoexSetParameter(struct ath_hal *ah, + u_int32_t value, u_int32_t type); + #endif /* _ATH_AR9285_H_ */ Added: head/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/ath_hal/ar9002/ar9285_btcoex.c Tue Jun 26 22:16:53 2012 (r237611) @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2005 Atheros Communications, Inc. + * Copyright (c) 2008-2010, Atheros Communications Inc. + * + * Permission to use, copy, modify, and/or 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. + * + * $FreeBSD$ + */ + +#include "opt_ah.h" + +#include "ah.h" +#include "ah_internal.h" +#include "ah_devid.h" +#ifdef AH_DEBUG +#include "ah_desc.h" /* NB: for HAL_PHYERR* */ +#endif + +#include "ar5416/ar5416.h" +#include "ar5416/ar5416reg.h" +#include "ar5416/ar5416phy.h" +#include "ar5416/ar5416desc.h" /* AR5416_CONTTXMODE */ + +#include "ar9002/ar9285phy.h" +#include "ar9002/ar9285.h" + +/* + * This is specific to Kite. + * + * Kiwi and others don't have antenna diversity like this. + */ +void +ar9285BTCoexAntennaDiversity(struct ath_hal *ah) +{ + struct ath_hal_5416 *ahp = AH5416(ah); + u_int32_t regVal; + u_int8_t ant_div_control1, ant_div_control2; + + if ((ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_ANT_DIV_ALLOW) || + (AH5212(ah)->ah_diversity != HAL_ANT_VARIABLE)) { + if ((ahp->ah_btCoexFlag & HAL_BT_COEX_FLAG_ANT_DIV_ENABLE) && + (AH5212(ah)->ah_diversity == HAL_ANT_VARIABLE)) { + /* Enable antenna diversity */ + ant_div_control1 = HAL_BT_COEX_ANTDIV_CONTROL1_ENABLE; + ant_div_control2 = HAL_BT_COEX_ANTDIV_CONTROL2_ENABLE; + + /* Don't disable BT ant to allow BB to control SWCOM */ + ahp->ah_btCoexMode2 &= (~(AR_BT_DISABLE_BT_ANT)); + OS_REG_WRITE(ah, AR_BT_COEX_MODE2, ahp->ah_btCoexMode2); + + /* Program the correct SWCOM table */ + OS_REG_WRITE(ah, AR_PHY_SWITCH_COM, + HAL_BT_COEX_ANT_DIV_SWITCH_COM); + OS_REG_RMW(ah, AR_PHY_SWITCH_CHAIN_0, 0, 0xf0000000); + } else if (AH5212(ah)->ah_diversity == HAL_ANT_FIXED_B) { + /* Disable antenna diversity. Use antenna B(LNA2) only. */ + ant_div_control1 = HAL_BT_COEX_ANTDIV_CONTROL1_FIXED_B; + ant_div_control2 = HAL_BT_COEX_ANTDIV_CONTROL2_FIXED_B; + + /* Disable BT ant to allow concurrent BT and WLAN receive */ + ahp->ah_btCoexMode2 |= AR_BT_DISABLE_BT_ANT; + OS_REG_WRITE(ah, AR_BT_COEX_MODE2, ahp->ah_btCoexMode2); + + /* Program SWCOM talbe to make sure RF switch always parks at WLAN side */ + OS_REG_WRITE(ah, AR_PHY_SWITCH_COM, HAL_BT_COEX_ANT_DIV_SWITCH_COM); + OS_REG_RMW(ah, AR_PHY_SWITCH_CHAIN_0, 0x60000000, 0xf0000000); + } else { + /* Disable antenna diversity. Use antenna A(LNA1) only */ + ant_div_control1 = HAL_BT_COEX_ANTDIV_CONTROL1_FIXED_A; + ant_div_control2 = HAL_BT_COEX_ANTDIV_CONTROL2_FIXED_A; + + /* Disable BT ant to allow concurrent BT and WLAN receive */ + ahp->ah_btCoexMode2 |= AR_BT_DISABLE_BT_ANT; + OS_REG_WRITE(ah, AR_BT_COEX_MODE2, ahp->ah_btCoexMode2); + + /* Program SWCOM talbe to make sure RF switch always parks at BT side */ + OS_REG_WRITE(ah, AR_PHY_SWITCH_COM, 0); + OS_REG_RMW(ah, AR_PHY_SWITCH_CHAIN_0, 0, 0xf0000000); + } + + regVal = OS_REG_READ(ah, AR_PHY_MULTICHAIN_GAIN_CTL); + regVal &= (~(AR_PHY_9285_ANT_DIV_CTL_ALL)); + /* Clear ant_fast_div_bias [14:9] since for Janus the main LNA is always LNA1. */ + regVal &= (~(AR_PHY_9285_FAST_DIV_BIAS)); + + regVal |= SM(ant_div_control1, AR_PHY_9285_ANT_DIV_CTL); + regVal |= SM(ant_div_control2, AR_PHY_9285_ANT_DIV_ALT_LNACONF); + regVal |= SM((ant_div_control2 >> 2), AR_PHY_9285_ANT_DIV_MAIN_LNACONF); + regVal |= SM((ant_div_control1 >> 1), AR_PHY_9285_ANT_DIV_ALT_GAINTB); + regVal |= SM((ant_div_control1 >> 2), AR_PHY_9285_ANT_DIV_MAIN_GAINTB); + OS_REG_WRITE(ah, AR_PHY_MULTICHAIN_GAIN_CTL, regVal); + + regVal = OS_REG_READ(ah, AR_PHY_CCK_DETECT); + regVal &= (~AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV); + regVal |= SM((ant_div_control1 >> 3), AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV); + OS_REG_WRITE(ah, AR_PHY_CCK_DETECT, regVal); + } +} + +void +ar9285BTCoexSetParameter(struct ath_hal *ah, u_int32_t type, u_int32_t value) +{ + struct ath_hal_5416 *ahp = AH5416(ah); + + switch (type) { + case HAL_BT_COEX_ANTENNA_DIVERSITY: + if (AR_SREV_KITE(ah)) { + ahp->ah_btCoexFlag |= HAL_BT_COEX_FLAG_ANT_DIV_ALLOW; + if (value) + ahp->ah_btCoexFlag |= + HAL_BT_COEX_FLAG_ANT_DIV_ENABLE; + else + ahp->ah_btCoexFlag &= + ~HAL_BT_COEX_FLAG_ANT_DIV_ENABLE; + ar9285BTCoexAntennaDiversity(ah); + } + break; + default: + ar5416BTCoexSetParameter(ah, type, value); + break; + } +} + + Added: head/sys/dev/ath/ath_hal/ar9003/ar9300_btcoex.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/ath_hal/ar9003/ar9300_btcoex.h Tue Jun 26 22:16:53 2012 (r237611) @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2011 Atheros Communications, Inc. + * + * Permission to use, copy, modify, and/or 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. + * + * $FreeBSD$ + */ + +#ifndef __ATH_AR9300_BTCOEX_H__ +#define __ATH_AR9300_BTCOEX_H__ +/* + * Weight table configurations. + */ +#define AR9300_BT_WGHT 0xcccc4444 +#define AR9300_STOMP_ALL_WLAN_WGHT0 0xfffffff0 +#define AR9300_STOMP_ALL_WLAN_WGHT1 0xfffffff0 +#define AR9300_STOMP_LOW_WLAN_WGHT0 0x88888880 +#define AR9300_STOMP_LOW_WLAN_WGHT1 0x88888880 +#define AR9300_STOMP_NONE_WLAN_WGHT0 0x00000000 +#define AR9300_STOMP_NONE_WLAN_WGHT1 0x00000000 +/* Stomp BT even when WLAN is idle */ +#define AR9300_STOMP_ALL_FORCE_WLAN_WGHT0 0xffffffff +#define AR9300_STOMP_ALL_FORCE_WLAN_WGHT1 0xffffffff +/* Stomp BT even when WLAN is idle */ +#define AR9300_STOMP_LOW_FORCE_WLAN_WGHT0 0x88888888 +#define AR9300_STOMP_LOW_FORCE_WLAN_WGHT1 0x88888888 + +#define JUPITER_STOMP_ALL_WLAN_WGHT0 0x00007d00 +#define JUPITER_STOMP_ALL_WLAN_WGHT1 0x7d7d7d00 +#define JUPITER_STOMP_ALL_WLAN_WGHT2 0x7d7d7d00 +#define JUPITER_STOMP_ALL_WLAN_WGHT3 0x7d7d7d7d +#define JUPITER_STOMP_LOW_WLAN_WGHT0 0x00007d00 +#define JUPITER_STOMP_LOW_WLAN_WGHT1 0x7d3b3b00 +#define JUPITER_STOMP_LOW_WLAN_WGHT2 0x3b3b3b00 +#define JUPITER_STOMP_LOW_WLAN_WGHT3 0x3b3b3b3b +#define JUPITER_STOMP_NONE_WLAN_WGHT0 0x00007d00 +#define JUPITER_STOMP_NONE_WLAN_WGHT1 0x7d000000 +#define JUPITER_STOMP_NONE_WLAN_WGHT2 0x00000000 +#define JUPITER_STOMP_NONE_WLAN_WGHT3 0x00000000 +#define JUPITER_STOMP_ALL_FORCE_WLAN_WGHT0 0x00007d7d +#define JUPITER_STOMP_ALL_FORCE_WLAN_WGHT1 0x7d7d7d00 +#define JUPITER_STOMP_ALL_FORCE_WLAN_WGHT2 0x7d7d7d7d +#define JUPITER_STOMP_ALL_FORCE_WLAN_WGHT3 0x7d7d7d7d +#define JUPITER_STOMP_LOW_FORCE_WLAN_WGHT0 0x00003b3b +#define JUPITER_STOMP_LOW_FORCE_WLAN_WGHT1 0x3b3b3b00 +#define JUPITER_STOMP_LOW_FORCE_WLAN_WGHT2 0x3b3b3b3b +#define JUPITER_STOMP_LOW_FORCE_WLAN_WGHT3 0x3b3b3b3b + +#endif /* __ATH_AR9300_BTCOEX_H__ */ Modified: head/sys/dev/ath/if_ath_led.c ============================================================================== --- head/sys/dev/ath/if_ath_led.c Tue Jun 26 21:45:47 2012 (r237610) +++ head/sys/dev/ath/if_ath_led.c Tue Jun 26 22:16:53 2012 (r237611) @@ -125,7 +125,7 @@ ath_led_config(struct ath_softc *sc) /* Software LED blinking - GPIO controlled LED */ if (sc->sc_softled) { ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_ledpin, - HAL_GPIO_MUX_OUTPUT); + HAL_GPIO_OUTPUT_MUX_AS_OUTPUT); ath_hal_gpioset(sc->sc_ah, sc->sc_ledpin, !sc->sc_ledon); } @@ -139,10 +139,10 @@ ath_led_config(struct ath_softc *sc) */ if (sc->sc_led_pwr_pin > 0) ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_led_pwr_pin, - HAL_GPIO_MUX_MAC_POWER_LED); + HAL_GPIO_OUTPUT_MUX_MAC_POWER_LED); if (sc->sc_led_net_pin > 0) ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_led_net_pin, - HAL_GPIO_MUX_MAC_NETWORK_LED); + HAL_GPIO_OUTPUT_MUX_MAC_NETWORK_LED); } } From owner-svn-src-head@FreeBSD.ORG Tue Jun 26 23:15: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 5EF51106566B; Tue, 26 Jun 2012 23:15:56 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 48E908FC15; Tue, 26 Jun 2012 23:15: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 q5QNFuPl067916; Tue, 26 Jun 2012 23:15:56 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5QNFuSD067914; Tue, 26 Jun 2012 23:15:56 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201206262315.q5QNFuSD067914@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 26 Jun 2012 23:15: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: r237612 - head/share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2012 23:15:56 -0000 Author: obrien Date: Tue Jun 26 23:15:55 2012 New Revision: 237612 URL: http://svn.freebsd.org/changeset/base/237612 Log: Add -DWITH_INSTALL_AS_USER to the source build (naming matches the same functionality of The Ports Collection). This sets BINOWN, BINGRP, etc... to match current user. This this allows 'install', as used in 'make install', to succeed (assuming user has write permissions). Submitted by: Simon J Gerraty Discussed on: freebsd-arch Modified: head/share/mk/bsd.own.mk Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Tue Jun 26 22:16:53 2012 (r237611) +++ head/share/mk/bsd.own.mk Tue Jun 26 23:15:55 2012 (r237612) @@ -427,6 +427,7 @@ __DEFAULT_NO_OPTIONS = \ HESIOD \ ICONV \ IDEA \ + INSTALL_AS_USER \ LIBCPLUSPLUS \ NAND \ OFED \ @@ -645,6 +646,17 @@ CTFCONVERT_CMD= CTFCONVERT_CMD= @: .endif +.if ${MK_INSTALL_AS_USER} != "no" +_uid!= id -un +.if ${_uid} != 0 +_gid!= id -gn +.for x in BIN CONF DOC INFO KMOD LIB MAN NLS SHARE +$xOWN= ${_uid} +$xGRP= ${_gid} +.endfor +.endif +.endif + .endif # !_WITHOUT_SRCCONF .endif # !target(____) From owner-svn-src-head@FreeBSD.ORG Tue Jun 26 23:17:33 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 CE2A8106566C; Tue, 26 Jun 2012 23:17:33 +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 B66AB8FC20; Tue, 26 Jun 2012 23: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 q5QNHXSC068028; Tue, 26 Jun 2012 23:17:33 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5QNHXa2068014; Tue, 26 Jun 2012 23:17:33 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201206262317.q5QNHXa2068014@svn.freebsd.org> From: Xin LI Date: Tue, 26 Jun 2012 23: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: r237613 - in head: contrib/less usr.bin/less X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 26 Jun 2012 23:17:33 -0000 Author: delphij Date: Tue Jun 26 23:17:33 2012 New Revision: 237613 URL: http://svn.freebsd.org/changeset/base/237613 Log: MFV: less v449. Modified: head/contrib/less/LICENSE head/contrib/less/Makefile.aut head/contrib/less/NEWS head/contrib/less/README head/contrib/less/brac.c head/contrib/less/ch.c head/contrib/less/charset.c head/contrib/less/charset.h head/contrib/less/cmd.h head/contrib/less/cmdbuf.c head/contrib/less/command.c head/contrib/less/configure head/contrib/less/configure.ac head/contrib/less/cvt.c head/contrib/less/decode.c head/contrib/less/defines.ds head/contrib/less/defines.h.in head/contrib/less/defines.o2 head/contrib/less/defines.o9 head/contrib/less/defines.wn head/contrib/less/edit.c head/contrib/less/filename.c head/contrib/less/forwback.c head/contrib/less/help.c head/contrib/less/ifile.c head/contrib/less/input.c head/contrib/less/jump.c head/contrib/less/less.h head/contrib/less/less.hlp head/contrib/less/less.man head/contrib/less/less.nro head/contrib/less/lessecho.c head/contrib/less/lessecho.man head/contrib/less/lessecho.nro head/contrib/less/lesskey.c head/contrib/less/lesskey.h head/contrib/less/lesskey.man head/contrib/less/lesskey.nro head/contrib/less/lglob.h head/contrib/less/line.c head/contrib/less/linenum.c head/contrib/less/lsystem.c head/contrib/less/main.c head/contrib/less/mark.c head/contrib/less/mkhelp.c head/contrib/less/optfunc.c head/contrib/less/option.c head/contrib/less/option.h head/contrib/less/opttbl.c head/contrib/less/os.c head/contrib/less/output.c head/contrib/less/pattern.c head/contrib/less/pattern.h head/contrib/less/pckeys.h head/contrib/less/position.c head/contrib/less/position.h head/contrib/less/prompt.c head/contrib/less/screen.c head/contrib/less/scrsize.c head/contrib/less/search.c head/contrib/less/signal.c head/contrib/less/tags.c head/contrib/less/ttyin.c head/contrib/less/version.c head/usr.bin/less/defines.h Directory Properties: head/contrib/less/ (props changed) Modified: head/contrib/less/LICENSE ============================================================================== --- head/contrib/less/LICENSE Tue Jun 26 23:15:55 2012 (r237612) +++ head/contrib/less/LICENSE Tue Jun 26 23:17:33 2012 (r237613) @@ -2,7 +2,7 @@ ------------ Less -Copyright (C) 1984-2011 Mark Nudelman +Copyright (C) 1984-2012 Mark Nudelman Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions Modified: head/contrib/less/Makefile.aut ============================================================================== --- head/contrib/less/Makefile.aut Tue Jun 26 23:15:55 2012 (r237612) +++ head/contrib/less/Makefile.aut Tue Jun 26 23:17:33 2012 (r237613) @@ -1,6 +1,6 @@ # Makefile for authoring less. -EMAIL = markn@greenwoodsoftware.com +EMAIL = bug-less@gnu.org HOMEPAGE = http://www.greenwoodsoftware.com/less SHELL = /bin/sh RCS = rcs @@ -112,8 +112,7 @@ dist: ${DISTFILES} echo "Preparing $$REL"; \ rm -rf $$REL; mkdir $$REL; \ for file in ${DISTFILES}; do \ - cp -p $$file $$REL; \ - chmod -w $$REL/$$file; \ + ./add_copyright $$file $$REL; \ done; \ cd $$REL; chmod +w ${DISTFILES_W}; cd ..; \ echo "Creating release/$$REL/$$REL.tar.gz"; \ Modified: head/contrib/less/NEWS ============================================================================== --- head/contrib/less/NEWS Tue Jun 26 23:15:55 2012 (r237612) +++ head/contrib/less/NEWS Tue Jun 26 23:17:33 2012 (r237613) @@ -7,8 +7,34 @@ http://www.greenwoodsoftware.com/less You can also download the latest version of less from there. - To report bugs, suggestions or comments, send email to - bug-less@gnu.org or markn@greenwoodsoftware.com. + To report bugs, suggestions or comments, send email to bug-less@gnu.org. + +====================================================================== + + Major changes between "less" versions 444 and 449 + +* Add ESC-F command to keep reading data until a pattern is found. + +* Use exit code of LESSOPEN script if LESSOPEN starts with "||". + +* When up/down arrow is used on the command line immediately after + typing text, the next command starting with that text is found. + +* Add support for GNU regex. + +* Add configure option --with-regex=none and fix compile errors + when compiling with no regex library. + +* Fix bugs handling SGR sequences in Win32. + +* Fix possible crashes caused by malformed LESSOPEN or + LESSCLOSE variables. + +* Fix bug highlighting text which is discontiguous in the file + due to backspace processing. + +* Fix bug in displaying status column when scrolling backwards + with -J and -S in effect. ====================================================================== Modified: head/contrib/less/README ============================================================================== --- head/contrib/less/README Tue Jun 26 23:15:55 2012 (r237612) +++ head/contrib/less/README Tue Jun 26 23:17:33 2012 (r237613) @@ -7,9 +7,9 @@ ************************************************************************** ************************************************************************** - Less, version 444 + Less, version 449 - This is the distribution of less, version 444, released 09 Jun 2011. + This is the distribution of less, version 449, released 26 Jun 2012. This program is part of the GNU project (http://www.gnu.org). This program is free software. You may redistribute it and/or @@ -21,7 +21,7 @@ or 2. The Less License, in the file LICENSE. - Please report any problems to bug-less@gnu.org or markn@greenwoodsoftware.com. + Please report any problems to bug-less@gnu.org. See http://www.greenwoodsoftware.com/less for the latest info. ========================================================================= @@ -60,10 +60,11 @@ INSTALLATION (Unix systems only): regcomp Use the V8-compatible regcomp. regcomp-local Use Henry Spencer's V8-compatible regcomp (source is supplied with less). + none No regular expressions, only simple string matching. --with-secure Builds a "secure" version of less, with some features disabled - to prevent users from viewing other files, accessing shell - commands, etc. + to prevent users from viewing other files, accessing shell + commands, etc. 3. It is a good idea to look over the generated Makefile and defines.h @@ -96,7 +97,7 @@ INSTALLATION (Unix systems only): bindir and/or mandir to the appropriate directories. If you have any problems building or running "less", suggestions, -complaints, etc., you may mail to the author at markn@greenwoodsoftware.com. +complaints, etc., you may mail to bug-less@gnu.org. Note to hackers: comments noting possible improvements are enclosed in double curly brackets {{ like this }}. Modified: head/contrib/less/brac.c ============================================================================== --- head/contrib/less/brac.c Tue Jun 26 23:15:55 2012 (r237612) +++ head/contrib/less/brac.c Tue Jun 26 23:17:33 2012 (r237613) @@ -1,12 +1,11 @@ -/* - * Copyright (C) 1984-2011 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information about less, or for information on how to - * contact the author, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* Modified: head/contrib/less/ch.c ============================================================================== --- head/contrib/less/ch.c Tue Jun 26 23:15:55 2012 (r237612) +++ head/contrib/less/ch.c Tue Jun 26 23:17:33 2012 (r237613) @@ -1,12 +1,11 @@ -/* - * Copyright (C) 1984-2011 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information about less, or for information on how to - * contact the author, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* @@ -582,6 +581,8 @@ ch_length() return (NULL_POSITION); if (ch_flags & CH_HELPFILE) return (size_helpdata); + if (ch_flags & CH_NODATA) + return (0); return (ch_fsize); } Modified: head/contrib/less/charset.c ============================================================================== --- head/contrib/less/charset.c Tue Jun 26 23:15:55 2012 (r237612) +++ head/contrib/less/charset.c Tue Jun 26 23:17:33 2012 (r237613) @@ -1,12 +1,11 @@ -/* - * Copyright (C) 1984-2011 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information about less, or for information on how to - * contact the author, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* Modified: head/contrib/less/charset.h ============================================================================== --- head/contrib/less/charset.h Tue Jun 26 23:15:55 2012 (r237612) +++ head/contrib/less/charset.h Tue Jun 26 23:17:33 2012 (r237613) @@ -1,12 +1,11 @@ -/* - * Copyright (C) 2005-2011 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information about less, or for information on how to - * contact the author, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ #define IS_ASCII_OCTET(c) (((c) & 0x80) == 0) #define IS_UTF8_TRAIL(c) (((c) & 0xC0) == 0x80) Modified: head/contrib/less/cmd.h ============================================================================== --- head/contrib/less/cmd.h Tue Jun 26 23:15:55 2012 (r237612) +++ head/contrib/less/cmd.h Tue Jun 26 23:17:33 2012 (r237613) @@ -1,12 +1,11 @@ -/* - * Copyright (C) 1984-2011 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information about less, or for information on how to - * contact the author, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ #define MAX_USERCMD 500 @@ -66,6 +65,7 @@ #define A_NEXT_TAG 53 #define A_PREV_TAG 54 #define A_FILTER 55 +#define A_F_UNTIL_HILITE 56 #define A_INVALID 100 #define A_NOACTION 101 @@ -78,7 +78,7 @@ #define A_EXTRA 0200 -/* Line editting characters */ +/* Line editing characters */ #define EC_BACKSPACE 1 #define EC_LINEKILL 2 Modified: head/contrib/less/cmdbuf.c ============================================================================== --- head/contrib/less/cmdbuf.c Tue Jun 26 23:15:55 2012 (r237612) +++ head/contrib/less/cmdbuf.c Tue Jun 26 23:17:33 2012 (r237613) @@ -1,12 +1,11 @@ -/* - * Copyright (C) 1984-2011 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information about less, or for information on how to - * contact the author, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* @@ -30,6 +29,7 @@ static int prompt_col; /* Column of cur static char *cp; /* Pointer into cmdbuf */ static int cmd_offset; /* Index into cmdbuf of first displayed char */ static int literal; /* Next input char should not be interpreted */ +static int updown_match = -1; /* Prefix length in up/down movement */ #if TAB_COMPLETE_FILENAME static int cmd_complete(); @@ -122,6 +122,7 @@ cmd_reset() cmd_offset = 0; literal = 0; cmd_mbc_buf_len = 0; + updown_match = -1; } /* @@ -132,6 +133,7 @@ clear_cmd() { cmd_col = prompt_col = 0; cmd_mbc_buf_len = 0; + updown_match = -1; } /* @@ -504,6 +506,7 @@ cmd_ichar(cs, clen) /* * Reprint the tail of the line from the inserted char. */ + updown_match = -1; cmd_repaint(cp); cmd_right(); return (CC_OK); @@ -547,6 +550,7 @@ cmd_erase() /* * Repaint the buffer after the erased char. */ + updown_match = -1; cmd_repaint(cp); /* @@ -643,6 +647,7 @@ cmd_kill() cmd_offset = 0; cmd_home(); *cp = '\0'; + updown_match = -1; cmd_repaint(cp); /* @@ -675,12 +680,15 @@ set_mlist(mlist, cmdflags) #if CMD_HISTORY /* * Move up or down in the currently selected command history list. + * Only consider entries whose first updown_match chars are equal to + * cmdbuf's corresponding chars. */ static int cmd_updown(action) int action; { char *s; + struct mlist *ml; if (curr_mlist == NULL) { @@ -690,24 +698,47 @@ cmd_updown(action) bell(); return (CC_OK); } - cmd_home(); - clear_eol(); + + if (updown_match < 0) + { + updown_match = cp - cmdbuf; + } + /* - * Move curr_mp to the next/prev entry. + * Find the next history entry which matches. */ - if (action == EC_UP) - curr_mlist->curr_mp = curr_mlist->curr_mp->prev; - else - curr_mlist->curr_mp = curr_mlist->curr_mp->next; - /* - * Copy the entry into cmdbuf and echo it on the screen. - */ - s = curr_mlist->curr_mp->string; - if (s == NULL) - s = ""; - strcpy(cmdbuf, s); - for (cp = cmdbuf; *cp != '\0'; ) - cmd_right(); + for (ml = curr_mlist->curr_mp;;) + { + ml = (action == EC_UP) ? ml->prev : ml->next; + if (ml == curr_mlist) + { + /* + * We reached the end (or beginning) of the list. + */ + break; + } + if (strncmp(cmdbuf, ml->string, updown_match) == 0) + { + /* + * This entry matches; stop here. + * Copy the entry into cmdbuf and echo it on the screen. + */ + curr_mlist->curr_mp = ml; + s = ml->string; + if (s == NULL) + s = ""; + strcpy(cmdbuf, s); + cmd_home(); + clear_eol(); + for (cp = cmdbuf; *cp != '\0'; ) + cmd_right(); + return (CC_OK); + } + } + /* + * We didn't find a history entry that matches. + */ + bell(); return (CC_OK); } #endif @@ -1457,9 +1488,6 @@ save_cmdhist() FILE *f; int modified = 0; - filename = histfile_name(); - if (filename == NULL) - return; if (mlist_search.modified) modified = 1; #if SHELL_ESCAPE || PIPEC @@ -1468,6 +1496,9 @@ save_cmdhist() #endif if (!modified) return; + filename = histfile_name(); + if (filename == NULL) + return; f = fopen(filename, "w"); free(filename); if (f == NULL) Modified: head/contrib/less/command.c ============================================================================== --- head/contrib/less/command.c Tue Jun 26 23:15:55 2012 (r237612) +++ head/contrib/less/command.c Tue Jun 26 23:17:33 2012 (r237613) @@ -1,13 +1,12 @@ /* $FreeBSD$ */ -/* - * Copyright (C) 1984-2011 Mark Nudelman - * - * You may distribute under the terms of either the GNU General Public - * License or the Less License, as specified in the README file. - * - * For more information about less, or for information on how to - * contact the author, see the README file. - */ +/* + * Copyright (C) 1984-2012 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ /* @@ -38,6 +37,7 @@ extern int secure; extern int hshift; extern int show_attn; extern int less_is_more; +extern POSITION highest_hilite; extern char *every_first_cmd; extern char *curr_altfilename; extern char version[]; @@ -104,8 +104,8 @@ cmd_exec() static void start_mca(action, prompt, mlist, cmdflags) int action; - char *prompt; - void constant *mlist; + constant char *prompt; + constant void *mlist; int cmdflags; { mca = action; @@ -686,7 +686,7 @@ make_display() static void prompt() { - register char constant *p; + register constant char *p; if (ungot != NULL) { @@ -962,6 +962,44 @@ multi_search(pattern, n) } /* + * Forward forever, or until a highlighted line appears. + */ + static int +forw_loop(until_hilite) + int until_hilite; +{ + POSITION curr_len; + + if (ch_getflags() & CH_HELPFILE) + return (A_NOACTION); + + cmd_exec(); + jump_forw(); + curr_len = ch_length(); + highest_hilite = until_hilite ? curr_len : NULL_POSITION; + ignore_eoi = 1; + while (!sigs) + { + if (until_hilite && highest_hilite > curr_len) + { + bell(); + break; + } + make_display(); + forward(1, 0, 0); + } + ignore_eoi = 0; + + /* + * This gets us back in "F mode" after processing + * a non-abort signal (e.g. window-change). + */ + if (sigs && !ABORT_SIGS()) + return (A_F_FOREVER); + return (A_NOACTION); +} + +/* * Main command processor. * Accept and execute commands until a quit command. */ @@ -979,6 +1017,7 @@ commands() IFILE old_ifile; IFILE new_ifile; char *tagfile; + int until_hilite = 0; search_type = SRCH_FORW; wscroll = (sc_height + 1) / 2; @@ -1206,23 +1245,11 @@ commands() /* * Forward forever, ignoring EOF. */ - if (ch_getflags() & CH_HELPFILE) - break; - cmd_exec(); - jump_forw(); - ignore_eoi = 1; - while (!sigs) - { - make_display(); - forward(1, 0, 0); - } - ignore_eoi = 0; - /* - * This gets us back in "F mode" after processing - * a non-abort signal (e.g. window-change). - */ - if (sigs && !ABORT_SIGS()) - newaction = A_F_FOREVER; + newaction = forw_loop(0); + break; + + case A_F_UNTIL_HILITE: + newaction = forw_loop(1); break; case A_F_SCROLL: Modified: head/contrib/less/configure ============================================================================== --- head/contrib/less/configure Tue Jun 26 23:15:55 2012 (r237612) +++ head/contrib/less/configure Tue Jun 26 23:17:33 2012 (r237613) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for less 1. +# Generated by GNU Autoconf 2.68 for less 1. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -89,6 +89,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -214,11 +215,18 @@ IFS=$as_save_IFS # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : @@ -1067,7 +1075,7 @@ Try \`$0 --help' for more information" $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1281,7 +1289,7 @@ Optional Packages: --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-secure Compile in secure mode --with-no-float Do not use floating point - --with-regex={auto,pcre,posix,regcmp,re_comp,regcomp,regcomp-local} Select a regular expression library auto + --with-regex={auto,gnu,pcre,posix,regcmp,re_comp,regcomp,regcomp-local,none} Select a regular expression library auto --with-editor=PROGRAM use PROGRAM as the default editor vi Some influential environment variables: @@ -1361,7 +1369,7 @@ test -n "$ac_init_help" && exit $ac_stat if $ac_init_version; then cat <<\_ACEOF less configure 1 -generated by GNU Autoconf 2.67 +generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation @@ -1407,7 +1415,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1453,7 +1461,7 @@ fi # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -1490,7 +1498,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1532,7 +1540,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -1545,10 +1553,10 @@ fi ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -1611,7 +1619,7 @@ $as_echo "$as_me: WARNING: $2: proceedin esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -1620,7 +1628,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel @@ -1633,7 +1641,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1651,7 +1659,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -1664,7 +1672,7 @@ ac_fn_c_check_type () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -1705,7 +1713,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type @@ -1717,7 +1725,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1772,7 +1780,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func cat >config.log <<_ACEOF @@ -1780,7 +1788,7 @@ This file contains any messages produced running configure, to aid debugging if configure makes a mistake. It was created by less $as_me 1, which was -generated by GNU Autoconf 2.67. Invocation command line was +generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2142,7 +2150,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2182,7 +2190,7 @@ if test -z "$ac_cv_prog_CC"; then set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2235,7 +2243,7 @@ if test -z "$CC"; then set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2275,7 +2283,7 @@ if test -z "$CC"; then set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2334,7 +2342,7 @@ if test -z "$CC"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2378,7 +2386,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2661,7 +2669,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_ex ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2712,7 +2720,7 @@ OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2749,7 +2757,7 @@ ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -2827,7 +2835,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -2925,7 +2933,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 $as_echo_n "checking for library containing strerror... " >&6; } -if test "${ac_cv_search_strerror+set}" = set; then : +if ${ac_cv_search_strerror+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -2959,11 +2967,11 @@ for ac_lib in '' cposix; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_strerror+set}" = set; then : + if ${ac_cv_search_strerror+:} false; then : break fi done -if test "${ac_cv_search_strerror+set}" = set; then : +if ${ac_cv_search_strerror+:} false; then : else ac_cv_search_strerror=no @@ -2991,7 +2999,7 @@ if test -n "$CPP" && test -d "$CPP"; the CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -3119,7 +3127,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -3182,7 +3190,7 @@ $as_echo "$ac_cv_path_GREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -3250,7 +3258,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; } if test $ac_cv_c_compiler_gnu = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 $as_echo_n "checking whether $CC needs -traditional... " >&6; } -if test "${ac_cv_prog_gcc_traditional+set}" = set; then : +if ${ac_cv_prog_gcc_traditional+:} false; then : $as_echo_n "(cached) " >&6 else ac_pattern="Autoconf.*'x'" @@ -3335,7 +3343,7 @@ ac_configure="$SHELL $ac_aux_dir/configu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3422,7 +3430,7 @@ if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_CC+set}" = set; then : +if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no @@ -3473,7 +3481,7 @@ $as_echo "$ac_cv_sys_largefile_CC" >&6; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if test "${ac_cv_sys_file_offset_bits+set}" = set; then : +if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -3542,7 +3550,7 @@ rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if test "${ac_cv_sys_large_files+set}" = set; then : +if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -3615,7 +3623,7 @@ fi # Checks for general libraries. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgoto in -ltinfo" >&5 $as_echo_n "checking for tgoto in -ltinfo... " >&6; } -if test "${ac_cv_lib_tinfo_tgoto+set}" = set; then : +if ${ac_cv_lib_tinfo_tgoto+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -3649,7 +3657,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgoto" >&5 $as_echo "$ac_cv_lib_tinfo_tgoto" >&6; } -if test "x$ac_cv_lib_tinfo_tgoto" = x""yes; then : +if test "x$ac_cv_lib_tinfo_tgoto" = xyes; then : have_tinfo=yes else have_tinfo=no @@ -3657,7 +3665,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lxcurses" >&5 $as_echo_n "checking for initscr in -lxcurses... " >&6; } -if test "${ac_cv_lib_xcurses_initscr+set}" = set; then : +if ${ac_cv_lib_xcurses_initscr+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -3691,7 +3699,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xcurses_initscr" >&5 $as_echo "$ac_cv_lib_xcurses_initscr" >&6; } -if test "x$ac_cv_lib_xcurses_initscr" = x""yes; then : +if test "x$ac_cv_lib_xcurses_initscr" = xyes; then : have_xcurses=yes else have_xcurses=no @@ -3699,7 +3707,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lncursesw" >&5 $as_echo_n "checking for initscr in -lncursesw... " >&6; } -if test "${ac_cv_lib_ncursesw_initscr+set}" = set; then : +if ${ac_cv_lib_ncursesw_initscr+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -3733,7 +3741,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_initscr" >&5 $as_echo "$ac_cv_lib_ncursesw_initscr" >&6; } -if test "x$ac_cv_lib_ncursesw_initscr" = x""yes; then : +if test "x$ac_cv_lib_ncursesw_initscr" = xyes; then : have_ncursesw=yes else have_ncursesw=no @@ -3741,7 +3749,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lncurses" >&5 $as_echo_n "checking for initscr in -lncurses... " >&6; } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 00:50: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 DB3EF1065672; Wed, 27 Jun 2012 00:50:25 +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 ABC858FC0A; Wed, 27 Jun 2012 00:50: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 q5R0oPsw071968; Wed, 27 Jun 2012 00:50:25 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5R0oPas071965; Wed, 27 Jun 2012 00:50:25 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201206270050.q5R0oPas071965@svn.freebsd.org> From: Xin LI Date: Wed, 27 Jun 2012 00:50: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: r237618 - head/usr.bin/killall X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 27 Jun 2012 00:50:26 -0000 Author: delphij Date: Wed Jun 27 00:50:25 2012 New Revision: 237618 URL: http://svn.freebsd.org/changeset/base/237618 Log: Add a -I flag which requests confirmation before action, like what is done in pkill(1). MFC after: 2 weeks Modified: head/usr.bin/killall/killall.1 head/usr.bin/killall/killall.c Modified: head/usr.bin/killall/killall.1 ============================================================================== --- head/usr.bin/killall/killall.1 Wed Jun 27 00:37:22 2012 (r237617) +++ head/usr.bin/killall/killall.1 Wed Jun 27 00:50:25 2012 (r237618) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 25, 2009 +.Dd June 27, 2012 .Dt KILLALL 1 .Os .Sh NAME @@ -34,6 +34,7 @@ .Nm .Op Fl delmsvz .Op Fl help +.Op Fl I .Op Fl j Ar jail .Op Fl u Ar user .Op Fl t Ar tty @@ -71,6 +72,9 @@ processes specified with the option. .It Fl help Give a help on the command usage and exit. +.It Fl I +Request confirmation before attempting to signal each +process. .It Fl l List the names of the available signals and exit, like in .Xr kill 1 . Modified: head/usr.bin/killall/killall.c ============================================================================== --- head/usr.bin/killall/killall.c Wed Jun 27 00:37:22 2012 (r237617) +++ head/usr.bin/killall/killall.c Wed Jun 27 00:50:25 2012 (r237618) @@ -53,7 +53,7 @@ static void __dead2 usage(void) { - fprintf(stderr, "usage: killall [-delmsvz] [-help] [-j jail]\n"); + fprintf(stderr, "usage: killall [-delmsvz] [-help] [-I] [-j jail]\n"); fprintf(stderr, " [-u user] [-t tty] [-c cmd] [-SIGNAL] [cmd]...\n"); fprintf(stderr, "At least one option or argument to specify processes must be given.\n"); @@ -95,8 +95,9 @@ main(int ac, char **av) struct passwd *pw; regex_t rgx; regmatch_t pmatch; - int i, j; + int i, j, ch; char buf[256]; + char first; char *user = NULL; char *tty = NULL; char *cmd = NULL; @@ -104,6 +105,7 @@ main(int ac, char **av) int sflag = 0; int dflag = 0; int eflag = 0; + int Iflag = 0; int jflag = 0; int mflag = 0; int zflag = 0; @@ -141,6 +143,9 @@ main(int ac, char **av) if (**av == '-') { ++*av; switch (**av) { + case 'I': + Iflag = 1; + break; case 'j': ++*av; if (**av == '\0') { @@ -382,6 +387,16 @@ main(int ac, char **av) if (matched) break; } + if (matched != 0 && Iflag) { + printf("Send signal %d to %s (pid %d uid %d)? ", + sig, thiscmd, thispid, thisuid); + fflush(stdout); + first = ch = getchar(); + while (ch != '\n' && ch != EOF) + ch = getchar(); + if (first != 'y' && first != 'Y') + matched = 0; + } if (matched == 0) continue; if (dflag) From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 01:13: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 D9738106564A; Wed, 27 Jun 2012 01:13:37 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B98B98FC18; Wed, 27 Jun 2012 01: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 q5R1Dbwn073009; Wed, 27 Jun 2012 01:13:37 GMT (envelope-from julian@svn.freebsd.org) Received: (from julian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5R1DbZ2073007; Wed, 27 Jun 2012 01:13:37 GMT (envelope-from julian@svn.freebsd.org) Message-Id: <201206270113.q5R1DbZ2073007@svn.freebsd.org> From: Julian Elischer Date: Wed, 27 Jun 2012 01: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: r237619 - 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: Wed, 27 Jun 2012 01:13:38 -0000 Author: julian Date: Wed Jun 27 01:13:37 2012 New Revision: 237619 URL: http://svn.freebsd.org/changeset/base/237619 Log: Try clean up some of my original text and neaten a table. MFC after: 1 week Modified: head/share/man/man9/locking.9 Modified: head/share/man/man9/locking.9 ============================================================================== --- head/share/man/man9/locking.9 Wed Jun 27 00:50:25 2012 (r237618) +++ head/share/man/man9/locking.9 Wed Jun 27 01:13:37 2012 (r237619) @@ -37,11 +37,19 @@ kernel is written to run across multiple several different synchronization primitives to allow the developers to safely access and manipulate the many data types required. .Ss Mutexes -Mutexes (also called "sleep mutexes") are the most commonly used +Mutexes (also erroneously called "sleep mutexes") are the most commonly used synchronization primitive in the kernel. -Thread acquires (locks) a mutex before accessing data shared with other +A thread acquires (locks) a mutex before accessing data shared with other threads (including interrupt threads), and releases (unlocks) it afterwards. -If the mutex cannot be acquired, the thread requesting it will sleep. +If the mutex cannot be acquired, the thread requesting it will wait. +Mutexes are by default adaptive, meaning that +if the owner of a contended mutex is currently running on another CPU, +then a thread attempting to acquire the mutex will briefly spin +in the hope that the owner is only briefly holding it, +and might release it shortly. +If the owner does not do so, the waiting thread proceeds to yield the processor, +allowing other threads to run. +If the owner is not currently actually running then the spin step is skipped. Mutexes fully support priority propagation. .Pp See @@ -49,9 +57,10 @@ See for details. .Ss Spin mutexes Spin mutexes are variation of basic mutexes; the main difference between -the two is that spin mutexes never sleep - instead, they spin, waiting -for the thread holding the lock, which runs on another CPU, to release it. -Differently from ordinary mutex, spin mutexes disable interrupts when acquired. +the two is that spin mutexes never yield the processor - instead, they spin, +waiting for the thread holding the lock, +(which must be running on another CPU), to release it. +Spin mutexes disable interrupts while the held so as to not get pre-empted. Since disabling interrupts is expensive, they are also generally slower. Spin mutexes should be used only when necessary, e.g. to protect data shared with interrupt filter code (see @@ -122,7 +131,7 @@ and read-mostly locks. They don't support priority propagation. They should be considered to be closely related to .Xr sleep 9 . -In fact it could in some cases be +They could in some cases be considered a conditional sleep. .Pp See @@ -146,8 +155,8 @@ A thread must hold the mutex before call .Fn cv_wait* , functions. When a thread waits on a condition, the mutex -is atomically released before the thread is blocked, then reacquired -before the function call returns. +is atomically released before the thread thread yields the processor, +then reacquired before the function call returns. .Pp See .Xr condvar 9 @@ -255,14 +264,14 @@ Many of these rules are checked using th .Xr witness 4 code. .Ss Bounded vs. unbounded sleep -The following primitives perform bounded sleep: mutexes, pool mutexes, -reader/writer locks and read-mostly locks. +The following primitives perform bounded sleep: + mutexes, pool mutexes, reader/writer locks and read-mostly locks. .Pp -The following primitives block (perform unbounded sleep): shared/exclusive locks, -counting semaphores, condition variables, sleep/wakeup and lockmanager locks. +The following primitives may perform an unbounded sleep: +shared/exclusive locks, counting semaphores, condition variables, sleep/wakeup and lockmanager locks. .Pp -It is an error to do any operation that could result in any kind of sleep while -holding spin mutex. +It is an error to do any operation that could result in yielding the processor +while holding a spin mutex. .Pp As a general rule, it is an error to do any operation that could result in unbounded sleep while holding any primitive from the 'bounded sleep' group. @@ -284,21 +293,22 @@ Because the lock gets dropped during sle the assumptions that were made before, all the way up the call graph to the place where the lock was acquired. .Pp -It is an error to do any operation that could result in any kind of sleep when -running inside an interrupt filter. +It is an error to do any operation that could result in yielding of +the processor when running inside an interrupt filter. .Pp It is an error to do any operation that could result in unbounded sleep when running inside an interrupt thread. .Ss Interaction table The following table shows what you can and can not do while holding one of the synchronization primitives discussed: -.Bl -column ".Ic xxxxxxxxxxxxxxxxxxx" ".Xr XXXXXXXXX" ".Xr XXXXXXX" ".Xr XXXXXXX" ".Xr XXXXXXX" ".Xr XXXXXX" -offset indent -.It Em "You have: You want:" Ta spin mtx Ta mutex Ta sx Ta rwlock Ta rmlock Ta sleep +.Bl -column ".Ic xxxxxxxxxxxxxxxx" ".Xr XXXXXXXXX" ".Xr XXXXXXX" ".Xr XXXXXXX" ".Xr XXXXXXX" ".Xr XXXXXX" -offset indent +.It Em " You want:" Ta spin-mtx Ta mutex Ta rwlock Ta rmlock Ta sx Ta sleep +.It Em "You have: " Ta ------ Ta ------ Ta ------ Ta ------ Ta ------ Ta ------ .It spin mtx Ta \&ok-1 Ta \&no Ta \&no Ta \&no Ta \&no Ta \&no-3 -.It mutex Ta \&ok Ta \&ok-1 Ta \&no Ta \&ok Ta \&ok Ta \&no-3 -.It sx Ta \&ok Ta \&ok Ta \&ok-2 Ta \&ok Ta \&ok Ta \&ok-4 -.It rwlock Ta \&ok Ta \&ok Ta \&no Ta \&ok-2 Ta \&ok Ta \&no-3 -.It rmlock Ta \&ok Ta \&ok Ta \&no-5 Ta \&ok Ta \&ok-2 Ta \&no-5 +.It mutex Ta \&ok Ta \&ok-1 Ta \&ok Ta \&ok Ta \&no Ta \&no-3 +.It rwlock Ta \&ok Ta \&ok Ta \&ok-2 Ta \&ok Ta \&no Ta \&no-3 +.It rmlock Ta \&ok Ta \&ok Ta \&ok Ta \&ok-2 Ta \&no-5 Ta \&no-5 +.It sx Ta \&ok Ta \&ok Ta \&ok Ta \&ok Ta \&no-2 Ta \&ok-4 .El .Pp .Em *1 From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 01:44: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 72F9D106566C; Wed, 27 Jun 2012 01:44:49 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C0F88FC0A; Wed, 27 Jun 2012 01:44: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 q5R1inl1074279; Wed, 27 Jun 2012 01:44:49 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5R1inn7074277; Wed, 27 Jun 2012 01:44:49 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201206270144.q5R1inn7074277@svn.freebsd.org> From: Warren Block Date: Wed, 27 Jun 2012 01:44: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: r237620 - 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: Wed, 27 Jun 2012 01:44:49 -0000 Author: wblock (doc committer) Date: Wed Jun 27 01:44:48 2012 New Revision: 237620 URL: http://svn.freebsd.org/changeset/base/237620 Log: Use possessive "its", no apostrophe. MFC after: 1 day Modified: head/sbin/geom/class/raid/graid.8 Modified: head/sbin/geom/class/raid/graid.8 ============================================================================== --- head/sbin/geom/class/raid/graid.8 Wed Jun 27 01:13:37 2012 (r237619) +++ head/sbin/geom/class/raid/graid.8 Wed Jun 27 01:44:48 2012 (r237620) @@ -85,7 +85,7 @@ utility is used to manage software RAID GEOM RAID class. GEOM RAID class uses on-disk metadata to provide access to software-RAID volumes defined by different RAID BIOSes. -Depending on RAID BIOS type and it's metadata format, different subsets of +Depending on RAID BIOS type and its metadata format, different subsets of configurations and features are supported. To allow booting from RAID volume, the metadata format should match the RAID BIOS type and its capabilities. From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 03:00: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 B875A106564A; Wed, 27 Jun 2012 03:00:30 +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 8974D8FC12; Wed, 27 Jun 2012 03:00: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 q5R30U9P077384; Wed, 27 Jun 2012 03:00:30 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5R30Uph077382; Wed, 27 Jun 2012 03:00:30 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201206270300.q5R30Uph077382@svn.freebsd.org> From: Adrian Chadd Date: Wed, 27 Jun 2012 03:00: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: r237621 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 27 Jun 2012 03:00:30 -0000 Author: adrian Date: Wed Jun 27 03:00:29 2012 New Revision: 237621 URL: http://svn.freebsd.org/changeset/base/237621 Log: Remove duplicate entries. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.h Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.h Wed Jun 27 01:44:48 2012 (r237620) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.h Wed Jun 27 03:00:29 2012 (r237621) @@ -28,37 +28,4 @@ #define AR5416_STOMP_ALL_FORCE_WLAN_WGHT 0xffff // Stomp BT even when WLAN is idle #define AR5416_STOMP_LOW_FORCE_WLAN_WGHT 0xaaaa // Stomp BT even when WLAN is idle -#define AR9300_BT_WGHT 0xcccc4444 -#define AR9300_STOMP_ALL_WLAN_WGHT0 0xfffffff0 -#define AR9300_STOMP_ALL_WLAN_WGHT1 0xfffffff0 -#define AR9300_STOMP_LOW_WLAN_WGHT0 0x88888880 -#define AR9300_STOMP_LOW_WLAN_WGHT1 0x88888880 -#define AR9300_STOMP_NONE_WLAN_WGHT0 0x00000000 -#define AR9300_STOMP_NONE_WLAN_WGHT1 0x00000000 -#define AR9300_STOMP_ALL_FORCE_WLAN_WGHT0 0xffffffff // Stomp BT even when WLAN is idle -#define AR9300_STOMP_ALL_FORCE_WLAN_WGHT1 0xffffffff -#define AR9300_STOMP_LOW_FORCE_WLAN_WGHT0 0x88888888 // Stomp BT even when WLAN is idle -#define AR9300_STOMP_LOW_FORCE_WLAN_WGHT1 0x88888888 - -#define JUPITER_STOMP_ALL_WLAN_WGHT0 0x00007d00 -#define JUPITER_STOMP_ALL_WLAN_WGHT1 0x7d7d7d00 -#define JUPITER_STOMP_ALL_WLAN_WGHT2 0x7d7d7d00 -#define JUPITER_STOMP_ALL_WLAN_WGHT3 0x7d7d7d7d -#define JUPITER_STOMP_LOW_WLAN_WGHT0 0x00007d00 -#define JUPITER_STOMP_LOW_WLAN_WGHT1 0x7d3b3b00 -#define JUPITER_STOMP_LOW_WLAN_WGHT2 0x3b3b3b00 -#define JUPITER_STOMP_LOW_WLAN_WGHT3 0x3b3b3b3b -#define JUPITER_STOMP_NONE_WLAN_WGHT0 0x00007d00 -#define JUPITER_STOMP_NONE_WLAN_WGHT1 0x7d000000 -#define JUPITER_STOMP_NONE_WLAN_WGHT2 0x00000000 -#define JUPITER_STOMP_NONE_WLAN_WGHT3 0x00000000 -#define JUPITER_STOMP_ALL_FORCE_WLAN_WGHT0 0x00007d7d -#define JUPITER_STOMP_ALL_FORCE_WLAN_WGHT1 0x7d7d7d00 -#define JUPITER_STOMP_ALL_FORCE_WLAN_WGHT2 0x7d7d7d7d -#define JUPITER_STOMP_ALL_FORCE_WLAN_WGHT3 0x7d7d7d7d -#define JUPITER_STOMP_LOW_FORCE_WLAN_WGHT0 0x00003b3b -#define JUPITER_STOMP_LOW_FORCE_WLAN_WGHT1 0x3b3b3b00 -#define JUPITER_STOMP_LOW_FORCE_WLAN_WGHT2 0x3b3b3b3b -#define JUPITER_STOMP_LOW_FORCE_WLAN_WGHT3 0x3b3b3b3b - #endif /* __ATH_AR5416_BTCOEX_H__ */ From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 03:24:28 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 86BB91065674; Wed, 27 Jun 2012 03:24:28 +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 716748FC16; Wed, 27 Jun 2012 03:24:28 +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 q5R3OSPl078634; Wed, 27 Jun 2012 03:24:28 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5R3OS4F078632; Wed, 27 Jun 2012 03:24:28 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201206270324.q5R3OS4F078632@svn.freebsd.org> From: Adrian Chadd Date: Wed, 27 Jun 2012 03:24:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237622 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 27 Jun 2012 03:24:28 -0000 Author: adrian Date: Wed Jun 27 03:24:27 2012 New Revision: 237622 URL: http://svn.freebsd.org/changeset/base/237622 Log: Bring over some new typedefs as part of the AR9300 HAL import. Modified: head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Wed Jun 27 03:00:29 2012 (r237621) +++ head/sys/dev/ath/ath_hal/ah.h Wed Jun 27 03:24:27 2012 (r237622) @@ -420,6 +420,30 @@ typedef enum { | HAL_INT_GPIO, } HAL_INT; +/* + * MSI vector assignments + */ +typedef enum { + HAL_MSIVEC_MISC = 0, + HAL_MSIVEC_TX = 1, + HAL_MSIVEC_RXLP = 2, + HAL_MSIVEC_RXHP = 3, +} HAL_MSIVEC; + +typedef enum { + HAL_INT_LINE = 0, + HAL_INT_MSI = 1, +} HAL_INT_TYPE; + +/* For interrupt mitigation registers */ +typedef enum { + HAL_INT_RX_FIRSTPKT=0, + HAL_INT_RX_LASTPKT, + HAL_INT_TX_FIRSTPKT, + HAL_INT_TX_LASTPKT, + HAL_INT_THRESHOLD +} HAL_INT_MITIGATION; + typedef enum { HAL_GPIO_OUTPUT_MUX_AS_OUTPUT = 0, HAL_GPIO_OUTPUT_MUX_PCIE_ATTENTION_LED = 1, From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 03:45: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 F1EC6106566B; Wed, 27 Jun 2012 03:45:25 +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 D16F98FC19; Wed, 27 Jun 2012 03:45: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 q5R3jP4C079507; Wed, 27 Jun 2012 03:45:25 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5R3jPxP079500; Wed, 27 Jun 2012 03:45:25 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201206270345.q5R3jPxP079500@svn.freebsd.org> From: Alan Cox Date: Wed, 27 Jun 2012 03:45: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: r237623 - in head/sys: amd64/amd64 i386/i386 kern sparc64/sparc64 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: Wed, 27 Jun 2012 03:45:26 -0000 Author: alc Date: Wed Jun 27 03:45:25 2012 New Revision: 237623 URL: http://svn.freebsd.org/changeset/base/237623 Log: Add new pmap layer locks to the predefined lock order. Change the names of a few existing VM locks to follow a consistent naming scheme. Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c head/sys/kern/subr_witness.c head/sys/sparc64/sparc64/pmap.c head/sys/vm/vm_map.c head/sys/vm/vm_page.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Wed Jun 27 03:24:27 2012 (r237622) +++ head/sys/amd64/amd64/pmap.c Wed Jun 27 03:45:25 2012 (r237623) @@ -642,7 +642,7 @@ pmap_bootstrap(vm_paddr_t *firstaddr) /* * Initialize the global pv list lock. */ - rw_init(&pvh_global_lock, "pvh global"); + rw_init(&pvh_global_lock, "pmap pv global"); /* * Reserve some special page table entries/VA space for temporary @@ -810,13 +810,13 @@ pmap_init(void) /* * Initialize the pv chunk list mutex. */ - mtx_init(&pv_chunks_mutex, "pv chunk list", NULL, MTX_DEF); + mtx_init(&pv_chunks_mutex, "pmap pv chunk list", NULL, MTX_DEF); /* * Initialize the pool of pv list locks. */ for (i = 0; i < NPV_LIST_LOCKS; i++) - rw_init(&pv_list_locks[i], "pv list"); + rw_init(&pv_list_locks[i], "pmap pv list"); /* * Calculate the size of the pv head table for superpages. Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Wed Jun 27 03:24:27 2012 (r237622) +++ head/sys/i386/i386/pmap.c Wed Jun 27 03:45:25 2012 (r237623) @@ -409,7 +409,7 @@ pmap_bootstrap(vm_paddr_t firstaddr) /* * Initialize the global pv list lock. */ - rw_init(&pvh_global_lock, "pvh global"); + rw_init(&pvh_global_lock, "pmap pv global"); LIST_INIT(&allpmaps); Modified: head/sys/kern/subr_witness.c ============================================================================== --- head/sys/kern/subr_witness.c Wed Jun 27 03:24:27 2012 (r237622) +++ head/sys/kern/subr_witness.c Wed Jun 27 03:45:25 2012 (r237623) @@ -593,19 +593,22 @@ static struct witness_order_list_entry o /* * CDEV */ - { "system map", &lock_class_mtx_sleep }, - { "vm page queue mutex", &lock_class_mtx_sleep }, + { "vm map (system)", &lock_class_mtx_sleep }, + { "vm page queue", &lock_class_mtx_sleep }, { "vnode interlock", &lock_class_mtx_sleep }, { "cdev", &lock_class_mtx_sleep }, { NULL, NULL }, /* * VM - * */ + { "vm map (user)", &lock_class_sx }, { "vm object", &lock_class_mtx_sleep }, - { "page lock", &lock_class_mtx_sleep }, - { "vm page queue mutex", &lock_class_mtx_sleep }, + { "vm page", &lock_class_mtx_sleep }, + { "vm page queue", &lock_class_mtx_sleep }, + { "pmap pv global", &lock_class_rw }, { "pmap", &lock_class_mtx_sleep }, + { "pmap pv list", &lock_class_rw }, + { "vm page free queue", &lock_class_mtx_sleep }, { NULL, NULL }, /* * kqueue/VFS interaction Modified: head/sys/sparc64/sparc64/pmap.c ============================================================================== --- head/sys/sparc64/sparc64/pmap.c Wed Jun 27 03:24:27 2012 (r237622) +++ head/sys/sparc64/sparc64/pmap.c Wed Jun 27 03:45:25 2012 (r237623) @@ -673,9 +673,10 @@ pmap_bootstrap(u_int cpu_impl) CPU_FILL(&pm->pm_active); /* - * Initialize the global tte list lock. + * Initialize the global tte list lock, which is more commonly + * known as the pmap pv global lock. */ - rw_init(&tte_list_global_lock, "tte list global"); + rw_init(&tte_list_global_lock, "pmap pv global"); /* * Flush all non-locked TLB entries possibly left over by the Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Wed Jun 27 03:24:27 2012 (r237622) +++ head/sys/vm/vm_map.c Wed Jun 27 03:45:25 2012 (r237623) @@ -241,8 +241,8 @@ vm_map_zinit(void *mem, int size, int fl map = (vm_map_t)mem; map->nentries = 0; map->size = 0; - mtx_init(&map->system_mtx, "system map", NULL, MTX_DEF | MTX_DUPOK); - sx_init(&map->lock, "user map"); + mtx_init(&map->system_mtx, "vm map (system)", NULL, MTX_DEF | MTX_DUPOK); + sx_init(&map->lock, "vm map (user)"); return (0); } Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Wed Jun 27 03:24:27 2012 (r237622) +++ head/sys/vm/vm_page.c Wed Jun 27 03:45:25 2012 (r237623) @@ -292,16 +292,13 @@ vm_page_startup(vm_offset_t vaddr) end = phys_avail[biggestone+1]; /* - * Initialize the locks. + * Initialize the page and queue locks. */ - mtx_init(&vm_page_queue_mtx, "vm page queue mutex", NULL, MTX_DEF | + mtx_init(&vm_page_queue_mtx, "vm page queue", NULL, MTX_DEF | MTX_RECURSE); - mtx_init(&vm_page_queue_free_mtx, "vm page queue free mutex", NULL, - MTX_DEF); - - /* Setup page locks. */ + mtx_init(&vm_page_queue_free_mtx, "vm page free queue", NULL, MTX_DEF); for (i = 0; i < PA_LOCK_COUNT; i++) - mtx_init(&pa_lock[i].data, "page lock", NULL, MTX_DEF); + mtx_init(&pa_lock[i].data, "vm page", NULL, MTX_DEF); /* * Initialize the queue headers for the hold queue, the active queue, From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 04:39: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 86E87106566B; Wed, 27 Jun 2012 04:39:31 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C0F78FC08; Wed, 27 Jun 2012 04:39: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 q5R4dVMT081771; Wed, 27 Jun 2012 04:39:31 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5R4dU0n081732; Wed, 27 Jun 2012 04:39:30 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201206270439.q5R4dU0n081732@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 27 Jun 2012 04:39: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: r237624 - in head: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize cddl/contrib/opensolaris/lib/libdtrace/common sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/c... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 27 Jun 2012 04:39:31 -0000 Author: pfg Date: Wed Jun 27 04:39:30 2012 New Revision: 237624 URL: http://svn.freebsd.org/changeset/base/237624 Log: Bring llquantize support into Dtrace. Bryan Cantrill implemented the equivalent of semi-log graph paper for Dtrace so llquantize will use one logarithmic and one linear scale. Special thanks to Mark Peek for providing fix to an assertion and to Fabian Keill for testing the port. Illumos Revision: 13355:15b74a2a9a9d Reference: https://www.illumos/issues/905 Obtained from: Illumos Tested by: Fabian Keill, mp MFC after: 4 days Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTOREVEN.nodivide.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTOREVEN.notfactor.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORMATCH.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORNSTEPS.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORSMALL.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORTYPE.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORVAL.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_HIGHMATCH.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_HIGHTYPE.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_HIGHVAL.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_LOWMATCH.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_LOWTYPE.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_LOWVAL.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_MAGRANGE.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_MAGTOOBIG.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_NSTEPMATCH.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_NSTEPTYPE.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_NSTEPVAL.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.bases.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.bases.d.out (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.basic.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.basic.d.out (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.negorder.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.negorder.d.out (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.negvalue.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.negvalue.d.out (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.normal.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.normal.d.out (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.range.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.range.d.out (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.steps.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.steps.d.out (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.trunc.d (contents, props changed) head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.trunc.d.out (contents, props changed) Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dtrace.h head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTOREVEN.nodivide.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTOREVEN.nodivide.d Wed Jun 27 04:39:30 2012 (r237624) @@ -0,0 +1,29 @@ +/* + * CDDL HEADER START + * + * 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] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(0, 10, 0, 10, 25); +} Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTOREVEN.notfactor.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTOREVEN.notfactor.d Wed Jun 27 04:39:30 2012 (r237624) @@ -0,0 +1,29 @@ +/* + * CDDL HEADER START + * + * 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] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(0, 10, 0, 10, 30); +} Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORMATCH.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORMATCH.d Wed Jun 27 04:39:30 2012 (r237624) @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * 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] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(0, 10, 0, 10, 10); + @ = llquantize(0, 3, 0, 10, 81); +} Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORNSTEPS.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORNSTEPS.d Wed Jun 27 04:39:30 2012 (r237624) @@ -0,0 +1,29 @@ +/* + * CDDL HEADER START + * + * 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] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(0, 10, 0, 10, 7); +} Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORSMALL.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORSMALL.d Wed Jun 27 04:39:30 2012 (r237624) @@ -0,0 +1,29 @@ +/* + * CDDL HEADER START + * + * 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] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(0, 1, 0, 10, 10); +} Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORTYPE.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORTYPE.d Wed Jun 27 04:39:30 2012 (r237624) @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * 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] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + this->doogle = 10; + @ = llquantize(0, this->doogle, 0, 10, 10); +} Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORVAL.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTORVAL.d Wed Jun 27 04:39:30 2012 (r237624) @@ -0,0 +1,29 @@ +/* + * CDDL HEADER START + * + * 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] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(0, 65537, 0, 10, 10); +} Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_HIGHMATCH.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_HIGHMATCH.d Wed Jun 27 04:39:30 2012 (r237624) @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * 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] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(0, 10, 0, 10, 10); + @ = llquantize(0, 10, 0, 11, 10); +} Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_HIGHTYPE.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_HIGHTYPE.d Wed Jun 27 04:39:30 2012 (r237624) @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * 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] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + this->doogle = 10; + @ = llquantize(0, 10, 0, this->doogle, 10); +} Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_HIGHVAL.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_HIGHVAL.d Wed Jun 27 04:39:30 2012 (r237624) @@ -0,0 +1,29 @@ +/* + * CDDL HEADER START + * + * 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] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(0, 10, 0, -1, 10); +} Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_LOWMATCH.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_LOWMATCH.d Wed Jun 27 04:39:30 2012 (r237624) @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * 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] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(0, 10, 0, 10, 10); + @ = llquantize(0, 10, 1, 10, 10); +} Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_LOWTYPE.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_LOWTYPE.d Wed Jun 27 04:39:30 2012 (r237624) @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * 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] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + this->doogle = 0; + @ = llquantize(0, 10, this->doogle, 10, 10); +} Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_LOWVAL.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_LOWVAL.d Wed Jun 27 04:39:30 2012 (r237624) @@ -0,0 +1,29 @@ +/* + * CDDL HEADER START + * + * 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] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(0, 10, -1, 10, 10); +} Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_MAGRANGE.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_MAGRANGE.d Wed Jun 27 04:39:30 2012 (r237624) @@ -0,0 +1,29 @@ +/* + * CDDL HEADER START + * + * 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] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(0, 10, 10, 0, 10); +} Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_MAGTOOBIG.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_MAGTOOBIG.d Wed Jun 27 04:39:30 2012 (r237624) @@ -0,0 +1,29 @@ +/* + * CDDL HEADER START + * + * 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] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(0, 10, 0, 100, 10); +} Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_NSTEPMATCH.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_NSTEPMATCH.d Wed Jun 27 04:39:30 2012 (r237624) @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * 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] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(0, 10, 0, 10, 10); + @ = llquantize(0, 10, 0, 10, 100); +} Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_NSTEPTYPE.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_NSTEPTYPE.d Wed Jun 27 04:39:30 2012 (r237624) @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * 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] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + this->doogle = 10; + @ = llquantize(0, 10, 0, 10, this->doogle); +} Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_NSTEPVAL.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_NSTEPVAL.d Wed Jun 27 04:39:30 2012 (r237624) @@ -0,0 +1,29 @@ +/* + * CDDL HEADER START + * + * 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] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + @ = llquantize(123, 10, 0, 10, 123456); +} Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.bases.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.bases.d Wed Jun 27 04:39:30 2012 (r237624) @@ -0,0 +1,46 @@ +/* + * CDDL HEADER START + * + * 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] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +#pragma D option quiet + +tick-1ms +/i++ <= 100/ +{ + @two = llquantize(i, 2, 0, 6, 2); + @three = llquantize(i, 3, 0, 1, 9); + @four = llquantize(i, 4, 0, 1, 4); + @five = llquantize(i, 5, 0, 1, 25); + @six = llquantize(i, 6, 0, 3, 12); + @seven = llquantize(i, 7, 0, 1, 7); + @eight = llquantize(i, 8, 0, 1, 16); + @nine = llquantize(i, 9, 0, 1, 9); + @ten = llquantize(i, 10, 0, 1, 10); +} + +tick-1ms +/i > 100/ +{ + exit(0); +} Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.bases.d.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.bases.d.out Wed Jun 27 04:39:30 2012 (r237624) @@ -0,0 +1,177 @@ + + + value ------------- Distribution ------------- count + < 1 | 0 + 1 | 1 + 2 |@ 2 + 4 |@@ 4 + 8 |@@@ 8 + 16 |@@@@@@ 16 + 32 |@@@@@@@@@@@@@ 32 + 64 |@@@@@@@@@@@@@@@ 38 + >= 128 | 0 + + + value ------------- Distribution ------------- count + < 1 | 0 + 1 | 1 + 2 | 1 + 3 | 1 + 4 | 1 + 5 | 1 + 6 | 1 + 7 | 1 + 8 | 1 + >= 9 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 93 + + + value ------------- Distribution ------------- count + < 1 | 0 + 1 | 1 + 2 | 1 + 3 | 1 + 4 |@@ 4 + 8 |@@ 4 + 12 |@@ 4 + >= 16 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 86 + + + value ------------- Distribution ------------- count + < 1 | 0 + 1 | 1 + 2 | 1 + 3 | 1 + 4 | 1 + 5 | 1 + 6 | 1 + 7 | 1 + 8 | 1 + 9 | 1 + 10 | 1 + 11 | 1 + 12 | 1 + 13 | 1 + 14 | 1 + 15 | 1 + 16 | 1 + 17 | 1 + 18 | 1 + 19 | 1 + 20 | 1 + 21 | 1 + 22 | 1 + 23 | 1 + 24 | 1 + >= 25 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 77 + + + value ------------- Distribution ------------- count + < 1 | 0 + 1 | 1 + 2 | 1 + 3 | 1 + 4 | 1 + 5 | 1 + 6 |@ 3 + 9 |@ 3 + 12 |@ 3 + 15 |@ 3 + 18 |@ 3 + 21 |@ 3 + 24 |@ 3 + 27 |@ 3 + 30 |@ 3 + 33 |@ 3 + 36 |@@@@@@@ 18 + 54 |@@@@@@@ 18 + 72 |@@@@@@@ 18 + 90 |@@@@@ 12 + 108 | 0 + + + value ------------- Distribution ------------- count + < 1 | 0 + 1 | 1 + 2 | 1 + 3 | 1 + 4 | 1 + 5 | 1 + 6 | 1 + 7 |@@@ 7 + 14 |@@@ 7 + 21 |@@@ 7 + 28 |@@@ 7 + 35 |@@@ 7 + 42 |@@@ 7 + >= 49 |@@@@@@@@@@@@@@@@@@@@@ 53 + + + value ------------- Distribution ------------- count + < 1 | 0 + 1 | 1 + 2 | 1 + 3 | 1 + 4 | 1 + 5 | 1 + 6 | 1 + 7 | 1 + 8 |@@ 4 + 12 |@@ 4 + 16 |@@ 4 + 20 |@@ 4 + 24 |@@ 4 + 28 |@@ 4 + 32 |@@ 4 + 36 |@@ 4 + 40 |@@ 4 + 44 |@@ 4 + 48 |@@ 4 + 52 |@@ 4 + 56 |@@ 4 + 60 |@@ 4 + >= 64 |@@@@@@@@@@@@@@@ 38 + + + value ------------- Distribution ------------- count + < 1 | 0 + 1 | 1 + 2 | 1 + 3 | 1 + 4 | 1 + 5 | 1 + 6 | 1 + 7 | 1 + 8 | 1 + 9 |@@@@ 9 + 18 |@@@@ 9 + 27 |@@@@ 9 + 36 |@@@@ 9 + 45 |@@@@ 9 + 54 |@@@@ 9 + 63 |@@@@ 9 + 72 |@@@@ 9 + >= 81 |@@@@@@@@ 21 + + + value ------------- Distribution ------------- count + < 1 | 0 + 1 | 1 + 2 | 1 + 3 | 1 + 4 | 1 + 5 | 1 + 6 | 1 + 7 | 1 + 8 | 1 + 9 | 1 + 10 |@@@@ 10 + 20 |@@@@ 10 + 30 |@@@@ 10 + 40 |@@@@ 10 + 50 |@@@@ 10 + 60 |@@@@ 10 + 70 |@@@@ 10 + 80 |@@@@ 10 + 90 |@@@@ 10 + >= 100 |@ 2 + Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.basic.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.basic.d Wed Jun 27 04:39:30 2012 (r237624) @@ -0,0 +1,38 @@ +/* + * CDDL HEADER START + * + * 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] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +#pragma D option quiet + +tick-1ms +/i++ <= 100/ +{ + @ = llquantize(i, 10, 0, 10, 10); +} + +tick-1ms +/i > 100/ +{ + exit(0); +} Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.basic.d.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.basic.d.out Wed Jun 27 04:39:30 2012 (r237624) @@ -0,0 +1,25 @@ + + + value ------------- Distribution ------------- count + < 1 | 0 + 1 | 1 + 2 | 1 + 3 | 1 + 4 | 1 + 5 | 1 + 6 | 1 + 7 | 1 + 8 | 1 + 9 | 1 + 10 |@@@@ 10 + 20 |@@@@ 10 + 30 |@@@@ 10 + 40 |@@@@ 10 + 50 |@@@@ 10 + 60 |@@@@ 10 + 70 |@@@@ 10 + 80 |@@@@ 10 + 90 |@@@@ 10 + 100 |@ 2 + 200 | 0 + Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.negorder.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.negorder.d Wed Jun 27 04:39:30 2012 (r237624) @@ -0,0 +1,62 @@ +/* + * CDDL HEADER START + * + * 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] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +#pragma D option quiet + +BEGIN +{ + a = 7; + b = 13; + val = (-a * b) + a; +} + +tick-1ms +{ + incr = val % b; + val += a; +} + +tick-1ms +/val == 0/ +{ + val += a; +} + +tick-1ms +/incr != 0/ +{ + i++; + @llquanty[i] = llquantize(1, 10, 0, 10, 10, incr); +} + +tick-1ms +/incr == 0/ +{ + printf("Ordering of llquantize() with some negative weights:\n"); + printa(@llquanty); + printf("\n"); + + exit(0); +} Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.negorder.d.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.negorder.d.out Wed Jun 27 04:39:30 2012 (r237624) @@ -0,0 +1,148 @@ +Ordering of llquantize() with some negative weights: + + 2 + value ------------- Distribution ------------- count + < 1 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -12 + 2 | 0 + + 4 + value ------------- Distribution ------------- count + < 1 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -11 + 2 | 0 + + 6 + value ------------- Distribution ------------- count + < 1 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -10 + 2 | 0 + + 8 + value ------------- Distribution ------------- count + < 1 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -9 + 2 | 0 + + 10 + value ------------- Distribution ------------- count + < 1 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -8 + 2 | 0 + + 12 + value ------------- Distribution ------------- count + < 1 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -7 + 2 | 0 + + 1 + value ------------- Distribution ------------- count + < 1 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -6 + 2 | 0 + + 3 + value ------------- Distribution ------------- count + < 1 | 0 + 1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -5 + 2 | 0 + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 04:39: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 96C79106566C; Wed, 27 Jun 2012 04:39:31 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 804BD8FC0A; Wed, 27 Jun 2012 04:39: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 q5R4dVfk081772; Wed, 27 Jun 2012 04:39:31 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5R4dVc8081763; Wed, 27 Jun 2012 04:39:31 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201206270439.q5R4dVc8081763@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 27 Jun 2012 04:39: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: r237625 - in head/usr.sbin/crunch: crunchgen crunchide X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 27 Jun 2012 04:39:31 -0000 Author: obrien Date: Wed Jun 27 04:39:30 2012 New Revision: 237625 URL: http://svn.freebsd.org/changeset/base/237625 Log: Some amount of style(9) -- function definitions, header ordering, and $FreeBSD$. Modified: head/usr.sbin/crunch/crunchgen/crunched_main.c head/usr.sbin/crunch/crunchgen/crunchgen.c head/usr.sbin/crunch/crunchide/crunchide.c Modified: head/usr.sbin/crunch/crunchgen/crunched_main.c ============================================================================== --- head/usr.sbin/crunch/crunchgen/crunched_main.c Wed Jun 27 04:39:30 2012 (r237624) +++ head/usr.sbin/crunch/crunchgen/crunched_main.c Wed Jun 27 04:39:30 2012 (r237625) @@ -22,8 +22,6 @@ * Author: James da Silva, Systems Design and Analysis Group * Computer Science Department * University of Maryland at College Park - * - * $FreeBSD$ */ /* * crunched_main.c - main program for crunched binaries, it branches to a @@ -33,6 +31,10 @@ * or calls one of them based on argv[1]. This allows the testing of * the crunched binary without creating all the links. */ + +#include +__FBSDID("$FreeBSD$"); + #include #include #include @@ -45,7 +47,8 @@ struct stub { extern char *__progname; extern struct stub entry_points[]; -int main(int argc, char **argv, char **envp) +int +main(int argc, char **argv, char **envp) { char *slash, *basename; struct stub *ep; @@ -68,7 +71,8 @@ int main(int argc, char **argv, char **e } -int crunched_here(char *path) +int +crunched_here(char *path) { char *slash, *basename; struct stub *ep; @@ -83,7 +87,8 @@ int crunched_here(char *path) } -int crunched_main(int argc, char **argv, char **envp) +int +crunched_main(int argc, char **argv, char **envp) { char *slash; struct stub *ep; @@ -99,7 +104,8 @@ int crunched_main(int argc, char **argv, } -int crunched_usage() +int +crunched_usage() { int columns, len; struct stub *ep; @@ -122,4 +128,3 @@ int crunched_usage() } /* end of crunched_main.c */ - Modified: head/usr.sbin/crunch/crunchgen/crunchgen.c ============================================================================== --- head/usr.sbin/crunch/crunchgen/crunchgen.c Wed Jun 27 04:39:30 2012 (r237624) +++ head/usr.sbin/crunch/crunchgen/crunchgen.c Wed Jun 27 04:39:30 2012 (r237625) @@ -22,8 +22,6 @@ * Author: James da Silva, Systems Design and Analysis Group * Computer Science Department * University of Maryland at College Park - * - * $FreeBSD$ */ /* * ======================================================================== @@ -32,9 +30,12 @@ * Generates a Makefile and main C file for a crunched executable, * from specs given in a .conf file. */ -#include -#include + +#include +__FBSDID("$FreeBSD$"); + #include +#include #include #include @@ -119,7 +120,8 @@ void parse_conf_file(void); void gen_outputs(void); -int main(int argc, char **argv) +int +main(int argc, char **argv) { char *p; int optc; @@ -223,7 +225,8 @@ int main(int argc, char **argv) } -void usage(void) +void +usage(void) { fprintf(stderr, "%s%s\n\t%s%s\n", "usage: crunchgen [-foq] ", "[-h ] [-m ]", @@ -255,7 +258,8 @@ prog_t *find_prog(char *str); void add_prog(char *progname); -void parse_conf_file(void) +void +parse_conf_file(void) { if (!is_nonempty_file(infilename)) errx(1, "fatal: input file \"%s\" not found", infilename); @@ -268,7 +272,8 @@ void parse_conf_file(void) } -void parse_one_file(char *filename) +void +parse_one_file(char *filename) { char *fieldv[MAXFIELDS]; int fieldc; @@ -334,7 +339,8 @@ void parse_one_file(char *filename) } -void parse_line(char *line, int *fc, char **fv, int nf) +void +parse_line(char *line, int *fc, char **fv, int nf) { char *p; @@ -365,7 +371,8 @@ void parse_line(char *line, int *fc, cha } -void add_srcdirs(int argc, char **argv) +void +add_srcdirs(int argc, char **argv) { int i; @@ -381,7 +388,8 @@ void add_srcdirs(int argc, char **argv) } -void add_progs(int argc, char **argv) +void +add_progs(int argc, char **argv) { int i; @@ -390,7 +398,8 @@ void add_progs(int argc, char **argv) } -void add_prog(char *progname) +void +add_prog(char *progname) { prog_t *p1, *p2; @@ -431,7 +440,8 @@ void add_prog(char *progname) } -void add_link(int argc, char **argv) +void +add_link(int argc, char **argv) { int i; prog_t *p = find_prog(argv[1]); @@ -452,7 +462,8 @@ void add_link(int argc, char **argv) } -void add_libs(int argc, char **argv) +void +add_libs(int argc, char **argv) { int i; @@ -466,7 +477,8 @@ void add_libs(int argc, char **argv) } -void add_libs_so(int argc, char **argv) +void +add_libs_so(int argc, char **argv) { int i; @@ -480,7 +492,8 @@ void add_libs_so(int argc, char **argv) } -void add_buildopts(int argc, char **argv) +void +add_buildopts(int argc, char **argv) { int i; @@ -489,7 +502,8 @@ void add_buildopts(int argc, char **argv } -void add_special(int argc, char **argv) +void +add_special(int argc, char **argv) { int i; prog_t *p = find_prog(argv[1]); @@ -591,7 +605,8 @@ char *genident(char *str); char *dir_search(char *progname); -void gen_outputs(void) +void +gen_outputs(void) { prog_t *p; @@ -611,7 +626,8 @@ void gen_outputs(void) /* * run the makefile for the program to find which objects are necessary */ -void fillin_program(prog_t *p) +void +fillin_program(prog_t *p) { char path[MAXPATHLEN]; char line[MAXLINELEN]; @@ -686,7 +702,8 @@ void fillin_program(prog_t *p) p->goterror = 1; } -void fillin_program_objs(prog_t *p, char *path) +void +fillin_program_objs(prog_t *p, char *path) { char *obj, *cp; int fd, rc; @@ -773,7 +790,8 @@ void fillin_program_objs(prog_t *p, char unlink(tempfname); } -void remove_error_progs(void) +void +remove_error_progs(void) { prog_t *p1, *p2; @@ -794,7 +812,8 @@ void remove_error_progs(void) } } -void gen_specials_cache(void) +void +gen_specials_cache(void) { FILE *cachef; prog_t *p; @@ -834,7 +853,8 @@ void gen_specials_cache(void) } -void gen_output_makefile(void) +void +gen_output_makefile(void) { prog_t *p; FILE *outmk; @@ -864,7 +884,8 @@ void gen_output_makefile(void) } -void gen_output_cfile(void) +void +gen_output_cfile(void) { extern char *crunched_skel[]; char **cp; @@ -952,7 +973,8 @@ char *dir_search(char *progname) } -void top_makefile_rules(FILE *outmk) +void +top_makefile_rules(FILE *outmk) { prog_t *p; @@ -1010,7 +1032,8 @@ void top_makefile_rules(FILE *outmk) } -void prog_makefile_rules(FILE *outmk, prog_t *p) +void +prog_makefile_rules(FILE *outmk, prog_t *p) { strlst_t *lst; @@ -1095,7 +1118,8 @@ void prog_makefile_rules(FILE *outmk, pr fprintf(outmk, "%s.lo\n", p->name); } -void output_strlst(FILE *outf, strlst_t *lst) +void +output_strlst(FILE *outf, strlst_t *lst) { for (; lst != NULL; lst = lst->next) if ( strlen(lst->str) ) @@ -1110,7 +1134,8 @@ void output_strlst(FILE *outf, strlst_t * */ -void status(char *str) +void +status(char *str) { static int lastlen = 0; int len, spaces; @@ -1129,13 +1154,15 @@ void status(char *str) } -void out_of_memory(void) +void +out_of_memory(void) { err(1, "%s: %d: out of memory, stopping", infilename, linenum); } -void add_string(strlst_t **listp, char *str) +void +add_string(strlst_t **listp, char *str) { strlst_t *p1, *p2; @@ -1159,7 +1186,8 @@ void add_string(strlst_t **listp, char * p1->next = p2; } -int subtract_strlst(strlst_t **lista, strlst_t **listb) +int +subtract_strlst(strlst_t **lista, strlst_t **listb) { int subtract_count = 0; strlst_t *p1; @@ -1172,7 +1200,8 @@ int subtract_strlst(strlst_t **lista, st return subtract_count; } -int in_list(strlst_t **listp, char *str) +int +in_list(strlst_t **listp, char *str) { strlst_t *p1; for (p1 = *listp; p1 != NULL; p1 = p1->next) @@ -1181,7 +1210,8 @@ int in_list(strlst_t **listp, char *str) return 0; } -int is_dir(char *pathname) +int +is_dir(char *pathname) { struct stat buf; @@ -1191,7 +1221,8 @@ int is_dir(char *pathname) return S_ISDIR(buf.st_mode); } -int is_nonempty_file(char *pathname) +int +is_nonempty_file(char *pathname) { struct stat buf; Modified: head/usr.sbin/crunch/crunchide/crunchide.c ============================================================================== --- head/usr.sbin/crunch/crunchide/crunchide.c Wed Jun 27 04:39:30 2012 (r237624) +++ head/usr.sbin/crunch/crunchide/crunchide.c Wed Jun 27 04:39:30 2012 (r237625) @@ -1,5 +1,4 @@ /* $NetBSD: crunchide.c,v 1.8 1997/11/01 06:51:45 lukem Exp $ */ -/* $FreeBSD$ */ /* * Copyright (c) 1997 Christopher G. Demetriou. All rights reserved. * Copyright (c) 1994 University of Maryland @@ -59,20 +58,22 @@ * that the final crunched binary BSS size is the max of all the * component programs' BSS sizes, rather than their sum. */ + #include #ifndef lint __RCSID("$NetBSD: crunchide.c,v 1.8 1997/11/01 06:51:45 lukem Exp $"); #endif +__FBSDID("$FreeBSD$"); +#include +#include +#include #include #include #include #include #include #include -#include -#include -#include #include "extern.h" @@ -89,9 +90,8 @@ int verbose; int main(int, char *[]); -int main(argc, argv) -int argc; -char **argv; +int +main(int argc, char **argv) { int ch, errors; @@ -127,7 +127,8 @@ char **argv; return errors; } -void usage(void) +void +usage(void) { fprintf(stderr, "usage: %s [-k ] [-f ] ...\n", @@ -142,7 +143,8 @@ struct keep { char *sym; } *keep_list; -void add_to_keep_list(char *symbol) +void +add_to_keep_list(char *symbol) { struct keep *newp, *prevp, *curp; int cmp; @@ -167,7 +169,8 @@ void add_to_keep_list(char *symbol) else keep_list = newp; } -int in_keep_list(const char *symbol) +int +in_keep_list(const char *symbol) { struct keep *curp; int cmp; @@ -180,7 +183,8 @@ int in_keep_list(const char *symbol) return curp && cmp == 0; } -void add_file_to_keep_list(char *filename) +void +add_file_to_keep_list(char *filename) { FILE *keepf; char symbol[1024]; @@ -222,7 +226,8 @@ struct { #endif }; -int hide_syms(const char *filename) +int +hide_syms(const char *filename) { int fd, i, n, rv; From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 05:23: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 24553106564A; Wed, 27 Jun 2012 05:23:34 +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 EA0F68FC08; Wed, 27 Jun 2012 05:23: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 q5R5NX0d083705; Wed, 27 Jun 2012 05:23:33 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5R5NXMO083703; Wed, 27 Jun 2012 05:23:33 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201206270523.q5R5NXMO083703@svn.freebsd.org> From: Adrian Chadd Date: Wed, 27 Jun 2012 05:23: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: r237626 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 27 Jun 2012 05:23:34 -0000 Author: adrian Date: Wed Jun 27 05:23:33 2012 New Revision: 237626 URL: http://svn.freebsd.org/changeset/base/237626 Log: Fix a subtle corner case surrounding the handling of OFDM restart along with AMPDU aggregate delimiters. If there's an OFDM restart during an aggregate, the hardware ACKs the previous frame, but communicates the RXed frame to the hardware as having had CRC delimiter error + OFDM_RESTART phy error. The frame however didn't have a CRC error and since the hardware ACKed the aggregate to the sender, it thinks the frame was received. Since I have no idea how often this occurs in the real world, add a debug statement so trigger whenever this occurs. I'd appreciate an email if someone finds this particular situation is triggered. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Wed Jun 27 04:39:30 2012 (r237625) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Wed Jun 27 05:23:33 2012 (r237626) @@ -240,11 +240,25 @@ ar5416ProcRxDesc(struct ath_hal *ah, str if (ads->ds_rxstatus8 & AR_PHYErr) { u_int phyerr; - rs->rs_status |= HAL_RXERR_PHY; + /* + * Packets with OFDM_RESTART on post delimiter are CRC OK and + * usable and MAC ACKs them. + * To avoid packet from being lost, we remove the PHY Err flag + * so that driver layer does not drop them. + */ phyerr = MS(ads->ds_rxstatus8, AR_PHYErrCode); - rs->rs_phyerr = phyerr; - } + if ((phyerr == HAL_PHYERR_OFDM_RESTART) && + (ads->ds_rxstatus8 & AR_PostDelimCRCErr)) { + ath_hal_printf(ah, + "%s: OFDM_RESTART on post-delim CRC error\n", + __func__); + rs->rs_phyerr = 0; + } else { + rs->rs_status |= HAL_RXERR_PHY; + rs->rs_phyerr = phyerr; + } + } if (ads->ds_rxstatus8 & AR_CRCErr) rs->rs_status |= HAL_RXERR_CRC; else if (ads->ds_rxstatus8 & AR_DecryptCRCErr) From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 05:50: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 44E24106564A; Wed, 27 Jun 2012 05:50:16 +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 301C58FC1A; Wed, 27 Jun 2012 05:50: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 q5R5oG3b084851; Wed, 27 Jun 2012 05:50:16 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5R5oFnE084849; Wed, 27 Jun 2012 05:50:15 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201206270550.q5R5oFnE084849@svn.freebsd.org> From: Gabor Kovesdan Date: Wed, 27 Jun 2012 05:50:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237628 - head/usr.bin/sort X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 27 Jun 2012 05:50:16 -0000 Author: gabor Date: Wed Jun 27 05:50:15 2012 New Revision: 237628 URL: http://svn.freebsd.org/changeset/base/237628 Log: - Disable threaded sort by default - Fix typo in the NLS support Modified: head/usr.bin/sort/Makefile Modified: head/usr.bin/sort/Makefile ============================================================================== --- head/usr.bin/sort/Makefile Wed Jun 27 05:38:39 2012 (r237627) +++ head/usr.bin/sort/Makefile Wed Jun 27 05:50:15 2012 (r237628) @@ -21,7 +21,7 @@ sort.1: sort.1.in CLEANFILES+= sort.1 -.if !defined(WITHOUT_THREADS) +.if defined(WITH_THREADS) CFLAGS+= -DSORT_THREADS LDFLAGS+= -lpthread -lmd MAN_SUB+= -e 's|%%THREADS%%||g' @@ -39,7 +39,7 @@ NLSSRCDIR_${lang}= ${.CURDIR}/nls .endfor .else CFLAGS+= -DWITHOUT_NLS -MAN_SUB+= -e 's|%%THREADS%%|\.\\"|g' +MAN_SUB+= -e 's|%%NLS%%|\.\\"|g' .endif .include From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 05:59: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 12A991065675; Wed, 27 Jun 2012 05:59:02 +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 D79F78FC27; Wed, 27 Jun 2012 05:59: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 q5R5x11m085274; Wed, 27 Jun 2012 05:59:01 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5R5x1sH085269; Wed, 27 Jun 2012 05:59:01 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201206270559.q5R5x1sH085269@svn.freebsd.org> From: Gabor Kovesdan Date: Wed, 27 Jun 2012 05:59: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: r237629 - in head: gnu/usr.bin/sort share/mk tools/build/options usr.bin/sort X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 27 Jun 2012 05:59:02 -0000 Author: gabor Date: Wed Jun 27 05:59:01 2012 New Revision: 237629 URL: http://svn.freebsd.org/changeset/base/237629 Log: - Switch to BSD sort as default sort. GNU sort will still be installed as "gnusort". Most of the BSD sort development work was done by Oleg Moskalenko . - GNU grep can be set to default by setting WITH_GNU_GREP. It will cause BSD sort to be installed as "bsdsort". Portbuild tested by: linimon Added: head/tools/build/options/WITH_GNU_SORT (contents, props changed) Deleted: head/tools/build/options/WITH_BSD_SORT Modified: head/gnu/usr.bin/sort/Makefile head/share/mk/bsd.own.mk head/usr.bin/sort/Makefile Modified: head/gnu/usr.bin/sort/Makefile ============================================================================== --- head/gnu/usr.bin/sort/Makefile Wed Jun 27 05:50:15 2012 (r237628) +++ head/gnu/usr.bin/sort/Makefile Wed Jun 27 05:59:01 2012 (r237629) @@ -5,7 +5,7 @@ SORTDIR= ${.CURDIR}/../../../contrib/gnu .include -.if ${MK_BSD_SORT} != "yes" +.if ${MK_GNU_SORT} == "yes" PROG= sort .else PROG= gnusort Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Wed Jun 27 05:50:15 2012 (r237628) +++ head/share/mk/bsd.own.mk Wed Jun 27 05:59:01 2012 (r237629) @@ -415,7 +415,6 @@ __DEFAULT_YES_OPTIONS = \ __DEFAULT_NO_OPTIONS = \ BSD_GREP \ - BSD_SORT \ BIND_IDN \ BIND_LARGE_FILE \ BIND_LIBS \ @@ -424,6 +423,7 @@ __DEFAULT_NO_OPTIONS = \ CLANG_EXTRAS \ CLANG_IS_CC \ CTF \ + GNU_SORT \ HESIOD \ ICONV \ IDEA \ Added: head/tools/build/options/WITH_GNU_SORT ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_GNU_SORT Wed Jun 27 05:59:01 2012 (r237629) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Install GNU-licensed sort as 'sort' instead of BSD sort. Modified: head/usr.bin/sort/Makefile ============================================================================== --- head/usr.bin/sort/Makefile Wed Jun 27 05:50:15 2012 (r237628) +++ head/usr.bin/sort/Makefile Wed Jun 27 05:59:01 2012 (r237629) @@ -2,7 +2,7 @@ .include -.if ${MK_BSD_SORT} == "yes" +.if ${MK_GNU_SORT} != "yes" PROG= sort .else PROG= bsdsort From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 06:00: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 55045106568B; Wed, 27 Jun 2012 06:00:59 +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 3FE888FC1F; Wed, 27 Jun 2012 06:00: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 q5R60xqJ085410; Wed, 27 Jun 2012 06:00:59 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5R60xnw085408; Wed, 27 Jun 2012 06:00:59 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201206270600.q5R60xnw085408@svn.freebsd.org> From: Gabor Kovesdan Date: Wed, 27 Jun 2012 06:00: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: r237630 - 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: Wed, 27 Jun 2012 06:00:59 -0000 Author: gabor Date: Wed Jun 27 06:00:58 2012 New Revision: 237630 URL: http://svn.freebsd.org/changeset/base/237630 Log: - Regen after BSD sort change Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Wed Jun 27 05:59:01 2012 (r237629) +++ head/share/man/man5/src.conf.5 Wed Jun 27 06:00:58 2012 (r237630) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 236279 2012-05-30 02:37:20Z gjb .\" $FreeBSD$ -.Dd May 29, 2012 +.Dd June 27, 2012 .Dt SRC.CONF 5 .Os .Sh NAME @@ -227,9 +227,6 @@ 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 @@ -440,6 +437,9 @@ When set, it also enforces the following .It .Va WITHOUT_GNU_SUPPORT .El +.It Va WITH_GNU_SORT +.\" from FreeBSD: head/tools/build/options/WITH_GNU_SORT 237629 2012-06-27 05:59:01Z gabor +Install GNU-licensed sort as 'sort' instead of BSD sort. .It Va WITHOUT_GNU_SUPPORT .\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without optional GNU support. From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 06:08: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 7CCBE1065674; Wed, 27 Jun 2012 06:08:03 +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 67DF38FC16; Wed, 27 Jun 2012 06:08:03 +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 q5R683WZ085744; Wed, 27 Jun 2012 06:08:03 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5R683EX085742; Wed, 27 Jun 2012 06:08:03 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201206270608.q5R683EX085742@svn.freebsd.org> From: Gabor Kovesdan Date: Wed, 27 Jun 2012 06:08:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237631 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2012 06:08:03 -0000 Author: gabor Date: Wed Jun 27 06:08:02 2012 New Revision: 237631 URL: http://svn.freebsd.org/changeset/base/237631 Log: - Bump __FreeBSD_version: default sort is BSD sort Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Wed Jun 27 06:00:58 2012 (r237630) +++ head/sys/sys/param.h Wed Jun 27 06:08:02 2012 (r237631) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000013 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000014 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 06:49: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 4F61710657AF for ; Wed, 27 Jun 2012 06:49:17 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id B972C8FC19 for ; Wed, 27 Jun 2012 06:49:16 +0000 (UTC) Received: by obbun3 with SMTP id un3so1327505obb.13 for ; Tue, 26 Jun 2012 23:49:16 -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=Lce6Z3of1cGFWMyBLO0RpgeRFv1u87j2jt0rauX4r5s=; b=g0qjzHEZWcohYfVy8VZGH1p7r5nJJfrx14zHiar/DfhmbwBn2hn0bv3cuJKUmyubUQ glw7UWEzh1wqtuMUXAz28LzBlU7dRwBxL9r+Is92BXVRTnMrYRcbaC5vlnaMdOgEVID5 7a7K+V06DgBWKnmdW4LCy3/6BhvwExLYlS5yA= 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=Lce6Z3of1cGFWMyBLO0RpgeRFv1u87j2jt0rauX4r5s=; b=StWPERt32iYcOspMmF1VcUMoai3Ptv1Qh0ywvKwpZ0x20Ki+n67dAboJmtCP3rZn70 i1iJA696r2ghrX82PGsXqRd+JU67/PAu+wC9DA9AJd5KRUEbYoSxt1Y7g1jkL9bCmCBu pTsUanpp3JkYbbBLcs1GQ4EfiwDPe3LwG31Zpro4HiU6D/l3E6OOdL+tDDfTDPTriKBc zUiB+GwKBu9r7Fhd5ZjVjyZr7NyInuTxnp56S87lEGe0nIu+ioR+qtGMXimvUyU8TZkf wwugZSzJMaXzR52o3IkTx5KaFdepkRdU0gPd0CRwxK3XVAXELK6cCj7E0K5zxVGrUjwt 8o1A== Received: by 10.60.14.68 with SMTP id n4mr19106345oec.24.1340779756360; Tue, 26 Jun 2012 23:49:16 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.182.125.70 with HTTP; Tue, 26 Jun 2012 23:48:46 -0700 (PDT) In-Reply-To: <201206270550.q5R5oFnE084849@svn.freebsd.org> References: <201206270550.q5R5oFnE084849@svn.freebsd.org> From: Eitan Adler Date: Tue, 26 Jun 2012 23:48:46 -0700 X-Google-Sender-Auth: UuHzNpcJg39S6z6aYSfVbUe32OE Message-ID: To: Gabor Kovesdan Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQnPkCt7BsmA3kMFd8XJWDI/CGYWPZOtF4MQgM2Bmr5ObUproh4AZ4xtRjKy6AHcrbRc6oLc Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237628 - head/usr.bin/sort X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 27 Jun 2012 06:49:17 -0000 On 26 June 2012 22:50, Gabor Kovesdan wrote: > Author: gabor > Date: Wed Jun 27 05:50:15 2012 > New Revision: 237628 > URL: http://svn.freebsd.org/changeset/base/237628 > > Log: > =C2=A0- Disable threaded sort by default Curious, why? > =C2=A0- Fix typo in the NLS support --=20 Eitan Adler Source & Ports committer X11, Bugbusting teams From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 07:41:21 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 AC9621065670; Wed, 27 Jun 2012 07:41:21 +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 950958FC0C; Wed, 27 Jun 2012 07:41: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 q5R7fLeF090352; Wed, 27 Jun 2012 07:41:21 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5R7fL9R090350; Wed, 27 Jun 2012 07:41:21 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201206270741.q5R7fL9R090350@svn.freebsd.org> From: Joel Dahl Date: Wed, 27 Jun 2012 07:41: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: r237635 - head/contrib/traceroute X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 27 Jun 2012 07:41:21 -0000 Author: joel (doc committer) Date: Wed Jun 27 07:41:21 2012 New Revision: 237635 URL: http://svn.freebsd.org/changeset/base/237635 Log: mdocify and update the traceroute(8) manual page. Reviewed by: brueffer No objection: ru, uqs Modified: head/contrib/traceroute/traceroute.8 Modified: head/contrib/traceroute/traceroute.8 ============================================================================== --- head/contrib/traceroute/traceroute.8 Wed Jun 27 06:41:14 2012 (r237634) +++ head/contrib/traceroute/traceroute.8 Wed Jun 27 07:41:21 2012 (r237635) @@ -16,113 +16,64 @@ .\" $Id: traceroute.8,v 1.19 2000/09/21 08:44:19 leres Exp $ .\" $FreeBSD$ .\" -.TH TRACEROUTE 8 "19 February 2008" -.UC 6 -.SH NAME -traceroute \- print the route packets take to network host -.SH SYNOPSIS -.na -.B traceroute -[ -.B \-adDeFISnrvx -] [ -.B \-f -.I first_ttl -] [ -.B \-g -.I gateway -] -.br -.ti +8 -[ -.B \-i -.I iface -] [ -.B \-M -.I first_ttl -] -.br -.ti +8 -[ -.B \-m -.I max_ttl -] [ -.B \-P -.I proto -] [ -.B \-p -.I port -] -.br -.ti +8 -[ -.B \-q -.I nqueries -] [ -.B \-s -.I src_addr -] [ -.B \-t -.I tos -] -.br -.ti +8 -[ -.B \-w -.I waittime -] [ -.B \-A -.I as_server -] [ -.B \-z -.I pausemsecs -] -.br -.ti +8 -.I host -[ -.I packetlen -] -.ad -.SH DESCRIPTION +.Dd June 19, 2012 +.Dt TRACEROUTE 8 +.Os +.Sh NAME +.Nm traceroute +.Nd "print the route packets take to network host" +.Sh SYNOPSIS +.Nm +.Bk -words +.Op Fl adDeFISnrvx +.Op Fl f Ar first_ttl +.Op Fl g Ar gateway +.Op Fl M Ar first_ttl +.Op Fl m Ar max_ttl +.Op Fl P Ar proto +.Op Fl p Ar port +.Op Fl q Ar nqueries +.Op Fl s Ar src_addr +.Op Fl t Ar tos +.Op Fl w Ar waittime +.Op Fl A Ar as_server +.Op Fl z Ar pausemsecs +.Ar host +.Op Ar packetlen +.Ek +.Sh DESCRIPTION The Internet is a large and complex aggregation of network hardware, connected together by gateways. Tracking the route one's packets follow (or finding the miscreant gateway that's discarding your packets) can be difficult. -.I Traceroute +.Nm utilizes the IP protocol `time to live' field and attempts to elicit an ICMP TIME_EXCEEDED response from each gateway along the path to some host. -.PP +.Pp The only mandatory parameter is the destination host name or IP number. The default probe datagram length is 40 bytes, but this may be increased by specifying a packet length (in bytes) after the destination host name. -.PP +.Pp Other options are: -.TP -.B \-a +.Bl -tag -width Ds +.It Fl a Turn on AS# lookups for each hop encountered. -.TP -.B -A +.It Fl A Ar as_server Turn on AS# lookups and use the given server instead of the default. -.TP -.B \-e +.It Fl e Firewall evasion mode. Use fixed destination ports for UDP and TCP probes. The destination port does NOT increment with each packet sent. -.TP -.B \-f +.It Fl f Ar first_ttl Set the initial time-to-live used in the first outgoing probe packet. -.TP -.B \-F +.It Fl F Set the "don't fragment" bit. -.TP -.B \-d +.It Fl d Enable socket level debugging. -.TP -.B \-D +.It Fl D When an ICMP response to our probe datagram is received, print the differences between the transmitted packet and the packet quoted by the ICMP response. @@ -133,74 +84,66 @@ Bytes that are unchanged in the quoted p Note, the IP checksum and the TTL of the quoted packet are not expected to match. By default, only one probe per hop is sent with this option. -.TP -.B \-g +.It Fl g Ar gateway Specify a loose source route gateway (8 maximum). -.TP -.B \-i +.It Fl i Ar iface Specify a network interface to obtain the source IP address for outgoing probe packets. This is normally only useful on a multi-homed host. (See the -.B \-s +.Fl s flag for another way to do this.) -.TP -.B \-I +.It Fl I Use ICMP ECHO instead of UDP datagrams. (A synonym for "-P icmp"). -.TP -.B \-M +.It Fl M Ar first_ttl Set the initial time-to-live value used in outgoing probe packets. The default is 1, i.e., start with the first hop. -.TP -.B \-m +.It Fl m Ar max_ttl Set the max time-to-live (max number of hops) used in outgoing probe -packets. The default is -.I net.inet.ip.ttl -hops (the same default used for TCP +packets. The default is the value of the +.Va net.inet.ip.ttl +.Xr sysctl 8 +(the same default used for TCP connections). -.TP -.B \-n +.It Fl n Print hop addresses numerically rather than symbolically and numerically (saves a nameserver address-to-name lookup for each gateway found on the path). -.TP -.B \-P +.It Fl P Ar proto Send packets of specified IP protocol. The currently supported protocols are: UDP, TCP, GRE and ICMP. Other protocols may also be specified (either by name or by number), though -.I traceroute +.Nm does not implement any special knowledge of their packet formats. This option is useful for determining which router along a path may be blocking packets based on IP protocol number. But see BUGS below. -.TP -.B \-p +.It Fl p Ar port Protocol specific. For UDP and TCP, sets -the base port number used in probes (default is 33434). +the base +.Ar port +number used in probes (default is 33434). Traceroute hopes that nothing is listening on UDP ports -.I base +.Em base to -.I base + nhops * nprobes - 1 +.Em base + nhops * nprobes - 1 at the destination host (so an ICMP PORT_UNREACHABLE message will be returned to terminate the route tracing). If something is listening on a port in the default range, this option can be used to pick an unused port range. -.TP -.B \-q +.It Fl q Ar nqueries Set the number of probes per hop (default is 3, unless -.B -D +.Fl D is specified, when it is 1). -.TP -.B \-r +.It Fl r Bypass the normal routing tables and send directly to a host on an attached network. If the host is not on a directly-attached network, an error is returned. This option can be used to ping a local host through an interface that has no route through it (e.g., after the interface was dropped by -.IR routed (8C)). -.TP -.B \-s +.Xr routed 8 . +.It Fl s Ar src_addr Use the following IP address (which usually is given as an IP number, not a hostname) as the source address in outgoing probe packets. On multi-homed hosts (those with more than one IP @@ -209,15 +152,13 @@ force the source address to be something of the interface the probe packet is sent on. If the IP address is not one of this machine's interface addresses, an error is returned and nothing is sent. (See the -.B \-i +.Fl i flag for another way to do this.) -.TP -.B \-S +.It Fl S Print a summary of how many probes were not answered for each hop. -.TP -.B \-t +.It Fl t Ar tos Set the -.I type-of-service +.Em type-of-service in probe packets to the following value (default zero). The value must be a decimal integer in the range 0 to 255. This option can be used to see if different types-of-service result in different paths. (If you @@ -226,72 +167,69 @@ services like telnet and ftp don't let y Not all values of TOS are legal or meaningful \- see the IP spec for definitions. Useful values are probably -.RB ` -t -.IR 16 ' +.Fl t Ar 16 (low delay) and -.RB ` -t -.IR 8 ' +.Fl t Ar 8 (high throughput). -.TP -.B \-v -Verbose output. Received ICMP packets other than TIME_EXCEEDED and -UNREACHABLEs are listed. -.TP -.B \-w +.It Fl v +Verbose output. Received ICMP packets other than +.Dv TIME_EXCEEDED +and +.Dv UNREACHABLE Ns s +are listed. +.It Fl w Ar waittime Set the time (in seconds) to wait for a response to a probe (default 5 sec.). -.TP -.B \-x +.It Fl x Toggle ip checksums. Normally, this prevents traceroute from calculating ip checksums. In some cases, the operating system can overwrite parts of the outgoing packet but not recalculate the checksum (so in some cases the default is to not calculate checksums and using -.B \-x +.Fl x causes them to be calculated). Note that checksums are usually required for the last hop when using ICMP ECHO probes -.RB ( \-I ). +.Pq Fl I . So they are always calculated when using ICMP. -.TP -.B \-z +.It Fl z Ar pausemsecs Set the time (in milliseconds) to pause between probes (default 0). Some systems such as Solaris and routers such as Ciscos rate limit icmp messages. A good value to use with this this is 500 (e.g. 1/2 second). -.PP +.El +.Pp This program attempts to trace the route an IP packet would follow to some internet host by launching UDP probe packets with a small ttl (time to live) then listening for an ICMP "time exceeded" reply from a gateway. We start our probes with a ttl of one and increase by one until we get an ICMP "port unreachable" (which means we got to "host") or hit a max (which -defaults to -.I net.inet.ip.ttl -hops & can be changed with the -.B \-m +defaults to the amount of hops specified by the +.Va net.inet.ip.ttl +.Xr sysctl 8 +and can be changed with the +.Fl m flag). Three probes (change with -.B \-q +.Fl q flag) are sent at each ttl setting and a line is printed showing the ttl, address of the gateway and round trip time of each probe. If the probe answers come from different gateways, the address of each responding system will be printed. If there is no response within a 5 sec. timeout interval (changed with the -.B \-w +.Fl w flag), a "*" is printed for that probe. -.PP +.Pp We don't want the destination host to process the UDP probe packets so the destination port is set to an unlikely value (if some clod on the destination is using that value, it can be changed with the -.B \-p +.Fl p flag). -.PP +.Pp A sample use and output might be: - -.RS -.nf -[yak 71]% traceroute nis.nsf.net. +.Bd -literal -offset 4n +% traceroute nis.nsf.net. traceroute to nis.nsf.net (35.1.1.48), 64 hops max, 38 byte packet 1 helios.ee.lbl.gov (128.3.112.1) 19 ms 19 ms 0 ms 2 lilac-dmc.Berkeley.EDU (128.32.216.1) 39 ms 39 ms 19 ms @@ -304,21 +242,18 @@ traceroute to nis.nsf.net (35.1.1.48), 6 9 129.140.71.6 (129.140.71.6) 139 ms 239 ms 319 ms 10 129.140.81.7 (129.140.81.7) 220 ms 199 ms 199 ms 11 nic.merit.edu (35.1.1.48) 239 ms 239 ms 239 ms -.fi -.RE - +.Ed +.Pp Note that lines 2 & 3 are the same. This is due to a buggy kernel on the 2nd hop system \- lilac-dmc.Berkeley.EDU \- that forwards packets with a zero ttl (a bug in the distributed version of 4.3BSD). Note that you have to guess what path the packets are taking cross-country since the NSFNet (129.140) doesn't supply address-to-name translations for its NSSes. -.PP +.Pp A more interesting example is: - -.RS -.nf -[yak 72]% traceroute allspice.lcs.mit.edu. +.Bd -literal -offset 4n +% traceroute allspice.lcs.mit.edu. traceroute to allspice.lcs.mit.edu (18.26.0.115), 64 hops max 1 helios.ee.lbl.gov (128.3.112.1) 0 ms 0 ms 0 ms 2 lilac-dmc.Berkeley.EDU (128.32.216.1) 19 ms 19 ms 19 ms @@ -338,15 +273,14 @@ traceroute to allspice.lcs.mit.edu (18.2 16 * * * 17 * * * 18 ALLSPICE.LCS.MIT.EDU (18.26.0.115) 339 ms 279 ms 279 ms -.fi -.RE - +.Ed +.Pp Note that the gateways 12, 14, 15, 16 & 17 hops away either don't send ICMP "time exceeded" messages or send them with a ttl too small to reach us. 14 \- 17 are running the MIT C Gateway code that doesn't send "time exceeded"s. God only knows what's going on with 12. -.PP +.Pp The silent gateway 12 in the above may be the result of a bug in the 4.[23]BSD network code (and its derivatives): 4.x (x <= 3) sends an unreachable message using whatever ttl remains in the @@ -354,9 +288,7 @@ original datagram. Since, for gateways, zero, the ICMP "time exceeded" is guaranteed to not make it back to us. The behavior of this bug is slightly more interesting when it appears on the destination system: - -.RS -.nf +.Bd -literal -offset 4n 1 helios.ee.lbl.gov (128.3.112.1) 0 ms 0 ms 0 ms 2 lilac-dmc.Berkeley.EDU (128.32.216.1) 39 ms 19 ms 39 ms 3 lilac-dmc.Berkeley.EDU (128.32.216.1) 19 ms 39 ms 19 ms @@ -370,9 +302,8 @@ when it appears on the destination syste 11 * * * 12 * * * 13 rip.Berkeley.EDU (128.32.131.22) 59 ms ! 39 ms ! 39 ms ! -.fi -.RE - +.Ed +.Pp Notice that there are 12 "gateways" (13 is the final destination) and exactly the last half of them are "missing". What's really happening is that rip (a Sun-3 running Sun OS3.5) @@ -383,77 +314,82 @@ ICMP's) until we probe with a ttl that's length. I.e., rip is really only 7 hops away. A reply that returns with a ttl of 1 is a clue this problem exists. Traceroute prints a "!" after the time if the ttl is <= 1. -Since vendors ship a lot of obsolete (DEC's Ultrix, Sun 3.x) or -non-standard (HPUX) software, expect to see this problem +Since vendors ship a lot of obsolete +.Pf ( Tn DEC Ns \'s +Ultrix, Sun 3.x) or +non-standard +.Pq Tn HP-UX +software, expect to see this problem frequently and/or take care picking the target host of your probes. - -Other possible annotations after the time are -.BR !H , -.BR !N , -or -.B !P -(host, network or protocol unreachable), -.B !S -(source route failed), -.B !F\- -(fragmentation needed \- the RFC1191 Path MTU Discovery value is displayed), -.B !U -or -.B !W -(destination network/host unknown), -.B !I -(source host is isolated), -.B !A -(communication with destination network administratively prohibited), -.B !Z -(communication with destination host administratively prohibited), -.B !Q -(for this ToS the destination network is unreachable), -.B !T -(for this ToS the destination host is unreachable), -.B !X -(communication administratively prohibited), -.B !V -(host precedence violation), -.B !C -(precedence cutoff in effect), or -.B ! -(ICMP unreachable code ). +.Pp +Other possible annotations after the time are: +.Bl -hang -offset indent -width 12n +.It Sy !H +Host unreachable. +.It Sy !N +Network unreachable. +.It Sy !P +Protocol unreachable. +.It Sy !S +Source route failed. +.It Sy !F\- +Fragmentation needed. +The RFC1191 Path MTU Discovery value is displayed. +.It Sy !U +Destination network unknown. +.It Sy !W +Destination host unknown. +.It Sy !I +Source host is isolated. +.It Sy !A +Communication with destination network administratively prohibited. +.It Sy !Z +Communication with destination host administratively prohibited. +.It Sy !Q +For this ToS the destination network is unreachable. +.It Sy !T +For this ToS the destination host is unreachable. +.It Sy !X +Communication administratively prohibited. +.It Sy !V +Host precedence violation. +.It Sy !C +Precedence cutoff in effect. +.It Sy ! +ICMP unreachable code . +.El +.Pp These are defined by RFC1812 (which supersedes RFC1716). -If almost all the probes result in some kind of unreachable, traceroute +If almost all the probes result in some kind of unreachable, +.Nm will give up and exit. -.PP +.Pp This program is intended for use in network testing, measurement and management. It should be used primarily for manual fault isolation. Because of the load it could impose on the network, it is unwise to use -.I traceroute +.Nm during normal operations or from automated scripts. -.SH SEE ALSO -pathchar(8), netstat(1), ping(8) -.SH AUTHOR +.Sh SEE ALSO +.Xr netstat 1 , +.Xr ping 8 , +.Xr ping6 8 , +.Xr traceroute6 8 . +.Sh AUTHORS Implemented by Van Jacobson from a suggestion by Steve Deering. Debugged by a cast of thousands with particularly cogent suggestions or fixes from C. Philip Wood, Tim Seaver and Ken Adelman. -.LP -The current version is available via anonymous ftp: -.LP -.RS -.I ftp://ftp.ee.lbl.gov/traceroute.tar.gz -.RE -.SH BUGS +.Sh BUGS When using protocols other than UDP, functionality is reduced. In particular, the last packet will often appear to be lost, because even though it reaches the destination host, there's no way to know that because no ICMP message is sent back. In the TCP case, -.I traceroute +.Nm should listen for a RST from the destination host (or an intermediate router that's filtering packets), but this is not implemented yet. -.PP -Please send bug reports to traceroute@ee.lbl.gov. -.PP +.Pp The AS number capability reports information that may sometimes be inaccurate due to discrepancies between the contents of the routing database server and the current state of the Internet. From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 10:07: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 6C528106566B; Wed, 27 Jun 2012 10:07:30 +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 55CED8FC18; Wed, 27 Jun 2012 10:07: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 q5RA7URD096455; Wed, 27 Jun 2012 10:07:30 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5RA7UW2096452; Wed, 27 Jun 2012 10:07:30 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201206271007.q5RA7UW2096452@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 27 Jun 2012 10:07:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237636 - 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: Wed, 27 Jun 2012 10:07:30 -0000 Author: trasz Date: Wed Jun 27 10:07:29 2012 New Revision: 237636 URL: http://svn.freebsd.org/changeset/base/237636 Log: Add manual page for bxe(4). Reviewed by: davidch (earlier version) MFC after: 1 week Added: head/share/man/man4/bxe.4 (contents, props changed) Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Wed Jun 27 07:41:21 2012 (r237635) +++ head/share/man/man4/Makefile Wed Jun 27 10:07:29 2012 (r237636) @@ -36,6 +36,7 @@ MAN= aac.4 \ ${_amdsbwd.4} \ ${_amdsmb.4} \ ${_amdtemp.4} \ + ${_bxe.4} \ amr.4 \ an.4 \ ${_apic.4} \ @@ -562,6 +563,7 @@ MLINKS+=bktr.4 brooktree.4 MLINKS+=bridge.4 if_bridge.4 MLINKS+=bwi.4 if_bwi.4 MLINKS+=bwn.4 if_bwn.4 +MLINKS+=${_bxe.4} ${_if_bxe.4} MLINKS+=cas.4 if_cas.4 MLINKS+=cdce.4 if_cdce.4 MLINKS+=crypto.4 cryptodev.4 @@ -714,6 +716,7 @@ _amdsmb.4= amdsmb.4 _amdtemp.4= amdtemp.4 _asmc.4= asmc.4 _atp.4= atp.4 +_bxe.4= bxe.4 _coretemp.4= coretemp.4 _cpuctl.4= cpuctl.4 _dpms.4= dpms.4 @@ -723,6 +726,7 @@ _hptmv.4= hptmv.4 _hptrr.4= hptrr.4 _i8254.4= i8254.4 _ichwd.4= ichwd.4 +_if_bxe.4= if_bxe.4 _if_ndis.4= if_ndis.4 _if_nfe.4= if_nfe.4 _if_nve.4= if_nve.4 Added: head/share/man/man4/bxe.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/bxe.4 Wed Jun 27 10:07:29 2012 (r237636) @@ -0,0 +1,138 @@ +.\" Copyright (c) 2012 Edward Tomasz Napierala +.\" 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 AUTHORS 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 AUTHORS 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$ +.\" +.Dd June 25, 2012 +.Dt BXE 4 +.Os +.Sh NAME +.Nm bxe +.Nd "Broadcom BCM57710/BCM57711/BCM57711E 10Gb Ethernet adapter driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device bxe" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_bxe_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for PCIe 10GbE Ethernet adapters based on +BCM5771x chips. +The driver supports Jumbo Frames, VLAN tagging, IP, UDP and TCP checksum +offload, MSI-X, TCP Segmentation Offload (TSO), Large Receive Offload (LRO), +and Receive Side Steering (RSS). +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver provides support for various NICs based on the Broadcom BCM5771x +family of 10GbE Ethernet controller chips, including the +following: +.Pp +.Bl -bullet -compact +.It +Broadcom NetXtreme II BCM57710 10GbE +.It +Broadcom NetXtreme II BCM57711 10GbE +.It +Broadcom NetXtreme II BCM57711E 10GbE +.El +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width indent +.It Va hw.bxe.dcc_enable +Enable HP Flex-10 support. +Allowed values are 0 to disable and 1 to enable. +The default value is 0. +.It Va hw.bxe.tso_enable +Enable TCP Segmentation Offload. +The default value is 1. +.It Va hw.bxe.int_mode +Set interrupt mode. +Allowed values are 0 for IRQ, 1 for MSI/IRQ and 2 for MSI-X/MSI/IRQ. +The default value is 2. +.It Va hw.bxe.queue_count +Specify the number of queues that will be used when a multi-queue +RSS mode is selected using bxe_multi_mode. +Allowed values are 0 for Auto or 1 to 16 for fixed number of queues. +The default value is 0. +.It Va hw.bxe.multi_mode +Enable Receive Side Steering. +Allowed values are 0, which disables all multi-queue/packet sorting +algorithms, and 1, which assigns incoming frames to receive queues +according to RSS. +The default value is 0. +.It Va hw.bxe.rx_ticks +Control interrupt coalescing for received frames. +The first frame always causes an interrupt, but subsequent frames +are coalesced until the RX/TX ticks timer value expires and another +interrupt occurs. +The default value is 25. +.It Va hw.bxe.tx_ticks +Control interrupt coalescing for trasmitted frames. +The first frame always causes an interrupt, but subsequent frames +are coalesced until the RX/TX ticks timer value expires and another +interrupt occurs. +The default value is 50. +.It Va hw.bxe.mrrs +Allows to set the PCIe maximum read request size. +Allowed values are -1 for Auto, 0 for 128B, 1 for 256B, 2 for 512B, +and 3 for 1kB. +The default value is -1. +.El +.Sh SEE ALSO +.Xr altq 4 , +.Xr arp 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr vlan 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 9.0 . +.Sh AUTHORS +The +.Nm +driver was written by +.An Gary Zambrano Aq zambrano@broadcom.com +and +.An David Christensen Aq davidch@broadcom.com . From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 12:19: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 D84D21065670; Wed, 27 Jun 2012 12:19:28 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C2FB28FC17; Wed, 27 Jun 2012 12:19:28 +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 q5RCJS7t009954; Wed, 27 Jun 2012 12:19:28 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5RCJSHD009952; Wed, 27 Jun 2012 12:19:28 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201206271219.q5RCJSHD009952@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 27 Jun 2012 12:19:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237645 - head/sbin/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: Wed, 27 Jun 2012 12:19:28 -0000 Author: gavin Date: Wed Jun 27 12:19:28 2012 New Revision: 237645 URL: http://svn.freebsd.org/changeset/base/237645 Log: The -S option, to specify the sector size, has been usable on all types of memory disks since r135340. Update the man page to reflect this. Noticed by: avg MFC after: 3 days Modified: head/sbin/mdconfig/mdconfig.8 Modified: head/sbin/mdconfig/mdconfig.8 ============================================================================== --- head/sbin/mdconfig/mdconfig.8 Wed Jun 27 12:00:35 2012 (r237644) +++ head/sbin/mdconfig/mdconfig.8 Wed Jun 27 12:19:28 2012 (r237645) @@ -41,7 +41,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 21, 2012 +.Dd June 27, 2012 .Dt MDCONFIG 8 .Os .Sh NAME @@ -148,7 +148,7 @@ and .Fl t Ar swap options are implied if not specified. .It Fl S Ar sectorsize -Sectorsize to use for malloc backed device. +Sectorsize to use for the memory disk, in bytes. .It Fl x Ar sectors/track See the description of the .Fl y From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 12:22:48 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 EC4C010657AB; Wed, 27 Jun 2012 12:22:48 +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 BD9EB8FC12; Wed, 27 Jun 2012 12:22:48 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id C3090B922; Wed, 27 Jun 2012 08:22:47 -0400 (EDT) From: John Baldwin To: Marius Strobl Date: Wed, 27 Jun 2012 07:47:37 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201206131504.q5DF4opt031336@svn.freebsd.org> <201206251424.24621.jhb@freebsd.org> <20120626211445.GB63893@alchemy.franken.de> In-Reply-To: <20120626211445.GB63893@alchemy.franken.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201206270747.37859.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 27 Jun 2012 08:22:47 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237008 - head/sys/dev/pci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2012 12:22:49 -0000 On Tuesday, June 26, 2012 5:14:45 pm Marius Strobl wrote: > Yes, it does but switching to positive decoding nevertheless is > problematic in this case. According to the PCI 2.3 specification, > a child wanting its addresses to be decoded subtractively needs > to provide special DEVSEL# behavior. It seems that it should work > for a bridge to actually positively decoding such transactions, > but I'm not familiar with the physical layer of PCI and thus not > sure. On the other hand, both the PCI-ISA and PCI-PCI bridges > in question are ALi/ULi crap and based on fun I had with their > chips in the past, I also wouldn't be surprised their again being > a magic bit in the configuration space needing to be set to make > this work. Unfortunately, I don't have a datasheet for this > M5249 PCI-PCI bridge. If we'd implement a tunable for changing > the decoding of subtractive bridges, the way to go would seem to > be to have it off by default in order to preserve pre-NEW_PCIB/ > r237008 as at this time it's unknown how many bridges are > affected. If you'd want to keep the new/current behavior by > default, introducing something like a PCIB_SUBTRACTIVE_FORCED > flag along a PCI_QUIRK_SUB_FORCED quirk in addition to a > tuneable defaulting to on probably would be a good idea. Hmm. I'm fine with your original change going in then. I am not really sure what the right way to handle this is, and just leaving the windows alone on subtractive bridges is probably safest. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 12:30: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 04BAC106566B; Wed, 27 Jun 2012 12:30:57 +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 E392F8FC22; Wed, 27 Jun 2012 12:30: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 q5RCUuu0010450; Wed, 27 Jun 2012 12:30:56 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5RCUuwf010448; Wed, 27 Jun 2012 12:30:56 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201206271230.q5RCUuwf010448@svn.freebsd.org> From: John Baldwin Date: Wed, 27 Jun 2012 12:30: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: r237646 - head/usr.bin/top X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 27 Jun 2012 12:30:57 -0000 Author: jhb Date: Wed Jun 27 12:30:56 2012 New Revision: 237646 URL: http://svn.freebsd.org/changeset/base/237646 Log: Clarify that the cached file data pages included in the "Wired" count in top are the BIO-level cached data (i.e. "Buf"), since the previous phrase was a bit ambiguous with the "Cache" count. MFC after: 3 days Modified: head/usr.bin/top/top.local.1 Modified: head/usr.bin/top/top.local.1 ============================================================================== --- head/usr.bin/top/top.local.1 Wed Jun 27 12:19:28 2012 (r237645) +++ head/usr.bin/top/top.local.1 Wed Jun 27 12:30:56 2012 (r237646) @@ -24,7 +24,7 @@ number of bytes active number of bytes inactive .TP .B Wired: -number of bytes wired down, including cached file data pages +number of bytes wired down, including BIO-level cached file data pages .TP .B Cache: number of clean bytes caching data that are available for From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 15:55: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 8E85C106572D; Wed, 27 Jun 2012 15:55:34 +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 AE8F18FC14; Wed, 27 Jun 2012 15:55: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 q5RFtY4u018894; Wed, 27 Jun 2012 15:55:34 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5RFtY1V018892; Wed, 27 Jun 2012 15:55:34 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201206271555.q5RFtY1V018892@svn.freebsd.org> From: Bernhard Schmidt Date: Wed, 27 Jun 2012 15:55: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: r237647 - head/sys/dev/iwn X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 27 Jun 2012 15:55:35 -0000 Author: bschmidt Date: Wed Jun 27 15:55:34 2012 New Revision: 237647 URL: http://svn.freebsd.org/changeset/base/237647 Log: Fix a TX aggregation issue, if after the last compressed BA notification the TX queue is empty, there won't be a TX done notification, effectly resulting in an mbuf leak. The correct way to handle this is to free up mbufs on both BA and TX done notifications up to the last sent seqno. Tested by: osa@ MFC after: 3 days Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Wed Jun 27 12:30:56 2012 (r237646) +++ head/sys/dev/iwn/if_iwn.c Wed Jun 27 15:55:34 2012 (r237647) @@ -2437,18 +2437,43 @@ iwn_rx_compressed_ba(struct iwn_softc *s struct ieee80211_node *ni; struct iwn_compressed_ba *ba = (struct iwn_compressed_ba *)(desc + 1); struct iwn_tx_ring *txq; + struct iwn_tx_data *txdata; struct ieee80211_tx_ampdu *tap; + struct mbuf *m; uint64_t bitmap; uint8_t tid; - int ackfailcnt = 0, i, shift; + int ackfailcnt = 0, i, lastidx, qid, shift; bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); - txq = &sc->txq[le16toh(ba->qid)]; - tap = sc->qid2tap[le16toh(ba->qid)]; + qid = le16toh(ba->qid); + txq = &sc->txq[ba->qid]; + tap = sc->qid2tap[ba->qid]; tid = tap->txa_tid; - ni = tap->txa_ni; - wn = (void *)ni; + wn = (void *)tap->txa_ni; + + for (lastidx = le16toh(ba->ssn) & 0xff; txq->read != lastidx;) { + txdata = &txq->data[txq->read]; + + /* Unmap and free mbuf. */ + bus_dmamap_sync(txq->data_dmat, txdata->map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(txq->data_dmat, txdata->map); + m = txdata->m, txdata->m = NULL; + ni = txdata->ni, txdata->ni = NULL; + + KASSERT(ni != NULL, ("no node")); + KASSERT(m != NULL, ("no mbuf")); + + if (m->m_flags & M_TXCB) + ieee80211_process_callback(ni, m, 1); + + m_freem(m); + ieee80211_free_node(ni); + + txq->queued--; + txq->read = (txq->read + 1) % IWN_TX_RING_COUNT; + } if (wn->agg[tid].bitmap == 0) return; @@ -2460,6 +2485,7 @@ iwn_rx_compressed_ba(struct iwn_softc *s if (wn->agg[tid].nframes > (64 - shift)) return; + ni = tap->txa_ni; bitmap = (le64toh(ba->bitmap) >> shift) & wn->agg[tid].bitmap; for (i = 0; bitmap; i++) { if ((bitmap & 1) == 0) { @@ -2815,8 +2841,6 @@ iwn_ampdu_tx_done(struct iwn_softc *sc, for (lastidx = (seqno & 0xff); ring->read != lastidx;) { data = &ring->data[ring->read]; - KASSERT(data->ni != NULL, ("no node")); - /* Unmap and free mbuf. */ bus_dmamap_sync(ring->data_dmat, data->map, BUS_DMASYNC_POSTWRITE); @@ -2824,6 +2848,9 @@ iwn_ampdu_tx_done(struct iwn_softc *sc, m = data->m, data->m = NULL; ni = data->ni, data->ni = NULL; + KASSERT(ni != NULL, ("no node")); + KASSERT(m != NULL, ("no mbuf")); + if (m->m_flags & M_TXCB) ieee80211_process_callback(ni, m, 1); From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 16:05:10 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 90A3D106564A; Wed, 27 Jun 2012 16:05:10 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C3278FC14; Wed, 27 Jun 2012 16:05:10 +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 q5RG5Asv019342; Wed, 27 Jun 2012 16:05:10 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5RG5AqG019340; Wed, 27 Jun 2012 16:05:10 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201206271605.q5RG5AqG019340@svn.freebsd.org> From: "Kenneth D. Merry" Date: Wed, 27 Jun 2012 16:05:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237648 - head/sys/geom X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 27 Jun 2012 16:05:10 -0000 Author: ken Date: Wed Jun 27 16:05:09 2012 New Revision: 237648 URL: http://svn.freebsd.org/changeset/base/237648 Log: In g_disk_providergone(), don't continue if the softc is NULL. This may be the case if we've already gone through g_disk_destroy(). Reported by: Michael Butler MFC after: 3 days Modified: head/sys/geom/geom_disk.c Modified: head/sys/geom/geom_disk.c ============================================================================== --- head/sys/geom/geom_disk.c Wed Jun 27 15:55:34 2012 (r237647) +++ head/sys/geom/geom_disk.c Wed Jun 27 16:05:09 2012 (r237648) @@ -502,6 +502,14 @@ g_disk_providergone(struct g_provider *p struct g_disk_softc *sc; sc = (struct g_disk_softc *)pp->geom->softc; + + /* + * If the softc is already NULL, then we've probably been through + * g_disk_destroy already; there is nothing for us to do anyway. + */ + if (sc == NULL) + return; + dp = sc->dp; if (dp->d_gone != NULL) From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 16:07: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 D439E10657B6; Wed, 27 Jun 2012 16:07:01 +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 BF7858FC16; Wed, 27 Jun 2012 16: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 q5RG71pH019451; Wed, 27 Jun 2012 16:07:01 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5RG71Jg019449; Wed, 27 Jun 2012 16:07:01 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201206271607.q5RG71Jg019449@svn.freebsd.org> From: Bernhard Schmidt Date: Wed, 27 Jun 2012 16:07: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: r237649 - head/sys/dev/iwn X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 27 Jun 2012 16:07:01 -0000 Author: bschmidt Date: Wed Jun 27 16:07:01 2012 New Revision: 237649 URL: http://svn.freebsd.org/changeset/base/237649 Log: We need to defer passing the DELBA request to the firmware until the aggr queue is empty or the firmware will go nuts. PR: kern/167806 Tested by: osa@, Brandon Gooch (earlier version), Bojan Petrovic (earlier version) MFC after: 3 days Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Wed Jun 27 16:05:09 2012 (r237648) +++ head/sys/dev/iwn/if_iwn.c Wed Jun 27 16:07:01 2012 (r237649) @@ -2432,6 +2432,7 @@ static void iwn_rx_compressed_ba(struct iwn_softc *sc, struct iwn_rx_desc *desc, struct iwn_rx_data *data) { + struct iwn_ops *ops = &sc->ops; struct ifnet *ifp = sc->sc_ifp; struct iwn_node *wn; struct ieee80211_node *ni; @@ -2441,8 +2442,9 @@ iwn_rx_compressed_ba(struct iwn_softc *s struct ieee80211_tx_ampdu *tap; struct mbuf *m; uint64_t bitmap; + uint16_t ssn; uint8_t tid; - int ackfailcnt = 0, i, lastidx, qid, shift; + int ackfailcnt = 0, i, lastidx, qid, *res, shift; bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); @@ -2452,6 +2454,13 @@ iwn_rx_compressed_ba(struct iwn_softc *s tid = tap->txa_tid; wn = (void *)tap->txa_ni; + res = NULL; + ssn = 0; + if (!IEEE80211_AMPDU_RUNNING(tap)) { + res = tap->txa_private; + ssn = tap->txa_start & 0xfff; + } + for (lastidx = le16toh(ba->ssn) & 0xff; txq->read != lastidx;) { txdata = &txq->data[txq->read]; @@ -2475,6 +2484,15 @@ iwn_rx_compressed_ba(struct iwn_softc *s txq->read = (txq->read + 1) % IWN_TX_RING_COUNT; } + if (txq->queued == 0 && res != NULL) { + iwn_nic_lock(sc); + ops->ampdu_tx_stop(sc, qid, tid, ssn); + iwn_nic_unlock(sc); + sc->qid2tap[qid] = NULL; + free(res, M_DEVBUF); + return; + } + if (wn->agg[tid].bitmap == 0) return; @@ -2785,6 +2803,7 @@ static void iwn_ampdu_tx_done(struct iwn_softc *sc, int qid, int idx, int nframes, void *stat) { + struct iwn_ops *ops = &sc->ops; struct ifnet *ifp = sc->sc_ifp; struct iwn_tx_ring *ring = &sc->txq[qid]; struct iwn_tx_data *data; @@ -2795,8 +2814,9 @@ iwn_ampdu_tx_done(struct iwn_softc *sc, uint64_t bitmap; uint32_t *status = stat; uint16_t *aggstatus = stat; + uint16_t ssn; uint8_t tid; - int bit, i, lastidx, seqno, shift, start; + int bit, i, lastidx, *res, seqno, shift, start; #ifdef NOT_YET if (nframes == 1) { @@ -2829,12 +2849,17 @@ iwn_ampdu_tx_done(struct iwn_softc *sc, bitmap |= 1ULL << bit; } tap = sc->qid2tap[qid]; - if (tap != NULL) { - tid = tap->txa_tid; - wn = (void *)tap->txa_ni; - wn->agg[tid].bitmap = bitmap; - wn->agg[tid].startidx = start; - wn->agg[tid].nframes = nframes; + tid = tap->txa_tid; + wn = (void *)tap->txa_ni; + wn->agg[tid].bitmap = bitmap; + wn->agg[tid].startidx = start; + wn->agg[tid].nframes = nframes; + + res = NULL; + ssn = 0; + if (!IEEE80211_AMPDU_RUNNING(tap)) { + res = tap->txa_private; + ssn = tap->txa_start & 0xfff; } seqno = le32toh(*(status + nframes)) & 0xfff; @@ -2861,6 +2886,15 @@ iwn_ampdu_tx_done(struct iwn_softc *sc, ring->read = (ring->read + 1) % IWN_TX_RING_COUNT; } + if (ring->queued == 0 && res != NULL) { + iwn_nic_lock(sc); + ops->ampdu_tx_stop(sc, qid, tid, ssn); + iwn_nic_unlock(sc); + sc->qid2tap[qid] = NULL; + free(res, M_DEVBUF); + return; + } + sc->sc_tx_timer = 0; if (ring->queued < IWN_TX_RING_LOMARK) { sc->qfullmsk &= ~(1 << ring->qid); @@ -5661,6 +5695,8 @@ iwn_ampdu_tx_start(struct ieee80211com * if ((error = iwn_nic_lock(sc)) != 0) return 0; qid = *(int *)tap->txa_private; + DPRINTF(sc, IWN_DEBUG_XMIT, "%s: ra=%d tid=%d ssn=%d qid=%d\n", + __func__, wn->id, tid, tap->txa_start, qid); ops->ampdu_tx_start(sc, ni, qid, tid, tap->txa_start & 0xfff); iwn_nic_unlock(sc); @@ -5676,10 +5712,14 @@ iwn_ampdu_tx_stop(struct ieee80211_node uint8_t tid = tap->txa_tid; int qid; + sc->sc_addba_stop(ni, tap); + if (tap->txa_private == NULL) return; qid = *(int *)tap->txa_private; + if (sc->txq[qid].queued != 0) + return; if (iwn_nic_lock(sc) != 0) return; ops->ampdu_tx_stop(sc, qid, tid, tap->txa_start & 0xfff); @@ -5687,7 +5727,6 @@ iwn_ampdu_tx_stop(struct ieee80211_node sc->qid2tap[qid] = NULL; free(tap->txa_private, M_DEVBUF); tap->txa_private = NULL; - sc->sc_addba_stop(ni, tap); } static void From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 16:14: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 35198106566C; Wed, 27 Jun 2012 16:14:29 +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 1E9578FC16; Wed, 27 Jun 2012 16:14: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 q5RGETUb019834; Wed, 27 Jun 2012 16:14:29 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5RGESrB019831; Wed, 27 Jun 2012 16:14:28 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201206271614.q5RGESrB019831@svn.freebsd.org> From: Bernhard Schmidt Date: Wed, 27 Jun 2012 16:14:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237651 - head/sys/contrib/dev/iwn X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 27 Jun 2012 16:14:29 -0000 Author: bschmidt Date: Wed Jun 27 16:14:28 2012 New Revision: 237651 URL: http://svn.freebsd.org/changeset/base/237651 Log: Add new firmware for the g2a (6205) and g2b (623x) devices. MFC after: 3 days Added: head/sys/contrib/dev/iwn/iwlwifi-6000g2a-17.168.5.3.fw.uu head/sys/contrib/dev/iwn/iwlwifi-6000g2b-18.168.6.1.fw.uu Added: head/sys/contrib/dev/iwn/iwlwifi-6000g2a-17.168.5.3.fw.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/dev/iwn/iwlwifi-6000g2a-17.168.5.3.fw.uu Wed Jun 27 16:14:28 2012 (r237651) @@ -0,0 +1,7833 @@ +Copyright (c) 2006-2011, Intel Corporation. +All rights reserved. + +Redistribution. Redistribution and use in binary form, without +modification, are permitted provided that the following conditions are +met: + +* Redistributions must reproduce the above copyright notice and the + following disclaimer in the documentation and/or other materials + provided with the distribution. +* Neither the name of Intel Corporation nor the names of its suppliers + may be used to endorse or promote products derived from this software + without specific prior written permission. +* No reverse engineering, decompilation, or disassembly of this software + is permitted. + +Limited patent license. Intel Corporation grants a world-wide, +royalty-free, non-exclusive license under patents it now or hereafter +owns or controls to make, have made, use, import, offer to sell and +sell ("Utilize") this software, but solely to the extent that any +such patent is necessary to Utilize the software alone, or in +combination with an operating system licensed under an approved Open +Source license as listed by the Open Source Initiative at +http://opensource.org/licenses. The patent license shall not apply to +any other combinations which include this software. No hardware per +se is licensed hereunder. + +DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 +COPYRIGHT OWNER 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. +begin-base64 644 iwlwifi-6000g2a.17.168.5.3.fw.uu +AAAAAElXTAo2MDAwZzJhIGZ3IHYxNy4xNjguNS4zIGJ1aWxkIDQyMzAx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DGAJANimC8ADB9hIHRiQCg0ABu4J +wAHPdYAASC4ghWB5ANiL4AfyIIVgeQDYh+BUDoIBvgpAAOoKgAP2D4AHFYZSIAAAwLgghRt+YHkA *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 16:15: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 66085106564A; Wed, 27 Jun 2012 16:15:14 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37ACA8FC17; Wed, 27 Jun 2012 16:15: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 q5RGFEH4019906; Wed, 27 Jun 2012 16:15:14 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5RGFEIs019904; Wed, 27 Jun 2012 16:15:14 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201206271615.q5RGFEIs019904@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 27 Jun 2012 16:15: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: r237652 - head/sys/contrib/dev/acpica/components/events X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 27 Jun 2012 16:15:14 -0000 Author: jkim Date: Wed Jun 27 16:15:13 2012 New Revision: 237652 URL: http://svn.freebsd.org/changeset/base/237652 Log: MFV: r237650 Do not malloc(9) while holding a spin lock, to avoid panic. Reported by: kib (and many others) Tested by: kib (and many others) Modified: head/sys/contrib/dev/acpica/components/events/evxfgpe.c Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/contrib/dev/acpica/components/events/evxfgpe.c ============================================================================== --- head/sys/contrib/dev/acpica/components/events/evxfgpe.c Wed Jun 27 16:14:28 2012 (r237651) +++ head/sys/contrib/dev/acpica/components/events/evxfgpe.c Wed Jun 27 16:15:13 2012 (r237652) @@ -298,7 +298,7 @@ AcpiSetupGpeForWake ( ACPI_STATUS Status; ACPI_GPE_EVENT_INFO *GpeEventInfo; ACPI_NAMESPACE_NODE *DeviceNode; - ACPI_GPE_NOTIFY_INFO *Notify; + ACPI_GPE_NOTIFY_INFO *NewNotify, *Notify; ACPI_CPU_FLAGS Flags; @@ -334,6 +334,12 @@ AcpiSetupGpeForWake ( return_ACPI_STATUS (AE_BAD_PARAMETER); } + NewNotify = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_GPE_NOTIFY_INFO)); + if (!NewNotify) + { + return_ACPI_STATUS (AE_NO_MEMORY); + } + Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock); /* Ensure that we have a valid GPE number */ @@ -384,16 +390,10 @@ AcpiSetupGpeForWake ( /* Add this device to the notify list for this GPE */ - Notify = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_GPE_NOTIFY_INFO)); - if (!Notify) - { - Status = AE_NO_MEMORY; - goto UnlockAndExit; - } - - Notify->DeviceNode = DeviceNode; - Notify->Next = GpeEventInfo->Dispatch.NotifyList; - GpeEventInfo->Dispatch.NotifyList = Notify; + NewNotify->DeviceNode = DeviceNode; + NewNotify->Next = GpeEventInfo->Dispatch.NotifyList; + GpeEventInfo->Dispatch.NotifyList = NewNotify; + NewNotify = NULL; } /* Mark the GPE as a possible wake event */ @@ -403,6 +403,10 @@ AcpiSetupGpeForWake ( UnlockAndExit: AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags); + if (NewNotify) + { + ACPI_FREE (NewNotify); + } return_ACPI_STATUS (Status); } From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 17:51: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 4575B106564A; Wed, 27 Jun 2012 17:51:10 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 30B518FC1B; Wed, 27 Jun 2012 17:51:10 +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 q5RHpAwp024013; Wed, 27 Jun 2012 17:51:10 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5RHp9ej024011; Wed, 27 Jun 2012 17:51:09 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201206271751.q5RHp9ej024011@svn.freebsd.org> From: Warren Block Date: Wed, 27 Jun 2012 17:51: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: r237655 - 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: Wed, 27 Jun 2012 17:51:10 -0000 Author: wblock (doc committer) Date: Wed Jun 27 17:51:09 2012 New Revision: 237655 URL: http://svn.freebsd.org/changeset/base/237655 Log: Point out that /usr/src, /usr/doc, and /usr/ports may be empty or not exist until populated with csup(1) or svn(1). PR: 169487 Submitted by: Moritz Wilhelmy MFC after: 1 day Modified: head/share/man/man7/build.7 Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Wed Jun 27 16:46:02 2012 (r237654) +++ head/share/man/man7/build.7 Wed Jun 27 17:51:09 2012 (r237655) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 29, 2011 +.Dd June 27, 2012 .Dt BUILD 7 .Os .Sh NAME @@ -39,6 +39,10 @@ normally .Pa /usr/doc , and .Pa /usr/ports . +These directories may be initially empty or non-existent until updated with +.Xr csup 1 +or +.Xr svn 1 . Directory .Pa /usr/src contains the @@ -489,7 +493,7 @@ on built objects. .It Va NO_SHARE If set, the build does not descend into the .Pa /usr/src/share -subdirectory (i.e. manpages, locale data files, timezone data files and +subdirectory (i.e., manpages, locale data files, timezone data files and other .Pa /usr/src/share files will not be rebuild from their sources). @@ -594,8 +598,10 @@ make TARGET=sparc64 DESTDIR=/clients/spa .Ed .Sh SEE ALSO .Xr cc 1 , +.Xr csup 1 , .Xr install 1 , .Xr make 1 , +.Xr svn 1 , .Xr make.conf 5 , .Xr src.conf 5 , .Xr ports 7 , From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 18:08: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 296B7106566B; Wed, 27 Jun 2012 18:08:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 142208FC1C; Wed, 27 Jun 2012 18:08: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 q5RI8mbm024860; Wed, 27 Jun 2012 18:08:48 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5RI8m0d024853; Wed, 27 Jun 2012 18:08:48 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201206271808.q5RI8m0d024853@svn.freebsd.org> From: John Baldwin Date: Wed, 27 Jun 2012 18:08: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: r237656 - in head: contrib/top usr.bin/top X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 27 Jun 2012 18:08:49 -0000 Author: jhb Date: Wed Jun 27 18:08:48 2012 New Revision: 237656 URL: http://svn.freebsd.org/changeset/base/237656 Log: Add a new line to top that provides a brief summary of the ZFS ARC memory usage on hosts using ZFS. The new line displays the total amount of RAM used by the ARC along with the size of MFU, MRU, anonymous (in flight), headers, and other (miscellaneous) sub-categories. The line is not displayed on systems that are not using ZFS. Reviewed by: avg, fs@ MFC after: 3 days Modified: head/contrib/top/display.c head/contrib/top/layout.h head/contrib/top/machine.h head/contrib/top/top.c head/usr.bin/top/machine.c head/usr.bin/top/top.local.1 Modified: head/contrib/top/display.c ============================================================================== --- head/contrib/top/display.c Wed Jun 27 17:51:09 2012 (r237655) +++ head/contrib/top/display.c Wed Jun 27 18:08:48 2012 (r237656) @@ -66,6 +66,7 @@ char *screenbuf = NULL; static char **procstate_names; static char **cpustate_names; static char **memory_names; +static char **arc_names; static char **swap_names; static int num_procstates; @@ -100,6 +101,8 @@ int x_brkdn = 15; int y_brkdn = 1; int x_mem = 5; int y_mem = 3; +int x_arc = 5; +int y_arc = 4; int x_swap = 6; int y_swap = 4; int y_message = 5; @@ -216,6 +219,8 @@ struct statics *statics; num_memory = string_count(memory_names); lmemory = (int *)malloc(num_memory * sizeof(int)); + arc_names = statics->arc_names; + /* calculate starting columns where needed */ cpustate_total_length = 0; pp = cpustate_names; @@ -627,6 +632,46 @@ int *stats; } /* + * *_arc(stats) - print "ARC: " followed by the ARC summary string + * + * Assumptions: cursor is on "lastline" + * for i_arc ONLY: cursor is on the previous line + */ +char arc_buffer[MAX_COLS]; + +i_arc(stats) + +int *stats; + +{ + if (arc_names == NULL) + return (0); + + fputs("\nARC: ", stdout); + lastline++; + + /* format and print the memory summary */ + summary_format(arc_buffer, stats, arc_names); + fputs(arc_buffer, stdout); +} + +u_arc(stats) + +int *stats; + +{ + static char new[MAX_COLS]; + + if (arc_names == NULL) + return (0); + + /* format the new line */ + summary_format(new, stats, arc_names); + line_update(arc_buffer, new, x_arc, y_arc); +} + + +/* * *_swap(stats) - print "Swap: " followed by the swap summary string * * Assumptions: cursor is on "lastline" Modified: head/contrib/top/layout.h ============================================================================== --- head/contrib/top/layout.h Wed Jun 27 17:51:09 2012 (r237655) +++ head/contrib/top/layout.h Wed Jun 27 18:08:48 2012 (r237656) @@ -19,6 +19,8 @@ extern int x_brkdn; /* 15 */ extern int y_brkdn; /* 1 */ extern int x_mem; /* 5 */ extern int y_mem; /* 3 */ +extern int x_arc; /* 5 */ +extern int y_arc; /* 4 */ extern int x_swap; /* 6 */ extern int y_swap; /* 4 */ extern int y_message; /* 5 */ Modified: head/contrib/top/machine.h ============================================================================== --- head/contrib/top/machine.h Wed Jun 27 17:51:09 2012 (r237655) +++ head/contrib/top/machine.h Wed Jun 27 18:08:48 2012 (r237656) @@ -16,6 +16,7 @@ struct statics char **procstate_names; char **cpustate_names; char **memory_names; + char **arc_names; char **swap_names; #ifdef ORDER char **order_names; @@ -42,6 +43,7 @@ struct system_info int *procstates; int *cpustates; int *memory; + int *arc; int *swap; struct timeval boottime; int ncpus; Modified: head/contrib/top/top.c ============================================================================== --- head/contrib/top/top.c Wed Jun 27 17:51:09 2012 (r237655) +++ head/contrib/top/top.c Wed Jun 27 18:08:48 2012 (r237656) @@ -121,6 +121,8 @@ int i_cpustates(); int u_cpustates(); int i_memory(); int u_memory(); +int i_arc(); +int u_arc(); int i_swap(); int u_swap(); int i_message(); @@ -135,6 +137,7 @@ int (*d_loadave)() = i_loadave; int (*d_procstates)() = i_procstates; int (*d_cpustates)() = i_cpustates; int (*d_memory)() = i_memory; +int (*d_arc)() = i_arc; int (*d_swap)() = i_swap; int (*d_message)() = i_message; int (*d_header)() = i_header; @@ -647,6 +650,7 @@ restart: /* display memory stats */ (*d_memory)(system_info.memory); + (*d_arc)(system_info.arc); /* display swap stats */ (*d_swap)(system_info.swap); @@ -712,6 +716,7 @@ restart: d_procstates = u_procstates; d_cpustates = u_cpustates; d_memory = u_memory; + d_arc = u_arc; d_swap = u_swap; d_message = u_message; d_header = u_header; @@ -1129,6 +1134,7 @@ reset_display() d_procstates = i_procstates; d_cpustates = i_cpustates; d_memory = i_memory; + d_arc = i_arc; d_swap = i_swap; d_message = i_message; d_header = i_header; Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Wed Jun 27 17:51:09 2012 (r237655) +++ head/usr.bin/top/machine.c Wed Jun 27 18:08:48 2012 (r237656) @@ -176,6 +176,12 @@ char *memorynames[] = { "K Free", NULL }; +int arc_stats[7]; +char *arcnames[] = { + "K Total, ", "K MRU, ", "K MFU, ", "K Anon, ", "K Header, ", "K Other", + NULL +}; + int swap_stats[7]; char *swapnames[] = { "K Total, ", "K Used, ", "K Free, ", "% Inuse, ", "K In, ", "K Out", @@ -194,6 +200,7 @@ static struct kinfo_proc *previous_procs static struct kinfo_proc **previous_pref; static int previous_proc_count = 0; static int previous_proc_count_max = 0; +static int arc_enabled; /* total number of io operations */ static long total_inblock; @@ -239,6 +246,7 @@ static int compare_tid(const void *a, co static const char *format_nice(const struct kinfo_proc *pp); static void getsysctl(const char *name, void *ptr, size_t len); static int swapmode(int *retavail, int *retfree); +static void update_layout(void); void toggle_pcpustats(void) @@ -246,24 +254,30 @@ toggle_pcpustats(void) if (ncpus == 1) return; + update_layout(); +} + +/* Adjust display based on ncpus and the ARC state. */ +static void +update_layout(void) +{ + + y_mem = 3; + y_swap = 4 + arc_enabled; + y_idlecursor = 5 + arc_enabled; + y_message = 5 + arc_enabled; + y_header = 6 + arc_enabled; + y_procs = 7 + arc_enabled; + Header_lines = 7 + arc_enabled; - /* Adjust display based on ncpus */ if (pcpu_stats) { - y_mem += ncpus - 1; /* 3 */ - y_swap += ncpus - 1; /* 4 */ - y_idlecursor += ncpus - 1; /* 5 */ - y_message += ncpus - 1; /* 5 */ - y_header += ncpus - 1; /* 6 */ - y_procs += ncpus - 1; /* 7 */ - Header_lines += ncpus - 1; /* 7 */ - } else { - y_mem = 3; - y_swap = 4; - y_idlecursor = 5; - y_message = 5; - y_header = 6; - y_procs = 7; - Header_lines = 7; + y_mem = ncpus - 1; + y_swap += ncpus - 1; + y_idlecursor += ncpus - 1; + y_message += ncpus - 1; + y_header += ncpus - 1; + y_procs += ncpus - 1; + Header_lines += ncpus - 1; } } @@ -271,6 +285,7 @@ int machine_init(struct statics *statics, char do_unames) { int i, j, empty, pagesize; + uint64_t arc_size; size_t size; struct passwd *pw; @@ -282,6 +297,11 @@ machine_init(struct statics *statics, ch size != sizeof(smpmode)) smpmode = 0; + size = sizeof(arc_size); + if (sysctlbyname("kstat.zfs.misc.arcstats.size", &arc_size, &size, + NULL, 0) == 0 && arc_size != 0) + arc_enabled = 1; + if (do_unames) { while ((pw = getpwent()) != NULL) { if (strlen(pw->pw_name) > namelength) @@ -322,6 +342,10 @@ machine_init(struct statics *statics, ch statics->procstate_names = procstatenames; statics->cpustate_names = cpustatenames; statics->memory_names = memorynames; + if (arc_enabled) + statics->arc_names = arcnames; + else + statics->arc_names = NULL; statics->swap_names = swapnames; #ifdef ORDER statics->order_names = ordernames; @@ -356,8 +380,7 @@ machine_init(struct statics *statics, ch pcpu_cpu_states = calloc(1, size); statics->ncpus = ncpus; - if (pcpu_stats) - toggle_pcpustats(); + update_layout(); /* all done! */ return (0); @@ -408,7 +431,7 @@ get_system_info(struct system_info *si) struct loadavg sysload; int mib[2]; struct timeval boottime; - size_t bt_size; + uint64_t arc_stat, arc_stat2; int i, j; size_t size; @@ -487,6 +510,23 @@ get_system_info(struct system_info *si) swap_stats[6] = -1; } + if (arc_enabled) { + GETSYSCTL("kstat.zfs.misc.arcstats.size", arc_stat); + arc_stats[0] = arc_stat >> 10; + GETSYSCTL("vfs.zfs.mfu_size", arc_stat); + arc_stats[1] = arc_stat >> 10; + GETSYSCTL("vfs.zfs.mru_size", arc_stat); + arc_stats[2] = arc_stat >> 10; + GETSYSCTL("vfs.zfs.anon_size", arc_stat); + arc_stats[3] = arc_stat >> 10; + GETSYSCTL("kstat.zfs.misc.arcstats.hdr_size", arc_stat); + GETSYSCTL("kstat.zfs.misc.arcstats.l2_hdr_size", arc_stat2); + arc_stats[4] = arc_stat + arc_stat2 >> 10; + GETSYSCTL("kstat.zfs.misc.arcstats.other_size", arc_stat); + arc_stats[5] = arc_stat >> 10; + si->arc = arc_stats; + } + /* set arrays and strings */ if (pcpu_stats) { si->cpustates = pcpu_cpu_states; @@ -511,8 +551,8 @@ get_system_info(struct system_info *si) */ mib[0] = CTL_KERN; mib[1] = KERN_BOOTTIME; - bt_size = sizeof(boottime); - if (sysctl(mib, 2, &boottime, &bt_size, NULL, 0) != -1 && + size = sizeof(boottime); + if (sysctl(mib, 2, &boottime, &size, NULL, 0) != -1 && boottime.tv_sec != 0) { si->boottime = boottime; } else { Modified: head/usr.bin/top/top.local.1 ============================================================================== --- head/usr.bin/top/top.local.1 Wed Jun 27 17:51:09 2012 (r237655) +++ head/usr.bin/top/top.local.1 Wed Jun 27 18:08:48 2012 (r237656) @@ -3,6 +3,7 @@ .SH DESCRIPTION OF MEMORY Mem: 9220K Active, 1M Inact, 3284K Wired, 1M Cache, 2M Buf, 1320K Free +ARC: 2048K Total, 342K MRU, 760K MFU, 272K Anon, 232K Header, 442K Other Swap: 91M Total, 79M Free, 13% Inuse, 80K In, 104K Out .TP .B K: @@ -16,6 +17,7 @@ Gigabyte .TP .B %: 1/100 +.SS Physical Memory Stats .TP .B Active: number of bytes active @@ -35,6 +37,27 @@ number of bytes used for BIO-level disk .TP .B Free: number of bytes free +.SS ZFS ARC Stats +These stats are only displayed when the ARC is in use. +.TP +.B Total: +number of wired bytes used for the ZFS ARC +.TP +.B MRU: +number of ARC bytes holding most recently used data +.TP +.B MFU: +number of ARC bytes holding most frequently used data +.TP +.B Anon: +number of ARC bytes holding in flight data +.TP +.B Header: +number of ARC bytes holding headers +.TP +.B Other +miscellaneous ARC bytes +.SS Swap Stats .TP .B Total: total available swap usage From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 18:44: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 1ADF3106564A; Wed, 27 Jun 2012 18:44:38 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 012B78FC12; Wed, 27 Jun 2012 18:44: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 q5RIibnj026467; Wed, 27 Jun 2012 18:44:37 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5RIibeP026457; Wed, 27 Jun 2012 18:44:37 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201206271844.q5RIibeP026457@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 27 Jun 2012 18:44: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: r237657 - in head: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/bn crypto/openssl/crypto/bn/asm cr... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 27 Jun 2012 18:44:38 -0000 Author: jkim Date: Wed Jun 27 18:44:36 2012 New Revision: 237657 URL: http://svn.freebsd.org/changeset/base/237657 Log: Merge OpenSSL 0.9.8x. Reviewed by: stas Approved by: benl (maintainer) MFC after: 3 days Modified: head/crypto/openssl/CHANGES head/crypto/openssl/Configure head/crypto/openssl/FAQ head/crypto/openssl/LICENSE head/crypto/openssl/Makefile head/crypto/openssl/NEWS head/crypto/openssl/README head/crypto/openssl/apps/Makefile head/crypto/openssl/apps/asn1pars.c head/crypto/openssl/apps/cms.c head/crypto/openssl/apps/openssl.cnf head/crypto/openssl/apps/pkcs12.c head/crypto/openssl/apps/s_client.c head/crypto/openssl/apps/s_server.c head/crypto/openssl/apps/x509.c head/crypto/openssl/config head/crypto/openssl/crypto/asn1/a_object.c head/crypto/openssl/crypto/asn1/a_strex.c head/crypto/openssl/crypto/asn1/a_strnid.c head/crypto/openssl/crypto/asn1/asn1.h head/crypto/openssl/crypto/asn1/asn_mime.c head/crypto/openssl/crypto/asn1/x_name.c head/crypto/openssl/crypto/asn1/x_pubkey.c head/crypto/openssl/crypto/bio/bf_buff.c head/crypto/openssl/crypto/bio/bio.h head/crypto/openssl/crypto/bio/bss_dgram.c head/crypto/openssl/crypto/bn/asm/mo-586.pl head/crypto/openssl/crypto/bn/asm/ppc.pl head/crypto/openssl/crypto/bn/bn_blind.c head/crypto/openssl/crypto/bn/bn_gf2m.c head/crypto/openssl/crypto/cms/cms.h head/crypto/openssl/crypto/cms/cms_enc.c head/crypto/openssl/crypto/cms/cms_env.c head/crypto/openssl/crypto/cms/cms_io.c head/crypto/openssl/crypto/cms/cms_lcl.h head/crypto/openssl/crypto/cms/cms_smime.c head/crypto/openssl/crypto/comp/c_rle.c head/crypto/openssl/crypto/conf/conf_api.c head/crypto/openssl/crypto/cryptlib.c head/crypto/openssl/crypto/crypto.h head/crypto/openssl/crypto/ec/ec2_smpl.c head/crypto/openssl/crypto/ec/ec_key.c head/crypto/openssl/crypto/ec/ecp_smpl.c head/crypto/openssl/crypto/ecdsa/ecdsatest.c head/crypto/openssl/crypto/ecdsa/ecs_ossl.c head/crypto/openssl/crypto/evp/evp_test.c head/crypto/openssl/crypto/ocsp/ocsp_lib.c head/crypto/openssl/crypto/opensslv.h head/crypto/openssl/crypto/perlasm/cbc.pl head/crypto/openssl/crypto/pkcs7/pk7_smime.c head/crypto/openssl/crypto/rc4/asm/rc4-x86_64.pl head/crypto/openssl/crypto/rc4/rc4_skey.c head/crypto/openssl/crypto/rsa/rsa_eay.c head/crypto/openssl/crypto/x509/x509_vfy.c head/crypto/openssl/crypto/x509v3/v3_addr.c head/crypto/openssl/crypto/x509v3/v3_asid.c head/crypto/openssl/doc/HOWTO/proxy_certificates.txt head/crypto/openssl/doc/ssl/SSL_clear.pod head/crypto/openssl/engines/e_capi.c head/crypto/openssl/engines/e_capi_err.h head/crypto/openssl/fips/fips_canister.c head/crypto/openssl/openssl.spec head/crypto/openssl/ssl/bio_ssl.c head/crypto/openssl/ssl/d1_both.c head/crypto/openssl/ssl/d1_clnt.c head/crypto/openssl/ssl/d1_enc.c head/crypto/openssl/ssl/d1_lib.c head/crypto/openssl/ssl/d1_pkt.c head/crypto/openssl/ssl/d1_srvr.c head/crypto/openssl/ssl/s2_srvr.c head/crypto/openssl/ssl/s3_clnt.c head/crypto/openssl/ssl/s3_lib.c head/crypto/openssl/ssl/s3_srvr.c head/crypto/openssl/ssl/ssl.h head/crypto/openssl/ssl/ssl_ciph.c head/crypto/openssl/ssl/ssl_err.c head/crypto/openssl/ssl/ssl_lib.c head/crypto/openssl/ssl/ssl_locl.h head/crypto/openssl/ssl/t1_lib.c head/crypto/openssl/util/fipslink.pl head/crypto/openssl/util/mkerr.pl head/crypto/openssl/util/pl/VC-32.pl head/secure/lib/libcrypto/Makefile.inc head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_length.3 head/secure/lib/libcrypto/man/ASN1_STRING_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 head/secure/lib/libcrypto/man/BIO_ctrl.3 head/secure/lib/libcrypto/man/BIO_f_base64.3 head/secure/lib/libcrypto/man/BIO_f_buffer.3 head/secure/lib/libcrypto/man/BIO_f_cipher.3 head/secure/lib/libcrypto/man/BIO_f_md.3 head/secure/lib/libcrypto/man/BIO_f_null.3 head/secure/lib/libcrypto/man/BIO_f_ssl.3 head/secure/lib/libcrypto/man/BIO_find_type.3 head/secure/lib/libcrypto/man/BIO_new.3 head/secure/lib/libcrypto/man/BIO_push.3 head/secure/lib/libcrypto/man/BIO_read.3 head/secure/lib/libcrypto/man/BIO_s_accept.3 head/secure/lib/libcrypto/man/BIO_s_bio.3 head/secure/lib/libcrypto/man/BIO_s_connect.3 head/secure/lib/libcrypto/man/BIO_s_fd.3 head/secure/lib/libcrypto/man/BIO_s_file.3 head/secure/lib/libcrypto/man/BIO_s_mem.3 head/secure/lib/libcrypto/man/BIO_s_null.3 head/secure/lib/libcrypto/man/BIO_s_socket.3 head/secure/lib/libcrypto/man/BIO_set_callback.3 head/secure/lib/libcrypto/man/BIO_should_retry.3 head/secure/lib/libcrypto/man/BN_BLINDING_new.3 head/secure/lib/libcrypto/man/BN_CTX_new.3 head/secure/lib/libcrypto/man/BN_CTX_start.3 head/secure/lib/libcrypto/man/BN_add.3 head/secure/lib/libcrypto/man/BN_add_word.3 head/secure/lib/libcrypto/man/BN_bn2bin.3 head/secure/lib/libcrypto/man/BN_cmp.3 head/secure/lib/libcrypto/man/BN_copy.3 head/secure/lib/libcrypto/man/BN_generate_prime.3 head/secure/lib/libcrypto/man/BN_mod_inverse.3 head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 head/secure/lib/libcrypto/man/BN_new.3 head/secure/lib/libcrypto/man/BN_num_bytes.3 head/secure/lib/libcrypto/man/BN_rand.3 head/secure/lib/libcrypto/man/BN_set_bit.3 head/secure/lib/libcrypto/man/BN_swap.3 head/secure/lib/libcrypto/man/BN_zero.3 head/secure/lib/libcrypto/man/CONF_modules_free.3 head/secure/lib/libcrypto/man/CONF_modules_load_file.3 head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 head/secure/lib/libcrypto/man/DH_generate_key.3 head/secure/lib/libcrypto/man/DH_generate_parameters.3 head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 head/secure/lib/libcrypto/man/DH_new.3 head/secure/lib/libcrypto/man/DH_set_method.3 head/secure/lib/libcrypto/man/DH_size.3 head/secure/lib/libcrypto/man/DSA_SIG_new.3 head/secure/lib/libcrypto/man/DSA_do_sign.3 head/secure/lib/libcrypto/man/DSA_dup_DH.3 head/secure/lib/libcrypto/man/DSA_generate_key.3 head/secure/lib/libcrypto/man/DSA_generate_parameters.3 head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/DSA_new.3 head/secure/lib/libcrypto/man/DSA_set_method.3 head/secure/lib/libcrypto/man/DSA_sign.3 head/secure/lib/libcrypto/man/DSA_size.3 head/secure/lib/libcrypto/man/ERR_GET_LIB.3 head/secure/lib/libcrypto/man/ERR_clear_error.3 head/secure/lib/libcrypto/man/ERR_error_string.3 head/secure/lib/libcrypto/man/ERR_get_error.3 head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 head/secure/lib/libcrypto/man/ERR_load_strings.3 head/secure/lib/libcrypto/man/ERR_print_errors.3 head/secure/lib/libcrypto/man/ERR_put_error.3 head/secure/lib/libcrypto/man/ERR_remove_state.3 head/secure/lib/libcrypto/man/ERR_set_mark.3 head/secure/lib/libcrypto/man/EVP_BytesToKey.3 head/secure/lib/libcrypto/man/EVP_DigestInit.3 head/secure/lib/libcrypto/man/EVP_EncryptInit.3 head/secure/lib/libcrypto/man/EVP_OpenInit.3 head/secure/lib/libcrypto/man/EVP_PKEY_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 head/secure/lib/libcrypto/man/EVP_SealInit.3 head/secure/lib/libcrypto/man/EVP_SignInit.3 head/secure/lib/libcrypto/man/EVP_VerifyInit.3 head/secure/lib/libcrypto/man/OBJ_nid2obj.3 head/secure/lib/libcrypto/man/OPENSSL_Applink.3 head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 head/secure/lib/libcrypto/man/OPENSSL_config.3 head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 head/secure/lib/libcrypto/man/PKCS12_create.3 head/secure/lib/libcrypto/man/PKCS12_parse.3 head/secure/lib/libcrypto/man/PKCS7_decrypt.3 head/secure/lib/libcrypto/man/PKCS7_encrypt.3 head/secure/lib/libcrypto/man/PKCS7_sign.3 head/secure/lib/libcrypto/man/PKCS7_verify.3 head/secure/lib/libcrypto/man/RAND_add.3 head/secure/lib/libcrypto/man/RAND_bytes.3 head/secure/lib/libcrypto/man/RAND_cleanup.3 head/secure/lib/libcrypto/man/RAND_egd.3 head/secure/lib/libcrypto/man/RAND_load_file.3 head/secure/lib/libcrypto/man/RAND_set_rand_method.3 head/secure/lib/libcrypto/man/RSA_blinding_on.3 head/secure/lib/libcrypto/man/RSA_check_key.3 head/secure/lib/libcrypto/man/RSA_generate_key.3 head/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/RSA_new.3 head/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 head/secure/lib/libcrypto/man/RSA_print.3 head/secure/lib/libcrypto/man/RSA_private_encrypt.3 head/secure/lib/libcrypto/man/RSA_public_encrypt.3 head/secure/lib/libcrypto/man/RSA_set_method.3 head/secure/lib/libcrypto/man/RSA_sign.3 head/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 head/secure/lib/libcrypto/man/RSA_size.3 head/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 head/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 head/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 head/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 head/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 head/secure/lib/libcrypto/man/X509_NAME_print_ex.3 head/secure/lib/libcrypto/man/X509_new.3 head/secure/lib/libcrypto/man/bio.3 head/secure/lib/libcrypto/man/blowfish.3 head/secure/lib/libcrypto/man/bn.3 head/secure/lib/libcrypto/man/bn_internal.3 head/secure/lib/libcrypto/man/buffer.3 head/secure/lib/libcrypto/man/crypto.3 head/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 head/secure/lib/libcrypto/man/d2i_DHparams.3 head/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 head/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_X509.3 head/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 head/secure/lib/libcrypto/man/d2i_X509_CRL.3 head/secure/lib/libcrypto/man/d2i_X509_NAME.3 head/secure/lib/libcrypto/man/d2i_X509_REQ.3 head/secure/lib/libcrypto/man/d2i_X509_SIG.3 head/secure/lib/libcrypto/man/des.3 head/secure/lib/libcrypto/man/dh.3 head/secure/lib/libcrypto/man/dsa.3 head/secure/lib/libcrypto/man/ecdsa.3 head/secure/lib/libcrypto/man/engine.3 head/secure/lib/libcrypto/man/err.3 head/secure/lib/libcrypto/man/evp.3 head/secure/lib/libcrypto/man/hmac.3 head/secure/lib/libcrypto/man/lh_stats.3 head/secure/lib/libcrypto/man/lhash.3 head/secure/lib/libcrypto/man/md5.3 head/secure/lib/libcrypto/man/mdc2.3 head/secure/lib/libcrypto/man/pem.3 head/secure/lib/libcrypto/man/rand.3 head/secure/lib/libcrypto/man/rc4.3 head/secure/lib/libcrypto/man/ripemd.3 head/secure/lib/libcrypto/man/rsa.3 head/secure/lib/libcrypto/man/sha.3 head/secure/lib/libcrypto/man/threads.3 head/secure/lib/libcrypto/man/ui.3 head/secure/lib/libcrypto/man/ui_compat.3 head/secure/lib/libcrypto/man/x509.3 head/secure/lib/libssl/man/SSL_CIPHER_get_name.3 head/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 head/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 head/secure/lib/libssl/man/SSL_CTX_add_session.3 head/secure/lib/libssl/man/SSL_CTX_ctrl.3 head/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 head/secure/lib/libssl/man/SSL_CTX_free.3 head/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 head/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 head/secure/lib/libssl/man/SSL_CTX_new.3 head/secure/lib/libssl/man/SSL_CTX_sess_number.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 head/secure/lib/libssl/man/SSL_CTX_sessions.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 head/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 head/secure/lib/libssl/man/SSL_CTX_set_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_options.3 head/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 head/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 head/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 head/secure/lib/libssl/man/SSL_CTX_set_timeout.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_verify.3 head/secure/lib/libssl/man/SSL_CTX_use_certificate.3 head/secure/lib/libssl/man/SSL_SESSION_free.3 head/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_SESSION_get_time.3 head/secure/lib/libssl/man/SSL_accept.3 head/secure/lib/libssl/man/SSL_alert_type_string.3 head/secure/lib/libssl/man/SSL_clear.3 head/secure/lib/libssl/man/SSL_connect.3 head/secure/lib/libssl/man/SSL_do_handshake.3 head/secure/lib/libssl/man/SSL_free.3 head/secure/lib/libssl/man/SSL_get_SSL_CTX.3 head/secure/lib/libssl/man/SSL_get_ciphers.3 head/secure/lib/libssl/man/SSL_get_client_CA_list.3 head/secure/lib/libssl/man/SSL_get_current_cipher.3 head/secure/lib/libssl/man/SSL_get_default_timeout.3 head/secure/lib/libssl/man/SSL_get_error.3 head/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 head/secure/lib/libssl/man/SSL_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_get_fd.3 head/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 head/secure/lib/libssl/man/SSL_get_peer_certificate.3 head/secure/lib/libssl/man/SSL_get_rbio.3 head/secure/lib/libssl/man/SSL_get_session.3 head/secure/lib/libssl/man/SSL_get_verify_result.3 head/secure/lib/libssl/man/SSL_get_version.3 head/secure/lib/libssl/man/SSL_library_init.3 head/secure/lib/libssl/man/SSL_load_client_CA_file.3 head/secure/lib/libssl/man/SSL_new.3 head/secure/lib/libssl/man/SSL_pending.3 head/secure/lib/libssl/man/SSL_read.3 head/secure/lib/libssl/man/SSL_rstate_string.3 head/secure/lib/libssl/man/SSL_session_reused.3 head/secure/lib/libssl/man/SSL_set_bio.3 head/secure/lib/libssl/man/SSL_set_connect_state.3 head/secure/lib/libssl/man/SSL_set_fd.3 head/secure/lib/libssl/man/SSL_set_session.3 head/secure/lib/libssl/man/SSL_set_shutdown.3 head/secure/lib/libssl/man/SSL_set_verify_result.3 head/secure/lib/libssl/man/SSL_shutdown.3 head/secure/lib/libssl/man/SSL_state_string.3 head/secure/lib/libssl/man/SSL_want.3 head/secure/lib/libssl/man/SSL_write.3 head/secure/lib/libssl/man/d2i_SSL_SESSION.3 head/secure/lib/libssl/man/ssl.3 head/secure/usr.bin/openssl/man/CA.pl.1 head/secure/usr.bin/openssl/man/asn1parse.1 head/secure/usr.bin/openssl/man/ca.1 head/secure/usr.bin/openssl/man/ciphers.1 head/secure/usr.bin/openssl/man/crl.1 head/secure/usr.bin/openssl/man/crl2pkcs7.1 head/secure/usr.bin/openssl/man/dgst.1 head/secure/usr.bin/openssl/man/dhparam.1 head/secure/usr.bin/openssl/man/dsa.1 head/secure/usr.bin/openssl/man/dsaparam.1 head/secure/usr.bin/openssl/man/ec.1 head/secure/usr.bin/openssl/man/ecparam.1 head/secure/usr.bin/openssl/man/enc.1 head/secure/usr.bin/openssl/man/errstr.1 head/secure/usr.bin/openssl/man/gendsa.1 head/secure/usr.bin/openssl/man/genrsa.1 head/secure/usr.bin/openssl/man/nseq.1 head/secure/usr.bin/openssl/man/ocsp.1 head/secure/usr.bin/openssl/man/openssl.1 head/secure/usr.bin/openssl/man/passwd.1 head/secure/usr.bin/openssl/man/pkcs12.1 head/secure/usr.bin/openssl/man/pkcs7.1 head/secure/usr.bin/openssl/man/pkcs8.1 head/secure/usr.bin/openssl/man/rand.1 head/secure/usr.bin/openssl/man/req.1 head/secure/usr.bin/openssl/man/rsa.1 head/secure/usr.bin/openssl/man/rsautl.1 head/secure/usr.bin/openssl/man/s_client.1 head/secure/usr.bin/openssl/man/s_server.1 head/secure/usr.bin/openssl/man/s_time.1 head/secure/usr.bin/openssl/man/sess_id.1 head/secure/usr.bin/openssl/man/smime.1 head/secure/usr.bin/openssl/man/speed.1 head/secure/usr.bin/openssl/man/spkac.1 head/secure/usr.bin/openssl/man/verify.1 head/secure/usr.bin/openssl/man/version.1 head/secure/usr.bin/openssl/man/x509.1 head/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: head/crypto/openssl/ (props changed) Modified: head/crypto/openssl/CHANGES ============================================================================== --- head/crypto/openssl/CHANGES Wed Jun 27 18:08:48 2012 (r237656) +++ head/crypto/openssl/CHANGES Wed Jun 27 18:44:36 2012 (r237657) @@ -2,6 +2,142 @@ OpenSSL CHANGES _______________ + Changes between 0.9.8w and 0.9.8x [10 May 2012] + + *) Sanity check record length before skipping explicit IV in DTLS + to fix DoS attack. + + Thanks to Codenomicon for discovering this issue using Fuzz-o-Matic + fuzzing as a service testing platform. + (CVE-2012-2333) + [Steve Henson] + + *) Initialise tkeylen properly when encrypting CMS messages. + Thanks to Solar Designer of Openwall for reporting this issue. + [Steve Henson] + + Changes between 0.9.8v and 0.9.8w [23 Apr 2012] + + *) The fix for CVE-2012-2110 did not take into account that the + 'len' argument to BUF_MEM_grow and BUF_MEM_grow_clean is an + int in OpenSSL 0.9.8, making it still vulnerable. Fix by + rejecting negative len parameter. (CVE-2012-2131) + [Tomas Hoger ] + + Changes between 0.9.8u and 0.9.8v [19 Apr 2012] + + *) Check for potentially exploitable overflows in asn1_d2i_read_bio + BUF_mem_grow and BUF_mem_grow_clean. Refuse attempts to shrink buffer + in CRYPTO_realloc_clean. + + Thanks to Tavis Ormandy, Google Security Team, for discovering this + issue and to Adam Langley for fixing it. + (CVE-2012-2110) + [Adam Langley (Google), Tavis Ormandy, Google Security Team] + + Changes between 0.9.8t and 0.9.8u [12 Mar 2012] + + *) Fix MMA (Bleichenbacher's attack on PKCS #1 v1.5 RSA padding) weakness + in CMS and PKCS7 code. When RSA decryption fails use a random key for + content decryption and always return the same error. Note: this attack + needs on average 2^20 messages so it only affects automated senders. The + old behaviour can be reenabled in the CMS code by setting the + CMS_DEBUG_DECRYPT flag: this is useful for debugging and testing where + an MMA defence is not necessary. + Thanks to Ivan Nestlerode for discovering + this issue. (CVE-2012-0884) + [Steve Henson] + + *) Fix CVE-2011-4619: make sure we really are receiving a + client hello before rejecting multiple SGC restarts. Thanks to + Ivan Nestlerode for discovering this bug. + [Steve Henson] + + Changes between 0.9.8s and 0.9.8t [18 Jan 2012] + + *) Fix for DTLS DoS issue introduced by fix for CVE-2011-4109. + Thanks to Antonio Martin, Enterprise Secure Access Research and + Development, Cisco Systems, Inc. for discovering this bug and + preparing a fix. (CVE-2012-0050) + [Antonio Martin] + + Changes between 0.9.8r and 0.9.8s [4 Jan 2012] + + *) Nadhem Alfardan and Kenny Paterson have discovered an extension + of the Vaudenay padding oracle attack on CBC mode encryption + which enables an efficient plaintext recovery attack against + the OpenSSL implementation of DTLS. Their attack exploits timing + differences arising during decryption processing. A research + paper describing this attack can be found at: + http://www.isg.rhul.ac.uk/~kp/dtls.pdf + Thanks go to Nadhem Alfardan and Kenny Paterson of the Information + Security Group at Royal Holloway, University of London + (www.isg.rhul.ac.uk) for discovering this flaw and to Robin Seggelmann + and Michael Tuexen + for preparing the fix. (CVE-2011-4108) + [Robin Seggelmann, Michael Tuexen] + + *) Stop policy check failure freeing same buffer twice. (CVE-2011-4109) + [Ben Laurie, Kasper ] + + *) Clear bytes used for block padding of SSL 3.0 records. + (CVE-2011-4576) + [Adam Langley (Google)] + + *) Only allow one SGC handshake restart for SSL/TLS. Thanks to George + Kadianakis for discovering this issue and + Adam Langley for preparing the fix. (CVE-2011-4619) + [Adam Langley (Google)] + + *) Prevent malformed RFC3779 data triggering an assertion failure. + Thanks to Andrew Chi, BBN Technologies, for discovering the flaw + and Rob Austein for fixing it. (CVE-2011-4577) + [Rob Austein ] + + *) Fix ssl_ciph.c set-up race. + [Adam Langley (Google)] + + *) Fix spurious failures in ecdsatest.c. + [Emilia Käsper (Google)] + + *) Fix the BIO_f_buffer() implementation (which was mixing different + interpretations of the '..._len' fields). + [Adam Langley (Google)] + + *) Fix handling of BN_BLINDING: now BN_BLINDING_invert_ex (rather than + BN_BLINDING_invert_ex) calls BN_BLINDING_update, ensuring that concurrent + threads won't reuse the same blinding coefficients. + + This also avoids the need to obtain the CRYPTO_LOCK_RSA_BLINDING + lock to call BN_BLINDING_invert_ex, and avoids one use of + BN_BLINDING_update for each BN_BLINDING structure (previously, + the last update always remained unused). + [Emilia Käsper (Google)] + + *) Fix SSL memory handling for (EC)DH ciphersuites, in particular + for multi-threaded use of ECDH. + [Adam Langley (Google)] + + *) Fix x509_name_ex_d2i memory leak on bad inputs. + [Bodo Moeller] + + *) Add protection against ECDSA timing attacks as mentioned in the paper + by Billy Bob Brumley and Nicola Tuveri, see: + + http://eprint.iacr.org/2011/232.pdf + + [Billy Bob Brumley and Nicola Tuveri] + + Changes between 0.9.8q and 0.9.8r [8 Feb 2011] + + *) Fix parsing of OCSP stapling ClientHello extension. CVE-2011-0014 + [Neel Mehta, Adam Langley, Bodo Moeller (Google)] + + *) Fix bug in string printing code: if *any* escaping is enabled we must + escape the escape character (backslash) or the resulting string is + ambiguous. + [Steve Henson] + Changes between 0.9.8p and 0.9.8q [2 Dec 2010] *) Disable code workaround for ancient and obsolete Netscape browsers Modified: head/crypto/openssl/Configure ============================================================================== --- head/crypto/openssl/Configure Wed Jun 27 18:08:48 2012 (r237656) +++ head/crypto/openssl/Configure Wed Jun 27 18:44:36 2012 (r237657) @@ -371,6 +371,9 @@ my %table=( "linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}", "linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}", +# Android: Linux but without -DTERMIO and pointers to headers and libs. +"android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + #### *BSD [do see comment about ${BSDthreads} above!] "BSD-generic32","gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "BSD-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", Modified: head/crypto/openssl/FAQ ============================================================================== --- head/crypto/openssl/FAQ Wed Jun 27 18:08:48 2012 (r237656) +++ head/crypto/openssl/FAQ Wed Jun 27 18:44:36 2012 (r237657) @@ -10,6 +10,7 @@ OpenSSL - Frequently Asked Questions * Why aren't tools like 'autoconf' and 'libtool' used? * What is an 'engine' version? * How do I check the authenticity of the OpenSSL distribution? +* How does the versioning scheme work? [LEGAL] Legal questions @@ -82,7 +83,7 @@ OpenSSL - Frequently Asked Questions * Which is the current version of OpenSSL? The current version is available from . -OpenSSL 1.0.0c was released on Dec 2nd, 2010. +OpenSSL 1.0.1c was released on May 10th, 2012. In addition to the current stable release, you can also access daily snapshots of the OpenSSL development version at . Note that the online documents refer to the very latest development versions of OpenSSL and may include features not present in released versions. If in doubt refer to the documentation -that came with the version of OpenSSL you are using. +that came with the version of OpenSSL you are using. The pod format +documentation is included in each OpenSSL distribution under the docs +directory. For information on parts of libcrypto that are not yet documented, you might want to read Ariel Glenn's documentation on SSLeay 0.9, OpenSSL's @@ -173,6 +176,19 @@ just do: pgp TARBALL.asc +* How does the versioning scheme work? + +After the release of OpenSSL 1.0.0 the versioning scheme changed. Letter +releases (e.g. 1.0.1a) can only contain bug and security fixes and no +new features. Minor releases change the last number (e.g. 1.0.2) and +can contain new features that retain binary compatibility. Changes to +the middle number are considered major releases and neither source nor +binary compatibility is guaranteed. + +Therefore the answer to the common question "when will feature X be +backported to OpenSSL 1.0.0/0.9.8?" is "never" but it could appear +in the next minor release. + [LEGAL] ======================================================================= * Do I need patent licenses to use OpenSSL? @@ -284,7 +300,7 @@ current directory in this case, but this Check out the CA.pl(1) manual page. This provides a simple wrapper round the 'req', 'verify', 'ca' and 'pkcs12' utilities. For finer control check out the manual pages for the individual utilities and the certificate -extensions documentation (currently in doc/openssl.txt). +extensions documentation (in ca(1), req(1), x509v3_config(5) ) * Why can't I create certificate requests? Modified: head/crypto/openssl/LICENSE ============================================================================== --- head/crypto/openssl/LICENSE Wed Jun 27 18:08:48 2012 (r237656) +++ head/crypto/openssl/LICENSE Wed Jun 27 18:44:36 2012 (r237657) @@ -12,7 +12,7 @@ --------------- /* ==================================================================== - * Copyright (c) 1998-2008 The OpenSSL Project. All rights reserved. + * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/crypto/openssl/Makefile ============================================================================== --- head/crypto/openssl/Makefile Wed Jun 27 18:08:48 2012 (r237656) +++ head/crypto/openssl/Makefile Wed Jun 27 18:44:36 2012 (r237657) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=0.9.8q +VERSION=0.9.8x MAJOR=0 MINOR=9.8 SHLIB_VERSION_NUMBER=0.9.8 Modified: head/crypto/openssl/NEWS ============================================================================== --- head/crypto/openssl/NEWS Wed Jun 27 18:08:48 2012 (r237656) +++ head/crypto/openssl/NEWS Wed Jun 27 18:44:36 2012 (r237657) @@ -5,6 +5,40 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 0.9.8w and OpenSSL 0.9.8x: + + o Fix DTLS record length checking bug CVE-2012-2333 + + Major changes between OpenSSL 0.9.8v and OpenSSL 0.9.8w: + + o Fix for CVE-2012-2131 (corrected fix for 0.9.8 and CVE-2012-2110) + + Major changes between OpenSSL 0.9.8u and OpenSSL 0.9.8v: + + o Fix for ASN1 overflow bug CVE-2012-2110 + + Major changes between OpenSSL 0.9.8t and OpenSSL 0.9.8u: + + o Fix for CMS/PKCS#7 MMA CVE-2012-0884 + o Corrected fix for CVE-2011-4619 + o Various DTLS fixes. + + Major changes between OpenSSL 0.9.8s and OpenSSL 0.9.8t: + + o Fix for DTLS DoS issue CVE-2012-0050 + + Major changes between OpenSSL 0.9.8r and OpenSSL 0.9.8s: + + o Fix for DTLS plaintext recovery attack CVE-2011-4108 + o Fix policy check double free error CVE-2011-4109 + o Clear block padding bytes of SSL 3.0 records CVE-2011-4576 + o Only allow one SGC handshake restart for SSL/TLS CVE-2011-4619 + o Check for malformed RFC3779 data CVE-2011-4577 + + Major changes between OpenSSL 0.9.8q and OpenSSL 0.9.8r: + + o Fix for security issue CVE-2011-0014 + Major changes between OpenSSL 0.9.8p and OpenSSL 0.9.8q: o Fix for security issue CVE-2010-4180 @@ -181,6 +215,11 @@ o Added initial support for Win64. o Added alternate pkg-config files. + Major changes between OpenSSL 0.9.7l and OpenSSL 0.9.7m: + + o FIPS 1.1.1 module linking. + o Various ciphersuite selection fixes. + Major changes between OpenSSL 0.9.7k and OpenSSL 0.9.7l: o Introduce limits to prevent malicious key DoS (CVE-2006-2940) Modified: head/crypto/openssl/README ============================================================================== --- head/crypto/openssl/README Wed Jun 27 18:08:48 2012 (r237656) +++ head/crypto/openssl/README Wed Jun 27 18:44:36 2012 (r237657) @@ -1,7 +1,7 @@ - OpenSSL 0.9.8q 2 Dec 2010 + OpenSSL 0.9.8x 10 May 2012 - Copyright (c) 1998-2009 The OpenSSL Project + Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson All rights reserved. Modified: head/crypto/openssl/apps/Makefile ============================================================================== --- head/crypto/openssl/apps/Makefile Wed Jun 27 18:08:48 2012 (r237656) +++ head/crypto/openssl/apps/Makefile Wed Jun 27 18:44:36 2012 (r237657) @@ -176,720 +176,703 @@ progs.h: progs.pl app_rand.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h app_rand.o: ../include/openssl/buffer.h ../include/openssl/conf.h app_rand.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -app_rand.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -app_rand.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -app_rand.o: ../include/openssl/evp.h ../include/openssl/fips.h -app_rand.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -app_rand.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -app_rand.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -app_rand.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h -app_rand.o: ../include/openssl/rand.h ../include/openssl/safestack.h -app_rand.o: ../include/openssl/sha.h ../include/openssl/stack.h -app_rand.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -app_rand.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -app_rand.o: ../include/openssl/x509v3.h app_rand.c apps.h +app_rand.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +app_rand.o: ../include/openssl/engine.h ../include/openssl/evp.h +app_rand.o: ../include/openssl/fips.h ../include/openssl/lhash.h +app_rand.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +app_rand.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +app_rand.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +app_rand.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +app_rand.o: ../include/openssl/safestack.h ../include/openssl/sha.h +app_rand.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +app_rand.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +app_rand.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h +app_rand.o: app_rand.c apps.h apps.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h apps.o: ../include/openssl/bn.h ../include/openssl/buffer.h apps.o: ../include/openssl/conf.h ../include/openssl/crypto.h apps.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -apps.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -apps.o: ../include/openssl/engine.h ../include/openssl/err.h -apps.o: ../include/openssl/evp.h ../include/openssl/fips.h -apps.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -apps.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -apps.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -apps.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -apps.o: ../include/openssl/pem2.h ../include/openssl/pkcs12.h -apps.o: ../include/openssl/pkcs7.h ../include/openssl/rsa.h -apps.o: ../include/openssl/safestack.h ../include/openssl/sha.h -apps.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -apps.o: ../include/openssl/txt_db.h ../include/openssl/ui.h -apps.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -apps.o: ../include/openssl/x509v3.h apps.c apps.h +apps.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +apps.o: ../include/openssl/err.h ../include/openssl/evp.h +apps.o: ../include/openssl/fips.h ../include/openssl/lhash.h +apps.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +apps.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +apps.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +apps.o: ../include/openssl/pem.h ../include/openssl/pem2.h +apps.o: ../include/openssl/pkcs12.h ../include/openssl/pkcs7.h +apps.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +apps.o: ../include/openssl/sha.h ../include/openssl/stack.h +apps.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +apps.o: ../include/openssl/ui.h ../include/openssl/x509.h +apps.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.c apps.h asn1pars.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h asn1pars.o: ../include/openssl/buffer.h ../include/openssl/conf.h asn1pars.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -asn1pars.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -asn1pars.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -asn1pars.o: ../include/openssl/err.h ../include/openssl/evp.h -asn1pars.o: ../include/openssl/fips.h ../include/openssl/lhash.h -asn1pars.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -asn1pars.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -asn1pars.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -asn1pars.o: ../include/openssl/pem.h ../include/openssl/pem2.h -asn1pars.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -asn1pars.o: ../include/openssl/sha.h ../include/openssl/stack.h -asn1pars.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -asn1pars.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -asn1pars.o: ../include/openssl/x509v3.h apps.h asn1pars.c +asn1pars.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +asn1pars.o: ../include/openssl/engine.h ../include/openssl/err.h +asn1pars.o: ../include/openssl/evp.h ../include/openssl/fips.h +asn1pars.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +asn1pars.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +asn1pars.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +asn1pars.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +asn1pars.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +asn1pars.o: ../include/openssl/safestack.h ../include/openssl/sha.h +asn1pars.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +asn1pars.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +asn1pars.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +asn1pars.o: asn1pars.c ca.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ca.o: ../include/openssl/bn.h ../include/openssl/buffer.h ca.o: ../include/openssl/conf.h ../include/openssl/crypto.h ca.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -ca.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -ca.o: ../include/openssl/engine.h ../include/openssl/err.h -ca.o: ../include/openssl/evp.h ../include/openssl/fips.h -ca.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -ca.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -ca.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -ca.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -ca.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -ca.o: ../include/openssl/safestack.h ../include/openssl/sha.h -ca.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -ca.o: ../include/openssl/txt_db.h ../include/openssl/x509.h -ca.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h ca.c +ca.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +ca.o: ../include/openssl/err.h ../include/openssl/evp.h +ca.o: ../include/openssl/fips.h ../include/openssl/lhash.h +ca.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +ca.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +ca.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ca.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ca.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h +ca.o: ../include/openssl/sha.h ../include/openssl/stack.h +ca.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +ca.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +ca.o: ../include/openssl/x509v3.h apps.h ca.c ciphers.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ciphers.o: ../include/openssl/bn.h ../include/openssl/buffer.h ciphers.o: ../include/openssl/comp.h ../include/openssl/conf.h ciphers.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h ciphers.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -ciphers.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -ciphers.o: ../include/openssl/engine.h ../include/openssl/err.h -ciphers.o: ../include/openssl/evp.h ../include/openssl/fips.h -ciphers.o: ../include/openssl/hmac.h ../include/openssl/kssl.h -ciphers.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -ciphers.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -ciphers.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -ciphers.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -ciphers.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -ciphers.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h -ciphers.o: ../include/openssl/safestack.h ../include/openssl/sha.h -ciphers.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -ciphers.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -ciphers.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -ciphers.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h -ciphers.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -ciphers.o: ../include/openssl/x509v3.h apps.h ciphers.c +ciphers.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +ciphers.o: ../include/openssl/err.h ../include/openssl/evp.h +ciphers.o: ../include/openssl/fips.h ../include/openssl/hmac.h +ciphers.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +ciphers.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +ciphers.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +ciphers.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ciphers.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ciphers.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h +ciphers.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h +ciphers.o: ../include/openssl/sha.h ../include/openssl/ssl.h +ciphers.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +ciphers.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +ciphers.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +ciphers.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +ciphers.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +ciphers.o: ciphers.c cms.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h cms.o: ../include/openssl/buffer.h ../include/openssl/conf.h cms.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -cms.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -cms.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -cms.o: ../include/openssl/evp.h ../include/openssl/fips.h -cms.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -cms.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -cms.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -cms.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h -cms.o: ../include/openssl/safestack.h ../include/openssl/sha.h -cms.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -cms.o: ../include/openssl/txt_db.h ../include/openssl/x509.h -cms.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h cms.c +cms.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +cms.o: ../include/openssl/engine.h ../include/openssl/evp.h +cms.o: ../include/openssl/fips.h ../include/openssl/lhash.h +cms.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +cms.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +cms.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +cms.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h +cms.o: ../include/openssl/sha.h ../include/openssl/stack.h +cms.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +cms.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +cms.o: ../include/openssl/x509v3.h apps.h cms.c crl.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h crl.o: ../include/openssl/buffer.h ../include/openssl/conf.h crl.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -crl.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -crl.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -crl.o: ../include/openssl/err.h ../include/openssl/evp.h -crl.o: ../include/openssl/fips.h ../include/openssl/lhash.h -crl.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -crl.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -crl.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -crl.o: ../include/openssl/pem.h ../include/openssl/pem2.h -crl.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -crl.o: ../include/openssl/sha.h ../include/openssl/stack.h -crl.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -crl.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -crl.o: ../include/openssl/x509v3.h apps.h crl.c +crl.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +crl.o: ../include/openssl/engine.h ../include/openssl/err.h +crl.o: ../include/openssl/evp.h ../include/openssl/fips.h +crl.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +crl.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +crl.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +crl.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +crl.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +crl.o: ../include/openssl/safestack.h ../include/openssl/sha.h +crl.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +crl.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +crl.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h crl.c crl2p7.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h crl2p7.o: ../include/openssl/buffer.h ../include/openssl/conf.h crl2p7.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -crl2p7.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -crl2p7.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -crl2p7.o: ../include/openssl/err.h ../include/openssl/evp.h -crl2p7.o: ../include/openssl/fips.h ../include/openssl/lhash.h -crl2p7.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -crl2p7.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -crl2p7.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -crl2p7.o: ../include/openssl/pem.h ../include/openssl/pem2.h -crl2p7.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -crl2p7.o: ../include/openssl/sha.h ../include/openssl/stack.h -crl2p7.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -crl2p7.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -crl2p7.o: ../include/openssl/x509v3.h apps.h crl2p7.c +crl2p7.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +crl2p7.o: ../include/openssl/engine.h ../include/openssl/err.h +crl2p7.o: ../include/openssl/evp.h ../include/openssl/fips.h +crl2p7.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +crl2p7.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +crl2p7.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +crl2p7.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +crl2p7.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +crl2p7.o: ../include/openssl/safestack.h ../include/openssl/sha.h +crl2p7.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +crl2p7.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +crl2p7.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +crl2p7.o: crl2p7.c dgst.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h dgst.o: ../include/openssl/buffer.h ../include/openssl/conf.h dgst.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -dgst.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -dgst.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -dgst.o: ../include/openssl/err.h ../include/openssl/evp.h -dgst.o: ../include/openssl/fips.h ../include/openssl/hmac.h -dgst.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -dgst.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -dgst.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -dgst.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -dgst.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -dgst.o: ../include/openssl/safestack.h ../include/openssl/sha.h -dgst.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -dgst.o: ../include/openssl/txt_db.h ../include/openssl/x509.h -dgst.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h dgst.c +dgst.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +dgst.o: ../include/openssl/engine.h ../include/openssl/err.h +dgst.o: ../include/openssl/evp.h ../include/openssl/fips.h +dgst.o: ../include/openssl/hmac.h ../include/openssl/lhash.h +dgst.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +dgst.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +dgst.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +dgst.o: ../include/openssl/pem.h ../include/openssl/pem2.h +dgst.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h +dgst.o: ../include/openssl/sha.h ../include/openssl/stack.h +dgst.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +dgst.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +dgst.o: ../include/openssl/x509v3.h apps.h dgst.c dh.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h dh.o: ../include/openssl/bn.h ../include/openssl/buffer.h dh.o: ../include/openssl/conf.h ../include/openssl/crypto.h dh.o: ../include/openssl/dh.h ../include/openssl/e_os2.h -dh.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -dh.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -dh.o: ../include/openssl/err.h ../include/openssl/evp.h -dh.o: ../include/openssl/fips.h ../include/openssl/lhash.h -dh.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -dh.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -dh.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -dh.o: ../include/openssl/pem.h ../include/openssl/pem2.h -dh.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -dh.o: ../include/openssl/sha.h ../include/openssl/stack.h -dh.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -dh.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -dh.o: ../include/openssl/x509v3.h apps.h dh.c +dh.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +dh.o: ../include/openssl/engine.h ../include/openssl/err.h +dh.o: ../include/openssl/evp.h ../include/openssl/fips.h +dh.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +dh.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +dh.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +dh.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +dh.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +dh.o: ../include/openssl/safestack.h ../include/openssl/sha.h +dh.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +dh.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +dh.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h dh.c dsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h dsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h dsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h dsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -dsa.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -dsa.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -dsa.o: ../include/openssl/err.h ../include/openssl/evp.h -dsa.o: ../include/openssl/fips.h ../include/openssl/lhash.h -dsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -dsa.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -dsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -dsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h -dsa.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -dsa.o: ../include/openssl/sha.h ../include/openssl/stack.h -dsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -dsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -dsa.o: ../include/openssl/x509v3.h apps.h dsa.c +dsa.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +dsa.o: ../include/openssl/engine.h ../include/openssl/err.h +dsa.o: ../include/openssl/evp.h ../include/openssl/fips.h +dsa.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +dsa.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +dsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +dsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +dsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +dsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h +dsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +dsa.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +dsa.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h dsa.c dsaparam.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h dsaparam.o: ../include/openssl/bn.h ../include/openssl/buffer.h dsaparam.o: ../include/openssl/conf.h ../include/openssl/crypto.h dsaparam.o: ../include/openssl/dh.h ../include/openssl/dsa.h dsaparam.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -dsaparam.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -dsaparam.o: ../include/openssl/engine.h ../include/openssl/err.h -dsaparam.o: ../include/openssl/evp.h ../include/openssl/fips.h -dsaparam.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -dsaparam.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -dsaparam.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -dsaparam.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -dsaparam.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -dsaparam.o: ../include/openssl/rand.h ../include/openssl/rsa.h -dsaparam.o: ../include/openssl/safestack.h ../include/openssl/sha.h -dsaparam.o: ../include/openssl/stack.h ../include/openssl/store.h -dsaparam.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -dsaparam.o: ../include/openssl/ui.h ../include/openssl/x509.h -dsaparam.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h -dsaparam.o: dsaparam.c +dsaparam.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +dsaparam.o: ../include/openssl/err.h ../include/openssl/evp.h +dsaparam.o: ../include/openssl/fips.h ../include/openssl/lhash.h +dsaparam.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +dsaparam.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +dsaparam.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +dsaparam.o: ../include/openssl/pem.h ../include/openssl/pem2.h +dsaparam.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +dsaparam.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +dsaparam.o: ../include/openssl/sha.h ../include/openssl/stack.h +dsaparam.o: ../include/openssl/store.h ../include/openssl/symhacks.h +dsaparam.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +dsaparam.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +dsaparam.o: ../include/openssl/x509v3.h apps.h dsaparam.c ec.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ec.o: ../include/openssl/buffer.h ../include/openssl/conf.h ec.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -ec.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -ec.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -ec.o: ../include/openssl/err.h ../include/openssl/evp.h -ec.o: ../include/openssl/fips.h ../include/openssl/lhash.h -ec.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -ec.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -ec.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -ec.o: ../include/openssl/pem.h ../include/openssl/pem2.h -ec.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -ec.o: ../include/openssl/sha.h ../include/openssl/stack.h -ec.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -ec.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -ec.o: ../include/openssl/x509v3.h apps.h ec.c +ec.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +ec.o: ../include/openssl/engine.h ../include/openssl/err.h +ec.o: ../include/openssl/evp.h ../include/openssl/fips.h +ec.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +ec.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +ec.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +ec.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +ec.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +ec.o: ../include/openssl/safestack.h ../include/openssl/sha.h +ec.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +ec.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +ec.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h ec.c ecparam.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ecparam.o: ../include/openssl/bn.h ../include/openssl/buffer.h ecparam.o: ../include/openssl/conf.h ../include/openssl/crypto.h ecparam.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -ecparam.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -ecparam.o: ../include/openssl/engine.h ../include/openssl/err.h -ecparam.o: ../include/openssl/evp.h ../include/openssl/fips.h -ecparam.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -ecparam.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -ecparam.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -ecparam.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -ecparam.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -ecparam.o: ../include/openssl/safestack.h ../include/openssl/sha.h -ecparam.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -ecparam.o: ../include/openssl/txt_db.h ../include/openssl/x509.h -ecparam.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h -ecparam.o: ecparam.c +ecparam.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +ecparam.o: ../include/openssl/err.h ../include/openssl/evp.h +ecparam.o: ../include/openssl/fips.h ../include/openssl/lhash.h +ecparam.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +ecparam.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +ecparam.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ecparam.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ecparam.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h +ecparam.o: ../include/openssl/sha.h ../include/openssl/stack.h +ecparam.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +ecparam.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +ecparam.o: ../include/openssl/x509v3.h apps.h ecparam.c enc.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h enc.o: ../include/openssl/buffer.h ../include/openssl/conf.h enc.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -enc.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -enc.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -enc.o: ../include/openssl/err.h ../include/openssl/evp.h -enc.o: ../include/openssl/fips.h ../include/openssl/lhash.h -enc.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -enc.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -enc.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -enc.o: ../include/openssl/pem.h ../include/openssl/pem2.h -enc.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h -enc.o: ../include/openssl/safestack.h ../include/openssl/sha.h -enc.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -enc.o: ../include/openssl/txt_db.h ../include/openssl/x509.h -enc.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h enc.c +enc.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +enc.o: ../include/openssl/engine.h ../include/openssl/err.h +enc.o: ../include/openssl/evp.h ../include/openssl/fips.h +enc.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +enc.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +enc.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +enc.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +enc.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +enc.o: ../include/openssl/rand.h ../include/openssl/safestack.h +enc.o: ../include/openssl/sha.h ../include/openssl/stack.h +enc.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h +enc.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +enc.o: ../include/openssl/x509v3.h apps.h enc.c engine.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h engine.o: ../include/openssl/bn.h ../include/openssl/buffer.h engine.o: ../include/openssl/comp.h ../include/openssl/conf.h engine.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h engine.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -engine.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -engine.o: ../include/openssl/engine.h ../include/openssl/err.h -engine.o: ../include/openssl/evp.h ../include/openssl/fips.h -engine.o: ../include/openssl/hmac.h ../include/openssl/kssl.h -engine.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -engine.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -engine.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -engine.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -engine.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -engine.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h -engine.o: ../include/openssl/safestack.h ../include/openssl/sha.h -engine.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -engine.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -engine.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -engine.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h -engine.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -engine.o: ../include/openssl/x509v3.h apps.h engine.c +engine.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +engine.o: ../include/openssl/err.h ../include/openssl/evp.h +engine.o: ../include/openssl/fips.h ../include/openssl/hmac.h +engine.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +engine.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +engine.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +engine.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +engine.o: ../include/openssl/pem.h ../include/openssl/pem2.h +engine.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h +engine.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h +engine.o: ../include/openssl/sha.h ../include/openssl/ssl.h +engine.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +engine.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +engine.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +engine.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +engine.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +engine.o: engine.c errstr.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h errstr.o: ../include/openssl/bn.h ../include/openssl/buffer.h errstr.o: ../include/openssl/comp.h ../include/openssl/conf.h errstr.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h errstr.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -errstr.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -errstr.o: ../include/openssl/engine.h ../include/openssl/err.h -errstr.o: ../include/openssl/evp.h ../include/openssl/fips.h -errstr.o: ../include/openssl/hmac.h ../include/openssl/kssl.h -errstr.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -errstr.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -errstr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -errstr.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -errstr.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -errstr.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h -errstr.o: ../include/openssl/safestack.h ../include/openssl/sha.h -errstr.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -errstr.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -errstr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -errstr.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h -errstr.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -errstr.o: ../include/openssl/x509v3.h apps.h errstr.c +errstr.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +errstr.o: ../include/openssl/err.h ../include/openssl/evp.h +errstr.o: ../include/openssl/fips.h ../include/openssl/hmac.h +errstr.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +errstr.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +errstr.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +errstr.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +errstr.o: ../include/openssl/pem.h ../include/openssl/pem2.h +errstr.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h +errstr.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h +errstr.o: ../include/openssl/sha.h ../include/openssl/ssl.h +errstr.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +errstr.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +errstr.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +errstr.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +errstr.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +errstr.o: errstr.c gendh.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h gendh.o: ../include/openssl/bn.h ../include/openssl/buffer.h gendh.o: ../include/openssl/conf.h ../include/openssl/crypto.h gendh.o: ../include/openssl/dh.h ../include/openssl/dsa.h gendh.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -gendh.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -gendh.o: ../include/openssl/engine.h ../include/openssl/err.h -gendh.o: ../include/openssl/evp.h ../include/openssl/fips.h -gendh.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -gendh.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -gendh.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -gendh.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -gendh.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -gendh.o: ../include/openssl/rand.h ../include/openssl/rsa.h -gendh.o: ../include/openssl/safestack.h ../include/openssl/sha.h -gendh.o: ../include/openssl/stack.h ../include/openssl/store.h -gendh.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -gendh.o: ../include/openssl/ui.h ../include/openssl/x509.h -gendh.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h -gendh.o: gendh.c +gendh.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +gendh.o: ../include/openssl/err.h ../include/openssl/evp.h +gendh.o: ../include/openssl/fips.h ../include/openssl/lhash.h +gendh.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +gendh.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +gendh.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +gendh.o: ../include/openssl/pem.h ../include/openssl/pem2.h +gendh.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +gendh.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +gendh.o: ../include/openssl/sha.h ../include/openssl/stack.h +gendh.o: ../include/openssl/store.h ../include/openssl/symhacks.h +gendh.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +gendh.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +gendh.o: ../include/openssl/x509v3.h apps.h gendh.c gendsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h gendsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h gendsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h gendsa.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h -gendsa.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -gendsa.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -gendsa.o: ../include/openssl/err.h ../include/openssl/evp.h -gendsa.o: ../include/openssl/fips.h ../include/openssl/lhash.h -gendsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -gendsa.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -gendsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -gendsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h -gendsa.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -gendsa.o: ../include/openssl/sha.h ../include/openssl/stack.h -gendsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -gendsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -gendsa.o: ../include/openssl/x509v3.h apps.h gendsa.c +gendsa.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +gendsa.o: ../include/openssl/engine.h ../include/openssl/err.h +gendsa.o: ../include/openssl/evp.h ../include/openssl/fips.h +gendsa.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +gendsa.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +gendsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +gendsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +gendsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +gendsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h +gendsa.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +gendsa.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +gendsa.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h +gendsa.o: gendsa.c genrsa.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h genrsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h genrsa.o: ../include/openssl/conf.h ../include/openssl/crypto.h genrsa.o: ../include/openssl/dh.h ../include/openssl/dsa.h genrsa.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -genrsa.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -genrsa.o: ../include/openssl/engine.h ../include/openssl/err.h -genrsa.o: ../include/openssl/evp.h ../include/openssl/fips.h -genrsa.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -genrsa.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -genrsa.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -genrsa.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -genrsa.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -genrsa.o: ../include/openssl/rand.h ../include/openssl/rsa.h -genrsa.o: ../include/openssl/safestack.h ../include/openssl/sha.h -genrsa.o: ../include/openssl/stack.h ../include/openssl/store.h -genrsa.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -genrsa.o: ../include/openssl/ui.h ../include/openssl/x509.h -genrsa.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h -genrsa.o: genrsa.c +genrsa.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +genrsa.o: ../include/openssl/err.h ../include/openssl/evp.h +genrsa.o: ../include/openssl/fips.h ../include/openssl/lhash.h +genrsa.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +genrsa.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +genrsa.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +genrsa.o: ../include/openssl/pem.h ../include/openssl/pem2.h +genrsa.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h +genrsa.o: ../include/openssl/rsa.h ../include/openssl/safestack.h +genrsa.o: ../include/openssl/sha.h ../include/openssl/stack.h +genrsa.o: ../include/openssl/store.h ../include/openssl/symhacks.h +genrsa.o: ../include/openssl/txt_db.h ../include/openssl/ui.h +genrsa.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h +genrsa.o: ../include/openssl/x509v3.h apps.h genrsa.c nseq.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h nseq.o: ../include/openssl/buffer.h ../include/openssl/conf.h nseq.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h -nseq.o: ../include/openssl/ec.h ../include/openssl/ecdh.h -nseq.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h -nseq.o: ../include/openssl/err.h ../include/openssl/evp.h -nseq.o: ../include/openssl/fips.h ../include/openssl/lhash.h -nseq.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h -nseq.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h -nseq.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h -nseq.o: ../include/openssl/pem.h ../include/openssl/pem2.h -nseq.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h -nseq.o: ../include/openssl/sha.h ../include/openssl/stack.h -nseq.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h -nseq.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -nseq.o: ../include/openssl/x509v3.h apps.h nseq.c +nseq.o: ../include/openssl/ec.h ../include/openssl/ecdsa.h +nseq.o: ../include/openssl/engine.h ../include/openssl/err.h +nseq.o: ../include/openssl/evp.h ../include/openssl/fips.h +nseq.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h +nseq.o: ../include/openssl/objects.h ../include/openssl/ocsp.h +nseq.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h +nseq.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h +nseq.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h +nseq.o: ../include/openssl/safestack.h ../include/openssl/sha.h +nseq.o: ../include/openssl/stack.h ../include/openssl/symhacks.h +nseq.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +nseq.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h nseq.c ocsp.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h ocsp.o: ../include/openssl/bn.h ../include/openssl/buffer.h ocsp.o: ../include/openssl/comp.h ../include/openssl/conf.h ocsp.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h ocsp.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -ocsp.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -ocsp.o: ../include/openssl/engine.h ../include/openssl/err.h -ocsp.o: ../include/openssl/evp.h ../include/openssl/fips.h -ocsp.o: ../include/openssl/hmac.h ../include/openssl/kssl.h -ocsp.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h -ocsp.o: ../include/openssl/objects.h ../include/openssl/ocsp.h -ocsp.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h -ocsp.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h -ocsp.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h -ocsp.o: ../include/openssl/pq_compat.h ../include/openssl/pqueue.h -ocsp.o: ../include/openssl/safestack.h ../include/openssl/sha.h -ocsp.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h -ocsp.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h -ocsp.o: ../include/openssl/stack.h ../include/openssl/symhacks.h -ocsp.o: ../include/openssl/tls1.h ../include/openssl/txt_db.h -ocsp.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h -ocsp.o: ../include/openssl/x509v3.h apps.h ocsp.c +ocsp.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h +ocsp.o: ../include/openssl/err.h ../include/openssl/evp.h +ocsp.o: ../include/openssl/fips.h ../include/openssl/hmac.h +ocsp.o: ../include/openssl/kssl.h ../include/openssl/lhash.h +ocsp.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h +ocsp.o: ../include/openssl/ocsp.h ../include/openssl/opensslconf.h +ocsp.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h +ocsp.o: ../include/openssl/pem.h ../include/openssl/pem2.h +ocsp.o: ../include/openssl/pkcs7.h ../include/openssl/pq_compat.h +ocsp.o: ../include/openssl/pqueue.h ../include/openssl/safestack.h +ocsp.o: ../include/openssl/sha.h ../include/openssl/ssl.h +ocsp.o: ../include/openssl/ssl2.h ../include/openssl/ssl23.h +ocsp.o: ../include/openssl/ssl3.h ../include/openssl/stack.h +ocsp.o: ../include/openssl/symhacks.h ../include/openssl/tls1.h +ocsp.o: ../include/openssl/txt_db.h ../include/openssl/x509.h +ocsp.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h ocsp.c openssl.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h openssl.o: ../include/openssl/bn.h ../include/openssl/buffer.h openssl.o: ../include/openssl/comp.h ../include/openssl/conf.h openssl.o: ../include/openssl/crypto.h ../include/openssl/dtls1.h openssl.o: ../include/openssl/e_os2.h ../include/openssl/ec.h -openssl.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h -openssl.o: ../include/openssl/engine.h ../include/openssl/err.h *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 19:02: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 9E62F106566C; Wed, 27 Jun 2012 19:02:33 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 214EC8FC16; Wed, 27 Jun 2012 19:02:33 +0000 (UTC) Message-ID: <4FEB58C8.6060001@FreeBSD.org> Date: Wed, 27 Jun 2012 15:02:32 -0400 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120626 Thunderbird/13.0.1 MIME-Version: 1.0 To: Jung-uk Kim References: <201206271844.q5RIibeP026457@svn.freebsd.org> In-Reply-To: <201206271844.q5RIibeP026457@svn.freebsd.org> X-Enigmail-Version: 1.4.2 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: r237657 - in head: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/bn crypto/openssl/crypto/bn/asm cr... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 27 Jun 2012 19:02:33 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2012-06-27 14:44:37 -0400, Jung-uk Kim wrote: > Author: jkim Date: Wed Jun 27 18:44:36 2012 New Revision: 237657 > URL: http://svn.freebsd.org/changeset/base/237657 > > Log: Merge OpenSSL 0.9.8x. > > Reviewed by: stas Approved by: benl (maintainer) MFC after: 3 days Please note I didn't regenerate i386 asm files on purpose. They are seriously out-dated (generated 8 years ago with GCC 2.x). I'll prepare for a separate patch for them (and amd64 asm files). Cheers, Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/rWMgACgkQmlay1b9qnVOdoQCgmSGvKOUV3kz6yHmwv6z2ehR4 29YAn20OdcJPG6D3ViZLP6ILNl/VwU8Z =VR4S -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 19:17: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 B787A106566B; Wed, 27 Jun 2012 19:17:45 +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 8C5EB8FC0A; Wed, 27 Jun 2012 19:17:45 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0CEB4B944; Wed, 27 Jun 2012 15:17:45 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Date: Wed, 27 Jun 2012 15:17:26 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201206271808.q5RI8m0d024853@svn.freebsd.org> In-Reply-To: <201206271808.q5RI8m0d024853@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201206271517.26128.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 27 Jun 2012 15:17:45 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r237656 - in head: contrib/top usr.bin/top X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 27 Jun 2012 19:17:45 -0000 On Wednesday, June 27, 2012 2:08:48 pm John Baldwin wrote: > Author: jhb > Date: Wed Jun 27 18:08:48 2012 > New Revision: 237656 > URL: http://svn.freebsd.org/changeset/base/237656 > > Log: > Add a new line to top that provides a brief summary of the ZFS ARC memory > usage on hosts using ZFS. The new line displays the total amount of RAM > used by the ARC along with the size of MFU, MRU, anonymous (in flight), > headers, and other (miscellaneous) sub-categories. The line is not > displayed on systems that are not using ZFS. > > Reviewed by: avg, fs@ > MFC after: 3 days FYI, sample output: CPU: 0.0% user, 0.0% nice, 0.0% system, 0.0% interrupt, 100% idle Mem: 1252M Active, 1422M Inact, 23G Wired, 331M Buf, 21G Free ARC: 21G Total, 1354M MRU, 19G MFU, 272K Anon, 243M Header, 447M Other Swap: 8192M Total, 8192M Free -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 19:23: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 944CA106566C; Wed, 27 Jun 2012 19:23:30 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 65E3D8FC17; Wed, 27 Jun 2012 19:23: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 q5RJNU2S028155; Wed, 27 Jun 2012 19:23:30 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5RJNUDj028151; Wed, 27 Jun 2012 19:23:30 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201206271923.q5RJNUDj028151@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 27 Jun 2012 19: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: r237658 - in head/crypto/openssl/doc: apps crypto X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 27 Jun 2012 19:23:30 -0000 Author: jkim Date: Wed Jun 27 19:23:29 2012 New Revision: 237658 URL: http://svn.freebsd.org/changeset/base/237658 Log: Partially redo r226436, i. e., change "the the" to "the". ca(1), dgst(1), and engine(3) are generated from these pod files during merge process and we do not want to re-apply these changes over and over again. Approved by: benl (maintainer, implicit) Modified: head/crypto/openssl/doc/apps/ca.pod head/crypto/openssl/doc/apps/dgst.pod head/crypto/openssl/doc/crypto/engine.pod Modified: head/crypto/openssl/doc/apps/ca.pod ============================================================================== --- head/crypto/openssl/doc/apps/ca.pod Wed Jun 27 18:44:36 2012 (r237657) +++ head/crypto/openssl/doc/apps/ca.pod Wed Jun 27 19:23:29 2012 (r237658) @@ -88,7 +88,7 @@ section for information on the required =item B<-infiles> if present this should be the last option, all subsequent arguments -are assumed to the the names of files containing certificate requests. +are assumed to be the names of files containing certificate requests. =item B<-out filename> Modified: head/crypto/openssl/doc/apps/dgst.pod ============================================================================== --- head/crypto/openssl/doc/apps/dgst.pod Wed Jun 27 18:44:36 2012 (r237657) +++ head/crypto/openssl/doc/apps/dgst.pod Wed Jun 27 19:23:29 2012 (r237658) @@ -68,7 +68,7 @@ see the B section =item B<-verify filename> -verify the signature using the the public key in "filename". +verify the signature using the public key in "filename". The output is either "Verification OK" or "Verification Failure". =item B<-prverify filename> Modified: head/crypto/openssl/doc/crypto/engine.pod ============================================================================== --- head/crypto/openssl/doc/crypto/engine.pod Wed Jun 27 18:44:36 2012 (r237657) +++ head/crypto/openssl/doc/crypto/engine.pod Wed Jun 27 19:23:29 2012 (r237658) @@ -517,7 +517,7 @@ implemented by ENGINEs should be numbere this symbol is considered a "generic" command is handled directly by the OpenSSL core routines. -It is using these "core" control commands that one can discover the the control +It is using these "core" control commands that one can discover the control commands implemented by a given ENGINE, specifically the commands; #define ENGINE_HAS_CTRL_FUNCTION 10 From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 20:20: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 0CC771065673; Wed, 27 Jun 2012 20:20:34 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 98A9A8FC15; Wed, 27 Jun 2012 20:20:33 +0000 (UTC) Message-ID: <4FEB6B11.8080309@FreeBSD.org> Date: Wed, 27 Jun 2012 16:20:33 -0400 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120626 Thunderbird/13.0.1 MIME-Version: 1.0 To: src-committers@freebsd.org References: <201206271844.q5RIibeP026457@svn.freebsd.org> <4FEB58C8.6060001@FreeBSD.org> In-Reply-To: <4FEB58C8.6060001@FreeBSD.org> X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r237657 - in head: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/bn crypto/openssl/crypto/bn/asm cr... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 27 Jun 2012 20:20:34 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2012-06-27 15:02:32 -0400, Jung-uk Kim wrote: > On 2012-06-27 14:44:37 -0400, Jung-uk Kim wrote: >> Author: jkim Date: Wed Jun 27 18:44:36 2012 New Revision: 237657 >> URL: http://svn.freebsd.org/changeset/base/237657 > >> Log: Merge OpenSSL 0.9.8x. > >> Reviewed by: stas Approved by: benl (maintainer) MFC after: 3 >> days > > Please note I didn't regenerate i386 asm files on purpose. They > are seriously out-dated (generated 8 years ago with GCC 2.x). > I'll prepare for a separate patch for them (and amd64 asm files). FYI, the patch is available from here: http://people.freebsd.org/~jkim/openssl-asm.diff Waiting for maintainer's approval... ;-) Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/raxEACgkQmlay1b9qnVNQlACfXyP+U5C6nDSe09mubS1j611+ Q/4AniJsKobRrvRkPtekL/+hzce88L/T =P0WV -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 20:24: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 97865106564A; Wed, 27 Jun 2012 20:24:26 +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 54DBE8FC16; Wed, 27 Jun 2012 20:24: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 q5RKOQZ4030763; Wed, 27 Jun 2012 20:24:26 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5RKOQRU030761; Wed, 27 Jun 2012 20:24:26 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201206272024.q5RKOQRU030761@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 27 Jun 2012 20:24: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: r237659 - head/libexec/rtld-elf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2012 20:24:26 -0000 Author: kib Date: Wed Jun 27 20:24:25 2012 New Revision: 237659 URL: http://svn.freebsd.org/changeset/base/237659 Log: Ensure that for the object which is a dependency for some filtee, relocations are performed before the object's initializer is called. When dlopen()ing an object, relocate the whole DAG rooted in the object instead of only relocating the object itself and list of newly loaded dependencies. Reversed sequence currently can occur if the same object is a dependency for both filtee and filter, since filtees are loaded typically during the relocation processing, when some filter dependencies might be already loaded but not relocated yet. Reported and tested by: swills Reviewed by: kan MFC after: 1 week Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Wed Jun 27 19:23:29 2012 (r237658) +++ head/libexec/rtld-elf/rtld.c Wed Jun 27 20:24:25 2012 (r237659) @@ -117,6 +117,10 @@ static void objlist_push_head(Objlist *, static void objlist_push_tail(Objlist *, Obj_Entry *); static void objlist_remove(Objlist *, Obj_Entry *); static void *path_enumerate(const char *, path_enum_proc, void *); +static int relocate_object_dag(Obj_Entry *root, bool bind_now, + Obj_Entry *rtldobj, int flags, RtldLockState *lockstate); +static int relocate_object(Obj_Entry *obj, bool bind_now, Obj_Entry *rtldobj, + int flags, RtldLockState *lockstate); static int relocate_objects(Obj_Entry *, bool, Obj_Entry *, int, RtldLockState *); static int resolve_objects_ifunc(Obj_Entry *first, bool bind_now, @@ -2217,52 +2221,70 @@ objlist_remove(Objlist *list, Obj_Entry } /* - * Relocate newly-loaded shared objects. The argument is a pointer to - * the Obj_Entry for the first such object. All objects from the first - * to the end of the list of objects are relocated. Returns 0 on success, - * or -1 on failure. + * Relocate dag rooted in the specified object. + * Returns 0 on success, or -1 on failure. */ + static int -relocate_objects(Obj_Entry *first, bool bind_now, Obj_Entry *rtldobj, +relocate_object_dag(Obj_Entry *root, bool bind_now, Obj_Entry *rtldobj, + int flags, RtldLockState *lockstate) +{ + Objlist_Entry *elm; + int error; + + error = 0; + STAILQ_FOREACH(elm, &root->dagmembers, link) { + error = relocate_object(elm->obj, bind_now, rtldobj, flags, + lockstate); + if (error == -1) + break; + } + return (error); +} + +/* + * Relocate single object. + * Returns 0 on success, or -1 on failure. + */ +static int +relocate_object(Obj_Entry *obj, bool bind_now, Obj_Entry *rtldobj, int flags, RtldLockState *lockstate) { - Obj_Entry *obj; - for (obj = first; obj != NULL; obj = obj->next) { if (obj->relocated) - continue; + return (0); obj->relocated = true; if (obj != rtldobj) - dbg("relocating \"%s\"", obj->path); + dbg("relocating \"%s\"", obj->path); if (obj->symtab == NULL || obj->strtab == NULL || - !(obj->valid_hash_sysv || obj->valid_hash_gnu)) { - _rtld_error("%s: Shared object has no run-time symbol table", - obj->path); - return -1; + !(obj->valid_hash_sysv || obj->valid_hash_gnu)) { + _rtld_error("%s: Shared object has no run-time symbol table", + obj->path); + return (-1); } if (obj->textrel) { - /* There are relocations to the write-protected text segment. */ - if (mprotect(obj->mapbase, obj->textsize, - PROT_READ|PROT_WRITE|PROT_EXEC) == -1) { - _rtld_error("%s: Cannot write-enable text segment: %s", - obj->path, rtld_strerror(errno)); - return -1; - } + /* There are relocations to the write-protected text segment. */ + if (mprotect(obj->mapbase, obj->textsize, + PROT_READ|PROT_WRITE|PROT_EXEC) == -1) { + _rtld_error("%s: Cannot write-enable text segment: %s", + obj->path, rtld_strerror(errno)); + return (-1); + } } /* Process the non-PLT relocations. */ if (reloc_non_plt(obj, rtldobj, flags, lockstate)) - return -1; + return (-1); if (obj->textrel) { /* Re-protected the text segment. */ - if (mprotect(obj->mapbase, obj->textsize, - PROT_READ|PROT_EXEC) == -1) { - _rtld_error("%s: Cannot write-protect text segment: %s", - obj->path, rtld_strerror(errno)); - return -1; - } + if (mprotect(obj->mapbase, obj->textsize, + PROT_READ|PROT_EXEC) == -1) { + _rtld_error("%s: Cannot write-protect text segment: %s", + obj->path, rtld_strerror(errno)); + return (-1); + } } @@ -2271,18 +2293,19 @@ relocate_objects(Obj_Entry *first, bool /* Process the PLT relocations. */ if (reloc_plt(obj) == -1) - return -1; + return (-1); /* Relocate the jump slots if we are doing immediate binding. */ if (obj->bind_now || bind_now) - if (reloc_jmpslots(obj, flags, lockstate) == -1) - return -1; + if (reloc_jmpslots(obj, flags, lockstate) == -1) + return (-1); if (obj->relro_size > 0) { - if (mprotect(obj->relro_page, obj->relro_size, PROT_READ) == -1) { - _rtld_error("%s: Cannot enforce relro protection: %s", - obj->path, rtld_strerror(errno)); - return -1; - } + if (mprotect(obj->relro_page, obj->relro_size, + PROT_READ) == -1) { + _rtld_error("%s: Cannot enforce relro protection: %s", + obj->path, rtld_strerror(errno)); + return (-1); + } } /* @@ -2292,9 +2315,30 @@ relocate_objects(Obj_Entry *first, bool */ obj->magic = RTLD_MAGIC; obj->version = RTLD_VERSION; - } - return (0); + return (0); +} + +/* + * Relocate newly-loaded shared objects. The argument is a pointer to + * the Obj_Entry for the first such object. All objects from the first + * to the end of the list of objects are relocated. Returns 0 on success, + * or -1 on failure. + */ +static int +relocate_objects(Obj_Entry *first, bool bind_now, Obj_Entry *rtldobj, + int flags, RtldLockState *lockstate) +{ + Obj_Entry *obj; + int error; + + for (error = 0, obj = first; obj != NULL; obj = obj->next) { + error = relocate_object(obj, bind_now, rtldobj, flags, + lockstate); + if (error == -1) + break; + } + return (error); } /* @@ -2614,10 +2658,10 @@ dlopen_object(const char *name, int fd, result = rtld_verify_versions(&obj->dagmembers); if (result != -1 && ld_tracing) goto trace; - if (result == -1 || (relocate_objects(obj, - (mode & RTLD_MODEMASK) == RTLD_NOW, &obj_rtld, + if (result == -1 || relocate_object_dag(obj, + (mode & RTLD_MODEMASK) == RTLD_NOW, &obj_rtld, (lo_flags & RTLD_LO_EARLY) ? SYMLOOK_EARLY : 0, - lockstate)) == -1) { + lockstate) == -1) { dlopen_cleanup(obj); obj = NULL; } else if (lo_flags & RTLD_LO_EARLY) { From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 20:32: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 28779106566C; Wed, 27 Jun 2012 20:32:46 +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 136548FC21; Wed, 27 Jun 2012 20:32: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 q5RKWjii031176; Wed, 27 Jun 2012 20:32:45 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5RKWjvt031174; Wed, 27 Jun 2012 20:32:45 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201206272032.q5RKWjvt031174@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 27 Jun 2012 20:32: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: r237660 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2012 20:32:46 -0000 Author: kib Date: Wed Jun 27 20:32:45 2012 New Revision: 237660 URL: http://svn.freebsd.org/changeset/base/237660 Log: Optimize the handling of SC_NPROCESSORS_CONF, by using auxv AT_NCPU value if present. MFC after: 1 week Modified: head/lib/libc/gen/sysconf.c Modified: head/lib/libc/gen/sysconf.c ============================================================================== --- head/lib/libc/gen/sysconf.c Wed Jun 27 20:24:25 2012 (r237659) +++ head/lib/libc/gen/sysconf.c Wed Jun 27 20:32:45 2012 (r237660) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -51,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include "../stdlib/atexit.h" #include "tzfile.h" /* from ../../../contrib/tzcode/stdtime */ +#include "libc_private.h" #define _PATH_ZONEINFO TZDIR /* from tzfile.h */ @@ -585,6 +587,8 @@ yesno: case _SC_NPROCESSORS_CONF: case _SC_NPROCESSORS_ONLN: + if (_elf_aux_info(AT_NCPUS, &value, sizeof(value)) == 0) + return ((long)value); mib[0] = CTL_HW; mib[1] = HW_NCPU; break; From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 20:34: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 84CC1106566C; Wed, 27 Jun 2012 20:34:30 +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 6FF248FC1E; Wed, 27 Jun 2012 20:34: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 q5RKYUu2031298; Wed, 27 Jun 2012 20:34:30 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5RKYUrN031296; Wed, 27 Jun 2012 20:34:30 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201206272034.q5RKYUrN031296@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 27 Jun 2012 20:34: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: r237661 - head/tools/test/auxinfo X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 27 Jun 2012 20:34:30 -0000 Author: kib Date: Wed Jun 27 20:34:29 2012 New Revision: 237661 URL: http://svn.freebsd.org/changeset/base/237661 Log: Add a test for number of CPUs configured/online. MFC after: 1 week Modified: head/tools/test/auxinfo/auxinfo.c Modified: head/tools/test/auxinfo/auxinfo.c ============================================================================== --- head/tools/test/auxinfo/auxinfo.c Wed Jun 27 20:32:45 2012 (r237660) +++ head/tools/test/auxinfo/auxinfo.c Wed Jun 27 20:34:29 2012 (r237661) @@ -47,6 +47,13 @@ test_osreldate(void) printf("OSRELDATE: %d\n", getosreldate()); } +static void +test_ncpus(void) +{ + + printf("NCPUs: %ld\n", sysconf(_SC_NPROCESSORS_CONF)); +} + int main(int argc __unused, char *argv[] __unused) { @@ -54,5 +61,6 @@ main(int argc __unused, char *argv[] __u test_pagesizes(); test_pagesize(); test_osreldate(); + test_ncpus(); return (0); } From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 20:38:02 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 D17951065676; Wed, 27 Jun 2012 20:38:02 +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 77CA08FC1A; Wed, 27 Jun 2012 20:38:02 +0000 (UTC) Received: from server.mypc.hu (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id 9F51A14E7ADA; Wed, 27 Jun 2012 22:38:01 +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 S2QguTl-kANI; Wed, 27 Jun 2012 22:38:01 +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 1EECF14E7AD6; Wed, 27 Jun 2012 22:38:01 +0200 (CEST) Message-ID: <4FEB6F27.4060906@FreeBSD.org> Date: Wed, 27 Jun 2012 22:37:59 +0200 From: Gabor Kovesdan User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120604 Thunderbird/14.0a2 MIME-Version: 1.0 To: Eitan Adler References: <201206270550.q5R5oFnE084849@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237628 - head/usr.bin/sort X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 27 Jun 2012 20:38:02 -0000 On 2012.06.27. 8:48, Eitan Adler wrote: >> >Log: >> > - Disable threaded sort by default > Curious, why? > We just want to test it a bit more before we enable it. Gabor From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 21:35: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 C93CB1065670; Wed, 27 Jun 2012 21:35:45 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B44058FC08; Wed, 27 Jun 2012 21:35: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 q5RLZjZg034078; Wed, 27 Jun 2012 21:35:45 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5RLZjn2034076; Wed, 27 Jun 2012 21:35:45 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201206272135.q5RLZjn2034076@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 27 Jun 2012 21:35: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: r237666 - head/secure/usr.bin/openssl/man X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2012 21:35:45 -0000 Author: jkim Date: Wed Jun 27 21:35:45 2012 New Revision: 237666 URL: http://svn.freebsd.org/changeset/base/237666 Log: Regen ca(1) for r237658. This re-applies r227458, i.e., add a missing "be". Modified: head/secure/usr.bin/openssl/man/ca.1 Modified: head/secure/usr.bin/openssl/man/ca.1 ============================================================================== --- head/secure/usr.bin/openssl/man/ca.1 Wed Jun 27 21:18:47 2012 (r237665) +++ head/secure/usr.bin/openssl/man/ca.1 Wed Jun 27 21:35:45 2012 (r237666) @@ -205,7 +205,7 @@ section for information on the required .IP "\fB\-infiles\fR" 4 .IX Item "-infiles" if present this should be the last option, all subsequent arguments -are assumed to the names of files containing certificate requests. +are assumed to be the names of files containing certificate requests. .IP "\fB\-out filename\fR" 4 .IX Item "-out filename" the output file to output certificates to. The default is standard From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 22:17: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 C95D210657A7; Wed, 27 Jun 2012 22:17:53 +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 6F4078FC08; Wed, 27 Jun 2012 22:17: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 q5RMHr9P036183; Wed, 27 Jun 2012 22:17:53 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5RMHrHT036181; Wed, 27 Jun 2012 22:17:53 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201206272217.q5RMHrHT036181@svn.freebsd.org> From: Marius Strobl Date: Wed, 27 Jun 2012 22:17: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: r237673 - head/sys/dev/pci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2012 22:17:54 -0000 Author: marius Date: Wed Jun 27 22:17:52 2012 New Revision: 237673 URL: http://svn.freebsd.org/changeset/base/237673 Log: For subtractively decoding bridges, don't try to grow windows but pass the request up the tree in order to be on the safe side. Growing windows in this case would mean to switch resources to positive decoding and it's unclear how to correctly handle this. At least with ALi/ULi M5249 PCI-PCI bridges, this also just doesn't work out of the box. Reviewed by: jhb MFC after: 3 days Modified: head/sys/dev/pci/pci_pci.c Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Wed Jun 27 22:13:40 2012 (r237672) +++ head/sys/dev/pci/pci_pci.c Wed Jun 27 22:17:52 2012 (r237673) @@ -1038,7 +1038,7 @@ pcib_alloc_resource(device_t dev, device case SYS_RES_IOPORT: r = pcib_suballoc_resource(sc, &sc->io, child, type, rid, start, end, count, flags); - if (r != NULL) + if (r != NULL || (sc->flags & PCIB_SUBTRACTIVE) != 0) break; if (pcib_grow_window(sc, &sc->io, type, start, end, count, flags) == 0) @@ -1062,7 +1062,7 @@ pcib_alloc_resource(device_t dev, device } r = pcib_suballoc_resource(sc, &sc->mem, child, type, rid, start, end, count, flags); - if (r != NULL) + if (r != NULL || (sc->flags & PCIB_SUBTRACTIVE) != 0) break; if (flags & RF_PREFETCHABLE) { if (pcib_grow_window(sc, &sc->pmem, type, start, end, From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 23:26:33 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 5FBCD106566C; Wed, 27 Jun 2012 23:26:33 +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 4AEC98FC08; Wed, 27 Jun 2012 23:26: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 q5RNQXPs039012; Wed, 27 Jun 2012 23:26:33 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5RNQX96039010; Wed, 27 Jun 2012 23:26:33 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201206272326.q5RNQX96039010@svn.freebsd.org> From: Andrew Thompson Date: Wed, 27 Jun 2012 23:26: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: r237674 - head/usr.bin/sockstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 27 Jun 2012 23:26:33 -0000 Author: thompsa Date: Wed Jun 27 23:26:32 2012 New Revision: 237674 URL: http://svn.freebsd.org/changeset/base/237674 Log: Update the usage with the new jail option. Spotted by: Jason Hellenthal MFC after: 3 days Modified: head/usr.bin/sockstat/sockstat.c Modified: head/usr.bin/sockstat/sockstat.c ============================================================================== --- head/usr.bin/sockstat/sockstat.c Wed Jun 27 22:17:52 2012 (r237673) +++ head/usr.bin/sockstat/sockstat.c Wed Jun 27 23:26:32 2012 (r237674) @@ -733,7 +733,7 @@ static void usage(void) { fprintf(stderr, - "Usage: sockstat [-46cLlu] [-p ports] [-P protocols]\n"); + "Usage: sockstat [-46cLlu] [-j jid] [-p ports] [-P protocols]\n"); exit(1); } From owner-svn-src-head@FreeBSD.ORG Wed Jun 27 23:58: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 E998E1065670; Wed, 27 Jun 2012 23:58:52 +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 D56138FC16; Wed, 27 Jun 2012 23:58: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 q5RNwqgg040371; Wed, 27 Jun 2012 23:58:52 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5RNwqhn040369; Wed, 27 Jun 2012 23:58:52 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201206272358.q5RNwqhn040369@svn.freebsd.org> From: Glen Barber Date: Wed, 27 Jun 2012 23:58: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: r237675 - 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, 27 Jun 2012 23:58:53 -0000 Author: gjb (doc,ports committer) Date: Wed Jun 27 23:58:52 2012 New Revision: 237675 URL: http://svn.freebsd.org/changeset/base/237675 Log: Add my entry to committers-ports.dot. Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Wed Jun 27 23:26:32 2012 (r237674) +++ head/share/misc/committers-ports.dot Wed Jun 27 23:58:52 2012 (r237675) @@ -93,6 +93,7 @@ gabor [label="Gabor Kovesdan\ngabor@Free gahr [label="Pietro Cerutti\ngahr@FreeBSD.org\n2008/02/20"] garga [label="Renato Botelho\ngarga@FreeBSD.org\n2005/07/11"] gerald [label="Gerald Pfeifer\ngerald@FreeBSD.org\n2002/04/03"] +gjb [label="Glen Barber\ngjb@FreeBSD.org\n2012/06/19"] glarkin [label="Greg Larkin\nglarkin@FreeBSD.org\n2008/07/17"] glewis [label="Greg Lewis\nglewis@FreeBSD.org\n2002/04/08"] hq [label="Herve Quiroz\nhq@FreeBSD.org\n2004/08/05"] @@ -245,6 +246,7 @@ clement -> lawrance clsung -> lwhsu clsung -> tabthorpe +crees -> gjb crees -> jgh crees -> madpilot @@ -260,6 +262,7 @@ delphij -> rafan demon -> mat eadler -> ak +eadler -> gjb eadler -> tj edwin -> cperciva From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 00:03: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 2334A106564A; Thu, 28 Jun 2012 00:03:38 +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 0EA6C8FC08; Thu, 28 Jun 2012 00:03: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 q5S03b4r040623; Thu, 28 Jun 2012 00:03:37 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5S03bDY040620; Thu, 28 Jun 2012 00:03:37 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201206280003.q5S03bDY040620@svn.freebsd.org> From: Glen Barber Date: Thu, 28 Jun 2012 00: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: r237676 - 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: Thu, 28 Jun 2012 00:03:38 -0000 Author: gjb (doc,ports committer) Date: Thu Jun 28 00:03:37 2012 New Revision: 237676 URL: http://svn.freebsd.org/changeset/base/237676 Log: Update organization.dot to reflect current doceng@. While here, sort line by last name. Modified: head/share/misc/organization.dot Modified: head/share/misc/organization.dot ============================================================================== --- head/share/misc/organization.dot Wed Jun 27 23:58:52 2012 (r237675) +++ head/share/misc/organization.dot Thu Jun 28 00:03:37 2012 (r237676) @@ -28,7 +28,7 @@ _misc [label="Miscellaneous Hats"] core [label="Core Team\ncore@FreeBSD.org\nwilko, brooks, keramida, imp,\ngnn, wes, hrs, murray,\nrwatson"] coresecretary [label="Core Team Secretary\ncore-secretary@FreeBSD.org\njoel"] doccommitters [label="Doc/www Committers\ndoc-committers@FreeBSD.org"] -doceng [label="Documentation Engineering Team\ndoceng@FreeBSD.org\nnik, blackend, hrs,\nkeramida"] +doceng [label="Documentation Engineering Team\ndoceng@FreeBSD.org\ngjb, blackend,\ngabor,\nhrs"] portscommitters [label="Ports Committers\nports-committers@FreeBSD.org"] portmgr [label="Port Management Team\nportmgr@FreeBSD.org\nmarcus, kris, erwin,\nlinimon, pav, krion"] portmgrsecretary [label="Port Management Team Secretary\nportmgr-secretary@FreeBSD.org\nerwin"] From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 00:17: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 C5C77106566B; Thu, 28 Jun 2012 00:17:45 +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 B0CBB8FC15; Thu, 28 Jun 2012 00:17: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 q5S0HjKU041324; Thu, 28 Jun 2012 00:17:45 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5S0HjmW041322; Thu, 28 Jun 2012 00:17:45 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201206280017.q5S0HjmW041322@svn.freebsd.org> From: Glen Barber Date: Thu, 28 Jun 2012 00:17: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: r237677 - 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: Thu, 28 Jun 2012 00:17:45 -0000 Author: gjb (doc,ports committer) Date: Thu Jun 28 00:17:45 2012 New Revision: 237677 URL: http://svn.freebsd.org/changeset/base/237677 Log: Remove a '\n' that crept in accidentally. Modified: head/share/misc/organization.dot Modified: head/share/misc/organization.dot ============================================================================== --- head/share/misc/organization.dot Thu Jun 28 00:03:37 2012 (r237676) +++ head/share/misc/organization.dot Thu Jun 28 00:17:45 2012 (r237677) @@ -28,7 +28,7 @@ _misc [label="Miscellaneous Hats"] core [label="Core Team\ncore@FreeBSD.org\nwilko, brooks, keramida, imp,\ngnn, wes, hrs, murray,\nrwatson"] coresecretary [label="Core Team Secretary\ncore-secretary@FreeBSD.org\njoel"] doccommitters [label="Doc/www Committers\ndoc-committers@FreeBSD.org"] -doceng [label="Documentation Engineering Team\ndoceng@FreeBSD.org\ngjb, blackend,\ngabor,\nhrs"] +doceng [label="Documentation Engineering Team\ndoceng@FreeBSD.org\ngjb, blackend,\ngabor, hrs"] portscommitters [label="Ports Committers\nports-committers@FreeBSD.org"] portmgr [label="Port Management Team\nportmgr@FreeBSD.org\nmarcus, kris, erwin,\nlinimon, pav, krion"] portmgrsecretary [label="Port Management Team Secretary\nportmgr-secretary@FreeBSD.org\nerwin"] From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 01:52:15 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 6CBC2106564A; Thu, 28 Jun 2012 01:52:15 +0000 (UTC) (envelope-from listlog2011@gmail.com) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 554788FC0A; Thu, 28 Jun 2012 01:52:15 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q5S1qDoo024638; Thu, 28 Jun 2012 01:52:13 GMT (envelope-from listlog2011@gmail.com) Message-ID: <4FEBB8C9.8070006@gmail.com> Date: Thu, 28 Jun 2012 09:52:09 +0800 From: David Xu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Konstantin Belousov References: <201206272032.q5RKWjvt031174@svn.freebsd.org> In-Reply-To: <201206272032.q5RKWjvt031174@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r237660 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: davidxu@FreeBSD.org List-Id: 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, 28 Jun 2012 01:52:15 -0000 On 2012/6/28 4:32, Konstantin Belousov wrote: > Author: kib > Date: Wed Jun 27 20:32:45 2012 > New Revision: 237660 > URL: http://svn.freebsd.org/changeset/base/237660 > > Log: > Optimize the handling of SC_NPROCESSORS_CONF, by using auxv AT_NCPU > value if present. > > MFC after: 1 week > > Modified: > head/lib/libc/gen/sysconf.c > > Modified: head/lib/libc/gen/sysconf.c > ============================================================================== > --- head/lib/libc/gen/sysconf.c Wed Jun 27 20:24:25 2012 (r237659) > +++ head/lib/libc/gen/sysconf.c Wed Jun 27 20:32:45 2012 (r237660) > @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#include > #include > #include > #include > @@ -51,6 +52,7 @@ __FBSDID("$FreeBSD$"); > > #include "../stdlib/atexit.h" > #include "tzfile.h" /* from ../../../contrib/tzcode/stdtime */ > +#include "libc_private.h" > > #define _PATH_ZONEINFO TZDIR /* from tzfile.h */ > > @@ -585,6 +587,8 @@ yesno: > > case _SC_NPROCESSORS_CONF: > case _SC_NPROCESSORS_ONLN: > + if (_elf_aux_info(AT_NCPUS,&value, sizeof(value)) == 0) > + return ((long)value); > mib[0] = CTL_HW; > mib[1] = HW_NCPU; > break; > Will this make controlling the number of CPU online or CPU hotplug be impossible on FreeBSD ? Regards, David Xu From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 02:21: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 30BB3106566B; Thu, 28 Jun 2012 02:21:47 +0000 (UTC) (envelope-from asmrookie@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 7516A8FC16; Thu, 28 Jun 2012 02:21:46 +0000 (UTC) Received: by vbmv11 with SMTP id v11so1439372vbm.13 for ; Wed, 27 Jun 2012 19:21:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=FH3CysvK5j3+PgKdeGNPwpb67nRbGLfuGVUZ4D0yvlg=; b=ppmDC8wOZDPmDeOZzuemi0muKnqDubP9NqIPYa2zeSLmy+PE5tif5FlT/5CGubbQmH ek11ABE43pExTCiLoYp5DgooAdkIQm9OjqpuFzIbIZjhNchnEWArCtS3T8AsoHADuQau /5V0yhUpd1QCAhcIES1e5EFpw90MFziJX2Tomlqc6iLfVWhvhLuhHq9DvG1BDoHY5ygb GutAmu7KBZLkfMBCitw+Y5FvHO8RGXSqSTad4rUp4RLbWfK+f3DkvzIKVUaGQAKE9JdQ nCXPQuxbZ2IXccfXYhsnm4hud5Lv01JUNrNbSSv2WHSMJBUH5vQeVXrobIs7mjs7wQh1 aU/g== MIME-Version: 1.0 Received: by 10.52.97.230 with SMTP id ed6mr63724vdb.65.1340850105663; Wed, 27 Jun 2012 19:21:45 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.220.36.193 with HTTP; Wed, 27 Jun 2012 19:21:45 -0700 (PDT) In-Reply-To: <4FEBB8C9.8070006@gmail.com> References: <201206272032.q5RKWjvt031174@svn.freebsd.org> <4FEBB8C9.8070006@gmail.com> Date: Thu, 28 Jun 2012 03:21:45 +0100 X-Google-Sender-Auth: BES44ClnC_Vv_GOBUWTDEpcruK8 Message-ID: From: Attilio Rao To: davidxu@freebsd.org Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Konstantin Belousov Subject: Re: svn commit: r237660 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2012 02:21:47 -0000 2012/6/28, David Xu : > On 2012/6/28 4:32, Konstantin Belousov wrote: >> Author: kib >> Date: Wed Jun 27 20:32:45 2012 >> New Revision: 237660 >> URL: http://svn.freebsd.org/changeset/base/237660 >> >> Log: >> Optimize the handling of SC_NPROCESSORS_CONF, by using auxv AT_NCPU >> value if present. >> >> MFC after: 1 week >> >> Modified: >> head/lib/libc/gen/sysconf.c >> >> Modified: head/lib/libc/gen/sysconf.c >> ============================================================================== >> --- head/lib/libc/gen/sysconf.c Wed Jun 27 20:24:25 2012 (r237659) >> +++ head/lib/libc/gen/sysconf.c Wed Jun 27 20:32:45 2012 (r237660) >> @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); >> #include >> #include >> >> +#include >> #include >> #include >> #include >> @@ -51,6 +52,7 @@ __FBSDID("$FreeBSD$"); >> >> #include "../stdlib/atexit.h" >> #include "tzfile.h" /* from ../../../contrib/tzcode/stdtime */ >> +#include "libc_private.h" >> >> #define _PATH_ZONEINFO TZDIR /* from tzfile.h */ >> >> @@ -585,6 +587,8 @@ yesno: >> >> case _SC_NPROCESSORS_CONF: >> case _SC_NPROCESSORS_ONLN: >> + if (_elf_aux_info(AT_NCPUS,&value, sizeof(value)) == 0) >> + return ((long)value); >> mib[0] = CTL_HW; >> mib[1] = HW_NCPU; >> break; >> > Will this make controlling the number of CPU online or CPU hotplug > be impossible on FreeBSD ? If I think about hotplug CPUs I can think of other 1000 problems/races/bad situations to be fixed before this one, really. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 02:25: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 0C1BF106564A; Thu, 28 Jun 2012 02:25:45 +0000 (UTC) (envelope-from listlog2011@gmail.com) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id CD3148FC08; Thu, 28 Jun 2012 02:25:44 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q5S2PgwK052028; Thu, 28 Jun 2012 02:25:43 GMT (envelope-from listlog2011@gmail.com) Message-ID: <4FEBC0A2.3010708@gmail.com> Date: Thu, 28 Jun 2012 10:25:38 +0800 From: David Xu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Attilio Rao References: <201206272032.q5RKWjvt031174@svn.freebsd.org> <4FEBB8C9.8070006@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Konstantin Belousov , davidxu@freebsd.org Subject: Re: svn commit: r237660 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: davidxu@freebsd.org List-Id: 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, 28 Jun 2012 02:25:45 -0000 On 2012/6/28 10:21, Attilio Rao wrote: > 2012/6/28, David Xu: >> On 2012/6/28 4:32, Konstantin Belousov wrote: >>> Author: kib >>> Date: Wed Jun 27 20:32:45 2012 >>> New Revision: 237660 >>> URL: http://svn.freebsd.org/changeset/base/237660 >>> >>> Log: >>> Optimize the handling of SC_NPROCESSORS_CONF, by using auxv AT_NCPU >>> value if present. >>> >>> MFC after: 1 week >>> >>> Modified: >>> head/lib/libc/gen/sysconf.c >>> >>> Modified: head/lib/libc/gen/sysconf.c >>> ============================================================================== >>> --- head/lib/libc/gen/sysconf.c Wed Jun 27 20:24:25 2012 (r237659) >>> +++ head/lib/libc/gen/sysconf.c Wed Jun 27 20:32:45 2012 (r237660) >>> @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); >>> #include >>> #include >>> >>> +#include >>> #include >>> #include >>> #include >>> @@ -51,6 +52,7 @@ __FBSDID("$FreeBSD$"); >>> >>> #include "../stdlib/atexit.h" >>> #include "tzfile.h" /* from ../../../contrib/tzcode/stdtime */ >>> +#include "libc_private.h" >>> >>> #define _PATH_ZONEINFO TZDIR /* from tzfile.h */ >>> >>> @@ -585,6 +587,8 @@ yesno: >>> >>> case _SC_NPROCESSORS_CONF: >>> case _SC_NPROCESSORS_ONLN: >>> + if (_elf_aux_info(AT_NCPUS,&value, sizeof(value)) == 0) >>> + return ((long)value); >>> mib[0] = CTL_HW; >>> mib[1] = HW_NCPU; >>> break; >>> >> Will this make controlling the number of CPU online or CPU hotplug >> be impossible on FreeBSD ? > If I think about hotplug CPUs I can think of other 1000 > problems/races/bad situations to be fixed before this one, really. These are problems only in kernel, but kib's change is about ABI between userland and kernel, I hope we don't introduce an ABI which is not extendable road stone. > Attilio > > From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 02:32: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 2A6A31065670; Thu, 28 Jun 2012 02:32:47 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 75A468FC08; Thu, 28 Jun 2012 02:32:46 +0000 (UTC) Received: by vcbfy7 with SMTP id fy7so1450021vcb.13 for ; Wed, 27 Jun 2012 19:32:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=rVwVhHEuCvaT5pqKv9ZtYxKM8t/BsqREtK6z7tzRd0w=; b=DF5XD3/Is5bT0zK69C39ACnvNeIn0T4J3eq6Gl7XTnhj/ExeDxs+Mhc2w6Oi7bP2Yy YDzYSo+cj0rHPne2gDmcpFO5E897Pz1GA//N9mtUUMQ9z+FksHPSWoFkepBoDxUHRkB5 iREauh2hc/Fot7iRfAjR2UUozsXNuE6EE5mmKs/z2qwFQjAs3EXN91xBXNtcQpP1u8in ZdzewtPidDKgbbnyn2PgugcUXqDGQET2iL8bmLHkG9eVKJ+3RznQ6i4MhmSCJHPMVF8u JNElAmiF0dFOtYLGClMatu09dkx+r2+xqTARrRms1sz1bAKt+oEPurv6A4P5df3RVn4c AvNQ== MIME-Version: 1.0 Received: by 10.221.1.5 with SMTP id no5mr56635vcb.67.1340850760715; Wed, 27 Jun 2012 19:32:40 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.220.36.193 with HTTP; Wed, 27 Jun 2012 19:32:40 -0700 (PDT) In-Reply-To: <4FEBC0A2.3010708@gmail.com> References: <201206272032.q5RKWjvt031174@svn.freebsd.org> <4FEBB8C9.8070006@gmail.com> <4FEBC0A2.3010708@gmail.com> Date: Thu, 28 Jun 2012 03:32:40 +0100 X-Google-Sender-Auth: EKdAwr1O-DCetCMK2FInZsEnk78 Message-ID: From: Attilio Rao To: davidxu@freebsd.org Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Konstantin Belousov Subject: Re: svn commit: r237660 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2012 02:32:47 -0000 2012/6/28, David Xu : > On 2012/6/28 10:21, Attilio Rao wrote: >> 2012/6/28, David Xu: >>> On 2012/6/28 4:32, Konstantin Belousov wrote: >>>> Author: kib >>>> Date: Wed Jun 27 20:32:45 2012 >>>> New Revision: 237660 >>>> URL: http://svn.freebsd.org/changeset/base/237660 >>>> >>>> Log: >>>> Optimize the handling of SC_NPROCESSORS_CONF, by using auxv AT_NCPU >>>> value if present. >>>> >>>> MFC after: 1 week >>>> >>>> Modified: >>>> head/lib/libc/gen/sysconf.c >>>> >>>> Modified: head/lib/libc/gen/sysconf.c >>>> ============================================================================== >>>> --- head/lib/libc/gen/sysconf.c Wed Jun 27 20:24:25 2012 (r237659) >>>> +++ head/lib/libc/gen/sysconf.c Wed Jun 27 20:32:45 2012 (r237660) >>>> @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); >>>> #include >>>> #include >>>> >>>> +#include >>>> #include >>>> #include >>>> #include >>>> @@ -51,6 +52,7 @@ __FBSDID("$FreeBSD$"); >>>> >>>> #include "../stdlib/atexit.h" >>>> #include "tzfile.h" /* from ../../../contrib/tzcode/stdtime */ >>>> +#include "libc_private.h" >>>> >>>> #define _PATH_ZONEINFO TZDIR /* from tzfile.h */ >>>> >>>> @@ -585,6 +587,8 @@ yesno: >>>> >>>> case _SC_NPROCESSORS_CONF: >>>> case _SC_NPROCESSORS_ONLN: >>>> + if (_elf_aux_info(AT_NCPUS,&value, sizeof(value)) == 0) >>>> + return ((long)value); >>>> mib[0] = CTL_HW; >>>> mib[1] = HW_NCPU; >>>> break; >>>> >>> Will this make controlling the number of CPU online or CPU hotplug >>> be impossible on FreeBSD ? >> If I think about hotplug CPUs I can think of other 1000 >> problems/races/bad situations to be fixed before this one, really. > These are problems only in kernel, but kib's change is about ABI > between userland and kernel, I hope we don't introduce an ABI which > is not extendable road stone. I'm not entirely sure I see the ABI breakage here. If the AT_NCPUS becames unconvenient and not correct at some point we can just fix sysconf() to not look into the aux vector anymoe. Please note that AT_NCPUS is already exported nowadays. I think this is instead a clever optimization to avoid the sysctl() (usual way to retrieve the number of CPUs). Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 02:53: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 6B322106566C; Thu, 28 Jun 2012 02:53:09 +0000 (UTC) (envelope-from listlog2011@gmail.com) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4BBA18FC0C; Thu, 28 Jun 2012 02:53:09 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q5S2r6pc080072; Thu, 28 Jun 2012 02:53:07 GMT (envelope-from listlog2011@gmail.com) Message-ID: <4FEBC70F.40408@gmail.com> Date: Thu, 28 Jun 2012 10:53:03 +0800 From: David Xu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Attilio Rao References: <201206272032.q5RKWjvt031174@svn.freebsd.org> <4FEBB8C9.8070006@gmail.com> <4FEBC0A2.3010708@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Konstantin Belousov , davidxu@freebsd.org Subject: Re: svn commit: r237660 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: davidxu@freebsd.org List-Id: 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, 28 Jun 2012 02:53:09 -0000 On 2012/6/28 10:32, Attilio Rao wrote: > 2012/6/28, David Xu: >> On 2012/6/28 10:21, Attilio Rao wrote: >>> 2012/6/28, David Xu: >>>> On 2012/6/28 4:32, Konstantin Belousov wrote: >>>>> Author: kib >>>>> Date: Wed Jun 27 20:32:45 2012 >>>>> New Revision: 237660 >>>>> URL: http://svn.freebsd.org/changeset/base/237660 >>>>> >>>>> Log: >>>>> Optimize the handling of SC_NPROCESSORS_CONF, by using auxv AT_NCPU >>>>> value if present. >>>>> >>>>> MFC after: 1 week >>>>> >>>>> Modified: >>>>> head/lib/libc/gen/sysconf.c >>>>> >>>>> Modified: head/lib/libc/gen/sysconf.c >>>>> ============================================================================== >>>>> --- head/lib/libc/gen/sysconf.c Wed Jun 27 20:24:25 2012 (r237659) >>>>> +++ head/lib/libc/gen/sysconf.c Wed Jun 27 20:32:45 2012 (r237660) >>>>> @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); >>>>> #include >>>>> #include >>>>> >>>>> +#include >>>>> #include >>>>> #include >>>>> #include >>>>> @@ -51,6 +52,7 @@ __FBSDID("$FreeBSD$"); >>>>> >>>>> #include "../stdlib/atexit.h" >>>>> #include "tzfile.h" /* from ../../../contrib/tzcode/stdtime */ >>>>> +#include "libc_private.h" >>>>> >>>>> #define _PATH_ZONEINFO TZDIR /* from tzfile.h */ >>>>> >>>>> @@ -585,6 +587,8 @@ yesno: >>>>> >>>>> case _SC_NPROCESSORS_CONF: >>>>> case _SC_NPROCESSORS_ONLN: >>>>> + if (_elf_aux_info(AT_NCPUS,&value, sizeof(value)) == 0) >>>>> + return ((long)value); >>>>> mib[0] = CTL_HW; >>>>> mib[1] = HW_NCPU; >>>>> break; >>>>> >>>> Will this make controlling the number of CPU online or CPU hotplug >>>> be impossible on FreeBSD ? >>> If I think about hotplug CPUs I can think of other 1000 >>> problems/races/bad situations to be fixed before this one, really. >> These are problems only in kernel, but kib's change is about ABI >> between userland and kernel, I hope we don't introduce an ABI which >> is not extendable road stone. > I'm not entirely sure I see the ABI breakage here. It is not breakage, it is the ABI thinks number of online cpu is fixed, obviously, it is not the case in future unless FreeBSD won't support dynamic number of online cpus. > If the AT_NCPUS > becames unconvenient and not correct at some point we can just fix > sysconf() to not look into the aux vector anymoe. If you already know this will be a problem, why do you introduce it and later need to fix it ? > Please note that > AT_NCPUS is already exported nowadays. I think this is instead a > clever optimization to avoid the sysctl() (usual way to retrieve the > number of CPUs). But why don't you cache it in libc ? following code is enough: static int online_cpu; if (online_cpu == 0) online_cpu = sysctl return online_cpu; > Attilio > > From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 03:27: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 7AAB7106566B; Thu, 28 Jun 2012 03:27:36 +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 4AB148FC12; Thu, 28 Jun 2012 03:27: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 q5S3RalM049337; Thu, 28 Jun 2012 03:27:36 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5S3Rael049335; Thu, 28 Jun 2012 03:27:36 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201206280327.q5S3Rael049335@svn.freebsd.org> From: Glen Barber Date: Thu, 28 Jun 2012 03:27: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: r237680 - 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: Thu, 28 Jun 2012 03:27:36 -0000 Author: gjb (doc,ports committer) Date: Thu Jun 28 03:27:35 2012 New Revision: 237680 URL: http://svn.freebsd.org/changeset/base/237680 Log: Update entries in organization.dot for the following groups: coresecretary, portmgr, portmgrsecretary, secteam Sort entries by last name. Note: core is left as-is intentionally for now. Submitted by: bcr, rpaulo Modified: head/share/misc/organization.dot Modified: head/share/misc/organization.dot ============================================================================== --- head/share/misc/organization.dot Thu Jun 28 01:04:59 2012 (r237679) +++ head/share/misc/organization.dot Thu Jun 28 03:27:35 2012 (r237680) @@ -26,12 +26,12 @@ _misc [label="Miscellaneous Hats"] # Development teams go here alphabetically sorted core [label="Core Team\ncore@FreeBSD.org\nwilko, brooks, keramida, imp,\ngnn, wes, hrs, murray,\nrwatson"] -coresecretary [label="Core Team Secretary\ncore-secretary@FreeBSD.org\njoel"] +coresecretary [label="Core Team Secretary\ncore-secretary@FreeBSD.org\ngavin"] doccommitters [label="Doc/www Committers\ndoc-committers@FreeBSD.org"] doceng [label="Documentation Engineering Team\ndoceng@FreeBSD.org\ngjb, blackend,\ngabor, hrs"] portscommitters [label="Ports Committers\nports-committers@FreeBSD.org"] -portmgr [label="Port Management Team\nportmgr@FreeBSD.org\nmarcus, kris, erwin,\nlinimon, pav, krion"] -portmgrsecretary [label="Port Management Team Secretary\nportmgr-secretary@FreeBSD.org\nerwin"] +portmgr [label="Port Management Team\nportmgr@FreeBSD.org\ntabthorpe, marcus, bapt, beat,\nerwin, linimon, pav,\nitetcu, flz, miwi"] +portmgrsecretary [label="Port Management Team Secretary\nportmgr-secretary@FreeBSD.org\ntabthorpe"] re [label="Primary Release Engineering Team\nre@FreeBSD.org\nmux, bmah, hrs, kensmith,\nmurray, rwatson, dwhite"] realpha [label="FreeBSD/alpha Release Engineering Team\nre-alpha@FreeBSD.org\nwilko, murray, rwatson"] reamd64 [label="FreeBSD/amd64 Release Engineering Team\nre-amd64@FreeBSD.org\nobrien"] @@ -40,7 +40,7 @@ reia64 [label="FreeBSD/ia64 Release Engi repc98 [label="FreeBSD/pc98 Release Engineering Team\nre-pc98@FreeBSD.org\nnyan"] reppc [label="FreeBSD/ppc Release Engineering Team\nre-ppc@FreeBSD.org\ngrehan"] resparc64 [label="FreeBSD/sparc64 Release Engineering Team\nre-sparc64@FreeBSD.org\njake, phk, tmm, obrien,\nkensmith, murray, rwatson"] -secteam [label="Security Team\nsecteam@FreeBSD.org\nmnag, remko, gnn, simon, philip,\ncperciva, csjp, des,\nnectar, rwatson"] +secteam [label="Security Team\nsecteam@FreeBSD.org\nsimon, qingli, delphij,\nremko, philip, stas, cperciva,\ncsjp, rwatson, miwi, bz"] secteamsecretary [label="Security Team Secretary\nsecteam-secretary@FreeBSD.org\nremko"] securityofficer [label="Security Officer Team\nsecurity-officer@FreeBSD.org\ncperciva, simon, nectar"] srccommitters [label="Src Committers\nsrc-committers@FreeBSD.org"] From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 03:30: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 C9387106566C; Thu, 28 Jun 2012 03:30:17 +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 B3F428FC12; Thu, 28 Jun 2012 03:30: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 q5S3UHIV049485; Thu, 28 Jun 2012 03:30:17 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5S3UH8m049482; Thu, 28 Jun 2012 03:30:17 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201206280330.q5S3UH8m049482@svn.freebsd.org> From: Rui Paulo Date: Thu, 28 Jun 2012 03:30: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: r237681 - head/share/examples/pf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 28 Jun 2012 03:30:17 -0000 Author: rpaulo Date: Thu Jun 28 03:30:17 2012 New Revision: 237681 URL: http://svn.freebsd.org/changeset/base/237681 Log: Add the 'inet' keyword after the nat rule to avoid interfering with IPv6. Modified: head/share/examples/pf/faq-example1 head/share/examples/pf/pf.conf Modified: head/share/examples/pf/faq-example1 ============================================================================== --- head/share/examples/pf/faq-example1 Thu Jun 28 03:27:35 2012 (r237680) +++ head/share/examples/pf/faq-example1 Thu Jun 28 03:30:17 2012 (r237681) @@ -26,7 +26,7 @@ set skip on lo scrub in # nat/rdr -nat on $ext_if from !($ext_if) -> ($ext_if:0) +nat on $ext_if inet from !($ext_if) -> ($ext_if:0) nat-anchor "ftp-proxy/*" rdr-anchor "ftp-proxy/*" Modified: head/share/examples/pf/pf.conf ============================================================================== --- head/share/examples/pf/pf.conf Thu Jun 28 03:27:35 2012 (r237680) +++ head/share/examples/pf/pf.conf Thu Jun 28 03:30:17 2012 (r237681) @@ -16,7 +16,7 @@ #nat-anchor "ftp-proxy/*" #rdr-anchor "ftp-proxy/*" -#nat on $ext_if from !($ext_if) -> ($ext_if:0) +#nat on $ext_if inet from !($ext_if) -> ($ext_if:0) #rdr pass on $int_if proto tcp to port ftp -> 127.0.0.1 port 8021 #no rdr on $ext_if proto tcp from to any port smtp #rdr pass on $ext_if proto tcp from any to any port smtp \ From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 03:36: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 1AB4A1065670; Thu, 28 Jun 2012 03:36:14 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 050C58FC0C; Thu, 28 Jun 2012 03:36: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 q5S3aDrC049771; Thu, 28 Jun 2012 03:36:13 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5S3aD9b049769; Thu, 28 Jun 2012 03:36:13 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201206280336.q5S3aD9b049769@svn.freebsd.org> From: "Kenneth D. Merry" Date: Thu, 28 Jun 2012 03:36:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237682 - head/sys/cam X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 28 Jun 2012 03:36:14 -0000 Author: ken Date: Thu Jun 28 03:36:13 2012 New Revision: 237682 URL: http://svn.freebsd.org/changeset/base/237682 Log: Fix a typo in a panic() call. PR: kern/169497 Submitted by: Steven Hartland MFC after: 3 days Modified: head/sys/cam/cam_periph.c Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Thu Jun 28 03:30:17 2012 (r237681) +++ head/sys/cam/cam_periph.c Thu Jun 28 03:36:13 2012 (r237682) @@ -273,7 +273,7 @@ failure: /* No cleanup to perform. */ break; default: - panic("cam_periph_alloc: Unkown init level"); + panic("%s: Unknown init level", __func__); } return(status); } From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 03:48: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 677EF106566B; Thu, 28 Jun 2012 03:48:55 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F9B78FC12; Thu, 28 Jun 2012 03:48: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 q5S3mtTG050316; Thu, 28 Jun 2012 03:48:55 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5S3ms6C050301; Thu, 28 Jun 2012 03:48:54 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201206280348.q5S3ms6C050301@svn.freebsd.org> From: "Kenneth D. Merry" Date: Thu, 28 Jun 2012 03:48: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: r237683 - in head/sys/dev/mps: . mpi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 28 Jun 2012 03:48:55 -0000 Author: ken Date: Thu Jun 28 03:48:54 2012 New Revision: 237683 URL: http://svn.freebsd.org/changeset/base/237683 Log: Bring in LSI's latest mps(4) 6Gb SAS and WarpDrive driver, version 14.00.00.01-fbsd. Their description of the changes is as follows: 1. Copyright contents has been changed in all respective .c and .h files 2. Support for WRITE12 and READ12 for direct-io (warpdrive only) has been added. 3. Driver has added checks to see if Drive has READ_CAP_16 support before sending it down to the device. If SPC3_SID_PROTECT flag is set in the inquiry data, the device supports protection information, and must support the 16 byte read capacity command, otherwise continue without sending read cap 16. This will optimize driver performance, since it will not send READ_CAP_16 to the drive which does not have support of READ_CAP_16. 4. With new approach, "MPTIOCTL_RESET_ADAPTER" IOCTL will not use DELAY() which is busy loop implementation. It will use (Better way to sleep without busy loop). Also from the HBA reset code path and some other places, DELAY() is replaced with msleep() or "pause()", which is based on sleep/wakeup style calls. Driver use msleep()/pause() instead of DELAY based on CAN_SLEEP/NO_SLEEP flags to avoid busy loop which is not required all the time.e.a a. While driver is getting loaded, driver calls most of the commands with NO_SLEEP. b. When Driver is functional and it needs Reinit of HBA, CAN_SLEEP flag is used. 5. driver is not Endian safe. It will not work on Big Endian machines like Sparc and PowerPC platforms because it assumes it is running on a Little Endian machine. Driver code is modified such way that it does not assume CPU arch is Little Endian. a. All places where Driver interacts from HBA to Host, it converts Little Endian format to CPU format. b. All places where Driver interacts from Host to HBA, it converts CPU format to Little Endian. 6. Findout memory leaks in FreeBSD Driver and resolve those, such as memory leak in targ's luns creation/deletion. Also added additional checks to see memory allocation success/fail. 7. Add loginfo prints as debug message, i.e. When FW sends any loginfo, Driver should print those as debug message. This will help for debugging purpose. 8. There is possibility to get config request timeout. Current driver is able to detect config request timetout, but it does not do anything on config_request timeout. Driver should call mps_reinit() if any request_poll (which is called as part of config_request) is time out. 9. cdb length check is required for 32 byte CDB. Add correct mpi control value for 32 bit CDB as below while submitting SCSI IO Request to controller. mpi_control |= 4 << MPI2_SCSIIO_CONTROL_ADDCDBLEN_SHIFT; 10. Check the actual status of Message unit reset (mps_message_unit_reset).Previously FreeBSD Driver just writes MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET and never check the ack (it just wait for 50 millisecond). So, Driver now check the status of "MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET" after writing it to the FW. Now it also checking for whether doorbell ack uses msleep with proper sleep flags, instead of . 11. Previously CAM does not detect Multi-Lun Devices. In order to detect Multi-Lun Devices by CAM the driver needs following change set: a. There is "max_lun" field which Driver need to set based on hw/fw support. Currently LSI released driver does not set this field. b. Default of "max_lun" should not be 0 in OS, but it is currently set to 0 in CAM layer. c. Export max_lun capacity to 255 12. Driver will not reset target info after port enable complete and also do Device removal when Device remove from FW. The detail description is as follows a. When Driver receive WD PD add events, it will add all information in driver local data structure. b. Only for WD, we have below checks after port enable completes, where driver clear off all information retrieved at #1. if ((sc->WD_available && (sc->WD_hide_expose == MPS_WD_HIDE_ALWAYS)) || (sc->WD_valid_config && (sc->WD_hide_expose == MPS_WD_HIDE_IF_VOLUME)) { // clear off target data structure. } It is mainly not to attach PDs to OS. FreeBSD does bus rescan as older Parallel scsi style. So Driver needs to handle which Drive is visible to OS. That is a reason we have to clear off targ information for PDs. Again, above logic was implemented long time ago. Similar concept we have for non-wd also. For that, LSI have introduced different logic to hide PDs. Eventually, because of above gap, when Phy goes offline, we observe below failure. That is what Driver is not doing complete removal of device with FW. (which was pointed by Scott) Apr 5 02:39:24 Freebsd7 kernel: mpslsi0: mpssas_prepare_remove Apr 5 02:39:24 Freebsd7 kernel: mpssas_prepare_remove 497 : invalid handle 0xe Now Driver will not reset target info after port enable complete and also will do Device removal when Device remove from FW. 13. Returning "CAM_SEL_TIMEOUT" instead of "CAM_TID_INVALID" error code on request to the Target IDs that have no devices conected at that moment. As if "CAM_TID_INVALID" error code is returned to the CAM Layaer then it results in a huge chain of errors in verbose kernel messages on boot and every hot-plug event. Submitted by: Sreekanth Reddy MFC after: 3 days Modified: head/sys/dev/mps/mpi/mpi2.h head/sys/dev/mps/mpi/mpi2_cnfg.h head/sys/dev/mps/mpi/mpi2_hbd.h head/sys/dev/mps/mpi/mpi2_history.txt head/sys/dev/mps/mpi/mpi2_init.h head/sys/dev/mps/mpi/mpi2_ioc.h head/sys/dev/mps/mpi/mpi2_ra.h head/sys/dev/mps/mpi/mpi2_raid.h head/sys/dev/mps/mpi/mpi2_sas.h head/sys/dev/mps/mpi/mpi2_targ.h head/sys/dev/mps/mpi/mpi2_tool.h head/sys/dev/mps/mpi/mpi2_type.h head/sys/dev/mps/mps.c head/sys/dev/mps/mps_config.c head/sys/dev/mps/mps_ioctl.h head/sys/dev/mps/mps_mapping.c head/sys/dev/mps/mps_mapping.h head/sys/dev/mps/mps_sas.c head/sys/dev/mps/mps_sas.h head/sys/dev/mps/mps_sas_lsi.c head/sys/dev/mps/mps_user.c head/sys/dev/mps/mpsvar.h Modified: head/sys/dev/mps/mpi/mpi2.h ============================================================================== --- head/sys/dev/mps/mpi/mpi2.h Thu Jun 28 03:36:13 2012 (r237682) +++ head/sys/dev/mps/mpi/mpi2.h Thu Jun 28 03:48:54 2012 (r237683) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2.h Modified: head/sys/dev/mps/mpi/mpi2_cnfg.h ============================================================================== --- head/sys/dev/mps/mpi/mpi2_cnfg.h Thu Jun 28 03:36:13 2012 (r237682) +++ head/sys/dev/mps/mpi/mpi2_cnfg.h Thu Jun 28 03:48:54 2012 (r237683) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_cnfg.h Modified: head/sys/dev/mps/mpi/mpi2_hbd.h ============================================================================== --- head/sys/dev/mps/mpi/mpi2_hbd.h Thu Jun 28 03:36:13 2012 (r237682) +++ head/sys/dev/mps/mpi/mpi2_hbd.h Thu Jun 28 03:48:54 2012 (r237683) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2009-2011 LSI Corporation. + * Copyright (c) 2009-2012 LSI Corporation. * * * Name: mpi2_hbd.h Modified: head/sys/dev/mps/mpi/mpi2_history.txt ============================================================================== --- head/sys/dev/mps/mpi/mpi2_history.txt Thu Jun 28 03:36:13 2012 (r237682) +++ head/sys/dev/mps/mpi/mpi2_history.txt Thu Jun 28 03:48:54 2012 (r237683) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,7 +32,7 @@ Fusion-MPT MPI 2.0 Header File Change History ============================== - Copyright (c) 2000-2011 LSI Corporation. + Copyright (c) 2000-2012 LSI Corporation. --------------------------------------- Header Set Release Version: 02.00.18 Modified: head/sys/dev/mps/mpi/mpi2_init.h ============================================================================== --- head/sys/dev/mps/mpi/mpi2_init.h Thu Jun 28 03:36:13 2012 (r237682) +++ head/sys/dev/mps/mpi/mpi2_init.h Thu Jun 28 03:48:54 2012 (r237683) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_init.h Modified: head/sys/dev/mps/mpi/mpi2_ioc.h ============================================================================== --- head/sys/dev/mps/mpi/mpi2_ioc.h Thu Jun 28 03:36:13 2012 (r237682) +++ head/sys/dev/mps/mpi/mpi2_ioc.h Thu Jun 28 03:48:54 2012 (r237683) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_ioc.h Modified: head/sys/dev/mps/mpi/mpi2_ra.h ============================================================================== --- head/sys/dev/mps/mpi/mpi2_ra.h Thu Jun 28 03:36:13 2012 (r237682) +++ head/sys/dev/mps/mpi/mpi2_ra.h Thu Jun 28 03:48:54 2012 (r237683) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2011 LSI Corporation. + * Copyright (c) 2012 LSI Corporation. * * * Name: mpi2_ra.h Modified: head/sys/dev/mps/mpi/mpi2_raid.h ============================================================================== --- head/sys/dev/mps/mpi/mpi2_raid.h Thu Jun 28 03:36:13 2012 (r237682) +++ head/sys/dev/mps/mpi/mpi2_raid.h Thu Jun 28 03:48:54 2012 (r237683) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_raid.h Modified: head/sys/dev/mps/mpi/mpi2_sas.h ============================================================================== --- head/sys/dev/mps/mpi/mpi2_sas.h Thu Jun 28 03:36:13 2012 (r237682) +++ head/sys/dev/mps/mpi/mpi2_sas.h Thu Jun 28 03:48:54 2012 (r237683) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_sas.h Modified: head/sys/dev/mps/mpi/mpi2_targ.h ============================================================================== --- head/sys/dev/mps/mpi/mpi2_targ.h Thu Jun 28 03:36:13 2012 (r237682) +++ head/sys/dev/mps/mpi/mpi2_targ.h Thu Jun 28 03:48:54 2012 (r237683) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_targ.h Modified: head/sys/dev/mps/mpi/mpi2_tool.h ============================================================================== --- head/sys/dev/mps/mpi/mpi2_tool.h Thu Jun 28 03:36:13 2012 (r237682) +++ head/sys/dev/mps/mpi/mpi2_tool.h Thu Jun 28 03:48:54 2012 (r237683) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_tool.h Modified: head/sys/dev/mps/mpi/mpi2_type.h ============================================================================== --- head/sys/dev/mps/mpi/mpi2_type.h Thu Jun 28 03:36:13 2012 (r237682) +++ head/sys/dev/mps/mpi/mpi2_type.h Thu Jun 28 03:48:54 2012 (r237683) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2011, 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2000-2011 LSI Corporation. + * Copyright (c) 2000-2012 LSI Corporation. * * * Name: mpi2_type.h Modified: head/sys/dev/mps/mps.c ============================================================================== --- head/sys/dev/mps/mps.c Thu Jun 28 03:36:13 2012 (r237682) +++ head/sys/dev/mps/mps.c Thu Jun 28 03:48:54 2012 (r237683) @@ -1,31 +1,6 @@ /*- * Copyright (c) 2009 Yahoo! Inc. - * 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. - * - */ -/*- - * Copyright (c) 2011 LSI Corp. + * Copyright (c) 2012 LSI Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -82,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -98,9 +74,9 @@ __FBSDID("$FreeBSD$"); #include #include -static int mps_diag_reset(struct mps_softc *sc); +static int mps_diag_reset(struct mps_softc *sc, int sleep_flag); static int mps_init_queues(struct mps_softc *sc); -static int mps_message_unit_reset(struct mps_softc *sc); +static int mps_message_unit_reset(struct mps_softc *sc, int sleep_flag); static int mps_transition_operational(struct mps_softc *sc); static void mps_startup(void *arg); static int mps_send_iocinit(struct mps_softc *sc); @@ -112,7 +88,7 @@ static void mps_config_complete(struct m static void mps_periodic(void *); static int mps_reregister_events(struct mps_softc *sc); static void mps_enqueue_request(struct mps_softc *sc, struct mps_command *cm); - +static int mps_wait_db_ack(struct mps_softc *sc, int timeout, int sleep_flag); SYSCTL_NODE(_hw, OID_AUTO, mps, CTLFLAG_RD, 0, "MPS Driver Parameters"); MALLOC_DEFINE(M_MPT2, "mps", "mpt2 driver memory"); @@ -123,8 +99,32 @@ MALLOC_DEFINE(M_MPT2, "mps", "mpt2 drive */ static char mpt2_reset_magic[] = { 0x00, 0x0f, 0x04, 0x0b, 0x02, 0x07, 0x0d }; +/* Added this union to smoothly convert le64toh cm->cm_desc.Words. + * Compiler only support unint64_t to be passed as argument. + * Otherwise it will through below error + * "aggregate value used where an integer was expected" + */ + +typedef union _reply_descriptor { + u64 word; + struct { + u32 low; + u32 high; + } u; +}reply_descriptor,address_descriptor; + +/* + * sleep_flag can be either CAN_SLEEP or NO_SLEEP. + * If this function is called from process context, it can sleep + * and there is no harm to sleep, in case if this fuction is called + * from Interrupt handler, we can not sleep and need NO_SLEEP flag set. + * based on sleep flags driver will call either msleep, pause or DELAY. + * msleep and pause are of same variant, but pause is used when mps_mtx + * is not hold by driver. + * + */ static int -mps_diag_reset(struct mps_softc *sc) +mps_diag_reset(struct mps_softc *sc,int sleep_flag) { uint32_t reg; int i, error, tries = 0; @@ -134,14 +134,25 @@ mps_diag_reset(struct mps_softc *sc) /* Clear any pending interrupts */ mps_regwrite(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET, 0x0); + /*Force NO_SLEEP for threads prohibited to sleep + * e.a Thread from interrupt handler are prohibited to sleep. + */ + if(curthread->td_pflags & TDP_NOSLEEPING) + sleep_flag = NO_SLEEP; + /* Push the magic sequence */ error = ETIMEDOUT; while (tries++ < 20) { for (i = 0; i < sizeof(mpt2_reset_magic); i++) mps_regwrite(sc, MPI2_WRITE_SEQUENCE_OFFSET, mpt2_reset_magic[i]); - - DELAY(100 * 1000); + /* wait 100 msec */ + if (mtx_owned(&sc->mps_mtx) && sleep_flag == CAN_SLEEP) + msleep(&sc->msleep_fake_chan, &sc->mps_mtx, 0, "mpsdiag", hz/10); + else if (sleep_flag == CAN_SLEEP) + pause("mpsdiag", hz/10); + else + DELAY(100 * 1000); reg = mps_regread(sc, MPI2_HOST_DIAGNOSTIC_OFFSET); if (reg & MPI2_DIAG_DIAG_WRITE_ENABLE) { @@ -159,7 +170,13 @@ mps_diag_reset(struct mps_softc *sc) /* Wait up to 300 seconds in 50ms intervals */ error = ETIMEDOUT; for (i = 0; i < 60000; i++) { - DELAY(50000); + /* wait 50 msec */ + if (mtx_owned(&sc->mps_mtx) && sleep_flag == CAN_SLEEP) + msleep(&sc->msleep_fake_chan, &sc->mps_mtx, 0, "mpsdiag", hz/20); + else if (sleep_flag == CAN_SLEEP) + pause("mpsdiag", hz/20); + else + DELAY(50 * 1000); reg = mps_regread(sc, MPI2_DOORBELL_OFFSET); if ((reg & MPI2_IOC_STATE_MASK) != MPI2_IOC_STATE_RESET) { error = 0; @@ -175,7 +192,7 @@ mps_diag_reset(struct mps_softc *sc) } static int -mps_message_unit_reset(struct mps_softc *sc) +mps_message_unit_reset(struct mps_softc *sc, int sleep_flag) { mps_dprint(sc, MPS_TRACE, "%s\n", __func__); @@ -183,7 +200,12 @@ mps_message_unit_reset(struct mps_softc mps_regwrite(sc, MPI2_DOORBELL_OFFSET, MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET << MPI2_DOORBELL_FUNCTION_SHIFT); - DELAY(50000); + + if (mps_wait_db_ack(sc, 5, sleep_flag) != 0) { + mps_dprint(sc, MPS_FAULT, "Doorbell handshake failed : <%s>\n", + __func__); + return (ETIMEDOUT); + } return (0); } @@ -193,9 +215,12 @@ mps_transition_ready(struct mps_softc *s { uint32_t reg, state; int error, tries = 0; + int sleep_flags; mps_dprint(sc, MPS_TRACE, "%s\n", __func__); - + /* If we are in attach call, do not sleep */ + sleep_flags = (sc->mps_flags & MPS_FLAGS_ATTACH_DONE) + ? CAN_SLEEP:NO_SLEEP; error = 0; while (tries++ < 5) { reg = mps_regread(sc, MPI2_DOORBELL_OFFSET); @@ -206,7 +231,7 @@ mps_transition_ready(struct mps_softc *s * resetting it. */ if (reg & MPI2_DOORBELL_USED) { - mps_diag_reset(sc); + mps_diag_reset(sc, sleep_flags); DELAY(50000); continue; } @@ -227,10 +252,10 @@ mps_transition_ready(struct mps_softc *s } else if (state == MPI2_IOC_STATE_FAULT) { mps_dprint(sc, MPS_INFO, "IOC in fault state 0x%x\n", state & MPI2_DOORBELL_FAULT_CODE_MASK); - mps_diag_reset(sc); + mps_diag_reset(sc, sleep_flags); } else if (state == MPI2_IOC_STATE_OPERATIONAL) { /* Need to take ownership */ - mps_message_unit_reset(sc); + mps_message_unit_reset(sc, sleep_flags); } else if (state == MPI2_IOC_STATE_RESET) { /* Wait a bit, IOC might be in transition */ mps_dprint(sc, MPS_FAULT, @@ -310,7 +335,7 @@ mps_reinit(struct mps_softc *sc) mps_printf(sc, "%s mask interrupts\n", __func__); mps_mask_intr(sc); - error = mps_diag_reset(sc); + error = mps_diag_reset(sc, CAN_SLEEP); if (error != 0) { panic("%s hard reset failed with error %d\n", __func__, error); @@ -368,19 +393,56 @@ mps_reinit(struct mps_softc *sc) return 0; } -/* Wait for the chip to ACK a word that we've put into its FIFO */ +/* Wait for the chip to ACK a word that we've put into its FIFO + * Wait for seconds. In single loop wait for busy loop + * for 500 microseconds. + * Total is [ 0.5 * (2000 * ) ] in miliseconds. + * */ static int -mps_wait_db_ack(struct mps_softc *sc) +mps_wait_db_ack(struct mps_softc *sc, int timeout, int sleep_flag) { - int retry; - for (retry = 0; retry < MPS_DB_MAX_WAIT; retry++) { - if ((mps_regread(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET) & - MPI2_HIS_SYS2IOC_DB_STATUS) == 0) - return (0); - DELAY(2000); - } + u32 cntdn, count; + u32 int_status; + u32 doorbell; + + count = 0; + cntdn = (sleep_flag == CAN_SLEEP) ? 1000*timeout : 2000*timeout; + do { + int_status = mps_regread(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET); + if (!(int_status & MPI2_HIS_SYS2IOC_DB_STATUS)) { + mps_dprint(sc, MPS_INFO, + "%s: successfull count(%d), timeout(%d)\n", + __func__, count, timeout); + return 0; + } else if (int_status & MPI2_HIS_IOC2SYS_DB_STATUS) { + doorbell = mps_regread(sc, MPI2_DOORBELL_OFFSET); + if ((doorbell & MPI2_IOC_STATE_MASK) == + MPI2_IOC_STATE_FAULT) { + mps_dprint(sc, MPS_FAULT, + "fault_state(0x%04x)!\n", doorbell); + return (EFAULT); + } + } else if (int_status == 0xFFFFFFFF) + goto out; + + /* If it can sleep, sleep for 1 milisecond, else busy loop for + * 0.5 milisecond */ + if (mtx_owned(&sc->mps_mtx) && sleep_flag == CAN_SLEEP) + msleep(&sc->msleep_fake_chan, &sc->mps_mtx, 0, + "mpsdba", hz/1000); + else if (sleep_flag == CAN_SLEEP) + pause("mpsdba", hz/1000); + else + DELAY(500); + count++; + } while (--cntdn); + + out: + mps_dprint(sc, MPS_FAULT, "%s: failed due to timeout count(%d), " + "int_status(%x)!\n", __func__, count, int_status); return (ETIMEDOUT); + } /* Wait for the chip to signal that the next word in its FIFO can be fetched */ @@ -406,6 +468,10 @@ mps_request_sync(struct mps_softc *sc, v uint32_t *data32; uint16_t *data16; int i, count, ioc_sz, residual; + int sleep_flags = CAN_SLEEP; + + if(curthread->td_pflags & TDP_NOSLEEPING) + sleep_flags = NO_SLEEP; /* Step 1 */ mps_regwrite(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET, 0x0); @@ -430,7 +496,7 @@ mps_request_sync(struct mps_softc *sc, v return (ENXIO); } mps_regwrite(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET, 0x0); - if (mps_wait_db_ack(sc) != 0) { + if (mps_wait_db_ack(sc, 5, sleep_flags) != 0) { mps_dprint(sc, MPS_FAULT, "Doorbell handshake failed\n"); return (ENXIO); } @@ -439,8 +505,8 @@ mps_request_sync(struct mps_softc *sc, v /* Clock out the message data synchronously in 32-bit dwords*/ data32 = (uint32_t *)req; for (i = 0; i < count; i++) { - mps_regwrite(sc, MPI2_DOORBELL_OFFSET, data32[i]); - if (mps_wait_db_ack(sc) != 0) { + mps_regwrite(sc, MPI2_DOORBELL_OFFSET, htole32(data32[i])); + if (mps_wait_db_ack(sc, 5, sleep_flags) != 0) { mps_dprint(sc, MPS_FAULT, "Timeout while writing doorbell\n"); return (ENXIO); @@ -525,7 +591,7 @@ mps_request_sync(struct mps_softc *sc, v static void mps_enqueue_request(struct mps_softc *sc, struct mps_command *cm) { - + reply_descriptor rd; mps_dprint(sc, MPS_TRACE, "%s SMID %u cm %p ccb %p\n", __func__, cm->cm_desc.Default.SMID, cm, cm->cm_ccb); @@ -534,11 +600,14 @@ mps_enqueue_request(struct mps_softc *sc if (++sc->io_cmds_active > sc->io_cmds_highwater) sc->io_cmds_highwater++; - + rd.u.low = cm->cm_desc.Words.Low; + rd.u.high = cm->cm_desc.Words.High; + rd.word = htole64(rd.word); + /* TODO-We may need to make below regwrite atomic */ mps_regwrite(sc, MPI2_REQUEST_DESCRIPTOR_POST_LOW_OFFSET, - cm->cm_desc.Words.Low); + rd.u.low); mps_regwrite(sc, MPI2_REQUEST_DESCRIPTOR_POST_HIGH_OFFSET, - cm->cm_desc.Words.High); + rd.u.high); } /* @@ -622,21 +691,21 @@ mps_send_iocinit(struct mps_softc *sc) */ init.Function = MPI2_FUNCTION_IOC_INIT; init.WhoInit = MPI2_WHOINIT_HOST_DRIVER; - init.MsgVersion = MPI2_VERSION; - init.HeaderVersion = MPI2_HEADER_VERSION; - init.SystemRequestFrameSize = sc->facts->IOCRequestFrameSize; - init.ReplyDescriptorPostQueueDepth = sc->pqdepth; - init.ReplyFreeQueueDepth = sc->fqdepth; + init.MsgVersion = htole16(MPI2_VERSION); + init.HeaderVersion = htole16(MPI2_HEADER_VERSION); + init.SystemRequestFrameSize = htole16(sc->facts->IOCRequestFrameSize); + init.ReplyDescriptorPostQueueDepth = htole16(sc->pqdepth); + init.ReplyFreeQueueDepth = htole16(sc->fqdepth); init.SenseBufferAddressHigh = 0; init.SystemReplyAddressHigh = 0; init.SystemRequestFrameBaseAddress.High = 0; - init.SystemRequestFrameBaseAddress.Low = (uint32_t)sc->req_busaddr; + init.SystemRequestFrameBaseAddress.Low = htole32((uint32_t)sc->req_busaddr); init.ReplyDescriptorPostQueueAddress.High = 0; - init.ReplyDescriptorPostQueueAddress.Low = (uint32_t)sc->post_busaddr; + init.ReplyDescriptorPostQueueAddress.Low = htole32((uint32_t)sc->post_busaddr); init.ReplyFreeQueueAddress.High = 0; - init.ReplyFreeQueueAddress.Low = (uint32_t)sc->free_busaddr; + init.ReplyFreeQueueAddress.Low = htole32((uint32_t)sc->free_busaddr); init.TimeStamp.High = 0; - init.TimeStamp.Low = (uint32_t)time_uptime; + init.TimeStamp.Low = htole32((uint32_t)time_uptime); error = mps_request_sync(sc, &init, &reply, req_sz, reply_sz, 5); if ((reply.IOCStatus & MPI2_IOCSTATUS_MASK) != MPI2_IOCSTATUS_SUCCESS) @@ -830,6 +899,12 @@ mps_alloc_requests(struct mps_softc *sc) sc->chains = malloc(sizeof(struct mps_chain) * sc->max_chains, M_MPT2, M_WAITOK | M_ZERO); + if(!sc->chains) { + device_printf(sc->mps_dev, + "Cannot allocate chains memory %s %d\n", + __func__, __LINE__); + return (ENOMEM); + } for (i = 0; i < sc->max_chains; i++) { chain = &sc->chains[i]; chain->chain = (MPI2_SGE_IO_UNION *)(sc->chain_frames + @@ -864,6 +939,11 @@ mps_alloc_requests(struct mps_softc *sc) */ sc->commands = malloc(sizeof(struct mps_command) * sc->num_reqs, M_MPT2, M_WAITOK | M_ZERO); + if(!sc->commands) { + device_printf(sc->mps_dev, "Cannot allocate memory %s %d\n", + __func__, __LINE__); + return (ENOMEM); + } for (i = 1; i < sc->num_reqs; i++) { cm = &sc->commands[i]; cm->cm_req = sc->req_frames + @@ -1056,6 +1136,11 @@ mps_attach(struct mps_softc *sc) sc->facts = malloc(sizeof(MPI2_IOC_FACTS_REPLY), M_MPT2, M_ZERO|M_NOWAIT); + if(!sc->facts) { + device_printf(sc->mps_dev, "Cannot allocate memory %s %d\n", + __func__, __LINE__); + return (ENOMEM); + } if ((error = mps_get_iocfacts(sc, sc->facts)) != 0) return (error); @@ -1083,7 +1168,7 @@ mps_attach(struct mps_softc *sc) */ if ((sc->facts->IOCCapabilities & MPI2_IOCFACTS_CAPABILITY_EVENT_REPLAY) == 0) { - mps_diag_reset(sc); + mps_diag_reset(sc, NO_SLEEP); if ((error = mps_transition_ready(sc)) != 0) return (error); } @@ -1163,6 +1248,11 @@ mps_attach(struct mps_softc *sc) sc->pfacts = malloc(sizeof(MPI2_PORT_FACTS_REPLY) * sc->facts->NumberOfPorts, M_MPT2, M_ZERO|M_WAITOK); + if(!sc->pfacts) { + device_printf(sc->mps_dev, "Cannot allocate memory %s %d\n", + __func__, __LINE__); + return (ENOMEM); + } for (i = 0; i < sc->facts->NumberOfPorts; i++) { if ((error = mps_get_portfacts(sc, &sc->pfacts[i], i)) != 0) { mps_printf(sc, "%s failed to get portfacts for port %d\n", @@ -1293,7 +1383,7 @@ mps_log_evt_handler(struct mps_softc *sc static int mps_attach_log(struct mps_softc *sc) { - uint8_t events[16]; + u32 events[MPI2_EVENT_NOTIFY_EVENTMASK_WORDS]; bzero(events, 16); setbit(events, MPI2_EVENT_LOG_DATA); @@ -1441,6 +1531,64 @@ mps_complete_command(struct mps_command } } + +static void +mps_sas_log_info(struct mps_softc *sc , u32 log_info) +{ + union loginfo_type { + u32 loginfo; + struct { + u32 subcode:16; + u32 code:8; + u32 originator:4; + u32 bus_type:4; + } dw; + }; + union loginfo_type sas_loginfo; + char *originator_str = NULL; + + sas_loginfo.loginfo = log_info; + if (sas_loginfo.dw.bus_type != 3 /*SAS*/) + return; + + /* each nexus loss loginfo */ + if (log_info == 0x31170000) + return; + + /* eat the loginfos associated with task aborts */ + if ((log_info == 30050000 || log_info == + 0x31140000 || log_info == 0x31130000)) + return; + + switch (sas_loginfo.dw.originator) { + case 0: + originator_str = "IOP"; + break; + case 1: + originator_str = "PL"; + break; + case 2: + originator_str = "IR"; + break; +} + + mps_dprint(sc, MPS_INFO, "log_info(0x%08x): originator(%s), " + "code(0x%02x), sub_code(0x%04x)\n", log_info, + originator_str, sas_loginfo.dw.code, + sas_loginfo.dw.subcode); +} + +static void +mps_display_reply_info(struct mps_softc *sc, uint8_t *reply) +{ + MPI2DefaultReply_t *mpi_reply; + u16 sc_status; + + mpi_reply = (MPI2DefaultReply_t*)reply; + sc_status = le16toh(mpi_reply->IOCStatus); + if (sc_status & MPI2_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE) + mps_sas_log_info(sc, le32toh(mpi_reply->IOCLogInfo)); +} void mps_intr(void *data) { @@ -1508,7 +1656,7 @@ mps_intr_locked(void *data) flags = desc->Default.ReplyFlags & MPI2_RPY_DESCRIPT_FLAGS_TYPE_MASK; if ((flags == MPI2_RPY_DESCRIPT_FLAGS_UNUSED) - || (desc->Words.High == 0xffffffff)) + || (le32toh(desc->Words.High) == 0xffffffff)) break; /* increment the replypostindex now, so that event handlers @@ -1523,7 +1671,7 @@ mps_intr_locked(void *data) switch (flags) { case MPI2_RPY_DESCRIPT_FLAGS_SCSI_IO_SUCCESS: - cm = &sc->commands[desc->SCSIIOSuccess.SMID]; + cm = &sc->commands[le16toh(desc->SCSIIOSuccess.SMID)]; cm->cm_reply = NULL; break; case MPI2_RPY_DESCRIPT_FLAGS_ADDRESS_REPLY: @@ -1559,9 +1707,10 @@ mps_intr_locked(void *data) sc->reply_frames, sc->fqdepth, sc->facts->ReplyFrameSize * 4); printf("%s: baddr %#x,\n", __func__, baddr); + /* LSI-TODO. See Linux Code. Need Gracefull exit*/ panic("Reply address out of range"); } - if (desc->AddressReply.SMID == 0) { + if (le16toh(desc->AddressReply.SMID) == 0) { if (((MPI2_DEFAULT_REPLY *)reply)->Function == MPI2_FUNCTION_DIAG_BUFFER_POST) { /* @@ -1573,7 +1722,7 @@ mps_intr_locked(void *data) */ rel_rep = (MPI2_DIAG_RELEASE_REPLY *)reply; - if (rel_rep->IOCStatus == + if (le16toh(rel_rep->IOCStatus) == MPI2_IOCSTATUS_DIAGNOSTIC_RELEASED) { pBuffer = @@ -1589,10 +1738,10 @@ mps_intr_locked(void *data) (MPI2_EVENT_NOTIFICATION_REPLY *) reply); } else { - cm = &sc->commands[desc->AddressReply.SMID]; + cm = &sc->commands[le16toh(desc->AddressReply.SMID)]; cm->cm_reply = reply; cm->cm_reply_data = - desc->AddressReply.ReplyFrameAddress; + le32toh(desc->AddressReply.ReplyFrameAddress); } break; } @@ -1606,9 +1755,14 @@ mps_intr_locked(void *data) cm = NULL; break; } + - if (cm != NULL) + if (cm != NULL) { + // Print Error reply frame + if (cm->cm_reply) + mps_display_reply_info(sc,cm->cm_reply); mps_complete_command(cm); + } desc->Words.Low = 0xffffffff; desc->Words.High = 0xffffffff; @@ -1631,7 +1785,7 @@ mps_dispatch_event(struct mps_softc *sc, struct mps_event_handle *eh; int event, handled = 0; - event = reply->Event; + event = le16toh(reply->Event); TAILQ_FOREACH(eh, &sc->event_list, eh_list) { if (isset(eh->mask, event)) { eh->callback(sc, data, reply); @@ -1640,7 +1794,7 @@ mps_dispatch_event(struct mps_softc *sc, } if (handled == 0) - device_printf(sc->mps_dev, "Unhandled event 0x%x\n", event); + device_printf(sc->mps_dev, "Unhandled event 0x%x\n", le16toh(event)); /* * This is the only place that the event/reply should be freed. @@ -1671,13 +1825,18 @@ mps_reregister_events_complete(struct mp * suitable for the controller. */ int -mps_register_events(struct mps_softc *sc, uint8_t *mask, +mps_register_events(struct mps_softc *sc, u32 *mask, mps_evt_callback_t *cb, void *data, struct mps_event_handle **handle) { struct mps_event_handle *eh; int error = 0; eh = malloc(sizeof(struct mps_event_handle), M_MPT2, M_WAITOK|M_ZERO); + if(!eh) { + device_printf(sc->mps_dev, "Cannot allocate memory %s %d\n", + __func__, __LINE__); + return (ENOMEM); + } eh->callback = cb; eh->data = data; TAILQ_INSERT_TAIL(&sc->event_list, eh, eh_list); @@ -1690,24 +1849,25 @@ mps_register_events(struct mps_softc *sc int mps_update_events(struct mps_softc *sc, struct mps_event_handle *handle, - uint8_t *mask) + u32 *mask) { MPI2_EVENT_NOTIFICATION_REQUEST *evtreq; MPI2_EVENT_NOTIFICATION_REPLY *reply; struct mps_command *cm; - struct mps_event_handle *eh; int error, i; mps_dprint(sc, MPS_TRACE, "%s\n", __func__); if ((mask != NULL) && (handle != NULL)) - bcopy(mask, &handle->mask[0], 16); - memset(sc->event_mask, 0xff, 16); + bcopy(mask, &handle->mask[0], sizeof(u32) * + MPI2_EVENT_NOTIFY_EVENTMASK_WORDS); + + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) + sc->event_mask[i] = -1; + + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) + sc->event_mask[i] &= ~handle->mask[i]; - TAILQ_FOREACH(eh, &sc->event_list, eh_list) { - for (i = 0; i < 16; i++) - sc->event_mask[i] &= ~eh->mask[i]; - } if ((cm = mps_alloc_command(sc)) == NULL) return (EBUSY); @@ -1719,10 +1879,13 @@ mps_update_events(struct mps_softc *sc, { u_char fullmask[16]; memset(fullmask, 0x00, 16); - bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, 16); + bcopy(fullmask, &evtreq->EventMasks[0], sizeof(u32) * + MPI2_EVENT_NOTIFY_EVENTMASK_WORDS); } #else - bcopy(sc->event_mask, (uint8_t *)&evtreq->EventMasks, 16); + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) + evtreq->EventMasks[i] = + htole32(sc->event_mask[i]); #endif cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; cm->cm_data = NULL; @@ -1751,10 +1914,11 @@ mps_reregister_events(struct mps_softc * /* first, reregister events */ - memset(sc->event_mask, 0xff, 16); + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) + sc->event_mask[i] = -1; TAILQ_FOREACH(eh, &sc->event_list, eh_list) { - for (i = 0; i < 16; i++) + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) sc->event_mask[i] &= ~eh->mask[i]; } @@ -1768,10 +1932,13 @@ mps_reregister_events(struct mps_softc * { u_char fullmask[16]; memset(fullmask, 0x00, 16); - bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, 16); + bcopy(fullmask, &evtreq->EventMasks[0], sizeof(u32) * + MPI2_EVENT_NOTIFY_EVENTMASK_WORDS); } #else - bcopy(sc->event_mask, (uint8_t *)&evtreq->EventMasks, 16); + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) + evtreq->EventMasks[i] = + htole32(sc->event_mask[i]); #endif cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; cm->cm_data = NULL; @@ -1783,13 +1950,12 @@ mps_reregister_events(struct mps_softc * return (error); } -int +void mps_deregister_events(struct mps_softc *sc, struct mps_event_handle *handle) { TAILQ_REMOVE(&sc->event_list, handle, eh_list); free(handle, M_MPT2); - return (mps_update_events(sc, NULL, NULL)); } /* @@ -1819,10 +1985,16 @@ mps_add_chain(struct mps_command *cm) TAILQ_INSERT_TAIL(&cm->cm_chain_list, chain, chain_link); sgc = (MPI2_SGE_CHAIN32 *)&cm->cm_sge->MpiChain; - sgc->Length = space; + sgc->Length = htole16(space); sgc->NextChainOffset = 0; + /* TODO Looks like bug in Setting sgc->Flags. + * sgc->Flags = ( MPI2_SGE_FLAGS_CHAIN_ELEMENT | MPI2_SGE_FLAGS_64_BIT_ADDRESSING | + * MPI2_SGE_FLAGS_SYSTEM_ADDRESS) << MPI2_SGE_FLAGS_SHIFT + * This is fine.. because we are not using simple element. In case of + * MPI2_SGE_CHAIN32, we have seperate Length and Flags feild. + */ sgc->Flags = MPI2_SGE_FLAGS_CHAIN_ELEMENT; - sgc->Address = chain->chain_busaddr; + sgc->Address = htole32(chain->chain_busaddr); cm->cm_sge = (MPI2_SGE_IO_UNION *)&chain->chain->MpiSimple; cm->cm_sglsize = space; @@ -1842,6 +2014,7 @@ mps_push_sge(struct mps_command *cm, voi MPI2_SGE_SIMPLE64 *sge = sgep; int error, type; uint32_t saved_buf_len, saved_address_low, saved_address_high; + u32 sge_flags; type = (tc->Flags & MPI2_SGE_FLAGS_ELEMENT_MASK); @@ -1910,6 +2083,11 @@ mps_push_sge(struct mps_command *cm, voi * understanding the code. */ cm->cm_sglsize -= len; + /* Endian Safe code */ + sge_flags = sge->FlagsLength; + sge->FlagsLength = htole32(sge_flags); + sge->Address.High = htole32(sge->Address.High); + sge->Address.Low = htole32(sge->Address.Low); bcopy(sgep, cm->cm_sge, len); cm->cm_sge = (MPI2_SGE_IO_UNION *)((uintptr_t)cm->cm_sge + len); return (mps_add_chain(cm)); @@ -1960,6 +2138,11 @@ mps_push_sge(struct mps_command *cm, voi MPI2_SGE_FLAGS_64_BIT_ADDRESSING) << MPI2_SGE_FLAGS_SHIFT); cm->cm_sglsize -= len; + /* Endian Safe code */ + sge_flags = sge->FlagsLength; + sge->FlagsLength = htole32(sge_flags); + sge->Address.High = htole32(sge->Address.High); + sge->Address.Low = htole32(sge->Address.Low); bcopy(sgep, cm->cm_sge, len); cm->cm_sge = (MPI2_SGE_IO_UNION *)((uintptr_t)cm->cm_sge + len); @@ -1985,6 +2168,11 @@ mps_push_sge(struct mps_command *cm, voi } cm->cm_sglsize -= len; + /* Endian Safe code */ + sge_flags = sge->FlagsLength; + sge->FlagsLength = htole32(sge_flags); + sge->Address.High = htole32(sge->Address.High); + sge->Address.Low = htole32(sge->Address.Low); bcopy(sgep, cm->cm_sge, len); cm->cm_sge = (MPI2_SGE_IO_UNION *)((uintptr_t)cm->cm_sge + len); return (0); @@ -2004,6 +2192,7 @@ mps_add_dmaseg(struct mps_command *cm, v */ flags |= MPI2_SGE_FLAGS_SIMPLE_ELEMENT | MPI2_SGE_FLAGS_64_BIT_ADDRESSING; + /* Set Endian safe macro in mps_push_sge */ sge.FlagsLength = len | (flags << MPI2_SGE_FLAGS_SHIFT); mps_from_u64(pa, &sge.Address); @@ -2114,11 +2303,11 @@ mps_map_command(struct mps_softc *sc, st /* Add a zero-length element as needed */ if (cm->cm_sge != NULL) { sge = (MPI2_SGE_SIMPLE32 *)cm->cm_sge; - sge->FlagsLength = (MPI2_SGE_FLAGS_LAST_ELEMENT | + sge->FlagsLength = htole32((MPI2_SGE_FLAGS_LAST_ELEMENT | MPI2_SGE_FLAGS_END_OF_BUFFER | MPI2_SGE_FLAGS_END_OF_LIST | MPI2_SGE_FLAGS_SIMPLE_ELEMENT) << - MPI2_SGE_FLAGS_SHIFT; + MPI2_SGE_FLAGS_SHIFT); sge->Address = 0; } mps_enqueue_request(sc, cm); @@ -2135,9 +2324,12 @@ mps_map_command(struct mps_softc *sc, st int *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 05:42: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 1F2041065670; Thu, 28 Jun 2012 05:42:05 +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 E48B58FC12; Thu, 28 Jun 2012 05:42: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 q5S5g4HA054954; Thu, 28 Jun 2012 05:42:04 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5S5g4Bw054952; Thu, 28 Jun 2012 05:42:04 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201206280542.q5S5g4Bw054952@svn.freebsd.org> From: Alan Cox Date: Thu, 28 Jun 2012 05:42: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: r237684 - head/sys/amd64/amd64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 28 Jun 2012 05:42:05 -0000 Author: alc Date: Thu Jun 28 05:42:04 2012 New Revision: 237684 URL: http://svn.freebsd.org/changeset/base/237684 Log: Optimize pmap_pv_demote_pde(). Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Thu Jun 28 03:48:54 2012 (r237683) +++ head/sys/amd64/amd64/pmap.c Thu Jun 28 05:42:04 2012 (r237684) @@ -2469,11 +2469,14 @@ pmap_pv_demote_pde(pmap_t pmap, vm_offse struct rwlock **lockp) { struct md_page *pvh; + struct pv_chunk *pc; pv_entry_t pv; vm_offset_t va_last; vm_page_t m; + int bit, field; rw_assert(&pvh_global_lock, RA_LOCKED); + PMAP_LOCK_ASSERT(pmap, MA_OWNED); KASSERT((pa & PDRMASK) == 0, ("pmap_pv_demote_pde: pa is not 2mpage aligned")); reserve_pv_entries(pmap, NPTEPG - 1, lockp); @@ -2481,7 +2484,8 @@ pmap_pv_demote_pde(pmap_t pmap, vm_offse /* * Transfer the 2mpage's pv entry for this mapping to the first - * page's pv list. + * page's pv list. Once this transfer begins, the pv list lock + * must not be released until the last pv entry is reinstantiated. */ pvh = pa_to_pvh(pa); va = trunc_2mpage(va); @@ -2490,16 +2494,37 @@ pmap_pv_demote_pde(pmap_t pmap, vm_offse m = PHYS_TO_VM_PAGE(pa); TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); /* Instantiate the remaining NPTEPG - 1 pv entries. */ + PV_STAT(atomic_add_long(&pv_entry_allocs, NPTEPG - 1)); va_last = va + NBPDR - PAGE_SIZE; - do { - m++; - KASSERT((m->oflags & VPO_UNMANAGED) == 0, - ("pmap_pv_demote_pde: page %p is not managed", m)); - va += PAGE_SIZE; - pv = get_pv_entry(pmap, TRUE); - pv->pv_va = va; - TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); - } while (va < va_last); + for (;;) { + pc = TAILQ_FIRST(&pmap->pm_pvchunk); + KASSERT(pc->pc_map[0] != 0 || pc->pc_map[1] != 0 || + pc->pc_map[2] != 0, ("pmap_pv_demote_pde: missing spare")); + for (field = 0; field < _NPCM; field++) { + while (pc->pc_map[field]) { + bit = bsfq(pc->pc_map[field]); + pc->pc_map[field] &= ~(1ul << bit); + pv = &pc->pc_pventry[field * 64 + bit]; + va += PAGE_SIZE; + pv->pv_va = va; + m++; + KASSERT((m->oflags & VPO_UNMANAGED) == 0, + ("pmap_pv_demote_pde: page %p is not managed", m)); + TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); + if (va == va_last) + goto out; + } + } + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list); + } +out: + if (pc->pc_map[0] == 0 && pc->pc_map[1] == 0 && pc->pc_map[2] == 0) { + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list); + } + PV_STAT(atomic_add_long(&pv_entry_count, NPTEPG - 1)); + PV_STAT(atomic_subtract_int(&pv_entry_spare, NPTEPG - 1)); } /* From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 06:49:04 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 B916F106566C; Thu, 28 Jun 2012 06:49:04 +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 A463D8FC12; Thu, 28 Jun 2012 06:49: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 q5S6n4va057840; Thu, 28 Jun 2012 06:49:04 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5S6n4OK057838; Thu, 28 Jun 2012 06:49:04 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201206280649.q5S6n4OK057838@svn.freebsd.org> From: Warner Losh Date: Thu, 28 Jun 2012 06:49: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: r237687 - head/sys/mips/cavium X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2012 06:49:05 -0000 Author: imp Date: Thu Jun 28 06:49:04 2012 New Revision: 237687 URL: http://svn.freebsd.org/changeset/base/237687 Log: octeon_uart_class was removed some time ago everywhere but here. Modified: head/sys/mips/cavium/uart_bus_octeonusart.c Modified: head/sys/mips/cavium/uart_bus_octeonusart.c ============================================================================== --- head/sys/mips/cavium/uart_bus_octeonusart.c Thu Jun 28 06:13:52 2012 (r237686) +++ head/sys/mips/cavium/uart_bus_octeonusart.c Thu Jun 28 06:49:04 2012 (r237687) @@ -61,11 +61,8 @@ __FBSDID("$FreeBSD$"); extern struct uart_class uart_oct16550_class; - static int uart_octeon_probe(device_t dev); -extern struct uart_class octeon_uart_class; - static device_method_t uart_octeon_methods[] = { /* Device interface */ DEVMETHOD(device_probe, uart_octeon_probe), From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 07:01: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 6D2C8106566B; Thu, 28 Jun 2012 07:01:49 +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 3E8098FC0C; Thu, 28 Jun 2012 07:01: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 q5S71nta058438; Thu, 28 Jun 2012 07:01:49 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5S71nQk058436; Thu, 28 Jun 2012 07:01:49 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201206280701.q5S71nQk058436@svn.freebsd.org> From: Warner Losh Date: Thu, 28 Jun 2012 07:01: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: r237689 - head/sys/cam/scsi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 28 Jun 2012 07:01:49 -0000 Author: imp Date: Thu Jun 28 07:01:48 2012 New Revision: 237689 URL: http://svn.freebsd.org/changeset/base/237689 Log: Add a sysctl to set the cdrom timeout. Data recovery operations from a CD or DVD drive with a damaged disc often benefit from a shorter timeout. Also, when retries are set to 0, an application is expecting errors and recovering them so do not print the error into the log. The number of expected errors can literally be in the hundreds of thousands which significantly slows data recovery. Reviewed by: ken@ (but quite some time ago). Modified: head/sys/cam/scsi/scsi_cd.c Modified: head/sys/cam/scsi/scsi_cd.c ============================================================================== --- head/sys/cam/scsi/scsi_cd.c Thu Jun 28 06:58:12 2012 (r237688) +++ head/sys/cam/scsi/scsi_cd.c Thu Jun 28 07:01:48 2012 (r237689) @@ -293,6 +293,9 @@ PERIPHDRIVER_DECLARE(cd, cddriver); #ifndef CD_DEFAULT_RETRY #define CD_DEFAULT_RETRY 4 #endif +#ifndef CD_DEFAULT_TIMEOUT +#define CD_DEFAULT_TIMEOUT 30000 +#endif #ifndef CHANGER_MIN_BUSY_SECONDS #define CHANGER_MIN_BUSY_SECONDS 5 #endif @@ -301,6 +304,7 @@ PERIPHDRIVER_DECLARE(cd, cddriver); #endif static int cd_retry_count = CD_DEFAULT_RETRY; +static int cd_timeout = CD_DEFAULT_TIMEOUT; static int changer_min_busy_seconds = CHANGER_MIN_BUSY_SECONDS; static int changer_max_busy_seconds = CHANGER_MAX_BUSY_SECONDS; @@ -310,6 +314,9 @@ static SYSCTL_NODE(_kern_cam_cd, OID_AUT SYSCTL_INT(_kern_cam_cd, OID_AUTO, retry_count, CTLFLAG_RW, &cd_retry_count, 0, "Normal I/O retry count"); TUNABLE_INT("kern.cam.cd.retry_count", &cd_retry_count); +SYSCTL_INT(_kern_cam_cd, OID_AUTO, timeout, CTLFLAG_RW, + &cd_timeout, 0, "Timeout, in us, for read operations"); +TUNABLE_INT("kern.cam.cd.timeout", &cd_timeout); SYSCTL_INT(_kern_cam_cd_changer, OID_AUTO, min_busy_seconds, CTLFLAG_RW, &changer_min_busy_seconds, 0, "Minimum changer scheduling quantum"); TUNABLE_INT("kern.cam.cd.changer.min_busy_seconds", &changer_min_busy_seconds); @@ -1509,8 +1516,9 @@ cdstart(struct cam_periph *periph, union bp->bio_bcount / softc->params.blksize, /* data_ptr */ bp->bio_data, /* dxfer_len */ bp->bio_bcount, - /* sense_len */ SSD_FULL_SIZE, - /* timeout */ 30000); + /* sense_len */ cd_retry_count ? + SSD_FULL_SIZE : SF_NO_PRINT, + /* timeout */ cd_timeout); /* Use READ CD command for audio tracks. */ if (softc->params.blksize == 2352) { start_ccb->csio.cdb_io.cdb_bytes[0] = READ_CD; From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 07:26: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 2A4A51065673; Thu, 28 Jun 2012 07:26:45 +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 0BDB48FC08; Thu, 28 Jun 2012 07:26: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 q5S7Qi29059572; Thu, 28 Jun 2012 07:26:44 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5S7QihI059569; Thu, 28 Jun 2012 07:26:44 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201206280726.q5S7QihI059569@svn.freebsd.org> From: Warner Losh Date: Thu, 28 Jun 2012 07:26:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237692 - head/sys/dev/pccard X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 28 Jun 2012 07:26:45 -0000 Author: imp Date: Thu Jun 28 07:26:44 2012 New Revision: 237692 URL: http://svn.freebsd.org/changeset/base/237692 Log: Simplify resource activation a bit. Modified: head/sys/dev/pccard/pccard.c head/sys/dev/pccard/pccardvarp.h Modified: head/sys/dev/pccard/pccard.c ============================================================================== --- head/sys/dev/pccard/pccard.c Thu Jun 28 07:08:48 2012 (r237691) +++ head/sys/dev/pccard/pccard.c Thu Jun 28 07:26:44 2012 (r237692) @@ -473,6 +473,8 @@ pccard_function_init(struct pccard_funct struct resource_list *rl = &devi->resources; struct resource_list_entry *rle; struct resource *r = 0; + struct pccard_ce_iospace *ios; + struct pccard_ce_memspace *mems; device_t bus; u_long start, end, len; int i, rid, spaces; @@ -501,44 +503,50 @@ pccard_function_init(struct pccard_funct continue; spaces = 0; for (i = 0; i < cfe->num_iospace; i++) { - start = cfe->iospace[i].start; + ios = cfe->iospace + i; + start = ios->start; if (start) - end = start + cfe->iospace[i].length - 1; + end = start + ios->length - 1; else end = ~0UL; DEVPRINTF((bus, "I/O rid %d start %#lx end %#lx\n", i, start, end)); rid = i; - len = cfe->iospace[i].length; + len = ios->length; r = bus_alloc_resource(bus, SYS_RES_IOPORT, &rid, start, end, len, rman_make_alignment_flags(len)); - if (r == NULL) + if (r == NULL) { + DEVPRINTF((bus, "I/O rid %d failed\n", i)); goto not_this_one; + } rle = resource_list_add(rl, SYS_RES_IOPORT, - rid, rman_get_start(r), rman_get_end(r), - cfe->iospace[i].length); + rid, rman_get_start(r), rman_get_end(r), len); if (rle == NULL) panic("Cannot add resource rid %d IOPORT", rid); rle->res = r; spaces++; } for (i = 0; i < cfe->num_memspace; i++) { - start = cfe->memspace[i].hostaddr; + mems = cfe->memspace + i; + start = mems->cardaddr + mems->hostaddr; if (start) - end = start + cfe->memspace[i].length - 1; + end = start + mems->length - 1; else end = ~0UL; - DEVPRINTF((bus, "Memory rid %d start %#lx end %#lx\n", - i, start, end)); + DEVPRINTF((bus, "Memory rid %d start %#lx end %#lx\ncardaddr %#lx hostaddr %#lx length %#lx\n", + i, start, end, mems->cardaddr, mems->hostaddr, + mems->length)); rid = i; - len = cfe->memspace[i].length; + len = mems->length; r = bus_alloc_resource(bus, SYS_RES_MEMORY, &rid, start, end, len, rman_make_alignment_flags(len)); - if (r == NULL) - goto not_this_one; + if (r == NULL) { + DEVPRINTF((bus, "Memory rid %d failed\n", i)); +// goto not_this_one; + continue; + } rle = resource_list_add(rl, SYS_RES_MEMORY, - rid, rman_get_start(r), rman_get_end(r), - cfe->memspace[i].length); + rid, rman_get_start(r), rman_get_end(r), len); if (rle == NULL) panic("Cannot add resource rid %d MEM", rid); rle->res = r; @@ -552,8 +560,10 @@ pccard_function_init(struct pccard_funct rid = 0; r = bus_alloc_resource_any(bus, SYS_RES_IRQ, &rid, RF_SHAREABLE); - if (r == NULL) + if (r == NULL) { + DEVPRINTF((bus, "IRQ rid %d failed\n", rid)); goto not_this_one; + } rle = resource_list_add(rl, SYS_RES_IRQ, rid, rman_get_start(r), rman_get_end(r), 1); if (rle == NULL) Modified: head/sys/dev/pccard/pccardvarp.h ============================================================================== --- head/sys/dev/pccard/pccardvarp.h Thu Jun 28 07:08:48 2012 (r237691) +++ head/sys/dev/pccard/pccardvarp.h Thu Jun 28 07:26:44 2012 (r237692) @@ -47,29 +47,32 @@ #define PCCARD_CFE_READONLY 0x0400 #define PCCARD_CFE_AUDIO 0x0800 +struct pccard_ce_iospace { + u_long length; + u_long start; +}; + +struct pccard_ce_memspace { + u_long length; + u_long cardaddr; + u_long hostaddr; +}; + struct pccard_config_entry { int number; uint32_t flags; int iftype; int num_iospace; - /* * The card will only decode this mask in any case, so we can * do dynamic allocation with this in mind, in case the suggestions * below are no good. */ u_long iomask; - struct { - u_long length; - u_long start; - } iospace[4]; /* XXX this could be as high as 16 */ + struct pccard_ce_iospace iospace[4]; /* XXX up to 16 */ uint16_t irqmask; int num_memspace; - struct { - u_long length; - u_long cardaddr; - u_long hostaddr; - } memspace[2]; /* XXX this could be as high as 8 */ + struct pccard_ce_memspace memspace[2]; /* XXX up to 8 */ int maxtwins; STAILQ_ENTRY(pccard_config_entry) cfe_list; }; From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 07:28: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 D8F9F106566B; Thu, 28 Jun 2012 07:28:39 +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 C49CD8FC14; Thu, 28 Jun 2012 07:28:39 +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 q5S7SdYZ059680; Thu, 28 Jun 2012 07:28:39 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5S7SdG6059678; Thu, 28 Jun 2012 07:28:39 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201206280728.q5S7SdG6059678@svn.freebsd.org> From: Warner Losh Date: Thu, 28 Jun 2012 07:28: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: r237693 - head/sys/dev/sio X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 28 Jun 2012 07:28:40 -0000 Author: imp Date: Thu Jun 28 07:28:39 2012 New Revision: 237693 URL: http://svn.freebsd.org/changeset/base/237693 Log: Document some MP assumptions for sio. Submitted by: bde (years ago) Modified: head/sys/dev/sio/sio.c Modified: head/sys/dev/sio/sio.c ============================================================================== --- head/sys/dev/sio/sio.c Thu Jun 28 07:26:44 2012 (r237692) +++ head/sys/dev/sio/sio.c Thu Jun 28 07:28:39 2012 (r237693) @@ -278,6 +278,11 @@ static int sio_inited; /* table and macro for fast conversion from a unit number to its com struct */ devclass_t sio_devclass; +/* + * XXX Assmues that devclass_get_device, devclass_get_softc and + * device_get_softc are fast interrupt safe. The current implementation + * of these functions are. + */ #define com_addr(unit) ((struct com_s *) \ devclass_get_softc(sio_devclass, unit)) /* XXX */ From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 07: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 14D18106564A; Thu, 28 Jun 2012 07:33:44 +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 DA6B28FC0C; Thu, 28 Jun 2012 07:33: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 q5S7XhY8059932; Thu, 28 Jun 2012 07:33:43 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5S7XhOK059928; Thu, 28 Jun 2012 07:33:43 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201206280733.q5S7XhOK059928@svn.freebsd.org> From: Warner Losh Date: Thu, 28 Jun 2012 07:33: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: r237694 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2012 07:33:44 -0000 Author: imp Date: Thu Jun 28 07:33:43 2012 New Revision: 237694 URL: http://svn.freebsd.org/changeset/base/237694 Log: Remove an old hack I noticed years ago, but never committed. Modified: head/sys/kern/imgact_aout.c head/sys/kern/imgact_gzip.c head/sys/sys/imgact_aout.h Modified: head/sys/kern/imgact_aout.c ============================================================================== --- head/sys/kern/imgact_aout.c Thu Jun 28 07:28:39 2012 (r237693) +++ head/sys/kern/imgact_aout.c Thu Jun 28 07:33:43 2012 (r237694) @@ -174,9 +174,9 @@ exec_aout_imgact(struct image_params *im * 0x64 for Linux, 0x86 for *BSD, 0x00 for BSDI. * NetBSD is in network byte order.. ugh. */ - if (((a_out->a_magic >> 16) & 0xff) != 0x86 && - ((a_out->a_magic >> 16) & 0xff) != 0 && - ((((int)ntohl(a_out->a_magic)) >> 16) & 0xff) != 0x86) + if (((a_out->a_midmag >> 16) & 0xff) != 0x86 && + ((a_out->a_midmag >> 16) & 0xff) != 0 && + ((((int)ntohl(a_out->a_midmag)) >> 16) & 0xff) != 0x86) return -1; /* @@ -184,7 +184,7 @@ exec_aout_imgact(struct image_params *im * We do two cases: host byte order and network byte order * (for NetBSD compatibility) */ - switch ((int)(a_out->a_magic & 0xffff)) { + switch ((int)(a_out->a_midmag & 0xffff)) { case ZMAGIC: virtual_offset = 0; if (a_out->a_text) { @@ -203,7 +203,7 @@ exec_aout_imgact(struct image_params *im break; default: /* NetBSD compatibility */ - switch ((int)(ntohl(a_out->a_magic) & 0xffff)) { + switch ((int)(ntohl(a_out->a_midmag) & 0xffff)) { case ZMAGIC: case QMAGIC: virtual_offset = PAGE_SIZE; Modified: head/sys/kern/imgact_gzip.c ============================================================================== --- head/sys/kern/imgact_gzip.c Thu Jun 28 07:28:39 2012 (r237693) +++ head/sys/kern/imgact_gzip.c Thu Jun 28 07:33:43 2012 (r237694) @@ -161,7 +161,7 @@ do_aout_hdr(struct imgact_gzip * gz) * Set file/virtual offset based on a.out variant. We do two cases: * host byte order and network byte order (for NetBSD compatibility) */ - switch ((int) (gz->a_out.a_magic & 0xffff)) { + switch ((int) (gz->a_out.a_midmag & 0xffff)) { case ZMAGIC: gz->virtual_offset = 0; if (gz->a_out.a_text) { @@ -177,7 +177,7 @@ do_aout_hdr(struct imgact_gzip * gz) break; default: /* NetBSD compatibility */ - switch ((int) (ntohl(gz->a_out.a_magic) & 0xffff)) { + switch ((int) (ntohl(gz->a_out.a_midmag) & 0xffff)) { case ZMAGIC: case QMAGIC: gz->virtual_offset = PAGE_SIZE; Modified: head/sys/sys/imgact_aout.h ============================================================================== --- head/sys/sys/imgact_aout.h Thu Jun 28 07:28:39 2012 (r237693) +++ head/sys/sys/imgact_aout.h Thu Jun 28 07:33:43 2012 (r237694) @@ -119,7 +119,6 @@ struct exec { uint32_t a_trsize; /* text relocation size */ uint32_t a_drsize; /* data relocation size */ }; -#define a_magic a_midmag /* XXX Hack to work with imgact_{aout,gzip}.c */ /* a_magic */ #define OMAGIC 0407 /* old impure format */ From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 07:37: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 E89C21065670; Thu, 28 Jun 2012 07:37:46 +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 D1CAC8FC08; Thu, 28 Jun 2012 07:37: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 q5S7bk2U060140; Thu, 28 Jun 2012 07:37:46 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5S7bkEE060138; Thu, 28 Jun 2012 07:37:46 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201206280737.q5S7bkEE060138@svn.freebsd.org> From: Warner Losh Date: Thu, 28 Jun 2012 07:37: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: r237695 - 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: Thu, 28 Jun 2012 07:37:47 -0000 Author: imp Date: Thu Jun 28 07:37:46 2012 New Revision: 237695 URL: http://svn.freebsd.org/changeset/base/237695 Log: Turns out the emulators still need/want a_magic, so put it back here. Modified: head/sys/sys/imgact_aout.h Modified: head/sys/sys/imgact_aout.h ============================================================================== --- head/sys/sys/imgact_aout.h Thu Jun 28 07:33:43 2012 (r237694) +++ head/sys/sys/imgact_aout.h Thu Jun 28 07:37:46 2012 (r237695) @@ -119,6 +119,7 @@ struct exec { uint32_t a_trsize; /* text relocation size */ uint32_t a_drsize; /* data relocation size */ }; +#define a_magic a_midmag /* Hack for emulators */ /* a_magic */ #define OMAGIC 0407 /* old impure format */ From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 07:53: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 1AA191065673; Thu, 28 Jun 2012 07:53:10 +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 A79D18FC08; Thu, 28 Jun 2012 07:53:09 +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 q5S7r2dh036045; Thu, 28 Jun 2012 10:53:02 +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 q5S7r22R099779; Thu, 28 Jun 2012 10:53:02 +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 q5S7r2QR099778; Thu, 28 Jun 2012 10:53:02 +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: Thu, 28 Jun 2012 10:53:01 +0300 From: Konstantin Belousov To: davidxu@freebsd.org Message-ID: <20120628075301.GS2337@deviant.kiev.zoral.com.ua> References: <201206272032.q5RKWjvt031174@svn.freebsd.org> <4FEBB8C9.8070006@gmail.com> <4FEBC0A2.3010708@gmail.com> <4FEBC70F.40408@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YD+BIkcXU0IoTTos" Content-Disposition: inline In-Reply-To: <4FEBC70F.40408@gmail.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-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: Attilio Rao , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237660 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2012 07:53:10 -0000 --YD+BIkcXU0IoTTos Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 28, 2012 at 10:53:03AM +0800, David Xu wrote: > On 2012/6/28 10:32, Attilio Rao wrote: > >2012/6/28, David Xu: > >>On 2012/6/28 10:21, Attilio Rao wrote: > >>>2012/6/28, David Xu: > >>>>On 2012/6/28 4:32, Konstantin Belousov wrote: > >>>>>Author: kib > >>>>>Date: Wed Jun 27 20:32:45 2012 > >>>>>New Revision: 237660 > >>>>>URL: http://svn.freebsd.org/changeset/base/237660 > >>>>> > >>>>>Log: > >>>>> Optimize the handling of SC_NPROCESSORS_CONF, by using auxv=20 > >>>>> AT_NCPU > >>>>> value if present. > >>>>> > >>>>> MFC after: 1 week > >>>>> > >>>>>Modified: > >>>>> head/lib/libc/gen/sysconf.c > >>>>> > >>>>>Modified: head/lib/libc/gen/sysconf.c > >>>>>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > >>>>>--- head/lib/libc/gen/sysconf.c Wed Jun 27 20:24:25 2012 (r237659) > >>>>>+++ head/lib/libc/gen/sysconf.c Wed Jun 27 20:32:45 2012 (r237660) > >>>>>@@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); > >>>>> #include > >>>>> #include > >>>>> > >>>>>+#include > >>>>> #include > >>>>> #include > >>>>> #include > >>>>>@@ -51,6 +52,7 @@ __FBSDID("$FreeBSD$"); > >>>>> > >>>>> #include "../stdlib/atexit.h" > >>>>> #include "tzfile.h" /* from=20 > >>>>> ../../../contrib/tzcode/stdtime */ > >>>>>+#include "libc_private.h" > >>>>> > >>>>> #define _PATH_ZONEINFO TZDIR /* from tzfile.h */ > >>>>> > >>>>>@@ -585,6 +587,8 @@ yesno: > >>>>> > >>>>> case _SC_NPROCESSORS_CONF: > >>>>> case _SC_NPROCESSORS_ONLN: > >>>>>+ if (_elf_aux_info(AT_NCPUS,&value, sizeof(value)) =3D=3D 0) > >>>>>+ return ((long)value); > >>>>> mib[0] =3D CTL_HW; > >>>>> mib[1] =3D HW_NCPU; > >>>>> break; > >>>>> > >>>>Will this make controlling the number of CPU online or CPU hotplug > >>>>be impossible on FreeBSD ? > >>>If I think about hotplug CPUs I can think of other 1000 > >>>problems/races/bad situations to be fixed before this one, really. > >>These are problems only in kernel, but kib's change is about ABI > >>between userland and kernel, I hope we don't introduce an ABI which > >>is not extendable road stone. > >I'm not entirely sure I see the ABI breakage here. > It is not breakage, it is the ABI thinks number of online cpu is fixed, > obviously, it is not the case in future unless FreeBSD won't support > dynamic number of online cpus. >=20 >=20 > >If the AT_NCPUS > >becames unconvenient and not correct at some point we can just fix > >sysconf() to not look into the aux vector anymoe. > If you already know this will be a problem, why do you introduce it > and later need to fix it ? >=20 > > Please note that > >AT_NCPUS is already exported nowadays. I think this is instead a > >clever optimization to avoid the sysctl() (usual way to retrieve the > >number of CPUs). > But why don't you cache it in libc ? following code is enough: >=20 > static int online_cpu; > if (online_cpu =3D=3D 0) > online_cpu =3D sysctl > return online_cpu; >=20 Thread did evolved somewhat while I was AFK. First, please note that the ABI which I designed there is fixable: if kernel does not export AT_NCPUS at all, then auxv correctly handles the situation returning an error, and libc falls back to sysctl(2). Second, sysconf(3) is very weird API. Note the following statement from SUSv4: "The value shall not change during the lifetime of the calling process, [XSI] [Option Start] except that sysconf(_SC_OPEN_MAX) may return different values before and after a call to setrlimit() which changes the RLIMIT_NOFILE soft limit." Corresponding comment is also present in sysconf.c. So I do not see an issue there, esp. for advisory value which NCPUS is anyway. --YD+BIkcXU0IoTTos Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/sDV0ACgkQC3+MBN1Mb4jAxwCeOOJVbcfvLsTXSgOupccMhLDZ OmgAnie0Etxxw62u1QPnCI0lCNYFOKez =jhGE -----END PGP SIGNATURE----- --YD+BIkcXU0IoTTos-- From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 08:22: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 AD32B106564A; Thu, 28 Jun 2012 08:22:00 +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 9801C8FC0A; Thu, 28 Jun 2012 08:22: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 q5S8M05R062087; Thu, 28 Jun 2012 08:22:00 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5S8M0st062083; Thu, 28 Jun 2012 08:22:00 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201206280822.q5S8M0st062083@svn.freebsd.org> From: Gabor Kovesdan Date: Thu, 28 Jun 2012 08:22: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: r237696 - 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, 28 Jun 2012 08:22:00 -0000 Author: gabor Date: Thu Jun 28 08:22:00 2012 New Revision: 237696 URL: http://svn.freebsd.org/changeset/base/237696 Log: - Add UPDATING entry for BSD sort Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Jun 28 07:37:46 2012 (r237695) +++ head/UPDATING Thu Jun 28 08:22:00 2012 (r237696) @@ -24,6 +24,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20120628: + The sort utility has been replaced with BSD sort. For now, GNU sort + is also available as "gnusort" or the default can be set back to + GNU sort by setting WITH_GNU_SORT. In this case, BSD sort will be + installed as "bsdsort". + 20120611: A new version of ZFS (pool version 5000) has been merged to -HEAD. Starting with this version the old system of ZFS pool versioning From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 08:25: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 C94321065673; Thu, 28 Jun 2012 08:25:19 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B43E18FC17; Thu, 28 Jun 2012 08:25: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 q5S8PJqb062327; Thu, 28 Jun 2012 08:25:19 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5S8PJG2062325; Thu, 28 Jun 2012 08:25:19 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201206280825.q5S8PJG2062325@svn.freebsd.org> From: Maxim Konovalov Date: Thu, 28 Jun 2012 08:25: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: r237697 - 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: Thu, 28 Jun 2012 08:25:19 -0000 Author: maxim Date: Thu Jun 28 08:25:19 2012 New Revision: 237697 URL: http://svn.freebsd.org/changeset/base/237697 Log: o Restore -u getopt(3) flag somehow killed in r234712. PR: bin/169490 Submitted by: amdmi3 MFC after: 2 weeks Modified: head/usr.sbin/jail/jail.c Modified: head/usr.sbin/jail/jail.c ============================================================================== --- head/usr.sbin/jail/jail.c Thu Jun 28 08:22:00 2012 (r237696) +++ head/usr.sbin/jail/jail.c Thu Jun 28 08:25:19 2012 (r237697) @@ -145,7 +145,7 @@ main(int argc, char **argv) cfname = CONF_FILE; JidFile = NULL; - while ((ch = getopt(argc, argv, "cdf:hiJ:lmn:p:qrRs:U:v")) != -1) { + while ((ch = getopt(argc, argv, "cdf:hiJ:lmn:p:qrRs:u:U:v")) != -1) { switch (ch) { case 'c': op |= JF_START; From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 08:49: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 BC02D1065686; Thu, 28 Jun 2012 08:49:52 +0000 (UTC) (envelope-from listlog2011@gmail.com) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 9C8BA8FC18; Thu, 28 Jun 2012 08:49:52 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q5S8nnLY017411; Thu, 28 Jun 2012 08:49:50 GMT (envelope-from listlog2011@gmail.com) Message-ID: <4FEC1AAB.6070408@gmail.com> Date: Thu, 28 Jun 2012 16:49:47 +0800 From: David Xu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Konstantin Belousov References: <201206272032.q5RKWjvt031174@svn.freebsd.org> <4FEBB8C9.8070006@gmail.com> <4FEBC0A2.3010708@gmail.com> <4FEBC70F.40408@gmail.com> <20120628075301.GS2337@deviant.kiev.zoral.com.ua> In-Reply-To: <20120628075301.GS2337@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Attilio Rao , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, davidxu@freebsd.org Subject: Re: svn commit: r237660 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: davidxu@freebsd.org List-Id: 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, 28 Jun 2012 08:49:52 -0000 On 2012/6/28 15:53, Konstantin Belousov wrote: > On Thu, Jun 28, 2012 at 10:53:03AM +0800, David Xu wrote: >> On 2012/6/28 10:32, Attilio Rao wrote: >>> 2012/6/28, David Xu: >>>> On 2012/6/28 10:21, Attilio Rao wrote: >>>>> 2012/6/28, David Xu: >>>>>> On 2012/6/28 4:32, Konstantin Belousov wrote: >>>>>>> Author: kib >>>>>>> Date: Wed Jun 27 20:32:45 2012 >>>>>>> New Revision: 237660 >>>>>>> URL: http://svn.freebsd.org/changeset/base/237660 >>>>>>> >>>>>>> Log: >>>>>>> Optimize the handling of SC_NPROCESSORS_CONF, by using auxv >>>>>>> AT_NCPU >>>>>>> value if present. >>>>>>> >>>>>>> MFC after: 1 week >>>>>>> >>>>>>> Modified: >>>>>>> head/lib/libc/gen/sysconf.c >>>>>>> >>>>>>> Modified: head/lib/libc/gen/sysconf.c >>>>>>> ============================================================================== >>>>>>> --- head/lib/libc/gen/sysconf.c Wed Jun 27 20:24:25 2012 (r237659) >>>>>>> +++ head/lib/libc/gen/sysconf.c Wed Jun 27 20:32:45 2012 (r237660) >>>>>>> @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); >>>>>>> #include >>>>>>> #include >>>>>>> >>>>>>> +#include >>>>>>> #include >>>>>>> #include >>>>>>> #include >>>>>>> @@ -51,6 +52,7 @@ __FBSDID("$FreeBSD$"); >>>>>>> >>>>>>> #include "../stdlib/atexit.h" >>>>>>> #include "tzfile.h" /* from >>>>>>> ../../../contrib/tzcode/stdtime */ >>>>>>> +#include "libc_private.h" >>>>>>> >>>>>>> #define _PATH_ZONEINFO TZDIR /* from tzfile.h */ >>>>>>> >>>>>>> @@ -585,6 +587,8 @@ yesno: >>>>>>> >>>>>>> case _SC_NPROCESSORS_CONF: >>>>>>> case _SC_NPROCESSORS_ONLN: >>>>>>> + if (_elf_aux_info(AT_NCPUS,&value, sizeof(value)) == 0) >>>>>>> + return ((long)value); >>>>>>> mib[0] = CTL_HW; >>>>>>> mib[1] = HW_NCPU; >>>>>>> break; >>>>>>> >>>>>> Will this make controlling the number of CPU online or CPU hotplug >>>>>> be impossible on FreeBSD ? >>>>> If I think about hotplug CPUs I can think of other 1000 >>>>> problems/races/bad situations to be fixed before this one, really. >>>> These are problems only in kernel, but kib's change is about ABI >>>> between userland and kernel, I hope we don't introduce an ABI which >>>> is not extendable road stone. >>> I'm not entirely sure I see the ABI breakage here. >> It is not breakage, it is the ABI thinks number of online cpu is fixed, >> obviously, it is not the case in future unless FreeBSD won't support >> dynamic number of online cpus. >> >> >>> If the AT_NCPUS >>> becames unconvenient and not correct at some point we can just fix >>> sysconf() to not look into the aux vector anymoe. >> If you already know this will be a problem, why do you introduce it >> and later need to fix it ? >> >>> Please note that >>> AT_NCPUS is already exported nowadays. I think this is instead a >>> clever optimization to avoid the sysctl() (usual way to retrieve the >>> number of CPUs). >> But why don't you cache it in libc ? following code is enough: >> >> static int online_cpu; >> if (online_cpu == 0) >> online_cpu = sysctl >> return online_cpu; >> > Thread did evolved somewhat while I was AFK. > > First, please note that the ABI which I designed there is fixable: > if kernel does not export AT_NCPUS at all, then auxv correctly handles > the situation returning an error, and libc falls back to sysctl(2). Do we really want to bypass sysctl and instead passing all info via auxv vector ? I found the sysconf() is a bunch of switch-case, which is already slow, before _SC_NPROCESSES_ONLN, it has already a quite number of case branches, and in your code, it calls _elf_aux_info() which also has some switch-cases branch, if you cache smp_cpus in libc, the call for _elf_aux_info is not needed, and you don't need code in kernel to passing it either, in any case, the code to call sysctl is still needed, so why don't we just use sysctl instead and cache the result in libc ? this at least can generate small code and a bit faster after first call to sysconf(_SC_NPROCESSES_ONLN). > Second, sysconf(3) is very weird API. Note the following statement from > SUSv4: "The value shall not change during the lifetime of the calling > process, [XSI] [Option Start] except that sysconf(_SC_OPEN_MAX) may > return different values before and after a call to setrlimit() which > changes the RLIMIT_NOFILE soft limit." Corresponding comment is also > present in sysconf.c. So it declares the number of cpu is static and can not be changed. > So I do not see an issue there, esp. for advisory value which NCPUS is > anyway. From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 10:12: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 D15E2106564A; Thu, 28 Jun 2012 10:12:46 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BB9D28FC1F; Thu, 28 Jun 2012 10:12: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 q5SACker066979; Thu, 28 Jun 2012 10:12:46 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5SACkmC066976; Thu, 28 Jun 2012 10:12:46 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201206281012.q5SACkmC066976@svn.freebsd.org> From: Christian Brueffer Date: Thu, 28 Jun 2012 10:12: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: r237700 - in head/release/doc: en_US.ISO8859-1/hardware 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: Thu, 28 Jun 2012 10:12:47 -0000 Author: brueffer Date: Thu Jun 28 10:12:46 2012 New Revision: 237700 URL: http://svn.freebsd.org/changeset/base/237700 Log: Automatically generate hardware notes for bxe(4). Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml head/release/doc/share/misc/dev.archlist.txt Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- head/release/doc/en_US.ISO8859-1/hardware/article.sgml Thu Jun 28 10:05:45 2012 (r237699) +++ head/release/doc/en_US.ISO8859-1/hardware/article.sgml Thu Jun 28 10:12:46 2012 (r237700) @@ -898,6 +898,8 @@ &hwlist.bge; + &hwlist.bxe; + &hwlist.cas; &hwlist.cdce; Modified: head/release/doc/share/misc/dev.archlist.txt ============================================================================== --- head/release/doc/share/misc/dev.archlist.txt Thu Jun 28 10:05:45 2012 (r237699) +++ head/release/doc/share/misc/dev.archlist.txt Thu Jun 28 10:12:46 2012 (r237700) @@ -52,6 +52,7 @@ bce i386,amd64 bge i386,pc98,sparc64,ia64,amd64 bktr i386,pc98 bt i386,amd64 +bxe i386,amd64 cdce i386,pc98,ia64,amd64,powerpc ciss i386,ia64,amd64 ce i386,pc98 From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 10:21:26 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 7C5D21065674; Thu, 28 Jun 2012 10:21:26 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 261A98FC0C; Thu, 28 Jun 2012 10:21: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 q5SALQER067354; Thu, 28 Jun 2012 10:21:26 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5SALPWp067352; Thu, 28 Jun 2012 10:21:25 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201206281021.q5SALPWp067352@svn.freebsd.org> From: Christian Brueffer Date: Thu, 28 Jun 2012 10:21: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: r237701 - head/release/doc/en_US.ISO8859-1/hardware X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 28 Jun 2012 10:21:26 -0000 Author: brueffer Date: Thu Jun 28 10:21:25 2012 New Revision: 237701 URL: http://svn.freebsd.org/changeset/base/237701 Log: Automatically generate hardware notes for bwn(4). Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- head/release/doc/en_US.ISO8859-1/hardware/article.sgml Thu Jun 28 10:12:46 2012 (r237700) +++ head/release/doc/en_US.ISO8859-1/hardware/article.sgml Thu Jun 28 10:21:25 2012 (r237701) @@ -1059,6 +1059,8 @@ &hwlist.bwi; + &hwlist.bwn; + [&arch.i386;, &arch.amd64;] Intel PRO/Wireless 2100 MiniPCI network adapter (&man.ipw.4; driver) From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 13:00: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 5388E1065670; Thu, 28 Jun 2012 13:00:54 +0000 (UTC) (envelope-from listlog2011@gmail.com) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 339328FC12; Thu, 28 Jun 2012 13:00:54 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q5SD0pJS055734; Thu, 28 Jun 2012 13:00:52 GMT (envelope-from listlog2011@gmail.com) Message-ID: <4FEC557F.4080807@gmail.com> Date: Thu, 28 Jun 2012 21:00:47 +0800 From: David Xu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: davidxu@freebsd.org References: <201206272032.q5RKWjvt031174@svn.freebsd.org> <4FEBB8C9.8070006@gmail.com> <4FEBC0A2.3010708@gmail.com> <4FEBC70F.40408@gmail.com> <20120628075301.GS2337@deviant.kiev.zoral.com.ua> <4FEC1AAB.6070408@gmail.com> In-Reply-To: <4FEC1AAB.6070408@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Konstantin Belousov , Attilio Rao , svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r237660 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: davidxu@freebsd.org List-Id: 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, 28 Jun 2012 13:00:54 -0000 On 2012/6/28 16:49, David Xu wrote: > On 2012/6/28 15:53, Konstantin Belousov wrote: >> On Thu, Jun 28, 2012 at 10:53:03AM +0800, David Xu wrote: >>> On 2012/6/28 10:32, Attilio Rao wrote: >>>> 2012/6/28, David Xu: >>>>> On 2012/6/28 10:21, Attilio Rao wrote: >>>>>> 2012/6/28, David Xu: >>>>>>> On 2012/6/28 4:32, Konstantin Belousov wrote: >>>>>>>> Author: kib >>>>>>>> Date: Wed Jun 27 20:32:45 2012 >>>>>>>> New Revision: 237660 >>>>>>>> URL: http://svn.freebsd.org/changeset/base/237660 >>>>>>>> >>>>>>>> Log: >>>>>>>> Optimize the handling of SC_NPROCESSORS_CONF, by using auxv >>>>>>>> AT_NCPU >>>>>>>> value if present. >>>>>>>> >>>>>>>> MFC after: 1 week >>>>>>>> >>>>>>>> Modified: >>>>>>>> head/lib/libc/gen/sysconf.c >>>>>>>> >>>>>>>> Modified: head/lib/libc/gen/sysconf.c >>>>>>>> ============================================================================== >>>>>>>> >>>>>>>> --- head/lib/libc/gen/sysconf.c Wed Jun 27 20:24:25 2012 >>>>>>>> (r237659) >>>>>>>> +++ head/lib/libc/gen/sysconf.c Wed Jun 27 20:32:45 2012 >>>>>>>> (r237660) >>>>>>>> @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); >>>>>>>> #include >>>>>>>> #include >>>>>>>> >>>>>>>> +#include >>>>>>>> #include >>>>>>>> #include >>>>>>>> #include >>>>>>>> @@ -51,6 +52,7 @@ __FBSDID("$FreeBSD$"); >>>>>>>> >>>>>>>> #include "../stdlib/atexit.h" >>>>>>>> #include "tzfile.h" /* from >>>>>>>> ../../../contrib/tzcode/stdtime */ >>>>>>>> +#include "libc_private.h" >>>>>>>> >>>>>>>> #define _PATH_ZONEINFO TZDIR /* from tzfile.h */ >>>>>>>> >>>>>>>> @@ -585,6 +587,8 @@ yesno: >>>>>>>> >>>>>>>> case _SC_NPROCESSORS_CONF: >>>>>>>> case _SC_NPROCESSORS_ONLN: >>>>>>>> + if (_elf_aux_info(AT_NCPUS,&value, sizeof(value)) == 0) >>>>>>>> + return ((long)value); >>>>>>>> mib[0] = CTL_HW; >>>>>>>> mib[1] = HW_NCPU; >>>>>>>> break; >>>>>>>> >>>>>>> Will this make controlling the number of CPU online or CPU hotplug >>>>>>> be impossible on FreeBSD ? >>>>>> If I think about hotplug CPUs I can think of other 1000 >>>>>> problems/races/bad situations to be fixed before this one, really. >>>>> These are problems only in kernel, but kib's change is about ABI >>>>> between userland and kernel, I hope we don't introduce an ABI which >>>>> is not extendable road stone. >>>> I'm not entirely sure I see the ABI breakage here. >>> It is not breakage, it is the ABI thinks number of online cpu is fixed, >>> obviously, it is not the case in future unless FreeBSD won't support >>> dynamic number of online cpus. >>> >>> >>>> If the AT_NCPUS >>>> becames unconvenient and not correct at some point we can just fix >>>> sysconf() to not look into the aux vector anymoe. >>> If you already know this will be a problem, why do you introduce it >>> and later need to fix it ? >>> >>>> Please note that >>>> AT_NCPUS is already exported nowadays. I think this is instead a >>>> clever optimization to avoid the sysctl() (usual way to retrieve the >>>> number of CPUs). >>> But why don't you cache it in libc ? following code is enough: >>> >>> static int online_cpu; >>> if (online_cpu == 0) >>> online_cpu = sysctl >>> return online_cpu; >>> >> Thread did evolved somewhat while I was AFK. >> >> First, please note that the ABI which I designed there is fixable: >> if kernel does not export AT_NCPUS at all, then auxv correctly handles >> the situation returning an error, and libc falls back to sysctl(2). > > Do we really want to bypass sysctl and instead passing all info via > auxv vector ? > I found the sysconf() is a bunch of switch-case, which is already > slow, before > _SC_NPROCESSES_ONLN, it has already a quite number of case branches, > and in your code, it calls _elf_aux_info() which also has some > switch-cases branch, > if you cache smp_cpus in libc, the call for _elf_aux_info is not > needed, and you > don't need code in kernel to passing it either, in any case, the code > to call > sysctl is still needed, so why don't we just use sysctl instead and cache > the result in libc ? this at least can generate small code and a bit > faster after > first call to sysconf(_SC_NPROCESSES_ONLN). And as a side note, I think we should not put non-critical code into fork/exec path, these two functions are rather critical path for any UNIX like system, anything slowing down these two functions will affect overall performance, so we should not waste cpu cycle trying to push data to user mode via auxv or other ways and yet the data is not used by user code in most time, such as the number of online cpu. And in rtld-elf or libc, we should not waste too much time before executing main(). Regards, David Xu From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 13:52: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 AD3D91065673; Thu, 28 Jun 2012 13:52:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 749E68FC0C; Thu, 28 Jun 2012 13:52:51 +0000 (UTC) Received: by bkwj5 with SMTP id j5so592280bkw.13 for ; Thu, 28 Jun 2012 06:52:50 -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=w7+k37PzZz5xlnNJFcLjPNytDPmZ3jGTOFKJJf4hlrc=; b=DJCE/42jZfnOtgi6uNNebjhI9zsXrAj0ygIDGUehTRP3tiKiF1kqcjV7u+NCp8Smn4 IyX0DKcsVs/QR7UpMI1QddCyZa5e0yI+J6ZJkE0o8gBwIgdCsnNmbGW0R/eOfJmxaPW7 Rg/O4df3+hPJsOwk/bq1hhpuuS1HQYaTBp/jyjQlpN2oFq+OAzF7SPEvBHv54t6ym9Ax OON/9Zp/SwIrJ+ytrN/OhFIYuTW7ZNyJFOJz+JkP9SpgPvkq1IeS+hk6IUUP252iscmq RJyVOJdxJZDMPZT4qPRWk3XS89bYlP0U+5PyBqwV21Wi4PS4efYedTZG88z1V/m0ZdDV MGqg== MIME-Version: 1.0 Received: by 10.152.144.168 with SMTP id sn8mr2338079lab.1.1340891570434; Thu, 28 Jun 2012 06:52:50 -0700 (PDT) Received: by 10.112.98.65 with HTTP; Thu, 28 Jun 2012 06:52:50 -0700 (PDT) In-Reply-To: <4FEC557F.4080807@gmail.com> References: <201206272032.q5RKWjvt031174@svn.freebsd.org> <4FEBB8C9.8070006@gmail.com> <4FEBC0A2.3010708@gmail.com> <4FEBC70F.40408@gmail.com> <20120628075301.GS2337@deviant.kiev.zoral.com.ua> <4FEC1AAB.6070408@gmail.com> <4FEC557F.4080807@gmail.com> Date: Thu, 28 Jun 2012 16:52:50 +0300 Message-ID: From: Kostik Belousov To: davidxu@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Attilio Rao , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237660 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2012 13:52:52 -0000 On Thu, Jun 28, 2012 at 4:00 PM, David Xu wrote: > On 2012/6/28 16:49, David Xu wrote: >> >> On 2012/6/28 15:53, Konstantin Belousov wrote: >>> >>> On Thu, Jun 28, 2012 at 10:53:03AM +0800, David Xu wrote: >>>> >>>> On 2012/6/28 10:32, Attilio Rao wrote: >>>>> >>>>> 2012/6/28, David Xu: >>>>>> >>>>>> On 2012/6/28 10:21, Attilio Rao wrote: >>>>>>> >>>>>>> 2012/6/28, David Xu: >>>>>>>> >>>>>>>> On 2012/6/28 4:32, Konstantin Belousov wrote: >>>>>>>>> >>>>>>>>> Author: kib >>>>>>>>> Date: Wed Jun 27 20:32:45 2012 >>>>>>>>> New Revision: 237660 >>>>>>>>> URL: http://svn.freebsd.org/changeset/base/237660 >>>>>>>>> >>>>>>>>> Log: >>>>>>>>> =A0 =A0 Optimize the handling of SC_NPROCESSORS_CONF, by using au= xv >>>>>>>>> =A0 =A0 AT_NCPU >>>>>>>>> =A0 =A0 value if present. >>>>>>>>> >>>>>>>>> =A0 =A0 MFC after: =A0 =A01 week >>>>>>>>> >>>>>>>>> Modified: >>>>>>>>> =A0 =A0 head/lib/libc/gen/sysconf.c >>>>>>>>> >>>>>>>>> Modified: head/lib/libc/gen/sysconf.c >>>>>>>>> >>>>>>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D >>>>>>>>> --- head/lib/libc/gen/sysconf.c =A0 =A0Wed Jun 27 20:24:25 2012 >>>>>>>>> (r237659) >>>>>>>>> +++ head/lib/libc/gen/sysconf.c =A0 =A0Wed Jun 27 20:32:45 2012 >>>>>>>>> (r237660) >>>>>>>>> @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); >>>>>>>>> =A0 =A0#include >>>>>>>>> =A0 =A0#include >>>>>>>>> >>>>>>>>> +#include >>>>>>>>> =A0 =A0#include >>>>>>>>> =A0 =A0#include >>>>>>>>> =A0 =A0#include >>>>>>>>> @@ -51,6 +52,7 @@ __FBSDID("$FreeBSD$"); >>>>>>>>> >>>>>>>>> =A0 =A0#include "../stdlib/atexit.h" >>>>>>>>> =A0 =A0#include "tzfile.h" =A0 =A0 =A0 =A0/* from >>>>>>>>> =A0 =A0../../../contrib/tzcode/stdtime */ >>>>>>>>> +#include "libc_private.h" >>>>>>>>> >>>>>>>>> =A0 =A0#define =A0 =A0_PATH_ZONEINFO =A0 =A0TZDIR =A0 =A0/* from = tzfile.h */ >>>>>>>>> >>>>>>>>> @@ -585,6 +587,8 @@ yesno: >>>>>>>>> >>>>>>>>> =A0 =A0 =A0 =A0case _SC_NPROCESSORS_CONF: >>>>>>>>> =A0 =A0 =A0 =A0case _SC_NPROCESSORS_ONLN: >>>>>>>>> + =A0 =A0 =A0 =A0if (_elf_aux_info(AT_NCPUS,&value, sizeof(value)= ) =3D=3D 0) >>>>>>>>> + =A0 =A0 =A0 =A0 =A0 =A0return ((long)value); >>>>>>>>> =A0 =A0 =A0 =A0 =A0 =A0mib[0] =3D CTL_HW; >>>>>>>>> =A0 =A0 =A0 =A0 =A0 =A0mib[1] =3D HW_NCPU; >>>>>>>>> =A0 =A0 =A0 =A0 =A0 =A0break; >>>>>>>>> >>>>>>>> Will this make controlling the number of CPU online or CPU hotplug >>>>>>>> be impossible on FreeBSD ? >>>>>>> >>>>>>> If I think about hotplug CPUs I can think of other 1000 >>>>>>> problems/races/bad situations to be fixed before this one, really. >>>>>> >>>>>> These are problems only in kernel, but kib's change is about ABI >>>>>> between userland and kernel, I hope we don't introduce an ABI which >>>>>> is not extendable road stone. >>>>> >>>>> I'm not entirely sure I see the ABI breakage here. >>>> >>>> It is not breakage, it is the ABI thinks number of online cpu is fixed= , >>>> obviously, it is not the case in future unless FreeBSD won't support >>>> dynamic number of online cpus. >>>> >>>> >>>>> If the AT_NCPUS >>>>> becames unconvenient and not correct at some point we can just fix >>>>> sysconf() to not look into the aux vector anymoe. >>>> >>>> If you already know this will be a problem, why do you introduce it >>>> and later need to fix it ? >>>> >>>>> =A0Please note that >>>>> AT_NCPUS is already exported nowadays. I think this is instead a >>>>> clever optimization to avoid the sysctl() (usual way to retrieve the >>>>> number of CPUs). >>>> >>>> But why don't you cache it in libc ? following code is enough: >>>> >>>> static int online_cpu; >>>> if (online_cpu =3D=3D 0) >>>> =A0 =A0 online_cpu =3D sysctl >>>> return online_cpu; >>>> >>> Thread did evolved somewhat while I was AFK. >>> >>> First, please note that the ABI which I designed there is fixable: >>> if kernel does not export AT_NCPUS at all, then auxv correctly handles >>> the situation returning an error, and libc falls back to sysctl(2). >> >> >> Do we really want to bypass sysctl and instead passing all info via auxv >> vector ? >> I found the sysconf() is a bunch of switch-case, which is already slow, >> before >> _SC_NPROCESSES_ONLN, =A0it has already a quite number of case branches, >> and in your code, it calls _elf_aux_info() which also has some >> switch-cases branch, >> if you cache smp_cpus in libc, the call for _elf_aux_info is not needed, >> and you >> don't need code in kernel to passing it either, in any case, the code to >> call >> sysctl is still needed, so why don't we just use sysctl instead and cach= e >> the result in libc ? this at least can generate small code and a bit >> faster after >> first call to sysconf(_SC_NPROCESSES_ONLN). > > > And as a side note, I think we should not put non-critical code into > fork/exec > path, =A0these two functions are rather critical path for any UNIX like > system, > anything slowing down these two functions will affect overall performance= , > so we should not waste cpu cycle trying to push data to user mode via aux= v > or other ways and yet the data is not used by user code in most time, > such as the number of online cpu. And in rtld-elf or libc, we should not > waste > too much time before executing main(). My motivation for extending auxv vector and to develop auxv.c was exactly to shave around dozen of syscalls from the application startup sequence. If you look at the ktrace output of the binary startup on RELENG_8 libc, you should note exactly the sysctls to request ncpus, pagesizes, canary and so on. In RELENG_9 and HEAD, there are no sysctls in the trace, because the data is already pre-filled by kernel for libc consumption. The sysconf(3) commit you are commenting on was caused by jemalloc(3) initialization starting using _sysconf(3) to query ncpu (for older version, which used sysctl directly, I direct auxv call). So HEAD has temporary +1 sysctl syscall done on app startup, now it should be back to zero. In other words, 'we should not put non-critical code into fork/exec path' exactly contradicts with proposal to remove auxv, since exec would need to call sysctls to fetch the same data. From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 15:38: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 E6477106566B; Thu, 28 Jun 2012 15:38:14 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D080D8FC1A; Thu, 28 Jun 2012 15:38: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 q5SFcEub084118; Thu, 28 Jun 2012 15:38:14 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5SFcE4h084116; Thu, 28 Jun 2012 15:38:14 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201206281538.q5SFcE4h084116@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Thu, 28 Jun 2012 15:38: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: r237714 - head/cddl/contrib/opensolaris/lib/libdtrace/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, 28 Jun 2012 15:38:15 -0000 Author: pfg Date: Thu Jun 28 15:38:14 2012 New Revision: 237714 URL: http://svn.freebsd.org/changeset/base/237714 Log: Fix build with Clang. error: format specifies type 'long long' but the argument has type 'int64_t' (aka 'long') Reported by: Ed Maste Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Thu Jun 28 14:26:55 2012 (r237713) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Thu Jun 28 15:38:14 2012 (r237714) @@ -761,7 +761,7 @@ dt_print_llquantize(dtrace_hdl_t *dtp, F step = next > nsteps ? next / nsteps : 1; if (first_bin == 0) { - (void) snprintf(c, sizeof (c), "< %lld", value); + (void) snprintf(c, sizeof (c), "< %ld", value); if (dt_printf(dtp, fp, "%16s ", c) < 0) return (-1); From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 16:01: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 D769C106564A; Thu, 28 Jun 2012 16:01:08 +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 C0CC58FC17; Thu, 28 Jun 2012 16:01: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 q5SG18UZ085093; Thu, 28 Jun 2012 16:01:08 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5SG18ud085084; Thu, 28 Jun 2012 16:01:08 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201206281601.q5SG18ud085084@svn.freebsd.org> From: Michael Tuexen Date: Thu, 28 Jun 2012 16:01: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: r237715 - 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: Thu, 28 Jun 2012 16:01:08 -0000 Author: tuexen Date: Thu Jun 28 16:01:08 2012 New Revision: 237715 URL: http://svn.freebsd.org/changeset/base/237715 Log: Pass the src and dst address of a received packet explicitly around. MFC after: 3 days Modified: head/sys/netinet/sctp_asconf.c head/sys/netinet/sctp_asconf.h head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_indata.h head/sys/netinet/sctp_input.c head/sys/netinet/sctp_input.h head/sys/netinet/sctp_os_bsd.h head/sys/netinet/sctp_output.c head/sys/netinet/sctp_output.h head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_pcb.h 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 Thu Jun 28 15:38:14 2012 (r237714) +++ head/sys/netinet/sctp_asconf.c Thu Jun 28 16:01:08 2012 (r237715) @@ -50,59 +50,8 @@ __FBSDID("$FreeBSD$"); */ -static void -sctp_asconf_get_source_ip(struct mbuf *m, struct sockaddr *sa) -{ - struct ip *iph; - -#ifdef INET - struct sockaddr_in *sin; - -#endif -#ifdef INET6 - struct sockaddr_in6 *sin6; - -#endif - - iph = mtod(m, struct ip *); - switch (iph->ip_v) { -#ifdef INET - case IPVERSION: - { - /* IPv4 source */ - sin = (struct sockaddr_in *)sa; - bzero(sin, sizeof(*sin)); - sin->sin_family = AF_INET; - sin->sin_len = sizeof(struct sockaddr_in); - sin->sin_port = 0; - sin->sin_addr.s_addr = iph->ip_src.s_addr; - break; - } -#endif -#ifdef INET6 - case (IPV6_VERSION >> 4): - { - /* IPv6 source */ - struct ip6_hdr *ip6; - - sin6 = (struct sockaddr_in6 *)sa; - bzero(sin6, sizeof(*sin6)); - sin6->sin6_family = AF_INET6; - sin6->sin6_len = sizeof(struct sockaddr_in6); - sin6->sin6_port = 0; - ip6 = mtod(m, struct ip6_hdr *); - sin6->sin6_addr = ip6->ip6_src; - break; - } -#endif /* INET6 */ - default: - break; - } - return; -} - /* - * draft-ietf-tsvwg-addip-sctp + * RFC 5061 * * An ASCONF parameter queue exists per asoc which holds the pending address * operations. Lists are updated upon receipt of ASCONF-ACK. @@ -194,12 +143,12 @@ sctp_asconf_error_response(uint32_t id, } static struct mbuf * -sctp_process_asconf_add_ip(struct mbuf *m, struct sctp_asconf_paramhdr *aph, +sctp_process_asconf_add_ip(struct sockaddr *src, struct sctp_asconf_paramhdr *aph, struct sctp_tcb *stcb, int send_hb, int response_required) { struct sctp_nets *net; struct mbuf *m_reply = NULL; - struct sockaddr_storage sa_source, sa_store; + struct sockaddr_storage sa_store; struct sctp_paramhdr *ph; uint16_t param_type, param_length, aparam_length; struct sockaddr *sa; @@ -279,11 +228,10 @@ sctp_process_asconf_add_ip(struct mbuf * /* if 0.0.0.0/::0, add the source address instead */ if (zero_address && SCTP_BASE_SYSCTL(sctp_nat_friendly)) { - sa = (struct sockaddr *)&sa_source; - sctp_asconf_get_source_ip(m, sa); + sa = src; SCTPDBG(SCTP_DEBUG_ASCONF1, "process_asconf_add_ip: using source addr "); - SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, sa); + SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, src); } /* add the address */ if (bad_address) { @@ -343,11 +291,12 @@ sctp_asconf_del_remote_addrs_except(stru } static struct mbuf * -sctp_process_asconf_delete_ip(struct mbuf *m, struct sctp_asconf_paramhdr *aph, +sctp_process_asconf_delete_ip(struct sockaddr *src, + struct sctp_asconf_paramhdr *aph, struct sctp_tcb *stcb, int response_required) { struct mbuf *m_reply = NULL; - struct sockaddr_storage sa_source, sa_store; + struct sockaddr_storage sa_store; struct sctp_paramhdr *ph; uint16_t param_type, param_length, aparam_length; struct sockaddr *sa; @@ -365,9 +314,6 @@ sctp_process_asconf_delete_ip(struct mbu #endif - /* get the source IP address for src and 0.0.0.0/::0 delete checks */ - sctp_asconf_get_source_ip(m, (struct sockaddr *)&sa_source); - aparam_length = ntohs(aph->ph.param_length); ph = (struct sctp_paramhdr *)(aph + 1); param_type = ntohs(ph->param_type); @@ -424,7 +370,7 @@ sctp_process_asconf_delete_ip(struct mbu } /* make sure the source address is not being deleted */ - if (sctp_cmpaddr(sa, (struct sockaddr *)&sa_source)) { + if (sctp_cmpaddr(sa, src)) { /* trying to delete the source address! */ SCTPDBG(SCTP_DEBUG_ASCONF1, "process_asconf_delete_ip: tried to delete source addr\n"); m_reply = sctp_asconf_error_response(aph->correlation_id, @@ -434,8 +380,7 @@ sctp_process_asconf_delete_ip(struct mbu } /* if deleting 0.0.0.0/::0, delete all addresses except src addr */ if (zero_address && SCTP_BASE_SYSCTL(sctp_nat_friendly)) { - result = sctp_asconf_del_remote_addrs_except(stcb, - (struct sockaddr *)&sa_source); + result = sctp_asconf_del_remote_addrs_except(stcb, src); if (result) { /* src address did not exist? */ @@ -475,12 +420,12 @@ sctp_process_asconf_delete_ip(struct mbu } static struct mbuf * -sctp_process_asconf_set_primary(struct mbuf *m, +sctp_process_asconf_set_primary(struct sockaddr *src, struct sctp_asconf_paramhdr *aph, struct sctp_tcb *stcb, int response_required) { struct mbuf *m_reply = NULL; - struct sockaddr_storage sa_source, sa_store; + struct sockaddr_storage sa_store; struct sctp_paramhdr *ph; uint16_t param_type, param_length, aparam_length; struct sockaddr *sa; @@ -550,11 +495,10 @@ sctp_process_asconf_set_primary(struct m /* if 0.0.0.0/::0, use the source address instead */ if (zero_address && SCTP_BASE_SYSCTL(sctp_nat_friendly)) { - sa = (struct sockaddr *)&sa_source; - sctp_asconf_get_source_ip(m, sa); + sa = src; SCTPDBG(SCTP_DEBUG_ASCONF1, "process_asconf_set_primary: using source addr "); - SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, sa); + SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, src); } /* set the primary address */ if (sctp_set_primary_addr(stcb, sa, NULL) == 0) { @@ -626,6 +570,7 @@ sctp_process_asconf_set_primary(struct m */ void sctp_handle_asconf(struct mbuf *m, unsigned int offset, + struct sockaddr *src, struct sctp_asconf_chunk *cp, struct sctp_tcb *stcb, int first) { @@ -762,13 +707,13 @@ sctp_handle_asconf(struct mbuf *m, unsig switch (param_type) { case SCTP_ADD_IP_ADDRESS: asoc->peer_supports_asconf = 1; - m_result = sctp_process_asconf_add_ip(m, aph, stcb, + m_result = sctp_process_asconf_add_ip(src, aph, stcb, (cnt < SCTP_BASE_SYSCTL(sctp_hb_maxburst)), error); cnt++; break; case SCTP_DEL_IP_ADDRESS: asoc->peer_supports_asconf = 1; - m_result = sctp_process_asconf_delete_ip(m, aph, stcb, + m_result = sctp_process_asconf_delete_ip(src, aph, stcb, error); break; case SCTP_ERROR_CAUSE_IND: @@ -776,7 +721,7 @@ sctp_handle_asconf(struct mbuf *m, unsig break; case SCTP_SET_PRIM_ADDR: asoc->peer_supports_asconf = 1; - m_result = sctp_process_asconf_set_primary(m, aph, + m_result = sctp_process_asconf_set_primary(src, aph, stcb, error); break; case SCTP_NAT_VTAGS: @@ -856,11 +801,7 @@ send_reply: * this could happen if the source address was just newly * added */ - struct sockaddr_storage addr; - struct sockaddr *src = (struct sockaddr *)&addr; - SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf: looking up net for IP source address\n"); - sctp_asconf_get_source_ip(m, src); SCTPDBG(SCTP_DEBUG_ASCONF1, "Looking for IP source: "); SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, src); /* look up the from address */ Modified: head/sys/netinet/sctp_asconf.h ============================================================================== --- head/sys/netinet/sctp_asconf.h Thu Jun 28 15:38:14 2012 (r237714) +++ head/sys/netinet/sctp_asconf.h Thu Jun 28 16:01:08 2012 (r237715) @@ -46,8 +46,8 @@ extern void sctp_asconf_cleanup(struct s extern struct mbuf *sctp_compose_asconf(struct sctp_tcb *, int *, int); extern void -sctp_handle_asconf(struct mbuf *, unsigned int, struct sctp_asconf_chunk *, - struct sctp_tcb *, int i); +sctp_handle_asconf(struct mbuf *, unsigned int, struct sockaddr *, + struct sctp_asconf_chunk *, struct sctp_tcb *, int); extern void sctp_handle_asconf_ack(struct mbuf *, int, struct sctp_asconf_ack_chunk *, Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Thu Jun 28 15:38:14 2012 (r237714) +++ head/sys/netinet/sctp_indata.c Thu Jun 28 16:01:08 2012 (r237715) @@ -2516,6 +2516,7 @@ doit_again: int sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length, + struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net, uint32_t * high_tsn, uint8_t use_mflowid, uint32_t mflowid, @@ -2626,8 +2627,8 @@ sctp_process_data(struct mbuf **mm, int } stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_19; - sctp_abort_association(inp, stcb, m, iphlen, sh, - op_err, + sctp_abort_association(inp, stcb, m, iphlen, + src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, port); return (2); @@ -2695,6 +2696,7 @@ sctp_process_data(struct mbuf **mm, int op_err = sctp_generate_invmanparam(SCTP_CAUSE_PROTOCOL_VIOLATION); sctp_abort_association(inp, stcb, m, iphlen, + src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, port); Modified: head/sys/netinet/sctp_indata.h ============================================================================== --- head/sys/netinet/sctp_indata.h Thu Jun 28 15:38:14 2012 (r237714) +++ head/sys/netinet/sctp_indata.h Thu Jun 28 16:01:08 2012 (r237715) @@ -111,7 +111,9 @@ void sctp_update_acked(struct sctp_tcb *, struct sctp_shutdown_chunk *, int *); int -sctp_process_data(struct mbuf **, int, int *, int, struct sctphdr *, +sctp_process_data(struct mbuf **, int, int *, int, + struct sockaddr *src, struct sockaddr *dst, + struct sctphdr *, struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *, uint32_t *, uint8_t, uint32_t, Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Thu Jun 28 15:38:14 2012 (r237714) +++ head/sys/netinet/sctp_input.c Thu Jun 28 16:01:08 2012 (r237715) @@ -80,7 +80,8 @@ sctp_stop_all_cookie_timers(struct sctp_ /* INIT handler */ static void -sctp_handle_init(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh, +sctp_handle_init(struct mbuf *m, int iphlen, int offset, + struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_init_chunk *cp, struct sctp_inpcb *inp, struct sctp_tcb *stcb, int *abort_no_unlock, uint8_t use_mflowid, uint32_t mflowid, @@ -97,7 +98,7 @@ sctp_handle_init(struct mbuf *m, int iph /* validate length */ if (ntohs(cp->ch.chunk_length) < sizeof(struct sctp_init_chunk)) { op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM); - sctp_abort_association(inp, stcb, m, iphlen, sh, op_err, + sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, port); if (stcb) @@ -109,7 +110,7 @@ sctp_handle_init(struct mbuf *m, int iph if (init->initiate_tag == 0) { /* protocol error... send abort */ op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM); - sctp_abort_association(inp, stcb, m, iphlen, sh, op_err, + sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, port); if (stcb) @@ -119,7 +120,7 @@ sctp_handle_init(struct mbuf *m, int iph if (ntohl(init->a_rwnd) < SCTP_MIN_RWND) { /* invalid parameter... send abort */ op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM); - sctp_abort_association(inp, stcb, m, iphlen, sh, op_err, + sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, port); if (stcb) @@ -129,7 +130,7 @@ sctp_handle_init(struct mbuf *m, int iph if (init->num_inbound_streams == 0) { /* protocol error... send abort */ op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM); - sctp_abort_association(inp, stcb, m, iphlen, sh, op_err, + sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, port); if (stcb) @@ -139,7 +140,7 @@ sctp_handle_init(struct mbuf *m, int iph if (init->num_outbound_streams == 0) { /* protocol error... send abort */ op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM); - sctp_abort_association(inp, stcb, m, iphlen, sh, op_err, + sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, port); if (stcb) @@ -149,7 +150,7 @@ sctp_handle_init(struct mbuf *m, int iph if (sctp_validate_init_auth_params(m, offset + sizeof(*cp), offset + ntohs(cp->ch.chunk_length))) { /* auth parameter(s) error... send abort */ - sctp_abort_association(inp, stcb, m, iphlen, sh, NULL, + sctp_abort_association(inp, stcb, m, iphlen, src, dst, sh, NULL, use_mflowid, mflowid, vrf_id, port); if (stcb) @@ -178,7 +179,7 @@ sctp_handle_init(struct mbuf *m, int iph * state :-) */ if (SCTP_BASE_SYSCTL(sctp_blackhole) == 0) { - sctp_send_abort(m, iphlen, sh, 0, NULL, + sctp_send_abort(m, iphlen, src, dst, sh, 0, NULL, use_mflowid, mflowid, vrf_id, port); } @@ -191,7 +192,8 @@ sctp_handle_init(struct mbuf *m, int iph sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_CONTROL_PROC, SCTP_SO_NOT_LOCKED); } else { SCTPDBG(SCTP_DEBUG_INPUT3, "sctp_handle_init: sending INIT-ACK\n"); - sctp_send_initiate_ack(inp, stcb, m, iphlen, offset, sh, cp, + sctp_send_initiate_ack(inp, stcb, m, iphlen, offset, src, dst, + sh, cp, use_mflowid, mflowid, vrf_id, port, ((stcb == NULL) ? SCTP_HOLDS_LOCK : SCTP_NOT_LOCKED)); @@ -419,7 +421,8 @@ sctp_process_init(struct sctp_init_chunk * INIT-ACK message processing/consumption returns value < 0 on error */ static int -sctp_process_init_ack(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh, +sctp_process_init_ack(struct mbuf *m, int iphlen, int offset, + struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_init_ack_chunk *cp, struct sctp_tcb *stcb, struct sctp_nets *net, int *abort_no_unlock, uint8_t use_mflowid, uint32_t mflowid, @@ -454,13 +457,14 @@ sctp_process_init_ack(struct mbuf *m, in initack_limit = offset + ntohs(cp->ch.chunk_length); /* load all addresses */ if ((retval = sctp_load_addresses_from_init(stcb, m, - (offset + sizeof(struct sctp_init_chunk)), initack_limit, sh, - NULL))) { + (offset + sizeof(struct sctp_init_chunk)), initack_limit, + src, dst, NULL))) { /* Huh, we should abort */ SCTPDBG(SCTP_DEBUG_INPUT1, "Load addresses from INIT causes an abort %d\n", retval); - sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen, sh, NULL, + sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen, + src, dst, sh, NULL, use_mflowid, mflowid, vrf_id, net->port); *abort_no_unlock = 1; @@ -536,7 +540,7 @@ sctp_process_init_ack(struct mbuf *m, in mp->resv = 0; } sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen, - sh, op_err, + src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, net->port); *abort_no_unlock = 1; @@ -1278,7 +1282,8 @@ sctp_handle_error(struct sctp_chunkhdr * } static int -sctp_handle_init_ack(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh, +sctp_handle_init_ack(struct mbuf *m, int iphlen, int offset, + struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_init_ack_chunk *cp, struct sctp_tcb *stcb, struct sctp_nets *net, int *abort_no_unlock, uint8_t use_mflowid, uint32_t mflowid, @@ -1298,8 +1303,8 @@ sctp_handle_init_ack(struct mbuf *m, int if (ntohs(cp->ch.chunk_length) < sizeof(struct sctp_init_ack_chunk)) { /* Invalid length */ op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM); - sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen, sh, - op_err, + sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen, + src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, net->port); *abort_no_unlock = 1; @@ -1310,8 +1315,8 @@ sctp_handle_init_ack(struct mbuf *m, int if (init_ack->initiate_tag == 0) { /* protocol error... send an abort */ op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM); - sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen, sh, - op_err, + sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen, + src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, net->port); *abort_no_unlock = 1; @@ -1320,8 +1325,8 @@ sctp_handle_init_ack(struct mbuf *m, int if (ntohl(init_ack->a_rwnd) < SCTP_MIN_RWND) { /* protocol error... send an abort */ op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM); - sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen, sh, - op_err, + sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen, + src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, net->port); *abort_no_unlock = 1; @@ -1330,8 +1335,8 @@ sctp_handle_init_ack(struct mbuf *m, int if (init_ack->num_inbound_streams == 0) { /* protocol error... send an abort */ op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM); - sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen, sh, - op_err, + sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen, + src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, net->port); *abort_no_unlock = 1; @@ -1340,8 +1345,8 @@ sctp_handle_init_ack(struct mbuf *m, int if (init_ack->num_outbound_streams == 0) { /* protocol error... send an abort */ op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM); - sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen, sh, - op_err, + sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen, + src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, net->port); *abort_no_unlock = 1; @@ -1365,7 +1370,7 @@ sctp_handle_init_ack(struct mbuf *m, int sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_CONFIRMED, stcb, 0, (void *)stcb->asoc.primary_destination, SCTP_SO_NOT_LOCKED); } - if (sctp_process_init_ack(m, iphlen, offset, sh, cp, stcb, + if (sctp_process_init_ack(m, iphlen, offset, src, dst, sh, cp, stcb, net, abort_no_unlock, use_mflowid, mflowid, vrf_id) < 0) { @@ -1419,6 +1424,7 @@ sctp_handle_init_ack(struct mbuf *m, int static struct sctp_tcb * sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset, + struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_state_cookie *cookie, int cookie_len, struct sctp_inpcb *inp, struct sctp_nets **netp, struct sockaddr *init_src, int *notification, @@ -1435,6 +1441,7 @@ sctp_process_cookie_new(struct mbuf *m, */ static struct sctp_tcb * sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, + struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_state_cookie *cookie, int cookie_len, struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets **netp, struct sockaddr *init_src, int *notification, @@ -1477,7 +1484,7 @@ sctp_process_cookie_existing(struct mbuf ph = mtod(op_err, struct sctp_paramhdr *); ph->param_type = htons(SCTP_CAUSE_COOKIE_IN_SHUTDOWN); ph->param_length = htons(sizeof(struct sctp_paramhdr)); - sctp_send_operr_to(m, sh, cookie->peers_vtag, op_err, + sctp_send_operr_to(src, dst, sh, cookie->peers_vtag, op_err, use_mflowid, mflowid, vrf_id, net->port); if (how_indx < sizeof(asoc->cookie_how)) @@ -1642,7 +1649,7 @@ sctp_process_cookie_existing(struct mbuf */ if (sctp_load_addresses_from_init(stcb, m, init_offset + sizeof(struct sctp_init_chunk), - initack_offset, sh, init_src)) { + initack_offset, src, dst, init_src)) { if (how_indx < sizeof(asoc->cookie_how)) asoc->cookie_how[how_indx] = 4; return (NULL); @@ -1703,7 +1710,7 @@ sctp_process_cookie_existing(struct mbuf ph = mtod(op_err, struct sctp_paramhdr *); ph->param_type = htons(SCTP_CAUSE_NAT_COLLIDING_STATE); ph->param_length = htons(sizeof(struct sctp_paramhdr)); - sctp_send_abort(m, iphlen, sh, 0, op_err, + sctp_send_abort(m, iphlen, src, dst, sh, 0, op_err, use_mflowid, mflowid, vrf_id, port); return (NULL); @@ -1786,7 +1793,7 @@ sctp_process_cookie_existing(struct mbuf } if (sctp_load_addresses_from_init(stcb, m, init_offset + sizeof(struct sctp_init_chunk), - initack_offset, sh, init_src)) { + initack_offset, src, dst, init_src)) { if (how_indx < sizeof(asoc->cookie_how)) asoc->cookie_how[how_indx] = 10; return (NULL); @@ -1867,7 +1874,8 @@ sctp_process_cookie_existing(struct mbuf * cookie_new code since we are allowing a duplicate * association. I hope this works... */ - return (sctp_process_cookie_new(m, iphlen, offset, sh, cookie, cookie_len, + return (sctp_process_cookie_new(m, iphlen, offset, src, dst, + sh, cookie, cookie_len, inp, netp, init_src, notification, auth_skipped, auth_offset, auth_len, use_mflowid, mflowid, @@ -1972,7 +1980,7 @@ sctp_process_cookie_existing(struct mbuf if (sctp_load_addresses_from_init(stcb, m, init_offset + sizeof(struct sctp_init_chunk), - initack_offset, sh, init_src)) { + initack_offset, src, dst, init_src)) { if (how_indx < sizeof(asoc->cookie_how)) asoc->cookie_how[how_indx] = 14; @@ -2003,6 +2011,7 @@ sctp_process_cookie_existing(struct mbuf */ static struct sctp_tcb * sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset, + struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_state_cookie *cookie, int cookie_len, struct sctp_inpcb *inp, struct sctp_nets **netp, struct sockaddr *init_src, int *notification, @@ -2102,7 +2111,7 @@ sctp_process_cookie_new(struct mbuf *m, op_err = sctp_generate_invmanparam(SCTP_CAUSE_OUT_OF_RESC); sctp_abort_association(inp, (struct sctp_tcb *)NULL, m, iphlen, - sh, op_err, + src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, port); return (NULL); @@ -2130,7 +2139,7 @@ sctp_process_cookie_new(struct mbuf *m, atomic_add_int(&stcb->asoc.refcnt, 1); op_err = sctp_generate_invmanparam(SCTP_CAUSE_OUT_OF_RESC); sctp_abort_association(inp, (struct sctp_tcb *)NULL, m, iphlen, - sh, op_err, + src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, port); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) @@ -2179,8 +2188,8 @@ sctp_process_cookie_new(struct mbuf *m, } /* load all addresses */ if (sctp_load_addresses_from_init(stcb, m, - init_offset + sizeof(struct sctp_init_chunk), initack_offset, sh, - init_src)) { + init_offset + sizeof(struct sctp_init_chunk), initack_offset, + src, dst, init_src)) { atomic_add_int(&stcb->asoc.refcnt, 1); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_TCB_UNLOCK(stcb); @@ -2376,6 +2385,7 @@ sctp_process_cookie_new(struct mbuf *m, */ static struct mbuf * sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, + struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_cookie_echo_chunk *cp, struct sctp_inpcb **inp_p, struct sctp_tcb **stcb, struct sctp_nets **netp, int auth_skipped, uint32_t auth_offset, uint32_t auth_len, @@ -2396,9 +2406,6 @@ sctp_handle_cookie_echo(struct mbuf *m, unsigned int cookie_len; struct timeval now; struct timeval time_expires; - struct sockaddr_storage dest_store; - struct sockaddr *localep_sa = (struct sockaddr *)&dest_store; - struct ip *iph; int notification = 0; struct sctp_nets *netl; int had_a_existing_tcb = 0; @@ -2419,45 +2426,6 @@ sctp_handle_cookie_echo(struct mbuf *m, if (inp_p == NULL) { return (NULL); } - /* First get the destination address setup too. */ - iph = mtod(m, struct ip *); - switch (iph->ip_v) { -#ifdef INET - case IPVERSION: - { - /* its IPv4 */ - struct sockaddr_in *lsin; - - lsin = (struct sockaddr_in *)(localep_sa); - memset(lsin, 0, sizeof(*lsin)); - lsin->sin_family = AF_INET; - lsin->sin_len = sizeof(*lsin); - lsin->sin_port = sh->dest_port; - lsin->sin_addr.s_addr = iph->ip_dst.s_addr; - break; - } -#endif -#ifdef INET6 - case IPV6_VERSION >> 4: - { - /* its IPv6 */ - struct ip6_hdr *ip6; - struct sockaddr_in6 *lsin6; - - lsin6 = (struct sockaddr_in6 *)(localep_sa); - memset(lsin6, 0, sizeof(*lsin6)); - lsin6->sin6_family = AF_INET6; - lsin6->sin6_len = sizeof(struct sockaddr_in6); - ip6 = mtod(m, struct ip6_hdr *); - lsin6->sin6_port = sh->dest_port; - lsin6->sin6_addr = ip6->ip6_dst; - break; - } -#endif - default: - return (NULL); - } - cookie = &cp->cookie; cookie_offset = offset + sizeof(struct sctp_chunkhdr); cookie_len = ntohs(cp->ch.chunk_length); @@ -2608,7 +2576,7 @@ sctp_handle_cookie_echo(struct mbuf *m, if (tim == 0) tim = now.tv_usec - cookie->time_entered.tv_usec; scm->time_usec = htonl(tim); - sctp_send_operr_to(m, sh, cookie->peers_vtag, op_err, + sctp_send_operr_to(src, dst, sh, cookie->peers_vtag, op_err, use_mflowid, mflowid, vrf_id, port); return (NULL); @@ -2652,7 +2620,7 @@ sctp_handle_cookie_echo(struct mbuf *m, } if ((*stcb == NULL) && to) { /* Yep, lets check */ - *stcb = sctp_findassociation_ep_addr(inp_p, to, netp, localep_sa, NULL); + *stcb = sctp_findassociation_ep_addr(inp_p, to, netp, dst, NULL); if (*stcb == NULL) { /* * We should have only got back the same inp. If we @@ -2695,15 +2663,17 @@ sctp_handle_cookie_echo(struct mbuf *m, cookie_len -= SCTP_SIGNATURE_SIZE; if (*stcb == NULL) { /* this is the "normal" case... get a new TCB */ - *stcb = sctp_process_cookie_new(m, iphlen, offset, sh, cookie, - cookie_len, *inp_p, netp, to, ¬ification, + *stcb = sctp_process_cookie_new(m, iphlen, offset, src, dst, sh, + cookie, cookie_len, *inp_p, + netp, to, ¬ification, auth_skipped, auth_offset, auth_len, use_mflowid, mflowid, vrf_id, port); } else { /* this is abnormal... cookie-echo on existing TCB */ had_a_existing_tcb = 1; - *stcb = sctp_process_cookie_existing(m, iphlen, offset, sh, + *stcb = sctp_process_cookie_existing(m, iphlen, offset, + src, dst, sh, cookie, cookie_len, *inp_p, *stcb, netp, to, ¬ification, auth_skipped, auth_offset, auth_len, use_mflowid, mflowid, @@ -2788,7 +2758,7 @@ sctp_handle_cookie_echo(struct mbuf *m, SCTPDBG(SCTP_DEBUG_INPUT1, "process_cookie_new: no room for another socket!\n"); op_err = sctp_generate_invmanparam(SCTP_CAUSE_OUT_OF_RESC); sctp_abort_association(*inp_p, NULL, m, iphlen, - sh, op_err, + src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, port); #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) @@ -4404,6 +4374,7 @@ __attribute__((noinline)) #endif static struct sctp_tcb * sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, + struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_chunkhdr *ch, struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets **netp, int *fwd_tsn_seen, uint8_t use_mflowid, uint32_t mflowid, @@ -4520,7 +4491,9 @@ __attribute__((noinline)) if (asconf_len < sizeof(struct sctp_asconf_paramhdr)) break; stcb = sctp_findassociation_ep_asconf(m, - *offset, sh, &inp, netp, vrf_id); + *offset, + dst, + sh, &inp, netp, vrf_id); if (stcb != NULL) break; asconf_offset += SCTP_SIZE32(asconf_len); @@ -4562,7 +4535,7 @@ __attribute__((noinline)) } if (stcb == NULL) { /* no association, so it's out of the blue... */ - sctp_handle_ootb(m, iphlen, *offset, sh, inp, + sctp_handle_ootb(m, iphlen, *offset, src, dst, sh, inp, use_mflowid, mflowid, vrf_id, port); *offset = length; @@ -4600,7 +4573,8 @@ __attribute__((noinline)) if (locked_tcb) { SCTP_TCB_UNLOCK(locked_tcb); } - sctp_handle_ootb(m, iphlen, *offset, sh, inp, + sctp_handle_ootb(m, iphlen, *offset, src, dst, + sh, inp, use_mflowid, mflowid, vrf_id, port); return (NULL); @@ -4742,8 +4716,8 @@ process_control_chunks: /* The INIT chunk must be the only chunk. */ if ((num_chunks > 1) || (length - *offset > (int)SCTP_SIZE32(chk_length))) { - sctp_abort_association(inp, stcb, m, - iphlen, sh, NULL, + sctp_abort_association(inp, stcb, m, iphlen, + src, dst, sh, NULL, use_mflowid, mflowid, vrf_id, port); *offset = length; @@ -4754,14 +4728,14 @@ process_control_chunks: struct mbuf *op_err; op_err = sctp_generate_invmanparam(SCTP_CAUSE_OUT_OF_RESC); - sctp_abort_association(inp, stcb, m, - iphlen, sh, op_err, + sctp_abort_association(inp, stcb, m, iphlen, + src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, port); *offset = length; return (NULL); } - sctp_handle_init(m, iphlen, *offset, sh, + sctp_handle_init(m, iphlen, *offset, src, dst, sh, (struct sctp_init_chunk *)ch, inp, stcb, &abort_no_unlock, use_mflowid, mflowid, @@ -4813,7 +4787,8 @@ process_control_chunks: return (NULL); } if ((netp) && (*netp)) { - ret = sctp_handle_init_ack(m, iphlen, *offset, sh, + ret = sctp_handle_init_ack(m, iphlen, *offset, + src, dst, sh, (struct sctp_init_ack_chunk *)ch, stcb, *netp, &abort_no_unlock, @@ -5123,8 +5098,8 @@ process_control_chunks: struct mbuf *op_err; op_err = sctp_generate_invmanparam(SCTP_CAUSE_OUT_OF_RESC); - sctp_abort_association(inp, stcb, m, - iphlen, sh, op_err, + sctp_abort_association(inp, stcb, m, iphlen, + src, dst, sh, op_err, use_mflowid, mflowid, vrf_id, port); } @@ -5151,7 +5126,9 @@ process_control_chunks: if (netp) { ret_buf = sctp_handle_cookie_echo(m, iphlen, - *offset, sh, + *offset, + src, dst, + sh, (struct sctp_cookie_echo_chunk *)ch, &inp, &stcb, netp, auth_skipped, @@ -5314,7 +5291,7 @@ process_control_chunks: __LINE__); } stcb->asoc.overall_error_count = 0; - sctp_handle_asconf(m, *offset, + sctp_handle_asconf(m, *offset, src, (struct sctp_asconf_chunk *)ch, stcb, asconf_cnt == 0); asconf_cnt++; } @@ -5610,8 +5587,9 @@ __attribute__((noinline)) * common input chunk processing (v4 and v6) */ void -sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset, - int length, struct sctphdr *sh, struct sctp_chunkhdr *ch, +sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset, int length, + struct sockaddr *src, struct sockaddr *dst, + struct sctphdr *sh, struct sctp_chunkhdr *ch, struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net, uint8_t ecn_bits, uint8_t use_mflowid, uint32_t mflowid, @@ -5650,7 +5628,7 @@ sctp_common_input_processing(struct mbuf * NOT respond to any packet.. its OOTB. */ SCTP_TCB_UNLOCK(stcb); - sctp_handle_ootb(m, iphlen, offset, sh, inp, + sctp_handle_ootb(m, iphlen, offset, src, dst, sh, inp, use_mflowid, mflowid, vrf_id, port); goto out_now; @@ -5659,7 +5637,8 @@ sctp_common_input_processing(struct mbuf if (IS_SCTP_CONTROL(ch)) { /* process the control portion of the SCTP packet */ /* sa_ignore NO_NULL_CHK */ - stcb = sctp_process_control(m, iphlen, &offset, length, sh, ch, + stcb = sctp_process_control(m, iphlen, &offset, length, + src, dst, sh, ch, inp, stcb, &net, &fwd_tsn_seen, use_mflowid, mflowid, vrf_id, port); @@ -5697,7 +5676,7 @@ sctp_common_input_processing(struct mbuf } if (stcb == NULL) { /* out of the blue DATA chunk */ - sctp_handle_ootb(m, iphlen, offset, sh, inp, + sctp_handle_ootb(m, iphlen, offset, src, dst, sh, inp, use_mflowid, mflowid, vrf_id, port); goto out_now; @@ -5767,7 +5746,7 @@ sctp_common_input_processing(struct mbuf /* * We consider OOTB any data sent during asoc setup. */ - sctp_handle_ootb(m, iphlen, offset, sh, inp, + sctp_handle_ootb(m, iphlen, offset, src, dst, sh, inp, use_mflowid, mflowid, vrf_id, port); SCTP_TCB_UNLOCK(stcb); @@ -5788,7 +5767,8 @@ sctp_common_input_processing(struct mbuf break; } /* plow through the data chunks while length > offset */ - retval = sctp_process_data(mm, iphlen, &offset, length, sh, + retval = sctp_process_data(mm, iphlen, &offset, length, + src, dst, sh, inp, stcb, net, &high_tsn, use_mflowid, mflowid, vrf_id, port); @@ -5883,6 +5863,7 @@ sctp_input_with_port(struct mbuf *i_pak, int iphlen; uint32_t vrf_id = 0; uint8_t ecn_bits; + struct sockaddr_in src, dst; struct ip *ip; struct sctphdr *sh; struct sctp_chunkhdr *ch; @@ -5932,18 +5913,27 @@ sctp_input_with_port(struct mbuf *i_pak, SCTP_STAT_INCR(sctps_recvpackets); SCTP_STAT_INCR_COUNTER64(sctps_inpackets); /* Get IP, SCTP, and first chunk header together in the first mbuf. */ - ip = mtod(m, struct ip *); offset = iphlen + sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr); if (SCTP_BUF_LEN(m) < offset) { - if ((m = m_pullup(m, offset)) == 0) { + if ((m = m_pullup(m, offset)) == NULL) { SCTP_STAT_INCR(sctps_hdrops); return; } - ip = mtod(m, struct ip *); } + ip = mtod(m, struct ip *); sh = (struct sctphdr *)((caddr_t)ip + iphlen); ch = (struct sctp_chunkhdr *)((caddr_t)sh + sizeof(struct sctphdr)); offset -= sizeof(struct sctp_chunkhdr); + memset(&src, 0, sizeof(struct sockaddr_in)); + src.sin_family = AF_INET; + src.sin_len = sizeof(struct sockaddr_in); + src.sin_port = sh->src_port; + src.sin_addr = ip->ip_src; + memset(&dst, 0, sizeof(struct sockaddr_in)); + dst.sin_family = AF_INET; + dst.sin_len = sizeof(struct sockaddr_in); + dst.sin_port = sh->dest_port; + dst.sin_addr = ip->ip_dst; length = ip->ip_len + iphlen; /* Validate mbuf chain length with IP payload length. */ if (SCTP_HEADER_LEN(i_pak) != length) { @@ -5953,10 +5943,10 @@ sctp_input_with_port(struct mbuf *i_pak, goto bad; } /* SCTP does not allow broadcasts or multicasts */ - if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) { + if (IN_MULTICAST(ntohl(dst.sin_addr.s_addr))) { goto bad; } - if (SCTP_IS_IT_BROADCAST(ip->ip_dst, m)) { + if (SCTP_IS_IT_BROADCAST(dst.sin_addr, m)) { goto bad; } SCTPDBG(SCTP_DEBUG_INPUT1, @@ -5982,6 +5972,8 @@ sctp_input_with_port(struct mbuf *i_pak, SCTPDBG(SCTP_DEBUG_INPUT1, "Bad CSUM on SCTP packet calc_check:%x check:%x m:%p mlen:%d iphlen:%d\n", calc_check, check, m, length, iphlen); stcb = sctp_findassociation_addr(m, offset, + (struct sockaddr *)&src, + (struct sockaddr *)&dst, sh, ch, &inp, &net, vrf_id); if ((net) && (port)) { if (net->port == 0) { @@ -6013,6 +6005,8 @@ sctp_skip_csum: goto bad; } stcb = sctp_findassociation_addr(m, offset, + (struct sockaddr *)&src, + (struct sockaddr *)&dst, sh, ch, &inp, &net, vrf_id); if ((net) && (port)) { if (net->port == 0) { @@ -6031,7 +6025,9 @@ sctp_skip_csum: if (badport_bandlim(BANDLIM_SCTP_OOTB) < 0) goto bad; if (ch->chunk_type == SCTP_SHUTDOWN_ACK) { - sctp_send_shutdown_complete2(m, sh, + sctp_send_shutdown_complete2((struct sockaddr *)&src, + (struct sockaddr *)&dst, + sh, use_mflowid, mflowid, vrf_id, port); goto bad; @@ -6043,7 +6039,10 @@ sctp_skip_csum: if ((SCTP_BASE_SYSCTL(sctp_blackhole) == 0) || ((SCTP_BASE_SYSCTL(sctp_blackhole) == 1) && (ch->chunk_type != SCTP_INIT))) { - sctp_send_abort(m, iphlen, sh, 0, NULL, + sctp_send_abort(m, iphlen, + (struct sockaddr *)&src, + (struct sockaddr *)&dst, + sh, 0, NULL, use_mflowid, mflowid, vrf_id, port); } @@ -6066,8 +6065,10 @@ sctp_skip_csum: ecn_bits = ip->ip_tos; /* sa_ignore NO_NULL_CHK */ - sctp_common_input_processing(&m, iphlen, offset, length, sh, ch, - inp, stcb, net, ecn_bits, + sctp_common_input_processing(&m, iphlen, offset, length, + (struct sockaddr *)&src, + (struct sockaddr *)&dst, + sh, ch, inp, stcb, net, ecn_bits, use_mflowid, mflowid, vrf_id, port); if (m) { @@ -6119,15 +6120,14 @@ sctp_input(struct mbuf *m, int off) * No flow id built by lower layers fix it so we * create one. */ - ip = mtod(m, struct ip *); - offset = off + sizeof(*sh); + offset = off + sizeof(struct sctphdr); if (SCTP_BUF_LEN(m) < offset) { - if ((m = m_pullup(m, offset)) == 0) { + if ((m = m_pullup(m, offset)) == NULL) { SCTP_STAT_INCR(sctps_hdrops); return; } - ip = mtod(m, struct ip *); } + ip = mtod(m, struct ip *); sh = (struct sctphdr *)((caddr_t)ip + off); tag = htonl(sh->v_tag); flowid = tag ^ ntohs(sh->dest_port) ^ ntohs(sh->src_port); Modified: head/sys/netinet/sctp_input.h ============================================================================== --- head/sys/netinet/sctp_input.h Thu Jun 28 15:38:14 2012 (r237714) +++ head/sys/netinet/sctp_input.h Thu Jun 28 16:01:08 2012 (r237715) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #if defined(_KERNEL) || defined(__Userspace__) void sctp_common_input_processing(struct mbuf **, int, int, int, + struct sockaddr *, struct sockaddr *, struct sctphdr *, struct sctp_chunkhdr *, struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *, uint8_t, Modified: head/sys/netinet/sctp_os_bsd.h ============================================================================== --- head/sys/netinet/sctp_os_bsd.h Thu Jun 28 15:38:14 2012 (r237714) +++ head/sys/netinet/sctp_os_bsd.h Thu Jun 28 16:01:08 2012 (r237715) @@ -177,18 +177,9 @@ MALLOC_DECLARE(SCTP_M_MCORE); } \ } while (0); \ } -#define SCTPDBG_PKT(level, iph, sh) \ -{ \ - do { \ - if (SCTP_BASE_SYSCTL(sctp_debug_on) & level) { \ - sctp_print_address_pkt(iph, sh); \ - } \ - } while (0); \ -} #else #define SCTPDBG(level, params...) #define SCTPDBG_ADDR(level, addr) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 16:44: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 5FA9D1065672; Thu, 28 Jun 2012 16:44:30 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A1718FC08; Thu, 28 Jun 2012 16:44: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 q5SGiUQf086829; Thu, 28 Jun 2012 16:44:30 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5SGiUQd086827; Thu, 28 Jun 2012 16:44:30 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201206281644.q5SGiUQd086827@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Thu, 28 Jun 2012 16:44: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: r237716 - head/cddl/contrib/opensolaris/lib/libdtrace/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, 28 Jun 2012 16:44:30 -0000 Author: pfg Date: Thu Jun 28 16:44:29 2012 New Revision: 237716 URL: http://svn.freebsd.org/changeset/base/237716 Log: Safer fix for building with Clang. error: format specifies type 'long long' but the argument has type 'int64_t' (aka 'long') Reported by: Ed Maste Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Thu Jun 28 16:01:08 2012 (r237715) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Thu Jun 28 16:44:29 2012 (r237716) @@ -761,7 +761,7 @@ dt_print_llquantize(dtrace_hdl_t *dtp, F step = next > nsteps ? next / nsteps : 1; if (first_bin == 0) { - (void) snprintf(c, sizeof (c), "< %ld", value); + (void) snprintf(c, sizeof (c), "< %lld", (long long)value); if (dt_printf(dtp, fp, "%16s ", c) < 0) return (-1); From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 17:15: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 4E18A106566C; Thu, 28 Jun 2012 17:15: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 391508FC12; Thu, 28 Jun 2012 17:15: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 q5SHFHX5088259; Thu, 28 Jun 2012 17:15:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5SHFHu4088257; Thu, 28 Jun 2012 17:15:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201206281715.q5SHFHu4088257@svn.freebsd.org> From: Alexander Motin Date: Thu, 28 Jun 2012 17:15: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: r237718 - head/sys/dev/drm2 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 28 Jun 2012 17:15:17 -0000 Author: mav Date: Thu Jun 28 17:15:16 2012 New Revision: 237718 URL: http://svn.freebsd.org/changeset/base/237718 Log: Fix millisecond to ticks conversion in drm_msleep(). On systems with HZ=100 it caused Intel eDP video output initialization (and Xorg startup) to take several minutes instead of several seconds. Reviewed by: kib MFC after: 3 days Modified: head/sys/dev/drm2/drmP.h Modified: head/sys/dev/drm2/drmP.h ============================================================================== --- head/sys/dev/drm2/drmP.h Thu Jun 28 16:54:10 2012 (r237717) +++ head/sys/dev/drm2/drmP.h Thu Jun 28 17:15:16 2012 (r237718) @@ -250,7 +250,7 @@ enum { #define msecs_to_jiffies(x) (((int64_t)(x)) * hz / 1000) #define time_after(a,b) ((long)(b) - (long)(a) < 0) #define time_after_eq(a,b) ((long)(b) - (long)(a) <= 0) -#define drm_msleep(x, msg) pause((msg), ((int64_t)(x)) * 1000 / hz) +#define drm_msleep(x, msg) pause((msg), ((int64_t)(x)) * hz / 1000) typedef vm_paddr_t dma_addr_t; typedef uint64_t u64; From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 19:39: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 A91A1106564A; Thu, 28 Jun 2012 19:39:31 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88E6E8FC0C; Thu, 28 Jun 2012 19:39: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 q5SJdV91094856; Thu, 28 Jun 2012 19:39:31 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5SJdVJn094850; Thu, 28 Jun 2012 19:39:31 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201206281939.q5SJdVJn094850@svn.freebsd.org> From: "Kenneth D. Merry" Date: Thu, 28 Jun 2012 19:39: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: r237726 - head/sys/cam/ctl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 28 Jun 2012 19:39:31 -0000 Author: ken Date: Thu Jun 28 19:39:30 2012 New Revision: 237726 URL: http://svn.freebsd.org/changeset/base/237726 Log: Add a loader tunable, kern.cam.ctl.disable, that will disable loading CTL. This may be useful in very low memory installations. MFC after: 3 days Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_backend.c head/sys/cam/ctl/ctl_frontend_cam_sim.c head/sys/cam/ctl/ctl_frontend_internal.c head/sys/cam/ctl/scsi_ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Thu Jun 28 19:34:23 2012 (r237725) +++ head/sys/cam/ctl/ctl.c Thu Jun 28 19:39:30 2012 (r237726) @@ -308,7 +308,6 @@ static struct scsi_control_page control_ /*aen_holdoff_period*/{0, 0} }; -SYSCTL_NODE(_kern_cam, OID_AUTO, ctl, CTLFLAG_RD, 0, "CAM Target Layer"); /* * XXX KDM move these into the softc. @@ -318,7 +317,12 @@ static int persis_offset; static uint8_t ctl_pause_rtr; static int ctl_is_single; static int index_to_aps_page; +int ctl_disable = 0; +SYSCTL_NODE(_kern_cam, OID_AUTO, ctl, CTLFLAG_RD, 0, "CAM Target Layer"); +SYSCTL_INT(_kern_cam_ctl, OID_AUTO, disable, CTLFLAG_RDTUN, &ctl_disable, 0, + "Disable CTL"); +TUNABLE_INT("kern.cam.ctl.disable", &ctl_disable); /* * Serial number (0x80), device id (0x83), and supported pages (0x00) @@ -949,6 +953,10 @@ ctl_init(void) ctl_pause_rtr = 0; rcv_sync_msg = 0; + /* If we're disabled, don't initialize. */ + if (ctl_disable != 0) + return; + control_softc = malloc(sizeof(*control_softc), M_DEVBUF, M_WAITOK); softc = control_softc; Modified: head/sys/cam/ctl/ctl_backend.c ============================================================================== --- head/sys/cam/ctl/ctl_backend.c Thu Jun 28 19:34:23 2012 (r237725) +++ head/sys/cam/ctl/ctl_backend.c Thu Jun 28 19:39:30 2012 (r237726) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include extern struct ctl_softc *control_softc; +extern int ctl_disable; int ctl_backend_register(struct ctl_backend_driver *be) @@ -71,6 +72,10 @@ ctl_backend_register(struct ctl_backend_ ctl_softc = control_softc; + /* Don't continue if CTL is disabled */ + if (ctl_disable != 0) + return (0); + mtx_lock(&ctl_softc->ctl_lock); /* * Sanity check, make sure this isn't a duplicate registration. Modified: head/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_cam_sim.c Thu Jun 28 19:34:23 2012 (r237725) +++ head/sys/cam/ctl/ctl_frontend_cam_sim.c Thu Jun 28 19:39:30 2012 (r237726) @@ -119,6 +119,7 @@ struct cfcs_softc cfcs_softc; * amount of SCSI sense data that we will report to CAM. */ static int cfcs_max_sense = sizeof(struct scsi_sense_data); +extern int ctl_disable; SYSINIT(cfcs_init, SI_SUB_CONFIGURE, SI_ORDER_FOURTH, cfcs_init, NULL); SYSCTL_NODE(_kern_cam, OID_AUTO, ctl2cam, CTLFLAG_RD, 0, @@ -138,6 +139,10 @@ cfcs_init(void) #endif int retval; + /* Don't continue if CTL is disabled */ + if (ctl_disable != 0) + return (0); + softc = &cfcs_softc; retval = 0; bzero(softc, sizeof(*softc)); Modified: head/sys/cam/ctl/ctl_frontend_internal.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_internal.c Thu Jun 28 19:34:23 2012 (r237725) +++ head/sys/cam/ctl/ctl_frontend_internal.c Thu Jun 28 19:39:30 2012 (r237726) @@ -187,6 +187,7 @@ struct cfi_softc { MALLOC_DEFINE(M_CTL_CFI, "ctlcfi", "CTL CFI"); static struct cfi_softc fetd_internal_softc; +extern int ctl_disable; void cfi_init(void); void cfi_shutdown(void) __unused; @@ -231,6 +232,10 @@ cfi_init(void) retval = 0; + /* If we're disabled, don't initialize */ + if (ctl_disable != 0) + return; + if (sizeof(struct cfi_lun_io) > CTL_PORT_PRIV_SIZE) { printf("%s: size of struct cfi_lun_io %zd > " "CTL_PORT_PRIV_SIZE %d\n", __func__, Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Thu Jun 28 19:34:23 2012 (r237725) +++ head/sys/cam/ctl/scsi_ctl.c Thu Jun 28 19:39:30 2012 (r237726) @@ -227,12 +227,17 @@ static struct periph_driver ctlfe_driver PERIPHDRIVER_DECLARE(ctl, ctlfe_driver); extern struct ctl_softc *control_softc; +extern int ctl_disable; int ctlfeinitialize(void) { cam_status status; + /* Don't initialize if we're disabled */ + if (ctl_disable != 0) + return (0); + STAILQ_INIT(&ctlfe_softc_list); mtx_init(&ctlfe_list_mtx, ctlfe_mtx_desc, NULL, MTX_DEF); @@ -263,6 +268,10 @@ ctlfeinit(void) { cam_status status; + /* Don't initialize if we're disabled */ + if (ctl_disable != 0) + return; + STAILQ_INIT(&ctlfe_softc_list); mtx_init(&ctlfe_list_mtx, ctlfe_mtx_desc, NULL, MTX_DEF); From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 20:10: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 284D61065675; Thu, 28 Jun 2012 20:10:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 136628FC1D; Thu, 28 Jun 2012 20:10: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 q5SKAh3x096247; Thu, 28 Jun 2012 20:10:43 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5SKAhTN096244; Thu, 28 Jun 2012 20:10:43 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201206282010.q5SKAhTN096244@svn.freebsd.org> From: Ed Maste Date: Thu, 28 Jun 2012 20:10: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: r237729 - head/tools/tools/netmap X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 28 Jun 2012 20:10:44 -0000 Author: emaste Date: Thu Jun 28 20:10:43 2012 New Revision: 237729 URL: http://svn.freebsd.org/changeset/base/237729 Log: Fix ioctl type for compiling with clang Modified: head/tools/tools/netmap/bridge.c head/tools/tools/netmap/pcap.c Modified: head/tools/tools/netmap/bridge.c ============================================================================== --- head/tools/tools/netmap/bridge.c Thu Jun 28 19:55:46 2012 (r237728) +++ head/tools/tools/netmap/bridge.c Thu Jun 28 20:10:43 2012 (r237729) @@ -79,7 +79,7 @@ sigint_h(__unused int sig) static int -do_ioctl(struct my_ring *me, int what) +do_ioctl(struct my_ring *me, unsigned long what) { struct ifreq ifr; int error; @@ -98,7 +98,7 @@ do_ioctl(struct my_ring *me, int what) } error = ioctl(me->fd, what, &ifr); if (error) { - D("ioctl error %d", what); + D("ioctl error 0x%lx", what); return error; } switch (what) { Modified: head/tools/tools/netmap/pcap.c ============================================================================== --- head/tools/tools/netmap/pcap.c Thu Jun 28 19:55:46 2012 (r237728) +++ head/tools/tools/netmap/pcap.c Thu Jun 28 20:10:43 2012 (r237729) @@ -201,7 +201,7 @@ struct my_ring { static int -do_ioctl(struct my_ring *me, int what) +do_ioctl(struct my_ring *me, unsigned long what) { struct ifreq ifr; int error; @@ -221,7 +221,7 @@ do_ioctl(struct my_ring *me, int what) } error = ioctl(me->fd, what, &ifr); if (error) { - D("ioctl 0x%x error %d", what, error); + D("ioctl 0x%lx error %d", what, error); return error; } switch (what) { From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 20:48: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 3BB0B106564A; Thu, 28 Jun 2012 20:48:25 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 269A48FC15; Thu, 28 Jun 2012 20:48: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 q5SKmP9t097817; Thu, 28 Jun 2012 20:48:25 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5SKmOON097814; Thu, 28 Jun 2012 20:48:24 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201206282048.q5SKmOON097814@svn.freebsd.org> From: "Kenneth D. Merry" Date: Thu, 28 Jun 2012 20:48: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: r237730 - in head/sys: powerpc/conf sparc64/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, 28 Jun 2012 20:48:25 -0000 Author: ken Date: Thu Jun 28 20:48:24 2012 New Revision: 237730 URL: http://svn.freebsd.org/changeset/base/237730 Log: Now that the mps(4) driver is endian-safe, add it to the powerpc and sparc64 GENERIC config files. MFC after: 3 days Modified: head/sys/powerpc/conf/GENERIC64 head/sys/sparc64/conf/GENERIC Modified: head/sys/powerpc/conf/GENERIC64 ============================================================================== --- head/sys/powerpc/conf/GENERIC64 Thu Jun 28 20:10:43 2012 (r237729) +++ head/sys/powerpc/conf/GENERIC64 Thu Jun 28 20:48:24 2012 (r237730) @@ -102,6 +102,7 @@ options AHC_REG_PRETTY_PRINT # Print re device isp # Qlogic family device ispfw # Firmware module for Qlogic host adapters device mpt # LSI-Logic MPT-Fusion +device mps # LSI-Logic MPT-Fusion 2 device sym # NCR/Symbios/LSI Logic 53C8XX/53C1010/53C1510D # ATA/SCSI peripherals Modified: head/sys/sparc64/conf/GENERIC ============================================================================== --- head/sys/sparc64/conf/GENERIC Thu Jun 28 20:10:43 2012 (r237729) +++ head/sys/sparc64/conf/GENERIC Thu Jun 28 20:48:24 2012 (r237730) @@ -109,6 +109,7 @@ device esp # AMD Am53C974, Sun ESP and device isp # Qlogic family device ispfw # Firmware module for Qlogic host adapters device mpt # LSI-Logic MPT-Fusion +device mps # LSI-Logic MPT-Fusion 2 device sym # NCR/Symbios/LSI Logic 53C8XX/53C1010/53C1510D # ATA/SCSI peripherals From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 21:36: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 E54EB106566C; Thu, 28 Jun 2012 21:36:42 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vps.rulingia.com (host-122-100-2-194.octopus.com.au [122.100.2.194]) by mx1.freebsd.org (Postfix) with ESMTP id 728D48FC14; Thu, 28 Jun 2012 21:36:41 +0000 (UTC) Received: from server.rulingia.com (c220-239-248-69.belrs5.nsw.optusnet.com.au [220.239.248.69]) by vps.rulingia.com (8.14.5/8.14.5) with ESMTP id q5SLaYg0081317 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 29 Jun 2012 07:36:34 +1000 (EST) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.14.5/8.14.5) with ESMTP id q5SLaRsJ023285 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 29 Jun 2012 07:36:27 +1000 (EST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.14.5/8.14.5/Submit) id q5SLaQN8023284; Fri, 29 Jun 2012 07:36:26 +1000 (EST) (envelope-from peter) Date: Fri, 29 Jun 2012 07:36:26 +1000 From: Peter Jeremy To: Jung-uk Kim Message-ID: <20120628213626.GA23256@server.rulingia.com> References: <201204162122.q3GLM23E051048@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9jxsPFA5p3P2qPhR" Content-Disposition: inline In-Reply-To: <201204162122.q3GLM23E051048@svn.freebsd.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp 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: r234352 - in head/sys: amd64/linux32 compat/linux i386/linux kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2012 21:36:43 -0000 --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2012-Apr-16 21:22:02 +0000, Jung-uk Kim wrote: >Log: > - Implement pipe2 syscall for Linuxulator. This syscall appeared in 2.6= =2E27 > but GNU libc used it without checking its kernel version, e. g., Fedora = 10. Recent versions of flash are complaining about the lack of pipe2(). Do you have any plans to MFC this? I've had a quick look but there are non-trivial conflicts in kern/sys_pipe.c on both 8.x & 9.x and I don't want to spend time resolving them if you have already done so. --=20 Peter Jeremy --9jxsPFA5p3P2qPhR Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/szloACgkQ/opHv/APuIdMoQCeJlg3+EvlaYuBCn25QljDGMtm wEIAoK7cfdePTMWqBTdKff1c3tFjMimp =CWMS -----END PGP SIGNATURE----- --9jxsPFA5p3P2qPhR-- From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 22:03: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 A41AD106566C; Thu, 28 Jun 2012 22:03:59 +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 8E92E8FC0A; Thu, 28 Jun 2012 22:03: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 q5SM3xC9001237; Thu, 28 Jun 2012 22:03:59 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5SM3xjj001235; Thu, 28 Jun 2012 22:03:59 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201206282203.q5SM3xjj001235@svn.freebsd.org> From: Alan Cox Date: Thu, 28 Jun 2012 22:03: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: r237733 - head/sys/amd64/amd64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 28 Jun 2012 22:03:59 -0000 Author: alc Date: Thu Jun 28 22:03:59 2012 New Revision: 237733 URL: http://svn.freebsd.org/changeset/base/237733 Log: Avoid some unnecessary PV list locking in pmap_enter(). Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Thu Jun 28 21:24:56 2012 (r237732) +++ head/sys/amd64/amd64/pmap.c Thu Jun 28 22:03:59 2012 (r237733) @@ -3570,7 +3570,7 @@ validate: if ((newpte & PG_RW) == 0) invlva = TRUE; } - if ((origpte & PG_MANAGED) != 0) { + if ((om->aflags & PGA_WRITEABLE) != 0) { CHANGE_PV_LIST_LOCK_TO_VM_PAGE(&lock, om); if (TAILQ_EMPTY(&om->md.pv_list) && ((om->flags & PG_FICTITIOUS) != 0 || From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 23:11:25 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 C3CC11065693; Thu, 28 Jun 2012 23:11:25 +0000 (UTC) (envelope-from listlog2011@gmail.com) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A320B8FC08; Thu, 28 Jun 2012 23:11:25 +0000 (UTC) Received: from xp5k.my.domain (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q5SNBNOD022590; Thu, 28 Jun 2012 23:11:23 GMT (envelope-from listlog2011@gmail.com) Message-ID: <4FECE494.5020005@gmail.com> Date: Fri, 29 Jun 2012 07:11:16 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120628 Thunderbird/13.0.1 MIME-Version: 1.0 To: Kostik Belousov References: <201206272032.q5RKWjvt031174@svn.freebsd.org> <4FEBB8C9.8070006@gmail.com> <4FEBC0A2.3010708@gmail.com> <4FEBC70F.40408@gmail.com> <20120628075301.GS2337@deviant.kiev.zoral.com.ua> <4FEC1AAB.6070408@gmail.com> <4FEC557F.4080807@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Attilio Rao , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, davidxu@freebsd.org Subject: Re: svn commit: r237660 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: davidxu@freebsd.org List-Id: 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, 28 Jun 2012 23:11:25 -0000 On 2012/06/28 21:52, Kostik Belousov wrote: > On Thu, Jun 28, 2012 at 4:00 PM, David Xu wrote: >> On 2012/6/28 16:49, David Xu wrote: >>> On 2012/6/28 15:53, Konstantin Belousov wrote: >>>> On Thu, Jun 28, 2012 at 10:53:03AM +0800, David Xu wrote: >>>>> On 2012/6/28 10:32, Attilio Rao wrote: >>>>>> 2012/6/28, David Xu: >>>>>>> On 2012/6/28 10:21, Attilio Rao wrote: >>>>>>>> 2012/6/28, David Xu: >>>>>>>>> On 2012/6/28 4:32, Konstantin Belousov wrote: >>>>>>>>>> Author: kib >>>>>>>>>> Date: Wed Jun 27 20:32:45 2012 >>>>>>>>>> New Revision: 237660 >>>>>>>>>> URL: http://svn.freebsd.org/changeset/base/237660 >>>>>>>>>> >>>>>>>>>> Log: >>>>>>>>>> Optimize the handling of SC_NPROCESSORS_CONF, by using auxv >>>>>>>>>> AT_NCPU >>>>>>>>>> value if present. >>>>>>>>>> >>>>>>>>>> MFC after: 1 week >>>>>>>>>> >>>>>>>>>> Modified: >>>>>>>>>> head/lib/libc/gen/sysconf.c >>>>>>>>>> >>>>>>>>>> Modified: head/lib/libc/gen/sysconf.c >>>>>>>>>> >>>>>>>>>> ============================================================================== >>>>>>>>>> --- head/lib/libc/gen/sysconf.c Wed Jun 27 20:24:25 2012 >>>>>>>>>> (r237659) >>>>>>>>>> +++ head/lib/libc/gen/sysconf.c Wed Jun 27 20:32:45 2012 >>>>>>>>>> (r237660) >>>>>>>>>> @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); >>>>>>>>>> #include >>>>>>>>>> #include >>>>>>>>>> >>>>>>>>>> +#include >>>>>>>>>> #include >>>>>>>>>> #include >>>>>>>>>> #include >>>>>>>>>> @@ -51,6 +52,7 @@ __FBSDID("$FreeBSD$"); >>>>>>>>>> >>>>>>>>>> #include "../stdlib/atexit.h" >>>>>>>>>> #include "tzfile.h" /* from >>>>>>>>>> ../../../contrib/tzcode/stdtime */ >>>>>>>>>> +#include "libc_private.h" >>>>>>>>>> >>>>>>>>>> #define _PATH_ZONEINFO TZDIR /* from tzfile.h */ >>>>>>>>>> >>>>>>>>>> @@ -585,6 +587,8 @@ yesno: >>>>>>>>>> >>>>>>>>>> case _SC_NPROCESSORS_CONF: >>>>>>>>>> case _SC_NPROCESSORS_ONLN: >>>>>>>>>> + if (_elf_aux_info(AT_NCPUS,&value, sizeof(value)) == 0) >>>>>>>>>> + return ((long)value); >>>>>>>>>> mib[0] = CTL_HW; >>>>>>>>>> mib[1] = HW_NCPU; >>>>>>>>>> break; >>>>>>>>>> >>>>>>>>> Will this make controlling the number of CPU online or CPU hotplug >>>>>>>>> be impossible on FreeBSD ? >>>>>>>> If I think about hotplug CPUs I can think of other 1000 >>>>>>>> problems/races/bad situations to be fixed before this one, really. >>>>>>> These are problems only in kernel, but kib's change is about ABI >>>>>>> between userland and kernel, I hope we don't introduce an ABI which >>>>>>> is not extendable road stone. >>>>>> I'm not entirely sure I see the ABI breakage here. >>>>> It is not breakage, it is the ABI thinks number of online cpu is fixed, >>>>> obviously, it is not the case in future unless FreeBSD won't support >>>>> dynamic number of online cpus. >>>>> >>>>> >>>>>> If the AT_NCPUS >>>>>> becames unconvenient and not correct at some point we can just fix >>>>>> sysconf() to not look into the aux vector anymoe. >>>>> If you already know this will be a problem, why do you introduce it >>>>> and later need to fix it ? >>>>> >>>>>> Please note that >>>>>> AT_NCPUS is already exported nowadays. I think this is instead a >>>>>> clever optimization to avoid the sysctl() (usual way to retrieve the >>>>>> number of CPUs). >>>>> But why don't you cache it in libc ? following code is enough: >>>>> >>>>> static int online_cpu; >>>>> if (online_cpu == 0) >>>>> online_cpu = sysctl >>>>> return online_cpu; >>>>> >>>> Thread did evolved somewhat while I was AFK. >>>> >>>> First, please note that the ABI which I designed there is fixable: >>>> if kernel does not export AT_NCPUS at all, then auxv correctly handles >>>> the situation returning an error, and libc falls back to sysctl(2). >>> >>> Do we really want to bypass sysctl and instead passing all info via auxv >>> vector ? >>> I found the sysconf() is a bunch of switch-case, which is already slow, >>> before >>> _SC_NPROCESSES_ONLN, it has already a quite number of case branches, >>> and in your code, it calls _elf_aux_info() which also has some >>> switch-cases branch, >>> if you cache smp_cpus in libc, the call for _elf_aux_info is not needed, >>> and you >>> don't need code in kernel to passing it either, in any case, the code to >>> call >>> sysctl is still needed, so why don't we just use sysctl instead and cache >>> the result in libc ? this at least can generate small code and a bit >>> faster after >>> first call to sysconf(_SC_NPROCESSES_ONLN). >> >> And as a side note, I think we should not put non-critical code into >> fork/exec >> path, these two functions are rather critical path for any UNIX like >> system, >> anything slowing down these two functions will affect overall performance, >> so we should not waste cpu cycle trying to push data to user mode via auxv >> or other ways and yet the data is not used by user code in most time, >> such as the number of online cpu. And in rtld-elf or libc, we should not >> waste >> too much time before executing main(). > My motivation for extending auxv vector and to develop auxv.c was > exactly to shave around dozen > of syscalls from the application startup sequence. If you look at the > ktrace output of the binary startup > on RELENG_8 libc, you should note exactly the sysctls to request > ncpus, pagesizes, canary and so on. > In RELENG_9 and HEAD, there are no sysctls in the trace, because the > data is already pre-filled by > kernel for libc consumption. > The sysconf(3) commit you are commenting on was caused by jemalloc(3) > initialization starting using > _sysconf(3) to query ncpu (for older version, which used sysctl > directly, I direct auxv call). So HEAD > has temporary +1 sysctl syscall done on app startup, now it should be > back to zero. This is a bug of jemalloc, in case __isthreaded is zero, it should not call sysctl to get number of cpu. I think it has already bypassed pthread_mutex_lock/unlock if __isthreaded is zero. > > In other words, 'we should not put non-critical code into fork/exec > path' exactly contradicts with > proposal to remove auxv, since exec would need to call sysctls to > fetch the same data. > From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 23:44: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 AA799106564A; Thu, 28 Jun 2012 23:44:47 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 963878FC0C; Thu, 28 Jun 2012 23:44: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 q5SNil0X005451; Thu, 28 Jun 2012 23:44:47 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5SNilfT005449; Thu, 28 Jun 2012 23:44:47 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <201206282344.q5SNilfT005449@svn.freebsd.org> From: Bruce M Simpson Date: Thu, 28 Jun 2012 23:44: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: r237734 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2012 23:44:47 -0000 Author: bms Date: Thu Jun 28 23:44:47 2012 New Revision: 237734 URL: http://svn.freebsd.org/changeset/base/237734 Log: In MLDv2 general query processing, do not enforce the strict check on query origins. Submitted by: Gu Yong MFC after: 3 days Modified: head/sys/netinet6/mld6.c Modified: head/sys/netinet6/mld6.c ============================================================================== --- head/sys/netinet6/mld6.c Thu Jun 28 22:03:59 2012 (r237733) +++ head/sys/netinet6/mld6.c Thu Jun 28 23:44:47 2012 (r237734) @@ -867,16 +867,10 @@ mld_v2_input_query(struct ifnet *ifp, co */ if (IN6_IS_ADDR_UNSPECIFIED(&mld->mld_addr)) { /* - * General Queries SHOULD be directed to ff02::1. * A general query with a source list has undefined * behaviour; discard it. */ - struct in6_addr dst; - - dst = ip6->ip6_dst; - in6_clearscope(&dst); - if (!IN6_ARE_ADDR_EQUAL(&dst, &in6addr_linklocal_allnodes) || - nsrc > 0) + if (nsrc > 0) return (EINVAL); is_general_query = 1; } else { From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 23:45: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 B8F1A106564A; Thu, 28 Jun 2012 23:45:37 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A470E8FC12; Thu, 28 Jun 2012 23:45: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 q5SNjbnr005526; Thu, 28 Jun 2012 23:45:37 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5SNjbjL005524; Thu, 28 Jun 2012 23:45:37 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <201206282345.q5SNjbjL005524@svn.freebsd.org> From: Bruce M Simpson Date: Thu, 28 Jun 2012 23:45: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: r237735 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2012 23:45:37 -0000 Author: bms Date: Thu Jun 28 23:45:37 2012 New Revision: 237735 URL: http://svn.freebsd.org/changeset/base/237735 Log: Fix a typo in MLD query exponent processing. Submitted by: rpaulo@ MFC after: 3 days Modified: head/sys/netinet6/mld6.c Modified: head/sys/netinet6/mld6.c ============================================================================== --- head/sys/netinet6/mld6.c Thu Jun 28 23:44:47 2012 (r237734) +++ head/sys/netinet6/mld6.c Thu Jun 28 23:45:37 2012 (r237735) @@ -833,7 +833,7 @@ mld_v2_input_query(struct ifnet *ifp, co mld = (struct mldv2_query *)(mtod(m, uint8_t *) + off); maxdelay = ntohs(mld->mld_maxdelay); /* in 1/10ths of a second */ - if (maxdelay >= 32678) { + if (maxdelay >= 32768) { maxdelay = (MLD_MRC_MANT(maxdelay) | 0x1000) << (MLD_MRC_EXP(maxdelay) + 3); } From owner-svn-src-head@FreeBSD.ORG Thu Jun 28 23:48: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 316B4106566B; Thu, 28 Jun 2012 23:48:41 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D2C88FC12; Thu, 28 Jun 2012 23:48: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 q5SNmehd005681; Thu, 28 Jun 2012 23:48:40 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5SNmeup005678; Thu, 28 Jun 2012 23:48:40 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <201206282348.q5SNmeup005678@svn.freebsd.org> From: Bruce M Simpson Date: Thu, 28 Jun 2012 23:48: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: r237736 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2012 23:48:41 -0000 Author: bms Date: Thu Jun 28 23:48:40 2012 New Revision: 237736 URL: http://svn.freebsd.org/changeset/base/237736 Log: Kick the current-state report timer when a V1 group report would be triggered. Submitted by: rpaulo@ MFC after: 3 days Modified: head/sys/netinet6/mld6.c Modified: head/sys/netinet6/mld6.c ============================================================================== --- head/sys/netinet6/mld6.c Thu Jun 28 23:45:37 2012 (r237735) +++ head/sys/netinet6/mld6.c Thu Jun 28 23:48:40 2012 (r237736) @@ -2197,6 +2197,7 @@ mld_final_leave(struct in6_multi *inm, s #endif mld_v1_transmit_report(inm, MLD_LISTENER_DONE); inm->in6m_state = MLD_NOT_MEMBER; + V_current_state_timers_running6 = 1; } else if (mli->mli_version == MLD_VERSION_2) { /* * Stop group timer and all pending reports. From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 01: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 66B3A106564A; Fri, 29 Jun 2012 01:55:21 +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 51B0C8FC08; Fri, 29 Jun 2012 01: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 q5T1tLtL011839; Fri, 29 Jun 2012 01:55:21 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5T1tLBO011836; Fri, 29 Jun 2012 01:55:21 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201206290155.q5T1tLBO011836@svn.freebsd.org> From: Rui Paulo Date: Fri, 29 Jun 2012 01:55: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: r237737 - head/sys/powerpc/aim X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 29 Jun 2012 01:55:21 -0000 Author: rpaulo Date: Fri Jun 29 01:55:20 2012 New Revision: 237737 URL: http://svn.freebsd.org/changeset/base/237737 Log: The `end' symbol doesn't match the end of the kernel image because it's relative to the start address (unless the start address is 0, which is not the case). This is currently not a problem because all powerpc architectures are using loader(8) which passes metadata to the kernel including the correct `endkernel' address. If we don't use loader(8), register 4 and 5 will have the size of the kernel ELF file, not its end address. We fix that simply by adding `kernel_text' to `end' to compute `endkernel'. Discussed with: nathanw Modified: head/sys/powerpc/aim/locore32.S head/sys/powerpc/aim/locore64.S Modified: head/sys/powerpc/aim/locore32.S ============================================================================== --- head/sys/powerpc/aim/locore32.S Thu Jun 28 23:48:40 2012 (r237736) +++ head/sys/powerpc/aim/locore32.S Fri Jun 29 01:55:20 2012 (r237737) @@ -164,13 +164,14 @@ __start: bl OF_initial_setup + lis 3,kernel_text@ha + addi 3,3,kernel_text@l + lis 4,end@ha addi 4,4,end@l + add 4,4,3 mr 5,4 - lis 3,kernel_text@ha - addi 3,3,kernel_text@l - /* Restore the argument pointer and length */ mr 6,20 mr 7,21 Modified: head/sys/powerpc/aim/locore64.S ============================================================================== --- head/sys/powerpc/aim/locore64.S Thu Jun 28 23:48:40 2012 (r237736) +++ head/sys/powerpc/aim/locore64.S Fri Jun 29 01:55:20 2012 (r237737) @@ -164,13 +164,14 @@ ASENTRY_NOPROF(__start) bl OF_initial_setup nop + lis 3,kernbase@ha + addi 3,3,kernbase@l + lis 4,end@ha addi 4,4,end@l + add 4,4,3 mr 5,4 - lis 3,kernbase@ha - addi 3,3,kernbase@l - /* Restore the argument pointer and length */ mr 6,20 mr 7,21 From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 04:13: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 9801B106564A; Fri, 29 Jun 2012 04:13:32 +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 699398FC08; Fri, 29 Jun 2012 04:13: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 q5T4DWOI017838; Fri, 29 Jun 2012 04:13:32 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5T4DWmm017836; Fri, 29 Jun 2012 04:13:32 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201206290413.q5T4DWmm017836@svn.freebsd.org> From: Warner Losh Date: Fri, 29 Jun 2012 04:13: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: r237741 - head/sys/arm/xscale X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 29 Jun 2012 04:13:32 -0000 Author: imp Date: Fri Jun 29 04:13:31 2012 New Revision: 237741 URL: http://svn.freebsd.org/changeset/base/237741 Log: All xscale ports are armeb, so mark it here. This should reduce universe times a little. Modified: head/sys/arm/xscale/std.xscale Modified: head/sys/arm/xscale/std.xscale ============================================================================== --- head/sys/arm/xscale/std.xscale Fri Jun 29 03:37:23 2012 (r237740) +++ head/sys/arm/xscale/std.xscale Fri Jun 29 04:13:31 2012 (r237741) @@ -1,2 +1,3 @@ # $FreeBSD$ +machine arm armeb options ARM_CACHE_LOCK_ENABLE From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 04:18: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 F048F106566B; Fri, 29 Jun 2012 04:18:52 +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 D8DB68FC0A; Fri, 29 Jun 2012 04:18: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 q5T4IqTa018105; Fri, 29 Jun 2012 04:18:52 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5T4IqpX018099; Fri, 29 Jun 2012 04:18:52 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201206290418.q5T4IqpX018099@svn.freebsd.org> From: Warner Losh Date: Fri, 29 Jun 2012 04:18: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: r237742 - 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: Fri, 29 Jun 2012 04:18:53 -0000 Author: imp Date: Fri Jun 29 04:18:52 2012 New Revision: 237742 URL: http://svn.freebsd.org/changeset/base/237742 Log: Initital support for AT91SAM9X25 SoC and the SAM9X25-EK evaluation board. Much work remains. Added: head/sys/arm/at91/at91sam9x25.c (contents, props changed) head/sys/arm/at91/at91sam9x25reg.h (contents, props changed) head/sys/arm/at91/board_sam9x25ek.c (contents, props changed) head/sys/arm/at91/std.sam9x25ek (contents, props changed) head/sys/arm/conf/SAM9X25EK (contents, props changed) head/sys/arm/conf/SAM9X25EK.hints (contents, props changed) Added: head/sys/arm/at91/at91sam9x25.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/at91/at91sam9x25.c Fri Jun 29 04:18:52 2012 (r237742) @@ -0,0 +1,343 @@ +/*- + * Copyright (c) 2005 Olivier Houchard. All rights reserved. + * Copyright (c) 2010 Greg Ansley. All rights reserved. + * 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 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 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 +#include +#include + +struct at91sam9x25_softc { + device_t dev; + bus_space_tag_t sc_st; + bus_space_handle_t sc_sh; + bus_space_handle_t sc_sys_sh; + bus_space_handle_t sc_aic_sh; + bus_space_handle_t sc_dbg_sh; + bus_space_handle_t sc_matrix_sh; +}; + +/* + * Standard priority levels for the system. 0 is lowest and 7 is highest. + * These values are the ones Atmel uses for its Linux port + */ +static const int at91_irq_prio[32] = +{ + 7, /* Advanced Interrupt Controller */ + 7, /* System Peripherals */ + 1, /* Parallel IO Controller A */ + 1, /* Parallel IO Controller B */ + 1, /* Parallel IO Controller C */ + 0, /* Analog-to-Digital Converter */ + 5, /* USART 0 */ + 5, /* USART 1 */ + 5, /* USART 2 */ + 0, /* Multimedia Card Interface */ + 2, /* USB Device Port */ + 6, /* Two-Wire Interface */ + 5, /* Serial Peripheral Interface 0 */ + 5, /* Serial Peripheral Interface 1 */ + 5, /* Serial Synchronous Controller */ + 0, /* (reserved) */ + 0, /* (reserved) */ + 0, /* Timer Counter 0 */ + 0, /* Timer Counter 1 */ + 0, /* Timer Counter 2 */ + 2, /* USB Host port */ + 3, /* Ethernet */ + 0, /* Image Sensor Interface */ + 5, /* USART 3 */ + 5, /* USART 4 */ + 5, /* USART 5 */ + 0, /* Timer Counter 3 */ + 0, /* Timer Counter 4 */ + 0, /* Timer Counter 5 */ + 0, /* Advanced Interrupt Controller IRQ0 */ + 0, /* Advanced Interrupt Controller IRQ1 */ + 0, /* Advanced Interrupt Controller IRQ2 */ +}; + +#define DEVICE(_name, _id, _unit) \ + { \ + _name, _unit, \ + AT91SAM9X25_ ## _id ##_BASE, \ + AT91SAM9X25_ ## _id ## _SIZE, \ + AT91SAM9X25_IRQ_ ## _id \ + } + +static const struct cpu_devs at91_devs[] = +{ + DEVICE("at91_pmc", PMC, 0), + DEVICE("at91_wdt", WDT, 0), + DEVICE("at91_rst", RSTC, 0), + DEVICE("at91_pit", PIT, 0), + DEVICE("at91_pio", PIOA, 0), + DEVICE("at91_pio", PIOB, 1), + DEVICE("at91_pio", PIOC, 2), + DEVICE("at91_twi", TWI0, 0), + DEVICE("at91_twi", TWI1, 1), + DEVICE("at91_twi", TWI2, 2), + DEVICE("at91_mci", HSMCI0, 0), + DEVICE("at91_mci", HSMCI1, 1), + DEVICE("uart", DBGU, 0), + DEVICE("uart", USART0, 1), + DEVICE("uart", USART1, 2), + DEVICE("uart", USART2, 3), + DEVICE("uart", USART3, 4), + DEVICE("spi", SPI0, 0), + DEVICE("spi", SPI1, 1), + DEVICE("macb", EMAC0, 0), + DEVICE("macb", EMAC1, 0), + DEVICE("nand", NAND, 0), + DEVICE("ohci", OHCI, 0), + DEVICE("ehci", EHCI, 0), + { 0, 0, 0, 0, 0 } +}; + +static void +at91_add_child(device_t dev, int prio, const char *name, int unit, + bus_addr_t addr, bus_size_t size, int irq0, int irq1, int irq2) +{ + device_t kid; + struct at91_ivar *ivar; + + kid = device_add_child_ordered(dev, prio, name, unit); + if (kid == NULL) { + printf("Can't add child %s%d ordered\n", name, unit); + return; + } + ivar = malloc(sizeof(*ivar), M_DEVBUF, M_NOWAIT | M_ZERO); + if (ivar == NULL) { + device_delete_child(dev, kid); + printf("Can't add alloc ivar\n"); + return; + } + device_set_ivars(kid, ivar); + resource_list_init(&ivar->resources); + if (irq0 != -1) { + bus_set_resource(kid, SYS_RES_IRQ, 0, irq0, 1); + if (irq0 != AT91SAM9X25_IRQ_SYSTEM) + at91_pmc_clock_add(device_get_nameunit(kid), irq0, 0); + } + if (irq1 != 0) + bus_set_resource(kid, SYS_RES_IRQ, 1, irq1, 1); + if (irq2 != 0) + bus_set_resource(kid, SYS_RES_IRQ, 2, irq2, 1); + if (addr != 0 && addr < AT91SAM9X25_BASE) + addr += AT91SAM9X25_BASE; + if (addr != 0) + bus_set_resource(kid, SYS_RES_MEMORY, 0, addr, size); +} + +static void +at91_cpu_add_builtin_children(device_t dev) +{ + int i; + const struct cpu_devs *walker; + + for (i = 1, walker = at91_devs; walker->name; i++, walker++) { + at91_add_child(dev, i, walker->name, walker->unit, + walker->mem_base, walker->mem_len, walker->irq0, + walker->irq1, walker->irq2); + } +} + +static uint32_t +at91_pll_outa(int freq) +{ + + switch (freq / 10000000) { + case 747 ... 801: return ((1 << 29) | (0 << 14)); + case 697 ... 746: return ((1 << 29) | (1 << 14)); + case 647 ... 696: return ((1 << 29) | (2 << 14)); + case 597 ... 646: return ((1 << 29) | (3 << 14)); + case 547 ... 596: return ((1 << 29) | (1 << 14)); + case 497 ... 546: return ((1 << 29) | (2 << 14)); + case 447 ... 496: return ((1 << 29) | (3 << 14)); + case 397 ... 446: return ((1 << 29) | (4 << 14)); + default: return (1 << 29); + } +} + +static uint32_t +at91_pll_outb(int freq) +{ + + return (0); +} + +static void +at91_identify(driver_t *drv, device_t parent) +{ + + if (soc_data.type == AT91_T_SAM9X5 && soc_data.subtype == AT91_ST_SAM9X25) { + at91_add_child(parent, 0, "at91sam9x25", 0, 0, 0, -1, 0, 0); + at91_cpu_add_builtin_children(parent); + } +} + +static int +at91_probe(device_t dev) +{ + + device_set_desc(dev, "AT91SAM9X25"); + return (0); +} + +static int +at91_attach(device_t dev) +{ + struct at91_pmc_clock *clk; + struct at91sam9x25_softc *sc = device_get_softc(dev); + int i; + + struct at91_softc *at91sc = device_get_softc(device_get_parent(dev)); + + sc->sc_st = at91sc->sc_st; + sc->sc_sh = at91sc->sc_sh; + sc->dev = dev; + + /* + * XXX These values work for the RM9200, SAM926[01], and SAM9X25 + * will have to fix this when we want to support anything else. XXX + */ + if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9X25_SYS_BASE, + AT91SAM9X25_SYS_SIZE, &sc->sc_sys_sh) != 0) + panic("Enable to map system registers"); + + if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9X25_DBGU_BASE, + AT91SAM9X25_DBGU_SIZE, &sc->sc_dbg_sh) != 0) + panic("Enable to map DBGU registers"); + + if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9X25_AIC_BASE, + AT91SAM9X25_AIC_SIZE, &sc->sc_aic_sh) != 0) + panic("Enable to map system registers"); + + /* XXX Hack to tell atmelarm about the AIC */ + at91sc->sc_aic_sh = sc->sc_aic_sh; + at91sc->sc_irq_system = AT91SAM9X25_IRQ_SYSTEM; + + for (i = 0; i < 32; i++) { + bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SVR + + i * 4, i); + /* Priority. */ + bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SMR + i * 4, + at91_irq_prio[i]); + if (i < 8) + bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_EOICR, + 1); + } + + bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SPU, 32); + /* No debug. */ + bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_DCR, 0); + /* Disable and clear all interrupts. */ + bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_IDCR, 0xffffffff); + bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_ICCR, 0xffffffff); + + /* Disable all interrupts for DBGU */ + bus_space_write_4(sc->sc_st, sc->sc_dbg_sh, 0x0c, 0xffffffff); + + if (bus_space_subregion(sc->sc_st, sc->sc_sh, + AT91SAM9X25_MATRIX_BASE, AT91SAM9X25_MATRIX_SIZE, + &sc->sc_matrix_sh) != 0) + panic("Enable to map matrix registers"); + +#if 0 /* wrong, placeholder */ + /* activate NAND*/ + i = bus_space_read_4(sc->sc_st, sc->sc_matrix_sh, + AT91SAM9X25_EBICSA); + bus_space_write_4(sc->sc_st, sc->sc_matrix_sh, + AT91SAM9X25_EBICSA, + i | AT91_MATRIX_EBI_CS3A_SMC_SMARTMEDIA); +#endif + + /* Update USB device port clock info */ + clk = at91_pmc_clock_ref("udpck"); + clk->pmc_mask = PMC_SCER_UDP_SAM9; + at91_pmc_clock_deref(clk); + + /* Update USB host port clock info */ + clk = at91_pmc_clock_ref("uhpck"); + clk->pmc_mask = PMC_SCER_UHP_SAM9; + at91_pmc_clock_deref(clk); + + /* Each SOC has different PLL contraints */ + clk = at91_pmc_clock_ref("plla"); + clk->pll_min_in = SAM9X25_PLL_A_MIN_IN_FREQ; /* 2 MHz */ + clk->pll_max_in = SAM9X25_PLL_A_MAX_IN_FREQ; /* 32 MHz */ + clk->pll_min_out = SAM9X25_PLL_A_MIN_OUT_FREQ; /* 400 MHz */ + clk->pll_max_out = SAM9X25_PLL_A_MAX_OUT_FREQ; /* 800 MHz */ + clk->pll_mul_shift = SAM9X25_PLL_A_MUL_SHIFT; + clk->pll_mul_mask = SAM9X25_PLL_A_MUL_MASK; + clk->pll_div_shift = SAM9X25_PLL_A_DIV_SHIFT; + clk->pll_div_mask = SAM9X25_PLL_A_DIV_MASK; + clk->set_outb = at91_pll_outa; + at91_pmc_clock_deref(clk); + + clk = at91_pmc_clock_ref("pllb"); + clk->pll_min_in = SAM9X25_PLL_B_MIN_IN_FREQ; /* 2 MHz */ + clk->pll_max_in = SAM9X25_PLL_B_MAX_IN_FREQ; /* 32 MHz */ + clk->pll_min_out = SAM9X25_PLL_B_MIN_OUT_FREQ; /* 30 MHz */ + clk->pll_max_out = SAM9X25_PLL_B_MAX_OUT_FREQ; /* 100 MHz */ + clk->pll_mul_shift = SAM9X25_PLL_B_MUL_SHIFT; + clk->pll_mul_mask = SAM9X25_PLL_B_MUL_MASK; + clk->pll_div_shift = SAM9X25_PLL_B_DIV_SHIFT; + clk->pll_div_mask = SAM9X25_PLL_B_DIV_MASK; + clk->set_outb = at91_pll_outb; + at91_pmc_clock_deref(clk); + return (0); +} + +static device_method_t at91sam9x25_methods[] = { + DEVMETHOD(device_probe, at91_probe), + DEVMETHOD(device_attach, at91_attach), + DEVMETHOD(device_identify, at91_identify), + {0, 0}, +}; + +static driver_t at91sam9x25_driver = { + "at91sam9x25", + at91sam9x25_methods, + sizeof(struct at91sam9x25_softc), +}; + +static devclass_t at91sam9x25_devclass; + +DRIVER_MODULE(at91sam9x25, atmelarm, at91sam9x25_driver, at91sam9x25_devclass, 0, 0); Added: head/sys/arm/at91/at91sam9x25reg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/at91/at91sam9x25reg.h Fri Jun 29 04:18:52 2012 (r237742) @@ -0,0 +1,316 @@ +/*- + * Copyright (c) 2009 Sylvestre Gallon. All rights reserved. + * Copyright (c) 2010 Greg Ansley. All rights reserved. + * Copyright (c) 2012 M. Warener 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 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 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 AT91SAM9X25REG_H_ +#define AT91SAM9X25REG_H_ + +#ifndef AT91SAM9X25_MASTER_CLOCK +#define AT91SAM9X25_MASTER_CLOCK ((18432000 * 43)/6) +#endif + +/* Chip Specific limits */ +#define SAM9X25_PLL_A_MIN_IN_FREQ 2000000 /* 2 Mhz */ +#define SAM9X25_PLL_A_MAX_IN_FREQ 32000000 /* 32 Mhz */ +#define SAM9X25_PLL_A_MIN_OUT_FREQ 400000000 /* 400 Mhz */ +#define SAM9X25_PLL_A_MAX_OUT_FREQ 800000000 /* 800 Mhz */ +#define SAM9X25_PLL_A_MUL_SHIFT 16 +#define SAM9X25_PLL_A_MUL_MASK 0xFF +#define SAM9X25_PLL_A_DIV_SHIFT 0 +#define SAM9X25_PLL_A_DIV_MASK 0xFF + +#define SAM9X25_PLL_B_MIN_IN_FREQ 2000000 /* 2 Mhz */ +#define SAM9X25_PLL_B_MAX_IN_FREQ 32000000 /* 32 Mhz */ +#define SAM9X25_PLL_B_MIN_OUT_FREQ 30000000 /* 30 Mhz */ +#define SAM9X25_PLL_B_MAX_OUT_FREQ 100000000 /* 100 Mhz */ +#define SAM9X25_PLL_B_MUL_SHIFT 16 +#define SAM9X25_PLL_B_MUL_MASK 0x3F +#define SAM9X25_PLL_B_DIV_SHIFT 0 +#define SAM9X25_PLL_B_DIV_MASK 0xFF + +/* + * Memory map, from datasheet : + * 0x00000000 - 0x0ffffffff : Internal Memories + * 0x10000000 - 0x1ffffffff : Chip Select 0 + * 0x20000000 - 0x2ffffffff : Chip Select 1 DDR2/LPDDR/SDR/LPSDR + * 0x30000000 - 0x3ffffffff : Chip Select 2 + * 0x40000000 - 0x4ffffffff : Chip Select 3 NAND Flash + * 0x50000000 - 0x5ffffffff : Chip Select 4 + * 0x60000000 - 0x6ffffffff : Chip Select 5 + * 0x70000000 - 0xeffffffff : Undefined (Abort) + * 0xf0000000 - 0xfffffffff : Peripherals + */ + +#define AT91_CHIPSELECT_0 0x10000000 +#define AT91_CHIPSELECT_1 0x20000000 +#define AT91_CHIPSELECT_2 0x30000000 +#define AT91_CHIPSELECT_3 0x40000000 +#define AT91_CHIPSELECT_4 0x50000000 +#define AT91_CHIPSELECT_5 0x60000000 + +#define AT91SAM9X25_BASE 0xd0000000 + +#define AT91SAM9X25_EMAC_SIZE 0x4000 +#define AT91SAM9X25_EMAC0_BASE 0x802c000 +#define AT91SAM9X25_EMAC0_SIZE AT91SAM9X25_EMAC_SIZE +#define AT91SAM9X25_EMAC1_BASE 0x8030000 +#define AT91SAM9X25_EMAC1_SIZE AT91SAM9X25_EMAC_SIZE + +#define AT91SAM9X25_RSTC_BASE 0xffffe00 +#define AT91SAM9X25_RSTC_SIZE 0x10 + +/* USART*/ + +#define AT91SAM9X25_USART_SIZE 0x4000 +#define AT91SAM9X25_USART0_BASE 0x801c000 +#define AT91SAM9X25_USART0_PDC 0x801c100 +#define AT91SAM9X25_USART0_SIZE AT91SAM9X25_USART_SIZE +#define AT91SAM9X25_USART1_BASE 0x8020000 +#define AT91SAM9X25_USART1_PDC 0x8020100 +#define AT91SAM9X25_USART1_SIZE AT91SAM9X25_USART_SIZE +#define AT91SAM9X25_USART2_BASE 0x8024000 +#define AT91SAM9X25_USART2_PDC 0x8024100 +#define AT91SAM9X25_USART2_SIZE AT91SAM9X25_USART_SIZE +#define AT91SAM9X25_USART3_BASE 0x8028000 +#define AT91SAM9X25_USART3_PDC 0x8028100 +#define AT91SAM9X25_USART3_SIZE AT91SAM9X25_USART_SIZE + +/*TC*/ +#define AT91SAM9X25_TC0_BASE 0x8008000 +#define AT91SAM9X25_TC0_SIZE 0x4000 +#define AT91SAM9X25_TC0C0_BASE 0x8008000 +#define AT91SAM9X25_TC0C1_BASE 0x8008040 +#define AT91SAM9X25_TC0C2_BASE 0x8008080 + +#define AT91SAM9X25_TC1_BASE 0x800c000 +#define AT91SAM9X25_TC1_SIZE 0x4000 + +/*SPI*/ + +#define AT91SAM9X25_SPI0_BASE 0x0000000 + +#define AT91SAM9X25_SPI0_SIZE 0x4000 + +#define AT91SAM9X25_SPI1_BASE 0x0004000 +#define AT91SAM9X25_SPI1_SIZE 0x4000 + +/* System Registers */ +#define AT91SAM9X25_SYS_BASE 0xffff000 +#define AT91SAM9X25_SYS_SIZE 0x1000 + +#define AT91SAM9X25_MATRIX_BASE 0xfffde00 +#define AT91SAM9X25_MATRIX_SIZE 0x200 + +#define AT91SAM9X25_DBGU_BASE 0xffff200 +#define AT91SAM9X25_DBGU_SIZE 0x200 + +/* + * PIO + */ +#define AT91SAM9X25_PIOA_BASE 0xffff400 +#define AT91SAM9X25_PIOA_SIZE 0x200 +#define AT91SAM9X25_PIOB_BASE 0xffff600 +#define AT91SAM9X25_PIOB_SIZE 0x200 +#define AT91SAM9X25_PIOC_BASE 0xffff800 +#define AT91SAM9X25_PIOC_SIZE 0x200 + +#define AT91RM92_PMC_BASE 0xffffc00 +#define AT91RM92_PMC_SIZE 0x100 +/* IRQs : */ +/*XXX FIXME XXX + * 0: AIC + * 1: System peripheral (System timer, RTC, DBGU) + * 2: PIO Controller A,B + * 3: PIO Controller C,D + * 4: SMD Soft Modem + * 5: USART 0 + * 6: USART 1 + * 7: USART 2 + * 8: USART 3 + * 9: Two-wirte interface + * 10: Two-wirte interface + * 11: Two-wirte interface + * 12: HSMCI Interface + * 13: SPI 0 + * 14: SPI 1 + * 15: UART0 + * 16: UART1 + * 17: Timer Counter 0,1 + * 18: PWM + * 19: ADC + * 20: DMAC 0 + * 21: DMAC 1 + * 22: UHPHS - USB Host controller + * 23: UDPHS - USB Device Controller + * 24: EMAC0 + * 25: Reserved + * 26: HSMCI1 + * 27: EMAC1 + * 28: SSC + * 29: CAN0 + * 30: CAN1 + * 31: AIC IRQ + */ + +#define AT91SAM9X25_IRQ_AIC 0 +#define AT91SAM9X25_IRQ_SYSTEM 1 +#define AT91SAM9X25_IRQ_PIOAB 2 +#define AT91SAM9X25_IRQ_PIOCD 3 +#define AT91SAM9X25_IRQ_SMD 4 +#define AT91SAM9X25_IRQ_USART0 5 +#define AT91SAM9X25_IRQ_USART1 6 +#define AT91SAM9X25_IRQ_USART2 7 +#define AT91SAM9X25_IRQ_USART3 8 +#define AT91SAM9X25_IRQ_TWI0 9 +#define AT91SAM9X25_IRQ_TWI1 10 +#define AT91SAM9X25_IRQ_TWI2 11 +#define AT91SAM9X25_IRQ_HSMCI0 12 +#define AT91SAM9X25_IRQ_SPI0 13 +#define AT91SAM9X25_IRQ_SPI1 14 +#define AT91SAM9X25_IRQ_UART0 15 +#define AT91SAM9X25_IRQ_UART1 16 +#define AT91SAM9X25_IRQ_TC01 17 +#define AT91SAM9X25_IRQ_PWM 18 +#define AT91SAM9X25_IRQ_ADC 19 +#define AT91SAM9X25_IRQ_DMAC0 20 +#define AT91SAM9X25_IRQ_DMAC1 21 +#define AT91SAM9X25_IRQ_UHPHS 22 +#define AT91SAM9X25_IRQ_UDPHS 23 +#define AT91SAM9X25_IRQ_EMAC0 24 +#define AT91SAM9X25_IRQ_HSMCI1 26 +#define AT91SAM9X25_IRQ_EMAC1 27 +#define AT91SAM9X25_IRQ_SSC 28 +#define AT91SAM9X25_IRQ_CAN0 29 +#define AT91SAM9X25_IRQ_CAN1 30 +#define AT91SAM9X25_IRQ_AICBASE 31 + +/* Alias */ +#define AT91SAM9X25_IRQ_DBGU AT91SAM9X25_IRQ_SYSTEM +#define AT91SAM9X25_IRQ_PMC AT91SAM9X25_IRQ_SYSTEM +#define AT91SAM9X25_IRQ_WDT AT91SAM9X25_IRQ_SYSTEM +#define AT91SAM9X25_IRQ_PIT AT91SAM9X25_IRQ_SYSTEM +#define AT91SAM9X25_IRQ_RSTC AT91SAM9X25_IRQ_SYSTEM +#define AT91SAM9X25_IRQ_OHCI AT91SAM9X25_IRQ_UHPHS +#define AT91SAM9X25_IRQ_EHCI AT91SAM9X25_IRQ_UHPHS +#define AT91SAM9X25_IRQ_PIOA AT91SAM9X25_IRQ_PIOAB +#define AT91SAM9X25_IRQ_PIOB AT91SAM9X25_IRQ_PIOAB +#define AT91SAM9X25_IRQ_PIOC AT91SAM9X25_IRQ_PIOCD +#define AT91SAM9X25_IRQ_NAND (-1) + +#define AT91SAM9X25_AIC_BASE 0xffff000 +#define AT91SAM9X25_AIC_SIZE 0x200 + +/* Timer */ + +#define AT91SAM9X25_WDT_BASE 0xffffd40 +#define AT91SAM9X25_WDT_SIZE 0x10 + +#define AT91SAM9X25_PIT_BASE 0xffffd30 +#define AT91SAM9X25_PIT_SIZE 0x10 + +#define AT91SAM9X25_SMC_BASE 0xfffea00 +#define AT91SAM9X25_SMC_SIZE 0x200 + +#define AT91SAM9X25_PMC_BASE 0xffffc00 +#define AT91SAM9X25_PMC_SIZE 0x100 + +#define AT91SAM9X25_UDPHS_BASE 0x803c000 +#define AT91SAM9X25_UDPHS_SIZE 0x4000 + +#define AT91SAM9X25_HSMCI_SIZE 0x4000 +#define AT91SAM9X25_HSMCI0_BASE 0x0008000 +#define AT91SAM9X25_HSMCI0_SIZE AT91SAM9X25_HSMCI_SIZE +#define AT91SAM9X25_HSMCI1_BASE 0x000c000 +#define AT91SAM9X25_HSMCI1_SIZE AT91SAM9X25_HSMCI_SIZE + +#define AT91SAM9X25_TWI_SIZE 0x4000 +#define AT91SAM9X25_TWI0_BASE 0xffaC000 +#define AT91SAM9X25_TWI0_SIZE AT91SAM9X25_TWI_SIZE +#define AT91SAM9X25_TWI1_BASE 0xffaC000 +#define AT91SAM9X25_TWI1_SIZE AT91SAM9X25_TWI_SIZE +#define AT91SAM9X25_TWI2_BASE 0xffaC000 +#define AT91SAM9X25_TWI2_SIZE AT91SAM9X25_TWI_SIZE + +/* XXX Needs to be carfully coordinated with + * other * soc's so phyical and vm address + * mapping are unique. XXX + */ +#define AT91SAM9X25_OHCI_BASE 0xdfc00000 /* SAME as 9c40 */ +#define AT91SAM9X25_OHCI_PA_BASE 0x00600000 +#define AT91SAM9X25_OHCI_SIZE 0x00100000 + +#define AT91SAM9X25_EHCI_BASE 0xdfd00000 +#define AT91SAM9X25_EHCI_PA_BASE 0x00700000 +#define AT91SAM9X25_EHCI_SIZE 0x00100000 + +#define AT91SAM9X25_NAND_BASE 0xe0000000 +#define AT91SAM9X25_NAND_PA_BASE 0x40000000 +#define AT91SAM9X25_NAND_SIZE 0x10000000 + + +/* SDRAMC */ +#define AT91SAM9X25_SDRAMC_BASE 0xfffea00 /* SAME as SMC? */ +#define AT91SAM9X25_SDRAMC_MR 0x00 +#define AT91SAM9X25_SDRAMC_MR_MODE_NORMAL 0 +#define AT91SAM9X25_SDRAMC_MR_MODE_NOP 1 +#define AT91SAM9X25_SDRAMC_MR_MODE_PRECHARGE 2 +#define AT91SAM9X25_SDRAMC_MR_MODE_LOAD_MODE_REGISTER 3 +#define AT91SAM9X25_SDRAMC_MR_MODE_REFRESH 4 +#define AT91SAM9X25_SDRAMC_TR 0x04 +#define AT91SAM9X25_SDRAMC_CR 0x08 +#define AT91SAM9X25_SDRAMC_CR_NC_8 0x0 +#define AT91SAM9X25_SDRAMC_CR_NC_9 0x1 +#define AT91SAM9X25_SDRAMC_CR_NC_10 0x2 +#define AT91SAM9X25_SDRAMC_CR_NC_11 0x3 +#define AT91SAM9X25_SDRAMC_CR_NC_MASK 0x00000003 +#define AT91SAM9X25_SDRAMC_CR_NR_11 0x0 +#define AT91SAM9X25_SDRAMC_CR_NR_12 0x4 +#define AT91SAM9X25_SDRAMC_CR_NR_13 0x8 +#define AT91SAM9X25_SDRAMC_CR_NR_RES 0xc +#define AT91SAM9X25_SDRAMC_CR_NR_MASK 0x0000000c +#define AT91SAM9X25_SDRAMC_CR_NB_2 0x00 +#define AT91SAM9X25_SDRAMC_CR_NB_4 0x10 +#define AT91SAM9X25_SDRAMC_CR_DBW_16 0x80 +#define AT91SAM9X25_SDRAMC_CR_NB_MASK 0x00000010 +#define AT91SAM9X25_SDRAMC_CR_NCAS_MASK 0x00000060 +#define AT91SAM9X25_SDRAMC_CR_TWR_MASK 0x00000780 +#define AT91SAM9X25_SDRAMC_CR_TRC_MASK 0x00007800 +#define AT91SAM9X25_SDRAMC_CR_TRP_MASK 0x00078000 +#define AT91SAM9X25_SDRAMC_CR_TRCD_MASK 0x00780000 +#define AT91SAM9X25_SDRAMC_CR_TRAS_MASK 0x07800000 +#define AT91SAM9X25_SDRAMC_CR_TXSR_MASK 0x78000000 +#define AT91SAM9X25_SDRAMC_HSR 0x0c +#define AT91SAM9X25_SDRAMC_LPR 0x10 +#define AT91SAM9X25_SDRAMC_IER 0x14 +#define AT91SAM9X25_SDRAMC_IDR 0x18 +#define AT91SAM9X25_SDRAMC_IMR 0x1c +#define AT91SAM9X25_SDRAMC_ISR 0x20 +#define AT91SAM9X25_SDRAMC_MDR 0x24 + +#endif /* AT91SAM9X25REG_H_*/ + Added: head/sys/arm/at91/board_sam9x25ek.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/at91/board_sam9x25ek.c Fri Jun 29 04:18:52 2012 (r237742) @@ -0,0 +1,125 @@ +/*- + * Copyright (c) 2009 Greg Ansley. 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 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 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. + */ + +/* + * This board file can be used for both: + * SAM9X26EK board + */ + +#include +__FBSDID("$FreeBSD$"); +#include +#include + +#include +#include +#include +#include +#include +#include +//#include + +long +board_init(void) +{ +#if 0 + /* PIOB's A periph: Turn USART 0's TX/RX pins */ + at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB14_DRXD, 0); + at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB15_DTXD, 1); + + /* PIOB's A periph: Turn USART 0's TX/RX pins */ + at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB4_TXD0, 1); + at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB5_RXD0, 0); + at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB22_DSR0, 0); + at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB23_DCD0, 0); + at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB24_DTR0, 1); + at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB25_RI0, 0); + at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB26_RTS0, 1); + at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB27_CTS0, 0); + + /* PIOB's A periph: Turn USART 1's TX/RX pins */ + at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB6_TXD1, 1); + at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB7_RXD1, 0); + at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB28_RTS1, 1); + at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB29_CTS1, 0); + + /* TWI Two-wire Serial Data */ + at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA23_TWD, 1); + at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA24_TWCK, 1); + +#if 1 + /* + * Turn off Clock to DataFlash, conflicts with MCI clock. + */ + at91_pio_use_gpio(AT91SAM9G20_PIOA_BASE,AT91C_PIO_PA2); + at91_pio_gpio_input(AT91SAM9G20_PIOA_BASE,AT91C_PIO_PA2); + + /* Turn off chip select to DataFlash */ + at91_pio_gpio_output(AT91SAM9G20_PIOC_BASE,AT91C_PIO_PC11, 0); + at91_pio_gpio_set(AT91SAM9G20_PIOC_BASE,AT91C_PIO_PC11); + at91_pio_use_gpio(AT91SAM9G20_PIOC_BASE,AT91C_PIO_PC11); + + /* Multimedia Card */ + at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE,AT91C_PA0_MCDB0, 1); + at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE,AT91C_PA1_MCCDB, 1); + at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE,AT91C_PA3_MCDB3, 1); + at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE,AT91C_PA4_MCDB2, 1); + at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE,AT91C_PA5_MCDB1, 1); + at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA8_MCCK, 1); + at91_pio_use_gpio(AT91SAM9G20_PIOC_BASE, AT91C_PIO_PC9); +#else + /* SPI0 to DataFlash */ + at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE, AT91C_PIO_PA0, 0); + at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE, AT91C_PIO_PA1, 0); + at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE, AT91C_PIO_PA2, 0); + at91_pio_use_periph_b(AT91SAM9G20_PIOC_BASE, AT91C_PIO_PC11,0); + + at91_pio_gpio_input(AT91SAM9G20_PIOA_BASE,AT91C_PIO_PA8); + at91_pio_use_gpio(AT91SAM9G20_PIOA_BASE,AT91C_PIO_PA8); +#endif + + /* EMAC */ + at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA12_ETX0 , 0); + at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA13_ETX1, 0); + at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA14_ERX0, 0); + at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA15_ERX1, 0); + at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA16_ETXEN, 0); + at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA17_ERXDV, 0); + at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA18_ERXER, 0); + at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA19_ETXCK, 0); + at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA20_EMDC, 0); + at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA21_EMDIO, 0); + + at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE,AT91C_PA10_ETX2_0, 0); + at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE,AT91C_PA11_ETX3_0, 0); + at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE,AT91C_PA22_ETXER, 0); + at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE,AT91C_PA25_ERX2, 0); + at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE,AT91C_PA26_ERX3, 0); + at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE,AT91C_PA27_ERXCK, 0); + at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE,AT91C_PA28_ECRS, 0); + at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE,AT91C_PA29_ECOL, 0); +#endif + return (at91_ramsize()); +} Added: head/sys/arm/at91/std.sam9x25ek ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/at91/std.sam9x25ek Fri Jun 29 04:18:52 2012 (r237742) @@ -0,0 +1,12 @@ +#$FreeBSD$ +include "../at91/std.at91sam9" + +options STARTUP_PAGETABLE_ADDR=0x20800000 +makeoptions KERNPHYSADDR=0x20000000 +makeoptions KERNVIRTADDR=0xc0000000 +options KERNPHYSADDR=0x20000000 +options KERNVIRTADDR=0xc0000000 + +device at91_board_sam9x25ek +nodevice at91sam9g20 +nodevice at91sam9260 Added: head/sys/arm/conf/SAM9X25EK ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/SAM9X25EK Fri Jun 29 04:18:52 2012 (r237742) @@ -0,0 +1,154 @@ +# Kernel configuration for Atmel AT91SAM9G20EK Rev B. development card +# +# For more information on this file, please read 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$ + +# NOUNIVERSE: disable building in make universe +ident SAM9X25EK + +include "../at91/std.sam9x25ek" + +#To statically compile in device wiring instead of /boot/device.hints +hints "SAM9G20EK.hints" +makeoptions MODULES_OVERRIDE="" + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +options DDB +options KDB + +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +#options INET6 #IPv6 communications protocols +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 MD_ROOT #MD is a potential root device +#options MD_ROOT_SIZE=4096 # 3MB ram disk +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 BOOTP_NFSROOT +#options BOOTP +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=ate0 +#options BOOTP_COMPAT + +options ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\" + +options ALT_BREAK_TO_DEBUGGER + +#options MSDOSFS #MSDOS Filesystem +#options CD9660 #ISO 9660 Filesystem +#options PROCFS #Process filesystem (requires PSEUDOFS) +#options PSEUDOFS #Pseudo-filesystem framework +#options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI +#options KTRACE #ktrace(1) 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 SYSCTL_OMIT_DESCR +options MUTEX_NOINLINE +options RWLOCK_NOINLINE +options NO_FFS_SNAPSHOT +options NO_SWAPPING + +# Debugging for use in -current +#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 DIAGNOSTIC + +device random +device pty +device loop +device bpf +device ether +device md + +device uart # Serial Ports + +# Ethernet +#device ate # Ethernet Driver +device macb # Alternate Ethernet driver +device mii +option AT91_ATE_USE_RMII + +#device at91_twi # TWI: Two Wire Interface (EEPROM) +device at91_wdt # WDT: Watchdog timer + +# NOTE: SPI DataFlash and mci/mmc/mmcsd have hardware +# confilict on this card. Use one or the other. +# see board_sam9g20ek.c + +# SPI: Data Flash +#device at91_spi # SPI: +#device spibus +#device at45d # at45db642 and maybe others + +# MMC/SD +device at91_mci +device mmc +device mmcsd +#option AT91_MCI_SLOT_B +option AT91_MCI_HAS_4WIRE + +# iic +device iic +device iicbus +device icee + +# SCSI peripherals +device scbus # SCSI bus (required for SCSI) +device da # Direct Access (disks) +device cd # CD +device pass # Passthrough device (direct SCSI access) + +# USB support +#device ohci # OHCI localbus->USB interface +#device usb # USB Bus (required) +#device umass # Disks/Mass storage - Requires scbus and da +#device uhid # "Human Interface Devices" +#device ulpt # Printer +#device udbp # USB Double Bulk Pipe devices + +# USB Ethernet, requires miibus +device miibus +#device aue # ADMtek USB Ethernet +#device axe # ASIX Electronics USB Ethernet +#device cdce # Generic USB over Ethernet +#device cue # CATC USB Ethernet +#device kue # Kawasaki LSI USB Ethernet +#device rue # RealTek RTL8150 USB Ethernet +#device udav # Davicom DM9601E USB + +# USB Wireless +#device rum # Ralink Technology RT2501USB wireless NICs +#device uath # Atheros AR5523 wireless NICs +#device ural # Ralink Technology RT2500USB wireless NICs +#device zyd # ZyDAS zd1211/zd1211b wireless NICs + +# Wireless NIC cards +#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_amrr # AMRR transmit rate control algorithm + Added: head/sys/arm/conf/SAM9X25EK.hints ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/SAM9X25EK.hints Fri Jun 29 04:18:52 2012 (r237742) @@ -0,0 +1,10 @@ +# $FreeBSD$ +# + +# EEPROM +hint.icee.0.at="iicbus0" +hint.icee.0.addr=0xa0 +hint.icee.0.type=16 +hint.icee.0.size=65536 +hint.icee.0.rd_sz=256 +hint.icee.0.wr_sz=256 From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 04:49: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 F0CC0106566C; Fri, 29 Jun 2012 04:49:50 +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 C23E78FC08; Fri, 29 Jun 2012 04:49: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 q5T4no6X019369; Fri, 29 Jun 2012 04:49:50 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5T4noUX019367; Fri, 29 Jun 2012 04:49:50 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201206290449.q5T4noUX019367@svn.freebsd.org> From: Warner Losh Date: Fri, 29 Jun 2012 04:49: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: r237743 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 29 Jun 2012 04:49:51 -0000 Author: imp Date: Fri Jun 29 04:49:50 2012 New Revision: 237743 URL: http://svn.freebsd.org/changeset/base/237743 Log: Ooops, replaced the at91sam9g20 interrupt list with the at91sam9x25 ones. Modified: head/sys/arm/at91/at91sam9x25.c Modified: head/sys/arm/at91/at91sam9x25.c ============================================================================== --- head/sys/arm/at91/at91sam9x25.c Fri Jun 29 04:18:52 2012 (r237742) +++ head/sys/arm/at91/at91sam9x25.c Fri Jun 29 04:49:50 2012 (r237743) @@ -59,38 +59,38 @@ struct at91sam9x25_softc { */ static const int at91_irq_prio[32] = { - 7, /* Advanced Interrupt Controller */ + 7, /* Advanced Interrupt Controller (FIQ) */ 7, /* System Peripherals */ - 1, /* Parallel IO Controller A */ - 1, /* Parallel IO Controller B */ - 1, /* Parallel IO Controller C */ - 0, /* Analog-to-Digital Converter */ + 1, /* Parallel IO Controller A and B */ + 1, /* Parallel IO Controller C and D */ + 4, /* Soft Modem */ 5, /* USART 0 */ 5, /* USART 1 */ 5, /* USART 2 */ - 0, /* Multimedia Card Interface */ - 2, /* USB Device Port */ - 6, /* Two-Wire Interface */ + 5, /* USART 3 */ + 6, /* Two-Wire Interface 0 */ + 6, /* Two-Wire Interface 1 */ + 6, /* Two-Wire Interface 2 */ + 0, /* Multimedia Card Interface 0 */ 5, /* Serial Peripheral Interface 0 */ 5, /* Serial Peripheral Interface 1 */ - 5, /* Serial Synchronous Controller */ - 0, /* (reserved) */ - 0, /* (reserved) */ - 0, /* Timer Counter 0 */ - 0, /* Timer Counter 1 */ - 0, /* Timer Counter 2 */ - 2, /* USB Host port */ - 3, /* Ethernet */ - 0, /* Image Sensor Interface */ - 5, /* USART 3 */ - 5, /* USART 4 */ - 5, /* USART 5 */ - 0, /* Timer Counter 3 */ - 0, /* Timer Counter 4 */ - 0, /* Timer Counter 5 */ - 0, /* Advanced Interrupt Controller IRQ0 */ - 0, /* Advanced Interrupt Controller IRQ1 */ - 0, /* Advanced Interrupt Controller IRQ2 */ + 5, /* UART 0 */ + 5, /* UART 1 */ + 0, /* Timer Counter 0, 1, 2, 3, 4 and 5 */ + 0, /* Pulse Width Modulation Controller */ + 0, /* ADC Controller */ + 0, /* DMA Controller 0 */ + 0, /* DMA Controller 1 */ + 2, /* USB Host High Speed port */ + 2, /* USB Device High speed port */ + 3, /* Ethernet MAC 0 */ + 3, /* LDC Controller or Image Sensor Interface */ + 0, /* Multimedia Card Interface 1 */ + 3, /* Ethernet MAC 1 */ + 4, /* Synchronous Serial Interface */ + 4, /* CAN Controller 0 */ + 4, /* CAN Controller 1 */ + 0, /* Advanced Interrupt Controller (IRQ0) */ }; #define DEVICE(_name, _id, _unit) \ From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 06:05: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 0F21A106566B; Fri, 29 Jun 2012 06:05:45 +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 D52EB8FC14; Fri, 29 Jun 2012 06:05: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 q5T65iQl022482; Fri, 29 Jun 2012 06:05:44 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5T65iSa022478; Fri, 29 Jun 2012 06:05:44 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201206290605.q5T65iSa022478@svn.freebsd.org> From: Warner Losh Date: Fri, 29 Jun 2012 06:05:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237744 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 29 Jun 2012 06:05:45 -0000 Author: imp Date: Fri Jun 29 06:05:44 2012 New Revision: 237744 URL: http://svn.freebsd.org/changeset/base/237744 Log: Add PIOD, make at91sam9x25 a standard SoC, tweak some comments. Modified: head/sys/arm/at91/at91sam9x25.c head/sys/arm/at91/at91sam9x25reg.h head/sys/arm/at91/std.at91sam9 Modified: head/sys/arm/at91/at91sam9x25.c ============================================================================== --- head/sys/arm/at91/at91sam9x25.c Fri Jun 29 04:49:50 2012 (r237743) +++ head/sys/arm/at91/at91sam9x25.c Fri Jun 29 06:05:44 2012 (r237744) @@ -110,6 +110,7 @@ static const struct cpu_devs at91_devs[] DEVICE("at91_pio", PIOA, 0), DEVICE("at91_pio", PIOB, 1), DEVICE("at91_pio", PIOC, 2), + DEVICE("at91_pio", PIOD, 3), DEVICE("at91_twi", TWI0, 0), DEVICE("at91_twi", TWI1, 1), DEVICE("at91_twi", TWI2, 2), Modified: head/sys/arm/at91/at91sam9x25reg.h ============================================================================== --- head/sys/arm/at91/at91sam9x25reg.h Fri Jun 29 04:49:50 2012 (r237743) +++ head/sys/arm/at91/at91sam9x25reg.h Fri Jun 29 06:05:44 2012 (r237744) @@ -138,11 +138,12 @@ #define AT91SAM9X25_PIOB_SIZE 0x200 #define AT91SAM9X25_PIOC_BASE 0xffff800 #define AT91SAM9X25_PIOC_SIZE 0x200 +#define AT91SAM9X25_PIOD_BASE 0xffffa00 +#define AT91SAM9X25_PIOD_SIZE 0x200 #define AT91RM92_PMC_BASE 0xffffc00 #define AT91RM92_PMC_SIZE 0x100 -/* IRQs : */ -/*XXX FIXME XXX +/* IRQs : * 0: AIC * 1: System peripheral (System timer, RTC, DBGU) * 2: PIO Controller A,B @@ -168,13 +169,13 @@ * 22: UHPHS - USB Host controller * 23: UDPHS - USB Device Controller * 24: EMAC0 - * 25: Reserved + * 25: LCD controller or Image Sensor Interface * 26: HSMCI1 * 27: EMAC1 * 28: SSC * 29: CAN0 * 30: CAN1 - * 31: AIC IRQ + * 31: AIC IRQ0 */ #define AT91SAM9X25_IRQ_AIC 0 @@ -220,6 +221,7 @@ #define AT91SAM9X25_IRQ_PIOA AT91SAM9X25_IRQ_PIOAB #define AT91SAM9X25_IRQ_PIOB AT91SAM9X25_IRQ_PIOAB #define AT91SAM9X25_IRQ_PIOC AT91SAM9X25_IRQ_PIOCD +#define AT91SAM9X25_IRQ_PIOD AT91SAM9X25_IRQ_PIOCD #define AT91SAM9X25_IRQ_NAND (-1) #define AT91SAM9X25_AIC_BASE 0xffff000 Modified: head/sys/arm/at91/std.at91sam9 ============================================================================== --- head/sys/arm/at91/std.at91sam9 Fri Jun 29 04:49:50 2012 (r237743) +++ head/sys/arm/at91/std.at91sam9 Fri Jun 29 06:05:44 2012 (r237744) @@ -10,3 +10,4 @@ device at91sam9 device at91sam9260 device at91sam9g20 +device at91sam9x25 From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 06: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 7ECDB106564A; Fri, 29 Jun 2012 06: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 6A9BF8FC16; Fri, 29 Jun 2012 06: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 q5T66KmX022545; Fri, 29 Jun 2012 06: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 q5T66KkD022543; Fri, 29 Jun 2012 06:06:20 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201206290606.q5T66KkD022543@svn.freebsd.org> From: Warner Losh Date: Fri, 29 Jun 2012 06: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: r237745 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 29 Jun 2012 06:06:20 -0000 Author: imp Date: Fri Jun 29 06:06:19 2012 New Revision: 237745 URL: http://svn.freebsd.org/changeset/base/237745 Log: Tweak comment. Modified: head/sys/arm/at91/at91_pmcvar.h Modified: head/sys/arm/at91/at91_pmcvar.h ============================================================================== --- head/sys/arm/at91/at91_pmcvar.h Fri Jun 29 06:05:44 2012 (r237744) +++ head/sys/arm/at91/at91_pmcvar.h Fri Jun 29 06:06:19 2012 (r237745) @@ -55,7 +55,7 @@ struct at91_pmc_clock uint32_t (*set_outb)(int); }; -struct at91_pmc_clock * at91_pmc_clock_add(const char *name, uint32_t irq, +struct at91_pmc_clock *at91_pmc_clock_add(const char *name, uint32_t irq, struct at91_pmc_clock *parent); struct at91_pmc_clock *at91_pmc_clock_ref(const char *name); void at91_pmc_clock_deref(struct at91_pmc_clock *); From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 07:35: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 44731106564A; Fri, 29 Jun 2012 07:35:38 +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 16BDF8FC15; Fri, 29 Jun 2012 07:35: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 q5T7ZbJQ026315; Fri, 29 Jun 2012 07:35:37 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5T7ZbSk026312; Fri, 29 Jun 2012 07:35:37 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201206290735.q5T7ZbSk026312@svn.freebsd.org> From: Andriy Gapon Date: Fri, 29 Jun 2012 07:35: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: r237748 - in head/sys/cddl/dev/dtrace: amd64 i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jun 2012 07:35:38 -0000 Author: avg Date: Fri Jun 29 07:35:37 2012 New Revision: 237748 URL: http://svn.freebsd.org/changeset/base/237748 Log: dtrace instruction decoder: add 0x0f 0x1f NOP opcode support According to the AMD manual the whole range from 0x09 to 0x1f are NOPs. Intel manual mentions only 0x1f. Use only Intel one for now, it seems to be the one actually generated by compilers. Use gdb mnemonic for the operation: "nopw". [1] AMD64 Architecture Programmer's Manual Volume 3: General-Purpose and System Instructions [2] Software Optimization Guide for AMD Family 10h Processors [3] Intel(R) 64 and IA-32 Architectures Software Developer’s Manual Volume 2 (2A, 2B & 2C): Instruction Set Reference, A-Z Tested by: Fabian Keil (earlier version) MFC after: 3 days Modified: head/sys/cddl/dev/dtrace/amd64/dis_tables.c head/sys/cddl/dev/dtrace/i386/dis_tables.c Modified: head/sys/cddl/dev/dtrace/amd64/dis_tables.c ============================================================================== --- head/sys/cddl/dev/dtrace/amd64/dis_tables.c Fri Jun 29 06:41:19 2012 (r237747) +++ head/sys/cddl/dev/dtrace/amd64/dis_tables.c Fri Jun 29 07:35:37 2012 (r237748) @@ -815,7 +815,7 @@ const instable_t dis_op0F[16][16] = { /* [10] */ TNSZ("movups",XMMO,16), TNSZ("movups",XMMOS,16),TNSZ("movlps",XMMO,8), TNSZ("movlps",XMMOS,8), /* [14] */ TNSZ("unpcklps",XMMO,16),TNSZ("unpckhps",XMMO,16),TNSZ("movhps",XMMOM,8),TNSZ("movhps",XMMOMS,8), /* [18] */ IND(dis_op0F18), INVALID, INVALID, INVALID, -/* [1C] */ INVALID, INVALID, INVALID, INVALID, +/* [1C] */ INVALID, INVALID, INVALID, TNS("nopw", M), }, { /* [20] */ TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), /* [24] */ TSx("mov",SREG), INVALID, TSx("mov",SREG), INVALID, Modified: head/sys/cddl/dev/dtrace/i386/dis_tables.c ============================================================================== --- head/sys/cddl/dev/dtrace/i386/dis_tables.c Fri Jun 29 06:41:19 2012 (r237747) +++ head/sys/cddl/dev/dtrace/i386/dis_tables.c Fri Jun 29 07:35:37 2012 (r237748) @@ -815,7 +815,7 @@ const instable_t dis_op0F[16][16] = { /* [10] */ TNSZ("movups",XMMO,16), TNSZ("movups",XMMOS,16),TNSZ("movlps",XMMO,8), TNSZ("movlps",XMMOS,8), /* [14] */ TNSZ("unpcklps",XMMO,16),TNSZ("unpckhps",XMMO,16),TNSZ("movhps",XMMOM,8),TNSZ("movhps",XMMOMS,8), /* [18] */ IND(dis_op0F18), INVALID, INVALID, INVALID, -/* [1C] */ INVALID, INVALID, INVALID, INVALID, +/* [1C] */ INVALID, INVALID, INVALID, TNS("nopw", M), }, { /* [20] */ TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), TSy("mov",SREG), /* [24] */ TSx("mov",SREG), INVALID, TSx("mov",SREG), INVALID, From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 07:42: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 8BD90106566B; Fri, 29 Jun 2012 07:42:13 +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 771618FC12; Fri, 29 Jun 2012 07:42:12 +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 KAA05023; Fri, 29 Jun 2012 10:42:11 +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 1SkVqE-0004Of-Vc; Fri, 29 Jun 2012 10:42:11 +0300 Message-ID: <4FED5C51.9060603@FreeBSD.org> Date: Fri, 29 Jun 2012 10:42:09 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120620 Thunderbird/13.0.1 MIME-Version: 1.0 To: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201206290735.q5T7ZbSk026312@svn.freebsd.org> In-Reply-To: <201206290735.q5T7ZbSk026312@svn.freebsd.org> X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r237748 - in head/sys/cddl/dev/dtrace: amd64 i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jun 2012 07:42:13 -0000 on 29/06/2012 10:35 Andriy Gapon said the following: > Author: avg > Date: Fri Jun 29 07:35:37 2012 > New Revision: 237748 > URL: http://svn.freebsd.org/changeset/base/237748 > > Log: > dtrace instruction decoder: add 0x0f 0x1f NOP opcode support > > According to the AMD manual the whole range from 0x09 to 0x1f are NOPs. > Intel manual mentions only 0x1f. Use only Intel one for now, it seems > to be the one actually generated by compilers. > Use gdb mnemonic for the operation: "nopw". BTW, here I have a patch that brings our copy of dtrace dis_tables.c to the latest version available in OpenSolaris code: http://people.freebsd.org/~avg/dtrace-disassm-osol.diff I haven't studied at all what the newer code brings in, but it must be some fixes and improvements, I guess :-) The change is mostly a mechanical merge, plus some changes on top to get the code to compile. I've been using the code for a few weeks and haven't run into any problems. Should I put this change into the tree? -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 12:55:36 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 C0D851065672; Fri, 29 Jun 2012 12:55:36 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB7B48FC14; Fri, 29 Jun 2012 12:55: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 q5TCtaCJ046797; Fri, 29 Jun 2012 12:55:36 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5TCtax6046795; Fri, 29 Jun 2012 12:55:36 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201206291255.q5TCtax6046795@svn.freebsd.org> From: "Andrey A. Chernov" Date: Fri, 29 Jun 2012 12:55: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: r237777 - head/usr.sbin/vidcontrol X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 29 Jun 2012 12:55:36 -0000 Author: ache Date: Fri Jun 29 12:55:36 2012 New Revision: 237777 URL: http://svn.freebsd.org/changeset/base/237777 Log: Call set_terminal_mode() after video mode change, not before, because video mode change always reset terminal mode to xterm. It allows things like 'vidcontrol -T cons25 80x30' works as supposed, and allows 'allscreens_flags="-T cons25 80x30"' in /etc/rc.conf too. MFC after: 1 week Modified: head/usr.sbin/vidcontrol/vidcontrol.c Modified: head/usr.sbin/vidcontrol/vidcontrol.c ============================================================================== --- head/usr.sbin/vidcontrol/vidcontrol.c Fri Jun 29 12:11:31 2012 (r237776) +++ head/usr.sbin/vidcontrol/vidcontrol.c Fri Jun 29 12:55:36 2012 (r237777) @@ -1192,15 +1192,13 @@ set_terminal_mode(char *arg) fprintf(stderr, "\033[=T"); else if (strcmp(arg, "cons25") == 0) fprintf(stderr, "\033[=1T"); - else - usage(); } int main(int argc, char **argv) { - char *font, *type; + char *font, *type, *termmode; int dumpmod, dumpopt, opt; int reterr; @@ -1212,6 +1210,7 @@ main(int argc, char **argv) err(1, "must be on a virtual console"); dumpmod = 0; dumpopt = DUMP_FBF; + termmode = NULL; while ((opt = getopt(argc, argv, "b:Cc:df:g:h:Hi:l:LM:m:pPr:S:s:T:t:x")) != -1) switch(opt) { @@ -1283,7 +1282,10 @@ main(int argc, char **argv) set_console(optarg); break; case 'T': - set_terminal_mode(optarg); + if (strcmp(optarg, "xterm") != 0 && + strcmp(optarg, "cons25") != 0) + usage(); + termmode = optarg; break; case 't': set_screensaver_timeout(optarg); @@ -1306,6 +1308,8 @@ main(int argc, char **argv) } video_mode(argc, argv, &optind); + if (termmode != NULL) + set_terminal_mode(termmode); get_normal_colors(argc, argv, &optind); From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 14:08: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 93549106564A; Fri, 29 Jun 2012 14:08:08 +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 3DD588FC0C; Fri, 29 Jun 2012 14:08:08 +0000 (UTC) Received: from localhost (58.wheelsystems.com [83.12.187.58]) by mail.dawidek.net (Postfix) with ESMTPSA id 1883C87F; Fri, 29 Jun 2012 16:08:07 +0200 (CEST) Date: Fri, 29 Jun 2012 16:06:03 +0200 From: Pawel Jakub Dawidek To: John Baldwin Message-ID: <20120629140603.GA1389@garage.freebsd.pl> References: <201206271808.q5RI8m0d024853@svn.freebsd.org> <201206271517.26128.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mP3DRpeJDSE+ciuQ" Content-Disposition: inline In-Reply-To: <201206271517.26128.jhb@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: r237656 - in head: contrib/top usr.bin/top X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 29 Jun 2012 14:08:08 -0000 --mP3DRpeJDSE+ciuQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 27, 2012 at 03:17:26PM -0400, John Baldwin wrote: > On Wednesday, June 27, 2012 2:08:48 pm John Baldwin wrote: > > Author: jhb > > Date: Wed Jun 27 18:08:48 2012 > > New Revision: 237656 > > URL: http://svn.freebsd.org/changeset/base/237656 > >=20 > > Log: > > Add a new line to top that provides a brief summary of the ZFS ARC me= mory > > usage on hosts using ZFS. The new line displays the total amount of = RAM > > used by the ARC along with the size of MFU, MRU, anonymous (in flight= ), > > headers, and other (miscellaneous) sub-categories. The line is not > > displayed on systems that are not using ZFS. > > =20 > > Reviewed by: avg, fs@ > > MFC after: 3 days >=20 > FYI, sample output: >=20 > CPU: 0.0% user, 0.0% nice, 0.0% system, 0.0% interrupt, 100% idle > Mem: 1252M Active, 1422M Inact, 23G Wired, 331M Buf, 21G Free > ARC: 21G Total, 1354M MRU, 19G MFU, 272K Anon, 243M Header, 447M Other > Swap: 8192M Total, 8192M Free Cool:) --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --mP3DRpeJDSE+ciuQ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/ttksACgkQForvXbEpPzSKiQCgxJlJHN1Vo5ex8ZvjQK9m/4M5 yLIAnjpwAxQSGIK4LXcYab7+EFtap2Xc =zgEf -----END PGP SIGNATURE----- --mP3DRpeJDSE+ciuQ-- From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 15:21: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 C3D97106566B; Fri, 29 Jun 2012 15:21:10 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 844768FC12; Fri, 29 Jun 2012 15:21:10 +0000 (UTC) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.5/8.14.5) with ESMTP id q5TFL9HF077956; Fri, 29 Jun 2012 08:21:10 -0700 (PDT) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.5/8.14.5/Submit) id q5TFL9oY077954; Fri, 29 Jun 2012 08:21:09 -0700 (PDT) (envelope-from obrien) Date: Fri, 29 Jun 2012 08:21:09 -0700 From: "David O'Brien" To: "Pedro F. Giffuni" Message-ID: <20120629152109.GA70522@dragon.NUXI.org> References: <201206270439.q5R4dU0n081732@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201206270439.q5R4dU0n081732@svn.freebsd.org> X-Operating-System: FreeBSD 10.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r237624 - in head: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize cddl/contrib/opensolaris/lib/libdtrace/common sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/c... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: 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, 29 Jun 2012 15:21:10 -0000 On Wed, Jun 27, 2012 at 04:39:30AM +0000, Pedro F. Giffuni wrote: > Log: > Bring llquantize support into Dtrace. > Bryan Cantrill implemented the equivalent of semi-log graph > paper for Dtrace so llquantize will use one logarithmic and > one linear scale. ... > Obtained from: Illumos ... > Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTOREVEN.nodivide.d > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_FACTOREVEN.nodivide.d Wed Jun 27 04:39:30 2012 (r237624) > @@ -0,0 +1,29 @@ > +/* > + * CDDL HEADER START > + * > + * 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. ... > +/* > + * Copyright (c) 2011, Joyent, Inc. All rights reserved. > + */ Pedro, It looks like you simply 'svn add'ed this file, rather than importing it into '^/vendor/opensolaris/dist'. Please correct me if I am wrong. We've become rather sloppy in the past 1-2 years in our handling of 3rd-party externally developed code. Something we need to return to our older ways good ways of handling. This is something that is especially important with GPL, CDDL, and similar licenses. Commercial entities that base products on FreeBSD have to worry about code provenance for various intellectual property legal reasons and we muddy the waters when we make it harder to track who and where code came from. [Please see http://www.osgeo.org/incubator/process/codereview.html & http://wiki.osgeo.org/wiki/Code_Provenance_Review to better understand this issue.] Not following our established procedure also means that the average developer(committer) and commercial consumer will have their expectations fail. One expects to be able to find the stock vendor sources in ssh://svn.freebsd.org/base/vendor/ and to be able to find FreeBSD local changes to the sources thru 'svn diff' against 'ssh://svn.freebsd.org/base/head'. Please correct this by properly importing the sources, 'svn delete'ing the files you 'svn add'ed, and do an 'svn copy' of the new files. thanks, -- -- David (obrien@FreeBSD.org) From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 15:21:35 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 A28A41065670; Fri, 29 Jun 2012 15:21:35 +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 74F108FC0A; Fri, 29 Jun 2012 15:21: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 q5TFLZRv053269; Fri, 29 Jun 2012 15:21:35 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5TFLZe8053266; Fri, 29 Jun 2012 15:21:35 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201206291521.q5TFLZe8053266@svn.freebsd.org> From: John Baldwin Date: Fri, 29 Jun 2012 15:21: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: r237787 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jun 2012 15:21:35 -0000 Author: jhb Date: Fri Jun 29 15:21:34 2012 New Revision: 237787 URL: http://svn.freebsd.org/changeset/base/237787 Log: Hold GIF_LOCK() for almost all of gif_start(). It is required to be held across in_gif_output() and in6_gif_output() anyway, and once it is held across those it might as well be held for the entire loop. This simplifies the code and removes the need for the custom IFF_GIF_WANTED flag (which belonged in the softc and not as an IFF_* flag anyway). Tested by: Vincent Hoffman vince unsane co uk Modified: head/sys/net/if.h head/sys/net/if_gif.c Modified: head/sys/net/if.h ============================================================================== --- head/sys/net/if.h Fri Jun 29 15:10:54 2012 (r237786) +++ head/sys/net/if.h Fri Jun 29 15:21:34 2012 (r237787) @@ -153,7 +153,6 @@ struct if_data { #define IFF_STATICARP 0x80000 /* (n) static ARP */ #define IFF_DYING 0x200000 /* (n) interface is winding down */ #define IFF_RENAMING 0x400000 /* (n) interface is being renamed */ -#define IFF_GIF_WANTED 0x1000000 /* (n) The gif tunnel is wanted */ /* * Old names for driver flags so that user space tools can continue to use * the old (portable) names. Modified: head/sys/net/if_gif.c ============================================================================== --- head/sys/net/if_gif.c Fri Jun 29 15:10:54 2012 (r237786) +++ head/sys/net/if_gif.c Fri Jun 29 15:21:34 2012 (r237787) @@ -359,15 +359,7 @@ gif_start(struct ifnet *ifp) sc = ifp->if_softc; GIF_LOCK(sc); - if (ifp->if_drv_flags & IFF_DRV_OACTIVE) { - /* Already active */ - ifp->if_drv_flags |= IFF_GIF_WANTED; - GIF_UNLOCK(sc); - return; - } ifp->if_drv_flags |= IFF_DRV_OACTIVE; - GIF_UNLOCK(sc); -keep_going: while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { IFQ_DRV_DEQUEUE(&ifp->if_snd, m); @@ -424,16 +416,6 @@ keep_going: ifp->if_oerrors++; } - GIF_LOCK(sc); - if (ifp->if_drv_flags & IFF_GIF_WANTED) { - /* Someone did a start while - * we were unlocked and processing - * lets clear the flag and try again. - */ - ifp->if_drv_flags &= ~IFF_GIF_WANTED; - GIF_UNLOCK(sc); - goto keep_going; - } ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; GIF_UNLOCK(sc); return; From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 15:54: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 8A0031065670; Fri, 29 Jun 2012 15:54:08 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 74E6B8FC17; Fri, 29 Jun 2012 15:54: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 q5TFs8Uv054855; Fri, 29 Jun 2012 15:54:08 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5TFs8NK054852; Fri, 29 Jun 2012 15:54:08 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201206291554.q5TFs8NK054852@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 29 Jun 2012 15:54: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: r237794 - head/tools/regression/filemon X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 29 Jun 2012 15:54:08 -0000 Author: obrien Date: Fri Jun 29 15:54:07 2012 New Revision: 237794 URL: http://svn.freebsd.org/changeset/base/237794 Log: Support also running a 32-bit test on 64-bit platforms. Modified: head/tools/regression/filemon/Makefile Modified: head/tools/regression/filemon/Makefile ============================================================================== --- head/tools/regression/filemon/Makefile Fri Jun 29 15:47:03 2012 (r237793) +++ head/tools/regression/filemon/Makefile Fri Jun 29 15:54:07 2012 (r237794) @@ -9,16 +9,18 @@ CFLAGS+= -I${.CURDIR}/../../../sys # Cannot use .OBJDIR -- 'filemontest' expects 'test_script.sh' in . test: ${PROG} clean-test +.for BIN in ${PROG} ${PROG}32 cd ${.CURDIR} ; \ for A in 1 2 3 4 5 6 7 8 9 0; do \ for B in 1 2 3 4 5 6 7 8 9 0; do \ for C in 1 2 3 4 5 6 7 8 9 0; do \ - ${.OBJDIR}/${PROG} ;\ + test -x ${BIN} && ${.OBJDIR}/${BIN} ;\ done ;\ done ;\ done @cd ${.CURDIR} ; set +e ; egrep '(Start|Stop) .*\.' filemon_log.* | \ grep -q -v '\.[0-9][0-9][0-9][0-9][0-9][0-9]$$' || echo "Time stamp format OK" +.endfor clean-test: cd ${.CURDIR} ; rm -f filemon_log.* From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 16:21:20 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 4C23410656D7; Fri, 29 Jun 2012 16:21:20 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id B95918FC19; Fri, 29 Jun 2012 16:21:19 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id q5TGFQd4089721; Fri, 29 Jun 2012 18:15:26 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id q5TGFQRm089720; Fri, 29 Jun 2012 18:15:26 +0200 (CEST) (envelope-from marius) Date: Fri, 29 Jun 2012 18:15:26 +0200 From: Marius Strobl To: "Kenneth D. Merry" Message-ID: <20120629161525.GK69382@alchemy.franken.de> References: <201206282048.q5SKmOON097814@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201206282048.q5SKmOON097814@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r237730 - in head/sys: powerpc/conf sparc64/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, 29 Jun 2012 16:21:20 -0000 On Thu, Jun 28, 2012 at 08:48:24PM +0000, Kenneth D. Merry wrote: > Author: ken > Date: Thu Jun 28 20:48:24 2012 > New Revision: 237730 > URL: http://svn.freebsd.org/changeset/base/237730 > > Log: > Now that the mps(4) driver is endian-safe, add it to the powerpc and > sparc64 GENERIC config files. > Thanks! Marius From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 16: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 7996E1065672; Fri, 29 Jun 2012 16:50:53 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A0DC8FC15; Fri, 29 Jun 2012 16: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 q5TGorkE057451; Fri, 29 Jun 2012 16:50:53 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5TGorai057448; Fri, 29 Jun 2012 16:50:53 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201206291650.q5TGorai057448@svn.freebsd.org> From: Navdeep Parhar Date: Fri, 29 Jun 2012 16:50: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: r237799 - head/sys/dev/cxgbe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 29 Jun 2012 16:50:53 -0000 Author: np Date: Fri Jun 29 16:50:52 2012 New Revision: 237799 URL: http://svn.freebsd.org/changeset/base/237799 Log: cxgbe(4): support for IPv6 hardware checksumming (rx and tx). Modified: head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Fri Jun 29 16:30:15 2012 (r237798) +++ head/sys/dev/cxgbe/t4_main.c Fri Jun 29 16:50:52 2012 (r237799) @@ -822,7 +822,7 @@ cxgbe_probe(device_t dev) #define T4_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | \ IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO | \ - IFCAP_VLAN_HWTSO) + IFCAP_VLAN_HWTSO | IFCAP_HWCSUM_IPV6) #define T4_CAP_ENABLE (T4_CAP & ~IFCAP_TSO6) static int @@ -856,7 +856,8 @@ cxgbe_attach(device_t dev) ifp->if_capabilities |= IFCAP_TOE4; #endif ifp->if_capenable = T4_CAP_ENABLE; - ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO; + ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO | + CSUM_UDP_IPV6 | CSUM_TCP_IPV6; /* Initialize ifmedia for this port */ ifmedia_init(&pi->media, IFM_IMASK, cxgbe_media_change, @@ -1028,30 +1029,50 @@ fail: if (IFCAP_TSO & ifp->if_capenable && !(IFCAP_TXCSUM & ifp->if_capenable)) { - ifp->if_capenable &= ~IFCAP_TSO; - ifp->if_hwassist &= ~CSUM_TSO; + ifp->if_capenable &= ~IFCAP_TSO4; if_printf(ifp, "tso disabled due to -txcsum.\n"); } } + if (mask & IFCAP_TXCSUM_IPV6) { + ifp->if_capenable ^= IFCAP_TXCSUM_IPV6; + ifp->if_hwassist ^= (CSUM_UDP_IPV6 | CSUM_TCP_IPV6); + + if (IFCAP_TSO6 & ifp->if_capenable && + !(IFCAP_TXCSUM_IPV6 & ifp->if_capenable)) { + ifp->if_capenable &= ~IFCAP_TSO6; + if_printf(ifp, + "tso6 disabled due to -txcsum6.\n"); + } + } if (mask & IFCAP_RXCSUM) ifp->if_capenable ^= IFCAP_RXCSUM; + if (mask & IFCAP_RXCSUM_IPV6) + ifp->if_capenable ^= IFCAP_RXCSUM_IPV6; + + /* + * Note that we leave CSUM_TSO alone (it is always set). The + * kernel takes both IFCAP_TSOx and CSUM_TSO into account before + * sending a TSO request our way, so it's sufficient to toggle + * IFCAP_TSOx only. + */ if (mask & IFCAP_TSO4) { + if (!(IFCAP_TSO4 & ifp->if_capenable) && + !(IFCAP_TXCSUM & ifp->if_capenable)) { + if_printf(ifp, "enable txcsum first.\n"); + rc = EAGAIN; + goto fail; + } ifp->if_capenable ^= IFCAP_TSO4; - - if (IFCAP_TSO & ifp->if_capenable) { - if (IFCAP_TXCSUM & ifp->if_capenable) - ifp->if_hwassist |= CSUM_TSO; - else { - ifp->if_capenable &= ~IFCAP_TSO; - ifp->if_hwassist &= ~CSUM_TSO; - if_printf(ifp, - "enable txcsum first.\n"); - rc = EAGAIN; - goto fail; - } - } else - ifp->if_hwassist &= ~CSUM_TSO; + } + if (mask & IFCAP_TSO6) { + if (!(IFCAP_TSO6 & ifp->if_capenable) && + !(IFCAP_TXCSUM_IPV6 & ifp->if_capenable)) { + if_printf(ifp, "enable txcsum6 first.\n"); + rc = EAGAIN; + goto fail; + } + ifp->if_capenable ^= IFCAP_TSO6; } if (mask & IFCAP_LRO) { #ifdef INET Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Fri Jun 29 16:30:15 2012 (r237798) +++ head/sys/dev/cxgbe/t4_sge.c Fri Jun 29 16:50:52 2012 (r237799) @@ -1054,15 +1054,23 @@ t4_eth_rx(struct sge_iq *iq, const struc m0->m_flags |= M_FLOWID; m0->m_pkthdr.flowid = rss->hash_val; - if (cpl->csum_calc && !cpl->err_vec && - ifp->if_capenable & IFCAP_RXCSUM) { - m0->m_pkthdr.csum_flags |= (CSUM_IP_CHECKED | - CSUM_IP_VALID | CSUM_DATA_VALID | CSUM_PSEUDO_HDR); - if (cpl->ip_frag) + if (cpl->csum_calc && !cpl->err_vec) { + if (ifp->if_capenable & IFCAP_RXCSUM && + cpl->l2info & htobe32(F_RXF_IP)) { + m0->m_pkthdr.csum_flags |= (CSUM_IP_CHECKED | + CSUM_IP_VALID | CSUM_DATA_VALID | CSUM_PSEUDO_HDR); + rxq->rxcsum++; + } else if (ifp->if_capenable & IFCAP_RXCSUM_IPV6 && + cpl->l2info & htobe32(F_RXF_IP6)) { + m0->m_pkthdr.csum_flags |= (CSUM_DATA_VALID_IPV6 | + CSUM_PSEUDO_HDR); + rxq->rxcsum++; + } + + if (__predict_false(cpl->ip_frag)) m0->m_pkthdr.csum_data = be16toh(cpl->csum); else m0->m_pkthdr.csum_data = 0xffff; - rxq->rxcsum++; } if (cpl->vlan_ex) { @@ -2827,9 +2835,11 @@ write_txpkt_wr(struct port_info *pi, str ctrl1 = 0; if (!(m->m_pkthdr.csum_flags & CSUM_IP)) ctrl1 |= F_TXPKT_IPCSUM_DIS; - if (!(m->m_pkthdr.csum_flags & (CSUM_TCP | CSUM_UDP))) + if (!(m->m_pkthdr.csum_flags & (CSUM_TCP | CSUM_UDP | CSUM_UDP_IPV6 | + CSUM_TCP_IPV6))) ctrl1 |= F_TXPKT_L4CSUM_DIS; - if (m->m_pkthdr.csum_flags & (CSUM_IP | CSUM_TCP | CSUM_UDP)) + if (m->m_pkthdr.csum_flags & (CSUM_IP | CSUM_TCP | CSUM_UDP | + CSUM_UDP_IPV6 | CSUM_TCP_IPV6)) txq->txcsum++; /* some hardware assistance provided */ /* VLAN tag insertion */ From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 17:00: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 9DE50106564A; Fri, 29 Jun 2012 17:00:52 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 891258FC0A; Fri, 29 Jun 2012 17:00: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 q5TH0qGC057892; Fri, 29 Jun 2012 17:00:52 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5TH0q0U057890; Fri, 29 Jun 2012 17:00:52 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201206291700.q5TH0q0U057890@svn.freebsd.org> From: "Kenneth D. Merry" Date: Fri, 29 Jun 2012 17:00: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: r237800 - head/sys/dev/mps X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 29 Jun 2012 17:00:52 -0000 Author: ken Date: Fri Jun 29 17:00:52 2012 New Revision: 237800 URL: http://svn.freebsd.org/changeset/base/237800 Log: Change the mps(4) driver to only scan a target if that is what is needed instead of scanning the full bus every time. Submitted by: mav Discussed with: Sreekanth Reddy MFC after: 3 days Modified: head/sys/dev/mps/mps_sas.c Modified: head/sys/dev/mps/mps_sas.c ============================================================================== --- head/sys/dev/mps/mps_sas.c Fri Jun 29 16:50:52 2012 (r237799) +++ head/sys/dev/mps/mps_sas.c Fri Jun 29 17:00:52 2012 (r237800) @@ -278,8 +278,11 @@ mpssas_rescan_target(struct mps_softc *s return; } - /* XXX Hardwired to scan the bus for now */ - ccb->ccb_h.func_code = XPT_SCAN_BUS; + if (targetid == CAM_TARGET_WILDCARD) + ccb->ccb_h.func_code = XPT_SCAN_BUS; + else + ccb->ccb_h.func_code = XPT_SCAN_TGT; + mps_dprint(sc, MPS_TRACE, "%s targetid %u\n", __func__, targetid); mpssas_rescan(sassc, ccb); } From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 17:11: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 42B1D106564A for ; Fri, 29 Jun 2012 17:11:24 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from nm28-vm0.bullet.mail.sp2.yahoo.com (nm28-vm0.bullet.mail.sp2.yahoo.com [98.139.91.234]) by mx1.freebsd.org (Postfix) with SMTP id 131A58FC15 for ; Fri, 29 Jun 2012 17:11:24 +0000 (UTC) Received: from [72.30.22.79] by nm28.bullet.mail.sp2.yahoo.com with NNFMP; 29 Jun 2012 17:09:09 -0000 Received: from [98.139.91.30] by tm13.bullet.mail.sp2.yahoo.com with NNFMP; 29 Jun 2012 17:09:09 -0000 Received: from [127.0.0.1] by omp1030.mail.sp2.yahoo.com with NNFMP; 29 Jun 2012 17:09:09 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 796.99664.bm@omp1030.mail.sp2.yahoo.com Received: (qmail 74577 invoked by uid 60001); 29 Jun 2012 17:09:08 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1340989748; bh=UbCf8UXXvvWXgK70ZEdFIizRcSEsjw9ueKNQVIjceL4=; h=X-YMail-OSG:Received:X-RocketYMMF:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=LwN1Uyl3Wxwgu/AF30BGGDwVyuQEWMm5lQJZJSxepZrSYemh3UuByltY3LwlQ0P3LjN3G9rdjjE1fqQL1gWQGBuucmCl1l4MJWmNl7juRgZl9IfBZoFgIjce5lb3vQW1P8nHctuXaQbGs9fhAFgWPlHLBhX6xQYtJpYKEZcrzF0= X-YMail-OSG: mMhv.6IVM1lJX_9_6oGmO9svJ0DRx_uSOaLLp9qPtqoqedg _8wdpdfKZitlFUp4dpMsKg8hnoe6jN3GKFpK2lc41Ch72dywAluyGfPLk8sd vRzj8h5EDi.XPrBdgeGs6vEs6uYr9IWKCs8ZiTCuZoi7SQRgGVVk_f84VQbD iYAcW0ju86MQ7tTVqzZb1XiQaSlUoivAITfLRA1YOzBoXjKSzlLOaXpwcenp q42CujW57gPGbrleRmo4qx0rk1hDMtVoYjmp_p7vNhQ2zSwoJZh2BKOhK.a_ tcAakFrGMOb4Ks0b92x8BbaUsNMPKDNP5vqqu.ar24HQTPveJag.Y6uF9Zko dSe6WNwgZISJOYzJwdDDfy3OUVZPIopr.vn2WyFOI5q2K.H8ioZSsR.lI3Bh urMV9KKLBKB0Cl3KgIV_bMGEZ0_ecH5WdDYmMgGEBG3CTxBDLcjO4kWZtKen PfByQjhuli5I_ofAeLLlvh0VIklJ.IGXPobdXkbBEzGpGbipfCdxz6ZQDOBt p9JIyhQeAwCPRfeqyUamifI7j0XGBaEteBTVaKCaHcjFOmOsLaowa_gkkvky XFQLY3GFtaitK2saFj4o- Received: from [200.118.157.7] by web113504.mail.gq1.yahoo.com via HTTP; Fri, 29 Jun 2012 10:09:08 PDT X-RocketYMMF: giffunip X-Mailer: YahooMailClassic/15.0.8 YahooMailWebService/0.8.118.349524 Message-ID: <1340989748.73663.YahooMailClassic@web113504.mail.gq1.yahoo.com> Date: Fri, 29 Jun 2012 10:09:08 -0700 (PDT) From: Pedro Giffuni To: obrien@FreeBSD.org In-Reply-To: <20120629152109.GA70522@dragon.NUXI.org> MIME-Version: 1.0 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: r237624 - in head: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize cddl/contrib/opensolaris/lib/libdtrace/common sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/c... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pfg@freebsd.org List-Id: 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, 29 Jun 2012 17:11:24 -0000 Hi David;=0A=0A--- Ven 29/6/12, David O'Brien ha scrit= to:=0A...=0A> ...=0A> > +/*=0A> > + * Copyright (c) 2011, Joyent, Inc. All = rights=0A> reserved.=0A> > + */=0A> =0A> Pedro,=0A> It looks like you simpl= y 'svn add'ed this file, rather than=0A> importing it into '^/vendor/openso= laris/dist'.=A0 =0A> Please correct me if I am wrong.=0A> =0A=0AYou are abs= olutely right. However I am not sure we should=0Abring Illumos enhancements= under the opensolaris vendor=0Abranch. The reason is that this files are C= DDL'd but are=0Athere was no property assignment done to the OpenSolaris=0A= copyright owner. [1]=0A=0AIf somehow Oracle decides to relicense Dtrace or = ZFS we=0Astill must keep these changes isolated from the code=0Aprovided in= the vendor branch.=0A=0A=0A> We've become rather sloppy in the past 1-2 ye= ars in our=0A> handling of 3rd-party externally developed code.=A0 Somethin= g=0A> we need to return to our older ways good ways of handling.=0A> =0A=0A= Yes, that is true.=0A=0AI think we have to decide if we are going to consid= er=0AIllumos a vendor on it's own. For ZFS it would seem=0Athe right thing = to do, for Dtrace I am not sure: at=0Aleast I am not considering bringing a= ny other feature=0Aat this time.=0A=0A=0AThank you for the links on Code Pr= ovenance Review.=0A=0A> =0A> Please correct this by properly importing the = sources, 'svn=0A> delete'ing the files you 'svn add'ed, and do an 'svn copy= '=0A> of the new files.=0A>=0A=0AI think the discussion is indeed important= enough to=0Asuspend the MFC I was planning and if desired I can=0Aalso rev= ert the commit.=0A=0APedro.=0A=0A=0A[1] http://smartos.org/2011/12/15/fork-= yeah-the-rise-and-development-of-illumos-2/ From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 17:36: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 9257B1065672 for ; Fri, 29 Jun 2012 17:36:01 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from nm29-vm0.bullet.mail.sp2.yahoo.com (nm29-vm0.bullet.mail.sp2.yahoo.com [98.139.91.236]) by mx1.freebsd.org (Postfix) with SMTP id 62EDD8FC18 for ; Fri, 29 Jun 2012 17:36:01 +0000 (UTC) Received: from [72.30.22.79] by nm29.bullet.mail.sp2.yahoo.com with NNFMP; 29 Jun 2012 17:36:01 -0000 Received: from [72.30.22.187] by tm13.bullet.mail.sp2.yahoo.com with NNFMP; 29 Jun 2012 17:36:00 -0000 Received: from [127.0.0.1] by omp1063.mail.sp2.yahoo.com with NNFMP; 29 Jun 2012 17:36:00 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 413218.63982.bm@omp1063.mail.sp2.yahoo.com Received: (qmail 71746 invoked by uid 60001); 29 Jun 2012 17:35:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1340991359; bh=e87NgSNbjzhVbxJKawDjb9K6C5JHE8ZQSZHA1yAqUlQ=; h=X-YMail-OSG:Received:X-RocketYMMF:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=5khTvpvb5ZNTkfUqm2WoUVei3wdOex41ABhVFG3V8fIV76CyVOWONQgrwyuATiEIm1V4CPY0pK+7GiIACgmUma354r6zN1QOptEegnfWQAZ5sM5iBNWp/1V3JDr/TPJcPqp6UVmPYQPVOCN9IX5ZmdffwiS8ki7CMKnYvJgfSb0= X-YMail-OSG: f_fwSQUVM1nrp5k.49GZ9aOk0l6ag6GZeeyfemQHU5bWCPA szul7gdx2H3CVyFFh8l8S423LaK7MoeM.m2vKkFOCelBnzCbaQT0mBRt0rmQ 6Vp7j3KDl2SYXfXmu33UGKU7cdGZI.WYsRDcDE7UYXLp9po8HYp8A5YS8mRR n6mKd2RRu8du3tWTRunYq3VnsRnBSDpLFM1ThDDmKg6_wL7_QNwXooTdddjY SS_.oxyUEobXd51.VVzVq04aeOuZ72zns_UrLCzcMyazpjTIV6djBeFnM7wg b5WoP_HgQI2g4AtLPhFb5gMBnUjb1s6gKg23E8T4nleLDxc_aj_cLMQ_RexP c9y7ZLD_7V_HPpcQRcaG9QYgU1GFuifcLcj_Rt8oKUPMSdXl.l5_TKH_XidQ 29bQuy4OVRv5f6iRZbJqkptoi7M.hCgUxVfAnNmqANzLj4XzUzphYkMTH9nC gfVZ4RpZxSPSmYbmLeBaSOVmEvYR4OInHhnEYqFvo3j26YptenzVkFyiYNf9 23qjLG7N_iuDsNA8IXRrroOz29Zg40MKZA84- Received: from [200.118.157.7] by web113502.mail.gq1.yahoo.com via HTTP; Fri, 29 Jun 2012 10:35:59 PDT X-RocketYMMF: giffunip X-Mailer: YahooMailClassic/15.0.8 YahooMailWebService/0.8.118.349524 Message-ID: <1340991359.60778.YahooMailClassic@web113502.mail.gq1.yahoo.com> Date: Fri, 29 Jun 2012 10:35:59 -0700 (PDT) From: Pedro Giffuni To: obrien@FreeBSD.org In-Reply-To: <20120629152109.GA70522@dragon.NUXI.org> MIME-Version: 1.0 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: r237624 - in head: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize cddl/contrib/opensolaris/lib/libdtrace/common sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/c... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pfg@freebsd.org List-Id: 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, 29 Jun 2012 17:36:01 -0000 (Sorry for top-posting]=0A=0AActually ...=0A=0ADavid pointed out a fundamen= tal flaw on my part.=0A=0AThese are new files under a non-BSD license. Even= when=0Athey are only scripts used for testing I shouldn't have=0Abrought t= hem in without -core approval.=0A=0AI will delete them right away and core = shall decide=0Aafterwards if and how they can be brought in.=0A=0APedro.=0A= =0A=0A--- Ven 29/6/12, David O'Brien ha scritto:=0A=0A= > Da: David O'Brien =0A> Oggetto: Re: svn commit: r2376= 24 - in head: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantiz= e cddl/contrib/opensolaris/lib/libdtrace/common sys/cddl/contrib/opensolari= s/uts/common/dtrace sys/cddl/c...=0A> A: "Pedro F. Giffuni" =0A> Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-hea= d@FreeBSD.org=0A> Data: Venerd=EC 29 giugno 2012, 10:21=0A> On Wed, Jun 27,= 2012 at 04:39:30AM=0A> +0000, Pedro F. Giffuni wrote:=0A> > Log:=0A> >=A0= =A0=A0Bring llquantize support into Dtrace.=0A> >=A0=A0=A0Bryan Cantrill im= plemented the=0A> equivalent of semi-log graph=0A> >=A0=A0=A0paper for Dtra= ce so llquantize will=0A> use one logarithmic and=0A> >=A0=A0=A0one linear = scale.=0A> ...=0A> >=A0=A0=A0Obtained from:=A0=A0=A0=0A> Illumos=0A> ...=0A= > > Added:=0A> head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llq= uantize/err.D_LLQUANT_FACTOREVEN.nodivide.d=0A> >=0A> =3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A> > --- /= dev/null=A0=A0=A0 00:00:00=0A> 1970=A0=A0=A0 (empty, because file is newly = added)=0A> > +++=0A> head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/comm= on/llquantize/err.D_LLQUANT_FACTOREVEN.nodivide.d=A0=A0=A0=0A> Wed Jun 27 0= 4:39:30 2012=A0=A0=A0 (r237624)=0A> > @@ -0,0 +1,29 @@=0A> > +/*=0A> > + * = CDDL HEADER START=0A> > + *=0A> > + * The contents of this file are subject= to the terms=0A> of the=0A> > + * Common Development and Distribution Lice= nse (the=0A> "License").=0A> > + * You may not use this file except in comp= liance with=0A> the License.=0A> ...=0A> > +/*=0A> > + * Copyright (c) 2011= , Joyent, Inc. All rights=0A> reserved.=0A> > + */=0A> =0A> Pedro,=0A> It l= ooks like you simply 'svn add'ed this file, rather than=0A> importing it=0A= > into '^/vendor/opensolaris/dist'.=A0 Please correct me if=0A> I am wrong.= =0A> =0A> We've become rather sloppy in the past 1-2 years in our=0A> handl= ing of=0A> 3rd-party externally developed code.=A0 Something we need=0A> to= return to=0A> our older ways good ways of handling.=0A> =0A> This is somet= hing that is especially important with GPL,=0A> CDDL, and=0A> similar licen= ses.=0A> =0A> Commercial entities that base products on FreeBSD have to=0A>= worry about=0A> code provenance for various intellectual property legal=0A= > reasons and we=0A> muddy the waters when we make it harder to track who a= nd=0A> where code came=0A> from.=0A> [Please see http://www.osgeo.org/incub= ator/process/codereview.html=0A> &=0A> http://wiki.osgeo.org/wiki/Code_Prov= enance_Review to=0A> better understand=0A> this issue.]=0A> =0A> Not follow= ing our established procedure also means that the=0A> average=0A> developer= (committer) and commercial consumer will have their=0A> expectations=0A> fa= il.=A0 One expects to be able to find the stock vendor=0A> sources in=0A> s= sh://svn.freebsd.org/base/vendor/ and to be able to find=0A> FreeBSD local= =0A> changes to the sources thru 'svn diff' against=0A> 'ssh://svn.freebsd.= org/base/head'.=0A> =0A> Please correct this by properly importing the sour= ces, 'svn=0A> delete'ing=0A> the files you 'svn add'ed, and do an 'svn copy= ' of the new=0A> files.=0A> =0A> thanks,=0A> -- =0A> -- David=A0 (obrien@Fr= eeBSD.org)=0A> From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 17:48:25 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 E5822106566C; Fri, 29 Jun 2012 17:48:25 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from vps.hungerhost.com (vps.hungerhost.com [216.38.53.176]) by mx1.freebsd.org (Postfix) with ESMTP id B312D8FC18; Fri, 29 Jun 2012 17:48:25 +0000 (UTC) Received: from [209.249.190.124] (port=58940 helo=gnnmac.hudson-trading.com) by vps.hungerhost.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.77) (envelope-from ) id 1SkfHi-0006Fw-1s; Fri, 29 Jun 2012 13:47:10 -0400 Mime-Version: 1.0 (Apple Message framework v1280) Content-Type: text/plain; charset=iso-8859-1 From: George Neville-Neil In-Reply-To: <1340991359.60778.YahooMailClassic@web113502.mail.gq1.yahoo.com> Date: Fri, 29 Jun 2012 13:47:00 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1340991359.60778.YahooMailClassic@web113502.mail.gq1.yahoo.com> To: pfg@freebsd.org X-Mailer: Apple Mail (2.1280) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - neville-neil.com Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, obrien@FreeBSD.org Subject: Re: svn commit: r237624 - in head: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize cddl/contrib/opensolaris/lib/libdtrace/common sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/c... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 29 Jun 2012 17:48:26 -0000 On Jun 29, 2012, at 13:35 , Pedro Giffuni wrote: > (Sorry for top-posting] >=20 > Actually ... >=20 > David pointed out a fundamental flaw on my part. >=20 > These are new files under a non-BSD license. Even when > they are only scripts used for testing I shouldn't have > brought them in without -core approval. >=20 > I will delete them right away and core shall decide > afterwards if and how they can be brought in. >=20 Are the files under a CDDL license? Since that's the point of where you = added them I don't think that that should be an issue. The issue comes when we = might ship CDDL code by default, but these are tests and so that should not be = a problem. If they're not CDDL then that is an issue. Best, George From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 17:51: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 DC900106564A; Fri, 29 Jun 2012 17:51:52 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from vps.hungerhost.com (vps.hungerhost.com [216.38.53.176]) by mx1.freebsd.org (Postfix) with ESMTP id ABFF38FC12; Fri, 29 Jun 2012 17:51:52 +0000 (UTC) Received: from [209.249.190.124] (port=59017 helo=gnnmac.hudson-trading.com) by vps.hungerhost.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.77) (envelope-from ) id 1SkfMG-0001Wo-C9; Fri, 29 Jun 2012 13:51:52 -0400 Mime-Version: 1.0 (Apple Message framework v1280) Content-Type: text/plain; charset=us-ascii From: George Neville-Neil In-Reply-To: <4FED5C51.9060603@FreeBSD.org> Date: Fri, 29 Jun 2012 13:51:52 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201206290735.q5T7ZbSk026312@svn.freebsd.org> <4FED5C51.9060603@FreeBSD.org> To: Andriy Gapon X-Mailer: Apple Mail (2.1280) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - neville-neil.com Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r237748 - in head/sys/cddl/dev/dtrace: amd64 i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jun 2012 17:51:53 -0000 On Jun 29, 2012, at 03:42 , Andriy Gapon wrote: > on 29/06/2012 10:35 Andriy Gapon said the following: >> Author: avg >> Date: Fri Jun 29 07:35:37 2012 >> New Revision: 237748 >> URL: http://svn.freebsd.org/changeset/base/237748 >>=20 >> Log: >> dtrace instruction decoder: add 0x0f 0x1f NOP opcode support >>=20 >> According to the AMD manual the whole range from 0x09 to 0x1f are = NOPs. >> Intel manual mentions only 0x1f. Use only Intel one for now, it = seems >> to be the one actually generated by compilers. >> Use gdb mnemonic for the operation: "nopw". >=20 > BTW, here I have a patch that brings our copy of dtrace dis_tables.c = to the > latest version available in OpenSolaris code: > http://people.freebsd.org/~avg/dtrace-disassm-osol.diff >=20 > I haven't studied at all what the newer code brings in, but it must be = some > fixes and improvements, I guess :-) > The change is mostly a mechanical merge, plus some changes on top to = get the > code to compile. > I've been using the code for a few weeks and haven't run into any = problems. >=20 > Should I put this change into the tree? Have you tried running the DTrace test suite on it? We have the suite = in the tree. If the suite passes similarly with and without the patch I'd say just = put it in and we'll go from there. It's quite a large patch, but, yes, much of it is mechanical changes. Best, George From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 17:59: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 7A381106564A for ; Fri, 29 Jun 2012 17:59:53 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from nm28-vm0.bullet.mail.sp2.yahoo.com (nm28-vm0.bullet.mail.sp2.yahoo.com [98.139.91.234]) by mx1.freebsd.org (Postfix) with SMTP id 4B6AC8FC0C for ; Fri, 29 Jun 2012 17:59:53 +0000 (UTC) Received: from [98.139.91.68] by nm28.bullet.mail.sp2.yahoo.com with NNFMP; 29 Jun 2012 17:59:53 -0000 Received: from [98.139.91.43] by tm8.bullet.mail.sp2.yahoo.com with NNFMP; 29 Jun 2012 17:58:53 -0000 Received: from [127.0.0.1] by omp1043.mail.sp2.yahoo.com with NNFMP; 29 Jun 2012 17:58:53 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 266804.82720.bm@omp1043.mail.sp2.yahoo.com Received: (qmail 19573 invoked by uid 60001); 29 Jun 2012 17:58:52 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1340992732; bh=+/DUDAo4zsbjXD2npi60yABYbPPS/PnDSHqKZ2oPgXc=; h=X-YMail-OSG:Received:X-RocketYMMF:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=WyLovxU3RECb8XMb6+rr6dwDO/GE/dTVo38cKrKMvZ71MBNlL4YqyVDZIV9ZDdl/+QzbVOmHi4AHSfXl2dfCDtJvr3wRzQ6N37l8si2g+RT+sEL9OCbqyAqLZOk3kVVDy4evvrzvbkTdzA7cKKg+LGywkjtbDnKroWO0P/zP8tw= X-YMail-OSG: dnx4GucVM1mSAZR7GON6RIVabfTltz2ijG_sTxj2w53bLau HsSBkpSoNoXFFVxI990YF9c7uWBgDwIuRnAh5zDKZ9OtmB2Fb3JFuQPT7kRI z5n7pTbdyWgvDHvbwClnk6enLmi4lCmggUi9Y9IGTeSG2qL7lBBwbFz3UDtk pE.FAuSoYowxTwY9nr.HNYIQl82sAU3rA2igqR0G.fGPZKxe5JflHlF53.P. vWTFQr0SD33deRWXScupGX_CTDXz_csMEvPC3r3eSW8hXW219r5QqdEVxXsj 3I_gEj0Sw.JZ6v.jeJDZ9MZHghvUqR2x.YerSCoU2L0xBKVITmlXWC0XBbn. xT9nPFyEIZPNDFcOCwPACD0w22izCz0WyEpiZNIMvq9aDArIhJxj7o5HA9Z4 9mwW_.nEVvWppqcvzrrGEOf8r_K1I8wZ2U1mroZo82FvCqPcos30h5f7OwS3 AH1yu Received: from [200.118.157.7] by web113501.mail.gq1.yahoo.com via HTTP; Fri, 29 Jun 2012 10:58:52 PDT X-RocketYMMF: giffunip X-Mailer: YahooMailClassic/15.0.8 YahooMailWebService/0.8.118.349524 Message-ID: <1340992732.19144.YahooMailClassic@web113501.mail.gq1.yahoo.com> Date: Fri, 29 Jun 2012 10:58:52 -0700 (PDT) From: Pedro Giffuni To: George Neville-Neil In-Reply-To: MIME-Version: 1.0 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, obrien@FreeBSD.org Subject: Re: svn commit: r237624 - in head: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize cddl/contrib/opensolaris/lib/libdtrace/common sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/c... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pfg@freebsd.org List-Id: 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, 29 Jun 2012 17:59:53 -0000 =0A=0A--- Ven 29/6/12, George Neville-Neil ha scritt= o:=0A=0A> Da: George Neville-Neil =0A> Oggetto: Re: s= vn commit: r237624 - in head: cddl/contrib/opensolaris/cmd/dtrace/test/tst/= common/llquantize cddl/contrib/opensolaris/lib/libdtrace/common sys/cddl/co= ntrib/opensolaris/uts/common/dtrace sys/cddl/c...=0A> A: pfg@freebsd.org=0A= > Cc: obrien@FreeBSD.org, src-committers@FreeBSD.org, svn-src-all@FreeBSD.o= rg, svn-src-head@FreeBSD.org=0A> Data: Venerd=EC 29 giugno 2012, 12:47=0A> = =0A> On Jun 29, 2012, at 13:35 , Pedro Giffuni wrote:=0A> =0A> > (Sorry for= top-posting]=0A> > =0A> > Actually ...=0A> > =0A> > David pointed out a fu= ndamental flaw on my part.=0A> > =0A> > These are new files under a non-BSD= license. Even when=0A> > they are only scripts used for testing I shouldn'= t=0A> have=0A> > brought them in without -core approval.=0A> > =0A> > I wil= l delete them right away and core shall decide=0A> > afterwards if and how = they can be brought in.=0A> > =0A> =0A> Are the files under a CDDL license?= =A0 Since that's the=0A> point of where you added them I don't think that t= hat=0A> should be an issue.=A0 The issue comes when we might=0A> ship CDDL = code by default, but these are tests and so that=0A> should not be a proble= m.=0A> =0A=0AThey are under CDDL. I re-read the committer's guide and=0Athe= y are right where they are.=0A=0ANow .. David pointed out I am not respecti= ng the code=0Aprovenance since I didn't add them to the opensolaris=0Avendo= r area, but these files are copyrighted Joyent=0AInc (not even Illumos) so = I cannot put them there=0Aunless we create a new vendor for Joyent.=0A=0AAs= George notes, they are only test files so we can=0Alive without them if th= is is too much mess.=0A=0APedro. From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 18:15: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 AC27B106564A; Fri, 29 Jun 2012 18:15:57 +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 8BD098FC12; Fri, 29 Jun 2012 18:15: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 q5TIFvQX062704; Fri, 29 Jun 2012 18:15:57 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5TIFv0A062702; Fri, 29 Jun 2012 18:15:57 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201206291815.q5TIFv0A062702@svn.freebsd.org> From: Alan Cox Date: Fri, 29 Jun 2012 18:15: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: r237813 - head/sys/amd64/amd64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 29 Jun 2012 18:15:57 -0000 Author: alc Date: Fri Jun 29 18:15:56 2012 New Revision: 237813 URL: http://svn.freebsd.org/changeset/base/237813 Log: In r237592, I forgot that pmap_enter() might already hold a PV list lock at the point that it calls get_pv_entry(). Thus, pmap_enter()'s PV list lock pointer must be passed to get_pv_entry() for those rare occasions when get_pv_entry() calls reclaim_pv_chunk(). Update some related comments. Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri Jun 29 18:09:39 2012 (r237812) +++ head/sys/amd64/amd64/pmap.c Fri Jun 29 18:15:56 2012 (r237813) @@ -264,7 +264,7 @@ static caddr_t crashdumpmap; static void free_pv_chunk(struct pv_chunk *pc); static void free_pv_entry(pmap_t pmap, pv_entry_t pv); -static pv_entry_t get_pv_entry(pmap_t pmap, boolean_t try); +static pv_entry_t get_pv_entry(pmap_t pmap, struct rwlock **lockp); static int popcnt_pc_map_elem(uint64_t elem); static vm_page_t reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **lockp); static void reserve_pv_entries(pmap_t pmap, int needed, @@ -2102,6 +2102,8 @@ SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_ * drastic measures to free some pages so we can allocate * another pv entry chunk. * + * Returns NULL if PV entries were reclaimed from the specified pmap. + * * We do not, however, unmap 2mpages because subsequent accesses will * allocate per-page pv entries until repromotion occurs, thereby * exacerbating the shortage of free pv entries. @@ -2123,6 +2125,7 @@ reclaim_pv_chunk(pmap_t locked_pmap, str rw_assert(&pvh_global_lock, RA_LOCKED); PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED); + KASSERT(lockp != NULL, ("reclaim_pv_chunk: lockp is NULL")); pmap = NULL; free = m_pc = NULL; TAILQ_INIT(&new_tail); @@ -2287,16 +2290,19 @@ free_pv_chunk(struct pv_chunk *pc) } /* - * get a new pv_entry, allocating a block from the system - * when needed. + * Returns a new PV entry, allocating a new PV chunk from the system when + * needed. If this PV chunk allocation fails and a PV list lock pointer was + * given, a PV chunk is reclaimed from an arbitrary pmap. Otherwise, NULL is + * returned. + * + * The given PV list lock may be released. */ static pv_entry_t -get_pv_entry(pmap_t pmap, boolean_t try) +get_pv_entry(pmap_t pmap, struct rwlock **lockp) { int bit, field; pv_entry_t pv; struct pv_chunk *pc; - struct rwlock *lock; vm_page_t m; rw_assert(&pvh_global_lock, RA_LOCKED); @@ -2330,14 +2336,11 @@ retry: m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED); if (m == NULL) { - if (try) { + if (lockp == NULL) { PV_STAT(pc_chunk_tryfail++); return (NULL); } - lock = NULL; - m = reclaim_pv_chunk(pmap, &lock); - if (lock != NULL) - rw_wunlock(lock); + m = reclaim_pv_chunk(pmap, lockp); if (m == NULL) goto retry; } @@ -2380,6 +2383,8 @@ popcnt_pc_map_elem(uint64_t elem) /* * Ensure that the number of spare PV entries in the specified pmap meets or * exceeds the given count, "needed". + * + * The given PV list lock may be released. */ static void reserve_pv_entries(pmap_t pmap, int needed, struct rwlock **lockp) @@ -2391,6 +2396,7 @@ reserve_pv_entries(pmap_t pmap, int need rw_assert(&pvh_global_lock, RA_LOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); + KASSERT(lockp != NULL, ("reserve_pv_entries: lockp is NULL")); /* * Newly allocated PV chunks must be stored in a private list until @@ -2584,7 +2590,8 @@ pmap_pvh_free(struct md_page *pvh, pmap_ } /* - * Conditionally create a pv entry. + * Conditionally create the PV entry for a 4KB page mapping if the required + * memory can be allocated without resorting to reclamation. */ static boolean_t pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va, vm_page_t m, @@ -2594,7 +2601,8 @@ pmap_try_insert_pv_entry(pmap_t pmap, vm rw_assert(&pvh_global_lock, RA_LOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - if ((pv = get_pv_entry(pmap, TRUE)) != NULL) { + /* Pass NULL instead of the lock pointer to disable reclamation. */ + if ((pv = get_pv_entry(pmap, NULL)) != NULL) { pv->pv_va = va; CHANGE_PV_LIST_LOCK_TO_VM_PAGE(lockp, m); TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); @@ -2604,7 +2612,8 @@ pmap_try_insert_pv_entry(pmap_t pmap, vm } /* - * Create the pv entry for a 2MB page mapping. + * Conditionally create the PV entry for a 2MB page mapping if the required + * memory can be allocated without resorting to reclamation. */ static boolean_t pmap_pv_insert_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa, @@ -2614,7 +2623,9 @@ pmap_pv_insert_pde(pmap_t pmap, vm_offse pv_entry_t pv; rw_assert(&pvh_global_lock, RA_LOCKED); - if ((pv = get_pv_entry(pmap, TRUE)) != NULL) { + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + /* Pass NULL instead of the lock pointer to disable reclamation. */ + if ((pv = get_pv_entry(pmap, NULL)) != NULL) { pv->pv_va = va; CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, pa); pvh = pa_to_pvh(pa); @@ -3513,7 +3524,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva, ("pmap_enter: managed mapping within the clean submap")); if (pv == NULL) - pv = get_pv_entry(pmap, FALSE); + pv = get_pv_entry(pmap, &lock); CHANGE_PV_LIST_LOCK_TO_VM_PAGE(&lock, m); pv->pv_va = va; TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); @@ -3785,6 +3796,10 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ mpte = PHYS_TO_VM_PAGE(*ptepa & PG_FRAME); mpte->wire_count++; } else { + /* + * Pass NULL instead of the PV list lock + * pointer, because we don't intend to sleep. + */ mpte = _pmap_allocpte(pmap, ptepindex, NULL); if (mpte == NULL) return (mpte); From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 18:49: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 4E7511065688; Fri, 29 Jun 2012 18:49:15 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 396028FC14; Fri, 29 Jun 2012 18:49:15 +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 q5TInFXY064349; Fri, 29 Jun 2012 18:49:15 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5TInFL3064347; Fri, 29 Jun 2012 18:49:15 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201206291849.q5TInFL3064347@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Fri, 29 Jun 2012 18:49:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237817 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 29 Jun 2012 18:49:15 -0000 Author: pfg Date: Fri Jun 29 18:49:14 2012 New Revision: 237817 URL: http://svn.freebsd.org/changeset/base/237817 Log: Bump dtrace_helper_actions_max from 32 to 128 Dave Pacheco from Joyent (and Dtrace.org) bumped the cap to 1024 but, according to his blog, 128 is the recommended minimum. For now bump it safely to 128 although we may have to bump it further if there is demand in the future. Reference: http://www.illumos.org/issues/2558 http://dtrace.org/blogs/dap/2012/01/50/where-does-your-node-program-spend-its-time/ Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Fri Jun 29 18:39:31 2012 (r237816) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Fri Jun 29 18:49:14 2012 (r237817) @@ -157,7 +157,7 @@ dtrace_optval_t dtrace_dof_maxsize = (25 size_t dtrace_global_maxsize = (16 * 1024); size_t dtrace_actions_max = (16 * 1024); size_t dtrace_retain_max = 1024; -dtrace_optval_t dtrace_helper_actions_max = 32; +dtrace_optval_t dtrace_helper_actions_max = 128; dtrace_optval_t dtrace_helper_providers_max = 32; dtrace_optval_t dtrace_dstate_defsize = (1 * 1024 * 1024); size_t dtrace_strsize_default = 256; From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 19: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 56C42106566C; Fri, 29 Jun 2012 19: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 375F68FC19; Fri, 29 Jun 2012 19: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 q5TJ5UVD065106; Fri, 29 Jun 2012 19: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 q5TJ5TCd065103; Fri, 29 Jun 2012 19:05:30 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201206291905.q5TJ5TCd065103@svn.freebsd.org> From: Joel Dahl Date: Fri, 29 Jun 2012 19:05: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: r237818 - head/sys/powerpc/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, 29 Jun 2012 19:05:30 -0000 Author: joel (doc committer) Date: Fri Jun 29 19:05:29 2012 New Revision: 237818 URL: http://svn.freebsd.org/changeset/base/237818 Log: Reduce diffs between GENERIC and GENERIC64. Also fix a few whitespace nits while I'm here. No functional change. Modified: head/sys/powerpc/conf/GENERIC head/sys/powerpc/conf/GENERIC64 Modified: head/sys/powerpc/conf/GENERIC ============================================================================== --- head/sys/powerpc/conf/GENERIC Fri Jun 29 18:49:14 2012 (r237817) +++ head/sys/powerpc/conf/GENERIC Fri Jun 29 19:05:29 2012 (r237818) @@ -21,14 +21,14 @@ cpu AIM ident GENERIC -machine powerpc powerpc +machine powerpc powerpc makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols # Platform support options POWERMAC #NewWorld Apple PowerMacs options PSIM #GDB PSIM ppc simulator -options MAMBO #IBM Mambo Full System Simulator +options MAMBO #IBM Mambo Full System Simulator options SCHED_ULE #ULE scheduler options PREEMPTION #Enable kernel thread preemption @@ -82,7 +82,7 @@ options WITNESS #Enable checks to det options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones -# To make an SMP kernel, the next line is needed +# Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel # CPU frequency control Modified: head/sys/powerpc/conf/GENERIC64 ============================================================================== --- head/sys/powerpc/conf/GENERIC64 Fri Jun 29 18:49:14 2012 (r237817) +++ head/sys/powerpc/conf/GENERIC64 Fri Jun 29 19:05:29 2012 (r237818) @@ -21,14 +21,14 @@ cpu AIM ident GENERIC -machine powerpc powerpc64 +machine powerpc powerpc64 makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols # Platform support options POWERMAC #NewWorld Apple PowerMacs -options PS3 #Sony Playstation 3 -options MAMBO #IBM Mambo Full System Simulator +options PS3 #Sony Playstation 3 +options MAMBO #IBM Mambo Full System Simulator options SCHED_ULE #ULE scheduler options PREEMPTION #Enable kernel thread preemption @@ -67,8 +67,11 @@ options AUDIT # Security event auditi options MAC # TrustedBSD MAC Framework options INCLUDE_CONFIG_FILE # Include this file in kernel -# Debugging for use in -current -options KDB #Enable the kernel debugger +# 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 DEADLKRES #Enable the deadlock resolver options INVARIANTS #Enable calls of extra sanity checking @@ -171,8 +174,8 @@ device cue # CATC USB Ethernet device kue # Kawasaki LSI USB Ethernet # Wireless NIC cards -options IEEE80211_SUPPORT_MESH -options AH_SUPPORT_AR5416 +options IEEE80211_SUPPORT_MESH +options AH_SUPPORT_AR5416 # FireWire support device firewire # FireWire bus code From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 19:07: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 75B57106566C for ; Fri, 29 Jun 2012 19:07:39 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from nm10-vm0.bullet.mail.sp2.yahoo.com (nm10-vm0.bullet.mail.sp2.yahoo.com [98.139.91.198]) by mx1.freebsd.org (Postfix) with SMTP id 2F6B08FC18 for ; Fri, 29 Jun 2012 19:07:39 +0000 (UTC) Received: from [98.139.91.69] by nm10.bullet.mail.sp2.yahoo.com with NNFMP; 29 Jun 2012 19:05:38 -0000 Received: from [98.139.91.48] by tm9.bullet.mail.sp2.yahoo.com with NNFMP; 29 Jun 2012 19:05:38 -0000 Received: from [127.0.0.1] by omp1048.mail.sp2.yahoo.com with NNFMP; 29 Jun 2012 19:05:38 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 668770.87790.bm@omp1048.mail.sp2.yahoo.com Received: (qmail 39651 invoked by uid 60001); 29 Jun 2012 19:05:38 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1340996738; bh=8CGhulhIzyyNfLmA6V0GNtyBZJ8em6tAa2A6OqDHoS0=; h=X-YMail-OSG:Received:X-RocketYMMF:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=yURbXE9anbhY14yLmn+dES/LZCPfZ17XV0LB7g97fNrvC5TZ6VS4WyWV5jOZRGZAT1nqXGkszkCHW4EWHe4Q3eNv0g2uTesYGfdbNUMjhBf72WGFJvhL1dTvApNuQiywS/UYzTiqZ92E5+J0Ek4tk4NNxsB12jE27WjVPvKRvUc= X-YMail-OSG: HhBgq_kVM1lAm.GqTLLss0TxvJxb.RlKCkmlKY.AwYXmL3c qOc.tqv0ybk1CSLnfAOWIy4JLhNltlji.L3oWpvH19oF7_TrLWgQ1boIhieO EHKtx4lttfX_.cxfryBoPjk9Dox8ohfTqaO5xQExrnoHtjc4Xs3L2HjQpWO3 K9qLmbEQOp_96Gv6TUX5auHY.DEdQb7ILYDNuS1WVrUZjzw2kIw5fihwB69a VnmA.hsrIHW8hIKIqdMDNb2tS6XsbMEZtAtUs9TMped82xGBX3dF1Osii8Ol ZrIoz9ox7dBB_RgPAupTlK9hJ5hUvZsFSQQOrjtLBe7__gkgTntC_kREBab0 c2fWFseAFTTB0tRjgjieaTNwnhp_3YzZRelF8jlMKsm2sgDjlkMJrfz3wXV5 JPM8UU_cC9NjqS54CBXCYKE9DtDbP1KVzNzyh.YdEWKfiHevYzboQr74f.IV ABA9ckntQtloT9ZzgeU3Kfr8YQqFpmR1iqwSjKFFV_r1n0jdvWfF2X49FPVK nndgipuDI441QL_HDFNvhCPmJwJRlqj.NhKdnGGm_WaJLckZXioo_95uOU2k - Received: from [200.118.157.7] by web113516.mail.gq1.yahoo.com via HTTP; Fri, 29 Jun 2012 12:05:38 PDT X-RocketYMMF: giffunip X-Mailer: YahooMailClassic/15.0.8 YahooMailWebService/0.8.118.349524 Message-ID: <1340996738.9207.YahooMailClassic@web113516.mail.gq1.yahoo.com> Date: Fri, 29 Jun 2012 12:05:38 -0700 (PDT) From: Pedro Giffuni To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <201206291849.q5TInFL3064347@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Subject: R: svn commit: r237817 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pfg@freebsd.org List-Id: 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, 29 Jun 2012 19:07:39 -0000 =0A--- Ven 29/6/12, Pedro F. Giffuni ha scritto:=0A...=0A> =0A> Log:=0A> = =A0 Bump dtrace_helper_actions_max from 32 to 128=0A> =A0 =0A> =A0 Dave Pac= heco from Joyent (and Dtrace.org) bumped the cap to 1024 but,=0A> =A0 accor= ding to his blog, 128 is the recommended minimum.=0A> =A0 =0A> =A0 For now = bump it safely to 128 although we may have to bump it further=0A> =A0 if th= ere is demand in the future.=0A> =A0 =0A> =A0 Reference:=0A> =A0 =0A> =A0 h= ttp://www.illumos.org/issues/2558=0A> =A0 http://dtrace.org/blogs/dap/2012/= 01/50/where-does-your-node-program-spend-its-time/=0A> =0A=0AThe correct UR= L is this:=0A=0Ahttp://dtrace.org/blogs/dap/2012/01/05/where-does-your-node= -program-spend-its-time/=0A=0AThis change won't make it into FreeBSD 9.1 bu= t the blog=0Aclaims that ustack helpers are broken in FreeBSD so it=0Awill = not be missed(?).=0A=0APedro.=0A From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 19:51:07 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 788341065672; Fri, 29 Jun 2012 19:51:07 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 62ABF8FC19; Fri, 29 Jun 2012 19:51: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 q5TJp7w5066976; Fri, 29 Jun 2012 19:51:07 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5TJp71W066970; Fri, 29 Jun 2012 19:51:07 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201206291951.q5TJp71W066970@svn.freebsd.org> From: Navdeep Parhar Date: Fri, 29 Jun 2012 19:51: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: r237819 - in head/sys: dev/cxgbe modules/cxgbe/if_cxgbe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 29 Jun 2012 19:51:07 -0000 Author: np Date: Fri Jun 29 19:51:06 2012 New Revision: 237819 URL: http://svn.freebsd.org/changeset/base/237819 Log: cxgbe(4): support for IPv6 TSO and LRO. Submitted by: bz (this is a modified version of that patch) Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_l2t.c head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_sge.c head/sys/modules/cxgbe/if_cxgbe/Makefile Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Fri Jun 29 19:05:29 2012 (r237818) +++ head/sys/dev/cxgbe/adapter.h Fri Jun 29 19:51:06 2012 (r237819) @@ -392,7 +392,7 @@ struct sge_txq { /* stats for common events first */ uint64_t txcsum; /* # of times hardware assisted with checksum */ - uint64_t tso_wrs; /* # of IPv4 TSO work requests */ + uint64_t tso_wrs; /* # of TSO work requests */ uint64_t vlan_insertion;/* # of times VLAN tag was inserted */ uint64_t imm_wrs; /* # of work requests with immediate data */ uint64_t sgl_wrs; /* # of work requests with direct SGL */ @@ -412,7 +412,7 @@ struct sge_rxq { struct sge_fl fl; /* MUST follow iq */ struct ifnet *ifp; /* the interface this rxq belongs to */ -#ifdef INET +#if defined(INET) || defined(INET6) struct lro_ctrl lro; /* LRO state */ #endif Modified: head/sys/dev/cxgbe/t4_l2t.c ============================================================================== --- head/sys/dev/cxgbe/t4_l2t.c Fri Jun 29 19:05:29 2012 (r237818) +++ head/sys/dev/cxgbe/t4_l2t.c Fri Jun 29 19:51:06 2012 (r237819) @@ -27,6 +27,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" +#include "opt_inet6.h" #include #include Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Fri Jun 29 19:05:29 2012 (r237818) +++ head/sys/dev/cxgbe/t4_main.c Fri Jun 29 19:51:06 2012 (r237819) @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" +#include "opt_inet6.h" #include #include @@ -823,7 +824,7 @@ cxgbe_probe(device_t dev) #define T4_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | \ IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO | \ IFCAP_VLAN_HWTSO | IFCAP_HWCSUM_IPV6) -#define T4_CAP_ENABLE (T4_CAP & ~IFCAP_TSO6) +#define T4_CAP_ENABLE (T4_CAP) static int cxgbe_attach(device_t dev) @@ -1075,7 +1076,7 @@ fail: ifp->if_capenable ^= IFCAP_TSO6; } if (mask & IFCAP_LRO) { -#ifdef INET +#if defined(INET) || defined(INET6) int i; struct sge_rxq *rxq; Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Fri Jun 29 19:05:29 2012 (r237818) +++ head/sys/dev/cxgbe/t4_sge.c Fri Jun 29 19:51:06 2012 (r237819) @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" +#include "opt_inet6.h" #include #include @@ -46,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "common/common.h" @@ -908,7 +910,7 @@ service_iq(struct sge_iq *iq, int budget STAILQ_INSERT_TAIL(&iql, q, link); } -#ifdef INET +#if defined(INET) || defined(INET6) if (iq->flags & IQ_LRO_ENABLED) { struct lro_ctrl *lro = &rxq->lro; struct lro_entry *l; @@ -1039,7 +1041,7 @@ t4_eth_rx(struct sge_iq *iq, const struc struct sge_rxq *rxq = iq_to_rxq(iq); struct ifnet *ifp = rxq->ifp; const struct cpl_rx_pkt *cpl = (const void *)(rss + 1); -#ifdef INET +#if defined(INET) || defined(INET6) struct lro_ctrl *lro = &rxq->lro; #endif @@ -1079,7 +1081,7 @@ t4_eth_rx(struct sge_iq *iq, const struc rxq->vlan_extraction++; } -#ifdef INET +#if defined(INET) || defined(INET6) if (cpl->l2info & htobe32(F_RXF_LRO) && iq->flags & IQ_LRO_ENABLED && tcp_lro_rx(lro, m0, 0) == 0) { @@ -1805,7 +1807,7 @@ alloc_rxq(struct port_info *pi, struct s refill_fl(pi->adapter, &rxq->fl, rxq->fl.needed / 8); FL_UNLOCK(&rxq->fl); -#ifdef INET +#if defined(INET) || defined(INET6) rc = tcp_lro_init(&rxq->lro); if (rc != 0) return (rc); @@ -1832,7 +1834,7 @@ alloc_rxq(struct port_info *pi, struct s SYSCTL_ADD_PROC(&pi->ctx, children, OID_AUTO, "cidx", CTLTYPE_INT | CTLFLAG_RD, &rxq->iq.cidx, 0, sysctl_uint16, "I", "consumer index"); -#ifdef INET +#if defined(INET) || defined(INET6) SYSCTL_ADD_INT(&pi->ctx, children, OID_AUTO, "lro_queued", CTLFLAG_RD, &rxq->lro.lro_queued, 0, NULL); SYSCTL_ADD_INT(&pi->ctx, children, OID_AUTO, "lro_flushed", CTLFLAG_RD, @@ -1865,7 +1867,7 @@ free_rxq(struct port_info *pi, struct sg { int rc; -#ifdef INET +#if defined(INET) || defined(INET6) if (rxq->lro.ifp) { tcp_lro_free(&rxq->lro); rxq->lro.ifp = NULL; @@ -2273,7 +2275,7 @@ alloc_txq(struct port_info *pi, struct s CTLFLAG_RD, &txq->vlan_insertion, "# of times hardware inserted 802.1Q tag"); SYSCTL_ADD_UQUAD(&pi->ctx, children, OID_AUTO, "tso_wrs", CTLFLAG_RD, - &txq->tso_wrs, "# of IPv4 TSO work requests"); + &txq->tso_wrs, "# of TSO work requests"); SYSCTL_ADD_UQUAD(&pi->ctx, children, OID_AUTO, "imm_wrs", CTLFLAG_RD, &txq->imm_wrs, "# of work requests with immediate data"); SYSCTL_ADD_UQUAD(&pi->ctx, children, OID_AUTO, "sgl_wrs", CTLFLAG_RD, @@ -2802,22 +2804,60 @@ write_txpkt_wr(struct port_info *pi, str if (m->m_pkthdr.tso_segsz) { struct cpl_tx_pkt_lso_core *lso = (void *)(wr + 1); struct ether_header *eh; - struct ip *ip; + void *l3hdr; +#if defined(INET) || defined(INET6) struct tcphdr *tcp; +#endif + uint16_t eh_type; ctrl = V_LSO_OPCODE(CPL_TX_PKT_LSO) | F_LSO_FIRST_SLICE | F_LSO_LAST_SLICE; eh = mtod(m, struct ether_header *); - if (eh->ether_type == htons(ETHERTYPE_VLAN)) { + eh_type = ntohs(eh->ether_type); + if (eh_type == ETHERTYPE_VLAN) { + struct ether_vlan_header *evh = (void *)eh; + ctrl |= V_LSO_ETHHDR_LEN(1); - ip = (void *)((struct ether_vlan_header *)eh + 1); + l3hdr = evh + 1; + eh_type = ntohs(evh->evl_proto); } else - ip = (void *)(eh + 1); + l3hdr = eh + 1; - tcp = (void *)((uintptr_t)ip + ip->ip_hl * 4); - ctrl |= V_LSO_IPHDR_LEN(ip->ip_hl) | - V_LSO_TCPHDR_LEN(tcp->th_off); + switch (eh_type) { +#ifdef INET6 + case ETHERTYPE_IPV6: + { + struct ip6_hdr *ip6 = l3hdr; + + /* + * XXX-BZ For now we do not pretend to support + * IPv6 extension headers. + */ + KASSERT(ip6->ip6_nxt == IPPROTO_TCP, ("%s: CSUM_TSO " + "with ip6_nxt != TCP: %u", __func__, ip6->ip6_nxt)); + tcp = (struct tcphdr *)(ip6 + 1); + ctrl |= F_LSO_IPV6; + ctrl |= V_LSO_IPHDR_LEN(sizeof(*ip6) >> 2) | + V_LSO_TCPHDR_LEN(tcp->th_off); + break; + } +#endif +#ifdef INET + case ETHERTYPE_IP: + { + struct ip *ip = l3hdr; + + tcp = (void *)((uintptr_t)ip + ip->ip_hl * 4); + ctrl |= V_LSO_IPHDR_LEN(ip->ip_hl) | + V_LSO_TCPHDR_LEN(tcp->th_off); + break; + } +#endif + default: + panic("%s: CSUM_TSO but no supported IP version " + "(0x%04x)", __func__, eh_type); + } lso->lso_ctrl = htobe32(ctrl); lso->ipid_ofst = htobe16(0); Modified: head/sys/modules/cxgbe/if_cxgbe/Makefile ============================================================================== --- head/sys/modules/cxgbe/if_cxgbe/Makefile Fri Jun 29 19:05:29 2012 (r237818) +++ head/sys/modules/cxgbe/if_cxgbe/Makefile Fri Jun 29 19:51:06 2012 (r237819) @@ -9,7 +9,7 @@ KMOD = if_cxgbe SRCS = t4_main.c t4_sge.c t4_l2t.c SRCS+= t4_hw.c SRCS+= device_if.h bus_if.h pci_if.h -SRCS+= opt_inet.h +SRCS+= opt_inet.h opt_inet6.h SRCS+= opt_ofed.h CFLAGS+= -I${CXGBE} From owner-svn-src-head@FreeBSD.ORG Fri Jun 29 20:15: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 1047B106566B; Fri, 29 Jun 2012 20:15:01 +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 EB3138FC15; Fri, 29 Jun 2012 20:15: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 q5TKF0S2068022; Fri, 29 Jun 2012 20:15:00 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5TKF0bw068017; Fri, 29 Jun 2012 20:15:00 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201206292015.q5TKF0bw068017@svn.freebsd.org> From: Brooks Davis Date: Fri, 29 Jun 2012 20:15: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: r237820 - head/sys/geom X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 29 Jun 2012 20:15:01 -0000 Author: brooks Date: Fri Jun 29 20:15:00 2012 New Revision: 237820 URL: http://svn.freebsd.org/changeset/base/237820 Log: MFP4 #212266 Fix compile on MIPS64. Sponsored by: DARPA, AFRL Modified: head/sys/geom/geom_map.c Modified: head/sys/geom/geom_map.c ============================================================================== --- head/sys/geom/geom_map.c Fri Jun 29 19:51:06 2012 (r237819) +++ head/sys/geom/geom_map.c Fri Jun 29 20:15:00 2012 (r237820) @@ -119,13 +119,13 @@ g_map_dumpconf(struct sbuf *sb, const ch g_slice_dumpconf(sb, indent, gp, cp, pp); if (pp != NULL) { if (indent == NULL) { - sbuf_printf(sb, " entry %lld", sc->entry[pp->index]); - sbuf_printf(sb, " dsize %lld", sc->dsize[pp->index]); + sbuf_printf(sb, " entry %jd", (intmax_t)sc->entry[pp->index]); + sbuf_printf(sb, " dsize %jd", (intmax_t)sc->dsize[pp->index]); } else { - sbuf_printf(sb, "%s%lld\n", indent, - sc->entry[pp->index]); - sbuf_printf(sb, "%s%lld\n", indent, - sc->dsize[pp->index]); + sbuf_printf(sb, "%s%jd\n", indent, + (intmax_t)sc->entry[pp->index]); + sbuf_printf(sb, "%s%jd\n", indent, + (intmax_t)sc->dsize[pp->index]); } } } @@ -153,8 +153,8 @@ find_marker(struct g_consumer *cp, const return (1); if (bootverbose) { - printf("MAP: search key \"%s\" from 0x%llx, step 0x%llx\n", - search_key, search_start, search_step); + printf("MAP: search key \"%s\" from 0x%jx, step 0x%jx\n", + search_key, (intmax_t)search_start, (intmax_t)search_step); } /* error if search_key is empty */ @@ -321,9 +321,10 @@ g_map_parse_part(struct g_class *mp, str } if (bootverbose) { - printf("MAP: %llxx%llx, data=%llxx%llx " + printf("MAP: %lxx%lx, data=%lxx%lx " "\"/dev/map/%s\"\n", - start, size, offset, dsize, name); + (intmax_t)start, (intmax_t)size, (intmax_t)offset, + (intmax_t)dsize, name); } sc->offset[i] = start; From owner-svn-src-head@FreeBSD.ORG Sat Jun 30 01:40: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 342EF1065670; Sat, 30 Jun 2012 01:40:30 +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 1EF408FC0A; Sat, 30 Jun 2012 01:40: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 q5U1eTfs082618; Sat, 30 Jun 2012 01:40:29 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5U1eTGI082616; Sat, 30 Jun 2012 01:40:29 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201206300140.q5U1eTGI082616@svn.freebsd.org> From: Adrian Chadd Date: Sat, 30 Jun 2012 01:40: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: r237830 - head/tools/tools/ath/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, 30 Jun 2012 01:40:30 -0000 Author: adrian Date: Sat Jun 30 01:40:29 2012 New Revision: 237830 URL: http://svn.freebsd.org/changeset/base/237830 Log: Bump this up - that way the AR9300 and later MACs get covered (for now) by the AR5416 register map. Modified: head/tools/tools/ath/common/dumpregs_5416.c Modified: head/tools/tools/ath/common/dumpregs_5416.c ============================================================================== --- head/tools/tools/ath/common/dumpregs_5416.c Sat Jun 30 00:12:29 2012 (r237829) +++ head/tools/tools/ath/common/dumpregs_5416.c Sat Jun 30 01:40:29 2012 (r237830) @@ -39,7 +39,7 @@ #define N(a) (sizeof(a) / sizeof(a[0])) -#define MAC5416 SREV(13,8), SREV(0xff,0xff) /* XXX */ +#define MAC5416 SREV(13,8), SREV(0xffff,0xffff) /* XXX */ static struct dumpreg ar5416regs[] = { DEFBASIC(AR_CR, "CR"), From owner-svn-src-head@FreeBSD.ORG Sat Jun 30 02:05:10 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 4E443106564A; Sat, 30 Jun 2012 02:05:10 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 20B848FC08; Sat, 30 Jun 2012 02:05:10 +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 q5U259VW083716; Sat, 30 Jun 2012 02:05:09 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5U2594k083713; Sat, 30 Jun 2012 02:05:09 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201206300205.q5U2594k083713@svn.freebsd.org> From: Navdeep Parhar Date: Sat, 30 Jun 2012 02:05:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237831 - head/sys/dev/cxgbe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 30 Jun 2012 02:05:10 -0000 Author: np Date: Sat Jun 30 02:05:09 2012 New Revision: 237831 URL: http://svn.freebsd.org/changeset/base/237831 Log: - Assign (don't OR) the CSUM_XXX bits to csum_flags in the rx checksum code. - Fix TSO/TSO4 mixup. - Add IFCAP_LINKSTATE to the available/enabled capabilities. Modified: head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Sat Jun 30 01:40:29 2012 (r237830) +++ head/sys/dev/cxgbe/t4_main.c Sat Jun 30 02:05:09 2012 (r237831) @@ -823,7 +823,7 @@ cxgbe_probe(device_t dev) #define T4_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | \ IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO | \ - IFCAP_VLAN_HWTSO | IFCAP_HWCSUM_IPV6) + IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE | IFCAP_HWCSUM_IPV6) #define T4_CAP_ENABLE (T4_CAP) static int @@ -1028,11 +1028,11 @@ fail: ifp->if_capenable ^= IFCAP_TXCSUM; ifp->if_hwassist ^= (CSUM_TCP | CSUM_UDP | CSUM_IP); - if (IFCAP_TSO & ifp->if_capenable && + if (IFCAP_TSO4 & ifp->if_capenable && !(IFCAP_TXCSUM & ifp->if_capenable)) { ifp->if_capenable &= ~IFCAP_TSO4; if_printf(ifp, - "tso disabled due to -txcsum.\n"); + "tso4 disabled due to -txcsum.\n"); } } if (mask & IFCAP_TXCSUM_IPV6) { Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Sat Jun 30 01:40:29 2012 (r237830) +++ head/sys/dev/cxgbe/t4_sge.c Sat Jun 30 02:05:09 2012 (r237831) @@ -1059,12 +1059,12 @@ t4_eth_rx(struct sge_iq *iq, const struc if (cpl->csum_calc && !cpl->err_vec) { if (ifp->if_capenable & IFCAP_RXCSUM && cpl->l2info & htobe32(F_RXF_IP)) { - m0->m_pkthdr.csum_flags |= (CSUM_IP_CHECKED | + m0->m_pkthdr.csum_flags = (CSUM_IP_CHECKED | CSUM_IP_VALID | CSUM_DATA_VALID | CSUM_PSEUDO_HDR); rxq->rxcsum++; } else if (ifp->if_capenable & IFCAP_RXCSUM_IPV6 && cpl->l2info & htobe32(F_RXF_IP6)) { - m0->m_pkthdr.csum_flags |= (CSUM_DATA_VALID_IPV6 | + m0->m_pkthdr.csum_flags = (CSUM_DATA_VALID_IPV6 | CSUM_PSEUDO_HDR); rxq->rxcsum++; } From owner-svn-src-head@FreeBSD.ORG Sat Jun 30 02:11: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 A098F1065670; Sat, 30 Jun 2012 02:11:54 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8AC178FC12; Sat, 30 Jun 2012 02:11: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 q5U2Bsaq084017; Sat, 30 Jun 2012 02:11:54 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5U2BsNW084013; Sat, 30 Jun 2012 02:11:54 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201206300211.q5U2BsNW084013@svn.freebsd.org> From: Navdeep Parhar Date: Sat, 30 Jun 2012 02:11: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: r237832 - head/sys/dev/cxgb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2012 02:11:54 -0000 Author: np Date: Sat Jun 30 02:11:53 2012 New Revision: 237832 URL: http://svn.freebsd.org/changeset/base/237832 Log: cxgb(4): IPv6 rx/tx hw checksum, IPv6 TSO and LRO too. (Some parts already worked, this makes it complete). Modified: head/sys/dev/cxgb/cxgb_adapter.h head/sys/dev/cxgb/cxgb_main.c head/sys/dev/cxgb/cxgb_sge.c Modified: head/sys/dev/cxgb/cxgb_adapter.h ============================================================================== --- head/sys/dev/cxgb/cxgb_adapter.h Sat Jun 30 02:05:09 2012 (r237831) +++ head/sys/dev/cxgb/cxgb_adapter.h Sat Jun 30 02:11:53 2012 (r237832) @@ -265,15 +265,6 @@ struct sge_txq { struct sg_ent txq_sgl[TX_MAX_SEGS / 2 + 1]; }; - -enum { - SGE_PSTAT_TSO, /* # of TSO requests */ - SGE_PSTAT_RX_CSUM_GOOD, /* # of successful RX csum offloads */ - SGE_PSTAT_TX_CSUM, /* # of TX checksum offloads */ - SGE_PSTAT_VLANEX, /* # of VLAN tag extractions */ - SGE_PSTAT_VLANINS, /* # of VLAN tag insertions */ -}; - #define SGE_PSTAT_MAX (SGE_PSTAT_VLANINS+1) #define QS_EXITING 0x1 @@ -288,7 +279,6 @@ struct sge_qset { struct lro_state lro; struct sge_txq txq[SGE_TXQ_PER_SET]; uint32_t txq_stopped; /* which Tx queues are stopped */ - uint64_t port_stats[SGE_PSTAT_MAX]; struct port_info *port; struct adapter *adap; int idx; /* qset # */ @@ -538,7 +528,7 @@ int t3_sge_reset_adapter(adapter_t *); int t3_sge_init_port(struct port_info *); void t3_free_tx_desc(struct sge_qset *qs, int n, int qid); -void t3_rx_eth(struct adapter *adap, struct sge_rspq *rq, struct mbuf *m, int ethpad); +void t3_rx_eth(struct adapter *adap, struct mbuf *m, int ethpad); void t3_add_attach_sysctls(adapter_t *sc); void t3_add_configured_sysctls(adapter_t *sc); Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Sat Jun 30 02:05:09 2012 (r237831) +++ head/sys/dev/cxgb/cxgb_main.c Sat Jun 30 02:11:53 2012 (r237832) @@ -986,7 +986,7 @@ cxgb_makedev(struct port_info *pi) #define CXGB_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | \ IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO | \ - IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE) + IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE | IFCAP_HWCSUM_IPV6) #define CXGB_CAP_ENABLE CXGB_CAP static int @@ -1027,7 +1027,8 @@ cxgb_port_attach(device_t dev) ifp->if_capabilities |= IFCAP_TOE4; #endif ifp->if_capenable = CXGB_CAP_ENABLE; - ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO; + ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO | + CSUM_UDP_IPV6 | CSUM_TCP_IPV6; /* * Disable TSO on 4-port - it isn't supported by the firmware. @@ -1950,31 +1951,52 @@ fail: ifp->if_capenable ^= IFCAP_TXCSUM; ifp->if_hwassist ^= (CSUM_TCP | CSUM_UDP | CSUM_IP); - if (IFCAP_TSO & ifp->if_capenable && + if (IFCAP_TSO4 & ifp->if_capenable && !(IFCAP_TXCSUM & ifp->if_capenable)) { - ifp->if_capenable &= ~IFCAP_TSO; - ifp->if_hwassist &= ~CSUM_TSO; + ifp->if_capenable &= ~IFCAP_TSO4; if_printf(ifp, - "tso disabled due to -txcsum.\n"); + "tso4 disabled due to -txcsum.\n"); + } + } + if (mask & IFCAP_TXCSUM_IPV6) { + ifp->if_capenable ^= IFCAP_TXCSUM_IPV6; + ifp->if_hwassist ^= (CSUM_UDP_IPV6 | CSUM_TCP_IPV6); + + if (IFCAP_TSO6 & ifp->if_capenable && + !(IFCAP_TXCSUM_IPV6 & ifp->if_capenable)) { + ifp->if_capenable &= ~IFCAP_TSO6; + if_printf(ifp, + "tso6 disabled due to -txcsum6.\n"); } } if (mask & IFCAP_RXCSUM) ifp->if_capenable ^= IFCAP_RXCSUM; - if (mask & IFCAP_TSO) { - ifp->if_capenable ^= IFCAP_TSO; + if (mask & IFCAP_RXCSUM_IPV6) + ifp->if_capenable ^= IFCAP_RXCSUM_IPV6; - if (IFCAP_TSO & ifp->if_capenable) { - if (IFCAP_TXCSUM & ifp->if_capenable) - ifp->if_hwassist |= CSUM_TSO; - else { - ifp->if_capenable &= ~IFCAP_TSO; - ifp->if_hwassist &= ~CSUM_TSO; - if_printf(ifp, - "enable txcsum first.\n"); - error = EAGAIN; - } - } else - ifp->if_hwassist &= ~CSUM_TSO; + /* + * Note that we leave CSUM_TSO alone (it is always set). The + * kernel takes both IFCAP_TSOx and CSUM_TSO into account before + * sending a TSO request our way, so it's sufficient to toggle + * IFCAP_TSOx only. + */ + if (mask & IFCAP_TSO4) { + if (!(IFCAP_TSO4 & ifp->if_capenable) && + !(IFCAP_TXCSUM & ifp->if_capenable)) { + if_printf(ifp, "enable txcsum first.\n"); + error = EAGAIN; + goto fail; + } + ifp->if_capenable ^= IFCAP_TSO4; + } + if (mask & IFCAP_TSO6) { + if (!(IFCAP_TSO6 & ifp->if_capenable) && + !(IFCAP_TXCSUM_IPV6 & ifp->if_capenable)) { + if_printf(ifp, "enable txcsum6 first.\n"); + error = EAGAIN; + goto fail; + } + ifp->if_capenable ^= IFCAP_TSO6; } if (mask & IFCAP_LRO) { ifp->if_capenable ^= IFCAP_LRO; Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Sat Jun 30 02:05:09 2012 (r237831) +++ head/sys/dev/cxgb/cxgb_sge.c Sat Jun 30 02:11:53 2012 (r237832) @@ -1432,7 +1432,8 @@ t3_encap(struct sge_qset *qs, struct mbu cntrl |= V_TXPKT_OPCODE(CPL_TX_PKT); if (__predict_false(!(cflags & CSUM_IP))) cntrl |= F_TXPKT_IPCSUM_DIS; - if (__predict_false(!(cflags & (CSUM_TCP | CSUM_UDP)))) + if (__predict_false(!(cflags & (CSUM_TCP | CSUM_UDP | + CSUM_UDP_IPV6 | CSUM_TCP_IPV6)))) cntrl |= F_TXPKT_L4CSUM_DIS; hflit[0] = htonl(cntrl); @@ -1547,7 +1548,8 @@ t3_encap(struct sge_qset *qs, struct mbu cntrl |= V_TXPKT_OPCODE(CPL_TX_PKT); if (__predict_false(!(m0->m_pkthdr.csum_flags & CSUM_IP))) cntrl |= F_TXPKT_IPCSUM_DIS; - if (__predict_false(!(m0->m_pkthdr.csum_flags & (CSUM_TCP | CSUM_UDP)))) + if (__predict_false(!(m0->m_pkthdr.csum_flags & (CSUM_TCP | + CSUM_UDP | CSUM_UDP_IPV6 | CSUM_TCP_IPV6)))) cntrl |= F_TXPKT_L4CSUM_DIS; cpl->cntrl = htonl(cntrl); cpl->len = htonl(mlen | 0x80000000); @@ -2620,20 +2622,12 @@ err: * will also be taken into account here. */ void -t3_rx_eth(struct adapter *adap, struct sge_rspq *rq, struct mbuf *m, int ethpad) +t3_rx_eth(struct adapter *adap, struct mbuf *m, int ethpad) { struct cpl_rx_pkt *cpl = (struct cpl_rx_pkt *)(mtod(m, uint8_t *) + ethpad); struct port_info *pi = &adap->port[adap->rxpkt_map[cpl->iff]]; struct ifnet *ifp = pi->ifp; - if ((ifp->if_capenable & IFCAP_RXCSUM) && !cpl->fragment && - cpl->csum_valid && cpl->csum == 0xffff) { - m->m_pkthdr.csum_flags = (CSUM_IP_CHECKED|CSUM_IP_VALID); - rspq_to_qset(rq)->port_stats[SGE_PSTAT_RX_CSUM_GOOD]++; - m->m_pkthdr.csum_flags = (CSUM_IP_CHECKED|CSUM_IP_VALID|CSUM_DATA_VALID|CSUM_PSEUDO_HDR); - m->m_pkthdr.csum_data = 0xffff; - } - if (cpl->vlan_valid) { m->m_pkthdr.ether_vtag = ntohs(cpl->vlan); m->m_flags |= M_VLANTAG; @@ -2647,6 +2641,30 @@ t3_rx_eth(struct adapter *adap, struct s m->m_pkthdr.len -= (sizeof(*cpl) + ethpad); m->m_len -= (sizeof(*cpl) + ethpad); m->m_data += (sizeof(*cpl) + ethpad); + + if (!cpl->fragment && cpl->csum_valid && cpl->csum == 0xffff) { + struct ether_header *eh = mtod(m, void *); + uint16_t eh_type; + + if (eh->ether_type == htons(ETHERTYPE_VLAN)) { + struct ether_vlan_header *evh = mtod(m, void *); + + eh_type = evh->evl_proto; + } else + eh_type = eh->ether_type; + + if (ifp->if_capenable & IFCAP_RXCSUM && + eh_type == htons(ETHERTYPE_IP)) { + m->m_pkthdr.csum_flags = (CSUM_IP_CHECKED | + CSUM_IP_VALID | CSUM_DATA_VALID | CSUM_PSEUDO_HDR); + m->m_pkthdr.csum_data = 0xffff; + } else if (ifp->if_capenable & IFCAP_RXCSUM_IPV6 && + eh_type == htons(ETHERTYPE_IPV6)) { + m->m_pkthdr.csum_flags = (CSUM_DATA_VALID_IPV6 | + CSUM_PSEUDO_HDR); + m->m_pkthdr.csum_data = 0xffff; + } + } } /** @@ -2913,7 +2931,7 @@ process_responses(adapter_t *adap, struc } else if (eth && eop) { struct mbuf *m = mh->mh_head; - t3_rx_eth(adap, rspq, m, ethpad); + t3_rx_eth(adap, m, ethpad); /* * The T304 sends incoming packets on any qset. If LRO From owner-svn-src-head@FreeBSD.ORG Sat Jun 30 04:52:02 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 45C9C106566C; Sat, 30 Jun 2012 04:52:02 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 021828FC08; Sat, 30 Jun 2012 04:52:01 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so5898387pbb.13 for ; Fri, 29 Jun 2012 21:51:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:in-reply-to:mime-version:content-transfer-encoding :content-type:message-id:cc:x-mailer:from:subject:date:to; bh=XsUZ/ez2b6NuISbYDC1d4VU6K4Drel35HjmVEjEH39I=; b=rfNE2qr7Tlw5mF66F4ORR3aqrC3sQpMYq4vfx16fCX2MVHcwGIydM91jdp2B3DiSsn lv6FWafPX5COrsKMxHVVM7ozk9aZbuIEpOetA28QJjkk+dANy9IWczppwkCE2PtGGDaJ /DtZnK/35lCsbPJpmH1Grnn0FW1wSMWV1EHASnlVN5CgwIu5Ez8+lYBJMHJxFxGVrgK5 r4KjtWlUeLOUCTFVeS0C84gKob4G6v7HmMi4tongOQqxW42cj5+XhZPkuYPVwuQXYOSS Pbq2xyAudOo9E3TmawbRSae/bmsLo1iUh/YRb3JZy31DDVsvM70LFjeW/xMUNggfFyST fPLw== Received: by 10.68.231.40 with SMTP id td8mr12636540pbc.150.1341031915474; Fri, 29 Jun 2012 21:51:55 -0700 (PDT) Received: from [10.70.116.93] (mobile-166-147-093-178.mycingular.net. [166.147.93.178]) by mx.google.com with ESMTPS id tq4sm7358184pbc.11.2012.06.29.21.51.53 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 29 Jun 2012 21:51:54 -0700 (PDT) References: <201206292015.q5TKF0bw068017@svn.freebsd.org> In-Reply-To: <201206292015.q5TKF0bw068017@svn.freebsd.org> Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Message-Id: <014C4331-E53B-41AE-A5DA-76A4C3EA8083@gmail.com> X-Mailer: iPhone Mail (9B206) From: Garrett Cooper Date: Fri, 29 Jun 2012 21:51:49 -0700 To: Brooks Davis Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r237820 - head/sys/geom X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 30 Jun 2012 04:52:02 -0000 Sent from my iPhone On Jun 29, 2012, at 1:15 PM, Brooks Davis wrote: > Author: brooks > Date: Fri Jun 29 20:15:00 2012 > New Revision: 237820 > URL: http://svn.freebsd.org/changeset/base/237820 > > Log: > MFP4 #212266 > > Fix compile on MIPS64. > > Sponsored by: DARPA, AFRL This commit appears to have broken arm (ETHERNUT5). Thanks, -Garrett From owner-svn-src-head@FreeBSD.ORG Sat Jun 30 06:10: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 D1E3E106564A; Sat, 30 Jun 2012 06:10:33 +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 67F5B8FC0C; Sat, 30 Jun 2012 06:10:33 +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 q5U6AT0c006515 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 30 Jun 2012 16:10:31 +1000 Date: Sat, 30 Jun 2012 16:10:29 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Brooks Davis In-Reply-To: <201206292015.q5TKF0bw068017@svn.freebsd.org> Message-ID: <20120630154607.P852@besplex.bde.org> References: <201206292015.q5TKF0bw068017@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: r237820 - head/sys/geom X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 30 Jun 2012 06:10:34 -0000 On Fri, 29 Jun 2012, Brooks Davis wrote: > Log: > MFP4 #212266 > > Fix compile on MIPS64. > > Sponsored by: DARPA, AFRL > > Modified: > head/sys/geom/geom_map.c > > Modified: head/sys/geom/geom_map.c > ============================================================================== > --- head/sys/geom/geom_map.c Fri Jun 29 19:51:06 2012 (r237819) > +++ head/sys/geom/geom_map.c Fri Jun 29 20:15:00 2012 (r237820) > @@ -119,13 +119,13 @@ g_map_dumpconf(struct sbuf *sb, const ch > g_slice_dumpconf(sb, indent, gp, cp, pp); > if (pp != NULL) { > if (indent == NULL) { > - sbuf_printf(sb, " entry %lld", sc->entry[pp->index]); > - sbuf_printf(sb, " dsize %lld", sc->dsize[pp->index]); > + sbuf_printf(sb, " entry %jd", (intmax_t)sc->entry[pp->index]); > + sbuf_printf(sb, " dsize %jd", (intmax_t)sc->dsize[pp->index]); Style bugs (lines too long). > @@ -153,8 +153,8 @@ find_marker(struct g_consumer *cp, const > return (1); > > if (bootverbose) { > - printf("MAP: search key \"%s\" from 0x%llx, step 0x%llx\n", > - search_key, search_start, search_step); > + printf("MAP: search key \"%s\" from 0x%jx, step 0x%jx\n", > + search_key, (intmax_t)search_start, (intmax_t)search_step); > } Still has sign mismatches. %jx takes a uintmax_t arg, but an intmax_t arg is passed. The variables start as signed (off_t). Printing signed values using hex formats is dubious, but if it is wanted then the conversion should be done when the parameter is passed instead of depending on printf() doing something reasonable. > > /* error if search_key is empty */ > @@ -321,9 +321,10 @@ g_map_parse_part(struct g_class *mp, str > } > > if (bootverbose) { > - printf("MAP: %llxx%llx, data=%llxx%llx " > + printf("MAP: %lxx%lx, data=%lxx%lx " > "\"/dev/map/%s\"\n", > - start, size, offset, dsize, name); > + (intmax_t)start, (intmax_t)size, (intmax_t)offset, > + (intmax_t)dsize, name); Still has fatal type mimatches which are larger than before: - before: the format said but the default promotion of off_t was passed. Everything was 64 bits in practice, so there was no problem at runtime except possibly with the sign mismatch, but the static format checker complained - after: the format says u_long, but intmax_t is passed. Now the sizes are different on arches with 32 bit u_long, and the result is garbage. Still has sign mismatches, as above. As well as printf format errors, this still has the following format-printf errors (formatting style bugs): - source level: the string is still obfuscated using the C90 string concatenation misfeature to split it across multiple lines. The string is not even long enough to not fit on 1 line. - output level: %lxx%lx is still a weird format. It consists of 2 hex numbers without any 0x prefixes to indicate that they are in hex. But there is an "x" with no spaces between the numbers. This apparently means multiplication, but it looks like part of a 0x prefix. Bruce From owner-svn-src-head@FreeBSD.ORG Sat Jun 30 13: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 44FA8106566B; Sat, 30 Jun 2012 13:17:22 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2FE4C8FC08; Sat, 30 Jun 2012 13: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 q5UDHMo2020915; Sat, 30 Jun 2012 13:17:22 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5UDHLWS020913; Sat, 30 Jun 2012 13:17:21 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201206301317.q5UDHLWS020913@svn.freebsd.org> From: Christian Brueffer Date: Sat, 30 Jun 2012 13: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: r237836 - 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, 30 Jun 2012 13:17:22 -0000 Author: brueffer Date: Sat Jun 30 13:17:21 2012 New Revision: 237836 URL: http://svn.freebsd.org/changeset/base/237836 Log: mps(4) is endian safe as of r237683. Modified: head/share/man/man4/mps.4 Modified: head/share/man/man4/mps.4 ============================================================================== --- head/share/man/man4/mps.4 Sat Jun 30 07:52:06 2012 (r237835) +++ head/share/man/man4/mps.4 Sat Jun 30 13:17:21 2012 (r237836) @@ -34,7 +34,7 @@ .\" $Id: //depot/SpectraBSD/head/share/man/man4/mps.4#6 $ .\" $FreeBSD$ .\" -.Dd February 7, 2012 +.Dd June 30, 2012 .Dt MPS 4 .Os .Sh NAME @@ -205,9 +205,6 @@ This man page was written by This driver has a couple of known shortcomings: .Bl -bullet -compact .It -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 ) . .It From owner-svn-src-head@FreeBSD.ORG Sat Jun 30 14:48: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 0F29C10656D0; Sat, 30 Jun 2012 14:48:52 +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 9A6F38FC1A; Sat, 30 Jun 2012 14:48: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 q5UEmq2O024952; Sat, 30 Jun 2012 14:48:52 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5UEmqxU024950; Sat, 30 Jun 2012 14:48:52 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201206301448.q5UEmqxU024950@svn.freebsd.org> From: Marius Strobl Date: Sat, 30 Jun 2012 14:48: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: r237841 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 30 Jun 2012 14:48:53 -0000 Author: marius Date: Sat Jun 30 14:48:52 2012 New Revision: 237841 URL: http://svn.freebsd.org/changeset/base/237841 Log: Exclude at91sam9x25 support, which just wastes space for Ethernut 5. Modified: head/sys/arm/at91/std.ethernut5 Modified: head/sys/arm/at91/std.ethernut5 ============================================================================== --- head/sys/arm/at91/std.ethernut5 Sat Jun 30 14:18:04 2012 (r237840) +++ head/sys/arm/at91/std.ethernut5 Sat Jun 30 14:48:52 2012 (r237841) @@ -9,3 +9,4 @@ options KERNVIRTADDR=0xc0000000 device at91_board_ethernut5 nodevice at91sam9g20 +nodevice at91sam9x25 From owner-svn-src-head@FreeBSD.ORG Sat Jun 30 14:55: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 6C1391065672; Sat, 30 Jun 2012 14:55:37 +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 56C0A8FC08; Sat, 30 Jun 2012 14: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 q5UEtbuE025275; Sat, 30 Jun 2012 14:55:37 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5UEtbQb025273; Sat, 30 Jun 2012 14:55:37 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201206301455.q5UEtbQb025273@svn.freebsd.org> From: Marius Strobl Date: Sat, 30 Jun 2012 14: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: r237842 - head/sys/sparc64/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, 30 Jun 2012 14:55:37 -0000 Author: marius Date: Sat Jun 30 14:55:36 2012 New Revision: 237842 URL: http://svn.freebsd.org/changeset/base/237842 Log: Switch back to the 4BSD scheduler for now. There is some more or less recent regression with ULE, causing processes to get stuck in getblk as well as interrupt handler execution delays to rise above the command timeout of mpt(4). MFC after: 3 days Modified: head/sys/sparc64/conf/GENERIC Modified: head/sys/sparc64/conf/GENERIC ============================================================================== --- head/sys/sparc64/conf/GENERIC Sat Jun 30 14:48:52 2012 (r237841) +++ head/sys/sparc64/conf/GENERIC Sat Jun 30 14:55:36 2012 (r237842) @@ -26,7 +26,7 @@ makeoptions DEBUG=-g # Build kernel wit # Platforms supported # At this time all platforms are supported, as-is. -options SCHED_ULE # ULE scheduler +options SCHED_4BSD # 4BSD scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols From owner-svn-src-head@FreeBSD.ORG Sat Jun 30 16:20: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 A6F181065673; Sat, 30 Jun 2012 16:20:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C9ED8FC0C; Sat, 30 Jun 2012 16:20: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 q5UGK2s9028853; Sat, 30 Jun 2012 16:20:02 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5UGK2CH028852; Sat, 30 Jun 2012 16:20:02 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201206301620.q5UGK2CH028852@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 30 Jun 2012 16:20: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: r237844 - head/usr.bin/killall X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 30 Jun 2012 16:20:02 -0000 Author: kib Date: Sat Jun 30 16:20:01 2012 New Revision: 237844 URL: http://svn.freebsd.org/changeset/base/237844 Log: Initialize procs closer to the place were it is used. Free can properly handle NULL pointer (but keep free() call on the premise that the code might be reused). Show errno when realloc failed. MFC after: 3 days Modified: head/usr.bin/killall/killall.c Modified: head/usr.bin/killall/killall.c ============================================================================== --- head/usr.bin/killall/killall.c Sat Jun 30 15:55:40 2012 (r237843) +++ head/usr.bin/killall/killall.c Sat Jun 30 16:20:01 2012 (r237844) @@ -90,7 +90,7 @@ nosig(char *name) int main(int ac, char **av) { - struct kinfo_proc *procs = NULL, *newprocs; + struct kinfo_proc *procs, *newprocs; struct stat sb; struct passwd *pw; regex_t rgx; @@ -292,14 +292,14 @@ main(int ac, char **av) miblen = 4; } + procs = NULL; st = sysctl(mib, miblen, NULL, &size, NULL, 0); do { size += size / 10; newprocs = realloc(procs, size); - if (newprocs == 0) { - if (procs) - free(procs); - errx(1, "could not reallocate memory"); + if (newprocs == NULL) { + free(procs); + err(1, "could not reallocate memory"); } procs = newprocs; st = sysctl(mib, miblen, procs, &size, NULL, 0); From owner-svn-src-head@FreeBSD.ORG Sat Jun 30 16:21: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 4F320106566C; Sat, 30 Jun 2012 16:21: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 39BDD8FC12; Sat, 30 Jun 2012 16:21: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 q5UGLqg8028955; Sat, 30 Jun 2012 16:21:52 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5UGLqvG028953; Sat, 30 Jun 2012 16:21:52 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201206301621.q5UGLqvG028953@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 30 Jun 2012 16:21: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: r237845 - head/usr.bin/killall X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 30 Jun 2012 16:21:52 -0000 Author: kib Date: Sat Jun 30 16:21:51 2012 New Revision: 237845 URL: http://svn.freebsd.org/changeset/base/237845 Log: Only initialize array of mibs once. MFC after: 3 days Modified: head/usr.bin/killall/killall.c Modified: head/usr.bin/killall/killall.c ============================================================================== --- head/usr.bin/killall/killall.c Sat Jun 30 16:20:01 2012 (r237844) +++ head/usr.bin/killall/killall.c Sat Jun 30 16:21:51 2012 (r237845) @@ -278,9 +278,6 @@ main(int ac, char **av) size = 0; mib[0] = CTL_KERN; mib[1] = KERN_PROC; - mib[2] = KERN_PROC_PROC; - mib[3] = 0; - miblen = 3; if (user) { mib[2] = eflag ? KERN_PROC_UID : KERN_PROC_RUID; @@ -290,6 +287,10 @@ main(int ac, char **av) mib[2] = KERN_PROC_TTY; mib[3] = tdev; miblen = 4; + } else { + mib[2] = KERN_PROC_PROC; + mib[3] = 0; + miblen = 3; } procs = NULL; From owner-svn-src-head@FreeBSD.ORG Sat Jun 30 16:23: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 0C879106564A; Sat, 30 Jun 2012 16:23: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 EC30B8FC0C; Sat, 30 Jun 2012 16:23: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 q5UGN8uk029053; Sat, 30 Jun 2012 16:23:08 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5UGN8c3029051; Sat, 30 Jun 2012 16:23:08 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201206301623.q5UGN8c3029051@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 30 Jun 2012 16:23: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: r237846 - head/usr.bin/killall X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 30 Jun 2012 16:23:09 -0000 Author: kib Date: Sat Jun 30 16:23:08 2012 New Revision: 237846 URL: http://svn.freebsd.org/changeset/base/237846 Log: killall(1) does not use libkvm. MFC after: 3 days Modified: head/usr.bin/killall/killall.c Modified: head/usr.bin/killall/killall.c ============================================================================== --- head/usr.bin/killall/killall.c Sat Jun 30 16:21:51 2012 (r237845) +++ head/usr.bin/killall/killall.c Sat Jun 30 16:23:08 2012 (r237846) @@ -310,7 +310,7 @@ main(int ac, char **av) if (size % sizeof(struct kinfo_proc) != 0) { fprintf(stderr, "proc size mismatch (%zu total, %zu chunks)\n", size, sizeof(struct kinfo_proc)); - fprintf(stderr, "userland out of sync with kernel, recompile libkvm etc\n"); + fprintf(stderr, "userland out of sync with kernel\n"); exit(1); } nprocs = size / sizeof(struct kinfo_proc); From owner-svn-src-head@FreeBSD.ORG Sat Jun 30 16:36: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 7079E1065670; Sat, 30 Jun 2012 16:36: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 5AD978FC08; Sat, 30 Jun 2012 16:36: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 q5UGaNLH029815; Sat, 30 Jun 2012 16:36:23 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5UGaNCB029813; Sat, 30 Jun 2012 16:36:23 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201206301636.q5UGaNCB029813@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 30 Jun 2012 16:36: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: r237847 - head/usr.bin/killall X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 30 Jun 2012 16:36:23 -0000 Author: kib Date: Sat Jun 30 16:36:22 2012 New Revision: 237847 URL: http://svn.freebsd.org/changeset/base/237847 Log: Once in a month, when the moon is full, killall mistakenly considers living process as a zombie and refuses to kill it. The cause is that the code masks ki_stat with SZOMB to compare with SZOMB, but ki_stat is not a mask. Possibly reported by: cperciva MFC after: 3 days Modified: head/usr.bin/killall/killall.c Modified: head/usr.bin/killall/killall.c ============================================================================== --- head/usr.bin/killall/killall.c Sat Jun 30 16:23:08 2012 (r237846) +++ head/usr.bin/killall/killall.c Sat Jun 30 16:36:22 2012 (r237847) @@ -319,7 +319,7 @@ main(int ac, char **av) mypid = getpid(); for (i = 0; i < nprocs; i++) { - if ((procs[i].ki_stat & SZOMB) == SZOMB && !zflag) + if (procs[i].ki_stat == SZOMB && !zflag) continue; thispid = procs[i].ki_pid; strlcpy(thiscmd, procs[i].ki_comm, sizeof(thiscmd)); From owner-svn-src-head@FreeBSD.ORG Sat Jun 30 17:01: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 43ABC106566B; Sat, 30 Jun 2012 17:01:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E5E08FC19; Sat, 30 Jun 2012 17:01: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 q5UH1Tww031290; Sat, 30 Jun 2012 17:01:29 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5UH1SmU031288; Sat, 30 Jun 2012 17:01:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201206301701.q5UH1SmU031288@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 30 Jun 2012 17:01:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237848 - 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: Sat, 30 Jun 2012 17:01:29 -0000 Author: kib Date: Sat Jun 30 17:01:28 2012 New Revision: 237848 URL: http://svn.freebsd.org/changeset/base/237848 Log: Remove stray blank line. MFC after: 3 days Modified: head/sys/sys/proc.h Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Sat Jun 30 16:36:22 2012 (r237847) +++ head/sys/sys/proc.h Sat Jun 30 17:01:28 2012 (r237848) @@ -627,7 +627,6 @@ struct proc { #define P_SIGEVENT 0x200000 /* Process pending signals changed. */ #define P_SINGLE_BOUNDARY 0x400000 /* Threads should suspend at user boundary. */ #define P_HWPMC 0x800000 /* Process is using HWPMCs */ - #define P_JAILED 0x1000000 /* Process is in jail. */ #define P_ORPHAN 0x2000000 /* Orphaned. */ #define P_INEXEC 0x4000000 /* Process is in execve(). */ From owner-svn-src-head@FreeBSD.ORG Sat Jun 30 19:09:02 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 B9C441065670; Sat, 30 Jun 2012 19:09:02 +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 A4D468FC12; Sat, 30 Jun 2012 19:09: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 q5UJ926A036536; Sat, 30 Jun 2012 19:09:02 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5UJ92LA036534; Sat, 30 Jun 2012 19:09:02 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201206301909.q5UJ92LA036534@svn.freebsd.org> From: Andrew Thompson Date: Sat, 30 Jun 2012 19:09:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237852 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2012 19:09:02 -0000 Author: thompsa Date: Sat Jun 30 19:09:02 2012 New Revision: 237852 URL: http://svn.freebsd.org/changeset/base/237852 Log: Add the same check as vlan(4) where we ignore the ifnet departure event if the interface is just being renamed. PR: kern/169557 Submitted by: Mark Johnston MFC after: 3 days Modified: head/sys/net/if_lagg.c Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Sat Jun 30 18:58:21 2012 (r237851) +++ head/sys/net/if_lagg.c Sat Jun 30 19:09:02 2012 (r237852) @@ -797,6 +797,9 @@ lagg_port_ifdetach(void *arg __unused, s if ((lp = ifp->if_lagg) == NULL) return; + /* If the ifnet is just being renamed, don't do anything. */ + if (ifp->if_flags & IFF_RENAMING) + return; sc = lp->lp_softc; From owner-svn-src-head@FreeBSD.ORG Sat Jun 30 20:25: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 66C6F1065670; Sat, 30 Jun 2012 20:25:13 +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 526938FC26; Sat, 30 Jun 2012 20:25: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 q5UKPDwN039910; Sat, 30 Jun 2012 20:25:13 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5UKPDav039907; Sat, 30 Jun 2012 20:25:13 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201206302025.q5UKPDav039907@svn.freebsd.org> From: Alan Cox Date: Sat, 30 Jun 2012 20:25: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: r237855 - in head/sys/amd64: amd64 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: Sat, 30 Jun 2012 20:25:13 -0000 Author: alc Date: Sat Jun 30 20:25:12 2012 New Revision: 237855 URL: http://svn.freebsd.org/changeset/base/237855 Log: Optimize reserve_pv_entries() using the popcnt instruction. Modified: head/sys/amd64/amd64/pmap.c head/sys/amd64/include/cpufunc.h Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sat Jun 30 20:23:59 2012 (r237854) +++ head/sys/amd64/amd64/pmap.c Sat Jun 30 20:25:12 2012 (r237855) @@ -2408,9 +2408,15 @@ reserve_pv_entries(pmap_t pmap, int need retry: avail = 0; TAILQ_FOREACH(pc, &pmap->pm_pvchunk, pc_list) { - free = popcnt_pc_map_elem(pc->pc_map[0]); - free += popcnt_pc_map_elem(pc->pc_map[1]); - free += popcnt_pc_map_elem(pc->pc_map[2]); + if ((cpu_feature2 & CPUID2_POPCNT) == 0) { + free = popcnt_pc_map_elem(pc->pc_map[0]); + free += popcnt_pc_map_elem(pc->pc_map[1]); + free += popcnt_pc_map_elem(pc->pc_map[2]); + } else { + free = popcntq(pc->pc_map[0]); + free += popcntq(pc->pc_map[1]); + free += popcntq(pc->pc_map[2]); + } if (free == 0) break; avail += free; Modified: head/sys/amd64/include/cpufunc.h ============================================================================== --- head/sys/amd64/include/cpufunc.h Sat Jun 30 20:23:59 2012 (r237854) +++ head/sys/amd64/include/cpufunc.h Sat Jun 30 20:25:12 2012 (r237855) @@ -273,6 +273,15 @@ outw(u_int port, u_short data) __asm __volatile("outw %0, %w1" : : "a" (data), "Nd" (port)); } +static __inline u_long +popcntq(u_long mask) +{ + u_long result; + + __asm __volatile("popcntq %1,%0" : "=r" (result) : "rm" (mask)); + return (result); +} + static __inline void mfence(void) {