From owner-svn-src-stable@FreeBSD.ORG Sun Dec 1 22:43:15 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B495A70; Sun, 1 Dec 2013 22:43:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3AE341E3B; Sun, 1 Dec 2013 22:43:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB1MhFvr041024; Sun, 1 Dec 2013 22:43:15 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB1MhEmV041022; Sun, 1 Dec 2013 22:43:14 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201312012243.rB1MhEmV041022@svn.freebsd.org> From: Peter Wemm Date: Sun, 1 Dec 2013 22:43:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258818 - stable/9/usr.bin/uname X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 22:43:15 -0000 Author: peter Date: Sun Dec 1 22:43:14 2013 New Revision: 258818 URL: http://svnweb.freebsd.org/changeset/base/258818 Log: MFC r256557 - kernel and userland osreldate helpers. Modified: stable/9/usr.bin/uname/uname.1 stable/9/usr.bin/uname/uname.c Modified: stable/9/usr.bin/uname/uname.1 ============================================================================== --- stable/9/usr.bin/uname/uname.1 Sun Dec 1 22:08:19 2013 (r258817) +++ stable/9/usr.bin/uname/uname.1 Sun Dec 1 22:43:14 2013 (r258818) @@ -28,7 +28,7 @@ .\" @(#)uname.1 8.3 (Berkeley) 4/8/94 .\" $FreeBSD$ .\" -.Dd January 26, 2010 +.Dd December 1, 2013 .Dt UNAME 1 .Os .Sh NAME @@ -36,7 +36,7 @@ .Nd display information about the system .Sh SYNOPSIS .Nm -.Op Fl aimnoprsv +.Op Fl aiKmnoprsUv .Sh DESCRIPTION The .Nm @@ -55,6 +55,10 @@ and were specified. .It Fl i Write the kernel ident to standard output. +.It Fl K +Write the +.Fx +version of the kernel. .It Fl m Write the type of the current hardware platform to standard output. .It Fl n @@ -70,6 +74,10 @@ Write the current release level of the o to standard output. .It Fl s Write the name of the operating system implementation to standard output. +.It Fl U +Write the +.Fx +version of the user environment. .It Fl v Write the version level of this release of the operating system to standard output. @@ -79,6 +87,14 @@ If the .Fl a flag is specified, or multiple flags are specified, all output is written on a single line, separated by spaces. +.Pp +The +.Fl K +and +.Fl U +flags are intended to be used for fine grain differentiation of incremental +.Fx +development and user visible changes. .Sh ENVIRONMENT An environment variable composed of the string .Ev UNAME_ @@ -91,6 +107,8 @@ of the environment variable. .Sh EXIT STATUS .Ex -std .Sh SEE ALSO +.Xr feature_present 3 , +.Xr getosreldate 3 , .Xr sysctl 3 , .Xr uname 3 , .Xr sysctl 8 @@ -104,3 +122,12 @@ specification. The .Nm command appeared in PWB UNIX. +.Pp +The +.Fl K +and +.Fl U +extension flags were first released in +.Fx 10.0 +and then ported back to +.Fx 9.2-STABLE . Modified: stable/9/usr.bin/uname/uname.c ============================================================================== --- stable/9/usr.bin/uname/uname.c Sun Dec 1 22:08:19 2013 (r258817) +++ stable/9/usr.bin/uname/uname.c Sun Dec 1 22:43:14 2013 (r258818) @@ -54,6 +54,8 @@ static const char sccsid[] = "@(#)uname. #include #include +#include + #define MFLAG 0x01 #define NFLAG 0x02 #define PFLAG 0x04 @@ -61,9 +63,12 @@ static const char sccsid[] = "@(#)uname. #define SFLAG 0x10 #define VFLAG 0x20 #define IFLAG 0x40 +#define UFLAG 0x80 +#define KFLAG 0x100 typedef void (*get_t)(void); get_t get_ident, get_platform, get_hostname, get_arch, get_release, get_sysname, get_version; +get_t get_kernvers, get_uservers; void native_ident(void); void native_platform(void); @@ -72,11 +77,13 @@ void native_arch(void); void native_release(void); void native_sysname(void); void native_version(void); +void native_kernvers(void); +void native_uservers(void); void print_uname(u_int); void setup_get(void); void usage(void); -char *ident, *platform, *hostname, *arch, *release, *sysname, *version; +char *ident, *platform, *hostname, *arch, *release, *sysname, *version, *kernvers, *uservers; int space; int @@ -88,7 +95,7 @@ main(int argc, char *argv[]) setup_get(); flags = 0; - while ((ch = getopt(argc, argv, "aimnoprsv")) != -1) + while ((ch = getopt(argc, argv, "aiKmnoprsUv")) != -1) switch(ch) { case 'a': flags |= (MFLAG | NFLAG | RFLAG | SFLAG | VFLAG); @@ -96,6 +103,9 @@ main(int argc, char *argv[]) case 'i': flags |= IFLAG; break; + case 'K': + flags |= KFLAG; + break; case 'm': flags |= MFLAG; break; @@ -112,6 +122,9 @@ main(int argc, char *argv[]) case 'o': flags |= SFLAG; break; + case 'U': + flags |= UFLAG; + break; case 'v': flags |= VFLAG; break; @@ -152,6 +165,8 @@ setup_get(void) CHECK_ENV("m", platform); CHECK_ENV("p", arch); CHECK_ENV("i", ident); + CHECK_ENV("K", kernvers); + CHECK_ENV("U", uservers); } #define PRINT_FLAG(flags,flag,var) \ @@ -175,6 +190,8 @@ print_uname(u_int flags) PRINT_FLAG(flags, MFLAG, platform); PRINT_FLAG(flags, PFLAG, arch); PRINT_FLAG(flags, IFLAG, ident); + PRINT_FLAG(flags, KFLAG, kernvers); + PRINT_FLAG(flags, UFLAG, uservers); printf("\n"); } @@ -243,8 +260,26 @@ NATIVE_SYSCTLNAME_GET(ident, "kern.ident } NATIVE_SET; void +native_uservers(void) +{ + static char buf[128]; + + snprintf(buf, sizeof(buf), "%d", __FreeBSD_version); + uservers = buf; +} + +void +native_kernvers(void) +{ + static char buf[128]; + + snprintf(buf, sizeof(buf), "%d", getosreldate()); + kernvers = buf; +} + +void usage(void) { - fprintf(stderr, "usage: uname [-aimnoprsv]\n"); + fprintf(stderr, "usage: uname [-aiKmnoprsUv]\n"); exit(1); } From owner-svn-src-stable@FreeBSD.ORG Mon Dec 2 10:59:42 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D76D52A; Mon, 2 Dec 2013 10:59:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3F90C185C; Mon, 2 Dec 2013 10:59:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB2Axgpf032234; Mon, 2 Dec 2013 10:59:42 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rB2AxgAY032233; Mon, 2 Dec 2013 10:59:42 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201312021059.rB2AxgAY032233@svn.freebsd.org> From: Bryan Drewery Date: Mon, 2 Dec 2013 10:59:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258844 - stable/9/lib/libfetch X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 10:59:42 -0000 Author: bdrewery (ports committer) Date: Mon Dec 2 10:59:41 2013 New Revision: 258844 URL: http://svnweb.freebsd.org/changeset/base/258844 Log: MFC r258347,r258349: Support SNI in libfetch SNI is Server Name Indentification which is a protocol for TLS that indicates the host that is being connected to at the start of the handshake. It allows to use Virtual Hosts on HTTPS. PR: kern/183583 Approved by: bapt (implicit) Modified: stable/9/lib/libfetch/common.c Directory Properties: stable/9/lib/libfetch/ (props changed) Modified: stable/9/lib/libfetch/common.c ============================================================================== --- stable/9/lib/libfetch/common.c Mon Dec 2 10:18:25 2013 (r258843) +++ stable/9/lib/libfetch/common.c Mon Dec 2 10:59:41 2013 (r258844) @@ -829,6 +829,16 @@ fetch_ssl(conn_t *conn, const struct url return (-1); } SSL_set_fd(conn->ssl, conn->sd); + +#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT) + if (!SSL_set_tlsext_host_name(conn->ssl, + __DECONST(struct url *, URL)->host)) { + fprintf(stderr, + "TLS server name indication extension failed for host %s\n", + URL->host); + return (-1); + } +#endif while ((ret = SSL_connect(conn->ssl)) == -1) { ssl_err = SSL_get_error(conn->ssl, ret); if (ssl_err != SSL_ERROR_WANT_READ && From owner-svn-src-stable@FreeBSD.ORG Mon Dec 2 18:20:08 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 596B258E; Mon, 2 Dec 2013 18:20:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 443DE1A17; Mon, 2 Dec 2013 18:20:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB2IK8pC016205; Mon, 2 Dec 2013 18:20:08 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB2IK8Nv016204; Mon, 2 Dec 2013 18:20:08 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201312021820.rB2IK8Nv016204@svn.freebsd.org> From: Craig Rodrigues Date: Mon, 2 Dec 2013 18:20:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258852 - stable/9/sys/vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 18:20:08 -0000 Author: rodrigc Date: Mon Dec 2 18:20:07 2013 New Revision: 258852 URL: http://svnweb.freebsd.org/changeset/base/258852 Log: MFC r258737 In keg_dtor(), print out the keg name in the "Freed UMA keg was not empty" message printed to the console. This makes it easier to track down the source of certain memory leaks. Suggested by: adrian Modified: stable/9/sys/vm/uma_core.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/uma_core.c ============================================================================== --- stable/9/sys/vm/uma_core.c Mon Dec 2 17:45:43 2013 (r258851) +++ stable/9/sys/vm/uma_core.c Mon Dec 2 18:20:07 2013 (r258852) @@ -1509,8 +1509,9 @@ keg_dtor(void *arg, int size, void *udat keg = (uma_keg_t)arg; KEG_LOCK(keg); if (keg->uk_free != 0) { - printf("Freed UMA keg was not empty (%d items). " + printf("Freed UMA keg (%s) was not empty (%d items). " " Lost %d pages of memory.\n", + keg->uk_name ? keg->uk_name : "", keg->uk_free, keg->uk_pages); } KEG_UNLOCK(keg); From owner-svn-src-stable@FreeBSD.ORG Tue Dec 3 16:07:59 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D0E27AF; Tue, 3 Dec 2013 16:07:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 56DBB1EA0; Tue, 3 Dec 2013 16:07:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3G7xg0085400; Tue, 3 Dec 2013 16:07:59 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3G7vYg085385; Tue, 3 Dec 2013 16:07:57 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312031607.rB3G7vYg085385@svn.freebsd.org> From: John Baldwin Date: Tue, 3 Dec 2013 16:07:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258870 - in stable/9: lib/libc/sys sys/dev/drm2/i915 sys/kern sys/sys sys/vm usr.bin/kdump usr.bin/truss X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 16:07:59 -0000 Author: jhb Date: Tue Dec 3 16:07:56 2013 New Revision: 258870 URL: http://svnweb.freebsd.org/changeset/base/258870 Log: MFC 253471,253620,254430,254538: Change mmap() to more optimally use superpages and provide support for tweaking alignment of virtual mappings. - Add a new address space allocation method (VMFS_OPTIMAL_SPACE) for vm_map_find() that will try to alter the alignment of a mapping to match any existing superpage mappings of the object being mapped. If no suitable address range is found with the necessary alignment, vm_map_find() will fall back to using the simple first-fit strategy (VMFS_ANY_SPACE). - Change mmap() without MAP_FIXED, shmat(), shm_map(), and the GEM mapping ioctl to use VMFS_OPTIMAL_SPACE instead of VMFS_ANY_SPACE. - MAP_ALIGNED(n) requests a mapping aligned on a boundary of (1 << n). Requests for n >= number of bits in a pointer or less than the size of a page fail with EINVAL. This matches the API provided by NetBSD. - MAP_ALIGNED_SUPER is a special case of MAP_ALIGNED. It can be used to optimize the chances of using large pages. By default it will align the mapping on a large page boundary (the system is free to choose any large page size to align to that seems best for the mapping request). However, if the object being mapped is already using large pages, then it will align the virtual mapping to match the existing large pages in the object instead. - Internally, VMFS_ALIGNED_SPACE is now renamed to VMFS_SUPER_SPACE, and VMFS_ALIGNED_SPACE(n) is repurposed for specifying a specific alignment. MAP_ALIGNED(n) maps to using VMFS_ALIGNED_SPACE(n), while MAP_ALIGNED_SUPER maps to VMFS_SUPER_SPACE. - mmap() of a device object now uses VMFS_OPTIMAL_SPACE rather than explicitly using VMFS_SUPER_SPACE. All device objects are forced to use a specific color on creation, so VMFS_OPTIMAL_SPACE is effectively equivalent. PR: ports/184173 (exp-run) Modified: stable/9/lib/libc/sys/mmap.2 stable/9/sys/dev/drm2/i915/i915_gem.c stable/9/sys/kern/sysv_shm.c stable/9/sys/kern/uipc_shm.c stable/9/sys/sys/mman.h stable/9/sys/vm/vm_kern.c stable/9/sys/vm/vm_map.c stable/9/sys/vm/vm_map.h stable/9/sys/vm/vm_mmap.c stable/9/usr.bin/kdump/mksubr stable/9/usr.bin/truss/syscalls.c Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/sys/ (props changed) stable/9/usr.bin/kdump/ (props changed) stable/9/usr.bin/truss/ (props changed) Modified: stable/9/lib/libc/sys/mmap.2 ============================================================================== --- stable/9/lib/libc/sys/mmap.2 Tue Dec 3 14:50:12 2013 (r258869) +++ stable/9/lib/libc/sys/mmap.2 Tue Dec 3 16:07:56 2013 (r258870) @@ -28,7 +28,7 @@ .\" @(#)mmap.2 8.4 (Berkeley) 5/11/95 .\" $FreeBSD$ .\" -.Dd March 18, 2012 +.Dd August 16, 2013 .Dt MMAP 2 .Os .Sh NAME @@ -97,7 +97,30 @@ Sharing, mapping type and options are sp argument by .Em or Ns 'ing the following values: -.Bl -tag -width MAP_HASSEMAPHORE +.Bl -tag -width MAP_PREFAULT_READ +.It Dv MAP_ALIGNED Ns Pq Fa n +Align the region on a requested boundary. +If a suitable region cannot be found, +.Fn mmap +will fail. +The +.Fa n +argument specifies the binary logarithm of the desired alignment. +.It Dv MAP_ALIGNED_SUPER +Align the region to maximize the potential use of large +.Pq Dq super +pages. +If a suitable region cannot be found, +.Fn mmap +will fail. +The system will choose a suitable page size based on the size of +mapping. +The page size used as well as the alignment of the region may both be +affected by properties of the file being mapped. +In particular, +the physical address of existing pages of a file may require a specific +alignment. +The region is not guaranteed to be aligned on any specific boundary. .It Dv MAP_ANON Map anonymous memory not associated with any specific file. The file descriptor used for creating @@ -274,6 +297,25 @@ Although this implementation does not im the .Fa offset argument, a portable program must only use page-aligned values. +.Pp +Large page mappings require that the pages backing an object be +aligned in matching blocks in both the virtual address space and RAM. +The system will automatically attempt to use large page mappings when +mapping an object that is already backed by large pages in RAM by +aligning the mapping request in the virtual address space to match the +alignment of the large physical pages. +The system may also use large page mappings when mapping portions of an +object that are not yet backed by pages in RAM. +The +.Dv MAP_ALIGNED_SUPER +flag is an optimization that will align the mapping request to the +size of a large page similar to +.Dv MAP_ALIGNED , +except that the system will override this alignment if an object already +uses large pages so that the mapping will be consistent with the existing +large pages. +This flag is mostly useful for maximizing the use of large pages on the +first mapping of objects that do not yet have pages present in RAM. .Sh RETURN VALUES Upon successful completion, .Fn mmap @@ -325,6 +367,10 @@ The argument was equal to zero. .It Bq Er EINVAL +.Dv MAP_ALIGNED +was specified and the desired alignment was either larger than the +virtual address size of the machine or smaller than a page. +.It Bq Er EINVAL .Dv MAP_ANON was specified and the .Fa fd @@ -356,7 +402,8 @@ was specified and insufficient memory wa .Xr msync 2 , .Xr munlock 2 , .Xr munmap 2 , -.Xr getpagesize 3 +.Xr getpagesize 3 , +.Xr getpagesizes 3 .Sh BUGS The .Fa len Modified: stable/9/sys/dev/drm2/i915/i915_gem.c ============================================================================== --- stable/9/sys/dev/drm2/i915/i915_gem.c Tue Dec 3 14:50:12 2013 (r258869) +++ stable/9/sys/dev/drm2/i915/i915_gem.c Tue Dec 3 16:07:56 2013 (r258870) @@ -1289,7 +1289,7 @@ i915_gem_mmap_ioctl(struct drm_device *d vm_object_reference(obj->vm_obj); DRM_UNLOCK(dev); rv = vm_map_find(map, obj->vm_obj, args->offset, &addr, args->size, - VMFS_ANY_SPACE, VM_PROT_READ | VM_PROT_WRITE, + VMFS_OPTIMAL_SPACE, VM_PROT_READ | VM_PROT_WRITE, VM_PROT_READ | VM_PROT_WRITE, MAP_INHERIT_SHARE); if (rv != KERN_SUCCESS) { vm_object_deallocate(obj->vm_obj); Modified: stable/9/sys/kern/sysv_shm.c ============================================================================== --- stable/9/sys/kern/sysv_shm.c Tue Dec 3 14:50:12 2013 (r258869) +++ stable/9/sys/kern/sysv_shm.c Tue Dec 3 16:07:56 2013 (r258870) @@ -413,7 +413,7 @@ kern_shmat(td, shmid, shmaddr, shmflg) vm_object_reference(shmseg->object); rv = vm_map_find(&p->p_vmspace->vm_map, shmseg->object, 0, &attach_va, size, (flags & MAP_FIXED) ? VMFS_NO_SPACE : - VMFS_ANY_SPACE, prot, prot, MAP_INHERIT_SHARE); + VMFS_OPTIMAL_SPACE, prot, prot, MAP_INHERIT_SHARE); if (rv != KERN_SUCCESS) { vm_object_deallocate(shmseg->object); error = ENOMEM; Modified: stable/9/sys/kern/uipc_shm.c ============================================================================== --- stable/9/sys/kern/uipc_shm.c Tue Dec 3 14:50:12 2013 (r258869) +++ stable/9/sys/kern/uipc_shm.c Tue Dec 3 16:07:56 2013 (r258870) @@ -778,7 +778,7 @@ shm_map(struct file *fp, size_t size, of offset = trunc_page(offset); size = round_page(size + ofs); rv = vm_map_find(kernel_map, obj, offset, &kva, size, - VMFS_ALIGNED_SPACE, VM_PROT_READ | VM_PROT_WRITE, + VMFS_OPTIMAL_SPACE, VM_PROT_READ | VM_PROT_WRITE, VM_PROT_READ | VM_PROT_WRITE, 0); if (rv == KERN_SUCCESS) { rv = vm_map_wire(kernel_map, kva, kva + size, Modified: stable/9/sys/sys/mman.h ============================================================================== --- stable/9/sys/sys/mman.h Tue Dec 3 14:50:12 2013 (r258869) +++ stable/9/sys/sys/mman.h Tue Dec 3 16:07:56 2013 (r258870) @@ -91,6 +91,17 @@ */ #define MAP_NOCORE 0x00020000 /* dont include these pages in a coredump */ #define MAP_PREFAULT_READ 0x00040000 /* prefault mapping for reading */ + +/* + * Request specific alignment (n == log2 of the desired alignment). + * + * MAP_ALIGNED_SUPER requests optimal superpage alignment, but does + * not enforce a specific alignment. + */ +#define MAP_ALIGNED(n) ((n) << MAP_ALIGNMENT_SHIFT) +#define MAP_ALIGNMENT_SHIFT 24 +#define MAP_ALIGNMENT_MASK MAP_ALIGNED(0xff) +#define MAP_ALIGNED_SUPER MAP_ALIGNED(1) /* align on a superpage */ #endif /* __BSD_VISIBLE */ #if __POSIX_VISIBLE >= 199309 Modified: stable/9/sys/vm/vm_kern.c ============================================================================== --- stable/9/sys/vm/vm_kern.c Tue Dec 3 14:50:12 2013 (r258869) +++ stable/9/sys/vm/vm_kern.c Tue Dec 3 16:07:56 2013 (r258870) @@ -238,7 +238,7 @@ kmem_suballoc(vm_map_t parent, vm_offset *min = vm_map_min(parent); ret = vm_map_find(parent, NULL, 0, min, size, superpage_align ? - VMFS_ALIGNED_SPACE : VMFS_ANY_SPACE, VM_PROT_ALL, VM_PROT_ALL, + VMFS_SUPER_SPACE : VMFS_ANY_SPACE, VM_PROT_ALL, VM_PROT_ALL, MAP_ACC_NO_CHARGE); if (ret != KERN_SUCCESS) panic("kmem_suballoc: bad status return of %d", ret); Modified: stable/9/sys/vm/vm_map.c ============================================================================== --- stable/9/sys/vm/vm_map.c Tue Dec 3 14:50:12 2013 (r258869) +++ stable/9/sys/vm/vm_map.c Tue Dec 3 16:07:56 2013 (r258870) @@ -1444,19 +1444,34 @@ vm_map_find(vm_map_t map, vm_object_t ob vm_size_t length, int find_space, vm_prot_t prot, vm_prot_t max, int cow) { - vm_offset_t start; + vm_offset_t alignment, initial_addr, start; int result; - start = *addr; + if (find_space == VMFS_OPTIMAL_SPACE && (object == NULL || + (object->flags & OBJ_COLORED) == 0)) + find_space = VMFS_ANY_SPACE; + if (find_space >> 8 != 0) { + KASSERT((find_space & 0xff) == 0, ("bad VMFS flags")); + alignment = (vm_offset_t)1 << (find_space >> 8); + } else + alignment = 0; + initial_addr = *addr; +again: + start = initial_addr; vm_map_lock(map); do { if (find_space != VMFS_NO_SPACE) { if (vm_map_findspace(map, start, length, addr)) { vm_map_unlock(map); + if (find_space == VMFS_OPTIMAL_SPACE) { + find_space = VMFS_ANY_SPACE; + goto again; + } return (KERN_NO_SPACE); } switch (find_space) { - case VMFS_ALIGNED_SPACE: + case VMFS_SUPER_SPACE: + case VMFS_OPTIMAL_SPACE: pmap_align_superpage(object, offset, addr, length); break; @@ -1465,7 +1480,13 @@ vm_map_find(vm_map_t map, vm_object_t ob pmap_align_tlb(addr); break; #endif + case VMFS_ANY_SPACE: + break; default: + if ((*addr & (alignment - 1)) != 0) { + *addr &= ~(alignment - 1); + *addr += alignment; + } break; } @@ -1473,11 +1494,8 @@ vm_map_find(vm_map_t map, vm_object_t ob } result = vm_map_insert(map, object, offset, start, start + length, prot, max, cow); - } while (result == KERN_NO_SPACE && (find_space == VMFS_ALIGNED_SPACE -#ifdef VMFS_TLB_ALIGNED_SPACE - || find_space == VMFS_TLB_ALIGNED_SPACE -#endif - )); + } while (result == KERN_NO_SPACE && find_space != VMFS_NO_SPACE && + find_space != VMFS_ANY_SPACE); vm_map_unlock(map); return (result); } Modified: stable/9/sys/vm/vm_map.h ============================================================================== --- stable/9/sys/vm/vm_map.h Tue Dec 3 14:50:12 2013 (r258869) +++ stable/9/sys/vm/vm_map.h Tue Dec 3 16:07:56 2013 (r258870) @@ -339,14 +339,19 @@ long vmspace_resident_count(struct vmspa #define VM_FAULT_READ_AHEAD_MAX min(atop(MAXPHYS) - 1, UINT8_MAX) /* - * The following "find_space" options are supported by vm_map_find() + * The following "find_space" options are supported by vm_map_find(). + * + * For VMFS_ALIGNED_SPACE, the desired alignment is specified to + * the macro argument as log base 2 of the desired alignment. */ #define VMFS_NO_SPACE 0 /* don't find; use the given range */ #define VMFS_ANY_SPACE 1 /* find a range with any alignment */ -#define VMFS_ALIGNED_SPACE 2 /* find a superpage-aligned range */ +#define VMFS_SUPER_SPACE 2 /* find a superpage-aligned range */ +#define VMFS_ALIGNED_SPACE(x) ((x) << 8) /* find a range with fixed alignment */ #if defined(__mips__) #define VMFS_TLB_ALIGNED_SPACE 3 /* find a TLB entry aligned range */ #endif +#define VMFS_OPTIMAL_SPACE 4 /* find a range with optimal alignment*/ /* * vm_map_wire and vm_map_unwire option flags Modified: stable/9/sys/vm/vm_mmap.c ============================================================================== --- stable/9/sys/vm/vm_mmap.c Tue Dec 3 14:50:12 2013 (r258869) +++ stable/9/sys/vm/vm_mmap.c Tue Dec 3 16:07:56 2013 (r258870) @@ -201,7 +201,7 @@ sys_mmap(td, uap) vm_prot_t cap_maxprot, prot, maxprot; void *handle; objtype_t handle_type; - int flags, error; + int align, error, flags; off_t pos; struct vmspace *vms = td->td_proc->p_vmspace; cap_rights_t rights; @@ -251,6 +251,13 @@ sys_mmap(td, uap) size += pageoff; /* low end... */ size = (vm_size_t) round_page(size); /* hi end */ + /* Ensure alignment is at least a page and fits in a pointer. */ + align = flags & MAP_ALIGNMENT_MASK; + if (align != 0 && align != MAP_ALIGNED_SUPER && + (align >> MAP_ALIGNMENT_SHIFT >= sizeof(void *) * NBBY || + align >> MAP_ALIGNMENT_SHIFT < PAGE_SHIFT)) + return (EINVAL); + /* * Check for illegal addresses. Watch out for address wrap... Note * that VM_*_ADDRESS are not constants due to casts (argh). @@ -1486,7 +1493,7 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, boolean_t fitit; vm_object_t object = NULL; struct thread *td = curthread; - int docow, error, rv; + int docow, error, findspace, rv; boolean_t writecounted; if (size == 0) @@ -1601,11 +1608,17 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, if (flags & MAP_STACK) rv = vm_map_stack(map, *addr, size, prot, maxprot, docow | MAP_STACK_GROWS_DOWN); - else if (fitit) - rv = vm_map_find(map, object, foff, addr, size, - object != NULL && object->type == OBJT_DEVICE ? - VMFS_ALIGNED_SPACE : VMFS_ANY_SPACE, prot, maxprot, docow); - else + else if (fitit) { + if ((flags & MAP_ALIGNMENT_MASK) == MAP_ALIGNED_SUPER) + findspace = VMFS_SUPER_SPACE; + else if ((flags & MAP_ALIGNMENT_MASK) != 0) + findspace = VMFS_ALIGNED_SPACE(flags >> + MAP_ALIGNMENT_SHIFT); + else + findspace = VMFS_OPTIMAL_SPACE; + rv = vm_map_find(map, object, foff, addr, size, findspace, + prot, maxprot, docow); + } else rv = vm_map_fixed(map, object, foff, *addr, size, prot, maxprot, docow); Modified: stable/9/usr.bin/kdump/mksubr ============================================================================== --- stable/9/usr.bin/kdump/mksubr Tue Dec 3 14:50:12 2013 (r258869) +++ stable/9/usr.bin/kdump/mksubr Tue Dec 3 16:07:56 2013 (r258870) @@ -370,7 +370,6 @@ auto_switch_type "lio_listioname" " auto_switch_type "madvisebehavname" "_?MADV_[A-Z]+[[:space:]]+[0-9]+" "sys/mman.h" auto_switch_type "minheritname" "INHERIT_[A-Z]+[[:space:]]+[0-9]+" "sys/mman.h" auto_or_type "mlockallname" "MCL_[A-Z]+[[:space:]]+0x[0-9]+" "sys/mman.h" -auto_or_type "mmapflagsname" "MAP_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/mman.h" auto_or_type "mmapprotname" "PROT_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/mman.h" auto_or_type "modename" "S_[A-Z]+[[:space:]]+[0-6]{7}" "sys/stat.h" auto_or_type "mountflagsname" "MNT_[A-Z]+[[:space:]]+0x[0-9]+" "sys/mount.h" @@ -448,6 +447,40 @@ cat <<_EOF_ /* * AUTO - Special * + * The MAP_ALIGNED flag requires special handling. + */ +void +mmapflagsname(int flags) +{ + int align; + int or = 0; + printf("%#x<", flags); +_EOF_ +egrep "^#[[:space:]]*define[[:space:]]+MAP_[A-Z_]+[[:space:]]+0x[0-9A-Fa-f]+[[:space:]]*" \ + $include_dir/sys/mman.h | grep -v MAP_ALIGNED | \ + awk '{ for (i = 1; i <= NF; i++) \ + if ($i ~ /define/) \ + break; \ + ++i; \ + printf "\tif (!((flags > 0) ^ ((%s) > 0)))\n\t\tif_print_or(flags, %s, or);\n", $i, $i }' +cat <<_EOF_ + align = flags & MAP_ALIGNMENT_MASK; + if (align != 0) { + if (align == MAP_ALIGNED_SUPER) + print_or("MAP_ALIGNED_SUPER", or); + else { + print_or("MAP_ALIGNED", or); + printf("(%d)", align >> MAP_ALIGNMENT_SHIFT); + } + } + printf(">"); + if (or == 0) + printf("%d", flags); +} + +/* + * AUTO - Special + * * The only reason this is not fully automated is due to the * grep -v RTP_PRIO statement. A better egrep line should * make this capable of being a auto_switch_type() function. Modified: stable/9/usr.bin/truss/syscalls.c ============================================================================== --- stable/9/usr.bin/truss/syscalls.c Tue Dec 3 14:50:12 2013 (r258869) +++ stable/9/usr.bin/truss/syscalls.c Tue Dec 3 16:07:56 2013 (r258870) @@ -296,7 +296,7 @@ static struct xlat mmap_flags[] = { X(MAP_SHARED) X(MAP_PRIVATE) X(MAP_FIXED) X(MAP_RENAME) X(MAP_NORESERVE) X(MAP_RESERVED0080) X(MAP_RESERVED0100) X(MAP_HASSEMAPHORE) X(MAP_STACK) X(MAP_NOSYNC) X(MAP_ANON) - X(MAP_NOCORE) XEND + X(MAP_NOCORE) X(MAP_PREFAULT_READ) XEND }; static struct xlat mprot_flags[] = { @@ -893,9 +893,41 @@ print_arg(struct syscall_args *sc, unsig case Mprot: tmp = strdup(xlookup_bits(mprot_flags, args[sc->offset])); break; - case Mmapflags: - tmp = strdup(xlookup_bits(mmap_flags, args[sc->offset])); + case Mmapflags: { + char *base, *alignstr; + int align, flags; + + /* + * MAP_ALIGNED can't be handled by xlookup_bits(), so + * generate that string manually and prepend it to the + * string from xlookup_bits(). Have to be careful to + * avoid outputting MAP_ALIGNED|0 if MAP_ALIGNED is + * the only flag. + */ + flags = args[sc->offset] & ~MAP_ALIGNMENT_MASK; + align = args[sc->offset] & MAP_ALIGNMENT_MASK; + if (align != 0) { + if (align == MAP_ALIGNED_SUPER) + alignstr = strdup("MAP_ALIGNED_SUPER"); + else + asprintf(&alignstr, "MAP_ALIGNED(%d)", + align >> MAP_ALIGNMENT_SHIFT); + if (flags == 0) { + tmp = alignstr; + break; + } + } else + alignstr = NULL; + base = strdup(xlookup_bits(mmap_flags, flags)); + if (alignstr == NULL) { + tmp = base; + break; + } + asprintf(&tmp, "%s|%s", alignstr, base); + free(alignstr); + free(base); break; + } case Whence: tmp = strdup(xlookup(whence_arg, args[sc->offset])); break; From owner-svn-src-stable@FreeBSD.ORG Tue Dec 3 18:18:36 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0C3F4666; Tue, 3 Dec 2013 18:18:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E99CC173A; Tue, 3 Dec 2013 18:18:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3IIZ1Z030710; Tue, 3 Dec 2013 18:18:35 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3IIZnT030709; Tue, 3 Dec 2013 18:18:35 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201312031818.rB3IIZnT030709@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 3 Dec 2013 18:18:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258875 - stable/10/lib/libc/posix1e X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 18:18:36 -0000 Author: trasz Date: Tue Dec 3 18:18:35 2013 New Revision: 258875 URL: http://svnweb.freebsd.org/changeset/base/258875 Log: MFC r258041: Mention acl_get_brand_np(3). Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Modified: stable/10/lib/libc/posix1e/acl.3 Directory Properties: stable/10/lib/libc/ (props changed) Modified: stable/10/lib/libc/posix1e/acl.3 ============================================================================== --- stable/10/lib/libc/posix1e/acl.3 Tue Dec 3 18:15:27 2013 (r258874) +++ stable/10/lib/libc/posix1e/acl.3 Tue Dec 3 18:18:35 2013 (r258875) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 25, 2009 +.Dd November 12, 2013 .Dt ACL 3 .Os .Sh NAME @@ -131,6 +131,10 @@ This function is described in .Xr acl_from_text 3 , and may be used to convert a text-form ACL into working ACL state, if the ACL has POSIX.1e or NFSv4 semantics. +.It Fn acl_get_brand_np +This function is described in +.Xr acl_get_brand_np 3 +and may be used to determine whether the ACL has POSIX.1e or NFSv4 semantics. .It Fn acl_get_entry This function is described in .Xr acl_get_entry 3 , @@ -248,6 +252,7 @@ library. .Xr acl_free 3 , .Xr acl_from_text 3 , .Xr acl_get 3 , +.Xr acl_get_brand_np 3 , .Xr acl_get_entry_type_np 3 , .Xr acl_get_flagset_np 3 , .Xr acl_get_permset 3 , From owner-svn-src-stable@FreeBSD.ORG Tue Dec 3 18:28:19 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B5FA9EE; Tue, 3 Dec 2013 18:28:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4224B17B4; Tue, 3 Dec 2013 18:28:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3ISJoX034135; Tue, 3 Dec 2013 18:28:19 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3ISJms034134; Tue, 3 Dec 2013 18:28:19 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201312031828.rB3ISJms034134@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 3 Dec 2013 18:28:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258877 - stable/10/lib/libc/posix1e X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 18:28:19 -0000 Author: trasz Date: Tue Dec 3 18:28:18 2013 New Revision: 258877 URL: http://svnweb.freebsd.org/changeset/base/258877 Log: MFC r258042: Fix description to actually make sense. Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Modified: stable/10/lib/libc/posix1e/acl_is_trivial_np.3 Directory Properties: stable/10/lib/libc/ (props changed) Modified: stable/10/lib/libc/posix1e/acl_is_trivial_np.3 ============================================================================== --- stable/10/lib/libc/posix1e/acl_is_trivial_np.3 Tue Dec 3 18:27:10 2013 (r258876) +++ stable/10/lib/libc/posix1e/acl_is_trivial_np.3 Tue Dec 3 18:28:18 2013 (r258877) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 13, 2010 +.Dd November 12, 2013 .Dt ACL_STRIP_NP 3 .Os .Sh NAME @@ -56,9 +56,8 @@ ACL is trivial if it can be fully expres any access rules. For POSIX.1e ACLs, ACL is trivial if it has the three required entries, one for owner, one for owning group, and one for other. -For NFSv4 ACLs, ACL is trivial if is identical to the ACL generated by -.Fn acl_strip_np 3 -from the file mode. +For NFSv4 ACLs, ACL is trivial if it is identical to the ACL generated by +.Fn acl_strip_np 3 . Files that have non-trivial ACL have a plus sign appended after mode bits in "ls -l" output. .Sh RETURN VALUES From owner-svn-src-stable@FreeBSD.ORG Tue Dec 3 18:35:18 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28A95DC0; Tue, 3 Dec 2013 18:35:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 15A16184B; Tue, 3 Dec 2013 18:35:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3IZHZ3037310; Tue, 3 Dec 2013 18:35:17 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3IZH1Z037309; Tue, 3 Dec 2013 18:35:17 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201312031835.rB3IZH1Z037309@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 3 Dec 2013 18:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258880 - stable/10/lib/libc/posix1e X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 18:35:18 -0000 Author: trasz Date: Tue Dec 3 18:35:17 2013 New Revision: 258880 URL: http://svnweb.freebsd.org/changeset/base/258880 Log: MFC r258043: Fix typo. Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Modified: stable/10/lib/libc/posix1e/acl.3 Directory Properties: stable/10/lib/libc/ (props changed) Modified: stable/10/lib/libc/posix1e/acl.3 ============================================================================== --- stable/10/lib/libc/posix1e/acl.3 Tue Dec 3 18:34:52 2013 (r258879) +++ stable/10/lib/libc/posix1e/acl.3 Tue Dec 3 18:35:17 2013 (r258880) @@ -206,7 +206,7 @@ This function is described in .Xr acl_set_tag_type 3 , and may be used to set the tag type of an ACL. .It Fn acl_strip_np -This function is describe din +This function is described in .Xr acl-strip_np 3 , and may be used to remove extended entries from an ACL. .It Xo From owner-svn-src-stable@FreeBSD.ORG Tue Dec 3 19:40:34 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 111E61B6; Tue, 3 Dec 2013 19:40:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F06451D32; Tue, 3 Dec 2013 19:40:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3JeXwW061410; Tue, 3 Dec 2013 19:40:33 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3JeXAL061406; Tue, 3 Dec 2013 19:40:33 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201312031940.rB3JeXAL061406@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 3 Dec 2013 19:40:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258885 - in stable/10/sys: compat/freebsd32 kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 19:40:34 -0000 Author: kib Date: Tue Dec 3 19:40:32 2013 New Revision: 258885 URL: http://svnweb.freebsd.org/changeset/base/258885 Log: MFC r258661: Add sysctl KERN_PROC_SIGTRAMP to retrieve signal trampoline location for the given process. Approved by: re (gjb) Modified: stable/10/sys/compat/freebsd32/freebsd32.h stable/10/sys/kern/kern_proc.c stable/10/sys/sys/sysctl.h stable/10/sys/sys/user.h Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/compat/freebsd32/freebsd32.h ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32.h Tue Dec 3 19:23:54 2013 (r258884) +++ stable/10/sys/compat/freebsd32/freebsd32.h Tue Dec 3 19:40:32 2013 (r258885) @@ -362,6 +362,12 @@ struct kinfo_proc32 { int ki_tdflags; }; +struct kinfo_sigtramp32 { + uint32_t ksigtramp_start; + uint32_t ksigtramp_end; + uint32_t ksigtramp_spare[4]; +}; + struct kld32_file_stat_1 { int version; /* set to sizeof(struct kld_file_stat_1) */ char name[MAXPATHLEN]; Modified: stable/10/sys/kern/kern_proc.c ============================================================================== --- stable/10/sys/kern/kern_proc.c Tue Dec 3 19:23:54 2013 (r258884) +++ stable/10/sys/kern/kern_proc.c Tue Dec 3 19:40:32 2013 (r258885) @@ -2632,6 +2632,60 @@ errout: return (error); } +static int +sysctl_kern_proc_sigtramp(SYSCTL_HANDLER_ARGS) +{ + int *name = (int *)arg1; + u_int namelen = arg2; + struct proc *p; + struct kinfo_sigtramp kst; + const struct sysentvec *sv; + int error; +#ifdef COMPAT_FREEBSD32 + struct kinfo_sigtramp32 kst32; +#endif + + if (namelen != 1) + return (EINVAL); + + error = pget((pid_t)name[0], PGET_CANDEBUG, &p); + if (error != 0) + return (error); + sv = p->p_sysent; +#ifdef COMPAT_FREEBSD32 + if ((req->flags & SCTL_MASK32) != 0) { + bzero(&kst32, sizeof(kst32)); + if (SV_PROC_FLAG(p, SV_ILP32)) { + if (sv->sv_sigcode_base != 0) { + kst32.ksigtramp_start = sv->sv_sigcode_base; + kst32.ksigtramp_end = sv->sv_sigcode_base + + *sv->sv_szsigcode; + } else { + kst32.ksigtramp_start = sv->sv_psstrings - + *sv->sv_szsigcode; + kst32.ksigtramp_end = sv->sv_psstrings; + } + } + PROC_UNLOCK(p); + error = SYSCTL_OUT(req, &kst32, sizeof(kst32)); + return (error); + } +#endif + bzero(&kst, sizeof(kst)); + if (sv->sv_sigcode_base != 0) { + kst.ksigtramp_start = (char *)sv->sv_sigcode_base; + kst.ksigtramp_end = (char *)sv->sv_sigcode_base + + *sv->sv_szsigcode; + } else { + kst.ksigtramp_start = (char *)sv->sv_psstrings - + *sv->sv_szsigcode; + kst.ksigtramp_end = (char *)sv->sv_psstrings; + } + PROC_UNLOCK(p); + error = SYSCTL_OUT(req, &kst, sizeof(kst)); + return (error); +} + SYSCTL_NODE(_kern, KERN_PROC, proc, CTLFLAG_RD, 0, "Process table"); SYSCTL_PROC(_kern_proc, KERN_PROC_ALL, all, CTLFLAG_RD|CTLTYPE_STRUCT| @@ -2740,3 +2794,7 @@ static SYSCTL_NODE(_kern_proc, KERN_PROC static SYSCTL_NODE(_kern_proc, KERN_PROC_OSREL, osrel, CTLFLAG_RW | CTLFLAG_ANYBODY | CTLFLAG_MPSAFE, sysctl_kern_proc_osrel, "Process binary osreldate"); + +static SYSCTL_NODE(_kern_proc, KERN_PROC_SIGTRAMP, sigtramp, CTLFLAG_RD | + CTLFLAG_MPSAFE, sysctl_kern_proc_sigtramp, + "Process signal trampoline location"); Modified: stable/10/sys/sys/sysctl.h ============================================================================== --- stable/10/sys/sys/sysctl.h Tue Dec 3 19:23:54 2013 (r258884) +++ stable/10/sys/sys/sysctl.h Tue Dec 3 19:40:32 2013 (r258885) @@ -530,6 +530,7 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a #define KERN_PROC_PS_STRINGS 38 /* get ps_strings location */ #define KERN_PROC_UMASK 39 /* process umask */ #define KERN_PROC_OSREL 40 /* osreldate for process binary */ +#define KERN_PROC_SIGTRAMP 41 /* signal trampoline location */ /* * KERN_IPC identifiers Modified: stable/10/sys/sys/user.h ============================================================================== --- stable/10/sys/sys/user.h Tue Dec 3 19:23:54 2013 (r258884) +++ stable/10/sys/sys/user.h Tue Dec 3 19:40:32 2013 (r258885) @@ -498,6 +498,12 @@ struct kinfo_kstack { int _kkst_ispare[16]; /* Space for more stuff. */ }; +struct kinfo_sigtramp { + void *ksigtramp_start; + void *ksigtramp_end; + void *ksigtramp_spare[4]; +}; + #ifdef _KERNEL /* Flags for kern_proc_out function. */ #define KERN_PROC_NOTHREADS 0x1 From owner-svn-src-stable@FreeBSD.ORG Tue Dec 3 19:41:49 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D62F2EB; Tue, 3 Dec 2013 19:41:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 48D331D60; Tue, 3 Dec 2013 19:41:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3JfnIa063243; Tue, 3 Dec 2013 19:41:49 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3JfmvR063238; Tue, 3 Dec 2013 19:41:48 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201312031941.rB3JfmvR063238@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 3 Dec 2013 19:41:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258886 - stable/10/sys/amd64/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 19:41:49 -0000 Author: kib Date: Tue Dec 3 19:41:48 2013 New Revision: 258886 URL: http://svnweb.freebsd.org/changeset/base/258886 Log: MFC r258660: Fix sys/sysctl.h use for cc -m32 on amd64. Approved by: re (gjb) Modified: stable/10/sys/amd64/include/pcb.h stable/10/sys/amd64/include/segments.h Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/amd64/include/pcb.h ============================================================================== --- stable/10/sys/amd64/include/pcb.h Tue Dec 3 19:40:32 2013 (r258885) +++ stable/10/sys/amd64/include/pcb.h Tue Dec 3 19:41:48 2013 (r258886) @@ -43,6 +43,7 @@ #include #include +#ifdef __amd64__ struct pcb { register_t pcb_r15; register_t pcb_r14; @@ -105,6 +106,7 @@ struct pcb { uint64_t pcb_pad[3]; }; +#endif #ifdef _KERNEL struct trapframe; Modified: stable/10/sys/amd64/include/segments.h ============================================================================== --- stable/10/sys/amd64/include/segments.h Tue Dec 3 19:40:32 2013 (r258885) +++ stable/10/sys/amd64/include/segments.h Tue Dec 3 19:41:48 2013 (r258886) @@ -82,8 +82,8 @@ struct soft_segment_descriptor { * region descriptors, used to load gdt/idt tables before segments yet exist. */ struct region_descriptor { - unsigned long rd_limit:16; /* segment extent */ - unsigned long rd_base:64 __packed; /* base address */ + uint64_t rd_limit:16; /* segment extent */ + uint64_t rd_base:64 __packed; /* base address */ } __packed; #ifdef _KERNEL From owner-svn-src-stable@FreeBSD.ORG Tue Dec 3 19:42:47 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EDA6424; Tue, 3 Dec 2013 19:42:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 60D151D6D; Tue, 3 Dec 2013 19:42:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3JglFJ063391; Tue, 3 Dec 2013 19:42:47 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3JglBf063390; Tue, 3 Dec 2013 19:42:47 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201312031942.rB3JglBf063390@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 3 Dec 2013 19:42:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258887 - stable/10/contrib/gdb/gdb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 19:42:47 -0000 Author: kib Date: Tue Dec 3 19:42:46 2013 New Revision: 258887 URL: http://svnweb.freebsd.org/changeset/base/258887 Log: MFC r258663: Use sysctl KERN_PROC_SIGTRAMP to retrieve the signal trampoline location for the native amd64 ABI. This fixes unwinding over the signal frame after trampoline was moved to the shared page. Approved by: re (gjb) Modified: stable/10/contrib/gdb/gdb/amd64fbsd-nat.c Directory Properties: stable/10/contrib/gdb/ (props changed) Modified: stable/10/contrib/gdb/gdb/amd64fbsd-nat.c ============================================================================== --- stable/10/contrib/gdb/gdb/amd64fbsd-nat.c Tue Dec 3 19:41:48 2013 (r258886) +++ stable/10/contrib/gdb/gdb/amd64fbsd-nat.c Tue Dec 3 19:42:46 2013 (r258887) @@ -29,6 +29,7 @@ #include #include #include +#include #include #ifdef HAVE_SYS_PROCFS_H @@ -212,24 +213,23 @@ Please report this to . SC_RBP_OFFSET = offset; - /* FreeBSD provides a kern.ps_strings sysctl that we can use to + /* FreeBSD provides a kern.proc.sigtramp sysctl that we can use to locate the sigtramp. That way we can still recognize a sigtramp - if its location is changed in a new kernel. Of course this is - still based on the assumption that the sigtramp is placed - directly under the location where the program arguments and - environment can be found. */ + if its location is changed in a new kernel. */ { - int mib[2]; - long ps_strings; + int mib[4]; + struct kinfo_sigtramp kst; size_t len; mib[0] = CTL_KERN; - mib[1] = KERN_PS_STRINGS; - len = sizeof (ps_strings); - if (sysctl (mib, 2, &ps_strings, &len, NULL, 0) == 0) + mib[1] = KERN_PROC; + mib[2] = KERN_PROC_SIGTRAMP; + mib[3] = getpid(); + len = sizeof (kst); + if (sysctl (mib, sizeof(mib) / sizeof(mib[0]), &kst, &len, NULL, 0) == 0) { - amd64fbsd_sigtramp_start_addr = ps_strings - 32; - amd64fbsd_sigtramp_end_addr = ps_strings; + amd64fbsd_sigtramp_start_addr = kst.ksigtramp_start; + amd64fbsd_sigtramp_end_addr = kst.ksigtramp_end; } } } From owner-svn-src-stable@FreeBSD.ORG Tue Dec 3 19:55:50 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C93D7B8; Tue, 3 Dec 2013 19:55:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3741A1E28; Tue, 3 Dec 2013 19:55:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3JtoHj067148; Tue, 3 Dec 2013 19:55:50 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3Jtn8H067141; Tue, 3 Dec 2013 19:55:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201312031955.rB3Jtn8H067141@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 3 Dec 2013 19:55:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258888 - in stable/9/sys: compat/freebsd32 kern sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 19:55:50 -0000 Author: kib Date: Tue Dec 3 19:55:49 2013 New Revision: 258888 URL: http://svnweb.freebsd.org/changeset/base/258888 Log: MFC r258661: Add sysctl KERN_PROC_SIGTRAMP to retrieve signal trampoline location for the given process. Modified: stable/9/sys/compat/freebsd32/freebsd32.h stable/9/sys/kern/kern_proc.c stable/9/sys/sys/sysctl.h stable/9/sys/sys/user.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/compat/freebsd32/freebsd32.h ============================================================================== --- stable/9/sys/compat/freebsd32/freebsd32.h Tue Dec 3 19:42:46 2013 (r258887) +++ stable/9/sys/compat/freebsd32/freebsd32.h Tue Dec 3 19:55:49 2013 (r258888) @@ -351,6 +351,12 @@ struct kinfo_proc32 { int ki_tdflags; }; +struct kinfo_sigtramp32 { + uint32_t ksigtramp_start; + uint32_t ksigtramp_end; + uint32_t ksigtramp_spare[4]; +}; + struct kld32_file_stat_1 { int version; /* set to sizeof(struct kld_file_stat_1) */ char name[MAXPATHLEN]; Modified: stable/9/sys/kern/kern_proc.c ============================================================================== --- stable/9/sys/kern/kern_proc.c Tue Dec 3 19:42:46 2013 (r258887) +++ stable/9/sys/kern/kern_proc.c Tue Dec 3 19:55:49 2013 (r258888) @@ -2636,6 +2636,60 @@ errout: return (error); } +static int +sysctl_kern_proc_sigtramp(SYSCTL_HANDLER_ARGS) +{ + int *name = (int *)arg1; + u_int namelen = arg2; + struct proc *p; + struct kinfo_sigtramp kst; + const struct sysentvec *sv; + int error; +#ifdef COMPAT_FREEBSD32 + struct kinfo_sigtramp32 kst32; +#endif + + if (namelen != 1) + return (EINVAL); + + error = pget((pid_t)name[0], PGET_CANDEBUG, &p); + if (error != 0) + return (error); + sv = p->p_sysent; +#ifdef COMPAT_FREEBSD32 + if ((req->flags & SCTL_MASK32) != 0) { + bzero(&kst32, sizeof(kst32)); + if (SV_PROC_FLAG(p, SV_ILP32)) { + if (sv->sv_sigcode_base != 0) { + kst32.ksigtramp_start = sv->sv_sigcode_base; + kst32.ksigtramp_end = sv->sv_sigcode_base + + *sv->sv_szsigcode; + } else { + kst32.ksigtramp_start = sv->sv_psstrings - + *sv->sv_szsigcode; + kst32.ksigtramp_end = sv->sv_psstrings; + } + } + PROC_UNLOCK(p); + error = SYSCTL_OUT(req, &kst32, sizeof(kst32)); + return (error); + } +#endif + bzero(&kst, sizeof(kst)); + if (sv->sv_sigcode_base != 0) { + kst.ksigtramp_start = (char *)sv->sv_sigcode_base; + kst.ksigtramp_end = (char *)sv->sv_sigcode_base + + *sv->sv_szsigcode; + } else { + kst.ksigtramp_start = (char *)sv->sv_psstrings - + *sv->sv_szsigcode; + kst.ksigtramp_end = (char *)sv->sv_psstrings; + } + PROC_UNLOCK(p); + error = SYSCTL_OUT(req, &kst, sizeof(kst)); + return (error); +} + SYSCTL_NODE(_kern, KERN_PROC, proc, CTLFLAG_RD, 0, "Process table"); SYSCTL_PROC(_kern_proc, KERN_PROC_ALL, all, CTLFLAG_RD|CTLTYPE_STRUCT| @@ -2744,3 +2798,7 @@ static SYSCTL_NODE(_kern_proc, KERN_PROC static SYSCTL_NODE(_kern_proc, KERN_PROC_OSREL, osrel, CTLFLAG_RW | CTLFLAG_ANYBODY | CTLFLAG_MPSAFE, sysctl_kern_proc_osrel, "Process binary osreldate"); + +static SYSCTL_NODE(_kern_proc, KERN_PROC_SIGTRAMP, sigtramp, CTLFLAG_RD | + CTLFLAG_MPSAFE, sysctl_kern_proc_sigtramp, + "Process signal trampoline location"); Modified: stable/9/sys/sys/sysctl.h ============================================================================== --- stable/9/sys/sys/sysctl.h Tue Dec 3 19:42:46 2013 (r258887) +++ stable/9/sys/sys/sysctl.h Tue Dec 3 19:55:49 2013 (r258888) @@ -566,6 +566,7 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a #define KERN_PROC_PS_STRINGS 38 /* get ps_strings location */ #define KERN_PROC_UMASK 39 /* process umask */ #define KERN_PROC_OSREL 40 /* osreldate for process binary */ +#define KERN_PROC_SIGTRAMP 41 /* signal trampoline location */ /* * KERN_IPC identifiers Modified: stable/9/sys/sys/user.h ============================================================================== --- stable/9/sys/sys/user.h Tue Dec 3 19:42:46 2013 (r258887) +++ stable/9/sys/sys/user.h Tue Dec 3 19:55:49 2013 (r258888) @@ -496,6 +496,12 @@ struct kinfo_kstack { int _kkst_ispare[16]; /* Space for more stuff. */ }; +struct kinfo_sigtramp { + void *ksigtramp_start; + void *ksigtramp_end; + void *ksigtramp_spare[4]; +}; + #ifdef _KERNEL /* Flags for kern_proc_out function. */ #define KERN_PROC_NOTHREADS 0x1 From owner-svn-src-stable@FreeBSD.ORG Tue Dec 3 20:06:59 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 924ACACF; Tue, 3 Dec 2013 20:06:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 645781EC7; Tue, 3 Dec 2013 20:06:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3K6x6q071062; Tue, 3 Dec 2013 20:06:59 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3K6xE9071061; Tue, 3 Dec 2013 20:06:59 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201312032006.rB3K6xE9071061@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 3 Dec 2013 20:06:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258889 - stable/9/contrib/gdb/gdb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 20:06:59 -0000 Author: kib Date: Tue Dec 3 20:06:58 2013 New Revision: 258889 URL: http://svnweb.freebsd.org/changeset/base/258889 Log: MFC r258663: Use sysctl KERN_PROC_SIGTRAMP to retrieve the signal trampoline location for the native amd64 ABI. This fixes unwinding over the signal frame after trampoline was moved to the shared page. Modified: stable/9/contrib/gdb/gdb/amd64fbsd-nat.c Directory Properties: stable/9/contrib/gdb/ (props changed) Modified: stable/9/contrib/gdb/gdb/amd64fbsd-nat.c ============================================================================== --- stable/9/contrib/gdb/gdb/amd64fbsd-nat.c Tue Dec 3 19:55:49 2013 (r258888) +++ stable/9/contrib/gdb/gdb/amd64fbsd-nat.c Tue Dec 3 20:06:58 2013 (r258889) @@ -29,6 +29,7 @@ #include #include #include +#include #include #ifdef HAVE_SYS_PROCFS_H @@ -212,24 +213,23 @@ Please report this to . SC_RBP_OFFSET = offset; - /* FreeBSD provides a kern.ps_strings sysctl that we can use to + /* FreeBSD provides a kern.proc.sigtramp sysctl that we can use to locate the sigtramp. That way we can still recognize a sigtramp - if its location is changed in a new kernel. Of course this is - still based on the assumption that the sigtramp is placed - directly under the location where the program arguments and - environment can be found. */ + if its location is changed in a new kernel. */ { - int mib[2]; - long ps_strings; + int mib[4]; + struct kinfo_sigtramp kst; size_t len; mib[0] = CTL_KERN; - mib[1] = KERN_PS_STRINGS; - len = sizeof (ps_strings); - if (sysctl (mib, 2, &ps_strings, &len, NULL, 0) == 0) + mib[1] = KERN_PROC; + mib[2] = KERN_PROC_SIGTRAMP; + mib[3] = getpid(); + len = sizeof (kst); + if (sysctl (mib, sizeof(mib) / sizeof(mib[0]), &kst, &len, NULL, 0) == 0) { - amd64fbsd_sigtramp_start_addr = ps_strings - 32; - amd64fbsd_sigtramp_end_addr = ps_strings; + amd64fbsd_sigtramp_start_addr = kst.ksigtramp_start; + amd64fbsd_sigtramp_end_addr = kst.ksigtramp_end; } } } From owner-svn-src-stable@FreeBSD.ORG Tue Dec 3 20:55:38 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 770C87E3; Tue, 3 Dec 2013 20:55:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 47ADE11A3; Tue, 3 Dec 2013 20:55:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3Ktc0V087676; Tue, 3 Dec 2013 20:55:38 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3KtbKT087672; Tue, 3 Dec 2013 20:55:37 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201312032055.rB3KtbKT087672@svn.freebsd.org> From: Michael Tuexen Date: Tue, 3 Dec 2013 20:55:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258890 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 20:55:38 -0000 Author: tuexen Date: Tue Dec 3 20:55:37 2013 New Revision: 258890 URL: http://svnweb.freebsd.org/changeset/base/258890 Log: MFC r258574: Only initialize some mutexes for the default VNET. In r208160, sctp_it_ctl was made a global variable, across all VNETs. However, sctp_init() is called for every VNET that is created. This results in the same global mutexes which are part of sctp_it_ctl being initialized. This can result in crashes if many jails are created. To reproduce the problem: (1) Take a GENERIC kernel config, and add options for: VIMAGE, WITNESS, INVARIANTS. (2) Run this command in a loop: jail -l -u root -c path=/ name=foo persist vnet && jexec foo ifconfig lo0 127.0.0.1/8 && jail -r foo (see http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021280.html ) Witness will warn about the same mutex being initialized. Fix the problem by only initializing these mutexes in the default VNET. MFC r258765: In http://svnweb.freebsd.org/changeset/base/258221 I introduced a bug which initialized global locks whenever the SCTP stack initialized. This was fixed in http://svnweb.freebsd.org/changeset/base/258574 by rodrigc@. He just initialized the locks for the default vnet. This fix reverts to the old behaviour before r258221, which explicitly makes sure it is only called once, because this works also on other platforms. Approved by: re@ (gjb) Modified: stable/10/sys/netinet/sctp_bsd_addr.c stable/10/sys/netinet/sctp_pcb.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/netinet/sctp_bsd_addr.c ============================================================================== --- stable/10/sys/netinet/sctp_bsd_addr.c Tue Dec 3 20:06:58 2013 (r258889) +++ stable/10/sys/netinet/sctp_bsd_addr.c Tue Dec 3 20:55:37 2013 (r258890) @@ -100,6 +100,9 @@ sctp_startup_iterator(void) /* You only get one */ return; } + /* Initialize global locks here, thus only once. */ + SCTP_ITERATOR_LOCK_INIT(); + SCTP_IPI_ITERATOR_WQ_INIT(); TAILQ_INIT(&sctp_it_ctl.iteratorhead); kproc_create(sctp_iterator_thread, (void *)NULL, Modified: stable/10/sys/netinet/sctp_pcb.c ============================================================================== --- stable/10/sys/netinet/sctp_pcb.c Tue Dec 3 20:06:58 2013 (r258889) +++ stable/10/sys/netinet/sctp_pcb.c Tue Dec 3 20:55:37 2013 (r258890) @@ -5864,8 +5864,6 @@ sctp_pcb_init() for (i = 0; i < SCTP_STACK_VTAG_HASH_SIZE; i++) { LIST_INIT(&SCTP_BASE_INFO(vtag_timewait)[i]); } - SCTP_ITERATOR_LOCK_INIT(); - SCTP_IPI_ITERATOR_WQ_INIT(); sctp_startup_iterator(); #if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP) From owner-svn-src-stable@FreeBSD.ORG Tue Dec 3 22:31:10 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D70AE5A0; Tue, 3 Dec 2013 22:31:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B75C5181B; Tue, 3 Dec 2013 22:31:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB3MVA9j022334; Tue, 3 Dec 2013 22:31:10 GMT (envelope-from davidcs@svn.freebsd.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB3MV8LC022321; Tue, 3 Dec 2013 22:31:08 GMT (envelope-from davidcs@svn.freebsd.org) Message-Id: <201312032231.rB3MV8LC022321@svn.freebsd.org> From: David C Somayajulu Date: Tue, 3 Dec 2013 22:31:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258898 - in stable/9: share/man/man4 sys/conf sys/dev/qlxgbe sys/modules sys/modules/qlxgbe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 22:31:10 -0000 Author: davidcs Date: Tue Dec 3 22:31:08 2013 New Revision: 258898 URL: http://svnweb.freebsd.org/changeset/base/258898 Log: MFC 250661,251076,251605,252580,254976,255003,258155 port dev/qlxgbe from HEAD Added: stable/9/share/man/man4/qlxgbe.4 - copied unchanged from r250661, head/share/man/man4/qlxgbe.4 stable/9/sys/dev/qlxgbe/ - copied from r250661, head/sys/dev/qlxgbe/ stable/9/sys/modules/qlxgbe/ - copied from r250661, head/sys/modules/qlxgbe/ Modified: stable/9/share/man/man4/Makefile stable/9/sys/conf/files.amd64 stable/9/sys/dev/qlxgbe/ql_hw.c stable/9/sys/dev/qlxgbe/ql_hw.h stable/9/sys/dev/qlxgbe/ql_ioctl.c stable/9/sys/dev/qlxgbe/ql_isr.c stable/9/sys/dev/qlxgbe/ql_misc.c stable/9/sys/dev/qlxgbe/ql_os.c stable/9/sys/modules/Makefile Directory Properties: stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Tue Dec 3 22:26:38 2013 (r258897) +++ stable/9/share/man/man4/Makefile Tue Dec 3 22:31:08 2013 (r258898) @@ -362,6 +362,7 @@ MAN= aac.4 \ pty.4 \ puc.4 \ ${_qlxgb.4} \ + ${_qlxgbe.4} \ ral.4 \ random.4 \ rc.4 \ @@ -771,9 +772,11 @@ MLINKS+=lindev.4 full.4 .if ${MACHINE_CPUARCH} == "amd64" _qlxgb.4= qlxgb.4 +_qlxgbe.4= qlxgbe.4 _sfxge.4= sfxge.4 MLINKS+=qlxgb.4 if_qlxgb.4 +MLINKS+=qlxgbe.4 if_qlxgbe.4 MLINKS+=sfxge.4 if_sfxge.4 .endif Copied: stable/9/share/man/man4/qlxgbe.4 (from r250661, head/share/man/man4/qlxgbe.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/share/man/man4/qlxgbe.4 Tue Dec 3 22:31:08 2013 (r258898, copy of r250661, head/share/man/man4/qlxgbe.4) @@ -0,0 +1,91 @@ +.\"- +.\" Copyright (c) 2013 Qlogic Corportaion +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd April 1, 2013 +.Dt QLXGBE 4 +.Os +.Sh NAME +.Nm qlxgbe +.Nd "QLogic 10 Gigabit Ethernet & CNA 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 qlxgbe" +.Ed +.Pp +To load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_qlxgbe_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver supports IPv4 checksum offload, +TCP and UDP checksum offload for both IPv4 and IPv6, +Large Segment Offload for both IPv4 and IPv6, +Jumbo frames, VLAN Tag, and +Receive Side scaling. +For further hardware information, see +.Pa http://www.qlogic.com/ . +.Sh HARDWARE +The +.Nm +driver supports 10 Gigabit Ethernet & CNA Adapter based on the following +chipsets: +.Pp +.Bl -bullet -compact +.It +QLogic 8300 series +.El +.Sh SUPPORT +For support questions please contact your QLogic approved reseller or +QLogic Technical Support at +.Pa http://support.qlogic.com , +or by E-mail at +.Aq support@qlogic.com . +.Sh SEE ALSO +.Xr altq 4 , +.Xr arp 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 10.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An David C Somayajulu +at QLogic Corporation. Modified: stable/9/sys/conf/files.amd64 ============================================================================== --- stable/9/sys/conf/files.amd64 Tue Dec 3 22:26:38 2013 (r258897) +++ stable/9/sys/conf/files.amd64 Tue Dec 3 22:31:08 2013 (r258898) @@ -243,6 +243,13 @@ dev/qlxgb/qla_ioctl.c optional qlxgb pc dev/qlxgb/qla_isr.c optional qlxgb pci dev/qlxgb/qla_misc.c optional qlxgb pci dev/qlxgb/qla_os.c optional qlxgb pci +dev/qlxgbe/ql_dbg.c optional qlxgbe pci +dev/qlxgbe/ql_hw.c optional qlxgbe pci +dev/qlxgbe/ql_ioctl.c optional qlxgbe pci +dev/qlxgbe/ql_isr.c optional qlxgbe pci +dev/qlxgbe/ql_misc.c optional qlxgbe pci +dev/qlxgbe/ql_os.c optional qlxgbe pci +dev/qlxgbe/ql_reset.c optional qlxgbe pci dev/sfxge/common/efx_bootcfg.c optional sfxge inet pci dev/sfxge/common/efx_ev.c optional sfxge inet pci dev/sfxge/common/efx_filter.c optional sfxge inet pci Modified: stable/9/sys/dev/qlxgbe/ql_hw.c ============================================================================== --- head/sys/dev/qlxgbe/ql_hw.c Wed May 15 17:03:09 2013 (r250661) +++ stable/9/sys/dev/qlxgbe/ql_hw.c Tue Dec 3 22:31:08 2013 (r258898) @@ -212,6 +212,12 @@ ql_hw_add_sysctls(qla_host_t *ha) "Number of Rcv Rings Entries to post before updating" " RDS Ring Producer Index"); + ha->hw.min_lro_pkt_size = 512; + SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "min_lro_pkt_size", CTLFLAG_RD, &ha->hw.min_lro_pkt_size, + ha->hw.min_lro_pkt_size, "minimum packet size to trigger lro"); + ha->hw.mdump_active = 0; SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), @@ -1069,6 +1075,11 @@ qla_config_fw_lro(qla_host_t *ha, uint16 fw_lro->cntxt_id = cntxt_id; + if (ha->hw.min_lro_pkt_size) { + fw_lro->flags |= Q8_MBX_FW_LRO_LOW_THRESHOLD; + fw_lro->low_threshold = ha->hw.min_lro_pkt_size; + } + if (qla_mbx_cmd(ha, (uint32_t *)fw_lro, (sizeof (q80_config_fw_lro_t) >> 2), ha->hw.mbox, (sizeof (q80_config_fw_lro_rsp_t) >> 2), 0)) { Modified: stable/9/sys/dev/qlxgbe/ql_hw.h ============================================================================== --- head/sys/dev/qlxgbe/ql_hw.h Wed May 15 17:03:09 2013 (r250661) +++ stable/9/sys/dev/qlxgbe/ql_hw.h Tue Dec 3 22:31:08 2013 (r258898) @@ -568,9 +568,13 @@ typedef struct _q80_config_fw_lro { #define Q8_MBX_FW_LRO_IPV6 0x2 #define Q8_MBX_FW_LRO_IPV4_WO_DST_IP_CHK 0x4 #define Q8_MBX_FW_LRO_IPV6_WO_DST_IP_CHK 0x8 +#define Q8_MBX_FW_LRO_LOW_THRESHOLD 0x10 uint8_t rsrvd; uint16_t cntxt_id; + + uint16_t low_threshold; + uint16_t rsrvd0; } __packed q80_config_fw_lro_t; typedef struct _q80_config_fw_lro_rsp { @@ -1521,6 +1525,7 @@ typedef struct _qla_hw { uint32_t health_count; uint32_t max_tx_segs; + uint32_t min_lro_pkt_size; /* Flash Descriptor Table */ qla_flash_desc_table_t fdt; @@ -1533,16 +1538,16 @@ typedef struct _qla_hw { } qla_hw_t; #define QL_UPDATE_RDS_PRODUCER_INDEX(ha, prod_reg, val) \ - WRITE_REG32(ha, prod_reg, val); + bus_write_4((ha->pci_reg), prod_reg, val); #define QL_UPDATE_TX_PRODUCER_INDEX(ha, val, i) \ - WRITE_REG32(ha, ha->hw.tx_cntxt[i].tx_prod_reg, val) + WRITE_REG32(ha, ha->hw.tx_cntxt[i].tx_prod_reg, val) #define QL_UPDATE_SDS_CONSUMER_INDEX(ha, i, val) \ - WRITE_REG32(ha, ha->hw.sds[i].sds_consumer, val) - -#define QL_ENABLE_INTERRUPTS(ha, i) WRITE_REG32(ha, ha->hw.intr_src[i], 0); + bus_write_4((ha->pci_reg), (ha->hw.sds[i].sds_consumer), val); +#define QL_ENABLE_INTERRUPTS(ha, i) \ + bus_write_4((ha->pci_reg), (ha->hw.intr_src[i]), 0); #define QL_BUFFER_ALIGN 16 Modified: stable/9/sys/dev/qlxgbe/ql_ioctl.c ============================================================================== --- head/sys/dev/qlxgbe/ql_ioctl.c Wed May 15 17:03:09 2013 (r250661) +++ stable/9/sys/dev/qlxgbe/ql_ioctl.c Tue Dec 3 22:31:08 2013 (r258898) @@ -223,6 +223,13 @@ ql_eioctl(struct cdev *dev, u_long cmd, } fw_dump = (qla_rd_fw_dump_t *)data; + + if ((fw_dump->md_template == NULL) || + (fw_dump->template_size != ha->hw.dma_buf.minidump.size)) { + rval = EINVAL; + break; + } + if ((rval = copyout(ha->hw.dma_buf.minidump.dma_b, fw_dump->md_template, fw_dump->template_size))) rval = ENXIO; Modified: stable/9/sys/dev/qlxgbe/ql_isr.c ============================================================================== --- head/sys/dev/qlxgbe/ql_isr.c Wed May 15 17:03:09 2013 (r250661) +++ stable/9/sys/dev/qlxgbe/ql_isr.c Tue Dec 3 22:31:08 2013 (r258898) @@ -858,7 +858,6 @@ ql_isr(void *arg) int idx; qla_hw_t *hw; struct ifnet *ifp; - uint32_t data = 0; uint32_t ret = 0; ha = ivec->ha; @@ -871,12 +870,7 @@ ql_isr(void *arg) if (idx == 0) taskqueue_enqueue(ha->tx_tq, &ha->tx_task); - - - data = READ_REG32(ha, ha->hw.intr_src[idx]); - - if (data & 0x1 ) - ret = qla_rcv_isr(ha, idx, -1); + ret = qla_rcv_isr(ha, idx, -1); if (idx == 0) taskqueue_enqueue(ha->tx_tq, &ha->tx_task); Modified: stable/9/sys/dev/qlxgbe/ql_misc.c ============================================================================== --- head/sys/dev/qlxgbe/ql_misc.c Wed May 15 17:03:09 2013 (r250661) +++ stable/9/sys/dev/qlxgbe/ql_misc.c Tue Dec 3 22:31:08 2013 (r258898) @@ -321,7 +321,7 @@ qla_get_fdt(qla_host_t *ha) } while ((count < 10000) && (data32 != 0x6)); - if (count == 0 && data32 != 0x6) { + if (data32 != 0x6) { qla_sem_unlock(ha, Q8_FLASH_UNLOCK); device_printf(ha->pci_dev, "%s: Poll Q8_FLASH_STATUS failed\n", @@ -401,7 +401,7 @@ qla_flash_write_enable(qla_host_t *ha, i } while ((count < 10000) && (data32 != 0x6)); - if (count == 0 && data32 != 0x6) { + if (data32 != 0x6) { device_printf(ha->pci_dev, "%s: Poll Q8_FLASH_STATUS failed\n", __func__); @@ -432,7 +432,7 @@ qla_erase_flash_sector(qla_host_t *ha, u } while (((count++) < 1000) && (data32 != 0x6)); - if (count == 0 && data32 != 0x6) { + if (data32 != 0x6) { device_printf(ha->pci_dev, "%s: Poll Q8_FLASH_STATUS failed\n", __func__); @@ -479,7 +479,7 @@ qla_erase_flash_sector(qla_host_t *ha, u } while (((count++) < 1000) && (data32 != 0x6)); - if (count == 0 && data32 != 0x6) { + if (data32 != 0x6) { device_printf(ha->pci_dev, "%s: Poll Q8_FLASH_STATUS failed\n", __func__); @@ -575,7 +575,7 @@ qla_wr_flash32(qla_host_t *ha, uint32_t } while ((count < 10000) && (data32 != 0x6)); - if (count == 0 && data32 != 0x6) { + if (data32 != 0x6) { device_printf(ha->pci_dev, "%s: Poll Q8_FLASH_STATUS failed\n", __func__); Modified: stable/9/sys/dev/qlxgbe/ql_os.c ============================================================================== --- head/sys/dev/qlxgbe/ql_os.c Wed May 15 17:03:09 2013 (r250661) +++ stable/9/sys/dev/qlxgbe/ql_os.c Tue Dec 3 22:31:08 2013 (r258898) @@ -1642,18 +1642,20 @@ qla_error_recovery(void *context, int pe QLA_UNLOCK(ha, __func__); - ql_minidump(ha); - if ((ha->pci_func & 0x1) == 0) { - if (!ha->msg_from_peer) + if (!ha->msg_from_peer) { qla_send_msg_to_peer(ha, QL_PEER_MSG_RESET); - while ((ha->msg_from_peer != QL_PEER_MSG_ACK) && msecs_100--) - qla_mdelay(__func__, 100); + while ((ha->msg_from_peer != QL_PEER_MSG_ACK) && + msecs_100--) + qla_mdelay(__func__, 100); + } ha->msg_from_peer = 0; + ql_minidump(ha); + (void) ql_init_hw(ha); qla_free_xmt_bufs(ha); qla_free_rcv_bufs(ha); Modified: stable/9/sys/modules/Makefile ============================================================================== --- stable/9/sys/modules/Makefile Tue Dec 3 22:26:38 2013 (r258897) +++ stable/9/sys/modules/Makefile Tue Dec 3 22:31:08 2013 (r258898) @@ -271,6 +271,7 @@ SUBDIR= \ pty \ puc \ ${_qlxgb} \ + ${_qlxgbe} \ ral \ ${_ralfw} \ ${_random} \ @@ -713,7 +714,8 @@ _padlock= padlock .endif _pccard= pccard _qlxgb= qlxgb -_rdma= rdma +_qlxgbe= qlxgbe +_rdma= rdma _s3= s3 _safe= safe _scsi_low= scsi_low From owner-svn-src-stable@FreeBSD.ORG Wed Dec 4 07:45:09 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E8C471A; Wed, 4 Dec 2013 07:45:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0AA2E19BE; Wed, 4 Dec 2013 07:45:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB47j8EK012231; Wed, 4 Dec 2013 07:45:08 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB47j8Ji012230; Wed, 4 Dec 2013 07:45:08 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201312040745.rB47j8Ji012230@svn.freebsd.org> From: Craig Rodrigues Date: Wed, 4 Dec 2013 07:45:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258910 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 07:45:09 -0000 Author: rodrigc Date: Wed Dec 4 07:45:08 2013 New Revision: 258910 URL: http://svnweb.freebsd.org/changeset/base/258910 Log: MFC r258738 Also mention that drill(1) can be used, now that nslookup and dig are no longer in the base system. Suggested by: peter Approved by: re (gjb) Modified: stable/10/UPDATING (contents, props changed) Directory Properties: stable/10/ (props changed) Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Wed Dec 4 07:38:23 2013 (r258909) +++ stable/10/UPDATING Wed Dec 4 07:45:08 2013 (r258910) @@ -58,7 +58,7 @@ older version of current is a bit fragil available in the ports tree. The dns/bind99 port is one example. With this change, nslookup(1) and dig(1) are no longer in the base - system. Users should instead use host(1) which is still + system. Users should instead use host(1) and drill(1) which are in the base system. Alternatively, nslookup and dig can be obtained by installing the dns/bind-tools port. From owner-svn-src-stable@FreeBSD.ORG Wed Dec 4 07:46:53 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5D2B869; Wed, 4 Dec 2013 07:46:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B1A4719D4; Wed, 4 Dec 2013 07:46:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB47krQK012455; Wed, 4 Dec 2013 07:46:53 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB47kr1h012453; Wed, 4 Dec 2013 07:46:53 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201312040746.rB47kr1h012453@svn.freebsd.org> From: Craig Rodrigues Date: Wed, 4 Dec 2013 07:46:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258911 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 07:46:53 -0000 Author: rodrigc Date: Wed Dec 4 07:46:53 2013 New Revision: 258911 URL: http://svnweb.freebsd.org/changeset/base/258911 Log: MFC r258737 In keg_dtor(), print out the keg name in the "Freed UMA keg was not empty" message printed to the console. This makes it easier to track down the source of certain memory leaks. Suggested by: adrian Approved by: re (gjb) Modified: stable/10/sys/vm/uma_core.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/vm/uma_core.c ============================================================================== --- stable/10/sys/vm/uma_core.c Wed Dec 4 07:45:08 2013 (r258910) +++ stable/10/sys/vm/uma_core.c Wed Dec 4 07:46:53 2013 (r258911) @@ -1571,8 +1571,9 @@ keg_dtor(void *arg, int size, void *udat keg = (uma_keg_t)arg; KEG_LOCK(keg); if (keg->uk_free != 0) { - printf("Freed UMA keg was not empty (%d items). " + printf("Freed UMA keg (%s) was not empty (%d items). " " Lost %d pages of memory.\n", + keg->uk_name ? keg->uk_name : "", keg->uk_free, keg->uk_pages); } KEG_UNLOCK(keg); From owner-svn-src-stable@FreeBSD.ORG Wed Dec 4 07:50:18 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BAFF99F1; Wed, 4 Dec 2013 07:50:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8E8E319F1; Wed, 4 Dec 2013 07:50:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB47oIFI013444; Wed, 4 Dec 2013 07:50:18 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB47oICn013416; Wed, 4 Dec 2013 07:50:18 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201312040750.rB47oICn013416@svn.freebsd.org> From: Craig Rodrigues Date: Wed, 4 Dec 2013 07:50:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258912 - stable/10/sys/netpfil/ipfw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 07:50:18 -0000 Author: rodrigc Date: Wed Dec 4 07:50:18 2013 New Revision: 258912 URL: http://svnweb.freebsd.org/changeset/base/258912 Log: MFC r258588 In sys/netpfil/ipfw/ip_fw_nat.c:vnet_ipfw_nat_uninit() we call "IPFW_WLOCK(chain);". This lock gets deleted in sys/netpfil/ipfw/ip_fw2.c:vnet_ipfw_uninit(). Therefore, vnet_ipfw_nat_uninit() *must* be called before vnet_ipfw_uninit(), but this doesn't always happen, because the VNET_SYSINIT order is the same for both functions. In sys/net/netpfil/ipfw/ip_fw2.c and sys/net/netpfil/ipfw/ip_fw_nat.c, IPFW_SI_SUB_FIREWALL == IPFW_NAT_SI_SUB_FIREWALL == SI_SUB_PROTO_IFATTACHDOMAIN and IPFW_MODULE_ORDER == IPFW_NAT_MODULE_ORDER Consequently, if VIMAGE is enabled, and jails are created and destroyed, the system sometimes crashes, because we are trying to use a deleted lock. To reproduce the problem: (1) Take a GENERIC kernel config, and add options for: VIMAGE, WITNESS, INVARIANTS. (2) Run this command in a loop: jail -l -u root -c path=/ name=foo persist vnet && jexec foo ifconfig lo0 127.0.0.1/8 && jail -r foo (see http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021280.html ) Fix the problem by increasing the value of IPFW_NAT_SI_SUB_FIREWALL, so that vnet_ipfw_nat_uninit() runs after vnet_ipfw_uninit(). Approved by: re (gjb) Modified: stable/10/sys/netpfil/ipfw/ip_fw_nat.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/netpfil/ipfw/ip_fw_nat.c ============================================================================== --- stable/10/sys/netpfil/ipfw/ip_fw_nat.c Wed Dec 4 07:46:53 2013 (r258911) +++ stable/10/sys/netpfil/ipfw/ip_fw_nat.c Wed Dec 4 07:50:18 2013 (r258912) @@ -674,7 +674,7 @@ static moduledata_t ipfw_nat_mod = { }; /* Define startup order. */ -#define IPFW_NAT_SI_SUB_FIREWALL SI_SUB_PROTO_IFATTACHDOMAIN +#define IPFW_NAT_SI_SUB_FIREWALL (SI_SUB_PROTO_IFATTACHDOMAIN + 1) #define IPFW_NAT_MODEVENT_ORDER (SI_ORDER_ANY - 255) #define IPFW_NAT_MODULE_ORDER (IPFW_NAT_MODEVENT_ORDER + 1) #define IPFW_NAT_VNET_ORDER (IPFW_NAT_MODEVENT_ORDER + 2) From owner-svn-src-stable@FreeBSD.ORG Wed Dec 4 07:55:50 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E431E77; Wed, 4 Dec 2013 07:55:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6A7B91A5C; Wed, 4 Dec 2013 07:55:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB47to8e015688; Wed, 4 Dec 2013 07:55:50 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB47toWF015687; Wed, 4 Dec 2013 07:55:50 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201312040755.rB47toWF015687@svn.freebsd.org> From: Craig Rodrigues Date: Wed, 4 Dec 2013 07:55:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258913 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 07:55:50 -0000 Author: rodrigc Date: Wed Dec 4 07:55:49 2013 New Revision: 258913 URL: http://svnweb.freebsd.org/changeset/base/258913 Log: MFC 258591 In vnet_route_uninit(), free some memory that is allocated in vnet_route_init(). To reproduce the problem: (1) Take a GENERIC kernel config, and add options for: VIMAGE, WITNESS, INVARIANTS. (2) Run this command in a loop: jail -l -u root -c path=/ name=foo persist vnet && jexec foo ifconfig lo0 127.0.0.1/8 && jail -r foo see: http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021280.html http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021291.html This doesn't eliminate all the "Freed UMA keg was not empty" warning messages on the console, but it helps. Approved by: re (gjb) Modified: stable/10/sys/net/route.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/net/route.c ============================================================================== --- stable/10/sys/net/route.c Wed Dec 4 07:50:18 2013 (r258912) +++ stable/10/sys/net/route.c Wed Dec 4 07:55:49 2013 (r258913) @@ -262,6 +262,9 @@ vnet_route_uninit(const void *unused __u dom->dom_rtdetach((void **)rnh, dom->dom_rtoffset); } } + + free(V_rt_tables, M_RTABLE); + uma_zdestroy(V_rtzone); } VNET_SYSUNINIT(vnet_route_uninit, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, vnet_route_uninit, 0); From owner-svn-src-stable@FreeBSD.ORG Wed Dec 4 09:46:27 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CEE53A2B; Wed, 4 Dec 2013 09:46:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BA8D811FE; Wed, 4 Dec 2013 09:46:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB49kRYU053193; Wed, 4 Dec 2013 09:46:27 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB49kRlJ053192; Wed, 4 Dec 2013 09:46:27 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201312040946.rB49kRlJ053192@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 4 Dec 2013 09:46:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258915 - stable/10/sys/dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 09:46:27 -0000 Author: trasz Date: Wed Dec 4 09:46:27 2013 New Revision: 258915 URL: http://svnweb.freebsd.org/changeset/base/258915 Log: MFC r258790: Fix hang on reboot with active iSCSI connections. Approved by: re (glebius) Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/iscsi.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Wed Dec 4 08:20:04 2013 (r258914) +++ stable/10/sys/dev/iscsi/iscsi.c Wed Dec 4 09:46:27 2013 (r258915) @@ -2110,10 +2110,12 @@ iscsi_load(void) sc->sc_cdev->si_drv1 = sc; /* - * XXX: For some reason this doesn't do its job; active sessions still hang out there - * after final sync, making the reboot effectively hang. + * Note that this needs to get run before dashutdown(). Otherwise, + * when rebooting with iSCSI session with outstanding requests, + * but disconnected, dashutdown() will hang on cam_periph_runccb(). */ - sc->sc_shutdown_eh = EVENTHANDLER_REGISTER(shutdown_post_sync, iscsi_shutdown, sc, SHUTDOWN_PRI_DEFAULT); + sc->sc_shutdown_eh = EVENTHANDLER_REGISTER(shutdown_post_sync, + iscsi_shutdown, sc, SHUTDOWN_PRI_FIRST); return (0); } From owner-svn-src-stable@FreeBSD.ORG Wed Dec 4 10:54:24 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74107382; Wed, 4 Dec 2013 10:54:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4639F169F; Wed, 4 Dec 2013 10:54:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB4AsOhE077306; Wed, 4 Dec 2013 10:54:24 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4AsOUJ077305; Wed, 4 Dec 2013 10:54:24 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201312041054.rB4AsOUJ077305@svn.freebsd.org> From: Alexander Motin Date: Wed, 4 Dec 2013 10:54:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258918 - stable/10/release/doc/en_US.ISO8859-1/hardware X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 10:54:24 -0000 Author: mav Date: Wed Dec 4 10:54:23 2013 New Revision: 258918 URL: http://svnweb.freebsd.org/changeset/base/258918 Log: MFC r258495: Update description of logical CPU handling in the latest releases and remove obsolete sysctl variable machdep.hlt_logical_cpus. Approved by: re (hrs) Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Directory Properties: stable/10/release/doc/ (props changed) Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Wed Dec 4 09:58:50 2013 (r258917) +++ stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Wed Dec 4 10:54:23 2013 (r258918) @@ -177,16 +177,13 @@ bugs may generate some problems. Perusal of the archives of the &a.smp; may yield some clues. - &os; will take advantage of HyperThreading (HTT) support - on &intel; CPUs that support this feature. The - default &os; scheduler treats the logical processors the same - as additional physical processors; in other words, no attempt - is made to optimize scheduling decisions given the shared - resources between logical processors within the same CPU. - Because this naive scheduling can result in suboptimal - performance, under certain circumstances it may be useful to - disable the logical processors with the - machdep.hyperthreading_allowed tunable. + &os; will take advantage of SMT (Symmetric MultiThreading, + also known as HyperThreading on &intel; CPUs) on the supported + CPUs. The GENERIC kernel which is + installed by default will automatically detect the additional + logical processors. The default &os; scheduler recognizes + processor topology on the system and selects logical and + physical processors to obtain optimal performance. The &man.smp.4; manual page has more details. &os; will take advantage of Physical Address Extensions From owner-svn-src-stable@FreeBSD.ORG Wed Dec 4 18:25:05 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD57CF17; Wed, 4 Dec 2013 18:25:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 992D61580; Wed, 4 Dec 2013 18:25:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB4IP5Rh029970; Wed, 4 Dec 2013 18:25:05 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4IP57Z029968; Wed, 4 Dec 2013 18:25:05 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201312041825.rB4IP57Z029968@svn.freebsd.org> From: Peter Wemm Date: Wed, 4 Dec 2013 18:25:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258929 - in stable/10/sys: compat/freebsd32 kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 18:25:05 -0000 Author: peter Date: Wed Dec 4 18:25:04 2013 New Revision: 258929 URL: http://svnweb.freebsd.org/changeset/base/258929 Log: MFC: r258718: fix emulated jail_v0 byte order Approved by: re (gjb) Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c stable/10/sys/kern/kern_jail.c Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_misc.c Wed Dec 4 16:38:40 2013 (r258928) +++ stable/10/sys/compat/freebsd32/freebsd32_misc.c Wed Dec 4 18:25:04 2013 (r258929) @@ -1925,7 +1925,7 @@ freebsd32_jail(struct thread *td, struct CP(j32_v0, j, version); PTRIN_CP(j32_v0, j, path); PTRIN_CP(j32_v0, j, hostname); - j.ip4s = j32_v0.ip_number; + j.ip4s = htonl(j32_v0.ip_number); /* jail_v0 is host order */ break; } Modified: stable/10/sys/kern/kern_jail.c ============================================================================== --- stable/10/sys/kern/kern_jail.c Wed Dec 4 16:38:40 2013 (r258928) +++ stable/10/sys/kern/kern_jail.c Wed Dec 4 18:25:04 2013 (r258929) @@ -313,7 +313,7 @@ sys_jail(struct thread *td, struct jail_ j.version = j0.version; j.path = j0.path; j.hostname = j0.hostname; - j.ip4s = j0.ip_number; + j.ip4s = htonl(j0.ip_number); /* jail_v0 is host order */ break; } From owner-svn-src-stable@FreeBSD.ORG Wed Dec 4 20:05:22 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4904D337; Wed, 4 Dec 2013 20:05:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 332A81D34; Wed, 4 Dec 2013 20:05:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB4K5MSe064319; Wed, 4 Dec 2013 20:05:22 GMT (envelope-from davidcs@svn.freebsd.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB4K5Ljs064309; Wed, 4 Dec 2013 20:05:21 GMT (envelope-from davidcs@svn.freebsd.org) Message-Id: <201312042005.rB4K5Ljs064309@svn.freebsd.org> From: David C Somayajulu Date: Wed, 4 Dec 2013 20:05:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258936 - in stable/9: share/man/man4 sys/conf sys/dev/qlxge sys/modules sys/modules/qlxge X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 20:05:22 -0000 Author: davidcs Date: Wed Dec 4 20:05:20 2013 New Revision: 258936 URL: http://svnweb.freebsd.org/changeset/base/258936 Log: MFC: 252206,258156 port dev/qlxge from head Added: stable/9/share/man/man4/qlxge.4 - copied unchanged from r252206, head/share/man/man4/qlxge.4 stable/9/sys/dev/qlxge/ - copied from r252206, head/sys/dev/qlxge/ stable/9/sys/modules/qlxge/ - copied from r252206, head/sys/modules/qlxge/ Modified: stable/9/share/man/man4/Makefile stable/9/sys/conf/files.amd64 stable/9/sys/dev/qlxge/qls_ioctl.c stable/9/sys/modules/Makefile Directory Properties: stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Wed Dec 4 20:04:34 2013 (r258935) +++ stable/9/share/man/man4/Makefile Wed Dec 4 20:05:20 2013 (r258936) @@ -361,6 +361,7 @@ MAN= aac.4 \ pts.4 \ pty.4 \ puc.4 \ + ${_qlxge.4} \ ${_qlxgb.4} \ ${_qlxgbe.4} \ ral.4 \ @@ -771,10 +772,12 @@ MLINKS+=lindev.4 full.4 .endif .if ${MACHINE_CPUARCH} == "amd64" +_qlxge.4= qlxge.4 _qlxgb.4= qlxgb.4 _qlxgbe.4= qlxgbe.4 _sfxge.4= sfxge.4 +MLINKS+=qlxge.4 if_qlxge.4 MLINKS+=qlxgb.4 if_qlxgb.4 MLINKS+=qlxgbe.4 if_qlxgbe.4 MLINKS+=sfxge.4 if_sfxge.4 Copied: stable/9/share/man/man4/qlxge.4 (from r252206, head/share/man/man4/qlxge.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/share/man/man4/qlxge.4 Wed Dec 4 20:05:20 2013 (r258936, copy of r252206, head/share/man/man4/qlxge.4) @@ -0,0 +1,91 @@ +.\"- +.\" Copyright (c) 2013-2014 Qlogic Corporation +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd June 21, 2013 +.Dt QLXGE 4 +.Os +.Sh NAME +.Nm qlxge +.Nd "QLogic 8100 Series 10 Gigabit 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 qlxge" +.Ed +.Pp +To load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_qlxge_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver supports IPv4 checksum offload, +TCP and UDP checksum offload for both IPv4 and IPv6, +Large Segment Offload for both IPv4 and IPv6, +Jumbo frames, VLAN Tag, and +Receive Side scaling. +For further hardware information, see +.Pa http://www.qlogic.com/ . +.Sh HARDWARE +The +.Nm +driver supports 10 Gigabit Ethernet & CNA Adapter based on the following +chipsets: +.Pp +.Bl -bullet -compact +.It +QLogic 8100 series +.El +.Sh SUPPORT +For support questions please contact your QLogic approved reseller or +QLogic Technical Support at +.Pa http://support.qlogic.com , +or by E-mail at +.Aq support@qlogic.com . +.Sh SEE ALSO +.Xr altq 4 , +.Xr arp 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 10.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An David C Somayajulu +at QLogic Corporation. Modified: stable/9/sys/conf/files.amd64 ============================================================================== --- stable/9/sys/conf/files.amd64 Wed Dec 4 20:04:34 2013 (r258935) +++ stable/9/sys/conf/files.amd64 Wed Dec 4 20:05:20 2013 (r258936) @@ -237,6 +237,12 @@ dev/nvme/nvme_util.c optional nvme dev/nvram/nvram.c optional nvram isa dev/random/ivy.c optional random rdrand_rng dev/random/nehemiah.c optional random padlock_rng +dev/qlxge/qls_dbg.c optional qlxge pci +dev/qlxge/qls_dump.c optional qlxge pci +dev/qlxge/qls_hw.c optional qlxge pci +dev/qlxge/qls_ioctl.c optional qlxge pci +dev/qlxge/qls_isr.c optional qlxge pci +dev/qlxge/qls_os.c optional qlxge pci dev/qlxgb/qla_dbg.c optional qlxgb pci dev/qlxgb/qla_hw.c optional qlxgb pci dev/qlxgb/qla_ioctl.c optional qlxgb pci Modified: stable/9/sys/dev/qlxge/qls_ioctl.c ============================================================================== --- head/sys/dev/qlxge/qls_ioctl.c Tue Jun 25 17:50:22 2013 (r252206) +++ stable/9/sys/dev/qlxge/qls_ioctl.c Wed Dec 4 20:05:20 2013 (r258936) @@ -100,13 +100,16 @@ qls_eioctl(struct cdev *dev, u_long cmd, if (mpi_dump->size == 0) { mpi_dump->size = sizeof (qls_mpi_coredump_t); } else { - if (mpi_dump->size < sizeof (qls_mpi_coredump_t)) + if ((mpi_dump->size != sizeof (qls_mpi_coredump_t)) || + (mpi_dump->dbuf == NULL)) rval = EINVAL; else { - qls_mpi_core_dump(ha); - rval = copyout( &ql_mpi_coredump, - mpi_dump->dbuf, - mpi_dump->size); + if (qls_mpi_core_dump(ha) == 0) { + rval = copyout(&ql_mpi_coredump, + mpi_dump->dbuf, + mpi_dump->size); + } else + rval = ENXIO; if (rval) { device_printf(ha->pci_dev, Modified: stable/9/sys/modules/Makefile ============================================================================== --- stable/9/sys/modules/Makefile Wed Dec 4 20:04:34 2013 (r258935) +++ stable/9/sys/modules/Makefile Wed Dec 4 20:05:20 2013 (r258936) @@ -270,6 +270,7 @@ SUBDIR= \ ${_pst} \ pty \ puc \ + ${_qlxge} \ ${_qlxgb} \ ${_qlxgbe} \ ral \ @@ -713,6 +714,7 @@ _opensolaris= opensolaris _padlock= padlock .endif _pccard= pccard +_qlxge= qlxge _qlxgb= qlxgb _qlxgbe= qlxgbe _rdma= rdma From owner-svn-src-stable@FreeBSD.ORG Thu Dec 5 00:59:30 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E111A3C6; Thu, 5 Dec 2013 00:59:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C13641FC0; Thu, 5 Dec 2013 00:59:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB50xU1Z071699; Thu, 5 Dec 2013 00:59:30 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB50xTF8071694; Thu, 5 Dec 2013 00:59:29 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312050059.rB50xTF8071694@svn.freebsd.org> From: Glen Barber Date: Thu, 5 Dec 2013 00:59:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258952 - in stable/10: release release/scripts share/man/man7 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 00:59:31 -0000 Author: gjb Date: Thu Dec 5 00:59:29 2013 New Revision: 258952 URL: http://svnweb.freebsd.org/changeset/base/258952 Log: MFC r258786, r258796, r258797, r258847, r258853, r258949: r258786: Move OPTIONS_UNSET outside of the PBUILD_FLAGS variable, otherwise the textproc/docproj port build fails. r258796 (hrs): - Prevent TARGET and TARGET_ARCH from being defined as empty when TARGET="" and/or TARGET_ARCH="" is specified. - Remove extra (). r258797 (hrs): Use standard CLEANFILES/CLEANDIRS and clean target in bsd.obj.mk. r258847: Provide reproducibility between builds by building pkg(8) from ports, instead of using pkg-bootstrap. This should resolve a problem that was discovered during 10.0-BETA4 freebsd-update(8) builds, r258853: Turn off the dvdrom target by default. dvd1.iso is now built by specifying 'WITH_DVD=1' during 'make release'. This caused some problems during the freebsd-update builds for 10.0-BETA4. r258949: Ensure WITH_DVD is not empty to prevent 'WITH_DVD= ' from evaluating to true. Approved by: re (hrs) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/Makefile stable/10/release/release.sh stable/10/release/scripts/pkg-stage.sh stable/10/share/man/man7/release.7 Directory Properties: stable/10/release/ (props changed) stable/10/share/man/man7/ (props changed) Modified: stable/10/release/Makefile ============================================================================== --- stable/10/release/Makefile Thu Dec 5 00:57:53 2013 (r258951) +++ stable/10/release/Makefile Thu Dec 5 00:59:29 2013 (r258952) @@ -18,7 +18,7 @@ # NOPORTS: if set, do not distribute ports tree # NOSRC: if set, do not distribute source tree # NODOC: if set, do not generate release documentation -# NODVD: if set, do not generate dvd1.iso +# WITH_DVD: if set, generate dvd1.iso # TARGET/TARGET_ARCH: architecture of built release # @@ -27,11 +27,15 @@ PORTSDIR?= /usr/ports DOCDIR?= /usr/doc RELNOTES_LANG?= en_US.ISO8859-1 -TARGET?= ${MACHINE} +.if !defined(TARGET) || empty(TARGET) +TARGET= ${MACHINE} +.endif +.if !defined(TARGET_ARCH) || empty(TARGET_ARCH) .if ${TARGET} == ${MACHINE} -TARGET_ARCH?= ${MACHINE_ARCH} +TARGET_ARCH= ${MACHINE_ARCH} .else -TARGET_ARCH?= ${TARGET} +TARGET_ARCH= ${TARGET} +.endif .endif IMAKE= ${MAKE} TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET} DISTDIR= dist @@ -73,7 +77,7 @@ IMAGES= .if exists(${.CURDIR}/${TARGET}/mkisoimages.sh) RELEASE_TARGETS+= cdrom IMAGES+= disc1.iso bootonly.iso -. if(!defined(NODVD)) +. if defined(WITH_DVD) && !empty(WITH_DVD) RELEASE_TARGETS+= dvdrom IMAGES+= dvd1.iso . endif @@ -83,7 +87,12 @@ RELEASE_TARGETS+= memstick.img IMAGES+= memstick.img .endif +CLEANFILES= packagesystem *.txz MANIFEST system ${IMAGES} +CLEANDIRS= dist ftp release bootonly dvd +beforeclean: + chflags -R noschg . .include +clean: beforeclean base.txz: mkdir -p ${DISTDIR} @@ -220,15 +229,6 @@ release: ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS} -clean: - chflags -R noschg . - rm -rf dist ftp - rm -f packagesystem - rm -f *.txz MANIFEST - rm -f system - rm -rf release bootonly dvd - rm -f ${IMAGES} - install: .if defined(DESTDIR) && !empty(DESTDIR) mkdir -p ${DESTDIR} Modified: stable/10/release/release.sh ============================================================================== --- stable/10/release/release.sh Thu Dec 5 00:57:53 2013 (r258951) +++ stable/10/release/release.sh Thu Dec 5 00:59:29 2013 (r258952) @@ -176,9 +176,9 @@ build_doc_ports() { _OSVERSION=$(sysctl -n kern.osreldate) if [ -d ${CHROOTDIR}/usr/doc ] && [ "x${NODOC}" = "x" ]; then PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" - PBUILD_FLAGS="${PBUILD_FLAGS} OPTIONS_UNSET='FOP IGOR'" + PBUILD_FLAGS="${PBUILD_FLAGS}" chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \ - ${PBUILD_FLAGS} install clean distclean + ${PBUILD_FLAGS} OPTIONS_UNSET="FOP IGOR" install clean distclean fi } Modified: stable/10/release/scripts/pkg-stage.sh ============================================================================== --- stable/10/release/scripts/pkg-stage.sh Thu Dec 5 00:57:53 2013 (r258951) +++ stable/10/release/scripts/pkg-stage.sh Thu Dec 5 00:59:29 2013 (r258952) @@ -25,7 +25,7 @@ REVISION="${2}" . "${1}" || exit 1 if [ ! -x /usr/local/sbin/pkg ]; then - /usr/sbin/pkg bootstrap + /usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean fi /bin/mkdir -p ${PKG_CACHEDIR} Modified: stable/10/share/man/man7/release.7 ============================================================================== --- stable/10/share/man/man7/release.7 Thu Dec 5 00:57:53 2013 (r258951) +++ stable/10/share/man/man7/release.7 Thu Dec 5 00:59:29 2013 (r258952) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 18, 2013 +.Dd December 2, 2013 .Dt RELEASE 7 .Os .Sh NAME @@ -230,10 +230,6 @@ When set, will prevent the .Fa doc.txz distribution package from being created. -.It Va NODVD -Set to a non-empty value to skip the -.Cm dvdrom -target. .It Va NOPORTS Set to a non-empty value to skip the .Li ports/ @@ -245,6 +241,10 @@ will prevent the distribution package from being created. Setting this also sets .Va NODOC . +.It Va WITH_DVD +Set to a non-empty value to include the +.Cm dvdrom +target. .El .Sh MAKEFILE TARGETS The release makefile From owner-svn-src-stable@FreeBSD.ORG Thu Dec 5 01:06:05 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CACC4744; Thu, 5 Dec 2013 01:06:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B6D561030; Thu, 5 Dec 2013 01:06:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5165cr074953; Thu, 5 Dec 2013 01:06:05 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5165jl074952; Thu, 5 Dec 2013 01:06:05 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312050106.rB5165jl074952@svn.freebsd.org> From: Glen Barber Date: Thu, 5 Dec 2013 01:06:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258953 - stable/10/usr.sbin/bsdconfig/share X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 01:06:05 -0000 Author: gjb Date: Thu Dec 5 01:06:05 2013 New Revision: 258953 URL: http://svnweb.freebsd.org/changeset/base/258953 Log: MFC r258854: Fix PKG_ABI detection in bsdconfig(8) after pkg-1.2 is released, since the format of 'pkg -vv' output has changed. Approved by: re (hrs) Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/bsdconfig/share/common.subr Directory Properties: stable/10/usr.sbin/bsdconfig/ (props changed) Modified: stable/10/usr.sbin/bsdconfig/share/common.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/common.subr Thu Dec 5 00:59:29 2013 (r258952) +++ stable/10/usr.sbin/bsdconfig/share/common.subr Thu Dec 5 01:06:05 2013 (r258953) @@ -65,7 +65,7 @@ export UNAME_R="$(uname -r)" # Release L if [ ! "${PKG_ABI+set}" ]; then export PKG_ABI="$( ASSUME_ALWAYS_YES=1 pkg -vv | - awk '$1=="ABI:"{print $2;exit}' 2> /dev/null + awk '$1=="ABI"{print $3;exit}' 2> /dev/null )" fi From owner-svn-src-stable@FreeBSD.ORG Thu Dec 5 01:21:46 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28577D12; Thu, 5 Dec 2013 01:21:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 085F31117; Thu, 5 Dec 2013 01:21:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB51Lj6D081385; Thu, 5 Dec 2013 01:21:45 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB51Ljb9081384; Thu, 5 Dec 2013 01:21:45 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201312050121.rB51Ljb9081384@svn.freebsd.org> From: Craig Rodrigues Date: Thu, 5 Dec 2013 01:21:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258954 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 01:21:46 -0000 Author: rodrigc Date: Thu Dec 5 01:21:45 2013 New Revision: 258954 URL: http://svnweb.freebsd.org/changeset/base/258954 Log: MFC r258914 Update release notes. Submitted by: skreuzer Approved by: re (delphij) Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Directory Properties: stable/10/release/ (props changed) stable/10/release/doc/ (props changed) Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Dec 5 01:06:05 2013 (r258953) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Dec 5 01:21:45 2013 (r258954) @@ -120,6 +120,9 @@ Kernel Changes + The maximum amount of memory the &os; kernel + can address has been increased from 1TB to 4TB. + A new &man.cpuset.2; API has been added for thread to CPU binding and CPU resource grouping and assignment. The &man.cpuset.1; userland utility has been added @@ -201,7 +204,9 @@ Multimedia Support - + Support for version 2.0 of the USB Audio reference design + has been added. New devices should support higher bandwidth, + increased sampling frequency and wider dynamic range. @@ -249,26 +254,23 @@ Network Protocols - The &man.bpf.4; packet filter and capture facility now - supports a zero-copy mode of operation, in which buffers are - loaned from a user process to the kernel. This feature can - be enabled by setting - the net.bpf.zerocopy_enable sysctl - variable to 1. - - ISDN4BSD(I4B), netatm, and all - related subsystems have been removed due to lack of - multi-processor support. - - A bug in TCP options padding, where the wrong padding - bytes were used, has been fixed. - - The IEEE 802.11s element identifiers have - been updated to reflect the final version of the amendment. This - update breaks compatibility with older mesh setups but is necessary - as the previous IDs are used by another amendment leading to - unexpected results when trying to associate with an accesspoint - using the affected IDs. + &man.carp.4; has been rewritten to make addresses + more sane from the viewpoint of routing daemons such as + quagga/zebra. It also brings support for a single redundant + address on the subnet (carpdev), switching state with + ifconfig, better locking and using modern kernel + interfaces to allocate multicast memberships. + + The &man.pf.4; firewall now supports fine-grain locking + and better utilization on multi-cpu machines resulting in + significant improvements in performance. + + Support for up to 65536 routing tables has been + introduced. + + Support for setting/matching differentiated services + codepoints (DSCP) in IP header has been added to + &man.ipfw.8;. @@ -293,19 +295,34 @@ File Systems - A problem with using &man.mmap.2; on ZFS filesystems has - been fixed. + A new kernel-based iSCSI target and initiator has been + added - A new kernel-mode NFS lock manager has been added, - improving performance and behavior of NFS locking. A new - &man.clear.locks.8; command has been added to clear locks held - on behalf of an NFS client. - - The ZFS file system - has been upgraded to version 28. Changes include Data - Deduplication, Triple parity RAIDZ, and zfs diff. + UFS filesystems can now be enlarged with &man.growfs.8; while + mounted read-write. This is especially useful for virtual + machines, allowing the addition of more harddrive space without + interruption of service. + + A state of the art FUSE implementation is now part of the + base system. It allows the use of nearly all fusefs file + systems + + Support for the high performance LZ4 compression algorithm + has been added to ZFS. LZ4 is usually faster and can achieve a + higher compression ratio than LZJB, the default compression + algorithm + + Support for L2ARC compression has been added to ZFS. + + ZFS will now compare the checksums of incoming writes to + the checksum of the existing on-disk data and avoid issuing any + write I/O for data that has not changed. This will reduce I/O + as well as space usage because if the old block is referenced + by a snapshot, both copies of the block are kept even though + both contain the same data. + @@ -443,8 +460,8 @@ bzip2 has been updated from 1.0.4 to 1.0.5. - CVS has been updated from 1.11.17 - to a post-1.11.22 snapshot from 10 March 2008. + CVS has been removed from the + base system, but is still available from ports FILE has been updated from 4.23 to 5.03. From owner-svn-src-stable@FreeBSD.ORG Thu Dec 5 06:14:00 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71264FC9; Thu, 5 Dec 2013 06:14:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 518421FF4; Thu, 5 Dec 2013 06:14:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB56E04w080976; Thu, 5 Dec 2013 06:14:00 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB56Dxve080968; Thu, 5 Dec 2013 06:13:59 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201312050613.rB56Dxve080968@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 5 Dec 2013 06:13:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258959 - stable/10/sys/dev/bge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 06:14:00 -0000 Author: yongari Date: Thu Dec 5 06:13:59 2013 New Revision: 258959 URL: http://svnweb.freebsd.org/changeset/base/258959 Log: MFC r258830: Add support for BCM57764, BCM57767, BCM57782, BCM57786 and BCM57787. PR: 184304 Approved by: re (rodrigc) Modified: stable/10/sys/dev/bge/if_bge.c stable/10/sys/dev/bge/if_bgereg.h Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/dev/bge/if_bge.c ============================================================================== --- stable/10/sys/dev/bge/if_bge.c Thu Dec 5 05:59:09 2013 (r258958) +++ stable/10/sys/dev/bge/if_bge.c Thu Dec 5 06:13:59 2013 (r258959) @@ -220,11 +220,16 @@ static const struct bge_type { { BCOM_VENDORID, BCOM_DEVICEID_BCM57760 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57761 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57762 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57764 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57765 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57766 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57767 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57780 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57781 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57782 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57785 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57786 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57787 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57788 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57790 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57791 }, @@ -2693,6 +2698,9 @@ bge_chipid(device_t dev) case BCOM_DEVICEID_BCM5725: case BCOM_DEVICEID_BCM5727: case BCOM_DEVICEID_BCM5762: + case BCOM_DEVICEID_BCM57764: + case BCOM_DEVICEID_BCM57767: + case BCOM_DEVICEID_BCM57787: id = pci_read_config(dev, BGE_PCI_GEN2_PRODID_ASICREV, 4); break; @@ -2701,7 +2709,9 @@ bge_chipid(device_t dev) case BCOM_DEVICEID_BCM57765: case BCOM_DEVICEID_BCM57766: case BCOM_DEVICEID_BCM57781: + case BCOM_DEVICEID_BCM57782: case BCOM_DEVICEID_BCM57785: + case BCOM_DEVICEID_BCM57786: case BCOM_DEVICEID_BCM57791: case BCOM_DEVICEID_BCM57795: id = pci_read_config(dev, Modified: stable/10/sys/dev/bge/if_bgereg.h ============================================================================== --- stable/10/sys/dev/bge/if_bgereg.h Thu Dec 5 05:59:09 2013 (r258958) +++ stable/10/sys/dev/bge/if_bgereg.h Thu Dec 5 06:13:59 2013 (r258959) @@ -2503,11 +2503,16 @@ struct bge_status_block { #define BCOM_DEVICEID_BCM57760 0x1690 #define BCOM_DEVICEID_BCM57761 0x16B0 #define BCOM_DEVICEID_BCM57762 0x1682 +#define BCOM_DEVICEID_BCM57764 0x1642 #define BCOM_DEVICEID_BCM57765 0x16B4 #define BCOM_DEVICEID_BCM57766 0x1686 +#define BCOM_DEVICEID_BCM57767 0x1683 #define BCOM_DEVICEID_BCM57780 0x1692 #define BCOM_DEVICEID_BCM57781 0x16B1 +#define BCOM_DEVICEID_BCM57782 0x16B7 #define BCOM_DEVICEID_BCM57785 0x16B5 +#define BCOM_DEVICEID_BCM57786 0x16B3 +#define BCOM_DEVICEID_BCM57787 0x1641 #define BCOM_DEVICEID_BCM57788 0x1691 #define BCOM_DEVICEID_BCM57790 0x1694 #define BCOM_DEVICEID_BCM57791 0x16B2 From owner-svn-src-stable@FreeBSD.ORG Thu Dec 5 07:16:25 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DAAE0B24; Thu, 5 Dec 2013 07:16:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AC5A612B5; Thu, 5 Dec 2013 07:16:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB57GPCe001509; Thu, 5 Dec 2013 07:16:25 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB57GPZ9001507; Thu, 5 Dec 2013 07:16:25 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201312050716.rB57GPZ9001507@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 5 Dec 2013 07:16:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258960 - stable/9/sys/dev/ae X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 07:16:25 -0000 Author: yongari Date: Thu Dec 5 07:16:24 2013 New Revision: 258960 URL: http://svnweb.freebsd.org/changeset/base/258960 Log: MFC r253406: Avoid magic constant. No functional change. Modified: stable/9/sys/dev/ae/if_ae.c stable/9/sys/dev/ae/if_aereg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ae/if_ae.c ============================================================================== --- stable/9/sys/dev/ae/if_ae.c Thu Dec 5 06:13:59 2013 (r258959) +++ stable/9/sys/dev/ae/if_ae.c Thu Dec 5 07:16:24 2013 (r258960) @@ -585,7 +585,7 @@ ae_init_locked(ae_softc_t *sc) val = eaddr[0] << 8 | eaddr[1]; AE_WRITE_4(sc, AE_EADDR1_REG, val); - bzero(sc->rxd_base_dma, AE_RXD_COUNT_DEFAULT * 1536 + 120); + bzero(sc->rxd_base_dma, AE_RXD_COUNT_DEFAULT * 1536 + AE_RXD_PADDING); bzero(sc->txd_base, AE_TXD_BUFSIZE_DEFAULT); bzero(sc->txs_base, AE_TXS_COUNT_DEFAULT * 4); /* @@ -1145,8 +1145,8 @@ ae_alloc_rings(ae_softc_t *sc) */ error = bus_dma_tag_create(sc->dma_parent_tag, 128, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, - NULL, NULL, AE_RXD_COUNT_DEFAULT * 1536 + 120, 1, - AE_RXD_COUNT_DEFAULT * 1536 + 120, 0, NULL, NULL, + NULL, NULL, AE_RXD_COUNT_DEFAULT * 1536 + AE_RXD_PADDING, 1, + AE_RXD_COUNT_DEFAULT * 1536 + AE_RXD_PADDING, 0, NULL, NULL, &sc->dma_rxd_tag); if (error != 0) { device_printf(sc->dev, "could not creare TxS DMA tag.\n"); @@ -1205,15 +1205,15 @@ ae_alloc_rings(ae_softc_t *sc) return (error); } error = bus_dmamap_load(sc->dma_rxd_tag, sc->dma_rxd_map, - sc->rxd_base_dma, AE_RXD_COUNT_DEFAULT * 1536 + 120, ae_dmamap_cb, - &busaddr, BUS_DMA_NOWAIT); + sc->rxd_base_dma, AE_RXD_COUNT_DEFAULT * 1536 + AE_RXD_PADDING, + ae_dmamap_cb, &busaddr, BUS_DMA_NOWAIT); if (error != 0 || busaddr == 0) { device_printf(sc->dev, "could not load DMA map for RxD ring.\n"); return (error); } - sc->dma_rxd_busaddr = busaddr + 120; - sc->rxd_base = (ae_rxd_t *)(sc->rxd_base_dma + 120); + sc->dma_rxd_busaddr = busaddr + AE_RXD_PADDING; + sc->rxd_base = (ae_rxd_t *)(sc->rxd_base_dma + AE_RXD_PADDING); return (0); } Modified: stable/9/sys/dev/ae/if_aereg.h ============================================================================== --- stable/9/sys/dev/ae/if_aereg.h Thu Dec 5 06:13:59 2013 (r258959) +++ stable/9/sys/dev/ae/if_aereg.h Thu Dec 5 07:16:24 2013 (r258960) @@ -104,6 +104,8 @@ #define AE_RXD_COUNT_MIN 16 #define AE_RXD_COUNT_MAX 512 #define AE_RXD_COUNT_DEFAULT 64 +/* Padding to align frames on a 128-byte boundary. */ +#define AE_RXD_PADDING 120 #define AE_TXD_BUFSIZE_MIN 4096 #define AE_TXD_BUFSIZE_MAX 65536 From owner-svn-src-stable@FreeBSD.ORG Thu Dec 5 07:18:33 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8579BDA3; Thu, 5 Dec 2013 07:18:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 660C912C6; Thu, 5 Dec 2013 07:18:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB57IXpD001893; Thu, 5 Dec 2013 07:18:33 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB57IXCm001891; Thu, 5 Dec 2013 07:18:33 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201312050718.rB57IXCm001891@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 5 Dec 2013 07:18:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258962 - stable/9/sys/dev/bge X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 07:18:33 -0000 Author: yongari Date: Thu Dec 5 07:18:32 2013 New Revision: 258962 URL: http://svnweb.freebsd.org/changeset/base/258962 Log: MFC r253408: Implement workaround for BCM5719/BCM5720 TX hang. The read DMA request logic operation is based on having sufficient available space in the transmit data buffer (TXMBUF) before a read DMA can be requested. There are four read DMA channels that use the TXMBUF, and the logic checks if the available free space in the TXMBUF is large enough for all the data in the four Send Buffers for which buffer descriptors have been fetched. The Enable_Request signal is asserted only if the free TXMBUF space is larger than the sum of the four DMA length registers. The power-up default value of BGE_RDMA_LSO_CRPTEN_CTRL register bit 25 (bit 21 on BCM5720) is zero, which selects the DMA length registers to connect to the input of the adder block. The DMA length registers are asynchronously reset following BCM5719/BCM5720 power-up, and due to the lack of synchronous deassertion of the length registers reset signal these resisters may contain uninitialized values following the reset deassertion. In the case of the failure the uninitialized DMA length register values added up to more than the TXMBUF size, which prevented the assertion of the Enable_Request signal and any subsequent read DMA to start. This lockup condition is the root cause of failing to generate any transmit traffic. To workaround the issue, select alternate output of multiplexers and transmit the first four Ethernet frames. This overwrites the DMA length registers with valid values. Modified: stable/9/sys/dev/bge/if_bge.c stable/9/sys/dev/bge/if_bgereg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bge/if_bge.c ============================================================================== --- stable/9/sys/dev/bge/if_bge.c Thu Dec 5 07:18:06 2013 (r258961) +++ stable/9/sys/dev/bge/if_bge.c Thu Dec 5 07:18:32 2013 (r258962) @@ -2508,6 +2508,24 @@ bge_blockinit(struct bge_softc *sc) CSR_WRITE_4(sc, BGE_RDMA_MODE, val); DELAY(40); + if (sc->bge_flags & BGE_FLAG_RDMA_BUG) { + for (i = 0; i < BGE_NUM_RDMA_CHANNELS / 2; i++) { + val = CSR_READ_4(sc, BGE_RDMA_LENGTH + i * 4); + if ((val & 0xFFFF) > BGE_FRAMELEN) + break; + if (((val >> 16) & 0xFFFF) > BGE_FRAMELEN) + break; + } + if (i != BGE_NUM_RDMA_CHANNELS / 2) { + val = CSR_READ_4(sc, BGE_RDMA_LSO_CRPTEN_CTRL); + if (sc->bge_asicrev == BGE_ASICREV_BCM5719) + val |= BGE_RDMA_TX_LENGTH_WA_5719; + else + val |= BGE_RDMA_TX_LENGTH_WA_5720; + CSR_WRITE_4(sc, BGE_RDMA_LSO_CRPTEN_CTRL, val); + } + } + /* Turn on RX data completion state machine */ CSR_WRITE_4(sc, BGE_RDC_MODE, BGE_RDCMODE_ENABLE); @@ -3344,10 +3362,18 @@ bge_attach(device_t dev) sc->bge_flags |= BGE_FLAG_5717_PLUS | BGE_FLAG_5755_PLUS | BGE_FLAG_575X_PLUS | BGE_FLAG_5705_PLUS | BGE_FLAG_JUMBO | BGE_FLAG_JUMBO_FRAME; - if (sc->bge_asicrev == BGE_ASICREV_BCM5719 && - sc->bge_chipid == BGE_CHIPID_BCM5719_A0) { - /* Jumbo frame on BCM5719 A0 does not work. */ - sc->bge_flags &= ~BGE_FLAG_JUMBO; + if (sc->bge_asicrev == BGE_ASICREV_BCM5719 || + sc->bge_asicrev == BGE_ASICREV_BCM5720) { + /* + * Enable work around for DMA engine miscalculation + * of TXMBUF available space. + */ + sc->bge_flags |= BGE_FLAG_RDMA_BUG; + if (sc->bge_asicrev == BGE_ASICREV_BCM5719 && + sc->bge_chipid == BGE_CHIPID_BCM5719_A0) { + /* Jumbo frame on BCM5719 A0 does not work. */ + sc->bge_flags &= ~BGE_FLAG_JUMBO; + } } break; case BGE_ASICREV_BCM5755: @@ -4765,6 +4791,7 @@ bge_stats_update_regs(struct bge_softc * { struct ifnet *ifp; struct bge_mac_stats *stats; + uint32_t val; ifp = sc->bge_ifp; stats = &sc->bge_mac_stats; @@ -4865,6 +4892,24 @@ bge_stats_update_regs(struct bge_softc * ifp->if_collisions = (u_long)stats->etherStatsCollisions; ifp->if_ierrors = (u_long)(stats->NoMoreRxBDs + stats->InputDiscards + stats->InputErrors); + + if (sc->bge_flags & BGE_FLAG_RDMA_BUG) { + /* + * If controller transmitted more than BGE_NUM_RDMA_CHANNELS + * frames, it's safe to disable workaround for DMA engine's + * miscalculation of TXMBUF space. + */ + if (stats->ifHCOutUcastPkts + stats->ifHCOutMulticastPkts + + stats->ifHCOutBroadcastPkts > BGE_NUM_RDMA_CHANNELS) { + val = CSR_READ_4(sc, BGE_RDMA_LSO_CRPTEN_CTRL); + if (sc->bge_asicrev == BGE_ASICREV_BCM5719) + val &= ~BGE_RDMA_TX_LENGTH_WA_5719; + else + val &= ~BGE_RDMA_TX_LENGTH_WA_5720; + CSR_WRITE_4(sc, BGE_RDMA_LSO_CRPTEN_CTRL, val); + sc->bge_flags &= ~BGE_FLAG_RDMA_BUG; + } + } } static void Modified: stable/9/sys/dev/bge/if_bgereg.h ============================================================================== --- stable/9/sys/dev/bge/if_bgereg.h Thu Dec 5 07:18:06 2013 (r258961) +++ stable/9/sys/dev/bge/if_bgereg.h Thu Dec 5 07:18:32 2013 (r258962) @@ -1586,6 +1586,8 @@ #define BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_BD_512 0x00020000 #define BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_BD_4K 0x00030000 #define BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_LSO_4K 0x000C0000 +#define BGE_RDMA_TX_LENGTH_WA_5719 0x02000000 +#define BGE_RDMA_TX_LENGTH_WA_5720 0x00200000 /* BD Read DMA Mode register */ #define BGE_RDMA_BD_MODE 0x4A00 @@ -1603,6 +1605,9 @@ #define BGE_RDMA_NON_LSO_MODE_RESET 0x00000001 #define BGE_RDMA_NON_LSO_MODE_ENABLE 0x00000002 +#define BGE_RDMA_LENGTH 0x4BE0 +#define BGE_NUM_RDMA_CHANNELS 4 + /* * Write DMA control registers */ @@ -2982,6 +2987,7 @@ struct bge_softc { #define BGE_FLAG_SHORT_DMA_BUG 0x08000000 #define BGE_FLAG_4K_RDMA_BUG 0x10000000 #define BGE_FLAG_MBOX_REORDER 0x20000000 +#define BGE_FLAG_RDMA_BUG 0x40000000 uint32_t bge_mfw_flags; /* Management F/W flags */ #define BGE_MFW_ON_RXCPU 0x00000001 #define BGE_MFW_ON_APE 0x00000002 From owner-svn-src-stable@FreeBSD.ORG Thu Dec 5 07:20:04 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47397F08; Thu, 5 Dec 2013 07:20:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1994912FF; Thu, 5 Dec 2013 07:20:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB57K3Gp002207; Thu, 5 Dec 2013 07:20:03 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB57K3mV002203; Thu, 5 Dec 2013 07:20:03 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201312050720.rB57K3mV002203@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 5 Dec 2013 07:20:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258963 - stable/9/sys/dev/bge X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 07:20:04 -0000 Author: yongari Date: Thu Dec 5 07:20:03 2013 New Revision: 258963 URL: http://svnweb.freebsd.org/changeset/base/258963 Log: MFC r253480: Setup the PCIE Fast Training Sequence (FTS) value to prevent transmit hangs for 57766 and non Ax versions of 57765. While here, correct definition of BGE_CHIPREV_57765_AX. Modified: stable/9/sys/dev/bge/if_bge.c stable/9/sys/dev/bge/if_bgereg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bge/if_bge.c ============================================================================== --- stable/9/sys/dev/bge/if_bge.c Thu Dec 5 07:18:32 2013 (r258962) +++ stable/9/sys/dev/bge/if_bge.c Thu Dec 5 07:20:03 2013 (r258963) @@ -1796,6 +1796,20 @@ bge_chipinit(struct bge_softc *sc) pci_write_config(sc->bge_dev, BGE_PCI_MSI_DATA + 2, val, 2); } + if (sc->bge_asicrev == BGE_ASICREV_BCM57765 || + sc->bge_asicrev == BGE_ASICREV_BCM57766) { + /* + * For the 57766 and non Ax versions of 57765, bootcode + * needs to setup the PCIE Fast Training Sequence (FTS) + * value to prevent transmit hangs. + */ + if (sc->bge_chiprev != BGE_CHIPREV_57765_AX) { + CSR_WRITE_4(sc, BGE_CPMU_PADRNG_CTL, + CSR_READ_4(sc, BGE_CPMU_PADRNG_CTL) | + BGE_CPMU_PADRNG_CTL_RDIV2); + } + } + /* * Set up the PCI DMA control register. */ Modified: stable/9/sys/dev/bge/if_bgereg.h ============================================================================== --- stable/9/sys/dev/bge/if_bgereg.h Thu Dec 5 07:18:32 2013 (r258962) +++ stable/9/sys/dev/bge/if_bgereg.h Thu Dec 5 07:20:03 2013 (r258963) @@ -378,6 +378,7 @@ #define BGE_CHIPREV_5717_AX 0x57170 #define BGE_CHIPREV_5717_BX 0x57171 #define BGE_CHIPREV_5761_AX 0x57611 +#define BGE_CHIPREV_57765_AX 0x577850 #define BGE_CHIPREV_5784_AX 0x57841 /* PCI DMA Read/Write Control register */ @@ -1289,6 +1290,7 @@ #define BGE_CPMU_MUTEX_REQ 0x365C #define BGE_CPMU_MUTEX_GNT 0x3660 #define BGE_CPMU_PHY_STRAP 0x3664 +#define BGE_CPMU_PADRNG_CTL 0x3668 /* Central Power Management Unit (CPMU) register */ #define BGE_CPMU_CTRL_LINK_IDLE_MODE 0x00000200 @@ -1328,6 +1330,9 @@ /* CPMU GPHY Strap register */ #define BGE_CPMU_PHY_STRAP_IS_SERDES 0x00000020 +/* CPMU Padring Control register */ +#define BGE_CPMU_PADRNG_CTL_RDIV2 0x00040000 + /* * Mbuf Cluster Free registers (has nothing to do with BSD mbufs) */ From owner-svn-src-stable@FreeBSD.ORG Thu Dec 5 07:27:49 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 328C32E8; Thu, 5 Dec 2013 07:27:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0421B138B; Thu, 5 Dec 2013 07:27:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB57RmPq005185; Thu, 5 Dec 2013 07:27:48 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB57Rmew005183; Thu, 5 Dec 2013 07:27:48 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201312050727.rB57Rmew005183@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 5 Dec 2013 07:27:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258964 - stable/9/sys/dev/mii X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 07:27:49 -0000 Author: yongari Date: Thu Dec 5 07:27:48 2013 New Revision: 258964 URL: http://svnweb.freebsd.org/changeset/base/258964 Log: MFC r253481: Recognize BCM5725C PHY. Modified: stable/9/sys/dev/mii/brgphy.c stable/9/sys/dev/mii/miidevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/mii/brgphy.c ============================================================================== --- stable/9/sys/dev/mii/brgphy.c Thu Dec 5 07:20:03 2013 (r258963) +++ stable/9/sys/dev/mii/brgphy.c Thu Dec 5 07:27:48 2013 (r258964) @@ -147,6 +147,7 @@ static const struct mii_phydesc brgphys[ MII_PHY_DESC(BROADCOM3, BCM5720C), MII_PHY_DESC(BROADCOM3, BCM57765), MII_PHY_DESC(BROADCOM3, BCM57780), + MII_PHY_DESC(BROADCOM4, BCM5725C), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5906), MII_PHY_END }; @@ -932,6 +933,8 @@ brgphy_reset(struct mii_softc *sc) return; } break; + case MII_OUI_BROADCOM4: + return; } ifp = sc->mii_pdata->mii_ifp; Modified: stable/9/sys/dev/mii/miidevs ============================================================================== --- stable/9/sys/dev/mii/miidevs Thu Dec 5 07:20:03 2013 (r258963) +++ stable/9/sys/dev/mii/miidevs Thu Dec 5 07:27:48 2013 (r258964) @@ -52,6 +52,7 @@ oui AMD 0x00001a Advanced Micro Devic oui BROADCOM 0x001018 Broadcom Corporation oui BROADCOM2 0x000af7 Broadcom Corporation oui BROADCOM3 0x001be9 Broadcom Corporation +oui BROADCOM4 0x18c086 Broadcom Corporation oui CICADA 0x0003F1 Cicada Semiconductor oui DAVICOM 0x00606e Davicom Semiconductor oui ENABLESEMI 0x0010dd Enable Semiconductor @@ -184,6 +185,7 @@ model BROADCOM3 BCM5717C 0x0020 BCM5717C model BROADCOM3 BCM5719C 0x0022 BCM5719C 1000BASE-T media interface model BROADCOM3 BCM57765 0x0024 BCM57765 1000BASE-T media interface model BROADCOM3 BCM5720C 0x0036 BCM5720C 1000BASE-T media interface +model BROADCOM4 BCM5725C 0x0038 BCM5725C 1000BASE-T media interface model xxBROADCOM_ALT1 BCM5906 0x0004 BCM5906 10/100baseTX media interface /* Cicada Semiconductor PHYs (now owned by Vitesse?) */ From owner-svn-src-stable@FreeBSD.ORG Thu Dec 5 07:29:25 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED5D8438; Thu, 5 Dec 2013 07:29:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D85B31398; Thu, 5 Dec 2013 07:29:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB57TPcU005421; Thu, 5 Dec 2013 07:29:25 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB57TP48005419; Thu, 5 Dec 2013 07:29:25 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201312050729.rB57TP48005419@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 5 Dec 2013 07:29:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258965 - stable/9/sys/dev/bge X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 07:29:26 -0000 Author: yongari Date: Thu Dec 5 07:29:25 2013 New Revision: 258965 URL: http://svnweb.freebsd.org/changeset/base/258965 Log: MFC r253483: Add support for upcoming BCM5725 (ASIC 5762) controller. This is a new 1Gb server controller chip that will be going into production soon. BCM5725 combines MAC with triple-speed PHY, a Network Controller Sideband Interface (NC-SI) and on-chip memory buffer in a single device. BCM5725 has an Application Processing Engine (APE) that is capable of on-chip management and offloading features. BCM5725 supports high-precision clock, time stamp registers for receive/transmit packets and programmable trigger inputs and watchdog timeouts. These new features are not yet supported by bge(4). Many thanks to Broadcom for continuing to support FreeBSD! Modified: stable/9/sys/dev/bge/if_bge.c stable/9/sys/dev/bge/if_bgereg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bge/if_bge.c ============================================================================== --- stable/9/sys/dev/bge/if_bge.c Thu Dec 5 07:27:48 2013 (r258964) +++ stable/9/sys/dev/bge/if_bge.c Thu Dec 5 07:29:25 2013 (r258965) @@ -176,6 +176,8 @@ static const struct bge_type { { BCOM_VENDORID, BCOM_DEVICEID_BCM5721 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5722 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5723 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM5725 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM5727 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5750 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5750M }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5751 }, @@ -195,6 +197,7 @@ static const struct bge_type { { BCOM_VENDORID, BCOM_DEVICEID_BCM5761E }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5761S }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5761SE }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM5762 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5764 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5780 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5780S }, @@ -310,6 +313,7 @@ static const struct bge_revision { { BGE_CHIPID_BCM5722_A0, "BCM5722 A0" }, { BGE_CHIPID_BCM5761_A0, "BCM5761 A0" }, { BGE_CHIPID_BCM5761_A1, "BCM5761 A1" }, + { BGE_CHIPID_BCM5762_A0, "BCM5762 A0" }, { BGE_CHIPID_BCM5784_A0, "BCM5784 A0" }, { BGE_CHIPID_BCM5784_A1, "BCM5784 A1" }, /* 5754 and 5787 share the same ASIC ID */ @@ -354,6 +358,7 @@ static const struct bge_revision bge_maj { BGE_ASICREV_BCM5717, "unknown BCM5717" }, { BGE_ASICREV_BCM5719, "unknown BCM5719" }, { BGE_ASICREV_BCM5720, "unknown BCM5720" }, + { BGE_ASICREV_BCM5762, "unknown BCM5762" }, { 0, NULL } }; @@ -1885,8 +1890,9 @@ bge_chipinit(struct bge_softc *sc) * a status tag update and leave interrupts permanently * disabled. */ - if (sc->bge_asicrev != BGE_ASICREV_BCM5717 && - sc->bge_asicrev != BGE_ASICREV_BCM57765) + if (!BGE_IS_57765_PLUS(sc) && + sc->bge_asicrev != BGE_ASICREV_BCM5717 && + sc->bge_asicrev != BGE_ASICREV_BCM5762) dma_rw_ctl |= BGE_PCIDMARWCTL_TAGGED_STATUS_WA; } pci_write_config(sc->bge_dev, BGE_PCI_DMA_RW_CTL, dma_rw_ctl, 4); @@ -1895,7 +1901,8 @@ bge_chipinit(struct bge_softc *sc) * Set up general mode register. */ mode_ctl = bge_dma_swap_options(sc); - if (sc->bge_asicrev == BGE_ASICREV_BCM5720) { + if (sc->bge_asicrev == BGE_ASICREV_BCM5720 || + sc->bge_asicrev == BGE_ASICREV_BCM5762) { /* Retain Host-2-BMC settings written by APE firmware. */ mode_ctl |= CSR_READ_4(sc, BGE_MODE_CTL) & (BGE_MODECTL_BYTESWAP_B2HRX_DATA | @@ -1953,7 +1960,7 @@ bge_blockinit(struct bge_softc *sc) struct bge_rcb *rcb; bus_size_t vrcb; bge_hostaddr taddr; - uint32_t dmactl, val; + uint32_t dmactl, rdmareg, val; int i, limit; /* @@ -2224,6 +2231,11 @@ bge_blockinit(struct bge_softc *sc) if (!BGE_IS_5705_PLUS(sc)) /* 5700 to 5704 had 16 send rings. */ limit = BGE_TX_RINGS_EXTSSRAM_MAX; + else if (BGE_IS_57765_PLUS(sc) || + sc->bge_asicrev == BGE_ASICREV_BCM5762) + limit = 2; + else if (BGE_IS_5717_PLUS(sc)) + limit = 4; else limit = 1; vrcb = BGE_MEMWIN_START + BGE_SEND_RING_RCB; @@ -2262,6 +2274,7 @@ bge_blockinit(struct bge_softc *sc) } else if (!BGE_IS_5705_PLUS(sc)) limit = BGE_RX_RINGS_MAX; else if (sc->bge_asicrev == BGE_ASICREV_BCM5755 || + sc->bge_asicrev == BGE_ASICREV_BCM5762 || BGE_IS_57765_PLUS(sc)) limit = 4; else @@ -2301,7 +2314,8 @@ bge_blockinit(struct bge_softc *sc) /* Set inter-packet gap */ val = 0x2620; - if (sc->bge_asicrev == BGE_ASICREV_BCM5720) + if (sc->bge_asicrev == BGE_ASICREV_BCM5720 || + sc->bge_asicrev == BGE_ASICREV_BCM5762) val |= CSR_READ_4(sc, BGE_TX_LENGTHS) & (BGE_TXLEN_JMB_FRM_LEN_MSK | BGE_TXLEN_CNT_DN_VAL_MSK); CSR_WRITE_4(sc, BGE_TX_LENGTHS, val); @@ -2465,7 +2479,8 @@ bge_blockinit(struct bge_softc *sc) val |= BGE_RDMAMODE_TSO6_ENABLE; } - if (sc->bge_asicrev == BGE_ASICREV_BCM5720) { + if (sc->bge_asicrev == BGE_ASICREV_BCM5720 || + sc->bge_asicrev == BGE_ASICREV_BCM5762) { val |= CSR_READ_4(sc, BGE_RDMA_MODE) & BGE_RDMAMODE_H2BNC_VLAN_DET; /* @@ -2479,14 +2494,18 @@ bge_blockinit(struct bge_softc *sc) sc->bge_asicrev == BGE_ASICREV_BCM5784 || sc->bge_asicrev == BGE_ASICREV_BCM5785 || sc->bge_asicrev == BGE_ASICREV_BCM57780 || - BGE_IS_5717_PLUS(sc)) { - dmactl = CSR_READ_4(sc, BGE_RDMA_RSRVCTRL); + BGE_IS_5717_PLUS(sc) || BGE_IS_57765_PLUS(sc)) { + if (sc->bge_asicrev == BGE_ASICREV_BCM5762) + rdmareg = BGE_RDMA_RSRVCTRL_REG2; + else + rdmareg = BGE_RDMA_RSRVCTRL; + dmactl = CSR_READ_4(sc, rdmareg); /* * Adjust tx margin to prevent TX data corruption and * fix internal FIFO overflow. */ - if (sc->bge_asicrev == BGE_ASICREV_BCM5719 && - sc->bge_chipid == BGE_CHIPID_BCM5719_A0) { + if (sc->bge_chipid == BGE_CHIPID_BCM5719_A0 || + sc->bge_asicrev == BGE_ASICREV_BCM5762) { dmactl &= ~(BGE_RDMA_RSRVCTRL_FIFO_LWM_MASK | BGE_RDMA_RSRVCTRL_FIFO_HWM_MASK | BGE_RDMA_RSRVCTRL_TXMRGN_MASK); @@ -2499,7 +2518,7 @@ bge_blockinit(struct bge_softc *sc) * The fix is to limit the number of RX BDs * the hardware would fetch at a fime. */ - CSR_WRITE_4(sc, BGE_RDMA_RSRVCTRL, dmactl | + CSR_WRITE_4(sc, rdmareg, dmactl | BGE_RDMA_RSRVCTRL_FIFO_OFLW_FIX); } @@ -2517,6 +2536,11 @@ bge_blockinit(struct bge_softc *sc) CSR_READ_4(sc, BGE_RDMA_LSO_CRPTEN_CTRL) | BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_BD_512 | BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_LSO_4K); + } else if (sc->bge_asicrev == BGE_ASICREV_BCM5762) { + CSR_WRITE_4(sc, BGE_RDMA_LSO_CRPTEN_CTRL_REG2, + CSR_READ_4(sc, BGE_RDMA_LSO_CRPTEN_CTRL_REG2) | + BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_BD_4K | + BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_LSO_4K); } CSR_WRITE_4(sc, BGE_RDMA_MODE, val); @@ -2666,6 +2690,9 @@ bge_chipid(device_t dev) case BCOM_DEVICEID_BCM5718: case BCOM_DEVICEID_BCM5719: case BCOM_DEVICEID_BCM5720: + case BCOM_DEVICEID_BCM5725: + case BCOM_DEVICEID_BCM5727: + case BCOM_DEVICEID_BCM5762: id = pci_read_config(dev, BGE_PCI_GEN2_PRODID_ASICREV, 4); break; @@ -3366,6 +3393,7 @@ bge_attach(device_t dev) /* Save chipset family. */ switch (sc->bge_asicrev) { + case BGE_ASICREV_BCM5762: case BGE_ASICREV_BCM57765: case BGE_ASICREV_BCM57766: sc->bge_flags |= BGE_FLAG_57765_PLUS; @@ -3426,6 +3454,7 @@ bge_attach(device_t dev) case BGE_ASICREV_BCM5719: case BGE_ASICREV_BCM5720: case BGE_ASICREV_BCM5761: + case BGE_ASICREV_BCM5762: sc->bge_flags |= BGE_FLAG_APE; break; } @@ -5490,7 +5519,8 @@ bge_init_locked(struct bge_softc *sc) mode = CSR_READ_4(sc, BGE_TX_MODE); if (BGE_IS_5755_PLUS(sc) || sc->bge_asicrev == BGE_ASICREV_BCM5906) mode |= BGE_TXMODE_MBUF_LOCKUP_FIX; - if (sc->bge_asicrev == BGE_ASICREV_BCM5720) { + if (sc->bge_asicrev == BGE_ASICREV_BCM5720 || + sc->bge_asicrev == BGE_ASICREV_BCM5762) { mode &= ~(BGE_TXMODE_JMB_FRM_LEN | BGE_TXMODE_CNT_DN_MODE); mode |= CSR_READ_4(sc, BGE_TX_MODE) & (BGE_TXMODE_JMB_FRM_LEN | BGE_TXMODE_CNT_DN_MODE); Modified: stable/9/sys/dev/bge/if_bgereg.h ============================================================================== --- stable/9/sys/dev/bge/if_bgereg.h Thu Dec 5 07:27:48 2013 (r258964) +++ stable/9/sys/dev/bge/if_bgereg.h Thu Dec 5 07:29:25 2013 (r258965) @@ -331,6 +331,7 @@ #define BGE_CHIPID_BCM5717_B0 0x05717100 #define BGE_CHIPID_BCM5719_A0 0x05719000 #define BGE_CHIPID_BCM5720_A0 0x05720000 +#define BGE_CHIPID_BCM5762_A0 0x05762000 #define BGE_CHIPID_BCM57765_A0 0x57785000 #define BGE_CHIPID_BCM57765_B0 0x57785100 @@ -357,6 +358,7 @@ #define BGE_ASICREV_BCM5719 0x5719 #define BGE_ASICREV_BCM5720 0x5720 #define BGE_ASICREV_BCM5761 0x5761 +#define BGE_ASICREV_BCM5762 0x5762 #define BGE_ASICREV_BCM5784 0x5784 #define BGE_ASICREV_BCM5785 0x5785 #define BGE_ASICREV_BCM57765 0x57785 @@ -1544,6 +1546,8 @@ */ #define BGE_RDMA_MODE 0x4800 #define BGE_RDMA_STATUS 0x4804 +#define BGE_RDMA_RSRVCTRL_REG2 0x4890 +#define BGE_RDMA_LSO_CRPTEN_CTRL_REG2 0x48A0 #define BGE_RDMA_RSRVCTRL 0x4900 #define BGE_RDMA_LSO_CRPTEN_CTRL 0x4910 @@ -2454,6 +2458,8 @@ struct bge_status_block { #define BCOM_DEVICEID_BCM5721 0x1659 #define BCOM_DEVICEID_BCM5722 0x165A #define BCOM_DEVICEID_BCM5723 0x165B +#define BCOM_DEVICEID_BCM5725 0x1643 +#define BCOM_DEVICEID_BCM5727 0x16F3 #define BCOM_DEVICEID_BCM5750 0x1676 #define BCOM_DEVICEID_BCM5750M 0x167C #define BCOM_DEVICEID_BCM5751 0x1677 @@ -2473,6 +2479,7 @@ struct bge_status_block { #define BCOM_DEVICEID_BCM5761E 0x1680 #define BCOM_DEVICEID_BCM5761S 0x1688 #define BCOM_DEVICEID_BCM5761SE 0x1689 +#define BCOM_DEVICEID_BCM5762 0x1687 #define BCOM_DEVICEID_BCM5764 0x1684 #define BCOM_DEVICEID_BCM5780 0x166A #define BCOM_DEVICEID_BCM5780S 0x166B From owner-svn-src-stable@FreeBSD.ORG Thu Dec 5 07:31:02 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9AF2B581; Thu, 5 Dec 2013 07:31:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6D28E13D0; Thu, 5 Dec 2013 07:31:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB57V2d7007809; Thu, 5 Dec 2013 07:31:02 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB57V2i6007808; Thu, 5 Dec 2013 07:31:02 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201312050731.rB57V2i6007808@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 5 Dec 2013 07:31:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258966 - stable/9/sys/dev/bge X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 07:31:02 -0000 Author: yongari Date: Thu Dec 5 07:31:01 2013 New Revision: 258966 URL: http://svnweb.freebsd.org/changeset/base/258966 Log: MFC r253540: 5725 family of devices corrupts TSO packets when TSO DMA buffers cross into regions which are within MSS bytes of a 4GB boundary. If we encounter the condition, drop the packet. Modified: stable/9/sys/dev/bge/if_bge.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bge/if_bge.c ============================================================================== --- stable/9/sys/dev/bge/if_bge.c Thu Dec 5 07:29:25 2013 (r258965) +++ stable/9/sys/dev/bge/if_bge.c Thu Dec 5 07:31:01 2013 (r258966) @@ -5282,17 +5282,51 @@ bge_encap(struct bge_softc *sc, struct m csum_flags |= BGE_TXBDFLAG_VLAN_TAG; vlan_tag = m->m_pkthdr.ether_vtag; } - for (i = 0; ; i++) { - d = &sc->bge_ldata.bge_tx_ring[idx]; - d->bge_addr.bge_addr_lo = BGE_ADDR_LO(segs[i].ds_addr); - d->bge_addr.bge_addr_hi = BGE_ADDR_HI(segs[i].ds_addr); - d->bge_len = segs[i].ds_len; - d->bge_flags = csum_flags; - d->bge_vlan_tag = vlan_tag; - d->bge_mss = mss; - if (i == nsegs - 1) - break; - BGE_INC(idx, BGE_TX_RING_CNT); + + if (sc->bge_asicrev == BGE_ASICREV_BCM5762 && + (m->m_pkthdr.csum_flags & CSUM_TSO) != 0) { + /* + * 5725 family of devices corrupts TSO packets when TSO DMA + * buffers cross into regions which are within MSS bytes of + * a 4GB boundary. If we encounter the condition, drop the + * packet. + */ + for (i = 0; ; i++) { + d = &sc->bge_ldata.bge_tx_ring[idx]; + d->bge_addr.bge_addr_lo = BGE_ADDR_LO(segs[i].ds_addr); + d->bge_addr.bge_addr_hi = BGE_ADDR_HI(segs[i].ds_addr); + d->bge_len = segs[i].ds_len; + if (d->bge_addr.bge_addr_lo + segs[i].ds_len + mss < + d->bge_addr.bge_addr_lo) + break; + d->bge_flags = csum_flags; + d->bge_vlan_tag = vlan_tag; + d->bge_mss = mss; + if (i == nsegs - 1) + break; + BGE_INC(idx, BGE_TX_RING_CNT); + } + if (i != nsegs - 1) { + bus_dmamap_sync(sc->bge_cdata.bge_tx_mtag, map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(sc->bge_cdata.bge_tx_mtag, map); + m_freem(*m_head); + *m_head = NULL; + return (EIO); + } + } else { + for (i = 0; ; i++) { + d = &sc->bge_ldata.bge_tx_ring[idx]; + d->bge_addr.bge_addr_lo = BGE_ADDR_LO(segs[i].ds_addr); + d->bge_addr.bge_addr_hi = BGE_ADDR_HI(segs[i].ds_addr); + d->bge_len = segs[i].ds_len; + d->bge_flags = csum_flags; + d->bge_vlan_tag = vlan_tag; + d->bge_mss = mss; + if (i == nsegs - 1) + break; + BGE_INC(idx, BGE_TX_RING_CNT); + } } /* Mark the last segment as end of packet... */ From owner-svn-src-stable@FreeBSD.ORG Thu Dec 5 07:32:55 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E4DB56FF; Thu, 5 Dec 2013 07:32:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C4C6613E6; Thu, 5 Dec 2013 07:32:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB57WsZY008067; Thu, 5 Dec 2013 07:32:54 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB57WsFF008065; Thu, 5 Dec 2013 07:32:54 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201312050732.rB57WsFF008065@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 5 Dec 2013 07:32:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258967 - stable/9/sys/dev/bge X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 07:32:55 -0000 Author: yongari Date: Thu Dec 5 07:32:54 2013 New Revision: 258967 URL: http://svnweb.freebsd.org/changeset/base/258967 Log: MFC r258830: Add support for BCM57764, BCM57767, BCM57782, BCM57786 and BCM57787. PR: 184304 Modified: stable/9/sys/dev/bge/if_bge.c stable/9/sys/dev/bge/if_bgereg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bge/if_bge.c ============================================================================== --- stable/9/sys/dev/bge/if_bge.c Thu Dec 5 07:31:01 2013 (r258966) +++ stable/9/sys/dev/bge/if_bge.c Thu Dec 5 07:32:54 2013 (r258967) @@ -220,11 +220,16 @@ static const struct bge_type { { BCOM_VENDORID, BCOM_DEVICEID_BCM57760 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57761 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57762 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57764 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57765 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57766 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57767 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57780 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57781 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57782 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57785 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57786 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57787 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57788 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57790 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57791 }, @@ -2693,6 +2698,9 @@ bge_chipid(device_t dev) case BCOM_DEVICEID_BCM5725: case BCOM_DEVICEID_BCM5727: case BCOM_DEVICEID_BCM5762: + case BCOM_DEVICEID_BCM57764: + case BCOM_DEVICEID_BCM57767: + case BCOM_DEVICEID_BCM57787: id = pci_read_config(dev, BGE_PCI_GEN2_PRODID_ASICREV, 4); break; @@ -2701,7 +2709,9 @@ bge_chipid(device_t dev) case BCOM_DEVICEID_BCM57765: case BCOM_DEVICEID_BCM57766: case BCOM_DEVICEID_BCM57781: + case BCOM_DEVICEID_BCM57782: case BCOM_DEVICEID_BCM57785: + case BCOM_DEVICEID_BCM57786: case BCOM_DEVICEID_BCM57791: case BCOM_DEVICEID_BCM57795: id = pci_read_config(dev, Modified: stable/9/sys/dev/bge/if_bgereg.h ============================================================================== --- stable/9/sys/dev/bge/if_bgereg.h Thu Dec 5 07:31:01 2013 (r258966) +++ stable/9/sys/dev/bge/if_bgereg.h Thu Dec 5 07:32:54 2013 (r258967) @@ -2502,11 +2502,16 @@ struct bge_status_block { #define BCOM_DEVICEID_BCM57760 0x1690 #define BCOM_DEVICEID_BCM57761 0x16B0 #define BCOM_DEVICEID_BCM57762 0x1682 +#define BCOM_DEVICEID_BCM57764 0x1642 #define BCOM_DEVICEID_BCM57765 0x16B4 #define BCOM_DEVICEID_BCM57766 0x1686 +#define BCOM_DEVICEID_BCM57767 0x1683 #define BCOM_DEVICEID_BCM57780 0x1692 #define BCOM_DEVICEID_BCM57781 0x16B1 +#define BCOM_DEVICEID_BCM57782 0x16B7 #define BCOM_DEVICEID_BCM57785 0x16B5 +#define BCOM_DEVICEID_BCM57786 0x16B3 +#define BCOM_DEVICEID_BCM57787 0x1641 #define BCOM_DEVICEID_BCM57788 0x1691 #define BCOM_DEVICEID_BCM57790 0x1694 #define BCOM_DEVICEID_BCM57791 0x16B2 From owner-svn-src-stable@FreeBSD.ORG Thu Dec 5 16:14:57 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D219E42; Thu, 5 Dec 2013 16:14:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 28E3417DF; Thu, 5 Dec 2013 16:14:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5GEvsB086408; Thu, 5 Dec 2013 16:14:57 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5GEvQv086406; Thu, 5 Dec 2013 16:14:57 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201312051614.rB5GEvQv086406@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 5 Dec 2013 16:14:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258989 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 16:14:57 -0000 Author: trasz Date: Thu Dec 5 16:14:56 2013 New Revision: 258989 URL: http://svnweb.freebsd.org/changeset/base/258989 Log: MFC r258841: Fix typos. Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/ctld/parse.y Directory Properties: stable/10/usr.sbin/ctld/ (props changed) Modified: stable/10/usr.sbin/ctld/parse.y ============================================================================== --- stable/10/usr.sbin/ctld/parse.y Thu Dec 5 15:28:27 2013 (r258988) +++ stable/10/usr.sbin/ctld/parse.y Thu Dec 5 16:14:56 2013 (r258989) @@ -300,7 +300,7 @@ auth_group_statement: AUTH_GROUP STR log_warnx("auth-group for target \"%s\" " "specified more than once", target->t_iqn); else - log_warnx("cannot mix auth-grup with explicit " + log_warnx("cannot mix auth-group with explicit " "authorisations for target \"%s\"", target->t_iqn); return (1); @@ -321,7 +321,7 @@ chap_statement: CHAP STR STR if (target->t_auth_group != NULL) { if (target->t_auth_group->ag_name != NULL) { - log_warnx("cannot mix auth-grup with explicit " + log_warnx("cannot mix auth-group with explicit " "authorisations for target \"%s\"", target->t_iqn); free($2); @@ -351,7 +351,7 @@ chap_mutual_statement: CHAP_MUTUAL STR S if (target->t_auth_group != NULL) { if (target->t_auth_group->ag_name != NULL) { - log_warnx("cannot mix auth-grup with explicit " + log_warnx("cannot mix auth-group with explicit " "authorisations for target \"%s\"", target->t_iqn); free($2); From owner-svn-src-stable@FreeBSD.ORG Thu Dec 5 16:29:23 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89D6F247; Thu, 5 Dec 2013 16:29:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7578018C7; Thu, 5 Dec 2013 16:29:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5GTNIx019726; Thu, 5 Dec 2013 16:29:23 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5GTNlg019723; Thu, 5 Dec 2013 16:29:23 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201312051629.rB5GTNlg019723@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 5 Dec 2013 16:29:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258990 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 16:29:23 -0000 Author: trasz Date: Thu Dec 5 16:29:22 2013 New Revision: 258990 URL: http://svnweb.freebsd.org/changeset/base/258990 Log: MFC r258842: Grammar fix. Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/ctld/ctl.conf.5 Directory Properties: stable/10/usr.sbin/ctld/ (props changed) Modified: stable/10/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- stable/10/usr.sbin/ctld/ctl.conf.5 Thu Dec 5 16:14:56 2013 (r258989) +++ stable/10/usr.sbin/ctld/ctl.conf.5 Thu Dec 5 16:29:22 2013 (r258990) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 10, 2013 +.Dd December 2, 2013 .Dt CTL.CONF 5 .Os .Sh NAME @@ -141,7 +141,7 @@ Note that targets must use either auth-g or chap-mutual clauses; it's a configuration error to mix them in one target. .It Ic chap-mutual Ao Ar user Ac Ao Ar secret Ac Ao Ar mutualuser Ac Aq Ar mutualsecret Specifies mutual CHAP authentication credentials. -Note that targets must use either auth-group, chap, +Note that targets must use either auth-group, chap, or chap-mutual clauses; it's a configuration error to mix them in one target. .It Ic portal-group Aq Ar name Assigns previously defined portal group to that target. From owner-svn-src-stable@FreeBSD.ORG Thu Dec 5 17:57:52 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4EA3FA70; Thu, 5 Dec 2013 17:57:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3A2B91FC6; Thu, 5 Dec 2013 17:57:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5HvqF2018544; Thu, 5 Dec 2013 17:57:52 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5Hvqu2018543; Thu, 5 Dec 2013 17:57:52 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201312051757.rB5Hvqu2018543@svn.freebsd.org> From: Sean Bruno Date: Thu, 5 Dec 2013 17:57:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258994 - stable/10/sys/x86/cpufreq X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 17:57:52 -0000 Author: sbruno Date: Thu Dec 5 17:57:51 2013 New Revision: 258994 URL: http://svnweb.freebsd.org/changeset/base/258994 Log: MFC r257769 to stable/10 Fix powerd/states on AMD cpus. Resolves issues with system reporting: hwpstate0: set freq failed, err 6 Tested on FX-8150 and others. PR: kern/167018 Submitted by: avg@ Approved by: re (gjb) Modified: stable/10/sys/x86/cpufreq/hwpstate.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/x86/cpufreq/hwpstate.c ============================================================================== --- stable/10/sys/x86/cpufreq/hwpstate.c Thu Dec 5 17:50:18 2013 (r258993) +++ stable/10/sys/x86/cpufreq/hwpstate.c Thu Dec 5 17:57:51 2013 (r258994) @@ -184,16 +184,21 @@ hwpstate_goto_pstate(device_t dev, int p id, PCPU_GET(cpuid)); /* Go To Px-state */ wrmsr(MSR_AMD_10H_11H_CONTROL, id); + } + CPU_FOREACH(i) { + /* Bind to each cpu. */ + thread_lock(curthread); + sched_bind(curthread, i); + thread_unlock(curthread); /* wait loop (100*100 usec is enough ?) */ for(j = 0; j < 100; j++){ + /* get the result. not assure msr=id */ msr = rdmsr(MSR_AMD_10H_11H_STATUS); if(msr == id){ break; } DELAY(100); } - /* get the result. not assure msr=id */ - msr = rdmsr(MSR_AMD_10H_11H_STATUS); HWPSTATE_DEBUG(dev, "result P%d-state on cpu%d\n", (int)msr, PCPU_GET(cpuid)); if (msr != id) { From owner-svn-src-stable@FreeBSD.ORG Thu Dec 5 18:06:13 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BD9CE06; Thu, 5 Dec 2013 18:06:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0E14B1064; Thu, 5 Dec 2013 18:06:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5I6Cqd039087; Thu, 5 Dec 2013 18:06:12 GMT (envelope-from royger@svn.freebsd.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5I6C8E039086; Thu, 5 Dec 2013 18:06:12 GMT (envelope-from royger@svn.freebsd.org) Message-Id: <201312051806.rB5I6C8E039086@svn.freebsd.org> From: Roger Pau Monné Date: Thu, 5 Dec 2013 18:06:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258995 - stable/10/sys/dev/xen/control X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 18:06:13 -0000 Author: royger Date: Thu Dec 5 18:06:12 2013 New Revision: 258995 URL: http://svnweb.freebsd.org/changeset/base/258995 Log: MFC 257876: On XenServer the "halt" message is used instead of "poweroff", which makes FreeBSD halt but not poweroff (as expected when issuing a shutdown from the VM manager). Fix this by using the same handler for both "halt" and "poweroff". NB: The "halt" signal seems to be used on XenServer only. The OSS Xen toolstack (xl) uses "poweroff" instead. Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D Reviewed by: gibbs Approved by: gibbs (mentor) Approved by: re (gjb) Modified: stable/10/sys/dev/xen/control/control.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/dev/xen/control/control.c ============================================================================== --- stable/10/sys/dev/xen/control/control.c Thu Dec 5 17:57:51 2013 (r258994) +++ stable/10/sys/dev/xen/control/control.c Thu Dec 5 18:06:12 2013 (r258995) @@ -158,7 +158,6 @@ static xctrl_shutdown_handler_t xctrl_po static xctrl_shutdown_handler_t xctrl_reboot; static xctrl_shutdown_handler_t xctrl_suspend; static xctrl_shutdown_handler_t xctrl_crash; -static xctrl_shutdown_handler_t xctrl_halt; /*-------------------------- Private Data Structures -------------------------*/ /** Element type for lookup table of event name to handler. */ @@ -173,7 +172,7 @@ static const struct xctrl_shutdown_reaso { "reboot", xctrl_reboot }, { "suspend", xctrl_suspend }, { "crash", xctrl_crash }, - { "halt", xctrl_halt }, + { "halt", xctrl_poweroff }, }; struct xctrl_softc { @@ -441,12 +440,6 @@ xctrl_crash() panic("Xen directed crash"); } -static void -xctrl_halt() -{ - shutdown_nice(RB_HALT); -} - /*------------------------------ Event Reception -----------------------------*/ static void xctrl_on_watch_event(struct xs_watch *watch, const char **vec, unsigned int len) From owner-svn-src-stable@FreeBSD.ORG Thu Dec 5 18:08:06 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 69963FD6; Thu, 5 Dec 2013 18:08:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3C6901079; Thu, 5 Dec 2013 18:08:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5I86fE043442; Thu, 5 Dec 2013 18:08:06 GMT (envelope-from royger@svn.freebsd.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5I85vv043432; Thu, 5 Dec 2013 18:08:05 GMT (envelope-from royger@svn.freebsd.org) Message-Id: <201312051808.rB5I85vv043432@svn.freebsd.org> From: Roger Pau Monné Date: Thu, 5 Dec 2013 18:08:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258996 - in stable/10/sys: amd64/amd64 i386/i386 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 18:08:06 -0000 Author: royger Date: Thu Dec 5 18:08:05 2013 New Revision: 258996 URL: http://svnweb.freebsd.org/changeset/base/258996 Log: MFC 258176: Fix accounting for hw.realmem on the i386 and amd64 platforms. sys/i386/i386/machdep.c: sys/amd64/amd64/machdep.c: The value reported by FreeBSD as "real memory" when booting doesn't match what is later reported by sysctl as hw.realmem. This is due to the fact that the value printed during the boot process is fetched from smbios data (when possible), and accounts for holes in physical memory. On the other hand, the value of hw.realmem is unconditionally set to be one larger than the highest page of the physical address space. Fix this by setting hw.realmem to the same value printed during boot, this makes hw.realmem honour it's name and account properly for physical memory present in the system. Submitted by: Roger Pau Monné Reviewed by: gibbs Approved by: gibbs (mentor) Approved by: re (gjb) Modified: stable/10/sys/amd64/amd64/machdep.c stable/10/sys/i386/i386/machdep.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/amd64/amd64/machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/machdep.c Thu Dec 5 18:06:12 2013 (r258995) +++ stable/10/sys/amd64/amd64/machdep.c Thu Dec 5 18:08:05 2013 (r258996) @@ -256,7 +256,6 @@ cpu_startup(dummy) #ifdef PERFMON perfmon_init(); #endif - realmem = Maxmem; /* * Display physical memory if SMBIOS reports reasonable amount. @@ -270,6 +269,7 @@ cpu_startup(dummy) if (memsize < ptoa((uintmax_t)cnt.v_free_count)) memsize = ptoa((uintmax_t)Maxmem); printf("real memory = %ju (%ju MB)\n", memsize, memsize >> 20); + realmem = atop(memsize); /* * Display any holes after the first chunk of extended memory. Modified: stable/10/sys/i386/i386/machdep.c ============================================================================== --- stable/10/sys/i386/i386/machdep.c Thu Dec 5 18:06:12 2013 (r258995) +++ stable/10/sys/i386/i386/machdep.c Thu Dec 5 18:08:05 2013 (r258996) @@ -294,7 +294,6 @@ cpu_startup(dummy) #ifdef PERFMON perfmon_init(); #endif - realmem = Maxmem; /* * Display physical memory if SMBIOS reports reasonable amount. @@ -308,6 +307,7 @@ cpu_startup(dummy) if (memsize < ptoa((uintmax_t)cnt.v_free_count)) memsize = ptoa((uintmax_t)Maxmem); printf("real memory = %ju (%ju MB)\n", memsize, memsize >> 20); + realmem = atop(memsize); /* * Display any holes after the first chunk of extended memory. From owner-svn-src-stable@FreeBSD.ORG Thu Dec 5 18:09:48 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D00121BA; Thu, 5 Dec 2013 18:09:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BB41E1086; Thu, 5 Dec 2013 18:09:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5I9mMN047316; Thu, 5 Dec 2013 18:09:48 GMT (envelope-from royger@svn.freebsd.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5I9mNU047314; Thu, 5 Dec 2013 18:09:48 GMT (envelope-from royger@svn.freebsd.org) Message-Id: <201312051809.rB5I9mNU047314@svn.freebsd.org> From: Roger Pau Monné Date: Thu, 5 Dec 2013 18:09:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258997 - stable/10/sys/dev/xen/balloon X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 18:09:49 -0000 Author: royger Date: Thu Dec 5 18:09:48 2013 New Revision: 258997 URL: http://svnweb.freebsd.org/changeset/base/258997 Log: MFC 258178: Improve robustness of the Xen balloon driver. sys/dev/xen/balloon/balloon.c: Remove unused and commented out code. Fix deadlock caused by performing a sleepable malloc while holding the balloon mutex. Perform proper accounting of the memory used by the domain. Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D Reviewed by: gibbs Approved by: gibbs (mentor) Approved by: re (gjb) Modified: stable/10/sys/dev/xen/balloon/balloon.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/dev/xen/balloon/balloon.c ============================================================================== --- stable/10/sys/dev/xen/balloon/balloon.c Thu Dec 5 18:08:05 2013 (r258996) +++ stable/10/sys/dev/xen/balloon/balloon.c Thu Dec 5 18:09:48 2013 (r258997) @@ -52,18 +52,13 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_BALLOON, "Balloon", "Xen Balloon Driver"); -struct mtx balloon_mutex; +/* Convert from KB (as fetched from xenstore) to number of PAGES */ +#define KB_TO_PAGE_SHIFT (PAGE_SHIFT - 10) -/* - * Protects atomic reservation decrease/increase against concurrent increases. - * Also protects non-atomic updates of current_pages and driver_pages, and - * balloon lists. - */ -struct mtx balloon_lock; +struct mtx balloon_mutex; /* We increase/decrease in batches which fit in a page */ static unsigned long frame_list[PAGE_SIZE / sizeof(unsigned long)]; -#define ARRAY_SIZE(A) (sizeof(A) / sizeof(A[0])) struct balloon_stats { /* We aim for 'current allocation' == 'target allocation'. */ @@ -116,15 +111,21 @@ static void balloon_process(void *unused printk(KERN_WARNING "xen_mem: " fmt, ##args) /* balloon_append: add the given page to the balloon. */ -static void +static int balloon_append(vm_page_t page) { struct balloon_entry *entry; - entry = malloc(sizeof(struct balloon_entry), M_BALLOON, M_WAITOK); + mtx_assert(&balloon_mutex, MA_OWNED); + + entry = malloc(sizeof(struct balloon_entry), M_BALLOON, M_NOWAIT); + if (!entry) + return (ENOMEM); entry->page = page; STAILQ_INSERT_HEAD(&ballooned_pages, entry, list); bs.balloon_low++; + + return (0); } /* balloon_retrieve: rescue a page from the balloon, if it is not empty. */ @@ -134,8 +135,10 @@ balloon_retrieve(void) vm_page_t page; struct balloon_entry *entry; + mtx_assert(&balloon_mutex, MA_OWNED); + if (STAILQ_EMPTY(&ballooned_pages)) - return NULL; + return (NULL); entry = STAILQ_FIRST(&ballooned_pages); STAILQ_REMOVE_HEAD(&ballooned_pages, list); @@ -145,7 +148,7 @@ balloon_retrieve(void) bs.balloon_low--; - return page; + return (page); } static unsigned long @@ -154,21 +157,22 @@ current_target(void) unsigned long target = min(bs.target_pages, bs.hard_limit); if (target > (bs.current_pages + bs.balloon_low + bs.balloon_high)) target = bs.current_pages + bs.balloon_low + bs.balloon_high; - return target; + return (target); } static unsigned long minimum_target(void) { #ifdef XENHVM -#define max_pfn physmem +#define max_pfn realmem #else #define max_pfn HYPERVISOR_shared_info->arch.max_pfn #endif unsigned long min_pages, curr_pages = current_target(); #define MB2PAGES(mb) ((mb) << (20 - PAGE_SHIFT)) - /* Simple continuous piecewiese linear function: + /* + * Simple continuous piecewiese linear function: * max MiB -> min MiB gradient * 0 0 * 16 16 @@ -189,12 +193,10 @@ minimum_target(void) else min_pages = MB2PAGES(296) + (max_pfn >> 5); #undef MB2PAGES +#undef max_pfn /* Don't enforce growth */ - return min(min_pages, curr_pages); -#ifndef CONFIG_XEN -#undef max_pfn -#endif + return (min(min_pages, curr_pages)); } static int @@ -210,10 +212,10 @@ increase_reservation(unsigned long nr_pa .domid = DOMID_SELF }; - if (nr_pages > ARRAY_SIZE(frame_list)) - nr_pages = ARRAY_SIZE(frame_list); + mtx_assert(&balloon_mutex, MA_OWNED); - mtx_lock(&balloon_lock); + if (nr_pages > nitems(frame_list)) + nr_pages = nitems(frame_list); for (entry = STAILQ_FIRST(&ballooned_pages), i = 0; i < nr_pages; i++, entry = STAILQ_NEXT(entry, list)) { @@ -253,33 +255,14 @@ increase_reservation(unsigned long nr_pa set_phys_to_machine(pfn, frame_list[i]); -#if 0 -#ifndef XENHVM - /* Link back into the page tables if not highmem. */ - if (pfn < max_low_pfn) { - int ret; - ret = HYPERVISOR_update_va_mapping( - (unsigned long)__va(pfn << PAGE_SHIFT), - pfn_pte_ma(frame_list[i], PAGE_KERNEL), - 0); - PASSING(ret == 0, - ("HYPERVISOR_update_va_mapping failed")); - } -#endif -#endif - - /* Relinquish the page back to the allocator. */ vm_page_unwire(page, 0); vm_page_free(page); } bs.current_pages += nr_pages; - //totalram_pages = bs.current_pages; out: - mtx_unlock(&balloon_lock); - - return 0; + return (0); } static int @@ -295,8 +278,10 @@ decrease_reservation(unsigned long nr_pa .domid = DOMID_SELF }; - if (nr_pages > ARRAY_SIZE(frame_list)) - nr_pages = ARRAY_SIZE(frame_list); + mtx_assert(&balloon_mutex, MA_OWNED); + + if (nr_pages > nitems(frame_list)) + nr_pages = nitems(frame_list); for (i = 0; i < nr_pages; i++) { if ((page = vm_page_alloc(NULL, 0, @@ -310,39 +295,15 @@ decrease_reservation(unsigned long nr_pa pfn = (VM_PAGE_TO_PHYS(page) >> PAGE_SHIFT); frame_list[i] = PFNTOMFN(pfn); -#if 0 - if (!PageHighMem(page)) { - v = phys_to_virt(pfn << PAGE_SHIFT); - scrub_pages(v, 1); -#ifdef CONFIG_XEN - ret = HYPERVISOR_update_va_mapping( - (unsigned long)v, __pte_ma(0), 0); - BUG_ON(ret); -#endif - } -#endif -#ifdef CONFIG_XEN_SCRUB_PAGES - else { - v = kmap(page); - scrub_pages(v, 1); - kunmap(page); - } -#endif - } - -#ifdef CONFIG_XEN - /* Ensure that ballooned highmem pages don't have kmaps. */ - kmap_flush_unused(); - flush_tlb_all(); -#endif - - mtx_lock(&balloon_lock); - - /* No more mappings: invalidate P2M and add to balloon. */ - for (i = 0; i < nr_pages; i++) { - pfn = MFNTOPFN(frame_list[i]); set_phys_to_machine(pfn, INVALID_P2M_ENTRY); - balloon_append(PHYS_TO_VM_PAGE(pfn << PAGE_SHIFT)); + if (balloon_append(page) != 0) { + vm_page_unwire(page, 0); + vm_page_free(page); + + nr_pages = i; + need_sleep = 1; + break; + } } set_xen_guest_handle(reservation.extent_start, frame_list); @@ -351,9 +312,6 @@ decrease_reservation(unsigned long nr_pa KASSERT(ret == nr_pages, ("HYPERVISOR_memory_op failed")); bs.current_pages -= nr_pages; - //totalram_pages = bs.current_pages; - - mtx_unlock(&balloon_lock); return (need_sleep); } @@ -425,11 +383,11 @@ watch_target(struct xs_watch *watch, return; } - /* The given memory/target value is in KiB, so it needs converting to - pages. PAGE_SHIFT converts bytes to pages, hence PAGE_SHIFT - 10. - */ - set_new_target(new_target >> (PAGE_SHIFT - 10)); - + /* + * The given memory/target value is in KiB, so it needs converting to + * pages. PAGE_SHIFT converts bytes to pages, hence PAGE_SHIFT - 10. + */ + set_new_target(new_target >> KB_TO_PAGE_SHIFT); } static void @@ -461,13 +419,12 @@ balloon_init(void *arg) if (!is_running_on_xen()) return; - mtx_init(&balloon_lock, "balloon_lock", NULL, MTX_DEF); mtx_init(&balloon_mutex, "balloon_mutex", NULL, MTX_DEF); #ifndef XENHVM bs.current_pages = min(xen_start_info->nr_pages, max_pfn); #else - bs.current_pages = physmem; + bs.current_pages = realmem; #endif bs.target_pages = bs.current_pages; bs.balloon_low = 0; @@ -497,76 +454,7 @@ void balloon_update_driver_allowance(lon void balloon_update_driver_allowance(long delta) { - mtx_lock(&balloon_lock); + mtx_lock(&balloon_mutex); bs.driver_pages += delta; - mtx_unlock(&balloon_lock); -} - -#if 0 -static int dealloc_pte_fn( - pte_t *pte, struct page *pte_page, unsigned long addr, void *data) -{ - unsigned long mfn = pte_mfn(*pte); - int ret; - struct xen_memory_reservation reservation = { - .extent_start = &mfn, - .nr_extents = 1, - .extent_order = 0, - .domid = DOMID_SELF - }; - set_pte_at(&init_mm, addr, pte, __pte_ma(0)); - set_phys_to_machine(__pa(addr) >> PAGE_SHIFT, INVALID_P2M_ENTRY); - ret = HYPERVISOR_memory_op(XENMEM_decrease_reservation, &reservation); - KASSERT(ret == 1, ("HYPERVISOR_memory_op failed")); - return 0; -} - -#endif - -#if 0 -vm_page_t -balloon_alloc_empty_page_range(unsigned long nr_pages) -{ - vm_page_t pages; - int i, rc; - unsigned long *mfn_list; - struct xen_memory_reservation reservation = { - .address_bits = 0, - .extent_order = 0, - .domid = DOMID_SELF - }; - - pages = vm_page_alloc_contig(nr_pages, 0, -1, 4, 4) - if (pages == NULL) - return NULL; - - mfn_list = malloc(nr_pages*sizeof(unsigned long), M_DEVBUF, M_WAITOK); - - for (i = 0; i < nr_pages; i++) { - mfn_list[i] = PFNTOMFN(VM_PAGE_TO_PHYS(pages[i]) >> PAGE_SHIFT); - PFNTOMFN(i) = INVALID_P2M_ENTRY; - reservation.extent_start = mfn_list; - reservation.nr_extents = nr_pages; - rc = HYPERVISOR_memory_op(XENMEM_decrease_reservation, - &reservation); - KASSERT(rc == nr_pages, ("HYPERVISOR_memory_op failed")); - } - - current_pages -= nr_pages; - - wakeup(balloon_process); - - return pages; -} - -void -balloon_dealloc_empty_page_range(vm_page_t page, unsigned long nr_pages) -{ - unsigned long i; - - for (i = 0; i < nr_pages; i++) - balloon_append(page + i); - - wakeup(balloon_process); + mtx_unlock(&balloon_mutex); } -#endif From owner-svn-src-stable@FreeBSD.ORG Thu Dec 5 20:12:02 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA30B513; Thu, 5 Dec 2013 20:12:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C67251802; Thu, 5 Dec 2013 20:12:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5KC2T1060526; Thu, 5 Dec 2013 20:12:02 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5KC2Qa060524; Thu, 5 Dec 2013 20:12:02 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201312052012.rB5KC2Qa060524@svn.freebsd.org> From: Alexander Motin Date: Thu, 5 Dec 2013 20:12:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259002 - stable/9/sys/dev/wbwd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 20:12:02 -0000 Author: mav Date: Thu Dec 5 20:12:02 2013 New Revision: 259002 URL: http://svnweb.freebsd.org/changeset/base/259002 Log: MFC r244280 (by pjd): sbuf_trim() cannot be used on sbuf with drain function set. This fixes panic when listing sysctls on INVARIANTS-enabled kernel while having wbwd loaded. This panic was not fatal, at worst one additional space was printed. Also sbuf_trim() makes some sense even if drain function is set. The drain function is called only when buffer is to be expanded. So we could still trim existing buffer before drain is called. In this case it worked just fine - the trailing space was correctly trimmed. Modified: stable/9/sys/dev/wbwd/wbwd.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/wbwd/wbwd.c ============================================================================== --- stable/9/sys/dev/wbwd/wbwd.c Thu Dec 5 18:39:03 2013 (r259001) +++ stable/9/sys/dev/wbwd/wbwd.c Thu Dec 5 20:12:02 2013 (r259002) @@ -250,9 +250,8 @@ sysctl_wb_debug(SYSCTL_HANDLER_ARGS) sbuf_printf(&sb, "LDN8 (GPIO2, Watchdog): "); sbuf_printf(&sb, "CRF5 0x%02x ", sc->reg_1); sbuf_printf(&sb, "CRF6 0x%02x ", sc->reg_timeout); - sbuf_printf(&sb, "CRF7 0x%02x ", sc->reg_2); + sbuf_printf(&sb, "CRF7 0x%02x", sc->reg_2); - sbuf_trim(&sb); error = sbuf_finish(&sb); sbuf_delete(&sb); return (error); From owner-svn-src-stable@FreeBSD.ORG Thu Dec 5 20:25:45 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 32F89C3F; Thu, 5 Dec 2013 20:25:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1F38818DC; Thu, 5 Dec 2013 20:25:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5KPiw6095049; Thu, 5 Dec 2013 20:25:44 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5KPiL3095047; Thu, 5 Dec 2013 20:25:44 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312052025.rB5KPiL3095047@svn.freebsd.org> From: Dimitry Andric Date: Thu, 5 Dec 2013 20:25:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259004 - stable/9/contrib/libc++/include X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 20:25:45 -0000 Author: dim Date: Thu Dec 5 20:25:44 2013 New Revision: 259004 URL: http://svnweb.freebsd.org/changeset/base/259004 Log: MFC r256082 (by decke) Rename internal function test() to avoid name clashes with common macros. This fixes ports like mysql 5.6 which has an internal macro called test. Discussed with: theraven Modified: stable/9/contrib/libc++/include/memory Directory Properties: stable/9/contrib/libc++/ (props changed) Modified: stable/9/contrib/libc++/include/memory ============================================================================== --- stable/9/contrib/libc++/include/memory Thu Dec 5 20:23:32 2013 (r259003) +++ stable/9/contrib/libc++/include/memory Thu Dec 5 20:25:44 2013 (r259004) @@ -965,13 +965,13 @@ public: namespace __has_pointer_type_imp { - template static __two test(...); - template static char test(typename _Up::pointer* = 0); + template static __two __test(...); + template static char __test(typename _Up::pointer* = 0); } template struct __has_pointer_type - : public integral_constant(0)) == 1> + : public integral_constant(0)) == 1> { }; From owner-svn-src-stable@FreeBSD.ORG Thu Dec 5 21:46:29 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6455EC9; Thu, 5 Dec 2013 21:46:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 86A411EB5; Thu, 5 Dec 2013 21:46:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5LkTvF004874; Thu, 5 Dec 2013 21:46:29 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5LkTNn004873; Thu, 5 Dec 2013 21:46:29 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312052146.rB5LkTNn004873@svn.freebsd.org> From: Dimitry Andric Date: Thu, 5 Dec 2013 21:46:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259009 - stable/9/contrib/llvm/tools/clang/lib/Headers X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 21:46:29 -0000 Author: dim Date: Thu Dec 5 21:46:29 2013 New Revision: 259009 URL: http://svnweb.freebsd.org/changeset/base/259009 Log: MFC r253802: Pull in r186696 from upstream clang trunk: This patch implements __get_cpuid_max() as an inline and __cpuid() and __cpuid_count() as macros to be compatible with GCC's cpuid.h. It also adds bit_ constants for the various feature bits as described in version 039 (May 2011) of Intel's SDM Volume 2 in the description of the CPUID instruction. The list of bit_ constants is a bit exhaustive (GCC doesn't do near this many). More bits could be added from a newer version of SDM if desired. Patch by John Baldwin! This should fix several ports which depend on this functionality being available. Modified: stable/9/contrib/llvm/tools/clang/lib/Headers/cpuid.h Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Modified: stable/9/contrib/llvm/tools/clang/lib/Headers/cpuid.h ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Headers/cpuid.h Thu Dec 5 21:35:52 2013 (r259008) +++ stable/9/contrib/llvm/tools/clang/lib/Headers/cpuid.h Thu Dec 5 21:46:29 2013 (r259009) @@ -25,10 +25,132 @@ #error this header is for x86 only #endif +/* Features in %ecx for level 1 */ +#define bit_SSE3 0x00000001 +#define bit_PCLMULQDQ 0x00000002 +#define bit_DTES64 0x00000004 +#define bit_MONITOR 0x00000008 +#define bit_DSCPL 0x00000010 +#define bit_VMX 0x00000020 +#define bit_SMX 0x00000040 +#define bit_EIST 0x00000080 +#define bit_TM2 0x00000100 +#define bit_SSSE3 0x00000200 +#define bit_CNXTID 0x00000400 +#define bit_FMA 0x00001000 +#define bit_CMPXCHG16B 0x00002000 +#define bit_xTPR 0x00004000 +#define bit_PDCM 0x00008000 +#define bit_PCID 0x00020000 +#define bit_DCA 0x00040000 +#define bit_SSE41 0x00080000 +#define bit_SSE42 0x00100000 +#define bit_x2APIC 0x00200000 +#define bit_MOVBE 0x00400000 +#define bit_POPCNT 0x00800000 +#define bit_TSCDeadline 0x01000000 +#define bit_AESNI 0x02000000 +#define bit_XSAVE 0x04000000 +#define bit_OSXSAVE 0x08000000 +#define bit_AVX 0x10000000 +#define bit_RDRAND 0x40000000 + +/* Features in %edx for level 1 */ +#define bit_FPU 0x00000001 +#define bit_VME 0x00000002 +#define bit_DE 0x00000004 +#define bit_PSE 0x00000008 +#define bit_TSC 0x00000010 +#define bit_MSR 0x00000020 +#define bit_PAE 0x00000040 +#define bit_MCE 0x00000080 +#define bit_CX8 0x00000100 +#define bit_APIC 0x00000200 +#define bit_SEP 0x00000800 +#define bit_MTRR 0x00001000 +#define bit_PGE 0x00002000 +#define bit_MCA 0x00004000 +#define bit_CMOV 0x00008000 +#define bit_PAT 0x00010000 +#define bit_PSE36 0x00020000 +#define bit_PSN 0x00040000 +#define bit_CLFSH 0x00080000 +#define bit_DS 0x00200000 +#define bit_ACPI 0x00400000 +#define bit_MMX 0x00800000 +#define bit_FXSR 0x01000000 +#define bit_SSE 0x02000000 +#define bit_SSE2 0x04000000 +#define bit_SS 0x08000000 +#define bit_HTT 0x10000000 +#define bit_TM 0x20000000 +#define bit_PBE 0x80000000 + +/* Features in %ebx for level 7 sub-leaf 0 */ +#define bit_FSGSBASE 0x00000001 +#define bit_SMEP 0x00000080 +#define bit_ENH_MOVSB 0x00000200 + +/* PIC on i386 uses %ebx, so preserve it. */ +#if __i386__ +#define __cpuid(__level, __eax, __ebx, __ecx, __edx) \ + __asm(" pushl %%ebx\n" \ + " cpuid\n" \ + " mov %%ebx,%1\n" \ + " popl %%ebx" \ + : "=a"(__eax), "=r" (__ebx), "=c"(__ecx), "=d"(__edx) \ + : "0"(__level)) + +#define __cpuid_count(__level, __count, __eax, __ebx, __ecx, __edx) \ + __asm(" pushl %%ebx\n" \ + " cpuid\n" \ + " mov %%ebx,%1\n" \ + " popl %%ebx" \ + : "=a"(__eax), "=r" (__ebx), "=c"(__ecx), "=d"(__edx) \ + : "0"(__level), "2"(__count)) +#else +#define __cpuid(__level, __eax, __ebx, __ecx, __edx) \ + __asm("cpuid" : "=a"(__eax), "=b" (__ebx), "=c"(__ecx), "=d"(__edx) \ + : "0"(__level)) + +#define __cpuid_count(__level, __count, __eax, __ebx, __ecx, __edx) \ + __asm("cpuid" : "=a"(__eax), "=b" (__ebx), "=c"(__ecx), "=d"(__edx) \ + : "0"(__level), "2"(__count)) +#endif + static __inline int __get_cpuid (unsigned int __level, unsigned int *__eax, unsigned int *__ebx, unsigned int *__ecx, unsigned int *__edx) { - __asm("cpuid" : "=a"(*__eax), "=b" (*__ebx), "=c"(*__ecx), "=d"(*__edx) - : "0"(__level)); + __cpuid(__level, *__eax, *__ebx, *__ecx, *__edx); return 1; } + +static __inline int __get_cpuid_max (unsigned int __level, unsigned int *__sig) +{ + unsigned int __eax, __ebx, __ecx, __edx; +#if __i386__ + int __cpuid_supported; + + __asm(" pushfl\n" + " popl %%eax\n" + " movl %%eax,%%ecx\n" + " xorl $0x00200000,%%eax\n" + " pushl %%eax\n" + " popfl\n" + " pushfl\n" + " popl %%eax\n" + " movl $0,%0\n" + " cmpl %%eax,%%ecx\n" + " je 1f\n" + " movl $1,%0\n" + "1:" + : "=r" (__cpuid_supported) : : "eax", "ecx"); + if (!__cpuid_supported) + return 0; +#endif + + __cpuid(__level, __eax, __ebx, __ecx, __edx); + if (__sig) + *__sig = __ebx; + return __eax; +} From owner-svn-src-stable@FreeBSD.ORG Thu Dec 5 21:49:42 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27CF42D7; Thu, 5 Dec 2013 21:49:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EDD871ECE; Thu, 5 Dec 2013 21:49:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5LnfoA012516; Thu, 5 Dec 2013 21:49:41 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5Lnfh5012514; Thu, 5 Dec 2013 21:49:41 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312052149.rB5Lnfh5012514@svn.freebsd.org> From: Dimitry Andric Date: Thu, 5 Dec 2013 21:49:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259011 - stable/9/contrib/llvm/lib/Transforms/InstCombine X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 21:49:42 -0000 Author: dim Date: Thu Dec 5 21:49:41 2013 New Revision: 259011 URL: http://svnweb.freebsd.org/changeset/base/259011 Log: MFC r255076: Pull in r189672 from upstream llvm trunk: InstCombine: Check for zero shift amounts before subtracting one causing integer overflow. PR17026. Also avoid undefined shifts and shift amounts larger than 64 bits (those are always undef because we can't represent integer types that large). This should fix assertion failures when building the emulators/xmame port. Reported by: bapt Modified: stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) Modified: stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp Thu Dec 5 21:49:14 2013 (r259010) +++ stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp Thu Dec 5 21:49:41 2013 (r259011) @@ -845,21 +845,26 @@ Value *InstCombiner::SimplifyDemandedUse Value *InstCombiner::SimplifyShrShlDemandedBits(Instruction *Shr, Instruction *Shl, APInt DemandedMask, APInt &KnownZero, APInt &KnownOne) { - unsigned ShlAmt = cast(Shl->getOperand(1))->getZExtValue(); - unsigned ShrAmt = cast(Shr->getOperand(1))->getZExtValue(); + const APInt &ShlOp1 = cast(Shl->getOperand(1))->getValue(); + const APInt &ShrOp1 = cast(Shr->getOperand(1))->getValue(); + if (!ShlOp1 || !ShrOp1) + return 0; // Noop. + + Value *VarX = Shr->getOperand(0); + Type *Ty = VarX->getType(); + unsigned BitWidth = Ty->getIntegerBitWidth(); + if (ShlOp1.uge(BitWidth) || ShrOp1.uge(BitWidth)) + return 0; // Undef. + + unsigned ShlAmt = ShlOp1.getZExtValue(); + unsigned ShrAmt = ShrOp1.getZExtValue(); KnownOne.clearAllBits(); KnownZero = APInt::getBitsSet(KnownZero.getBitWidth(), 0, ShlAmt-1); KnownZero &= DemandedMask; - if (ShlAmt == 0 || ShrAmt == 0) - return 0; - - Value *VarX = Shr->getOperand(0); - Type *Ty = VarX->getType(); - - APInt BitMask1(APInt::getAllOnesValue(Ty->getIntegerBitWidth())); - APInt BitMask2(APInt::getAllOnesValue(Ty->getIntegerBitWidth())); + APInt BitMask1(APInt::getAllOnesValue(BitWidth)); + APInt BitMask2(APInt::getAllOnesValue(BitWidth)); bool isLshr = (Shr->getOpcode() == Instruction::LShr); BitMask1 = isLshr ? (BitMask1.lshr(ShrAmt) << ShlAmt) : From owner-svn-src-stable@FreeBSD.ORG Thu Dec 5 21:51:53 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB6EE448; Thu, 5 Dec 2013 21:51:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C56831F07; Thu, 5 Dec 2013 21:51:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB5Lprbo020109; Thu, 5 Dec 2013 21:51:53 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB5LprDP020107; Thu, 5 Dec 2013 21:51:53 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312052151.rB5LprDP020107@svn.freebsd.org> From: Dimitry Andric Date: Thu, 5 Dec 2013 21:51:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259012 - stable/9/contrib/llvm/tools/clang/tools/driver X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 21:51:53 -0000 Author: dim Date: Thu Dec 5 21:51:53 2013 New Revision: 259012 URL: http://svnweb.freebsd.org/changeset/base/259012 Log: MFC r257109: Add clang-CC and CC to list of hints allowing clang to identify its operating mode as c++ instead of defaulting to c for the binary names CC and clang-CC. This fixes builds that use cmake, which automatically sets CXX to /usr/bin/CC by default. PR: bin/182442 Reviewed by: dwhite, wca Modified: stable/9/contrib/llvm/tools/clang/tools/driver/driver.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Modified: stable/9/contrib/llvm/tools/clang/tools/driver/driver.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/tools/driver/driver.cpp Thu Dec 5 21:49:41 2013 (r259011) +++ stable/9/contrib/llvm/tools/clang/tools/driver/driver.cpp Thu Dec 5 21:51:53 2013 (r259012) @@ -284,11 +284,13 @@ static void ParseProgName(SmallVectorImp } suffixes [] = { { "clang", false, false }, { "clang++", true, false }, + { "clang-CC", true, false }, { "clang-c++", true, false }, { "clang-cc", false, false }, { "clang-cpp", false, true }, { "clang-g++", true, false }, { "clang-gcc", false, false }, + { "CC", true, false }, { "cc", false, false }, { "cpp", false, true }, { "++", true, false }, From owner-svn-src-stable@FreeBSD.ORG Fri Dec 6 18:32:04 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F2655D1; Fri, 6 Dec 2013 18:32:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3B358157B; Fri, 6 Dec 2013 18:32:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB6IW4JV076779; Fri, 6 Dec 2013 18:32:04 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6IW4lo076778; Fri, 6 Dec 2013 18:32:04 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201312061832.rB6IW4lo076778@svn.freebsd.org> From: Warner Losh Date: Fri, 6 Dec 2013 18:32:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259038 - stable/9/sys/arm/at91 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 18:32:04 -0000 Author: imp Date: Fri Dec 6 18:32:03 2013 New Revision: 259038 URL: http://svnweb.freebsd.org/changeset/base/259038 Log: Bump the maximum VM space from 3 * memory size to a fixed 256MB. That's all we have room for since we map the hardware registers starting at 0xd0000000. This allows my 64MB AT91SAM9G20 to boot again after the unmmaped I/O changes were MFC'd at r251897. Other subplatforms may need similar treatment. Modified: stable/9/sys/arm/at91/at91_machdep.c Modified: stable/9/sys/arm/at91/at91_machdep.c ============================================================================== --- stable/9/sys/arm/at91/at91_machdep.c Fri Dec 6 18:09:10 2013 (r259037) +++ stable/9/sys/arm/at91/at91_machdep.c Fri Dec 6 18:32:03 2013 (r259038) @@ -426,9 +426,8 @@ initarm(void *arg, void *arg2) dump_avail[2] = 0; dump_avail[3] = 0; - pmap_bootstrap(freemempos, - KERNVIRTADDR + 3 * memsize, - &kernel_l1pt); + /* Use the full 256MB of KVA we have available, regardless of memory size */ + pmap_bootstrap(freemempos, KERNVIRTADDR + (256 << 20), &kernel_l1pt); msgbufp = (void*)msgbufpv.pv_va; msgbufinit(msgbufp, msgbufsize); mutex_init(); From owner-svn-src-stable@FreeBSD.ORG Fri Dec 6 20:48:54 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1898F920; Fri, 6 Dec 2013 20:48:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 055121F8D; Fri, 6 Dec 2013 20:48:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB6KmrNS021603; Fri, 6 Dec 2013 20:48:53 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6Kmrdo021602; Fri, 6 Dec 2013 20:48:53 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201312062048.rB6Kmrdo021602@svn.freebsd.org> From: Colin Percival Date: Fri, 6 Dec 2013 20:48:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259040 - stable/10/etc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 20:48:54 -0000 Author: cperciva Date: Fri Dec 6 20:48:53 2013 New Revision: 259040 URL: http://svnweb.freebsd.org/changeset/base/259040 Log: MFC r258894: Make rc(8) re-source rc.conf upon receipt of SIGALRM. The rc system aggressively caches the contents of /etc/rc.conf in order to improve boot performance; this produces arguably astonishing (non-)results if /etc/rc.conf is modified during the boot process. This commit provides a mechanism for explicitly requesting that rc.conf be reloaded. Approved by: re (rodrigc) Modified: stable/10/etc/rc Directory Properties: stable/10/etc/ (props changed) Modified: stable/10/etc/rc ============================================================================== --- stable/10/etc/rc Fri Dec 6 18:41:16 2013 (r259039) +++ stable/10/etc/rc Fri Dec 6 20:48:53 2013 (r259040) @@ -71,6 +71,11 @@ fi . /etc/rc.subr load_rc_config 'XXX' +# If we receive a SIGALRM, re-source /etc/rc.conf; this allows rc.d +# scripts to perform "boot-time configuration" including enabling and +# disabling rc.d scripts which appear later in the boot order. +trap "_rc_conf_loaded=false; load_rc_config 'XXX'" ALRM + skip="-s nostart" if [ `/sbin/sysctl -n security.jail.jailed` -eq 1 ]; then skip="$skip -s nojail" From owner-svn-src-stable@FreeBSD.ORG Fri Dec 6 23:30:47 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7248F78; Fri, 6 Dec 2013 23:30:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B1EBE1D41; Fri, 6 Dec 2013 23:30:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB6NUlPE079153; Fri, 6 Dec 2013 23:30:47 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6NUkKk079149; Fri, 6 Dec 2013 23:30:46 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201312062330.rB6NUkKk079149@svn.freebsd.org> From: Xin LI Date: Fri, 6 Dec 2013 23:30:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259050 - stable/10/sys/dev/oce X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 23:30:47 -0000 Author: delphij Date: Fri Dec 6 23:30:46 2013 New Revision: 259050 URL: http://svnweb.freebsd.org/changeset/base/259050 Log: MFC r258941: Apply vendor improvements to oce(4) driver: - Add support to 40Gbps devices; - Add support to control adaptive interrupt coalescing (AIC) via sysctl; - Improve support of BE3 devices; Many thanks to Emulex for their continued support of FreeBSD. Submitted by: Venkata Duvvuru Approved by: re (rodrigc) Modified: stable/10/sys/dev/oce/oce_if.c stable/10/sys/dev/oce/oce_if.h stable/10/sys/dev/oce/oce_mbox.c stable/10/sys/dev/oce/oce_sysctl.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/dev/oce/oce_if.c ============================================================================== --- stable/10/sys/dev/oce/oce_if.c Fri Dec 6 23:12:21 2013 (r259049) +++ stable/10/sys/dev/oce/oce_if.c Fri Dec 6 23:30:46 2013 (r259050) @@ -829,6 +829,10 @@ oce_media_status(struct ifnet *ifp, stru req->ifm_active |= IFM_10G_SR | IFM_FDX; sc->speed = 10000; break; + case 7: /* 40 Gbps */ + req->ifm_active |= IFM_40G_SR4 | IFM_FDX; + sc->speed = 40000; + break; } return; @@ -1953,7 +1957,6 @@ done: /* Is there atleast one eq that needs to be modified? */ if(num) oce_mbox_eqd_modify_periodic(sc, set_eqd, num); - } static void oce_detect_hw_error(POCE_SOFTC sc) @@ -2153,11 +2156,6 @@ process_link_state(POCE_SOFTC sc, struct sc->link_status = ASYNC_EVENT_LINK_DOWN; if_link_state_change(sc->ifp, LINK_STATE_DOWN); } - - /* Update speed */ - sc->link_speed = acqe->u0.s.speed; - sc->qos_link_speed = (uint32_t) acqe->u0.s.qos_link_speed * 10; - } @@ -2342,18 +2340,17 @@ oce_get_config(POCE_SOFTC sc) max_rss = OCE_MAX_RSS; if (!IS_BE(sc)) { - rc = oce_get_func_config(sc); + rc = oce_get_profile_config(sc, max_rss); if (rc) { sc->nwqs = OCE_MAX_WQ; sc->nrssqs = max_rss; sc->nrqs = sc->nrssqs + 1; } } - else { - rc = oce_get_profile_config(sc); + else { /* For BE3 don't rely on fw for determining the resources */ sc->nrssqs = max_rss; sc->nrqs = sc->nrssqs + 1; - if (rc) - sc->nwqs = OCE_MAX_WQ; + sc->nwqs = OCE_MAX_WQ; + sc->max_vlans = MAX_VLANFILTER_SIZE; } } Modified: stable/10/sys/dev/oce/oce_if.h ============================================================================== --- stable/10/sys/dev/oce/oce_if.h Fri Dec 6 23:12:21 2013 (r259049) +++ stable/10/sys/dev/oce/oce_if.h Fri Dec 6 23:30:46 2013 (r259050) @@ -882,8 +882,8 @@ typedef struct oce_softc { uint8_t hw_error; uint16_t qnq_debug_event; uint16_t qnqid; - uint16_t pvid; - uint16_t max_vlans; + uint32_t pvid; + uint32_t max_vlans; } OCE_SOFTC, *POCE_SOFTC; @@ -1055,7 +1055,7 @@ int oce_mbox_cq_create(struct oce_cq *cq int oce_mbox_read_transrecv_data(POCE_SOFTC sc, uint32_t page_num); void oce_mbox_eqd_modify_periodic(POCE_SOFTC sc, struct oce_set_eqd *set_eqd, int num); -int oce_get_profile_config(POCE_SOFTC sc); +int oce_get_profile_config(POCE_SOFTC sc, uint32_t max_rss); int oce_get_func_config(POCE_SOFTC sc); void mbx_common_req_hdr_init(struct mbx_hdr *hdr, uint8_t dom, @@ -1099,6 +1099,9 @@ extern uint32_t oce_max_rsp_handled; /* #define OCE_ONE_PORT_EXT_LOOPBACK 0x2 #define OCE_NO_LOOPBACK 0xff +#undef IFM_40G_SR4 +#define IFM_40G_SR4 28 + #define atomic_inc_32(x) atomic_add_32(x, 1) #define atomic_dec_32(x) atomic_subtract_32(x, 1) Modified: stable/10/sys/dev/oce/oce_mbox.c ============================================================================== --- stable/10/sys/dev/oce/oce_mbox.c Fri Dec 6 23:12:21 2013 (r259049) +++ stable/10/sys/dev/oce/oce_mbox.c Fri Dec 6 23:30:46 2013 (r259050) @@ -935,7 +935,7 @@ oce_get_link_status(POCE_SOFTC sc, struc bzero(&mbx, sizeof(struct oce_mbx)); - IS_XE201(sc) ? (version = OCE_MBX_VER_V1) : (version = OCE_MBX_VER_V0); + IS_BE2(sc) ? (version = OCE_MBX_VER_V0) : (version = OCE_MBX_VER_V1); fwcmd = (struct mbx_query_common_link_config *)&mbx.payload; mbx_common_req_hdr_init(&fwcmd->hdr, 0, 0, @@ -2025,7 +2025,7 @@ oce_mbox_eqd_modify_periodic(POCE_SOFTC } int -oce_get_profile_config(POCE_SOFTC sc) +oce_get_profile_config(POCE_SOFTC sc, uint32_t max_rss) { struct oce_mbx mbx; struct mbx_common_get_profile_config *fwcmd; @@ -2050,7 +2050,7 @@ oce_get_profile_config(POCE_SOFTC sc) fwcmd = OCE_DMAPTR(&dma, struct mbx_common_get_profile_config); bzero(fwcmd, sizeof(struct mbx_common_get_profile_config)); - if (IS_BE3(sc)) + if (!IS_XE201(sc)) version = OCE_MBX_VER_V1; else version = OCE_MBX_VER_V0; @@ -2102,13 +2102,20 @@ oce_get_profile_config(POCE_SOFTC sc) goto error; } else { - sc->max_vlans = nic_desc->vlan_count; - sc->nwqs = HOST_32(nic_desc->txq_count); + sc->max_vlans = HOST_16(nic_desc->vlan_count); + sc->nwqs = HOST_16(nic_desc->txq_count); if (sc->nwqs) sc->nwqs = MIN(sc->nwqs, OCE_MAX_WQ); else sc->nwqs = OCE_MAX_WQ; + sc->nrssqs = HOST_16(nic_desc->rssq_count); + if (sc->nrssqs) + sc->nrssqs = MIN(sc->nrssqs, max_rss); + else + sc->nrssqs = max_rss; + sc->nrqs = sc->nrssqs + 1; /* 1 for def RX */; + } error: oce_dma_free(sc, &dma); Modified: stable/10/sys/dev/oce/oce_sysctl.c ============================================================================== --- stable/10/sys/dev/oce/oce_sysctl.c Fri Dec 6 23:12:21 2013 (r259049) +++ stable/10/sys/dev/oce/oce_sysctl.c Fri Dec 6 23:30:46 2013 (r259050) @@ -44,6 +44,7 @@ static void copy_stats_to_sc_xe201(POCE_ static void copy_stats_to_sc_be3(POCE_SOFTC sc); static void copy_stats_to_sc_be2(POCE_SOFTC sc); static int oce_sysctl_loopback(SYSCTL_HANDLER_ARGS); +static int oce_sys_aic_enable(SYSCTL_HANDLER_ARGS); static int oce_be3_fwupgrade(POCE_SOFTC sc, const struct firmware *fw); static int oce_skyhawk_fwupgrade(POCE_SOFTC sc, const struct firmware *fw); static int oce_sys_fwupgrade(SYSCTL_HANDLER_ARGS); @@ -131,6 +132,10 @@ oce_add_sysctls(POCE_SOFTC sc) CTLTYPE_STRING | CTLFLAG_RW, (void *)sc, 0, oce_sys_fwupgrade, "A", "Firmware ufi file"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "aic_enable", + CTLTYPE_INT | CTLFLAG_RW, (void *)sc, 1, + oce_sys_aic_enable, "I", "aic flags"); + /* * Dumps Transceiver data * "sysctl dev.oce.0.sfp_vpd_dump=0" @@ -170,6 +175,35 @@ oce_loopback_test(struct oce_softc *sc, } static int +oce_sys_aic_enable(SYSCTL_HANDLER_ARGS) +{ + int value = 0; + uint32_t status, vector; + POCE_SOFTC sc = (struct oce_softc *)arg1; + struct oce_aic_obj *aic; + + status = sysctl_handle_int(oidp, &value, 0, req); + if (status || !req->newptr) + return status; + + for (vector = 0; vector < sc->intr_count; vector++) { + aic = &sc->aic_obj[vector]; + + if (value == 0){ + aic->max_eqd = aic->min_eqd = aic->et_eqd = 0; + aic->enable = 0; + } + else { + aic->max_eqd = OCE_MAX_EQD; + aic->min_eqd = OCE_MIN_EQD; + aic->et_eqd = OCE_MIN_EQD; + aic->enable = TRUE; + } + } + return 0; +} + +static int oce_sysctl_loopback(SYSCTL_HANDLER_ARGS) { int value = 0; From owner-svn-src-stable@FreeBSD.ORG Fri Dec 6 23:40:51 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A073723; Fri, 6 Dec 2013 23:40:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 58EEF1E1E; Fri, 6 Dec 2013 23:40:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB6Nepwc082452; Fri, 6 Dec 2013 23:40:51 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB6NeoYa082441; Fri, 6 Dec 2013 23:40:50 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201312062340.rB6NeoYa082441@svn.freebsd.org> From: Xin LI Date: Fri, 6 Dec 2013 23:40:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259051 - in stable/10/sys: conf i386/conf modules X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 23:40:51 -0000 Author: delphij Date: Fri Dec 6 23:40:50 2013 New Revision: 259051 URL: http://svnweb.freebsd.org/changeset/base/259051 Log: MFC r258948: Support Hyper-V on i386: - Add 'hyperv' module into build; - Allow building Hyper-V support as part of the kernel; - Hook Hyper-V build into NOTES. Approved by: re (rodrigc) Modified: stable/10/sys/conf/files.i386 stable/10/sys/i386/conf/NOTES stable/10/sys/modules/Makefile Directory Properties: stable/10/sys/ (props changed) stable/10/sys/conf/ (props changed) Modified: stable/10/sys/conf/files.i386 ============================================================================== --- stable/10/sys/conf/files.i386 Fri Dec 6 23:30:46 2013 (r259050) +++ stable/10/sys/conf/files.i386 Fri Dec 6 23:40:50 2013 (r259051) @@ -221,6 +221,18 @@ dev/hwpmc/hwpmc_piv.c optional hwpmc dev/hwpmc/hwpmc_ppro.c optional hwpmc dev/hwpmc/hwpmc_tsc.c optional hwpmc dev/hwpmc/hwpmc_x86.c optional hwpmc +dev/hyperv/netvsc/hv_net_vsc.c optional hyperv +dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c optional hyperv +dev/hyperv/netvsc/hv_rndis_filter.c optional hyperv +dev/hyperv/stordisengage/hv_ata_pci_disengage.c optional hyperv +dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c optional hyperv +dev/hyperv/utilities/hv_util.c optional hyperv +dev/hyperv/vmbus/hv_channel.c optional hyperv +dev/hyperv/vmbus/hv_channel_mgmt.c optional hyperv +dev/hyperv/vmbus/hv_connection.c optional hyperv +dev/hyperv/vmbus/hv_hv.c optional hyperv +dev/hyperv/vmbus/hv_ring_buffer.c optional hyperv +dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c optional hyperv dev/ichwd/ichwd.c optional ichwd dev/if_ndis/if_ndis.c optional ndis dev/if_ndis/if_ndis_pccard.c optional ndis pccard Modified: stable/10/sys/i386/conf/NOTES ============================================================================== --- stable/10/sys/i386/conf/NOTES Fri Dec 6 23:30:46 2013 (r259050) +++ stable/10/sys/i386/conf/NOTES Fri Dec 6 23:40:50 2013 (r259051) @@ -800,6 +800,8 @@ device virtio_blk # VirtIO Block device device virtio_scsi # VirtIO SCSI device device virtio_balloon # VirtIO Memory Balloon device +device hyperv # HyperV drivers + ##################################################################### # Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Fri Dec 6 23:30:46 2013 (r259050) +++ stable/10/sys/modules/Makefile Fri Dec 6 23:40:50 2013 (r259051) @@ -583,6 +583,7 @@ _hptmv= hptmv _hptnr= hptnr _hptrr= hptrr .endif +_hyperv= hyperv _ichwd= ichwd _ida= ida _iir= iir From owner-svn-src-stable@FreeBSD.ORG Sat Dec 7 00:33:10 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3986EA5; Sat, 7 Dec 2013 00:33:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BF52E1176; Sat, 7 Dec 2013 00:33:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB70XA6n001362; Sat, 7 Dec 2013 00:33:10 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB70XAvT001361; Sat, 7 Dec 2013 00:33:10 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201312070033.rB70XAvT001361@svn.freebsd.org> From: Devin Teske Date: Sat, 7 Dec 2013 00:33:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259055 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 00:33:10 -0000 Author: dteske Date: Sat Dec 7 00:33:10 2013 New Revision: 259055 URL: http://svnweb.freebsd.org/changeset/base/259055 Log: MFC r258927: Fix a regression introduced by SVN r257842 that prevents Encryption from being enabled. Approved by: re (gjb) Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot Directory Properties: stable/10/usr.sbin/bsdinstall/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/zfsboot Sat Dec 7 00:31:01 2013 (r259054) +++ stable/10/usr.sbin/bsdinstall/scripts/zfsboot Sat Dec 7 00:33:10 2013 (r259055) @@ -961,7 +961,7 @@ zfs_create_boot() # If encryption is enabled, we need to create the GEOMs # if [ "$ZFSBOOT_GELI_ENCRYPTION" ]; then - local bootvdev= + local bootvdev= options= local geli_pool="$BSDINSTALL_CHROOT/$ZFSBOOT_GELI_POOL_NAME" local key="$ZFSBOOT_GELI_KEY_FILE" @@ -978,11 +978,13 @@ zfs_create_boot() f_dprintf "$funcname: %s %s %s" \ "ZFSBOOT_GELI_POOL_NAME=[$ZFSBOOT_GELI_POOL_NAME]" \ "bootvdev=[$bootvdev]" "unenc_list=[$unenc_list]" + options="-o altroot=\"\$BSDINSTALL_CHROOT\"" + options="$options -m \"/\$ZFSBOOT_GELI_POOL_NAME\"" + options="$options -f" f_eval_catch $funcname zpool "$ZPOOL_CREATE_WITH_OPTIONS" \ - "-o altroot=\"\$BSDINSTALL_CHROOT\" - -m \"/\$ZFSBOOT_GELI_POOL_NAME\" -f" \ - \$ZFSBOOT_GELI_POOL_NAME \$bootvdev \ + "$options" \$ZFSBOOT_GELI_POOL_NAME \$bootvdev \ \$unenc_list || return $FAILURE + f_dprintf "$funcname: geli_pool=[%s]" "$geli_pool" f_eval_catch $funcname mkdir "$MKDIR_P" \$geli_pool/boot || return $FAILURE From owner-svn-src-stable@FreeBSD.ORG Sat Dec 7 11:33:07 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9D21BEA; Sat, 7 Dec 2013 11:33:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C683415E5; Sat, 7 Dec 2013 11:33:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB7BX7QF029935; Sat, 7 Dec 2013 11:33:07 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB7BX7wd029934; Sat, 7 Dec 2013 11:33:07 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312071133.rB7BX7wd029934@svn.freebsd.org> From: Glen Barber Date: Sat, 7 Dec 2013 11:33:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259066 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 11:33:07 -0000 Author: gjb Date: Sat Dec 7 11:33:07 2013 New Revision: 259066 URL: http://svnweb.freebsd.org/changeset/base/259066 Log: Set stable/10 to -PRERELEASE, now that releng/10.0 has been branched. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/conf/newvers.sh Modified: stable/10/sys/conf/newvers.sh ============================================================================== --- stable/10/sys/conf/newvers.sh Sat Dec 7 11:27:54 2013 (r259065) +++ stable/10/sys/conf/newvers.sh Sat Dec 7 11:33:07 2013 (r259066) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.0" -BRANCH="BETA4" +BRANCH="PRERELEASE" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable@FreeBSD.ORG Sat Dec 7 13:06:15 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DD4FDB0; Sat, 7 Dec 2013 13:06:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 70B081D80; Sat, 7 Dec 2013 13:06:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB7D6FP9060662; Sat, 7 Dec 2013 13:06:15 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB7D6FxO060661; Sat, 7 Dec 2013 13:06:15 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312071306.rB7D6FxO060661@svn.freebsd.org> From: Glen Barber Date: Sat, 7 Dec 2013 13:06:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259069 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 13:06:15 -0000 Author: gjb Date: Sat Dec 7 13:06:14 2013 New Revision: 259069 URL: http://svnweb.freebsd.org/changeset/base/259069 Log: Bump __FreeBSD_version to 1000700, to set it higher than what is in releng/10.0 now. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/sys/param.h Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Sat Dec 7 13:03:14 2013 (r259068) +++ stable/10/sys/sys/param.h Sat Dec 7 13:06:14 2013 (r259069) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000502 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000700 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-stable@FreeBSD.ORG Sat Dec 7 18:23:30 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF4113DC; Sat, 7 Dec 2013 18:23:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 90E5C10C7; Sat, 7 Dec 2013 18:23:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB7INUts070600; Sat, 7 Dec 2013 18:23:30 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB7INUsS070594; Sat, 7 Dec 2013 18:23:30 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201312071823.rB7INUsS070594@svn.freebsd.org> From: Peter Wemm Date: Sat, 7 Dec 2013 18:23:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259073 - in stable/10: . contrib/ipfilter contrib/top share/man/man4 share/mk sys/amd64/include sys/contrib/dev/acpica sys/contrib/ipfilter/netinet sys/dev/fdt sys/x86/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 18:23:30 -0000 Author: peter Date: Sat Dec 7 18:23:29 2013 New Revision: 259073 URL: http://svnweb.freebsd.org/changeset/base/259073 Log: Hoist all the mergeinfo up to the root in preparation for enforcing merges to the root only. All MFC's were rerecorded to the root. Going forward, if an MFC includes mergeinfo, it will need to be made to the root and committed from the root. Merges with --ignore-ancestry or diff | patch can go anywhere. The mergeinfo in HEAD is in a bad state from years of neglect and manual tampering and this was branched into 10.x. This confuses the coalescing code and prevents it from doing its job. Approved by: re (gjb, implicit) Modified: Directory Properties: stable/10/ (props changed) stable/10/MAINTAINERS (props changed) stable/10/Makefile.inc1 (props changed) stable/10/ObsoleteFiles.inc (props changed) stable/10/UPDATING (props changed) stable/10/bin/df/ (props changed) stable/10/bin/freebsd-version/ (props changed) stable/10/cddl/ (props changed) stable/10/cddl/contrib/opensolaris/ (props changed) stable/10/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/ (props changed) stable/10/cddl/contrib/opensolaris/cmd/zfs/ (props changed) stable/10/cddl/contrib/opensolaris/lib/libzfs/ (props changed) stable/10/contrib/apr/ (props changed) stable/10/contrib/apr-util/ (props changed) stable/10/contrib/atf/ (props changed) stable/10/contrib/binutils/ (props changed) stable/10/contrib/bmake/ (props changed) stable/10/contrib/byacc/ (props changed) stable/10/contrib/bzip2/ (props changed) stable/10/contrib/com_err/ (props changed) stable/10/contrib/compiler-rt/ (props changed) stable/10/contrib/dialog/ (props changed) stable/10/contrib/dtc/ (props changed) stable/10/contrib/ee/ (props changed) stable/10/contrib/expat/ (props changed) stable/10/contrib/file/ (props changed) stable/10/contrib/gcc/ (props changed) stable/10/contrib/gdb/ (props changed) stable/10/contrib/gdtoa/ (props changed) stable/10/contrib/groff/ (props changed) stable/10/contrib/ipfilter/ (props changed) stable/10/contrib/ipfilter/ml_ipl.c (props changed) stable/10/contrib/ipfilter/mlfk_ipl.c (props changed) stable/10/contrib/ipfilter/mlh_rule.c (props changed) stable/10/contrib/ipfilter/mli_ipl.c (props changed) stable/10/contrib/ipfilter/mln_ipl.c (props changed) stable/10/contrib/ipfilter/mls_ipl.c (props changed) stable/10/contrib/ldns/ (props changed) stable/10/contrib/less/ (props changed) stable/10/contrib/libarchive/ (props changed) stable/10/contrib/libarchive/cpio/ (props changed) stable/10/contrib/libarchive/libarchive/ (props changed) stable/10/contrib/libarchive/libarchive_fe/ (props changed) stable/10/contrib/libarchive/tar/ (props changed) stable/10/contrib/libc++/ (props changed) stable/10/contrib/libc-vis/ (props changed) stable/10/contrib/libcxxrt/ (props changed) stable/10/contrib/libexecinfo/ (props changed) stable/10/contrib/libpcap/ (props changed) stable/10/contrib/libstdc++/ (props changed) stable/10/contrib/llvm/ (props changed) stable/10/contrib/llvm/tools/clang/ (props changed) stable/10/contrib/mtree/ (props changed) stable/10/contrib/ncurses/ (props changed) stable/10/contrib/netcat/ (props changed) stable/10/contrib/ntp/ (props changed) stable/10/contrib/nvi/ (props changed) stable/10/contrib/one-true-awk/ (props changed) stable/10/contrib/openbsm/ (props changed) stable/10/contrib/openpam/ (props changed) stable/10/contrib/openresolv/ (props changed) stable/10/contrib/pf/ (props changed) stable/10/contrib/sendmail/ (props changed) stable/10/contrib/serf/ (props changed) stable/10/contrib/smbfs/ (props changed) stable/10/contrib/subversion/ (props changed) stable/10/contrib/tcpdump/ (props changed) stable/10/contrib/tcsh/ (props changed) stable/10/contrib/tnftp/ (props changed) stable/10/contrib/top/ (props changed) stable/10/contrib/top/install-sh (props changed) stable/10/contrib/tzcode/stdtime/ (props changed) stable/10/contrib/tzcode/zic/ (props changed) stable/10/contrib/tzdata/ (props changed) stable/10/contrib/unbound/ (props changed) stable/10/contrib/wpa/ (props changed) stable/10/contrib/xz/ (props changed) stable/10/crypto/heimdal/ (props changed) stable/10/crypto/openssh/ (props changed) stable/10/crypto/openssl/ (props changed) stable/10/etc/ (props changed) stable/10/etc/rc.d/ (props changed) stable/10/gnu/lib/ (props changed) stable/10/gnu/usr.bin/binutils/ (props changed) stable/10/gnu/usr.bin/cc/cc_tools/ (props changed) stable/10/gnu/usr.bin/gdb/ (props changed) stable/10/include/ (props changed) stable/10/lib/ (props changed) stable/10/lib/libc/ (props changed) stable/10/lib/libc/stdtime/ (props changed) stable/10/lib/libc_nonshared/ (props changed) stable/10/lib/libfetch/ (props changed) stable/10/lib/libiconv_modules/ (props changed) stable/10/lib/libsmb/ (props changed) stable/10/lib/libthr/ (props changed) stable/10/lib/libutil/ (props changed) stable/10/lib/libvmmapi/ (props changed) stable/10/lib/libyaml/ (props changed) stable/10/lib/libz/ (props changed) stable/10/release/ (props changed) stable/10/release/doc/ (props changed) stable/10/sbin/ (props changed) stable/10/sbin/camcontrol/ (props changed) stable/10/sbin/dumpon/ (props changed) stable/10/sbin/hastd/ (props changed) stable/10/sbin/ifconfig/ (props changed) stable/10/sbin/ipfw/ (props changed) stable/10/sbin/nvmecontrol/ (props changed) stable/10/share/ (props changed) stable/10/share/examples/bhyve/ (props changed) stable/10/share/i18n/csmapper/JIS/ (props changed) stable/10/share/i18n/esdb/EUC/ (props changed) stable/10/share/man/ (props changed) stable/10/share/man/man4/ (props changed) stable/10/share/man/man4/bhyve.4 (props changed) stable/10/share/man/man5/ (props changed) stable/10/share/man/man7/ (props changed) stable/10/share/man/man8/ (props changed) stable/10/share/misc/ (props changed) stable/10/share/mk/ (props changed) stable/10/share/mk/bsd.arch.inc.mk (props changed) stable/10/share/syscons/ (props changed) stable/10/share/zoneinfo/ (props changed) stable/10/sys/ (props changed) stable/10/sys/amd64/include/vmm.h (props changed) stable/10/sys/amd64/include/vmm_dev.h (props changed) stable/10/sys/amd64/include/vmm_instruction_emul.h (props changed) stable/10/sys/amd64/include/xen/ (props changed) stable/10/sys/amd64/vmm/ (props changed) stable/10/sys/boot/ (props changed) stable/10/sys/boot/i386/efi/ (props changed) stable/10/sys/boot/ia64/efi/ (props changed) stable/10/sys/boot/ia64/ski/ (props changed) stable/10/sys/boot/powerpc/boot1.chrp/ (props changed) stable/10/sys/boot/powerpc/ofw/ (props changed) stable/10/sys/cddl/contrib/opensolaris/ (props changed) stable/10/sys/conf/ (props changed) stable/10/sys/contrib/dev/acpica/ (props changed) stable/10/sys/contrib/dev/acpica/changes.txt (props changed) stable/10/sys/contrib/dev/acpica/common/ (props changed) stable/10/sys/contrib/dev/acpica/compiler/ (props changed) stable/10/sys/contrib/dev/acpica/components/debugger/ (props changed) stable/10/sys/contrib/dev/acpica/components/disassembler/ (props changed) stable/10/sys/contrib/dev/acpica/components/dispatcher/ (props changed) stable/10/sys/contrib/dev/acpica/components/events/ (props changed) stable/10/sys/contrib/dev/acpica/components/executer/ (props changed) stable/10/sys/contrib/dev/acpica/components/hardware/ (props changed) stable/10/sys/contrib/dev/acpica/components/namespace/ (props changed) stable/10/sys/contrib/dev/acpica/components/parser/ (props changed) stable/10/sys/contrib/dev/acpica/components/resources/ (props changed) stable/10/sys/contrib/dev/acpica/components/tables/ (props changed) stable/10/sys/contrib/dev/acpica/components/utilities/ (props changed) stable/10/sys/contrib/dev/acpica/include/ (props changed) stable/10/sys/contrib/dev/acpica/os_specific/ (props changed) stable/10/sys/contrib/ipfilter/ (props changed) stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c (props changed) stable/10/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c (props changed) stable/10/sys/contrib/libfdt/ (props changed) stable/10/sys/contrib/octeon-sdk/ (props changed) stable/10/sys/contrib/x86emu/ (props changed) stable/10/sys/dev/bvm/ (props changed) stable/10/sys/dev/fdt/fdt_ic_if.m (props changed) stable/10/sys/dev/hyperv/ (props changed) stable/10/sys/modules/hyperv/ (props changed) stable/10/sys/modules/vmm/ (props changed) stable/10/sys/x86/include/acpica_machdep.h (props changed) stable/10/tools/ (props changed) stable/10/tools/build/ (props changed) stable/10/tools/build/options/ (props changed) stable/10/tools/tools/atsectl/ (props changed) stable/10/usr.bin/calendar/ (props changed) stable/10/usr.bin/csup/ (props changed) stable/10/usr.bin/iscsictl/ (props changed) stable/10/usr.bin/procstat/ (props changed) stable/10/usr.sbin/ (props changed) stable/10/usr.sbin/bhyve/ (props changed) stable/10/usr.sbin/bhyvectl/ (props changed) stable/10/usr.sbin/bhyveload/ (props changed) stable/10/usr.sbin/bsdconfig/ (props changed) stable/10/usr.sbin/bsdinstall/ (props changed) stable/10/usr.sbin/ctladm/ (props changed) stable/10/usr.sbin/ctld/ (props changed) stable/10/usr.sbin/freebsd-update/ (props changed) stable/10/usr.sbin/jail/ (props changed) stable/10/usr.sbin/mergemaster/ (props changed) stable/10/usr.sbin/mount_smbfs/ (props changed) stable/10/usr.sbin/ndiscvt/ (props changed) stable/10/usr.sbin/pkg/ (props changed) stable/10/usr.sbin/rtadvctl/ (props changed) stable/10/usr.sbin/rtadvd/ (props changed) stable/10/usr.sbin/rtsold/ (props changed) stable/10/usr.sbin/zic/ (props changed)