From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 00:34:22 2014 Return-Path: Delivered-To: svn-src-all@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 8E73F96; Sun, 9 Feb 2014 00:34: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 5EE831DAF; Sun, 9 Feb 2014 00:34:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s190YM5l081997; Sun, 9 Feb 2014 00:34:22 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s190YMQf081996; Sun, 9 Feb 2014 00:34:22 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201402090034.s190YMQf081996@svn.freebsd.org> From: Dimitry Andric Date: Sun, 9 Feb 2014 00:34:22 +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: r261644 - stable/10/lib/libcxxrt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 00:34:22 -0000 Author: dim Date: Sun Feb 9 00:34:21 2014 New Revision: 261644 URL: http://svnweb.freebsd.org/changeset/base/261644 Log: MFC r260553 (by theraven): Add missing C++11 typeinfos to the libcxxrt version script. PR: 185663 Modified: stable/10/lib/libcxxrt/Version.map Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libcxxrt/Version.map ============================================================================== --- stable/10/lib/libcxxrt/Version.map Sat Feb 8 23:54:16 2014 (r261643) +++ stable/10/lib/libcxxrt/Version.map Sun Feb 9 00:34:21 2014 (r261644) @@ -111,6 +111,19 @@ CXXABI_1.3 { "typeinfo for void"; "typeinfo for wchar_t const*"; "typeinfo for wchar_t"; + # C++11 typeinfo not understood by our linker + # std::nullptr_t + _ZTIDn;_ZTIPDn;_ZTIPKDn; + # char16_t + _ZTIDi;_ZTIPDi;_ZTIPKDi; + # char32_t + _ZTIDs;_ZTIPDs;_ZTIPKDs; + # IEEE 754r decimal floating point + _ZTIDd;_ZTIPDd;_ZTIPKDd; + _ZTIDe;_ZTIPDe;_ZTIPKDe; + _ZTIDf;_ZTIPDf;_ZTIPKDf; + # IEEE 754r half-precision floating point + _ZTIDh;_ZTIPDh;_ZTIPKDh; "typeinfo for bool*"; "typeinfo for wchar_t*"; @@ -195,6 +208,19 @@ CXXABI_1.3 { "typeinfo name for void*"; "typeinfo name for unsigned int*"; "typeinfo name for float*"; + # C++11 typeinfo not understood by our linker + # std::nullptr_t + _ZTSDn;_ZTIPDn;_ZTIPKDn; + # char16_t + _ZTSDi;_ZTIPDi;_ZTIPKDi; + # char32_t + _ZTSDs;_ZTIPDs;_ZTIPKDs; + # IEEE 754r decimal floating point + _ZTSDd;_ZTIPDd;_ZTIPKDd; + _ZTSDe;_ZTIPDe;_ZTIPKDe; + _ZTSDf;_ZTIPDf;_ZTIPKDf; + # IEEE 754r half-precision floating point + _ZTSDh;_ZTIPDh;_ZTIPKDh; "typeinfo name for __cxxabiv1::__array_type_info"; "typeinfo name for __cxxabiv1::__class_type_info"; From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 00:37:18 2014 Return-Path: Delivered-To: svn-src-all@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 5D3BA1DF; Sun, 9 Feb 2014 00:37: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 37A511DC0; Sun, 9 Feb 2014 00:37:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s190bIZf082584; Sun, 9 Feb 2014 00:37:18 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s190bHP8082578; Sun, 9 Feb 2014 00:37:17 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201402090037.s190bHP8082578@svn.freebsd.org> From: Dimitry Andric Date: Sun, 9 Feb 2014 00:37:17 +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: r261645 - in stable/9: contrib/libcxxrt lib/libcxxrt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 00:37:18 -0000 Author: dim Date: Sun Feb 9 00:37:16 2014 New Revision: 261645 URL: http://svnweb.freebsd.org/changeset/base/261645 Log: MFC r255093 (by theraven): Don't use _Unwind_Backtrace() on ARM as it's currently missing from our libgcc_s. andrew@ has patches to add it, so this can be reverted and sync'd with upstream later. MFC r255815 (by theraven): Import a new libcxxrt. This fixes some potential crashing in the demangler. MFC r260553 (by theraven): Add missing C++11 typeinfos to the libcxxrt version script. PR: 185663 Modified: stable/9/contrib/libcxxrt/exception.cc stable/9/contrib/libcxxrt/libelftc_dem_gnu3.c stable/9/contrib/libcxxrt/typeinfo.cc stable/9/contrib/libcxxrt/unwind-itanium.h stable/9/lib/libcxxrt/Version.map Directory Properties: stable/9/contrib/libcxxrt/ (props changed) stable/9/lib/libcxxrt/ (props changed) Modified: stable/9/contrib/libcxxrt/exception.cc ============================================================================== --- stable/9/contrib/libcxxrt/exception.cc Sun Feb 9 00:34:21 2014 (r261644) +++ stable/9/contrib/libcxxrt/exception.cc Sun Feb 9 00:37:16 2014 (r261645) @@ -715,7 +715,9 @@ static void report_failure(_Unwind_Reaso if (status == 0) { free(demangled); } // Print a back trace if no handler is found. // TODO: Make this optional +#ifndef __arm__ _Unwind_Backtrace(trace, 0); +#endif break; } std::terminate(); Modified: stable/9/contrib/libcxxrt/libelftc_dem_gnu3.c ============================================================================== --- stable/9/contrib/libcxxrt/libelftc_dem_gnu3.c Sun Feb 9 00:34:21 2014 (r261644) +++ stable/9/contrib/libcxxrt/libelftc_dem_gnu3.c Sun Feb 9 00:37:16 2014 (r261645) @@ -405,6 +405,7 @@ static int cpp_demangle_read_expression_ const char *, size_t, const char *, size_t); static int cpp_demangle_read_function(struct cpp_demangle_data *, int *, struct vector_type_qualifier *); +static int cpp_demangle_local_source_name(struct cpp_demangle_data *ddata); static int cpp_demangle_read_local_name(struct cpp_demangle_data *); static int cpp_demangle_read_name(struct cpp_demangle_data *); static int cpp_demangle_read_nested_name(struct cpp_demangle_data *); @@ -453,13 +454,22 @@ __cxa_demangle_gnu3(const char *org) struct cpp_demangle_data ddata; ssize_t org_len; unsigned int limit; - char *rtn; + char *rtn = NULL; if (org == NULL) return (NULL); + org_len = strlen(org); + if (org_len > 11 && !strncmp(org, "_GLOBAL__I_", 11)) { + if ((rtn = malloc(org_len + 19)) == NULL) + return (NULL); + snprintf(rtn, org_len + 19, + "global constructors keyed to %s", org + 11); + return (rtn); + } + // Try demangling as a type for short encodings - if (((org_len = strlen(org)) < 2) || (org[0] != '_' || org[1] != 'Z' )) { + if ((org_len < 2) || (org[0] != '_' || org[1] != 'Z' )) { if (!cpp_demangle_data_init(&ddata, org)) return (NULL); if (!cpp_demangle_read_type(&ddata, 0)) @@ -467,13 +477,6 @@ __cxa_demangle_gnu3(const char *org) rtn = vector_str_get_flat(&ddata.output, (size_t *) NULL); goto clean; } - if (org_len > 11 && !strncmp(org, "_GLOBAL__I_", 11)) { - if ((rtn = malloc(org_len + 19)) == NULL) - return (NULL); - snprintf(rtn, org_len + 19, - "global constructors keyed to %s", org + 11); - return (rtn); - } if (!cpp_demangle_data_init(&ddata, org + 2)) @@ -604,13 +607,12 @@ cpp_demangle_push_fp(struct cpp_demangle return (0); rtn = 0; - if ((len = strlen(f)) > 0 && - cpp_demangle_push_str(ddata, f, len)) - rtn = 1; + if ((len = strlen(f)) > 0) + rtn = cpp_demangle_push_str(ddata, f, len); free(f); - return (0); + return (rtn); } static int @@ -655,6 +657,7 @@ cpp_demangle_push_subst_v(struct cpp_dem return (0); rtn = cpp_demangle_push_subst(ddata, str, str_len); + free(str); return (rtn); @@ -1868,9 +1871,18 @@ static int cpp_demangle_read_sname(struct cpp_demangle_data *ddata) { long len; + int err; if (ddata == NULL || cpp_demangle_read_number(ddata, &len) == 0 || - len <= 0 || cpp_demangle_push_str(ddata, ddata->cur, len) == 0) + len <= 0) + return (0); + + if (len == 12 && (memcmp("_GLOBAL__N_1", ddata->cur, 12) == 0)) + err = cpp_demangle_push_str(ddata, "(anonymous namespace)", 21); + else + err = cpp_demangle_push_str(ddata, ddata->cur, len); + + if (err == 0) return (0); assert(ddata->output.size > 0); @@ -2054,7 +2066,7 @@ clean: free(subst_str); vector_str_dest(&v); - return (1); + return (rtn); } static int @@ -2996,6 +3008,40 @@ cpp_demangle_read_uqname(struct cpp_dema if (ELFTC_ISDIGIT(*ddata->cur) != 0) return (cpp_demangle_read_sname(ddata)); + + /* local source name */ + if (*ddata->cur == 'L') + return (cpp_demangle_local_source_name(ddata)); + + return (1); +} + +/* + * Read local source name. + * + * References: + * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31775 + * http://gcc.gnu.org/viewcvs?view=rev&revision=124467 + */ +static int +cpp_demangle_local_source_name(struct cpp_demangle_data *ddata) +{ + /* L */ + if (ddata == NULL || *ddata->cur != 'L') + return (0); + ++ddata->cur; + + /* source name */ + if (!cpp_demangle_read_sname(ddata)) + return (0); + + /* discriminator */ + if (*ddata->cur == '_') { + ++ddata->cur; + while (ELFTC_ISDIGIT(*ddata->cur) != 0) + ++ddata->cur; + } + return (1); } Modified: stable/9/contrib/libcxxrt/typeinfo.cc ============================================================================== --- stable/9/contrib/libcxxrt/typeinfo.cc Sun Feb 9 00:34:21 2014 (r261644) +++ stable/9/contrib/libcxxrt/typeinfo.cc Sun Feb 9 00:37:16 2014 (r261645) @@ -86,7 +86,18 @@ extern "C" char* __cxa_demangle(const ch if (NULL != demangled) { size_t len = strlen(demangled); - buf = (char*)realloc(buf, len+1); + if (buf == NULL) + { + if (n) + { + *n = len; + } + return demangled; + } + if (*n < len+1) + { + buf = (char*)realloc(buf, len+1); + } if (0 != buf) { memcpy(buf, demangled, len); Modified: stable/9/contrib/libcxxrt/unwind-itanium.h ============================================================================== --- stable/9/contrib/libcxxrt/unwind-itanium.h Sun Feb 9 00:34:21 2014 (r261644) +++ stable/9/contrib/libcxxrt/unwind-itanium.h Sun Feb 9 00:37:16 2014 (r261645) @@ -80,7 +80,7 @@ struct _Unwind_Exception _Unwind_Exception_Cleanup_Fn exception_cleanup; unsigned long private_1; unsigned long private_2; - }; + } ; extern _Unwind_Reason_Code _Unwind_RaiseException (struct _Unwind_Exception *); extern _Unwind_Reason_Code _Unwind_ForcedUnwind (struct _Unwind_Exception *, Modified: stable/9/lib/libcxxrt/Version.map ============================================================================== --- stable/9/lib/libcxxrt/Version.map Sun Feb 9 00:34:21 2014 (r261644) +++ stable/9/lib/libcxxrt/Version.map Sun Feb 9 00:37:16 2014 (r261645) @@ -111,6 +111,19 @@ CXXABI_1.3 { "typeinfo for void"; "typeinfo for wchar_t const*"; "typeinfo for wchar_t"; + # C++11 typeinfo not understood by our linker + # std::nullptr_t + _ZTIDn;_ZTIPDn;_ZTIPKDn; + # char16_t + _ZTIDi;_ZTIPDi;_ZTIPKDi; + # char32_t + _ZTIDs;_ZTIPDs;_ZTIPKDs; + # IEEE 754r decimal floating point + _ZTIDd;_ZTIPDd;_ZTIPKDd; + _ZTIDe;_ZTIPDe;_ZTIPKDe; + _ZTIDf;_ZTIPDf;_ZTIPKDf; + # IEEE 754r half-precision floating point + _ZTIDh;_ZTIPDh;_ZTIPKDh; "typeinfo for bool*"; "typeinfo for wchar_t*"; @@ -195,6 +208,19 @@ CXXABI_1.3 { "typeinfo name for void*"; "typeinfo name for unsigned int*"; "typeinfo name for float*"; + # C++11 typeinfo not understood by our linker + # std::nullptr_t + _ZTSDn;_ZTIPDn;_ZTIPKDn; + # char16_t + _ZTSDi;_ZTIPDi;_ZTIPKDi; + # char32_t + _ZTSDs;_ZTIPDs;_ZTIPKDs; + # IEEE 754r decimal floating point + _ZTSDd;_ZTIPDd;_ZTIPKDd; + _ZTSDe;_ZTIPDe;_ZTIPKDe; + _ZTSDf;_ZTIPDf;_ZTIPKDf; + # IEEE 754r half-precision floating point + _ZTSDh;_ZTIPDh;_ZTIPKDh; "typeinfo name for __cxxabiv1::__array_type_info"; "typeinfo name for __cxxabiv1::__class_type_info"; From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 01:21:31 2014 Return-Path: Delivered-To: svn-src-all@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 A2DE078F; Sun, 9 Feb 2014 01:21:31 +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 7ECCF1188; Sun, 9 Feb 2014 01:21:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s191LVlK004857; Sun, 9 Feb 2014 01:21:31 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s191LUj2004851; Sun, 9 Feb 2014 01:21:30 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402090121.s191LUj2004851@svn.freebsd.org> From: Ian Lepore Date: Sun, 9 Feb 2014 01:21:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261646 - in head/sys/arm: at91 econa s3c2xx0 xscale/ixp425 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 01:21:31 -0000 Author: ian Date: Sun Feb 9 01:21:30 2014 New Revision: 261646 URL: http://svnweb.freebsd.org/changeset/base/261646 Log: Replace compile-time constant KERNPHYSADDR with abp_physaddr (determined at runtime) where it's trivial to do so. Another breadcrumb on the trail to a kernel that can be loaded at any 1MB boundary. Modified: head/sys/arm/at91/at91_machdep.c head/sys/arm/econa/econa_machdep.c head/sys/arm/s3c2xx0/s3c24x0_machdep.c head/sys/arm/xscale/ixp425/avila_machdep.c Modified: head/sys/arm/at91/at91_machdep.c ============================================================================== --- head/sys/arm/at91/at91_machdep.c Sun Feb 9 00:37:16 2014 (r261645) +++ head/sys/arm/at91/at91_machdep.c Sun Feb 9 01:21:30 2014 (r261646) @@ -471,7 +471,7 @@ initarm(struct arm_boot_params *abp) /* Define a macro to simplify memory allocation */ #define valloc_pages(var, np) \ alloc_pages((var).pv_va, (np)); \ - (var).pv_pa = (var).pv_va + (KERNPHYSADDR - KERNVIRTADDR); + (var).pv_pa = (var).pv_va + (abp->abp_physaddr - KERNVIRTADDR); #define alloc_pages(var, np) \ (var) = freemempos; \ @@ -491,7 +491,7 @@ initarm(struct arm_boot_params *abp) L2_TABLE_SIZE_REAL; kernel_pt_table[i].pv_pa = kernel_pt_table[i].pv_va - KERNVIRTADDR + - KERNPHYSADDR; + abp->abp_physaddr; } } /* Modified: head/sys/arm/econa/econa_machdep.c ============================================================================== --- head/sys/arm/econa/econa_machdep.c Sun Feb 9 00:37:16 2014 (r261645) +++ head/sys/arm/econa/econa_machdep.c Sun Feb 9 01:21:30 2014 (r261646) @@ -189,7 +189,7 @@ initarm(struct arm_boot_params *abp) /* Define a macro to simplify memory allocation */ #define valloc_pages(var, np) \ alloc_pages((var).pv_va, (np)); \ - (var).pv_pa = (var).pv_va + (KERNPHYSADDR - KERNVIRTADDR); + (var).pv_pa = (var).pv_va + (abp->abp_physaddr - KERNVIRTADDR); #define alloc_pages(var, np) \ (var) = freemempos; \ @@ -209,7 +209,7 @@ initarm(struct arm_boot_params *abp) L2_TABLE_SIZE_REAL; kernel_pt_table[loop].pv_pa = kernel_pt_table[loop].pv_va - KERNVIRTADDR + - KERNPHYSADDR; + abp->abp_physaddr; } } /* Modified: head/sys/arm/s3c2xx0/s3c24x0_machdep.c ============================================================================== --- head/sys/arm/s3c2xx0/s3c24x0_machdep.c Sun Feb 9 00:37:16 2014 (r261645) +++ head/sys/arm/s3c2xx0/s3c24x0_machdep.c Sun Feb 9 01:21:30 2014 (r261646) @@ -239,7 +239,7 @@ initarm(struct arm_boot_params *abp) /* Define a macro to simplify memory allocation */ #define valloc_pages(var, np) \ alloc_pages((var).pv_va, (np)); \ - (var).pv_pa = (var).pv_va + (KERNPHYSADDR - KERNVIRTADDR); + (var).pv_pa = (var).pv_va + (abp->abp_physaddr - KERNVIRTADDR); #define alloc_pages(var, np) \ (var) = freemempos; \ @@ -259,7 +259,7 @@ initarm(struct arm_boot_params *abp) L2_TABLE_SIZE_REAL; kernel_pt_table[loop].pv_pa = kernel_pt_table[loop].pv_va - KERNVIRTADDR + - KERNPHYSADDR; + abp->abp_physaddr; } } /* Modified: head/sys/arm/xscale/ixp425/avila_machdep.c ============================================================================== --- head/sys/arm/xscale/ixp425/avila_machdep.c Sun Feb 9 00:37:16 2014 (r261645) +++ head/sys/arm/xscale/ixp425/avila_machdep.c Sun Feb 9 01:21:30 2014 (r261646) @@ -92,11 +92,6 @@ __FBSDID("$FreeBSD$"); #include #include -/* kernel text starts where we were loaded at boot */ -#define KERNEL_TEXT_OFF (KERNPHYSADDR - PHYSADDR) -#define KERNEL_TEXT_BASE (KERNBASE + KERNEL_TEXT_OFF) -#define KERNEL_TEXT_PHYS (PHYSADDR + KERNEL_TEXT_OFF) - #define KERNEL_PT_SYS 0 /* Page table for mapping proc0 zero page */ #define KERNEL_PT_IO 1 #define KERNEL_PT_IO_NUM 3 @@ -221,6 +216,11 @@ initarm(struct arm_boot_params *abp) vm_offset_t lastaddr; uint32_t memsize; + /* kernel text starts where we were loaded at boot */ +#define KERNEL_TEXT_OFF (abp->abp_physaddr - PHYSADDR) +#define KERNEL_TEXT_BASE (KERNBASE + KERNEL_TEXT_OFF) +#define KERNEL_TEXT_PHYS (PHYSADDR + KERNEL_TEXT_OFF) + lastaddr = parse_boot_param(abp); set_cpufuncs(); /* NB: sets cputype */ pcpu_init(pcpup, 0, sizeof(struct pcpu)); @@ -238,7 +238,7 @@ initarm(struct arm_boot_params *abp) * write-through). Note this leaves a gap for expansion * (or might be repurposed). */ - freemempos = KERNPHYSADDR; + freemempos = abp->abp_physaddr; /* macros to simplify initial memory allocation */ #define alloc_pages(var, np) do { \ @@ -249,7 +249,7 @@ initarm(struct arm_boot_params *abp) } while (0) #define valloc_pages(var, np) do { \ alloc_pages((var).pv_pa, (np)); \ - (var).pv_va = (var).pv_pa + (KERNVIRTADDR - KERNPHYSADDR); \ + (var).pv_va = (var).pv_pa + (KERNVIRTADDR - abp->abp_physaddr); \ } while (0) /* force L1 page table alignment */ @@ -268,7 +268,7 @@ initarm(struct arm_boot_params *abp) L2_TABLE_SIZE_REAL; kernel_pt_table[loop].pv_va = kernel_pt_table[loop].pv_pa + - (KERNVIRTADDR - KERNPHYSADDR); + (KERNVIRTADDR - abp->abp_physaddr); } } freemem_pt = freemempos; /* base of allocated pt's */ From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 01:59:53 2014 Return-Path: Delivered-To: svn-src-all@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 8B125E90; Sun, 9 Feb 2014 01:59: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 759EB1365; Sun, 9 Feb 2014 01:59:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s191xrUJ020103; Sun, 9 Feb 2014 01:59:53 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s191xr5r020102; Sun, 9 Feb 2014 01:59:53 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201402090159.s191xr5r020102@svn.freebsd.org> From: Alan Cox Date: Sun, 9 Feb 2014 01:59:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261647 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 01:59:53 -0000 Author: alc Date: Sun Feb 9 01:59:52 2014 New Revision: 261647 URL: http://svnweb.freebsd.org/changeset/base/261647 Log: Don't call vm_fault_prefault() on zero-fill faults. It's a waste of time. Successful prefaults after a zero-fill fault are extremely rare. Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Sun Feb 9 01:21:30 2014 (r261646) +++ head/sys/vm/vm_fault.c Sun Feb 9 01:59:52 2014 (r261647) @@ -652,6 +652,8 @@ vnode_locked: } PCPU_INC(cnt.v_zfod); fs.m->valid = VM_PAGE_BITS_ALL; + /* Don't try to prefault neighboring pages. */ + faultcount = 1; break; /* break to PAGE HAS BEEN FOUND */ } else { KASSERT(fs.object != next_object, @@ -897,7 +899,8 @@ vnode_locked: * won't find it (yet). */ pmap_enter(fs.map->pmap, vaddr, fault_type, fs.m, prot, wired); - if ((fault_flags & VM_FAULT_CHANGE_WIRING) == 0 && wired == 0) + if (faultcount != 1 && (fault_flags & VM_FAULT_CHANGE_WIRING) == 0 && + wired == 0) vm_fault_prefault(&fs, vaddr, faultcount, reqpage); VM_OBJECT_WLOCK(fs.object); vm_page_lock(fs.m); From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 02:06:12 2014 Return-Path: Delivered-To: svn-src-all@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 B1696DB; Sun, 9 Feb 2014 02:06:12 +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 9AF4F141A; Sun, 9 Feb 2014 02:06:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1926CiD024429; Sun, 9 Feb 2014 02:06:12 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1926CwW024428; Sun, 9 Feb 2014 02:06:12 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402090206.s1926CwW024428@svn.freebsd.org> From: Ian Lepore Date: Sun, 9 Feb 2014 02:06:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261648 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 02:06:12 -0000 Author: ian Date: Sun Feb 9 02:06:12 2014 New Revision: 261648 URL: http://svnweb.freebsd.org/changeset/base/261648 Log: Calculate the kernel's load address from the PC in the elf / gzip trampoline instead of relying on KERNPHYSADDR as a compile-time constant. Modified: head/sys/arm/arm/elf_trampoline.c Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Sun Feb 9 01:59:52 2014 (r261647) +++ head/sys/arm/arm/elf_trampoline.c Sun Feb 9 02:06:12 2014 (r261648) @@ -186,14 +186,20 @@ static void arm9_setup(void); void _startC(void) { - int physaddr = KERNPHYSADDR; int tmp1; unsigned int sp = ((unsigned int)&_end & ~3) + 4; -#if defined(FLASHADDR) && defined(PHYSADDR) && defined(LOADERRAMADDR) - unsigned int pc; + unsigned int pc, kernphysaddr; + /* + * Figure out the physical address the kernel was loaded at. This + * assumes the entry point (this code right here) is in the first page, + * which will always be the case for this trampoline code. + */ __asm __volatile("mov %0, pc\n" : "=r" (pc)); + kernphysaddr = pc & ~PAGE_MASK; + +#if defined(FLASHADDR) && defined(PHYSADDR) && defined(LOADERRAMADDR) if ((FLASHADDR > LOADERRAMADDR && pc >= FLASHADDR) || (FLASHADDR < LOADERRAMADDR && pc < LOADERRAMADDR)) { /* @@ -247,7 +253,7 @@ _startC(void) "mov pc, %0\n" "2: nop\n" "mov sp, %2\n" - : "=r" (tmp1), "+r" (physaddr), "+r" (sp)); + : "=r" (tmp1), "+r" (kernphysaddr), "+r" (sp)); #ifndef KZIP #ifdef CPU_ARM9 /* So that idcache_wbinv works; */ From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 02:39:04 2014 Return-Path: Delivered-To: svn-src-all@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 1346A714; Sun, 9 Feb 2014 02:39: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 F08EA1655; Sun, 9 Feb 2014 02:39:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s192d3ow039426; Sun, 9 Feb 2014 02:39:03 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s192d1bo039399; Sun, 9 Feb 2014 02:39:01 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402090239.s192d1bo039399@svn.freebsd.org> From: Ian Lepore Date: Sun, 9 Feb 2014 02:39:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261649 - in head/sys/arm: arm at91 econa include s3c2xx0 sa11x0 xscale/i80321 xscale/i8134x xscale/ixp425 xscale/pxa X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 02:39:04 -0000 Author: ian Date: Sun Feb 9 02:39:00 2014 New Revision: 261649 URL: http://svnweb.freebsd.org/changeset/base/261649 Log: It turns out a global variable is the only straightforward way to communicate the kernel's physical load address from where it's known in initarm() into cpu_mp_start() which is called from non-arm code and takes no parameters. This adds the global variable and ensures that all the various copies of initarm() set it. It uses the variable in cpu_mp_start(), eliminating the last uses of KERNPHYSADDR outside of locore.S (where we can now calculate it instead of relying on the constant). Modified: head/sys/arm/arm/machdep.c head/sys/arm/arm/mp_machdep.c head/sys/arm/arm/physmem.c head/sys/arm/at91/at91_machdep.c head/sys/arm/econa/econa_machdep.c head/sys/arm/include/physmem.h head/sys/arm/s3c2xx0/s3c24x0_machdep.c head/sys/arm/sa11x0/assabet_machdep.c head/sys/arm/xscale/i80321/ep80219_machdep.c head/sys/arm/xscale/i80321/iq31244_machdep.c head/sys/arm/xscale/i8134x/crb_machdep.c head/sys/arm/xscale/ixp425/avila_machdep.c head/sys/arm/xscale/pxa/pxa_machdep.c Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Sun Feb 9 02:06:12 2014 (r261648) +++ head/sys/arm/arm/machdep.c Sun Feb 9 02:39:00 2014 (r261649) @@ -1032,6 +1032,8 @@ initarm(struct arm_boot_params *abp) int i, j, err_devmap, mem_regions_sz; lastaddr = parse_boot_param(abp); + arm_physmem_kernaddr = abp->abp_physaddr; + memsize = 0; set_cpufuncs(); Modified: head/sys/arm/arm/mp_machdep.c ============================================================================== --- head/sys/arm/arm/mp_machdep.c Sun Feb 9 02:06:12 2014 (r261648) +++ head/sys/arm/arm/mp_machdep.c Sun Feb 9 02:39:00 2014 (r261649) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #ifdef VFP @@ -120,16 +121,16 @@ cpu_mp_start(void) M_WAITOK | M_ZERO); temp_pagetable_va = (vm_offset_t)contigmalloc(L1_TABLE_SIZE, M_TEMP, 0, 0x0, 0xffffffff, L1_TABLE_SIZE, 0); - addr = KERNPHYSADDR; - addr_end = (vm_offset_t)&_end - KERNVIRTADDR + KERNPHYSADDR; + addr = arm_physmem_kernaddr; + addr_end = (vm_offset_t)&_end - KERNVIRTADDR + arm_physmem_kernaddr; addr_end &= ~L1_S_OFFSET; addr_end += L1_S_SIZE; bzero((void *)temp_pagetable_va, L1_TABLE_SIZE); - for (addr = KERNPHYSADDR; addr <= addr_end; addr += L1_S_SIZE) { + for (addr = arm_physmem_kernaddr; addr <= addr_end; addr += L1_S_SIZE) { ((int *)(temp_pagetable_va))[addr >> L1_S_SHIFT] = L1_TYPE_S|L1_SHARED|L1_S_C|L1_S_AP(AP_KRW)|L1_S_DOM(PMAP_DOMAIN_KERNEL)|addr; ((int *)(temp_pagetable_va))[(addr - - KERNPHYSADDR + KERNVIRTADDR) >> L1_S_SHIFT] = + arm_physmem_kernaddr + KERNVIRTADDR) >> L1_S_SHIFT] = L1_TYPE_S|L1_SHARED|L1_S_C|L1_S_AP(AP_KRW)|L1_S_DOM(PMAP_DOMAIN_KERNEL)|addr; } Modified: head/sys/arm/arm/physmem.c ============================================================================== --- head/sys/arm/arm/physmem.c Sun Feb 9 02:06:12 2014 (r261648) +++ head/sys/arm/arm/physmem.c Sun Feb 9 02:39:00 2014 (r261649) @@ -89,6 +89,9 @@ vm_paddr_t dump_avail[MAX_AVAIL_ENTRIES /* This is the total number of hardware pages, excluded or not. */ long realmem; +/* The address at which the kernel was loaded. Set early in initarm(). */ +vm_offset_t arm_physmem_kernaddr; + /* * Print the contents of the physical and excluded region tables using the * provided printf-like output function (which will be either printf or Modified: head/sys/arm/at91/at91_machdep.c ============================================================================== --- head/sys/arm/at91/at91_machdep.c Sun Feb 9 02:06:12 2014 (r261648) +++ head/sys/arm/at91/at91_machdep.c Sun Feb 9 02:39:00 2014 (r261649) @@ -461,6 +461,7 @@ initarm(struct arm_boot_params *abp) vm_offset_t lastaddr; lastaddr = parse_boot_param(abp); + arm_physmem_kernaddr = abp->abp_physaddr; set_cpufuncs(); pcpu0_init(); Modified: head/sys/arm/econa/econa_machdep.c ============================================================================== --- head/sys/arm/econa/econa_machdep.c Sun Feb 9 02:06:12 2014 (r261648) +++ head/sys/arm/econa/econa_machdep.c Sun Feb 9 02:39:00 2014 (r261649) @@ -178,6 +178,7 @@ initarm(struct arm_boot_params *abp) boothowto = RB_VERBOSE; lastaddr = parse_boot_param(abp); + arm_physmem_kernaddr = abp->abp_physaddr; set_cpufuncs(); pcpu0_init(); Modified: head/sys/arm/include/physmem.h ============================================================================== --- head/sys/arm/include/physmem.h Sun Feb 9 02:06:12 2014 (r261648) +++ head/sys/arm/include/physmem.h Sun Feb 9 02:39:00 2014 (r261649) @@ -30,6 +30,11 @@ #define _MACHINE_PHYSMEM_H_ /* + * The physical address at which the kernel was loaded. + */ +extern vm_offset_t arm_physmem_kernaddr; + +/* * Routines to help configure physical ram. * * Multiple regions of contiguous physical ram can be added (in any order). Modified: head/sys/arm/s3c2xx0/s3c24x0_machdep.c ============================================================================== --- head/sys/arm/s3c2xx0/s3c24x0_machdep.c Sun Feb 9 02:06:12 2014 (r261648) +++ head/sys/arm/s3c2xx0/s3c24x0_machdep.c Sun Feb 9 02:39:00 2014 (r261649) @@ -225,6 +225,7 @@ initarm(struct arm_boot_params *abp) boothowto = 0; /* Likely not needed */ lastaddr = parse_boot_param(abp); + arm_physmem_kernaddr = abp->abp_physaddr; i = 0; set_cpufuncs(); cpufuncs.cf_sleep = s3c24x0_sleep; Modified: head/sys/arm/sa11x0/assabet_machdep.c ============================================================================== --- head/sys/arm/sa11x0/assabet_machdep.c Sun Feb 9 02:06:12 2014 (r261648) +++ head/sys/arm/sa11x0/assabet_machdep.c Sun Feb 9 02:39:00 2014 (r261649) @@ -87,6 +87,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include + #include #include @@ -200,6 +202,7 @@ initarm(struct arm_boot_params *abp) boothowto = RB_VERBOSE | RB_SINGLE; /* Default value */ lastaddr = parse_boot_param(abp); + arm_physmem_kernaddr = abp->abp_physaddr; cninit(); set_cpufuncs(); physmem = memsize / PAGE_SIZE; Modified: head/sys/arm/xscale/i80321/ep80219_machdep.c ============================================================================== --- head/sys/arm/xscale/i80321/ep80219_machdep.c Sun Feb 9 02:06:12 2014 (r261648) +++ head/sys/arm/xscale/i80321/ep80219_machdep.c Sun Feb 9 02:39:00 2014 (r261649) @@ -86,6 +86,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -175,6 +176,7 @@ initarm(struct arm_boot_params *abp) uint32_t memsize, memstart; lastaddr = parse_boot_param(abp); + arm_physmem_kernaddr = abp->abp_physaddr; set_cpufuncs(); pcpu_init(pcpup, 0, sizeof(struct pcpu)); PCPU_SET(curthread, &thread0); Modified: head/sys/arm/xscale/i80321/iq31244_machdep.c ============================================================================== --- head/sys/arm/xscale/i80321/iq31244_machdep.c Sun Feb 9 02:06:12 2014 (r261648) +++ head/sys/arm/xscale/i80321/iq31244_machdep.c Sun Feb 9 02:39:00 2014 (r261649) @@ -72,6 +72,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -176,6 +177,7 @@ initarm(struct arm_boot_params *abp) uint32_t memsize, memstart; lastaddr = parse_boot_param(abp); + arm_physmem_kernaddr = abp->abp_physaddr; set_cpufuncs(); pcpu_init(pcpup, 0, sizeof(struct pcpu)); PCPU_SET(curthread, &thread0); Modified: head/sys/arm/xscale/i8134x/crb_machdep.c ============================================================================== --- head/sys/arm/xscale/i8134x/crb_machdep.c Sun Feb 9 02:06:12 2014 (r261648) +++ head/sys/arm/xscale/i8134x/crb_machdep.c Sun Feb 9 02:39:00 2014 (r261649) @@ -86,6 +86,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -175,6 +176,7 @@ initarm(struct arm_boot_params *abp) uint32_t memsize, memstart; lastaddr = parse_boot_param(abp); + arm_physmem_kernaddr = abp->abp_physaddr; set_cpufuncs(); pcpu_init(pcpup, 0, sizeof(struct pcpu)); PCPU_SET(curthread, &thread0); Modified: head/sys/arm/xscale/ixp425/avila_machdep.c ============================================================================== --- head/sys/arm/xscale/ixp425/avila_machdep.c Sun Feb 9 02:06:12 2014 (r261648) +++ head/sys/arm/xscale/ixp425/avila_machdep.c Sun Feb 9 02:39:00 2014 (r261649) @@ -222,6 +222,7 @@ initarm(struct arm_boot_params *abp) #define KERNEL_TEXT_PHYS (PHYSADDR + KERNEL_TEXT_OFF) lastaddr = parse_boot_param(abp); + arm_physmem_kernaddr = abp->abp_physaddr; set_cpufuncs(); /* NB: sets cputype */ pcpu_init(pcpup, 0, sizeof(struct pcpu)); PCPU_SET(curthread, &thread0); Modified: head/sys/arm/xscale/pxa/pxa_machdep.c ============================================================================== --- head/sys/arm/xscale/pxa/pxa_machdep.c Sun Feb 9 02:06:12 2014 (r261648) +++ head/sys/arm/xscale/pxa/pxa_machdep.c Sun Feb 9 02:39:00 2014 (r261649) @@ -88,6 +88,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -157,6 +158,7 @@ initarm(struct arm_boot_params *abp) uint32_t memsize[PXA2X0_SDRAM_BANKS], memstart[PXA2X0_SDRAM_BANKS]; lastaddr = parse_boot_param(abp); + arm_physmem_kernaddr = abp->abp_physaddr; set_cpufuncs(); pcpu_init(pcpup, 0, sizeof(struct pcpu)); PCPU_SET(curthread, &thread0); From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 08:13:18 2014 Return-Path: Delivered-To: svn-src-all@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 A7D664D8; Sun, 9 Feb 2014 08:13: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 78C8C1FA4; Sun, 9 Feb 2014 08:13:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s198DIGk096217; Sun, 9 Feb 2014 08:13:18 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s198DH7N096214; Sun, 9 Feb 2014 08:13:17 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201402090813.s198DH7N096214@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 9 Feb 2014 08:13:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261650 - in head/sys: net netinet netinet/cc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 08:13:18 -0000 Author: trociny Date: Sun Feb 9 08:13:17 2014 New Revision: 261650 URL: http://svnweb.freebsd.org/changeset/base/261650 Log: Fixup for r261590 (vnet sysctl handlers cleanup). Reviewed by: glebius Modified: head/sys/net/vnet.h head/sys/netinet/cc/cc_cdg.c head/sys/netinet/sctp_sysctl.c Modified: head/sys/net/vnet.h ============================================================================== --- head/sys/net/vnet.h Sun Feb 9 02:39:00 2014 (r261649) +++ head/sys/net/vnet.h Sun Feb 9 08:13:17 2014 (r261650) @@ -303,7 +303,7 @@ void vnet_data_free(void *start_arg, in descr) \ SYSCTL_OID(parent, nbr, name, \ CTLTYPE_OPAQUE|CTLFLAG_VNET|(access), ptr, len, \ - vnet_sysctl_handle_opaque, fmt, descr) + sysctl_handle_opaque, fmt, descr) #define SYSCTL_VNET_STRING(parent, nbr, name, access, arg, len, descr) \ SYSCTL_OID(parent, nbr, name, \ CTLTYPE_STRING|CTLFLAG_VNET|(access), \ Modified: head/sys/netinet/cc/cc_cdg.c ============================================================================== --- head/sys/netinet/cc/cc_cdg.c Sun Feb 9 02:39:00 2014 (r261649) +++ head/sys/netinet/cc/cc_cdg.c Sun Feb 9 08:13:17 2014 (r261650) @@ -81,11 +81,6 @@ __FBSDID("$FreeBSD$"); #define CAST_PTR_INT(X) (*((int*)(X))) -#ifndef VIMAGE -#define vnet_sysctl_handle_uint(oidp, arg1, arg2, req) \ - sysctl_handle_int(oidp, arg1, arg2, req) -#endif - /* Private delay-gradient induced congestion control signal. */ #define CC_CDG_DELAY 0x01000000 @@ -357,7 +352,7 @@ cdg_beta_handler(SYSCTL_HANDLER_ARGS) (CAST_PTR_INT(req->newptr) == 0 || CAST_PTR_INT(req->newptr) > 100)) return (EINVAL); - return (vnet_sysctl_handle_uint(oidp, arg1, arg2, req)); + return (sysctl_handle_int(oidp, arg1, arg2, req)); } static int @@ -367,7 +362,7 @@ cdg_exp_backoff_scale_handler(SYSCTL_HAN if (req->newptr != NULL && CAST_PTR_INT(req->newptr) < 1) return (EINVAL); - return (vnet_sysctl_handle_uint(oidp, arg1, arg2, req)); + return (sysctl_handle_int(oidp, arg1, arg2, req)); } static inline unsigned long Modified: head/sys/netinet/sctp_sysctl.c ============================================================================== --- head/sys/netinet/sctp_sysctl.c Sun Feb 9 02:39:00 2014 (r261649) +++ head/sys/netinet/sctp_sysctl.c Sun Feb 9 08:13:17 2014 (r261650) @@ -587,11 +587,7 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS) { int error; -#ifdef VIMAGE - error = vnet_sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req); -#else error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req); -#endif if (error == 0) { RANGECHK(SCTP_BASE_SYSCTL(sctp_sendspace), SCTPCTL_MAXDGRAM_MIN, SCTPCTL_MAXDGRAM_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_recvspace), SCTPCTL_RECVSPACE_MIN, SCTPCTL_RECVSPACE_MAX); From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 12:03:22 2014 Return-Path: Delivered-To: svn-src-all@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 3E74FF40; Sun, 9 Feb 2014 12:03:22 +0000 (UTC) Received: from mail-ea0-x231.google.com (mail-ea0-x231.google.com [IPv6:2a00:1450:4013:c01::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D17851FEE; Sun, 9 Feb 2014 12:03:20 +0000 (UTC) Received: by mail-ea0-f177.google.com with SMTP id n15so2428363ead.8 for ; Sun, 09 Feb 2014 04:03:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=OC7eYr4YdN4JTElj0Hn6QCeBwFWASii4XEoTwp4kp3A=; b=puSeKDpjsUzaUKDxHz1dPhNqmjFbrMorEXL4pk48VYqd+2EV1LZ98J9E86o/5Smi0i 2DvvHKyW7w2ORrLF86kTMxQHyU9AvQZhzqx/jo/8UQZ5zObxkIyFfmW2VuwyTinpW2SL /eyVerlFlJY3QeCJEW+eKiEchNZmctGlhHjR6rgIvD5cQWsjRrIe1UOXFl14eBi4O0wG D8274XVX/eNVqhGaT+nv6h4U0lcjh5uwtgRM2kJJrT6HQIFcpBLGbWpgYfngT4CGd2v0 yQ2ByxYhY9K0LSrpPeRS+C31bnPnjoYsPR4GcPvlnkRtXUFKS78aufLjPPK94sxmR7MY z5aw== X-Received: by 10.15.107.77 with SMTP id ca53mr2749545eeb.59.1391947399346; Sun, 09 Feb 2014 04:03:19 -0800 (PST) Received: from strashydlo.home (adfl20.neoplus.adsl.tpnet.pl. [79.184.115.20]) by mx.google.com with ESMTPSA id o45sm27226511eeb.18.2014.02.09.04.03.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 09 Feb 2014 04:03:18 -0800 (PST) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Subject: Re: svn commit: r261266 - in head: sys/dev/drm sys/kern sys/sys usr.sbin/jail Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=iso-8859-2 From: =?iso-8859-2?Q?Edward_Tomasz_Napiera=B3a?= In-Reply-To: <52F0EFE8.7030105@freebsd.org> Date: Sun, 9 Feb 2014 13:03:16 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <67AD08A6-BFB3-487A-B401-4AD180F4CF79@FreeBSD.org> References: <201401291341.s0TDfDcB068211@svn.freebsd.org> <20140129134344.GW66160@FreeBSD.org> <52E906CD.9050202@freebsd.org> <20140129222210.0000711f@unknown> <20140131223011.0000163b@unknown> <52EC4DBB.50804@freebsd.org> <20140203235336.GA46006@ambrisko.com> <6AF2ADA6-8BAD-4875-8B15-A859B41DDCC0@FreeBSD.org> <52F0E9E9.2080402@freebsd.org> <52F0EFE8.7030105@freebsd.org> To: James Gritton X-Mailer: Apple Mail (2.1283) Cc: src-committers@FreeBSD.org, Doug Ambrisko , svn-src-all@FreeBSD.org, Gleb Smirnoff , "Robert N. M. Watson" , svn-src-head@FreeBSD.org, Alexander Leidinger , Julian Elischer X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 12:03:22 -0000 Wiadomo=B6=E6 napisana przez James Gritton w dniu 4 lut 2014, o godz. = 14:49: > On 2/4/2014 6:23 AM, Julian Elischer wrote: >> On 2/4/14, 3:40 PM, Robert N. M. Watson wrote: >>> On 3 Feb 2014, at 23:53, Doug Ambrisko = wrote: >>>=20 >>>> It's unfortunate that vimage requires jail. I want to use vimage = but >>>> not have the security restrictions of a jail. To do this I patched >>>> jail to basically let everything through. It would be nice to be >>>> able to run jail in an insecure mode which I understand is a = contradition. >>>> I do use the jail infrastructure to set the uname*/getosreldate so >>>> that a specific jail thinks it is FreeBSD version blah. Then I can = ssh >>>> into that jail and pkg_add things, make ports etc. I use this on >>>> my laptop running current on the base. My other jails run various >>>> versions of FreeBSD. I don't care about security in this case. >>=20 >> vimage was not originally tied to jails. I can't remember why we = decided to do that :-) >=20 > Leaving the smiley aside for the present, I remember that one - and > it's closely tied to this discussion. It was part of this more > flexible vision of jails that had added features, of which security > was just one (optional) part. I thought of them as a more general > encapsulation framework as needs would arise. Just for the record, that's the exact same reason I didn't invent yet = another encapsulation mechanism for RCTL - the idea was to use jails when you = need any kind of nested hierarchy. --=20 If you cut off my head, what would I say? Me and my head, or me and my = body? From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 12:52:40 2014 Return-Path: Delivered-To: svn-src-all@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 49A7855A; Sun, 9 Feb 2014 12:52:40 +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 35BEC1357; Sun, 9 Feb 2014 12:52:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19Cqe55019824; Sun, 9 Feb 2014 12:52:40 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19Cqe4S019823; Sun, 9 Feb 2014 12:52:40 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201402091252.s19Cqe4S019823@svn.freebsd.org> From: Andrew Turner Date: Sun, 9 Feb 2014 12:52:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261651 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 12:52:40 -0000 Author: andrew Date: Sun Feb 9 12:52:39 2014 New Revision: 261651 URL: http://svnweb.freebsd.org/changeset/base/261651 Log: Remove the now unused MMU_INIT macro. Modified: head/sys/arm/arm/locore.S Modified: head/sys/arm/arm/locore.S ============================================================================== --- head/sys/arm/arm/locore.S Sun Feb 9 08:13:17 2014 (r261650) +++ head/sys/arm/arm/locore.S Sun Feb 9 12:52:39 2014 (r261651) @@ -277,11 +277,6 @@ build_pagetables: RET -#define MMU_INIT(va,pa,n_sec,attr) \ - .word n_sec ; \ - .word 4*((va)>>L1_S_SHIFT) ; \ - .word (pa)|(attr) ; - Lvirtaddr: .word KERNVIRTADDR Lphysaddr: From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 13:50:09 2014 Return-Path: Delivered-To: svn-src-all@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 5D16B300; Sun, 9 Feb 2014 13:50: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 2A9F81711; Sun, 9 Feb 2014 13:50:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19Do9I5040767; Sun, 9 Feb 2014 13:50:09 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19Do8EM040762; Sun, 9 Feb 2014 13:50:08 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201402091350.s19Do8EM040762@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 9 Feb 2014 13:50: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: r261652 - in stable/9/sys: dev/drm2 modules/drm2/drm2 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 13:50:09 -0000 Author: dumbbell Date: Sun Feb 9 13:50:08 2014 New Revision: 261652 URL: http://svnweb.freebsd.org/changeset/base/261652 Log: MFC r254817: drm: Import drm_dp_helper.c from Linux 3.8-rc3 While here, update drm_dp_helper.h to better match Linux one. Added: stable/9/sys/dev/drm2/drm_dp_helper.c - copied unchanged from r254817, head/sys/dev/drm2/drm_dp_helper.c Modified: stable/9/sys/dev/drm2/drmP.h stable/9/sys/dev/drm2/drm_dp_helper.h stable/9/sys/modules/drm2/drm2/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/dev/drm2/drmP.h ============================================================================== --- stable/9/sys/dev/drm2/drmP.h Sun Feb 9 12:52:39 2014 (r261651) +++ stable/9/sys/dev/drm2/drmP.h Sun Feb 9 13:50:08 2014 (r261652) @@ -316,6 +316,9 @@ typedef int8_t s8; #define DRM_HZ hz #define DRM_UDELAY(udelay) DELAY(udelay) +#define DRM_MDELAY(msecs) do { int loops = (msecs); \ + while (loops--) DELAY(1000); \ + } while (0) #define DRM_TIME_SLICE (hz/20) /* Time slice for GLXContexts */ #define DRM_GET_PRIV_SAREA(_dev, _ctx, _map) do { \ Copied: stable/9/sys/dev/drm2/drm_dp_helper.c (from r254817, head/sys/dev/drm2/drm_dp_helper.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/dev/drm2/drm_dp_helper.c Sun Feb 9 13:50:08 2014 (r261652, copy of r254817, head/sys/dev/drm2/drm_dp_helper.c) @@ -0,0 +1,147 @@ +/* + * Copyright © 2009 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that copyright + * notice and this permission notice appear in supporting documentation, and + * that the name of the copyright holders not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no representations + * about the suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +/** + * DOC: dp helpers + * + * These functions contain some common logic and helpers at various abstraction + * levels to deal with Display Port sink devices and related things like DP aux + * channel transfers, EDID reading over DP aux channels, decoding certain DPCD + * blocks, ... + */ + +static u8 dp_link_status(u8 link_status[DP_LINK_STATUS_SIZE], int r) +{ + return link_status[r - DP_LANE0_1_STATUS]; +} + +static u8 dp_get_lane_status(u8 link_status[DP_LINK_STATUS_SIZE], + int lane) +{ + int i = DP_LANE0_1_STATUS + (lane >> 1); + int s = (lane & 1) * 4; + u8 l = dp_link_status(link_status, i); + return (l >> s) & 0xf; +} + +bool drm_dp_channel_eq_ok(u8 link_status[DP_LINK_STATUS_SIZE], + int lane_count) +{ + u8 lane_align; + u8 lane_status; + int lane; + + lane_align = dp_link_status(link_status, + DP_LANE_ALIGN_STATUS_UPDATED); + if ((lane_align & DP_INTERLANE_ALIGN_DONE) == 0) + return false; + for (lane = 0; lane < lane_count; lane++) { + lane_status = dp_get_lane_status(link_status, lane); + if ((lane_status & DP_CHANNEL_EQ_BITS) != DP_CHANNEL_EQ_BITS) + return false; + } + return true; +} + +bool drm_dp_clock_recovery_ok(u8 link_status[DP_LINK_STATUS_SIZE], + int lane_count) +{ + int lane; + u8 lane_status; + + for (lane = 0; lane < lane_count; lane++) { + lane_status = dp_get_lane_status(link_status, lane); + if ((lane_status & DP_LANE_CR_DONE) == 0) + return false; + } + return true; +} + +u8 drm_dp_get_adjust_request_voltage(u8 link_status[DP_LINK_STATUS_SIZE], + int lane) +{ + int i = DP_ADJUST_REQUEST_LANE0_1 + (lane >> 1); + int s = ((lane & 1) ? + DP_ADJUST_VOLTAGE_SWING_LANE1_SHIFT : + DP_ADJUST_VOLTAGE_SWING_LANE0_SHIFT); + u8 l = dp_link_status(link_status, i); + + return ((l >> s) & 0x3) << DP_TRAIN_VOLTAGE_SWING_SHIFT; +} + +u8 drm_dp_get_adjust_request_pre_emphasis(u8 link_status[DP_LINK_STATUS_SIZE], + int lane) +{ + int i = DP_ADJUST_REQUEST_LANE0_1 + (lane >> 1); + int s = ((lane & 1) ? + DP_ADJUST_PRE_EMPHASIS_LANE1_SHIFT : + DP_ADJUST_PRE_EMPHASIS_LANE0_SHIFT); + u8 l = dp_link_status(link_status, i); + + return ((l >> s) & 0x3) << DP_TRAIN_PRE_EMPHASIS_SHIFT; +} + +void drm_dp_link_train_clock_recovery_delay(u8 dpcd[DP_RECEIVER_CAP_SIZE]) { + if (dpcd[DP_TRAINING_AUX_RD_INTERVAL] == 0) + DRM_UDELAY(100); + else + DRM_MDELAY(dpcd[DP_TRAINING_AUX_RD_INTERVAL] * 4); +} + +void drm_dp_link_train_channel_eq_delay(u8 dpcd[DP_RECEIVER_CAP_SIZE]) { + if (dpcd[DP_TRAINING_AUX_RD_INTERVAL] == 0) + DRM_UDELAY(400); + else + DRM_MDELAY(dpcd[DP_TRAINING_AUX_RD_INTERVAL] * 4); +} + +u8 drm_dp_link_rate_to_bw_code(int link_rate) +{ + switch (link_rate) { + case 162000: + default: + return DP_LINK_BW_1_62; + case 270000: + return DP_LINK_BW_2_7; + case 540000: + return DP_LINK_BW_5_4; + } +} + +int drm_dp_bw_code_to_link_rate(u8 link_bw) +{ + switch (link_bw) { + case DP_LINK_BW_1_62: + default: + return 162000; + case DP_LINK_BW_2_7: + return 270000; + case DP_LINK_BW_5_4: + return 540000; + } +} Modified: stable/9/sys/dev/drm2/drm_dp_helper.h ============================================================================== --- stable/9/sys/dev/drm2/drm_dp_helper.h Sun Feb 9 12:52:39 2014 (r261651) +++ stable/9/sys/dev/drm2/drm_dp_helper.h Sun Feb 9 13:50:08 2014 (r261652) @@ -25,7 +25,19 @@ #ifndef _DRM_DP_HELPER_H_ #define _DRM_DP_HELPER_H_ -/* From the VESA DisplayPort spec */ +/* + * Unless otherwise noted, all values are from the DP 1.1a spec. Note that + * DP and DPCD versions are independent. Differences from 1.0 are not noted, + * 1.0 devices basically don't exist in the wild. + * + * Abbreviations, in chronological order: + * + * eDP: Embedded DisplayPort version 1 + * DPI: DisplayPort Interoperability Guideline v1.1a + * 1.2: DisplayPort 1.2 + * + * 1.2 formally includes both eDP and DPI definitions. + */ #define AUX_NATIVE_WRITE 0x8 #define AUX_NATIVE_READ 0x9 @@ -52,7 +64,7 @@ #define DP_MAX_LANE_COUNT 0x002 # define DP_MAX_LANE_COUNT_MASK 0x1f -# define DP_TPS3_SUPPORTED (1 << 6) +# define DP_TPS3_SUPPORTED (1 << 6) /* 1.2 */ # define DP_ENHANCED_FRAME_CAP (1 << 7) #define DP_MAX_DOWNSPREAD 0x003 @@ -68,14 +80,33 @@ /* 10b = TMDS or HDMI */ /* 11b = Other */ # define DP_FORMAT_CONVERSION (1 << 3) +# define DP_DETAILED_CAP_INFO_AVAILABLE (1 << 4) /* DPI */ #define DP_MAIN_LINK_CHANNEL_CODING 0x006 -#define DP_TRAINING_AUX_RD_INTERVAL 0x00e +#define DP_DOWN_STREAM_PORT_COUNT 0x007 +# define DP_PORT_COUNT_MASK 0x0f +# define DP_MSA_TIMING_PAR_IGNORED (1 << 6) /* eDP */ +# define DP_OUI_SUPPORT (1 << 7) + +#define DP_I2C_SPEED_CAP 0x00c /* DPI */ +# define DP_I2C_SPEED_1K 0x01 +# define DP_I2C_SPEED_5K 0x02 +# define DP_I2C_SPEED_10K 0x04 +# define DP_I2C_SPEED_100K 0x08 +# define DP_I2C_SPEED_400K 0x10 +# define DP_I2C_SPEED_1M 0x20 + +#define DP_EDP_CONFIGURATION_CAP 0x00d /* XXX 1.2? */ +#define DP_TRAINING_AUX_RD_INTERVAL 0x00e /* XXX 1.2? */ + +/* Multiple stream transport */ +#define DP_MSTM_CAP 0x021 /* 1.2 */ +# define DP_MST_CAP (1 << 0) -#define DP_PSR_SUPPORT 0x070 +#define DP_PSR_SUPPORT 0x070 /* XXX 1.2? */ # define DP_PSR_IS_SUPPORTED 1 -#define DP_PSR_CAPS 0x071 +#define DP_PSR_CAPS 0x071 /* XXX 1.2? */ # define DP_PSR_NO_TRAIN_ON_EXIT 1 # define DP_PSR_SETUP_TIME_330 (0 << 1) # define DP_PSR_SETUP_TIME_275 (1 << 1) @@ -87,11 +118,36 @@ # define DP_PSR_SETUP_TIME_MASK (7 << 1) # define DP_PSR_SETUP_TIME_SHIFT 1 +/* + * 0x80-0x8f describe downstream port capabilities, but there are two layouts + * based on whether DP_DETAILED_CAP_INFO_AVAILABLE was set. If it was not, + * each port's descriptor is one byte wide. If it was set, each port's is + * four bytes wide, starting with the one byte from the base info. As of + * DP interop v1.1a only VGA defines additional detail. + */ + +/* offset 0 */ +#define DP_DOWNSTREAM_PORT_0 0x80 +# define DP_DS_PORT_TYPE_MASK (7 << 0) +# define DP_DS_PORT_TYPE_DP 0 +# define DP_DS_PORT_TYPE_VGA 1 +# define DP_DS_PORT_TYPE_DVI 2 +# define DP_DS_PORT_TYPE_HDMI 3 +# define DP_DS_PORT_TYPE_NON_EDID 4 +# define DP_DS_PORT_HPD (1 << 3) +/* offset 1 for VGA is maximum megapixels per second / 8 */ +/* offset 2 */ +# define DP_DS_VGA_MAX_BPC_MASK (3 << 0) +# define DP_DS_VGA_8BPC 0 +# define DP_DS_VGA_10BPC 1 +# define DP_DS_VGA_12BPC 2 +# define DP_DS_VGA_16BPC 3 + /* link configuration */ #define DP_LINK_BW_SET 0x100 # define DP_LINK_BW_1_62 0x06 # define DP_LINK_BW_2_7 0x0a -# define DP_LINK_BW_5_4 0x14 +# define DP_LINK_BW_5_4 0x14 /* 1.2 */ #define DP_LANE_COUNT_SET 0x101 # define DP_LANE_COUNT_MASK 0x0f @@ -101,7 +157,7 @@ # define DP_TRAINING_PATTERN_DISABLE 0 # define DP_TRAINING_PATTERN_1 1 # define DP_TRAINING_PATTERN_2 2 -# define DP_TRAINING_PATTERN_3 3 +# define DP_TRAINING_PATTERN_3 3 /* 1.2 */ # define DP_TRAINING_PATTERN_MASK 0x3 # define DP_LINK_QUAL_PATTERN_DISABLE (0 << 2) @@ -142,16 +198,32 @@ #define DP_DOWNSPREAD_CTRL 0x107 # define DP_SPREAD_AMP_0_5 (1 << 4) +# define DP_MSA_TIMING_PAR_IGNORE_EN (1 << 7) /* eDP */ #define DP_MAIN_LINK_CHANNEL_CODING_SET 0x108 # define DP_SET_ANSI_8B10B (1 << 0) -#define DP_PSR_EN_CFG 0x170 +#define DP_I2C_SPEED_CONTROL_STATUS 0x109 /* DPI */ +/* bitmask as for DP_I2C_SPEED_CAP */ + +#define DP_EDP_CONFIGURATION_SET 0x10a /* XXX 1.2? */ + +#define DP_MSTM_CTRL 0x111 /* 1.2 */ +# define DP_MST_EN (1 << 0) +# define DP_UP_REQ_EN (1 << 1) +# define DP_UPSTREAM_IS_SRC (1 << 2) + +#define DP_PSR_EN_CFG 0x170 /* XXX 1.2? */ # define DP_PSR_ENABLE (1 << 0) # define DP_PSR_MAIN_LINK_ACTIVE (1 << 1) # define DP_PSR_CRC_VERIFICATION (1 << 2) # define DP_PSR_FRAME_CAPTURE (1 << 3) +#define DP_SINK_COUNT 0x200 +/* prior to 1.2 bit 7 was reserved mbz */ +# define DP_GET_SINK_COUNT(x) ((((x) & 0x80) >> 1) | ((x) & 0x3f)) +# define DP_SINK_CP_READY (1 << 6) + #define DP_DEVICE_SERVICE_IRQ_VECTOR 0x201 # define DP_REMOTE_CONTROL_COMMAND_PENDING (1 << 0) # define DP_AUTOMATED_TEST_REQUEST (1 << 1) @@ -209,18 +281,22 @@ # define DP_TEST_NAK (1 << 1) # define DP_TEST_EDID_CHECKSUM_WRITE (1 << 2) +#define DP_SOURCE_OUI 0x300 +#define DP_SINK_OUI 0x400 +#define DP_BRANCH_OUI 0x500 + #define DP_SET_POWER 0x600 # define DP_SET_POWER_D0 0x1 # define DP_SET_POWER_D3 0x2 -#define DP_PSR_ERROR_STATUS 0x2006 +#define DP_PSR_ERROR_STATUS 0x2006 /* XXX 1.2? */ # define DP_PSR_LINK_CRC_ERROR (1 << 0) # define DP_PSR_RFB_STORAGE_ERROR (1 << 1) -#define DP_PSR_ESI 0x2007 +#define DP_PSR_ESI 0x2007 /* XXX 1.2? */ # define DP_PSR_CAPS_CHANGE (1 << 0) -#define DP_PSR_STATUS 0x2008 +#define DP_PSR_STATUS 0x2008 /* XXX 1.2? */ # define DP_PSR_SINK_INACTIVE 0 # define DP_PSR_SINK_ACTIVE_SRC_SYNCED 1 # define DP_PSR_SINK_ACTIVE_RFB 2 @@ -247,4 +323,34 @@ int iic_dp_aux_add_bus(device_t dev, con int (*ch)(device_t idev, int mode, uint8_t write_byte, uint8_t *read_byte), void *priv, device_t *bus, device_t *adapter); + +#define DP_LINK_STATUS_SIZE 6 +bool drm_dp_channel_eq_ok(u8 link_status[DP_LINK_STATUS_SIZE], + int lane_count); +bool drm_dp_clock_recovery_ok(u8 link_status[DP_LINK_STATUS_SIZE], + int lane_count); +u8 drm_dp_get_adjust_request_voltage(u8 link_status[DP_LINK_STATUS_SIZE], + int lane); +u8 drm_dp_get_adjust_request_pre_emphasis(u8 link_status[DP_LINK_STATUS_SIZE], + int lane); + +#define DP_RECEIVER_CAP_SIZE 0xf +void drm_dp_link_train_clock_recovery_delay(u8 dpcd[DP_RECEIVER_CAP_SIZE]); +void drm_dp_link_train_channel_eq_delay(u8 dpcd[DP_RECEIVER_CAP_SIZE]); + +u8 drm_dp_link_rate_to_bw_code(int link_rate); +int drm_dp_bw_code_to_link_rate(u8 link_bw); + +static inline int +drm_dp_max_link_rate(u8 dpcd[DP_RECEIVER_CAP_SIZE]) +{ + return drm_dp_bw_code_to_link_rate(dpcd[DP_MAX_LINK_RATE]); +} + +static inline u8 +drm_dp_max_lane_count(u8 dpcd[DP_RECEIVER_CAP_SIZE]) +{ + return dpcd[DP_MAX_LANE_COUNT] & DP_MAX_LANE_COUNT_MASK; +} + #endif /* _DRM_DP_HELPER_H_ */ Modified: stable/9/sys/modules/drm2/drm2/Makefile ============================================================================== --- stable/9/sys/modules/drm2/drm2/Makefile Sun Feb 9 12:52:39 2014 (r261651) +++ stable/9/sys/modules/drm2/drm2/Makefile Sun Feb 9 13:50:08 2014 (r261652) @@ -11,6 +11,7 @@ SRCS = \ drm_crtc.c \ drm_crtc_helper.c \ drm_dma.c \ + drm_dp_helper.c \ drm_dp_iic_helper.c \ drm_drawable.c \ drm_drv.c \ From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 13:56:38 2014 Return-Path: Delivered-To: svn-src-all@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 86E636C0; Sun, 9 Feb 2014 13:56: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 711AB17B0; Sun, 9 Feb 2014 13:56:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19DucHc044167; Sun, 9 Feb 2014 13:56:38 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19DucdZ044165; Sun, 9 Feb 2014 13:56:38 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201402091356.s19DucdZ044165@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 9 Feb 2014 13:56:38 +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: r261653 - in stable/9/sys/dev/drm2: . i915 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 13:56:38 -0000 Author: dumbbell Date: Sun Feb 9 13:56:37 2014 New Revision: 261653 URL: http://svnweb.freebsd.org/changeset/base/261653 Log: MFC r254818: drm: Move definition of EREMOTEIO to drmP.h It will be used by both i915 and radeon drivers. Add ERESTARTSYS definition at the same time. Modified: stable/9/sys/dev/drm2/drmP.h stable/9/sys/dev/drm2/i915/intel_dp.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/drmP.h ============================================================================== --- stable/9/sys/dev/drm2/drmP.h Sun Feb 9 13:50:08 2014 (r261652) +++ stable/9/sys/dev/drm2/drmP.h Sun Feb 9 13:56:37 2014 (r261653) @@ -1405,5 +1405,10 @@ do { \ #define KTR_DRM KTR_DEV #define KTR_DRM_REG KTR_SPARE3 +/* Error codes conversion from Linux to FreeBSD. */ +/* XXXKIB what is the right code for EREMOTEIO on FreeBSD? */ +#define EREMOTEIO ENXIO +#define ERESTARTSYS ERESTART + #endif /* __KERNEL__ */ #endif /* _DRM_P_H_ */ Modified: stable/9/sys/dev/drm2/i915/intel_dp.c ============================================================================== --- stable/9/sys/dev/drm2/i915/intel_dp.c Sun Feb 9 13:50:08 2014 (r261652) +++ stable/9/sys/dev/drm2/i915/intel_dp.c Sun Feb 9 13:56:37 2014 (r261653) @@ -43,9 +43,6 @@ __FBSDID("$FreeBSD$"); #define DP_LINK_CONFIGURATION_SIZE 9 -/* XXXKIB what is the right code for the FreeBSD ? */ -#define EREMOTEIO ENXIO - struct intel_dp { struct intel_encoder base; uint32_t output_reg; From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 14:02:40 2014 Return-Path: Delivered-To: svn-src-all@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 09DC9A1F; Sun, 9 Feb 2014 14:02:40 +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 E4D19184B; Sun, 9 Feb 2014 14:02:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19E2dDo047817; Sun, 9 Feb 2014 14:02:39 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19E2dL2047816; Sun, 9 Feb 2014 14:02:39 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201402091402.s19E2dL2047816@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 9 Feb 2014 14:02:39 +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: r261654 - stable/9/sys/dev/drm2 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 14:02:40 -0000 Author: dumbbell Date: Sun Feb 9 14:02:39 2014 New Revision: 261654 URL: http://svnweb.freebsd.org/changeset/base/261654 Log: MFC r254819: drm: Don't delete already deleted iicbus child from drm_iic_dp_aux The iic_dp_aux_detach callback is therefore useless: it's replaced by bus_generic_detach. This fixes a "General protection fault" panic during second (incorrect) deletion of the child. Tested by: kwm@ Reviewed by: ray@ Modified: stable/9/sys/dev/drm2/drm_dp_iic_helper.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/drm_dp_iic_helper.c ============================================================================== --- stable/9/sys/dev/drm2/drm_dp_iic_helper.c Sun Feb 9 13:56:37 2014 (r261653) +++ stable/9/sys/dev/drm2/drm_dp_iic_helper.c Sun Feb 9 14:02:39 2014 (r261654) @@ -216,22 +216,6 @@ iic_dp_aux_attach(device_t idev) return (0); } -static int -iic_dp_aux_detach(device_t idev) -{ - struct iic_dp_aux_data *aux_data; - device_t port; - - aux_data = device_get_softc(idev); - - port = aux_data->port; - bus_generic_detach(idev); - if (port != NULL) - device_delete_child(idev, port); - - return (0); -} - int iic_dp_aux_add_bus(device_t dev, const char *name, int (*ch)(device_t idev, int mode, uint8_t write_byte, uint8_t *read_byte), @@ -277,7 +261,7 @@ iic_dp_aux_add_bus(device_t dev, const c static device_method_t drm_iic_dp_aux_methods[] = { DEVMETHOD(device_probe, iic_dp_aux_probe), DEVMETHOD(device_attach, iic_dp_aux_attach), - DEVMETHOD(device_detach, iic_dp_aux_detach), + DEVMETHOD(device_detach, bus_generic_detach), DEVMETHOD(iicbus_reset, iic_dp_aux_reset), DEVMETHOD(iicbus_transfer, iic_dp_aux_xfer), DEVMETHOD_END From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 14:28:48 2014 Return-Path: Delivered-To: svn-src-all@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 1D68BFE9; Sun, 9 Feb 2014 14:28: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 047A4197D; Sun, 9 Feb 2014 14:28:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19ESl2a056565; Sun, 9 Feb 2014 14:28:47 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19ESlFH056563; Sun, 9 Feb 2014 14:28:47 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402091428.s19ESlFH056563@svn.freebsd.org> From: Christian Brueffer Date: Sun, 9 Feb 2014 14:28:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261655 - in head/sbin: growfs newfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 14:28:48 -0000 Author: brueffer Date: Sun Feb 9 14:28:47 2014 New Revision: 261655 URL: http://svnweb.freebsd.org/changeset/base/261655 Log: Refer newfs and growfs users to fsck_ffs instead of fsck, the latter does not accept the referred to "-b" flag. This change was accidently committed directly to 9-STABLE in r237505. PR: 82720 Submitted by: David D.W. Downey MFC after: 1 week Modified: head/sbin/growfs/growfs.c head/sbin/newfs/mkfs.c Modified: head/sbin/growfs/growfs.c ============================================================================== --- head/sbin/growfs/growfs.c Sun Feb 9 14:02:39 2014 (r261654) +++ head/sbin/growfs/growfs.c Sun Feb 9 14:28:47 2014 (r261655) @@ -201,7 +201,7 @@ growfs(int fsi, int fso, unsigned int Nf * Now build the cylinders group blocks and * then print out indices of cylinder groups. */ - printf("super-block backups (for fsck -b #) at:\n"); + printf("super-block backups (for fsck_ffs -b #) at:\n"); i = 0; width = charsperline(); Modified: head/sbin/newfs/mkfs.c ============================================================================== --- head/sbin/newfs/mkfs.c Sun Feb 9 14:02:39 2014 (r261654) +++ head/sbin/newfs/mkfs.c Sun Feb 9 14:28:47 2014 (r261655) @@ -544,7 +544,7 @@ restart: * Now build the cylinders group blocks and * then print out indices of cylinder groups. */ - printf("super-block backups (for fsck -b #) at:\n"); + printf("super-block backups (for fsck_ffs -b #) at:\n"); i = 0; width = charsperline(); /* From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 14:35:44 2014 Return-Path: Delivered-To: svn-src-all@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 DF95D548; Sun, 9 Feb 2014 14:35:44 +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 B0B221A27; Sun, 9 Feb 2014 14:35:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19EZilB060302; Sun, 9 Feb 2014 14:35:44 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19EZiuW060300; Sun, 9 Feb 2014 14:35:44 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402091435.s19EZiuW060300@svn.freebsd.org> From: Ian Lepore Date: Sun, 9 Feb 2014 14:35:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261656 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 14:35:45 -0000 Author: ian Date: Sun Feb 9 14:35:44 2014 New Revision: 261656 URL: http://svnweb.freebsd.org/changeset/base/261656 Log: Use vm_paddr_t, not vm_offset_t, when dealing with physical addresses. Pointed out by: alc Modified: head/sys/arm/arm/physmem.c head/sys/arm/include/physmem.h Modified: head/sys/arm/arm/physmem.c ============================================================================== --- head/sys/arm/arm/physmem.c Sun Feb 9 14:28:47 2014 (r261655) +++ head/sys/arm/arm/physmem.c Sun Feb 9 14:35:44 2014 (r261656) @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #define MAX_EXCNT 10 struct region { - vm_offset_t addr; + vm_paddr_t addr; vm_size_t size; uint32_t flags; }; @@ -90,7 +90,7 @@ vm_paddr_t dump_avail[MAX_AVAIL_ENTRIES long realmem; /* The address at which the kernel was loaded. Set early in initarm(). */ -vm_offset_t arm_physmem_kernaddr; +vm_paddr_t arm_physmem_kernaddr; /* * Print the contents of the physical and excluded region tables using the @@ -227,7 +227,7 @@ regions_to_avail(vm_paddr_t *avail, uint * Insertion-sort a new entry into a regions list; sorted by start address. */ static void -insert_region(struct region *regions, size_t rcnt, vm_offset_t addr, +insert_region(struct region *regions, size_t rcnt, vm_paddr_t addr, vm_size_t size, uint32_t flags) { size_t i; @@ -249,7 +249,7 @@ insert_region(struct region *regions, si * Add a hardware memory region. */ void -arm_physmem_hardware_region(vm_offset_t pa, vm_size_t sz) +arm_physmem_hardware_region(vm_paddr_t pa, vm_size_t sz) { vm_offset_t adj; @@ -277,7 +277,7 @@ arm_physmem_hardware_region(vm_offset_t /* * Add an exclusion region. */ -void arm_physmem_exclude_region(vm_offset_t pa, vm_size_t sz, uint32_t exflags) +void arm_physmem_exclude_region(vm_paddr_t pa, vm_size_t sz, uint32_t exflags) { vm_offset_t adj; Modified: head/sys/arm/include/physmem.h ============================================================================== --- head/sys/arm/include/physmem.h Sun Feb 9 14:28:47 2014 (r261655) +++ head/sys/arm/include/physmem.h Sun Feb 9 14:35:44 2014 (r261656) @@ -32,7 +32,7 @@ /* * The physical address at which the kernel was loaded. */ -extern vm_offset_t arm_physmem_kernaddr; +extern vm_paddr_t arm_physmem_kernaddr; /* * Routines to help configure physical ram. @@ -52,8 +52,8 @@ extern vm_offset_t arm_physmem_kernaddr; #define EXFLAG_NODUMP 0x01 #define EXFLAG_NOALLOC 0x02 -void arm_physmem_hardware_region(vm_offset_t pa, vm_size_t sz); -void arm_physmem_exclude_region(vm_offset_t pa, vm_size_t sz, uint32_t flags); +void arm_physmem_hardware_region(vm_paddr_t pa, vm_size_t sz); +void arm_physmem_exclude_region(vm_paddr_t pa, vm_size_t sz, uint32_t flags); void arm_physmem_init_kernel_globals(void); void arm_physmem_print_tables(void); From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 14:46:51 2014 Return-Path: Delivered-To: svn-src-all@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 EE287798; Sun, 9 Feb 2014 14:46: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 D7AAD1AC5; Sun, 9 Feb 2014 14:46:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19EkpiX064176; Sun, 9 Feb 2014 14:46:51 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19EkpmO064173; Sun, 9 Feb 2014 14:46:51 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402091446.s19EkpmO064173@svn.freebsd.org> From: Ian Lepore Date: Sun, 9 Feb 2014 14:46:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261657 - in head/sys/arm: arm at91 sa11x0 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 14:46:52 -0000 Author: ian Date: Sun Feb 9 14:46:50 2014 New Revision: 261657 URL: http://svnweb.freebsd.org/changeset/base/261657 Log: No need to set physmem in each initarm() instance anymore, it's handled in common code now. Modified: head/sys/arm/arm/machdep.c head/sys/arm/at91/at91_machdep.c head/sys/arm/sa11x0/assabet_machdep.c Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Sun Feb 9 14:35:44 2014 (r261656) +++ head/sys/arm/arm/machdep.c Sun Feb 9 14:46:50 2014 (r261657) @@ -1215,8 +1215,6 @@ initarm(struct arm_boot_params *abp) cninit(); - physmem = memsize / PAGE_SIZE; - debugf("initarm: console initialized\n"); debugf(" arg1 kmdp = 0x%08x\n", (uint32_t)kmdp); debugf(" boothowto = 0x%08x\n", boothowto); Modified: head/sys/arm/at91/at91_machdep.c ============================================================================== --- head/sys/arm/at91/at91_machdep.c Sun Feb 9 14:35:44 2014 (r261656) +++ head/sys/arm/at91/at91_machdep.c Sun Feb 9 14:46:50 2014 (r261657) @@ -590,7 +590,6 @@ initarm(struct arm_boot_params *abp) printf("Warning: No soc support for %s found.\n", soc_info.name); memsize = board_init(); - physmem = memsize / PAGE_SIZE; /* * Pages were allocated during the secondary bootstrap for the Modified: head/sys/arm/sa11x0/assabet_machdep.c ============================================================================== --- head/sys/arm/sa11x0/assabet_machdep.c Sun Feb 9 14:35:44 2014 (r261656) +++ head/sys/arm/sa11x0/assabet_machdep.c Sun Feb 9 14:46:50 2014 (r261657) @@ -205,7 +205,6 @@ initarm(struct arm_boot_params *abp) arm_physmem_kernaddr = abp->abp_physaddr; cninit(); set_cpufuncs(); - physmem = memsize / PAGE_SIZE; pcpu0_init(); /* Do basic tuning, hz etc */ From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 14:58:48 2014 Return-Path: Delivered-To: svn-src-all@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 8105ECF3; Sun, 9 Feb 2014 14:58: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 6AD3C1B93; Sun, 9 Feb 2014 14:58:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19Ewmr7068419; Sun, 9 Feb 2014 14:58:48 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19EwmgI068417; Sun, 9 Feb 2014 14:58:48 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201402091458.s19EwmgI068417@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 9 Feb 2014 14:58: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: r261658 - stable/9/sys/dev/drm2 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 14:58:48 -0000 Author: dumbbell Date: Sun Feb 9 14:58:47 2014 New Revision: 261658 URL: http://svnweb.freebsd.org/changeset/base/261658 Log: MFC r254820: drm: Use driver-provided "use_msi" callback to determine if MSI is blacklisted For now, keep the static array for i915. But eventually, it should be moved to a callback in the driver itself. Modified: stable/9/sys/dev/drm2/drmP.h stable/9/sys/dev/drm2/drm_drv.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/drmP.h ============================================================================== --- stable/9/sys/dev/drm2/drmP.h Sun Feb 9 14:46:50 2014 (r261657) +++ stable/9/sys/dev/drm2/drmP.h Sun Feb 9 14:58:47 2014 (r261658) @@ -697,6 +697,7 @@ struct drm_gem_object { struct drm_driver_info { int (*load)(struct drm_device *, unsigned long flags); + int (*use_msi)(struct drm_device *, unsigned long flags); int (*firstopen)(struct drm_device *); int (*open)(struct drm_device *, struct drm_file *); void (*preclose)(struct drm_device *, struct drm_file *file_priv); @@ -828,8 +829,10 @@ struct drm_device { struct drm_driver_info *driver; drm_pci_id_list_t *id_entry; /* PCI ID, name, and chipset private */ - u_int16_t pci_device; /* PCI device id */ - u_int16_t pci_vendor; /* PCI vendor id */ + uint16_t pci_device; /* PCI device id */ + uint16_t pci_vendor; /* PCI vendor id */ + uint16_t pci_subdevice; /* PCI subsystem device id */ + uint16_t pci_subvendor; /* PCI subsystem vendor id */ char *unique; /* Unique identifier: e.g., busid */ int unique_len; /* Length of unique field */ Modified: stable/9/sys/dev/drm2/drm_drv.c ============================================================================== --- stable/9/sys/dev/drm2/drm_drv.c Sun Feb 9 14:46:50 2014 (r261657) +++ stable/9/sys/dev/drm2/drm_drv.c Sun Feb 9 14:58:47 2014 (r261658) @@ -207,13 +207,22 @@ static struct drm_msi_blacklist_entry dr {0, 0} }; -static int drm_msi_is_blacklisted(int vendor, int device) +static int drm_msi_is_blacklisted(struct drm_device *dev, unsigned long flags) { int i = 0; + if (dev->driver->use_msi != NULL) { + int use_msi; + + use_msi = dev->driver->use_msi(dev, flags); + + return (!use_msi); + } + + /* TODO: Maybe move this to a callback in i915? */ for (i = 0; drm_msi_blacklist[i].vendor != 0; i++) { - if ((drm_msi_blacklist[i].vendor == vendor) && - (drm_msi_blacklist[i].device == device)) { + if ((drm_msi_blacklist[i].vendor == dev->pci_vendor) && + (drm_msi_blacklist[i].device == dev->pci_device)) { return 1; } } @@ -262,10 +271,16 @@ int drm_attach(device_t kdev, drm_pci_id dev->pci_vendor = pci_get_vendor(dev->device); dev->pci_device = pci_get_device(dev->device); + dev->pci_subvendor = pci_get_subvendor(dev->device); + dev->pci_subdevice = pci_get_subdevice(dev->device); + + id_entry = drm_find_description(dev->pci_vendor, + dev->pci_device, idlist); + dev->id_entry = id_entry; if (drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) { if (drm_msi && - !drm_msi_is_blacklisted(dev->pci_vendor, dev->pci_device)) { + !drm_msi_is_blacklisted(dev, dev->id_entry->driver_private)) { msicount = pci_msi_count(dev->device); DRM_DEBUG("MSI count = %d\n", msicount); if (msicount > 1) @@ -295,10 +310,6 @@ int drm_attach(device_t kdev, drm_pci_id mtx_init(&dev->event_lock, "drmev", NULL, MTX_DEF); sx_init(&dev->dev_struct_lock, "drmslk"); - id_entry = drm_find_description(dev->pci_vendor, - dev->pci_device, idlist); - dev->id_entry = id_entry; - error = drm_load(dev); if (error == 0) error = drm_create_cdevs(kdev); From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 15:17:58 2014 Return-Path: Delivered-To: svn-src-all@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 79C6933C; Sun, 9 Feb 2014 15:17:58 +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 642861CDA; Sun, 9 Feb 2014 15:17:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19FHw7w079721; Sun, 9 Feb 2014 15:17:58 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19FHwD5079720; Sun, 9 Feb 2014 15:17:58 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201402091517.s19FHwD5079720@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 9 Feb 2014 15:17:58 +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: r261659 - stable/9/sys/dev/drm2 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 15:17:58 -0000 Author: dumbbell Date: Sun Feb 9 15:17:57 2014 New Revision: 261659 URL: http://svnweb.freebsd.org/changeset/base/261659 Log: MFC r254821: drm: Fix cleanup if device initialization fails This plugs some memory leaks. Modified: stable/9/sys/dev/drm2/drm_drv.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/drm_drv.c ============================================================================== --- stable/9/sys/dev/drm2/drm_drv.c Sun Feb 9 14:58:47 2014 (r261658) +++ stable/9/sys/dev/drm2/drm_drv.c Sun Feb 9 15:17:57 2014 (r261659) @@ -311,8 +311,22 @@ int drm_attach(device_t kdev, drm_pci_id sx_init(&dev->dev_struct_lock, "drmslk"); error = drm_load(dev); - if (error == 0) - error = drm_create_cdevs(kdev); + if (error) + goto error; + + error = drm_create_cdevs(kdev); + if (error) + goto error; + + return (error); +error: + if (dev->irqr) { + bus_release_resource(dev->device, SYS_RES_IRQ, + dev->irqrid, dev->irqr); + } + if (dev->msi_enabled) { + pci_release_msi(dev->device); + } return (error); } @@ -570,7 +584,7 @@ static int drm_load(struct drm_device *d DRM_ERROR("Request to enable bus-master failed.\n"); DRM_UNLOCK(dev); if (retcode != 0) - goto error; + goto error1; } DRM_INFO("Initialized %s %d.%d.%d %s\n", @@ -584,7 +598,9 @@ static int drm_load(struct drm_device *d error1: delete_unrhdr(dev->drw_unrhdr); + drm_gem_destroy(dev); error: + drm_ctxbitmap_cleanup(dev); drm_sysctl_cleanup(dev); DRM_LOCK(dev); drm_lastclose(dev); From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 15:27:27 2014 Return-Path: Delivered-To: svn-src-all@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 700EA65D; Sun, 9 Feb 2014 15:27: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 3EA9B1D82; Sun, 9 Feb 2014 15:27:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19FRRSh083556; Sun, 9 Feb 2014 15:27:27 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19FRRtF083555; Sun, 9 Feb 2014 15:27:27 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201402091527.s19FRRtF083555@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 9 Feb 2014 15:27:27 +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: r261660 - stable/9/sys/dev/drm2 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 15:27:27 -0000 Author: dumbbell Date: Sun Feb 9 15:27:26 2014 New Revision: 261660 URL: http://svnweb.freebsd.org/changeset/base/261660 Log: MFC r254833: drm: Import Linux commit cd004b3f4cd4169815c82bf9e424fda06978898a Author: Shirish S Date: Thu Aug 30 07:04:06 2012 +0000 drm: edid: add support for E-DDC The current logic for probing ddc is limited to 2 blocks (256 bytes), this patch adds support for the 4 block (512) data. To do this, a single 8-bit segment index is passed to the display via the I2C address 30h. Data from the selected segment is then immediately read via the regular DDC2 address using a repeated I2C 'START' signal. Signed-off-by: Shirish S Reviewed-by: Jean Delvare Reviewed-by: Daniel Vetter Reviewed-by: Ville Syrjala Signed-off-by: Dave Airlie Modified: stable/9/sys/dev/drm2/drm_edid.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/drm_edid.c ============================================================================== --- stable/9/sys/dev/drm2/drm_edid.c Sun Feb 9 15:17:57 2014 (r261659) +++ stable/9/sys/dev/drm2/drm_edid.c Sun Feb 9 15:27:26 2014 (r261660) @@ -253,6 +253,8 @@ drm_do_probe_ddc_edid(device_t adapter, int block, int len) { unsigned char start = block * EDID_LENGTH; + unsigned char segment = block >> 1; + unsigned char xfers = segment ? 3 : 2; int ret, retries = 5; /* The core i2c driver will automatically retry the transfer if the @@ -264,6 +266,11 @@ drm_do_probe_ddc_edid(device_t adapter, do { struct iic_msg msgs[] = { { + .slave = DDC_SEGMENT_ADDR << 1, + .flags = 0, + .len = 1, + .buf = &segment, + }, { .slave = DDC_ADDR << 1, .flags = IIC_M_WR, .len = 1, @@ -275,7 +282,13 @@ drm_do_probe_ddc_edid(device_t adapter, .buf = buf, } }; - ret = iicbus_transfer(adapter, msgs, 2); + + /* + * Avoid sending the segment addr to not upset non-compliant ddc + * monitors. + */ + ret = iicbus_transfer(adapter, &msgs[3 - xfers], xfers); + if (ret != 0) DRM_DEBUG_KMS("iicbus_transfer countdown %d error %d\n", retries, ret); From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 15:34:38 2014 Return-Path: Delivered-To: svn-src-all@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 D3DD988B; Sun, 9 Feb 2014 15:34: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 BAA041E1E; Sun, 9 Feb 2014 15:34:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19FYcDQ087057; Sun, 9 Feb 2014 15:34:38 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19FYc0o087056; Sun, 9 Feb 2014 15:34:38 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201402091534.s19FYc0o087056@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 9 Feb 2014 15:34:38 +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: r261661 - stable/9/sys/dev/drm2 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 15:34:38 -0000 Author: dumbbell Date: Sun Feb 9 15:34:38 2014 New Revision: 261661 URL: http://svnweb.freebsd.org/changeset/base/261661 Log: MFC r254835: drm: Fix typo in KASSERT message: s/Dandling/Dangling/ Modified: stable/9/sys/dev/drm2/drm_gem.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/drm_gem.c ============================================================================== --- stable/9/sys/dev/drm2/drm_gem.c Sun Feb 9 15:27:26 2014 (r261660) +++ stable/9/sys/dev/drm2/drm_gem.c Sun Feb 9 15:34:38 2014 (r261661) @@ -163,7 +163,7 @@ void drm_gem_object_reference(struct drm_gem_object *obj) { - KASSERT(obj->refcount > 0, ("Dandling obj %p", obj)); + KASSERT(obj->refcount > 0, ("Dangling obj %p", obj)); refcount_acquire(&obj->refcount); } From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 15:48:50 2014 Return-Path: Delivered-To: svn-src-all@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 1D8A1D4C; Sun, 9 Feb 2014 15:48: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 F017D1FE4; Sun, 9 Feb 2014 15:48:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19FmnIV091536; Sun, 9 Feb 2014 15:48:49 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19Fmnro091534; Sun, 9 Feb 2014 15:48:49 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201402091548.s19Fmnro091534@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 9 Feb 2014 15:48: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: r261662 - stable/9/sys/dev/drm2 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 15:48:50 -0000 Author: dumbbell Date: Sun Feb 9 15:48:49 2014 New Revision: 261662 URL: http://svnweb.freebsd.org/changeset/base/261662 Log: MFC r254836, r254837: drm: Support gem_open_object() and gem_close_object() callbacks ... in struct drm_driver_info. Modified: stable/9/sys/dev/drm2/drmP.h stable/9/sys/dev/drm2/drm_gem.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/drmP.h ============================================================================== --- stable/9/sys/dev/drm2/drmP.h Sun Feb 9 15:34:38 2014 (r261661) +++ stable/9/sys/dev/drm2/drmP.h Sun Feb 9 15:48:49 2014 (r261662) @@ -736,6 +736,8 @@ struct drm_driver_info { int (*gem_init_object)(struct drm_gem_object *obj); void (*gem_free_object)(struct drm_gem_object *obj); + int (*gem_open_object)(struct drm_gem_object *, struct drm_file *); + void (*gem_close_object)(struct drm_gem_object *, struct drm_file *); struct cdev_pager_ops *gem_pager_ops; Modified: stable/9/sys/dev/drm2/drm_gem.c ============================================================================== --- stable/9/sys/dev/drm2/drm_gem.c Sun Feb 9 15:34:38 2014 (r261661) +++ stable/9/sys/dev/drm2/drm_gem.c Sun Feb 9 15:48:49 2014 (r261662) @@ -242,24 +242,40 @@ int drm_gem_handle_create(struct drm_file *file_priv, struct drm_gem_object *obj, uint32_t *handle) { - int error; + struct drm_device *dev = obj->dev; + int ret; - error = drm_gem_name_create(&file_priv->object_names, obj, handle); - if (error != 0) - return (error); + ret = drm_gem_name_create(&file_priv->object_names, obj, handle); + if (ret != 0) + return (ret); drm_gem_object_handle_reference(obj); + + if (dev->driver->gem_open_object) { + ret = dev->driver->gem_open_object(obj, file_priv); + if (ret) { + drm_gem_handle_delete(file_priv, *handle); + return ret; + } + } + return (0); } int drm_gem_handle_delete(struct drm_file *file_priv, uint32_t handle) { + struct drm_device *dev; struct drm_gem_object *obj; obj = drm_gem_names_remove(&file_priv->object_names, handle); if (obj == NULL) return (EINVAL); + + dev = obj->dev; + if (dev->driver->gem_close_object) + dev->driver->gem_close_object(obj, file_priv); drm_gem_object_handle_unreference_unlocked(obj); + return (0); } @@ -312,9 +328,17 @@ drm_gem_open(struct drm_device *dev, str static int drm_gem_object_release_handle(uint32_t name, void *ptr, void *arg) { + struct drm_file *file_priv; struct drm_gem_object *obj; + struct drm_device *dev; + file_priv = arg; obj = ptr; + dev = obj->dev; + + if (dev->driver->gem_close_object) + dev->driver->gem_close_object(obj, file_priv); + drm_gem_object_handle_unreference(obj); return (0); } @@ -324,7 +348,7 @@ drm_gem_release(struct drm_device *dev, { drm_gem_names_foreach(&file_priv->object_names, - drm_gem_object_release_handle, NULL); + drm_gem_object_release_handle, file_priv); drm_gem_names_fini(&file_priv->object_names); } From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 15:54:32 2014 Return-Path: Delivered-To: svn-src-all@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 3857BEF1; Sun, 9 Feb 2014 15:54:32 +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 082C01092; Sun, 9 Feb 2014 15:54:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19FsVpW094833; Sun, 9 Feb 2014 15:54:31 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19FsVOL094831; Sun, 9 Feb 2014 15:54:31 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201402091554.s19FsVOL094831@svn.freebsd.org> From: Andrew Turner Date: Sun, 9 Feb 2014 15:54:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261663 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 15:54:32 -0000 Author: andrew Date: Sun Feb 9 15:54:31 2014 New Revision: 261663 URL: http://svnweb.freebsd.org/changeset/base/261663 Log: Pass the pagetable used from locore.S to initarm to allow it to map data in as required. Modified: head/sys/arm/arm/locore.S head/sys/arm/include/cpu.h Modified: head/sys/arm/arm/locore.S ============================================================================== --- head/sys/arm/arm/locore.S Sun Feb 9 15:48:49 2014 (r261662) +++ head/sys/arm/arm/locore.S Sun Feb 9 15:54:31 2014 (r261663) @@ -221,7 +221,7 @@ mmu_done: ldr pc, .Lvirt_done virt_done: - mov r1, #24 /* loader info size is 24 bytes also second arg */ + mov r1, #28 /* loader info size is 28 bytes also second arg */ subs sp, sp, r1 /* allocate arm_boot_params struct on stack */ bic sp, sp, #7 /* align stack to 8 bytes */ mov r0, sp /* loader info pointer is first arg */ @@ -232,6 +232,8 @@ virt_done: str fp, [r0, #16] /* store r3 from boot loader */ ldr r5, =KERNPHYSADDR /* load KERNPHYSADDR as the physical address */ str r5, [r0, #20] /* store the physical address */ + ldr r5, Lstartup_pagetable + str r5, [r0, #24] /* store the pagetable address */ mov fp, #0 /* trace back starts here */ bl _C_LABEL(initarm) /* Off we go */ Modified: head/sys/arm/include/cpu.h ============================================================================== --- head/sys/arm/include/cpu.h Sun Feb 9 15:48:49 2014 (r261662) +++ head/sys/arm/include/cpu.h Sun Feb 9 15:54:31 2014 (r261663) @@ -35,6 +35,11 @@ get_cyclecount(void) extern vm_offset_t vector_page; +/* + * Params passed into initarm. If you change the size of this you will + * need to update locore.S to allocate more memory on the stack before + * it calls initarm. + */ struct arm_boot_params { register_t abp_size; /* Size of this structure */ register_t abp_r0; /* r0 from the boot loader */ @@ -42,6 +47,7 @@ struct arm_boot_params { register_t abp_r2; /* r2 from the boot loader */ register_t abp_r3; /* r3 from the boot loader */ vm_offset_t abp_physaddr; /* The kernel physical address */ + vm_offset_t abp_pagetable; /* The early page table */ }; void arm_vector_init(vm_offset_t, int); From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 15:56:16 2014 Return-Path: Delivered-To: svn-src-all@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 0159817C; Sun, 9 Feb 2014 15:56:16 +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 E1507109A; Sun, 9 Feb 2014 15:56:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19FuFb7095232; Sun, 9 Feb 2014 15:56:15 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19FuFZc095231; Sun, 9 Feb 2014 15:56:15 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201402091556.s19FuFZc095231@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 9 Feb 2014 15:56:15 +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: r261664 - stable/9/sys/dev/drm2 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 15:56:16 -0000 Author: dumbbell Date: Sun Feb 9 15:56:15 2014 New Revision: 261664 URL: http://svnweb.freebsd.org/changeset/base/261664 Log: MFC r254838: drm: In drm_gem_name_create(), verify argument before acquiring lock Submitted by: J.R. Oldroyd Modified: stable/9/sys/dev/drm2/drm_gem_names.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/drm_gem_names.c ============================================================================== --- stable/9/sys/dev/drm2/drm_gem_names.c Sun Feb 9 15:54:31 2014 (r261663) +++ stable/9/sys/dev/drm2/drm_gem_names.c Sun Feb 9 15:56:15 2014 (r261664) @@ -132,12 +132,12 @@ drm_gem_name_create(struct drm_gem_names { struct drm_gem_name *np; - np = malloc(sizeof(struct drm_gem_name), M_GEM_NAMES, M_WAITOK); - mtx_lock(&names->lock); if (*name != 0) { - mtx_unlock(&names->lock); return (EALREADY); } + + np = malloc(sizeof(struct drm_gem_name), M_GEM_NAMES, M_WAITOK); + mtx_lock(&names->lock); np->name = alloc_unr(names->unr); if (np->name == -1) { mtx_unlock(&names->lock); From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 16:01:19 2014 Return-Path: Delivered-To: svn-src-all@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 8C5664B3; Sun, 9 Feb 2014 16:01: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 7730C111B; Sun, 9 Feb 2014 16:01:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19G1JuU098467; Sun, 9 Feb 2014 16:01:19 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19G1JSB098466; Sun, 9 Feb 2014 16:01:19 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201402091601.s19G1JSB098466@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 9 Feb 2014 16:01:19 +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: r261665 - stable/9/sys/dev/drm2 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 16:01:19 -0000 Author: dumbbell Date: Sun Feb 9 16:01:18 2014 New Revision: 261665 URL: http://svnweb.freebsd.org/changeset/base/261665 Log: MFC r254840: drm: Use DRM_IF_MAJOR & DRM_IF_MINOR from drm_core.h Modified: stable/9/sys/dev/drm2/drm_ioctl.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/drm_ioctl.c ============================================================================== --- stable/9/sys/dev/drm2/drm_ioctl.c Sun Feb 9 15:56:15 2014 (r261664) +++ stable/9/sys/dev/drm2/drm_ioctl.c Sun Feb 9 16:01:18 2014 (r261665) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); */ #include +#include /* * Beginning in revision 1.1 of the DRM interface, getunique will return @@ -255,10 +256,6 @@ int drm_getcap(struct drm_device *dev, v return 0; } - -#define DRM_IF_MAJOR 1 -#define DRM_IF_MINOR 2 - int drm_setversion(struct drm_device *dev, void *data, struct drm_file *file_priv) { From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 16:07:25 2014 Return-Path: Delivered-To: svn-src-all@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 1526062D; Sun, 9 Feb 2014 16:07: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 F270B1137; Sun, 9 Feb 2014 16:07:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19G7OAD099654; Sun, 9 Feb 2014 16:07:24 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19G7OmH099653; Sun, 9 Feb 2014 16:07:24 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201402091607.s19G7OmH099653@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 9 Feb 2014 16:07:24 +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: r261666 - stable/9/sys/dev/drm2 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 16:07:25 -0000 Author: dumbbell Date: Sun Feb 9 16:07:24 2014 New Revision: 261666 URL: http://svnweb.freebsd.org/changeset/base/261666 Log: MFC r254841: drm: Import list_for_each_entry_safe_from() macro Modified: stable/9/sys/dev/drm2/drm_linux_list.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/drm_linux_list.h ============================================================================== --- stable/9/sys/dev/drm2/drm_linux_list.h Sun Feb 9 16:01:18 2014 (r261665) +++ stable/9/sys/dev/drm2/drm_linux_list.h Sun Feb 9 16:07:24 2014 (r261666) @@ -144,6 +144,11 @@ list_del_init(struct list_head *entry) { &pos->member != (head); \ pos = n, n = list_entry(n->member.next, __typeof(*n), member)) +#define list_for_each_entry_safe_from(pos, n, head, member) \ + for (n = list_entry(pos->member.next, __typeof(*pos), member); \ + &pos->member != (head); \ + pos = n, n = list_entry(n->member.next, __typeof(*n), member)) + #define list_first_entry(ptr, type, member) \ list_entry((ptr)->next, type, member) From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 16:16:25 2014 Return-Path: Delivered-To: svn-src-all@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 093CF94D; Sun, 9 Feb 2014 16: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 E7AA711D2; Sun, 9 Feb 2014 16:16:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19GGO01004048; Sun, 9 Feb 2014 16:16:24 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19GGO3P004046; Sun, 9 Feb 2014 16:16:24 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201402091616.s19GGO3P004046@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 9 Feb 2014 16:16:24 +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: r261667 - stable/9/sys/dev/drm2 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 16:16:25 -0000 Author: dumbbell Date: Sun Feb 9 16:16:24 2014 New Revision: 261667 URL: http://svnweb.freebsd.org/changeset/base/261667 Log: MFC r254848, r258930: drm: Import drm_pcie_get_speed_cap_mask() in drm_pci.c This comes with several PCI_VENDOR_ID_* defines which should go in a more central place. Modified: stable/9/sys/dev/drm2/drmP.h stable/9/sys/dev/drm2/drm_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/drmP.h ============================================================================== --- stable/9/sys/dev/drm2/drmP.h Sun Feb 9 16:07:24 2014 (r261666) +++ stable/9/sys/dev/drm2/drmP.h Sun Feb 9 16:16:24 2014 (r261667) @@ -1415,5 +1415,22 @@ do { \ #define EREMOTEIO ENXIO #define ERESTARTSYS ERESTART +#define PCI_VENDOR_ID_APPLE 0x106b +#define PCI_VENDOR_ID_ASUSTEK 0x1043 +#define PCI_VENDOR_ID_ATI 0x1002 +#define PCI_VENDOR_ID_DELL 0x1028 +#define PCI_VENDOR_ID_HP 0x103c +#define PCI_VENDOR_ID_IBM 0x1014 +#define PCI_VENDOR_ID_INTEL 0x8086 +#define PCI_VENDOR_ID_SERVERWORKS 0x1166 +#define PCI_VENDOR_ID_SONY 0x104d +#define PCI_VENDOR_ID_VIA 0x1106 + +#define DRM_PCIE_SPEED_25 1 +#define DRM_PCIE_SPEED_50 2 +#define DRM_PCIE_SPEED_80 4 + +extern int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *speed_mask); + #endif /* __KERNEL__ */ #endif /* _DRM_P_H_ */ Modified: stable/9/sys/dev/drm2/drm_pci.c ============================================================================== --- stable/9/sys/dev/drm2/drm_pci.c Sun Feb 9 16:07:24 2014 (r261666) +++ stable/9/sys/dev/drm2/drm_pci.c Sun Feb 9 16:16:24 2014 (r261667) @@ -123,3 +123,57 @@ drm_pci_free(struct drm_device *dev, drm } /*@}*/ + +int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *mask) +{ + device_t root; + int pos; + u32 lnkcap = 0, lnkcap2 = 0; + + *mask = 0; + if (!drm_device_is_pcie(dev)) + return -EINVAL; + + root = + device_get_parent( /* pcib */ + device_get_parent( /* `-- pci */ + device_get_parent( /* `-- vgapci */ + dev->device))); /* `-- drmn */ + + pos = 0; + pci_find_cap(root, PCIY_EXPRESS, &pos); + if (!pos) + return -EINVAL; + + /* we've been informed via and serverworks don't make the cut */ + if (pci_get_vendor(root) == PCI_VENDOR_ID_VIA || + pci_get_vendor(root) == PCI_VENDOR_ID_SERVERWORKS) + return -EINVAL; + + lnkcap = pci_read_config(root, pos + PCIER_LINK_CAP, 4); + lnkcap2 = pci_read_config(root, pos + PCIER_LINK_CAP2, 4); + + lnkcap &= PCIEM_LINK_CAP_MAX_SPEED; + lnkcap2 &= 0xfe; + +#define PCI_EXP_LNKCAP2_SLS_2_5GB 0x02 /* Supported Link Speed 2.5GT/s */ +#define PCI_EXP_LNKCAP2_SLS_5_0GB 0x04 /* Supported Link Speed 5.0GT/s */ +#define PCI_EXP_LNKCAP2_SLS_8_0GB 0x08 /* Supported Link Speed 8.0GT/s */ + + if (lnkcap2) { /* PCIE GEN 3.0 */ + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_2_5GB) + *mask |= DRM_PCIE_SPEED_25; + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_5_0GB) + *mask |= DRM_PCIE_SPEED_50; + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_8_0GB) + *mask |= DRM_PCIE_SPEED_80; + } else { + if (lnkcap & 1) + *mask |= DRM_PCIE_SPEED_25; + if (lnkcap & 2) + *mask |= DRM_PCIE_SPEED_50; + } + + DRM_INFO("probing gen 2 caps for device %x:%x = %x/%x\n", pci_get_vendor(root), pci_get_device(root), lnkcap, lnkcap2); + return 0; +} From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 16:37:17 2014 Return-Path: Delivered-To: svn-src-all@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 E5277CC5; Sun, 9 Feb 2014 16:37:17 +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 D0F9B12F1; Sun, 9 Feb 2014 16:37:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19GbHLk011827; Sun, 9 Feb 2014 16:37:17 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19GbH6F011825; Sun, 9 Feb 2014 16:37:17 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201402091637.s19GbH6F011825@svn.freebsd.org> From: Ed Maste Date: Sun, 9 Feb 2014 16:37:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261668 - head/lib/libstand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 16:37:18 -0000 Author: emaste Date: Sun Feb 9 16:37:17 2014 New Revision: 261668 URL: http://svnweb.freebsd.org/changeset/base/261668 Log: Build libstand as a 64-bit library on ppc64 The 32-bit bootloaders now link against libstand.a in sys/boot/libstand32, so there is no need to force /usr/lib/libstand.a to be 32-bit. This is equivalent to r261568 for amd64. Sponsored by: The FreeBSD Foundation Modified: head/lib/libstand/Makefile head/lib/libstand/libstand.3 Modified: head/lib/libstand/Makefile ============================================================================== --- head/lib/libstand/Makefile Sun Feb 9 16:16:24 2014 (r261667) +++ head/lib/libstand/Makefile Sun Feb 9 16:37:17 2014 (r261668) @@ -35,9 +35,6 @@ CFLAGS+= -Os .if ${MACHINE_CPUARCH} == "powerpc" CFLAGS+= -msoft-float -D_STANDALONE -DNETIF_DEBUG .endif -.if ${MACHINE_ARCH} == "powerpc64" -CFLAGS+= -m32 -I. -.endif .if ${MACHINE_CPUARCH} == "arm" CFLAGS+= -msoft-float -D_STANDALONE .endif Modified: head/lib/libstand/libstand.3 ============================================================================== --- head/lib/libstand/libstand.3 Sun Feb 9 16:16:24 2014 (r261667) +++ head/lib/libstand/libstand.3 Sun Feb 9 16:37:17 2014 (r261668) @@ -674,7 +674,3 @@ the environment functions and this manpa .An Mike Smith Aq msmith@FreeBSD.org . .Sh BUGS The lack of detailed memory usage data is unhelpful. -.Pp -On the powerpc64 architecture -.Nm -is a 32-bit library. From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 16:38:58 2014 Return-Path: Delivered-To: svn-src-all@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 BCAAAE0B; Sun, 9 Feb 2014 16:38:58 +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 983E812F8; Sun, 9 Feb 2014 16:38:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19GcwWx012056; Sun, 9 Feb 2014 16:38:58 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19Gcwk4012055; Sun, 9 Feb 2014 16:38:58 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201402091638.s19Gcwk4012055@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 9 Feb 2014 16:38:58 +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: r261669 - stable/9/sys/dev/drm2 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 16:38:58 -0000 Author: dumbbell Date: Sun Feb 9 16:38:58 2014 New Revision: 261669 URL: http://svnweb.freebsd.org/changeset/base/261669 Log: MFC r254853: drm: Import drm_fixed.h from Linux 3.8 Added: stable/9/sys/dev/drm2/drm_fixed.h - copied unchanged from r254853, head/sys/dev/drm2/drm_fixed.h Modified: Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Copied: stable/9/sys/dev/drm2/drm_fixed.h (from r254853, head/sys/dev/drm2/drm_fixed.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/dev/drm2/drm_fixed.h Sun Feb 9 16:38:58 2014 (r261669, copy of r254853, head/sys/dev/drm2/drm_fixed.h) @@ -0,0 +1,72 @@ +/* + * Copyright 2009 Red Hat Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: Dave Airlie + */ + +#include +__FBSDID("$FreeBSD$"); + +#ifndef DRM_FIXED_H +#define DRM_FIXED_H + +typedef union dfixed { + u32 full; +} fixed20_12; + + +#define dfixed_const(A) (u32)(((A) << 12))/* + ((B + 0.000122)*4096)) */ +#define dfixed_const_half(A) (u32)(((A) << 12) + 2048) +#define dfixed_const_666(A) (u32)(((A) << 12) + 2731) +#define dfixed_const_8(A) (u32)(((A) << 12) + 3277) +#define dfixed_mul(A, B) ((u64)((u64)(A).full * (B).full + 2048) >> 12) +#define dfixed_init(A) { .full = dfixed_const((A)) } +#define dfixed_init_half(A) { .full = dfixed_const_half((A)) } +#define dfixed_trunc(A) ((A).full >> 12) +#define dfixed_frac(A) ((A).full & ((1 << 12) - 1)) + +static inline u32 dfixed_floor(fixed20_12 A) +{ + u32 non_frac = dfixed_trunc(A); + + return dfixed_const(non_frac); +} + +static inline u32 dfixed_ceil(fixed20_12 A) +{ + u32 non_frac = dfixed_trunc(A); + + if (A.full > dfixed_const(non_frac)) + return dfixed_const(non_frac + 1); + else + return dfixed_const(non_frac); +} + +static inline u32 dfixed_div(fixed20_12 A, fixed20_12 B) +{ + u64 tmp = ((u64)A.full << 13); + + do_div(tmp, B.full); + tmp += 1; + tmp /= 2; + return lower_32_bits(tmp); +} +#endif From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 19:36:28 2014 Return-Path: Delivered-To: svn-src-all@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 871C8F11; Sun, 9 Feb 2014 19:36:28 +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 6F864102D; Sun, 9 Feb 2014 19:36:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19JaSdk082667; Sun, 9 Feb 2014 19:36:28 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19JaSpR082665; Sun, 9 Feb 2014 19:36:28 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201402091936.s19JaSpR082665@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 9 Feb 2014 19:36:28 +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: r261672 - in stable/9: sys/dev/drm2 tools/tools tools/tools/drm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 19:36:28 -0000 Author: dumbbell Date: Sun Feb 9 19:36:27 2014 New Revision: 261672 URL: http://svnweb.freebsd.org/changeset/base/261672 Log: MFC r254852: drm: Update drm_pciids.h based on Linux 3.8 This header can be easily updated using the new "gen-drm_pciids" script, available in tools/tools/drm. The script uses the Linux' drm_pciids.h header for new IDs, the FreeBSD's one because we add the name of the device to each IDs, and the PCI IDs database (misc/pciids port) to fill this name automatically for new IDS. To call the script: tools/tools/drm/gen-drm_pciids \ /path/to/linux/drm_pciids.h \ /path/to/freebsd/drm_pciids.h \ /path/to/pciids/pci.ids Added: stable/9/tools/tools/drm/ - copied from r254852, head/tools/tools/drm/ Modified: stable/9/sys/dev/drm2/drm_pciids.h stable/9/tools/tools/README Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/tools/ (props changed) stable/9/tools/tools/ (props changed) Modified: stable/9/sys/dev/drm2/drm_pciids.h ============================================================================== --- stable/9/sys/dev/drm2/drm_pciids.h Sun Feb 9 18:12:27 2014 (r261671) +++ stable/9/sys/dev/drm2/drm_pciids.h Sun Feb 9 19:36:27 2014 (r261672) @@ -1,14 +1,348 @@ /* * $FreeBSD$ */ + /* - This file is auto-generated from the drm_pciids.txt in the DRM CVS - Please contact dri-devel@lists.sf.net to add new cards to this list -*/ + * Generated by gen-drm_pciids from: + * o previous FreeBSD's drm_pciids.h + * o Linux' drm_pciids.h + * o the PCI ID repository (http://pciids.sourceforge.net/) + * + * See tools/tools/drm/gen-drm_pciids. + */ + +#define ffb_PCI_IDS \ + {0, 0, 0, NULL} + +#define gamma_PCI_IDS \ + {0x3D3D, 0x0008, 0, "3DLabs GLINT Gamma G1"}, \ + {0, 0, 0, NULL} + +#define i810_PCI_IDS \ + {0x8086, 0x1132, 0, "Intel i815 GMCH"}, \ + {0x8086, 0x7121, 0, "Intel i810 GMCH"}, \ + {0x8086, 0x7123, 0, "Intel i810-DC100 GMCH"}, \ + {0x8086, 0x7125, 0, "Intel i810E GMCH"}, \ + {0, 0, 0, NULL} + +#define i830_PCI_IDS \ + {0x8086, 0x2562, 0, "Intel i845G GMCH"}, \ + {0x8086, 0x2572, 0, "Intel i865G GMCH"}, \ + {0x8086, 0x3577, 0, "Intel i830M GMCH"}, \ + {0x8086, 0x3582, 0, "Intel i852GM/i855GM GMCH"}, \ + {0, 0, 0, NULL} + +#define i915_PCI_IDS \ + {0x8086, 0x0042, CHIP_I9XX|CHIP_I915, "Intel IronLake"}, \ + {0x8086, 0x0046, CHIP_I9XX|CHIP_I915, "Intel IronLake"}, \ + {0x8086, 0x0102, CHIP_I9XX|CHIP_I915, "Intel SandyBridge"}, \ + {0x8086, 0x0106, CHIP_I9XX|CHIP_I915, "Intel SandyBridge (M)"}, \ + {0x8086, 0x010A, CHIP_I9XX|CHIP_I915, "Intel SandyBridge (M)"}, \ + {0x8086, 0x0112, CHIP_I9XX|CHIP_I915, "Intel SandyBridge"}, \ + {0x8086, 0x0116, CHIP_I9XX|CHIP_I915, "Intel SandyBridge (M)"}, \ + {0x8086, 0x0122, CHIP_I9XX|CHIP_I915, "Intel SandyBridge"}, \ + {0x8086, 0x0126, CHIP_I9XX|CHIP_I915, "Intel SandyBridge (M)"}, \ + {0x8086, 0x0152, CHIP_I9XX|CHIP_I915, "Intel IvyBridge"}, \ + {0x8086, 0x0156, CHIP_I9XX|CHIP_I915, "Intel IvyBridge (M)"}, \ + {0x8086, 0x015A, CHIP_I9XX|CHIP_I915, "Intel IvyBridge (S)"}, \ + {0x8086, 0x0162, CHIP_I9XX|CHIP_I915, "Intel IvyBridge"}, \ + {0x8086, 0x0166, CHIP_I9XX|CHIP_I915, "Intel IvyBridge (M)"}, \ + {0x8086, 0x016A, CHIP_I9XX|CHIP_I915, "Intel IvyBridge (S)"}, \ + {0x8086, 0x2562, CHIP_I8XX, "Intel i845G GMCH"}, \ + {0x8086, 0x2572, CHIP_I8XX, "Intel i865G GMCH"}, \ + {0x8086, 0x2582, CHIP_I9XX|CHIP_I915, "Intel i915G"}, \ + {0x8086, 0x258A, CHIP_I9XX|CHIP_I915, "Intel E7221 (i915)"}, \ + {0x8086, 0x2592, CHIP_I9XX|CHIP_I915, "Intel i915GM"}, \ + {0x8086, 0x2772, CHIP_I9XX|CHIP_I915, "Intel i945G"}, \ + {0x8086, 0x27A2, CHIP_I9XX|CHIP_I915, "Intel i945GM"}, \ + {0x8086, 0x27AE, CHIP_I9XX|CHIP_I915, "Intel i945GME"}, \ + {0x8086, 0x2972, CHIP_I9XX|CHIP_I965, "Intel i946GZ"}, \ + {0x8086, 0x2982, CHIP_I9XX|CHIP_I965, "Intel i965G"}, \ + {0x8086, 0x2992, CHIP_I9XX|CHIP_I965, "Intel i965Q"}, \ + {0x8086, 0x29A2, CHIP_I9XX|CHIP_I965, "Intel i965G"}, \ + {0x8086, 0x29B2, CHIP_I9XX|CHIP_I915, "Intel Q35"}, \ + {0x8086, 0x29C2, CHIP_I9XX|CHIP_I915, "Intel G33"}, \ + {0x8086, 0x29D2, CHIP_I9XX|CHIP_I915, "Intel Q33"}, \ + {0x8086, 0x2A02, CHIP_I9XX|CHIP_I965, "Intel i965GM"}, \ + {0x8086, 0x2A12, CHIP_I9XX|CHIP_I965, "Intel i965GME/GLE"}, \ + {0x8086, 0x2A42, CHIP_I9XX|CHIP_I965, "Mobile Intel® GM45 Express Chipset"}, \ + {0x8086, 0x2E02, CHIP_I9XX|CHIP_I965, "Intel Eaglelake"}, \ + {0x8086, 0x2E12, CHIP_I9XX|CHIP_I965, "Intel Q45/Q43"}, \ + {0x8086, 0x2E22, CHIP_I9XX|CHIP_I965, "Intel G45/G43"}, \ + {0x8086, 0x2E32, CHIP_I9XX|CHIP_I965, "Intel G41"}, \ + {0x8086, 0x2E42, CHIP_I9XX|CHIP_I915, "Intel G43 ?"}, \ + {0x8086, 0x2E92, CHIP_I9XX|CHIP_I915, "Intel G43 ?"}, \ + {0x8086, 0x3577, CHIP_I8XX, "Intel i830M GMCH"}, \ + {0x8086, 0x3582, CHIP_I8XX, "Intel i852GM/i855GM GMCH"}, \ + {0x8086, 0x358E, CHIP_I8XX, "Intel i852GM/i855GM GMCH"}, \ + {0x8086, 0xA001, CHIP_I9XX|CHIP_I965, "Intel Pineview"}, \ + {0x8086, 0xA011, CHIP_I9XX|CHIP_I965, "Intel Pineview (M)"}, \ + {0, 0, 0, NULL} + +#define imagine_PCI_IDS \ + {0x105D, 0x2309, IMAGINE_128, "Imagine 128"}, \ + {0x105D, 0x2339, IMAGINE_128_2, "Imagine 128-II"}, \ + {0x105D, 0x493D, IMAGINE_T2R, "Ticket to Ride"}, \ + {0x105D, 0x5348, IMAGINE_REV4, "Revolution IV"}, \ + {0, 0, 0, NULL} + +#define mach64_PCI_IDS \ + {0x1002, 0x4742, 0, "3D Rage Pro AGP 1X/2X"}, \ + {0x1002, 0x4744, 0, "3D Rage Pro AGP 1X"}, \ + {0x1002, 0x4749, 0, "3D Rage Pro"}, \ + {0x1002, 0x474C, 0, "Rage XC"}, \ + {0x1002, 0x474D, 0, "Rage XL AGP 2X"}, \ + {0x1002, 0x474E, 0, "Rage XC AGP"}, \ + {0x1002, 0x474F, 0, "Rage XL"}, \ + {0x1002, 0x4750, 0, "3D Rage Pro 215GP"}, \ + {0x1002, 0x4751, 0, "3D Rage Pro 215GQ"}, \ + {0x1002, 0x4752, 0, "Rage XL"}, \ + {0x1002, 0x4753, 0, "Rage XC"}, \ + {0x1002, 0x4C42, 0, "3D Rage LT Pro AGP-133"}, \ + {0x1002, 0x4C44, 0, "3D Rage LT Pro AGP-66"}, \ + {0x1002, 0x4C49, 0, "3D Rage LT Pro"}, \ + {0x1002, 0x4C4D, 0, "Rage Mobility P/M AGP 2X"}, \ + {0x1002, 0x4C4E, 0, "Rage Mobility L AGP 2X"}, \ + {0x1002, 0x4C50, 0, "3D Rage LT Pro"}, \ + {0x1002, 0x4C51, 0, "3D Rage LT Pro"}, \ + {0x1002, 0x4C52, 0, "Rage Mobility P/M"}, \ + {0x1002, 0x4C53, 0, "Rage Mobility L"}, \ + {0, 0, 0, NULL} + +#define mga_PCI_IDS \ + {0x102B, 0x0520, MGA_CARD_TYPE_G200, "Matrox G200 (PCI)"}, \ + {0x102B, 0x0521, MGA_CARD_TYPE_G200, "Matrox G200 (AGP)"}, \ + {0x102B, 0x0525, MGA_CARD_TYPE_G400, "Matrox G400/G450 (AGP)"}, \ + {0x102B, 0x2527, MGA_CARD_TYPE_G550, "Matrox G550 (AGP)"}, \ + {0, 0, 0, NULL} + +#define nv_PCI_IDS \ + {0x10DE, 0x0020, NV04, "NVidia RIVA TNT"}, \ + {0x10DE, 0x0028, NV04, "NVidia RIVA TNT2"}, \ + {0x10DE, 0x0029, NV04, "NVidia RIVA TNT2 Ultra"}, \ + {0x10DE, 0x002A, NV04, "NVidia Unknown TNT2"}, \ + {0x10DE, 0x002C, NV04, "NVidia Vanta"}, \ + {0x10DE, 0x002D, NV04, "NVidia RIVA TNT2 Model 64"}, \ + {0x10DE, 0x0040, NV40, "NVidia GeForce 6800 Ultra"}, \ + {0x10DE, 0x0041, NV40, "NVidia GeForce 6800"}, \ + {0x10DE, 0x0042, NV40, "NVidia GeForce 6800 LE"}, \ + {0x10DE, 0x0043, NV40, "NVidia 0x0043"}, \ + {0x10DE, 0x0045, NV40, "NVidia GeForce 6800 GT"}, \ + {0x10DE, 0x0046, NV40, "NVidia GeForce 6800 GT"}, \ + {0x10DE, 0x0049, NV40, "NVidia 0x0049"}, \ + {0x10DE, 0x004E, NV40, "NVidia Quadro FX 4000"}, \ + {0x10DE, 0x0090, NV40, "NVidia 0x0090"}, \ + {0x10DE, 0x0091, NV40, "NVidia GeForce 7800 GTX"}, \ + {0x10DE, 0x0092, NV40, "NVidia 0x0092"}, \ + {0x10DE, 0x0093, NV40, "NVidia 0x0093"}, \ + {0x10DE, 0x0094, NV40, "NVidia 0x0094"}, \ + {0x10DE, 0x0098, NV40, "NVidia 0x0098"}, \ + {0x10DE, 0x0099, NV40, "NVidia GeForce Go 7800 GTX"}, \ + {0x10DE, 0x009C, NV40, "NVidia 0x009C"}, \ + {0x10DE, 0x009D, NV40, "NVidia Quadro FX 4500"}, \ + {0x10DE, 0x009E, NV40, "NVidia 0x009E"}, \ + {0x10DE, 0x00A0, NV04, "NVidia Aladdin TNT2"}, \ + {0x10DE, 0x00C0, NV40, "NVidia 0x00C0"}, \ + {0x10DE, 0x00C1, NV40, "NVidia GeForce 6800"}, \ + {0x10DE, 0x00C2, NV40, "NVidia GeForce 6800 LE"}, \ + {0x10DE, 0x00C8, NV40, "NVidia GeForce Go 6800"}, \ + {0x10DE, 0x00C9, NV40, "NVidia GeForce Go 6800 Ultra"}, \ + {0x10DE, 0x00CC, NV40, "NVidia Quadro FX Go1400"}, \ + {0x10DE, 0x00CD, NV40, "NVidia Quadro FX 3450/4000 SDI"}, \ + {0x10DE, 0x00CE, NV40, "NVidia Quadro FX 1400"}, \ + {0x10DE, 0x00F0, NV40, "Nvidia GeForce 6600 GT"}, \ + {0x10DE, 0x00F1, NV40, "Nvidia GeForce 6600 GT"}, \ + {0x10DE, 0x0100, NV10, "NVidia GeForce 256"}, \ + {0x10DE, 0x0101, NV10, "NVidia GeForce DDR"}, \ + {0x10DE, 0x0103, NV10, "NVidia Quadro"}, \ + {0x10DE, 0x0110, NV10, "NVidia GeForce2 MX/MX 400"}, \ + {0x10DE, 0x0111, NV10, "NVidia GeForce2 MX 100/200"}, \ + {0x10DE, 0x0112, NV10, "NVidia GeForce2 Go"}, \ + {0x10DE, 0x0113, NV10, "NVidia Quadro2 MXR/EX/Go"}, \ + {0x10DE, 0x0140, NV40, "NVidia GeForce 6600 GT"}, \ + {0x10DE, 0x0141, NV40, "NVidia GeForce 6600"}, \ + {0x10DE, 0x0142, NV40, "NVidia GeForce 6600 LE"}, \ + {0x10DE, 0x0143, NV40, "NVidia 0x0143"}, \ + {0x10DE, 0x0144, NV40, "NVidia GeForce Go 6600"}, \ + {0x10DE, 0x0145, NV40, "NVidia GeForce 6610 XL"}, \ + {0x10DE, 0x0146, NV40, "NVidia GeForce Go 6600 TE/6200 TE"}, \ + {0x10DE, 0x0147, NV40, "NVidia GeForce 6700 XL"}, \ + {0x10DE, 0x0148, NV40, "NVidia GeForce Go 6600"}, \ + {0x10DE, 0x0149, NV40, "NVidia GeForce Go 6600 GT"}, \ + {0x10DE, 0x014B, NV40, "NVidia 0x014B"}, \ + {0x10DE, 0x014C, NV40, "NVidia 0x014C"}, \ + {0x10DE, 0x014D, NV40, "NVidia 0x014D"}, \ + {0x10DE, 0x014E, NV40, "NVidia Quadro FX 540"}, \ + {0x10DE, 0x014F, NV40, "NVidia GeForce 6200"}, \ + {0x10DE, 0x0150, NV10, "NVidia GeForce2 GTS"}, \ + {0x10DE, 0x0151, NV10, "NVidia GeForce2 Ti"}, \ + {0x10DE, 0x0152, NV10, "NVidia GeForce2 Ultra"}, \ + {0x10DE, 0x0153, NV10, "NVidia Quadro2 Pro"}, \ + {0x10DE, 0x0160, NV40, "NVidia 0x0160"}, \ + {0x10DE, 0x0161, NV40, "NVidia GeForce 6200 TurboCache(TM)"}, \ + {0x10DE, 0x0162, NV40, "NVidia GeForce 6200SE TurboCache(TM)"}, \ + {0x10DE, 0x0163, NV40, "NVidia 0x0163"}, \ + {0x10DE, 0x0164, NV40, "NVidia GeForce Go 6200"}, \ + {0x10DE, 0x0165, NV40, "NVidia Quadro NVS 285"}, \ + {0x10DE, 0x0166, NV40, "NVidia GeForce Go 6400"}, \ + {0x10DE, 0x0167, NV40, "NVidia GeForce Go 6200"}, \ + {0x10DE, 0x0168, NV40, "NVidia GeForce Go 6400"}, \ + {0x10DE, 0x0169, NV40, "NVidia 0x0169"}, \ + {0x10DE, 0x016B, NV40, "NVidia 0x016B"}, \ + {0x10DE, 0x016C, NV40, "NVidia 0x016C"}, \ + {0x10DE, 0x016D, NV40, "NVidia 0x016D"}, \ + {0x10DE, 0x016E, NV40, "NVidia 0x016E"}, \ + {0x10DE, 0x0170, NV10, "NVidia GeForce4 MX 460"}, \ + {0x10DE, 0x0171, NV10, "NVidia GeForce4 MX 440"}, \ + {0x10DE, 0x0172, NV10, "NVidia GeForce4 MX 420"}, \ + {0x10DE, 0x0173, NV10, "NVidia GeForce4 MX 440-SE"}, \ + {0x10DE, 0x0174, NV10, "NVidia GeForce4 440 Go"}, \ + {0x10DE, 0x0175, NV10, "NVidia GeForce4 420 Go"}, \ + {0x10DE, 0x0176, NV10, "NVidia GeForce4 420 Go 32M"}, \ + {0x10DE, 0x0177, NV10, "NVidia GeForce4 460 Go"}, \ + {0x10DE, 0x0178, NV10, "NVidia Quadro4 550 XGL"}, \ + {0x10DE, 0x0179, NV10, "NVidia GeForce4"}, \ + {0x10DE, 0x017A, NV10, "NVidia Quadro4 NVS"}, \ + {0x10DE, 0x017C, NV10, "NVidia Quadro4 500 GoGL"}, \ + {0x10DE, 0x017D, NV10, "NVidia GeForce4 410 Go 16M"}, \ + {0x10DE, 0x0181, NV10, "NVidia GeForce4 MX 440 with AGP8X"}, \ + {0x10DE, 0x0182, NV10, "NVidia GeForce4 MX 440SE with AGP8X"}, \ + {0x10DE, 0x0183, NV10, "NVidia GeForce4 MX 420 with AGP8X"}, \ + {0x10DE, 0x0185, NV10, "NVidia GeForce4 MX 4000"}, \ + {0x10DE, 0x0186, NV10, "NVidia GeForce4 448 Go"}, \ + {0x10DE, 0x0187, NV10, "NVidia GeForce4 488 Go"}, \ + {0x10DE, 0x0188, NV10, "NVidia Quadro4 580 XGL"}, \ + {0x10DE, 0x0189, NV10, "NVidia GeForce4 MX with AGP8X (Mac)"}, \ + {0x10DE, 0x018A, NV10, "NVidia Quadro4 280 NVS"}, \ + {0x10DE, 0x018B, NV10, "NVidia Quadro4 380 XGL"}, \ + {0x10DE, 0x018C, NV10, "NVidia Quadro NVS 50 PCI"}, \ + {0x10DE, 0x018D, NV10, "NVidia GeForce4 448 Go"}, \ + {0x10DE, 0x01A0, NV10, "NVidia GeForce2 Integrated GPU"}, \ + {0x10DE, 0x01F0, NV10, "NVidia GeForce4 MX Integrated GPU"}, \ + {0x10DE, 0x0200, NV20, "NVidia GeForce3"}, \ + {0x10DE, 0x0201, NV20, "NVidia GeForce3 Ti 200"}, \ + {0x10DE, 0x0202, NV20, "NVidia GeForce3 Ti 500"}, \ + {0x10DE, 0x0203, NV20, "NVidia Quadro DCC"}, \ + {0x10DE, 0x0210, NV40, "NVidia 0x0210"}, \ + {0x10DE, 0x0211, NV40, "NVidia GeForce 6800"}, \ + {0x10DE, 0x0212, NV40, "NVidia GeForce 6800 LE"}, \ + {0x10DE, 0x0215, NV40, "NVidia GeForce 6800 GT"}, \ + {0x10DE, 0x0220, NV40, "NVidia 0x0220"}, \ + {0x10DE, 0x0221, NV40, "NVidia GeForce 6200"}, \ + {0x10DE, 0x0222, NV40, "NVidia 0x0222"}, \ + {0x10DE, 0x0228, NV40, "NVidia 0x0228"}, \ + {0x10DE, 0x0250, NV20, "NVidia GeForce4 Ti 4600"}, \ + {0x10DE, 0x0251, NV20, "NVidia GeForce4 Ti 4400"}, \ + {0x10DE, 0x0252, NV20, "NVidia 0x0252"}, \ + {0x10DE, 0x0253, NV20, "NVidia GeForce4 Ti 4200"}, \ + {0x10DE, 0x0258, NV20, "NVidia Quadro4 900 XGL"}, \ + {0x10DE, 0x0259, NV20, "NVidia Quadro4 750 XGL"}, \ + {0x10DE, 0x025B, NV20, "NVidia Quadro4 700 XGL"}, \ + {0x10DE, 0x0280, NV20, "NVidia GeForce4 Ti 4800"}, \ + {0x10DE, 0x0281, NV20, "NVidia GeForce4 Ti 4200 with AGP8X"}, \ + {0x10DE, 0x0282, NV20, "NVidia GeForce4 Ti 4800 SE"}, \ + {0x10DE, 0x0286, NV20, "NVidia GeForce4 4200 Go"}, \ + {0x10DE, 0x0288, NV20, "NVidia Quadro4 980 XGL"}, \ + {0x10DE, 0x0289, NV20, "NVidia Quadro4 780 XGL"}, \ + {0x10DE, 0x028C, NV20, "NVidia Quadro4 700 GoGL"}, \ + {0x10DE, 0x0301, NV30, "NVidia GeForce FX 5800 Ultra"}, \ + {0x10DE, 0x0302, NV30, "NVidia GeForce FX 5800"}, \ + {0x10DE, 0x0308, NV30, "NVidia Quadro FX 2000"}, \ + {0x10DE, 0x0309, NV30, "NVidia Quadro FX 1000"}, \ + {0x10DE, 0x0311, NV30, "NVidia GeForce FX 5600 Ultra"}, \ + {0x10DE, 0x0312, NV30, "NVidia GeForce FX 5600"}, \ + {0x10DE, 0x0313, NV30, "NVidia 0x0313"}, \ + {0x10DE, 0x0314, NV30, "NVidia GeForce FX 5600SE"}, \ + {0x10DE, 0x0316, NV30, "NVidia 0x0316"}, \ + {0x10DE, 0x0317, NV30, "NVidia 0x0317"}, \ + {0x10DE, 0x031A, NV30, "NVidia GeForce FX Go5600"}, \ + {0x10DE, 0x031B, NV30, "NVidia GeForce FX Go5650"}, \ + {0x10DE, 0x031C, NV30, "NVidia Quadro FX Go700"}, \ + {0x10DE, 0x031D, NV30, "NVidia 0x031D"}, \ + {0x10DE, 0x031E, NV30, "NVidia 0x031E"}, \ + {0x10DE, 0x031F, NV30, "NVidia 0x031F"}, \ + {0x10DE, 0x0320, NV30, "NVidia GeForce FX 5200"}, \ + {0x10DE, 0x0321, NV30, "NVidia GeForce FX 5200 Ultra"}, \ + {0x10DE, 0x0322, NV30, "NVidia GeForce FX 5200"}, \ + {0x10DE, 0x0323, NV30, "NVidia GeForce FX 5200SE"}, \ + {0x10DE, 0x0324, NV30, "NVidia GeForce FX Go5200"}, \ + {0x10DE, 0x0325, NV30, "NVidia GeForce FX Go5250"}, \ + {0x10DE, 0x0326, NV30, "NVidia GeForce FX 5500"}, \ + {0x10DE, 0x0327, NV30, "NVidia GeForce FX 5100"}, \ + {0x10DE, 0x0328, NV30, "NVidia GeForce FX Go5200 32M/64M"}, \ + {0x10DE, 0x0329, NV30, "NVidia GeForce FX 5200 (Mac)"}, \ + {0x10DE, 0x032A, NV30, "NVidia Quadro NVS 280 PCI"}, \ + {0x10DE, 0x032B, NV30, "NVidia Quadro FX 500/600 PCI"}, \ + {0x10DE, 0x032C, NV30, "NVidia GeForce FX Go53xx Series"}, \ + {0x10DE, 0x032D, NV30, "NVidia GeForce FX Go5100"}, \ + {0x10DE, 0x032F, NV30, "NVidia 0x032F"}, \ + {0x10DE, 0x0330, NV30, "NVidia GeForce FX 5900 Ultra"}, \ + {0x10DE, 0x0331, NV30, "NVidia GeForce FX 5900"}, \ + {0x10DE, 0x0332, NV30, "NVidia GeForce FX 5900XT"}, \ + {0x10DE, 0x0333, NV30, "NVidia GeForce FX 5950 Ultra"}, \ + {0x10DE, 0x0334, NV30, "NVidia GeForce FX 5900ZT"}, \ + {0x10DE, 0x0338, NV30, "NVidia Quadro FX 3000"}, \ + {0x10DE, 0x033F, NV30, "NVidia Quadro FX 700"}, \ + {0x10DE, 0x0341, NV30, "NVidia GeForce FX 5700 Ultra"}, \ + {0x10DE, 0x0342, NV30, "NVidia GeForce FX 5700"}, \ + {0x10DE, 0x0343, NV30, "NVidia GeForce FX 5700LE"}, \ + {0x10DE, 0x0344, NV30, "NVidia GeForce FX 5700VE"}, \ + {0x10DE, 0x0345, NV30, "NVidia 0x0345"}, \ + {0x10DE, 0x0347, NV30, "NVidia GeForce FX Go5700"}, \ + {0x10DE, 0x0348, NV30, "NVidia GeForce FX Go5700"}, \ + {0x10DE, 0x0349, NV30, "NVidia 0x0349"}, \ + {0x10DE, 0x034B, NV30, "NVidia 0x034B"}, \ + {0x10DE, 0x034C, NV30, "NVidia Quadro FX Go1000"}, \ + {0x10DE, 0x034E, NV30, "NVidia Quadro FX 1100"}, \ + {0x10DE, 0x034F, NV30, "NVidia 0x034F"}, \ + {0, 0, 0, NULL} + +#define r128_PCI_IDS \ + {0x1002, 0x4C45, 0, "ATI Rage 128 Mobility LE (PCI)"}, \ + {0x1002, 0x4C46, 0, "ATI Rage 128 Mobility LF (AGP)"}, \ + {0x1002, 0x4D46, 0, "ATI Rage 128 Mobility MF (AGP)"}, \ + {0x1002, 0x4D4C, 0, "ATI Rage 128 Mobility ML (AGP)"}, \ + {0x1002, 0x5041, 0, "ATI Rage 128 Pro PA (PCI)"}, \ + {0x1002, 0x5042, 0, "ATI Rage 128 Pro PB (AGP)"}, \ + {0x1002, 0x5043, 0, "ATI Rage 128 Pro PC (AGP)"}, \ + {0x1002, 0x5044, 0, "ATI Rage 128 Pro PD (PCI)"}, \ + {0x1002, 0x5045, 0, "ATI Rage 128 Pro PE (AGP)"}, \ + {0x1002, 0x5046, 0, "ATI Rage 128 Pro PF (AGP)"}, \ + {0x1002, 0x5047, 0, "ATI Rage 128 Pro PG (PCI)"}, \ + {0x1002, 0x5048, 0, "ATI Rage 128 Pro PH (AGP)"}, \ + {0x1002, 0x5049, 0, "ATI Rage 128 Pro PI (AGP)"}, \ + {0x1002, 0x504A, 0, "ATI Rage 128 Pro PJ (PCI)"}, \ + {0x1002, 0x504B, 0, "ATI Rage 128 Pro PK (AGP)"}, \ + {0x1002, 0x504C, 0, "ATI Rage 128 Pro PL (AGP)"}, \ + {0x1002, 0x504D, 0, "ATI Rage 128 Pro PM (PCI)"}, \ + {0x1002, 0x504E, 0, "ATI Rage 128 Pro PN (AGP)"}, \ + {0x1002, 0x504F, 0, "ATI Rage 128 Pro PO (AGP)"}, \ + {0x1002, 0x5050, 0, "ATI Rage 128 Pro PP (PCI)"}, \ + {0x1002, 0x5051, 0, "ATI Rage 128 Pro PQ (AGP)"}, \ + {0x1002, 0x5052, 0, "ATI Rage 128 Pro PR (PCI)"}, \ + {0x1002, 0x5053, 0, "ATI Rage 128 Pro PS (PCI)"}, \ + {0x1002, 0x5054, 0, "ATI Rage 128 Pro PT (AGP)"}, \ + {0x1002, 0x5055, 0, "ATI Rage 128 Pro PU (AGP)"}, \ + {0x1002, 0x5056, 0, "ATI Rage 128 Pro PV (PCI)"}, \ + {0x1002, 0x5057, 0, "ATI Rage 128 Pro PW (AGP)"}, \ + {0x1002, 0x5058, 0, "ATI Rage 128 Pro PX (AGP)"}, \ + {0x1002, 0x5245, 0, "ATI Rage 128 RE (PCI)"}, \ + {0x1002, 0x5246, 0, "ATI Rage 128 RF (AGP)"}, \ + {0x1002, 0x5247, 0, "ATI Rage 128 RG (AGP)"}, \ + {0x1002, 0x524B, 0, "ATI Rage 128 RK (PCI)"}, \ + {0x1002, 0x524C, 0, "ATI Rage 128 RL (AGP)"}, \ + {0x1002, 0x534D, 0, "ATI Rage 128 SM (AGP)"}, \ + {0x1002, 0x5446, 0, "ATI Rage 128 Pro Ultra TF (AGP)"}, \ + {0x1002, 0x544C, 0, "ATI Rage 128 Pro Ultra TL (AGP)"}, \ + {0x1002, 0x5452, 0, "ATI Rage 128 Pro Ultra TR (AGP)"}, \ + {0, 0, 0, NULL} + #define radeon_PCI_IDS \ {0x1002, 0x3150, CHIP_RV380|RADEON_IS_MOBILITY, "ATI Radeon Mobility X600 M24"}, \ + {0x1002, 0x3151, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "M24 [FireMV 2400]"}, \ {0x1002, 0x3152, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Radeon Mobility X300 M24"}, \ {0x1002, 0x3154, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FireGL M24 GL"}, \ + {0x1002, 0x3155, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "RV380 [FireMV 2400]"}, \ {0x1002, 0x3E50, CHIP_RV380|RADEON_NEW_MEMMAP, "ATI Radeon RV380 X600"}, \ {0x1002, 0x3E54, CHIP_RV380|RADEON_NEW_MEMMAP, "ATI FireGL V3200 RV380"}, \ {0x1002, 0x4136, CHIP_RS100|RADEON_IS_IGP, "ATI Radeon RS100 IGP 320"}, \ @@ -46,6 +380,7 @@ {0x1002, 0x4A4F, CHIP_R420|RADEON_NEW_MEMMAP, "ATI Radeon JO R420 X800 SE"}, \ {0x1002, 0x4A50, CHIP_R420|RADEON_NEW_MEMMAP, "ATI Radeon JP R420 X800 XT PE"}, \ {0x1002, 0x4A54, CHIP_R420|RADEON_NEW_MEMMAP, "ATI Radeon JT R420 AIW X800 VE"}, \ + {0x1002, 0x4B48, CHIP_R420|RADEON_NEW_MEMMAP, "R481 [Radeon X850 PCIe]"}, \ {0x1002, 0x4B49, CHIP_R420|RADEON_NEW_MEMMAP, "ATI Radeon R481 X850 XT"}, \ {0x1002, 0x4B4A, CHIP_R420|RADEON_NEW_MEMMAP, "ATI Radeon R481 X850 SE"}, \ {0x1002, 0x4B4B, CHIP_R420|RADEON_NEW_MEMMAP, "ATI Radeon R481 X850 Pro"}, \ @@ -57,6 +392,7 @@ {0x1002, 0x4C64, CHIP_RV250|RADEON_IS_MOBILITY, "ATI Radeon Ld RV250 Mobility 9000 M9"}, \ {0x1002, 0x4C66, CHIP_RV250, "ATI Radeon Lf RV250 Mobility 9000 M9 / FireMV 2400 PCI"}, \ {0x1002, 0x4C67, CHIP_RV250|RADEON_IS_MOBILITY, "ATI Radeon Lg RV250 Mobility 9000 M9"}, \ + {0x1002, 0x4C6E, CHIP_RV280|RADEON_IS_MOBILITY, "Radeon RV250 Ln [Radeon Mobility 9000 M9] (Secondary)"}, \ {0x1002, 0x4E44, CHIP_R300, "ATI Radeon ND R300 9700 Pro"}, \ {0x1002, 0x4E45, CHIP_R300, "ATI Radeon NE R300 9500 Pro / 9700"}, \ {0x1002, 0x4E46, CHIP_R300, "ATI Radeon NF R300 9600TX"}, \ @@ -108,41 +444,199 @@ {0x1002, 0x5835, CHIP_RS300|RADEON_IS_IGP|RADEON_IS_MOBILITY, "ATI Radeon RS300 Mobility IGP"}, \ {0x1002, 0x5954, CHIP_RS480|RADEON_IS_IGP|RADEON_IS_IGPGART, "ATI RS480 XPRESS 200G"}, \ {0x1002, 0x5955, CHIP_RS480|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART, "ATI Radeon XPRESS 200M 5955"}, \ - {0x1002, 0x5974, CHIP_RS480|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART, "ATI Radeon RS482 XPRESS 200"}, \ - {0x1002, 0x5975, CHIP_RS480|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART, "ATI Radeon RS485 XPRESS 1100 IGP"}, \ {0x1002, 0x5960, CHIP_RV280, "ATI Radeon RV280 9250"}, \ {0x1002, 0x5961, CHIP_RV280, "ATI Radeon RV280 9200"}, \ {0x1002, 0x5962, CHIP_RV280, "ATI Radeon RV280 9200"}, \ {0x1002, 0x5964, CHIP_RV280, "ATI Radeon RV280 9200 SE"}, \ {0x1002, 0x5965, CHIP_RV280, "ATI FireMV 2200 PCI"}, \ {0x1002, 0x5969, CHIP_RV100, "ATI ES1000 RN50"}, \ - {0x1002, 0x5a41, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_IGPGART, "ATI Radeon XPRESS 200 5A41 (PCIE)"}, \ - {0x1002, 0x5a42, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART, "ATI Radeon XPRESS 200M 5A42 (PCIE)"}, \ - {0x1002, 0x5a61, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_IGPGART, "ATI Radeon RC410 XPRESS 200"}, \ - {0x1002, 0x5a62, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART, "ATI Radeon RC410 XPRESS 200M"}, \ - {0x1002, 0x5b60, CHIP_RV380|RADEON_NEW_MEMMAP, "ATI Radeon RV370 X300 SE"}, \ - {0x1002, 0x5b62, CHIP_RV380|RADEON_NEW_MEMMAP, "ATI Radeon RV370 X600 Pro"}, \ - {0x1002, 0x5b63, CHIP_RV380|RADEON_NEW_MEMMAP, "ATI Radeon RV370 X550"}, \ - {0x1002, 0x5b64, CHIP_RV380|RADEON_NEW_MEMMAP, "ATI FireGL V3100 (RV370) 5B64"}, \ - {0x1002, 0x5b65, CHIP_RV380|RADEON_NEW_MEMMAP, "ATI FireMV 2200 PCIE (RV370) 5B65"}, \ - {0x1002, 0x5c61, CHIP_RV280|RADEON_IS_MOBILITY, "ATI Radeon RV280 Mobility"}, \ - {0x1002, 0x5c63, CHIP_RV280|RADEON_IS_MOBILITY, "ATI Radeon RV280 Mobility"}, \ - {0x1002, 0x5d48, CHIP_R423|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon X800 XT M28"}, \ - {0x1002, 0x5d49, CHIP_R423|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility FireGL V5100 M28"}, \ - {0x1002, 0x5d4a, CHIP_R423|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon X800 M28"}, \ - {0x1002, 0x5d4c, CHIP_R423|RADEON_NEW_MEMMAP, "ATI Radeon R480 X850"}, \ - {0x1002, 0x5d4d, CHIP_R423|RADEON_NEW_MEMMAP, "ATI Radeon R480 X850 XT PE"}, \ - {0x1002, 0x5d4e, CHIP_R423|RADEON_NEW_MEMMAP, "ATI Radeon R480 X850 SE"}, \ - {0x1002, 0x5d4f, CHIP_R423|RADEON_NEW_MEMMAP, "ATI Radeon R480 X850 Pro"}, \ - {0x1002, 0x5d50, CHIP_R423|RADEON_NEW_MEMMAP, "ATI unknown Radeon / FireGL R480"}, \ - {0x1002, 0x5d52, CHIP_R423|RADEON_NEW_MEMMAP, "ATI Radeon R480 X850 XT"}, \ - {0x1002, 0x5d57, CHIP_R423|RADEON_NEW_MEMMAP, "ATI Radeon R423 X800 XT"}, \ - {0x1002, 0x5e48, CHIP_RV410|RADEON_NEW_MEMMAP, "ATI FireGL V5000 RV410"}, \ - {0x1002, 0x5e4a, CHIP_RV410|RADEON_NEW_MEMMAP, "ATI Radeon RV410 X700 XT"}, \ - {0x1002, 0x5e4b, CHIP_RV410|RADEON_NEW_MEMMAP, "ATI Radeon RV410 X700 Pro"}, \ - {0x1002, 0x5e4c, CHIP_RV410|RADEON_NEW_MEMMAP, "ATI Radeon RV410 X700 SE"}, \ - {0x1002, 0x5e4d, CHIP_RV410|RADEON_NEW_MEMMAP, "ATI Radeon RV410 X700"}, \ - {0x1002, 0x5e4f, CHIP_RV410|RADEON_NEW_MEMMAP, "ATI Radeon RV410 X700 SE"}, \ + {0x1002, 0x5974, CHIP_RS480|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART, "ATI Radeon RS482 XPRESS 200"}, \ + {0x1002, 0x5975, CHIP_RS480|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART, "ATI Radeon RS485 XPRESS 1100 IGP"}, \ + {0x1002, 0x5A41, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_IGPGART, "ATI Radeon XPRESS 200 5A41 (PCIE)"}, \ + {0x1002, 0x5A42, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART, "ATI Radeon XPRESS 200M 5A42 (PCIE)"}, \ + {0x1002, 0x5A61, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_IGPGART, "ATI Radeon RC410 XPRESS 200"}, \ + {0x1002, 0x5A62, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART, "ATI Radeon RC410 XPRESS 200M"}, \ + {0x1002, 0x5B60, CHIP_RV380|RADEON_NEW_MEMMAP, "ATI Radeon RV370 X300 SE"}, \ + {0x1002, 0x5B62, CHIP_RV380|RADEON_NEW_MEMMAP, "ATI Radeon RV370 X600 Pro"}, \ + {0x1002, 0x5B63, CHIP_RV380|RADEON_NEW_MEMMAP, "ATI Radeon RV370 X550"}, \ + {0x1002, 0x5B64, CHIP_RV380|RADEON_NEW_MEMMAP, "ATI FireGL V3100 (RV370) 5B64"}, \ + {0x1002, 0x5B65, CHIP_RV380|RADEON_NEW_MEMMAP, "ATI FireMV 2200 PCIE (RV370) 5B65"}, \ + {0x1002, 0x5C61, CHIP_RV280|RADEON_IS_MOBILITY, "ATI Radeon RV280 Mobility"}, \ + {0x1002, 0x5C63, CHIP_RV280|RADEON_IS_MOBILITY, "ATI Radeon RV280 Mobility"}, \ + {0x1002, 0x5D48, CHIP_R423|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon X800 XT M28"}, \ + {0x1002, 0x5D49, CHIP_R423|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility FireGL V5100 M28"}, \ + {0x1002, 0x5D4A, CHIP_R423|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon X800 M28"}, \ + {0x1002, 0x5D4C, CHIP_R423|RADEON_NEW_MEMMAP, "ATI Radeon R480 X850"}, \ + {0x1002, 0x5D4D, CHIP_R423|RADEON_NEW_MEMMAP, "ATI Radeon R480 X850 XT PE"}, \ + {0x1002, 0x5D4E, CHIP_R423|RADEON_NEW_MEMMAP, "ATI Radeon R480 X850 SE"}, \ + {0x1002, 0x5D4F, CHIP_R423|RADEON_NEW_MEMMAP, "ATI Radeon R480 X850 Pro"}, \ + {0x1002, 0x5D50, CHIP_R423|RADEON_NEW_MEMMAP, "ATI unknown Radeon / FireGL R480"}, \ + {0x1002, 0x5D52, CHIP_R423|RADEON_NEW_MEMMAP, "ATI Radeon R480 X850 XT"}, \ + {0x1002, 0x5D57, CHIP_R423|RADEON_NEW_MEMMAP, "ATI Radeon R423 X800 XT"}, \ + {0x1002, 0x5E48, CHIP_RV410|RADEON_NEW_MEMMAP, "ATI FireGL V5000 RV410"}, \ + {0x1002, 0x5E4A, CHIP_RV410|RADEON_NEW_MEMMAP, "ATI Radeon RV410 X700 XT"}, \ + {0x1002, 0x5E4B, CHIP_RV410|RADEON_NEW_MEMMAP, "ATI Radeon RV410 X700 Pro"}, \ + {0x1002, 0x5E4C, CHIP_RV410|RADEON_NEW_MEMMAP, "ATI Radeon RV410 X700 SE"}, \ + {0x1002, 0x5E4D, CHIP_RV410|RADEON_NEW_MEMMAP, "ATI Radeon RV410 X700"}, \ + {0x1002, 0x5E4F, CHIP_RV410|RADEON_NEW_MEMMAP, "ATI Radeon RV410 X700 SE"}, \ + {0x1002, 0x6700, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Cayman GL XT [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6701, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Cayman GL XT [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6702, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Cayman GL XT [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6703, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Cayman GL XT [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6704, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Cayman PRO GL [FirePro V7900]"}, \ + {0x1002, 0x6705, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Cayman GL PRO [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6706, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Cayman GL [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6707, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Cayman LE GL [FirePro V5900]"}, \ + {0x1002, 0x6708, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Cayman GL [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6709, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Cayman GL [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6718, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Cayman XT [Radeon HD 6970]"}, \ + {0x1002, 0x6719, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Cayman PRO [Radeon HD 6950]"}, \ + {0x1002, 0x671C, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Antilles [Radeon HD 6990]"}, \ + {0x1002, 0x671D, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Antilles [AMD Radeon HD 6990]"}, \ + {0x1002, 0x671F, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Cayman [Radeon HD 6900 Series]"}, \ + {0x1002, 0x6720, CHIP_BARTS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Blackcomb [Radeon HD 6900M series]"}, \ + {0x1002, 0x6721, CHIP_BARTS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Blackcomb [Mobility Radeon HD 6000 series]"}, \ + {0x1002, 0x6722, CHIP_BARTS|RADEON_NEW_MEMMAP, "Barts GL [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6723, CHIP_BARTS|RADEON_NEW_MEMMAP, "Barts GL [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6724, CHIP_BARTS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Blackcomb [Mobility Radeon HD 6000 series]"}, \ + {0x1002, 0x6725, CHIP_BARTS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Blackcomb [Mobility Radeon HD 6000 series]"}, \ + {0x1002, 0x6726, CHIP_BARTS|RADEON_NEW_MEMMAP, "Barts GL [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6727, CHIP_BARTS|RADEON_NEW_MEMMAP, "Barts GL [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6728, CHIP_BARTS|RADEON_NEW_MEMMAP, "Barts GL [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6729, CHIP_BARTS|RADEON_NEW_MEMMAP, "Barts GL [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6738, CHIP_BARTS|RADEON_NEW_MEMMAP, "Barts XT [Radeon HD 6800 Series]"}, \ + {0x1002, 0x6739, CHIP_BARTS|RADEON_NEW_MEMMAP, "Barts PRO [Radeon HD 6800 Series]"}, \ + {0x1002, 0x673E, CHIP_BARTS|RADEON_NEW_MEMMAP, "Barts LE [AMD Radeon HD 6700 Series]"}, \ + {0x1002, 0x6740, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Whistler XT [AMD Radeon HD 6700M Series]"}, \ + {0x1002, 0x6741, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Whistler [AMD Radeon HD 6600M Series]"}, \ + {0x1002, 0x6742, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Whistler LE [AMD Radeon HD 6625M Graphics]"}, \ + {0x1002, 0x6743, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Whistler [Radeon E6760]"}, \ + {0x1002, 0x6744, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Whistler [ATI Mobility Radeon HD 6000 series]"}, \ + {0x1002, 0x6745, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Whistler"}, \ + {0x1002, 0x6746, CHIP_TURKS|RADEON_NEW_MEMMAP, "Turks GL [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6747, CHIP_TURKS|RADEON_NEW_MEMMAP, "Turks GL [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6748, CHIP_TURKS|RADEON_NEW_MEMMAP, "Turks GL [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6749, CHIP_TURKS|RADEON_NEW_MEMMAP, "Turks [FirePro V4900]"}, \ + {0x1002, 0x674A, CHIP_TURKS|RADEON_NEW_MEMMAP, "Turks [AMD FirePro V3900]"}, \ + {0x1002, 0x6750, CHIP_TURKS|RADEON_NEW_MEMMAP, "Turks [AMD Radeon HD 6570]"}, \ + {0x1002, 0x6751, CHIP_TURKS|RADEON_NEW_MEMMAP, "Turks [Radeon HD 7600A Series]"}, \ + {0x1002, 0x6758, CHIP_TURKS|RADEON_NEW_MEMMAP, "Turks [Radeon HD 6670]"}, \ + {0x1002, 0x6759, CHIP_TURKS|RADEON_NEW_MEMMAP, "Turks [Radeon HD 6570]"}, \ + {0x1002, 0x675B, CHIP_TURKS|RADEON_NEW_MEMMAP, "Unknown device name"}, \ + {0x1002, 0x675D, CHIP_TURKS|RADEON_NEW_MEMMAP, "Turks [Radeon HD 7500 Series]"}, \ + {0x1002, 0x675F, CHIP_TURKS|RADEON_NEW_MEMMAP, "Turks LE [Radeon HD 5500/7510 Series]"}, \ + {0x1002, 0x6760, CHIP_CAICOS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Caicos [Radeon HD 6400M/7400M Series]"}, \ + {0x1002, 0x6761, CHIP_CAICOS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Seymour LP [Radeon HD 6430M]"}, \ + {0x1002, 0x6762, CHIP_CAICOS|RADEON_NEW_MEMMAP, "Caicos GL [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6763, CHIP_CAICOS|RADEON_NEW_MEMMAP, "Seymour [Radeon E6460]"}, \ + {0x1002, 0x6764, CHIP_CAICOS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Seymour [Mobility Radeon HD 6000 series]"}, \ + {0x1002, 0x6765, CHIP_CAICOS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Seymour [Mobility Radeon HD 6000 series]"}, \ + {0x1002, 0x6766, CHIP_CAICOS|RADEON_NEW_MEMMAP, "Caicos"}, \ + {0x1002, 0x6767, CHIP_CAICOS|RADEON_NEW_MEMMAP, "Caicos"}, \ + {0x1002, 0x6768, CHIP_CAICOS|RADEON_NEW_MEMMAP, "Caicos"}, \ + {0x1002, 0x6770, CHIP_CAICOS|RADEON_NEW_MEMMAP, "Caicos [Radeon HD 6400 Series]"}, \ + {0x1002, 0x6771, CHIP_CAICOS|RADEON_NEW_MEMMAP, "Caicos"}, \ + {0x1002, 0x6772, CHIP_CAICOS|RADEON_NEW_MEMMAP, "Caicos [Radeon HD 7400A Series]"}, \ + {0x1002, 0x6778, CHIP_CAICOS|RADEON_NEW_MEMMAP, "Caicos [Radeon HD 7000 Series]"}, \ + {0x1002, 0x6779, CHIP_CAICOS|RADEON_NEW_MEMMAP, "Caicos [Radeon HD 6450]"}, \ + {0x1002, 0x677B, CHIP_CAICOS|RADEON_NEW_MEMMAP, "Caicos [Radeon HD 7400 Series]"}, \ + {0x1002, 0x6780, CHIP_TAHITI|RADEON_NEW_MEMMAP, "Tahiti [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6784, CHIP_TAHITI|RADEON_NEW_MEMMAP, "Tahiti [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6788, CHIP_TAHITI|RADEON_NEW_MEMMAP, "Tahiti [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x678A, CHIP_TAHITI|RADEON_NEW_MEMMAP, "Tahiti [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6790, CHIP_TAHITI|RADEON_NEW_MEMMAP, "Tahiti"}, \ + {0x1002, 0x6791, CHIP_TAHITI|RADEON_NEW_MEMMAP, "Tahiti"}, \ + {0x1002, 0x6792, CHIP_TAHITI|RADEON_NEW_MEMMAP, "Tahiti"}, \ + {0x1002, 0x6798, CHIP_TAHITI|RADEON_NEW_MEMMAP, "Tahiti XT [Radeon HD 7970]"}, \ + {0x1002, 0x6799, CHIP_TAHITI|RADEON_NEW_MEMMAP, "New Zealand [Radeon HD 7990]"}, \ + {0x1002, 0x679A, CHIP_TAHITI|RADEON_NEW_MEMMAP, "Tahiti PRO [Radeon HD 7950]"}, \ + {0x1002, 0x679B, CHIP_TAHITI|RADEON_NEW_MEMMAP, "Tahiti [Radeon HD 7900 Series]"}, \ + {0x1002, 0x679E, CHIP_TAHITI|RADEON_NEW_MEMMAP, "Tahiti LE [Radeon HD 7800 Series]"}, \ + {0x1002, 0x679F, CHIP_TAHITI|RADEON_NEW_MEMMAP, "Tahiti"}, \ + {0x1002, 0x6800, CHIP_PITCAIRN|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Wimbledon XT [Radeon HD 7970M]"}, \ + {0x1002, 0x6801, CHIP_PITCAIRN|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Wimbledon"}, \ + {0x1002, 0x6802, CHIP_PITCAIRN|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Wimbledon"}, \ + {0x1002, 0x6806, CHIP_PITCAIRN|RADEON_NEW_MEMMAP, "Pitcairn"}, \ + {0x1002, 0x6808, CHIP_PITCAIRN|RADEON_NEW_MEMMAP, "Pitcairn [ATI FirePro V(FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6809, CHIP_PITCAIRN|RADEON_NEW_MEMMAP, "Pitcairn [ATI FirePro V(FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6810, CHIP_PITCAIRN|RADEON_NEW_MEMMAP, "Pitcairn"}, \ + {0x1002, 0x6811, CHIP_PITCAIRN|RADEON_NEW_MEMMAP, "Pitcairn"}, \ + {0x1002, 0x6816, CHIP_PITCAIRN|RADEON_NEW_MEMMAP, "Pitcairn"}, \ + {0x1002, 0x6817, CHIP_PITCAIRN|RADEON_NEW_MEMMAP, "Pitcairn"}, \ + {0x1002, 0x6818, CHIP_PITCAIRN|RADEON_NEW_MEMMAP, "Pitcairn [Radeon HD 7800]"}, \ + {0x1002, 0x6819, CHIP_PITCAIRN|RADEON_NEW_MEMMAP, "Pitcairn PRO [Radeon HD 7800]"}, \ + {0x1002, 0x6820, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Radeon HD 8800M Series"}, \ + {0x1002, 0x6821, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Radeon HD 8800M Series"}, \ + {0x1002, 0x6823, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Radeon HD 8800M Series"}, \ + {0x1002, 0x6824, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Chelsea [Radeon HD 7700M Series]"}, \ + {0x1002, 0x6825, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Cape Verde [Radeon HD 7800M Series]"}, \ + {0x1002, 0x6826, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Chelsea [Radeon HD 7700M Series]"}, \ + {0x1002, 0x6827, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Cape Verde [Radeon HD 7800M Series]"}, \ + {0x1002, 0x6828, CHIP_VERDE|RADEON_NEW_MEMMAP, "Cape Verde"}, \ + {0x1002, 0x6829, CHIP_VERDE|RADEON_NEW_MEMMAP, "Cape Verde"}, \ + {0x1002, 0x682B, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Radeon HD 8800M Series"}, \ + {0x1002, 0x682D, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Unknown device name"}, \ + {0x1002, 0x682F, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Cape Verde [Radeon HD 7700M Series]"}, \ + {0x1002, 0x6830, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Cape Verde [Radeon HD 7800M Series]"}, \ + {0x1002, 0x6831, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Cape Verde [AMD Radeon HD 7700M Series]"}, \ + {0x1002, 0x6837, CHIP_VERDE|RADEON_NEW_MEMMAP, "Cape Verde LE [Radeon HD 7700 Series]"}, \ + {0x1002, 0x6838, CHIP_VERDE|RADEON_NEW_MEMMAP, "Cape Verde"}, \ + {0x1002, 0x6839, CHIP_VERDE|RADEON_NEW_MEMMAP, "Cape Verde"}, \ + {0x1002, 0x683B, CHIP_VERDE|RADEON_NEW_MEMMAP, "Cape Verde [Radeon HD 7700 Series]"}, \ + {0x1002, 0x683D, CHIP_VERDE|RADEON_NEW_MEMMAP, "Cape Verde [Radeon HD 7700 Series]"}, \ + {0x1002, 0x683F, CHIP_VERDE|RADEON_NEW_MEMMAP, "Cape Verde PRO [Radeon HD 7700 Series]"}, \ + {0x1002, 0x6840, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Thames XT/GL [Radeon HD 7600M Series]"}, \ + {0x1002, 0x6841, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Thames [Radeon 7500M/7600M Series]"}, \ + {0x1002, 0x6842, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Thames LE [Radeon HD 7000M Series]"}, \ + {0x1002, 0x6843, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Thames [Radeon HD 7670M]"}, \ + {0x1002, 0x6849, CHIP_TURKS|RADEON_NEW_MEMMAP, "Lombok [AMD Radeon HD 7400 Series]"}, \ + {0x1002, 0x684C, CHIP_PITCAIRN|RADEON_NEW_MEMMAP, "Pitcairn [ATI FirePro V(FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6850, CHIP_TURKS|RADEON_NEW_MEMMAP, "Lombok GL AIO [Radeon HD 7570]"}, \ + {0x1002, 0x6858, CHIP_TURKS|RADEON_NEW_MEMMAP, "Lombok [Radeon HD 7400 series]"}, \ + {0x1002, 0x6859, CHIP_TURKS|RADEON_NEW_MEMMAP, "Unknown device name"}, \ + {0x1002, 0x6880, CHIP_CYPRESS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Cypress"}, \ + {0x1002, 0x6888, CHIP_CYPRESS|RADEON_NEW_MEMMAP, "Cypress [FirePro 3D V8800]"}, \ + {0x1002, 0x6889, CHIP_CYPRESS|RADEON_NEW_MEMMAP, "Cypress [FirePro V7800]"}, \ + {0x1002, 0x688A, CHIP_CYPRESS|RADEON_NEW_MEMMAP, "Cypress XT [FirePro 3D V9800]"}, \ + {0x1002, 0x688C, CHIP_CYPRESS|RADEON_NEW_MEMMAP, "Cypress [AMD FireStream 9370]"}, \ + {0x1002, 0x688D, CHIP_CYPRESS|RADEON_NEW_MEMMAP, "Cypress [AMD FireStream 9350]"}, \ + {0x1002, 0x6898, CHIP_CYPRESS|RADEON_NEW_MEMMAP, "Cypress XT [Radeon HD 5870]"}, \ + {0x1002, 0x6899, CHIP_CYPRESS|RADEON_NEW_MEMMAP, "Cypress PRO [Radeon HD 5800 Series]"}, \ + {0x1002, 0x689B, CHIP_CYPRESS|RADEON_NEW_MEMMAP, "Cypress [Radeon HD 6800 Series]"}, \ + {0x1002, 0x689C, CHIP_HEMLOCK|RADEON_NEW_MEMMAP, "Hemlock [Radeon HD 5900 Series]"}, \ + {0x1002, 0x689D, CHIP_HEMLOCK|RADEON_NEW_MEMMAP, "Hemlock [ATI Radeon HD 5900 Series]"}, \ + {0x1002, 0x689E, CHIP_CYPRESS|RADEON_NEW_MEMMAP, "Cypress LE [Radeon HD 5800 Series]"}, \ + {0x1002, 0x68A0, CHIP_JUNIPER|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 5870"}, \ + {0x1002, 0x68A1, CHIP_JUNIPER|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Broadway PRO [Mobility Radeon HD 5800 Series]"}, \ + {0x1002, 0x68A8, CHIP_JUNIPER|RADEON_NEW_MEMMAP, "Broadway [ATI Mobility Radeon HD 6800 Series]"}, \ + {0x1002, 0x68A9, CHIP_JUNIPER|RADEON_NEW_MEMMAP, "Juniper XT [FirePro 3D V5800]"}, \ + {0x1002, 0x68B0, CHIP_JUNIPER|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Unknown device name"}, \ + {0x1002, 0x68B8, CHIP_JUNIPER|RADEON_NEW_MEMMAP, "Juniper [Radeon HD 5700 Series]"}, \ + {0x1002, 0x68B9, CHIP_JUNIPER|RADEON_NEW_MEMMAP, "Juniper [Radeon HD 5600/5700]"}, \ + {0x1002, 0x68BA, CHIP_JUNIPER|RADEON_NEW_MEMMAP, "Juniper XT [AMD Radeon HD 6000 Series]"}, \ + {0x1002, 0x68BE, CHIP_JUNIPER|RADEON_NEW_MEMMAP, "Juniper [Radeon HD 5700 Series]"}, \ + {0x1002, 0x68BF, CHIP_JUNIPER|RADEON_NEW_MEMMAP, "Juniper LE [Radeon HD 6700 Series]"}, \ + {0x1002, 0x68C0, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Madison [Mobility Radeon HD 5000 Series]"}, \ + {0x1002, 0x68C1, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Madison [Radeon HD 5000M Series]"}, \ + {0x1002, 0x68C7, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Pinewood [Radeon HD 5570]"}, \ + {0x1002, 0x68C8, CHIP_REDWOOD|RADEON_NEW_MEMMAP, "FirePro V4800"}, \ + {0x1002, 0x68C9, CHIP_REDWOOD|RADEON_NEW_MEMMAP, "Redwood [FirePro 3800 (FireGL)]"}, \ + {0x1002, 0x68D8, CHIP_REDWOOD|RADEON_NEW_MEMMAP, "Redwood [Radeon HD 5670]"}, \ + {0x1002, 0x68D9, CHIP_REDWOOD|RADEON_NEW_MEMMAP, "Redwood PRO [Radeon HD 5500 Series]"}, \ + {0x1002, 0x68DA, CHIP_REDWOOD|RADEON_NEW_MEMMAP, "Redwood PRO [Radeon HD 5500 Series]"}, \ + {0x1002, 0x68DE, CHIP_REDWOOD|RADEON_NEW_MEMMAP, "Redwood"}, \ + {0x1002, 0x68E0, CHIP_CEDAR|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Manhattan [Mobility Radeon HD 5400 Series]"}, \ + {0x1002, 0x68E1, CHIP_CEDAR|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Manhattan [Mobility Radeon HD 5430 Series]"}, \ + {0x1002, 0x68E4, CHIP_CEDAR|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Robson CE [AMD Radeon HD 6300 Series]"}, \ + {0x1002, 0x68E5, CHIP_CEDAR|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Robson LE [AMD Radeon HD 6300M Series]"}, \ + {0x1002, 0x68E8, CHIP_CEDAR|RADEON_NEW_MEMMAP, "Cedar"}, \ + {0x1002, 0x68E9, CHIP_CEDAR|RADEON_NEW_MEMMAP, "Cedar [ATI FirePro (FireGL) Graphics Adapter]"}, \ + {0x1002, 0x68F1, CHIP_CEDAR|RADEON_NEW_MEMMAP, "Cedar [FirePro 2460]"}, \ + {0x1002, 0x68F2, CHIP_CEDAR|RADEON_NEW_MEMMAP, "Cedar [FirePro 2270]"}, \ + {0x1002, 0x68F8, CHIP_CEDAR|RADEON_NEW_MEMMAP, "Cedar [Radeon HD 7300 Series]"}, \ + {0x1002, 0x68F9, CHIP_CEDAR|RADEON_NEW_MEMMAP, "Cedar PRO [Radeon HD 5450/6350]"}, \ + {0x1002, 0x68FA, CHIP_CEDAR|RADEON_NEW_MEMMAP, "EG Cedar [Radeon HD 7300 Series]"}, \ + {0x1002, 0x68FE, CHIP_CEDAR|RADEON_NEW_MEMMAP, "Cedar LE"}, \ {0x1002, 0x7100, CHIP_R520|RADEON_NEW_MEMMAP, "ATI Radeon X1800"}, \ {0x1002, 0x7101, CHIP_R520|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon X1800 XT"}, \ {0x1002, 0x7102, CHIP_R520|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon X1800"}, \ @@ -240,15 +734,15 @@ {0x1002, 0x7297, CHIP_RV560|RADEON_NEW_MEMMAP, "ATI RV560"}, \ {0x1002, 0x7834, CHIP_RS300|RADEON_IS_IGP|RADEON_NEW_MEMMAP, "ATI Radeon RS350 9000/9100 IGP"}, \ {0x1002, 0x7835, CHIP_RS300|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Radeon RS350 Mobility IGP"}, \ - {0x1002, 0x793f, CHIP_RS600|RADEON_IS_IGP|RADEON_NEW_MEMMAP, "ATI Radeon X1200"}, \ + {0x1002, 0x791E, CHIP_RS690|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART, "ATI Radeon RS690 X1250 IGP"}, \ + {0x1002, 0x791F, CHIP_RS690|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART, "ATI Radeon RS690 X1270 IGP"}, \ + {0x1002, 0x793F, CHIP_RS600|RADEON_IS_IGP|RADEON_NEW_MEMMAP, "ATI Radeon X1200"}, \ {0x1002, 0x7941, CHIP_RS600|RADEON_IS_IGP|RADEON_NEW_MEMMAP, "ATI Radeon X1200"}, \ {0x1002, 0x7942, CHIP_RS600|RADEON_IS_IGP|RADEON_NEW_MEMMAP, "ATI Radeon X1200"}, \ - {0x1002, 0x791e, CHIP_RS690|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART, "ATI Radeon RS690 X1250 IGP"}, \ - {0x1002, 0x791f, CHIP_RS690|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART, "ATI Radeon RS690 X1270 IGP"}, \ - {0x1002, 0x796c, CHIP_RS740|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART, "ATI Radeon RS740 HD2100 IGP"}, \ - {0x1002, 0x796d, CHIP_RS740|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART, "ATI Radeon RS740 HD2100 IGP"}, \ - {0x1002, 0x796e, CHIP_RS740|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART, "ATI Radeon RS740 HD2100 IGP"}, \ - {0x1002, 0x796f, CHIP_RS740|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART, "ATI Radeon RS740 HD2100 IGP"}, \ + {0x1002, 0x796C, CHIP_RS740|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART, "ATI Radeon RS740 HD2100 IGP"}, \ + {0x1002, 0x796D, CHIP_RS740|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART, "ATI Radeon RS740 HD2100 IGP"}, \ + {0x1002, 0x796E, CHIP_RS740|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART, "ATI Radeon RS740 HD2100 IGP"}, \ + {0x1002, 0x796F, CHIP_RS740|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART, "ATI Radeon RS740 HD2100 IGP"}, \ {0x1002, 0x9400, CHIP_R600|RADEON_NEW_MEMMAP, "ATI Radeon HD 2900 XT"}, \ {0x1002, 0x9401, CHIP_R600|RADEON_NEW_MEMMAP, "ATI Radeon HD 2900 XT"}, \ {0x1002, 0x9402, CHIP_R600|RADEON_NEW_MEMMAP, "ATI Radeon HD 2900 XT"}, \ @@ -257,6 +751,41 @@ {0x1002, 0x940A, CHIP_R600|RADEON_NEW_MEMMAP, "ATI FireGL V8650"}, \ {0x1002, 0x940B, CHIP_R600|RADEON_NEW_MEMMAP, "ATI FireGL V8600"}, \ {0x1002, 0x940F, CHIP_R600|RADEON_NEW_MEMMAP, "ATI FireGL V7600"}, \ + {0x1002, 0x9440, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ + {0x1002, 0x9441, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4870 X2"}, \ + {0x1002, 0x9442, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ + {0x1002, 0x9443, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4850 X2"}, \ + {0x1002, 0x9444, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI FirePro V8750 (FireGL)"}, \ + {0x1002, 0x9446, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI FirePro V7760 (FireGL)"}, \ + {0x1002, 0x944A, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4850"}, \ + {0x1002, 0x944B, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4850 X2"}, \ + {0x1002, 0x944C, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ + {0x1002, 0x944E, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI FirePro RV770"}, \ + {0x1002, 0x9450, CHIP_RV770|RADEON_NEW_MEMMAP, "AMD FireStream 9270"}, \ + {0x1002, 0x9452, CHIP_RV770|RADEON_NEW_MEMMAP, "AMD FireStream 9250"}, \ + {0x1002, 0x9456, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI FirePro V8700 (FireGL)"}, \ + {0x1002, 0x945A, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4870"}, \ + {0x1002, 0x945B, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon M98"}, \ + {0x1002, 0x945E, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "RV770"}, \ + {0x1002, 0x9460, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ + {0x1002, 0x9462, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ + {0x1002, 0x946A, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro M7750"}, \ + {0x1002, 0x946B, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI M98"}, \ + {0x1002, 0x947A, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI M98"}, \ + {0x1002, 0x947B, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI M98"}, \ + {0x1002, 0x9480, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4650"}, \ + {0x1002, 0x9487, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon RV730 (AGP)"}, \ + {0x1002, 0x9488, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4670"}, \ + {0x1002, 0x9489, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro M5750"}, \ + {0x1002, 0x948A, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "RV730"}, \ + {0x1002, 0x948F, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon RV730 (AGP)"}, \ + {0x1002, 0x9490, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4670"}, \ + {0x1002, 0x9491, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI RADEON E4600"}, \ + {0x1002, 0x9495, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4600 Series"}, \ + {0x1002, 0x9498, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4650"}, \ + {0x1002, 0x949C, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI FirePro V7750 (FireGL)"}, \ + {0x1002, 0x949E, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI FirePro V5700 (FireGL)"}, \ + {0x1002, 0x949F, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI FirePro V3750 (FireGL)"}, \ {0x1002, 0x94A0, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4830"}, \ {0x1002, 0x94A1, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4850"}, \ {0x1002, 0x94A3, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro M7740"}, \ @@ -290,6 +819,16 @@ {0x1002, 0x9515, CHIP_RV670|RADEON_NEW_MEMMAP, "ATI Radeon HD3850"}, \ {0x1002, 0x9517, CHIP_RV670|RADEON_NEW_MEMMAP, "ATI Radeon HD3690"}, \ {0x1002, 0x9519, CHIP_RV670|RADEON_NEW_MEMMAP, "AMD Firestream 9170"}, \ + {0x1002, 0x9540, CHIP_RV710|RADEON_NEW_MEMMAP, "ATI Radeon HD 4550"}, \ + {0x1002, 0x9541, CHIP_RV710|RADEON_NEW_MEMMAP, "ATI Radeon RV710"}, \ + {0x1002, 0x9542, CHIP_RV710|RADEON_NEW_MEMMAP, "ATI Radeon RV710"}, \ + {0x1002, 0x954E, CHIP_RV710|RADEON_NEW_MEMMAP, "ATI Radeon RV710"}, \ + {0x1002, 0x954F, CHIP_RV710|RADEON_NEW_MEMMAP, "ATI Radeon HD 4350"}, \ + {0x1002, 0x9552, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4300 Series"}, \ + {0x1002, 0x9553, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4500 Series"}, \ + {0x1002, 0x9555, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4500 Series"}, \ + {0x1002, 0x9557, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro RG220"}, \ + {0x1002, 0x955F, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "RV710 [Mobility Radeon HD 4330]"}, \ {0x1002, 0x9580, CHIP_RV630|RADEON_NEW_MEMMAP, "ATI RV630"}, \ {0x1002, 0x9581, CHIP_RV630|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 2600"}, \ {0x1002, 0x9583, CHIP_RV630|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 2600 XT"}, \ @@ -303,468 +842,147 @@ {0x1002, 0x958D, CHIP_RV630|RADEON_NEW_MEMMAP, "ATI FireGL V3600"}, \ {0x1002, 0x958E, CHIP_RV630|RADEON_NEW_MEMMAP, "ATI Radeon HD 2600 LE"}, \ {0x1002, 0x958F, CHIP_RV630|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility FireGL Graphics Processor"}, \ + {0x1002, 0x9590, CHIP_RV635|RADEON_NEW_MEMMAP, "ATI ATI Radeon HD 3600 Series"}, \ + {0x1002, 0x9591, CHIP_RV635|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 3650"}, \ + {0x1002, 0x9593, CHIP_RV635|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 3670"}, \ + {0x1002, 0x9595, CHIP_RV635|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility FireGL V5700"}, \ + {0x1002, 0x9596, CHIP_RV635|RADEON_NEW_MEMMAP, "ATI ATI Radeon HD 3650 AGP"}, \ + {0x1002, 0x9597, CHIP_RV635|RADEON_NEW_MEMMAP, "ATI ATI Radeon HD 3600 PRO"}, \ + {0x1002, 0x9598, CHIP_RV635|RADEON_NEW_MEMMAP, "ATI ATI Radeon HD 3600 XT"}, \ + {0x1002, 0x9599, CHIP_RV635|RADEON_NEW_MEMMAP, "ATI ATI Radeon HD 3600 PRO"}, \ + {0x1002, 0x959B, CHIP_RV635|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility FireGL V5725"}, \ {0x1002, 0x95C0, CHIP_RV620|RADEON_NEW_MEMMAP, "ATI Radeon HD 3470"}, \ + {0x1002, 0x95C2, CHIP_RV620|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 3430"}, \ + {0x1002, 0x95C4, CHIP_RV620|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 3400 Series"}, \ {0x1002, 0x95C5, CHIP_RV620|RADEON_NEW_MEMMAP, "ATI Radeon HD 3450"}, \ {0x1002, 0x95C6, CHIP_RV620|RADEON_NEW_MEMMAP, "ATI Radeon HD 3450"}, \ {0x1002, 0x95C7, CHIP_RV620|RADEON_NEW_MEMMAP, "ATI Radeon HD 3430"}, \ {0x1002, 0x95C9, CHIP_RV620|RADEON_NEW_MEMMAP, "ATI Radeon HD 3450"}, \ - {0x1002, 0x95C2, CHIP_RV620|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 3430"}, \ - {0x1002, 0x95C4, CHIP_RV620|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 3400 Series"}, \ {0x1002, 0x95CC, CHIP_RV620|RADEON_NEW_MEMMAP, "ATI FirePro V3700"}, \ {0x1002, 0x95CD, CHIP_RV620|RADEON_NEW_MEMMAP, "ATI FireMV 2450"}, \ {0x1002, 0x95CE, CHIP_RV620|RADEON_NEW_MEMMAP, "ATI FireMV 2260"}, \ - {0x1002, 0x95CF, CHIP_RV620|RADEON_NEW_MEMMAP, "ATI FireMV 2260"}, \ - {0x1002, 0x9590, CHIP_RV635|RADEON_NEW_MEMMAP, "ATI ATI Radeon HD 3600 Series"}, \ - {0x1002, 0x9596, CHIP_RV635|RADEON_NEW_MEMMAP, "ATI ATI Radeon HD 3650 AGP"}, \ - {0x1002, 0x9597, CHIP_RV635|RADEON_NEW_MEMMAP, "ATI ATI Radeon HD 3600 PRO"}, \ - {0x1002, 0x9598, CHIP_RV635|RADEON_NEW_MEMMAP, "ATI ATI Radeon HD 3600 XT"}, \ - {0x1002, 0x9599, CHIP_RV635|RADEON_NEW_MEMMAP, "ATI ATI Radeon HD 3600 PRO"}, \ - {0x1002, 0x9591, CHIP_RV635|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 3650"}, \ - {0x1002, 0x9593, CHIP_RV635|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 3670"}, \ - {0x1002, 0x9595, CHIP_RV635|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility FireGL V5700"}, \ - {0x1002, 0x959B, CHIP_RV635|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility FireGL V5725"}, \ - {0x1002, 0x9610, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 3200 Graphics"}, \ - {0x1002, 0x9611, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3100 Graphics"}, \ - {0x1002, 0x9612, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 3200 Graphics"}, \ - {0x1002, 0x9613, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3100 Graphics"}, \ - {0x1002, 0x9614, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3300 Graphics"}, \ - {0x1002, 0x9615, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3200 Graphics"}, \ - {0x1002, 0x9616, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3000 Graphics"}, \ - {0x1002, 0x9710, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 4200"}, \ - {0x1002, 0x9711, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 4100"}, \ - {0x1002, 0x9712, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon HD 4200"}, \ - {0x1002, 0x9713, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon 4100"}, \ - {0x1002, 0x9714, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI RS880"}, \ - {0x1002, 0x9715, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 4250"}, \ - {0x1002, 0x9440, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ - {0x1002, 0x9441, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4870 X2"}, \ - {0x1002, 0x9442, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ - {0x1002, 0x9443, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4850 X2"}, \ - {0x1002, 0x944C, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ - {0x1002, 0x9450, CHIP_RV770|RADEON_NEW_MEMMAP, "AMD FireStream 9270"}, \ - {0x1002, 0x9452, CHIP_RV770|RADEON_NEW_MEMMAP, "AMD FireStream 9250"}, \ - {0x1002, 0x9444, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI FirePro V8750 (FireGL)"}, \ - {0x1002, 0x9446, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI FirePro V7760 (FireGL)"}, \ - {0x1002, 0x9456, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI FirePro V8700 (FireGL)"}, \ - {0x1002, 0x944E, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI FirePro RV770"}, \ - {0x1002, 0x944A, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4850"}, \ - {0x1002, 0x944B, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4850 X2"}, \ - {0x1002, 0x945A, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4870"}, \ - {0x1002, 0x945B, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon M98"}, \ - {0x1002, 0x9460, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ - {0x1002, 0x9462, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ - {0x1002, 0x946A, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro M7750"}, \ - {0x1002, 0x946B, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI M98"}, \ - {0x1002, 0x947A, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI M98"}, \ - {0x1002, 0x947B, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI M98"}, \ - {0x1002, 0x9487, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon RV730 (AGP)"}, \ - {0x1002, 0x948F, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon RV730 (AGP)"}, \ - {0x1002, 0x9490, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4670"}, \ - {0x1002, 0x9495, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4600 Series"}, \ - {0x1002, 0x9498, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4650"}, \ - {0x1002, 0x9480, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4650"}, \ - {0x1002, 0x9488, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4670"}, \ - {0x1002, 0x9489, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro M5750"}, \ - {0x1002, 0x9491, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI RADEON E4600"}, \ - {0x1002, 0x949C, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI FirePro V7750 (FireGL)"}, \ - {0x1002, 0x949E, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI FirePro V5700 (FireGL)"}, \ - {0x1002, 0x949F, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI FirePro V3750 (FireGL)"}, \ - {0x1002, 0x9540, CHIP_RV710|RADEON_NEW_MEMMAP, "ATI Radeon HD 4550"}, \ - {0x1002, 0x9541, CHIP_RV710|RADEON_NEW_MEMMAP, "ATI Radeon RV710"}, \ - {0x1002, 0x9542, CHIP_RV710|RADEON_NEW_MEMMAP, "ATI Radeon RV710"}, \ - {0x1002, 0x954E, CHIP_RV710|RADEON_NEW_MEMMAP, "ATI Radeon RV710"}, \ - {0x1002, 0x954F, CHIP_RV710|RADEON_NEW_MEMMAP, "ATI Radeon HD 4350"}, \ - {0x1002, 0x9552, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4300 Series"}, \ - {0x1002, 0x9553, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4500 Series"}, \ - {0x1002, 0x9555, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4500 Series"}, \ - {0x1002, 0x9557, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro RG220"}, \ - {0, 0, 0, NULL} - -#define r128_PCI_IDS \ - {0x1002, 0x4c45, 0, "ATI Rage 128 Mobility LE (PCI)"}, \ - {0x1002, 0x4c46, 0, "ATI Rage 128 Mobility LF (AGP)"}, \ - {0x1002, 0x4d46, 0, "ATI Rage 128 Mobility MF (AGP)"}, \ - {0x1002, 0x4d4c, 0, "ATI Rage 128 Mobility ML (AGP)"}, \ - {0x1002, 0x5041, 0, "ATI Rage 128 Pro PA (PCI)"}, \ - {0x1002, 0x5042, 0, "ATI Rage 128 Pro PB (AGP)"}, \ - {0x1002, 0x5043, 0, "ATI Rage 128 Pro PC (AGP)"}, \ - {0x1002, 0x5044, 0, "ATI Rage 128 Pro PD (PCI)"}, \ - {0x1002, 0x5045, 0, "ATI Rage 128 Pro PE (AGP)"}, \ - {0x1002, 0x5046, 0, "ATI Rage 128 Pro PF (AGP)"}, \ - {0x1002, 0x5047, 0, "ATI Rage 128 Pro PG (PCI)"}, \ - {0x1002, 0x5048, 0, "ATI Rage 128 Pro PH (AGP)"}, \ - {0x1002, 0x5049, 0, "ATI Rage 128 Pro PI (AGP)"}, \ - {0x1002, 0x504A, 0, "ATI Rage 128 Pro PJ (PCI)"}, \ - {0x1002, 0x504B, 0, "ATI Rage 128 Pro PK (AGP)"}, \ - {0x1002, 0x504C, 0, "ATI Rage 128 Pro PL (AGP)"}, \ - {0x1002, 0x504D, 0, "ATI Rage 128 Pro PM (PCI)"}, \ - {0x1002, 0x504E, 0, "ATI Rage 128 Pro PN (AGP)"}, \ - {0x1002, 0x504F, 0, "ATI Rage 128 Pro PO (AGP)"}, \ - {0x1002, 0x5050, 0, "ATI Rage 128 Pro PP (PCI)"}, \ - {0x1002, 0x5051, 0, "ATI Rage 128 Pro PQ (AGP)"}, \ - {0x1002, 0x5052, 0, "ATI Rage 128 Pro PR (PCI)"}, \ - {0x1002, 0x5053, 0, "ATI Rage 128 Pro PS (PCI)"}, \ - {0x1002, 0x5054, 0, "ATI Rage 128 Pro PT (AGP)"}, \ - {0x1002, 0x5055, 0, "ATI Rage 128 Pro PU (AGP)"}, \ - {0x1002, 0x5056, 0, "ATI Rage 128 Pro PV (PCI)"}, \ - {0x1002, 0x5057, 0, "ATI Rage 128 Pro PW (AGP)"}, \ - {0x1002, 0x5058, 0, "ATI Rage 128 Pro PX (AGP)"}, \ - {0x1002, 0x5245, 0, "ATI Rage 128 RE (PCI)"}, \ - {0x1002, 0x5246, 0, "ATI Rage 128 RF (AGP)"}, \ - {0x1002, 0x5247, 0, "ATI Rage 128 RG (AGP)"}, \ - {0x1002, 0x524b, 0, "ATI Rage 128 RK (PCI)"}, \ - {0x1002, 0x524c, 0, "ATI Rage 128 RL (AGP)"}, \ - {0x1002, 0x534d, 0, "ATI Rage 128 SM (AGP)"}, \ - {0x1002, 0x5446, 0, "ATI Rage 128 Pro Ultra TF (AGP)"}, \ - {0x1002, 0x544C, 0, "ATI Rage 128 Pro Ultra TL (AGP)"}, \ - {0x1002, 0x5452, 0, "ATI Rage 128 Pro Ultra TR (AGP)"}, \ - {0, 0, 0, NULL} - -#define mga_PCI_IDS \ - {0x102b, 0x0520, MGA_CARD_TYPE_G200, "Matrox G200 (PCI)"}, \ - {0x102b, 0x0521, MGA_CARD_TYPE_G200, "Matrox G200 (AGP)"}, \ - {0x102b, 0x0525, MGA_CARD_TYPE_G400, "Matrox G400/G450 (AGP)"}, \ - {0x102b, 0x2527, MGA_CARD_TYPE_G550, "Matrox G550 (AGP)"}, \ - {0, 0, 0, NULL} - -#define mach64_PCI_IDS \ - {0x1002, 0x4749, 0, "3D Rage Pro"}, \ - {0x1002, 0x4750, 0, "3D Rage Pro 215GP"}, \ - {0x1002, 0x4751, 0, "3D Rage Pro 215GQ"}, \ - {0x1002, 0x4742, 0, "3D Rage Pro AGP 1X/2X"}, \ - {0x1002, 0x4744, 0, "3D Rage Pro AGP 1X"}, \ - {0x1002, 0x4c49, 0, "3D Rage LT Pro"}, \ - {0x1002, 0x4c50, 0, "3D Rage LT Pro"}, \ - {0x1002, 0x4c51, 0, "3D Rage LT Pro"}, \ - {0x1002, 0x4c42, 0, "3D Rage LT Pro AGP-133"}, \ - {0x1002, 0x4c44, 0, "3D Rage LT Pro AGP-66"}, \ - {0x1002, 0x474c, 0, "Rage XC"}, \ - {0x1002, 0x474f, 0, "Rage XL"}, \ - {0x1002, 0x4752, 0, "Rage XL"}, \ - {0x1002, 0x4753, 0, "Rage XC"}, \ - {0x1002, 0x474d, 0, "Rage XL AGP 2X"}, \ - {0x1002, 0x474e, 0, "Rage XC AGP"}, \ - {0x1002, 0x4c52, 0, "Rage Mobility P/M"}, \ - {0x1002, 0x4c53, 0, "Rage Mobility L"}, \ - {0x1002, 0x4c4d, 0, "Rage Mobility P/M AGP 2X"}, \ - {0x1002, 0x4c4e, 0, "Rage Mobility L AGP 2X"}, \ - {0, 0, 0, NULL} - -#define sis_PCI_IDS \ - {0x1039, 0x0300, 0, "SiS 300/305"}, \ - {0x1039, 0x5300, 0, "SiS 540"}, \ - {0x1039, 0x6300, 0, "SiS 630"}, \ - {0x1039, 0x6330, SIS_CHIP_315, "SiS 661"}, \ - {0x1039, 0x7300, 0, "SiS 730"}, \ - {0x18CA, 0x0040, SIS_CHIP_315, "Volari V3XT/V5/V8"}, \ - {0x18CA, 0x0042, SIS_CHIP_315, "Volari Unknown"}, \ - {0, 0, 0, NULL} - -#define tdfx_PCI_IDS \ - {0x121a, 0x0003, 0, "3dfx Voodoo Banshee"}, \ - {0x121a, 0x0004, 0, "3dfx Voodoo3 2000"}, \ - {0x121a, 0x0005, 0, "3dfx Voodoo3 3000"}, \ - {0x121a, 0x0007, 0, "3dfx Voodoo4 4500"}, \ - {0x121a, 0x0009, 0, "3dfx Voodoo5 5500"}, \ - {0x121a, 0x000b, 0, "3dfx Voodoo4 4200"}, \ - {0, 0, 0, NULL} - -#define viadrv_PCI_IDS \ - {0x1106, 0x3022, 0, "VIA CLE266 3022"}, \ - {0x1106, 0x3118, VIA_PRO_GROUP_A, "VIA CN400 / PM8X0"}, \ - {0x1106, 0x3122, 0, "VIA CLE266"}, \ - {0x1106, 0x7205, 0, "VIA KM400"}, \ - {0x1106, 0x3108, 0, "VIA K8M800"}, \ - {0x1106, 0x3344, 0, "VIA CN700 / VM800 / P4M800Pro"}, \ - {0x1106, 0x3343, 0, "VIA P4M890"}, \ - {0x1106, 0x3230, VIA_DX9_0, "VIA K8M890"}, \ - {0x1106, 0x3157, VIA_PRO_GROUP_A, "VIA CX700"}, \ - {0x1106, 0x3371, VIA_DX9_0, "VIA P4M900 / VN896"}, \ - {0, 0, 0, NULL} - -#define i810_PCI_IDS \ - {0x8086, 0x7121, 0, "Intel i810 GMCH"}, \ - {0x8086, 0x7123, 0, "Intel i810-DC100 GMCH"}, \ - {0x8086, 0x7125, 0, "Intel i810E GMCH"}, \ - {0x8086, 0x1132, 0, "Intel i815 GMCH"}, \ - {0, 0, 0, NULL} - -#define i830_PCI_IDS \ - {0x8086, 0x3577, 0, "Intel i830M GMCH"}, \ - {0x8086, 0x2562, 0, "Intel i845G GMCH"}, \ - {0x8086, 0x3582, 0, "Intel i852GM/i855GM GMCH"}, \ - {0x8086, 0x2572, 0, "Intel i865G GMCH"}, \ - {0, 0, 0, NULL} - -#define gamma_PCI_IDS \ - {0x3d3d, 0x0008, 0, "3DLabs GLINT Gamma G1"}, \ + {0x1002, 0x95CF, CHIP_RV620|RADEON_NEW_MEMMAP, "ATI FireMV 2260"}, \ + {0x1002, 0x9610, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 3200 Graphics"}, \ + {0x1002, 0x9611, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3100 Graphics"}, \ + {0x1002, 0x9612, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 3200 Graphics"}, \ + {0x1002, 0x9613, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3100 Graphics"}, \ + {0x1002, 0x9614, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3300 Graphics"}, \ + {0x1002, 0x9615, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3200 Graphics"}, \ + {0x1002, 0x9616, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3000 Graphics"}, \ + {0x1002, 0x9640, CHIP_SUMO|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "BeaverCreek [Radeon HD 6550D]"}, \ + {0x1002, 0x9641, CHIP_SUMO|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "BeaverCreek [Mobility Radeon HD 6620G]"}, \ + {0x1002, 0x9642, CHIP_SUMO2|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Sumo [Radeon HD 6370D]"}, \ + {0x1002, 0x9643, CHIP_SUMO2|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Sumo [Radeon HD 6380G]"}, \ + {0x1002, 0x9644, CHIP_SUMO2|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Sumo [Radeon HD 6410D]"}, \ + {0x1002, 0x9645, CHIP_SUMO2|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Sumo [Radeon HD 6410D]"}, \ + {0x1002, 0x9647, CHIP_SUMO|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "BeaverCreek [Radeon HD 6520G]"}, \ + {0x1002, 0x9648, CHIP_SUMO|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Sumo [Radeon HD 6480G]"}, \ + {0x1002, 0x9649, CHIP_SUMO|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Sumo [Radeon HD 6480G]"}, \ + {0x1002, 0x964A, CHIP_SUMO|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "BeaverCreek [Radeon HD 6530D]"}, \ + {0x1002, 0x964B, CHIP_SUMO|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Sumo"}, \ + {0x1002, 0x964C, CHIP_SUMO|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Sumo"}, \ + {0x1002, 0x964E, CHIP_SUMO|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Sumo"}, \ + {0x1002, 0x964F, CHIP_SUMO|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Sumo"}, \ + {0x1002, 0x9710, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 4200"}, \ + {0x1002, 0x9711, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 4100"}, \ + {0x1002, 0x9712, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon HD 4200"}, \ + {0x1002, 0x9713, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon 4100"}, \ + {0x1002, 0x9714, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI RS880"}, \ + {0x1002, 0x9715, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 4250"}, \ + {0x1002, 0x9802, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Wrestler [Radeon HD 6310]"}, \ + {0x1002, 0x9803, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Wrestler [Radeon HD 6310]"}, \ + {0x1002, 0x9804, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Wrestler [Radeon HD 6250]"}, \ + {0x1002, 0x9805, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Wrestler [Radeon HD 6250]"}, \ + {0x1002, 0x9806, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Wrestler [Radeon HD 6320]"}, \ + {0x1002, 0x9807, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Wrestler [Radeon HD 6290]"}, \ + {0x1002, 0x9808, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Wrestler [Radeon HD 7340]"}, \ + {0x1002, 0x9809, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Wrestler [Radeon HD 7310]"}, \ + {0x1002, 0x980A, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Wrestler [Radeon HD 7290]"}, \ + {0x1002, 0x9900, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Unknown device name"}, \ + {0x1002, 0x9901, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7660D]"}, \ + {0x1002, 0x9903, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7640G]"}, \ + {0x1002, 0x9904, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7560D]"}, \ + {0x1002, 0x9905, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [FirePro A300 Series Graphics]"}, \ + {0x1002, 0x9906, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [FirePro A300 Series Graphics]"}, \ + {0x1002, 0x9907, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7620G]"}, \ + {0x1002, 0x9908, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7600G]"}, \ + {0x1002, 0x9909, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7500G]"}, \ + {0x1002, 0x990A, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7500G]"}, \ + {0x1002, 0x990F, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Unknown device name"}, \ + {0x1002, 0x9910, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7660G]"}, \ + {0x1002, 0x9913, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7640G]"}, \ + {0x1002, 0x9917, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7620G]"}, \ + {0x1002, 0x9918, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7600G]"}, \ + {0x1002, 0x9919, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7500G]"}, \ + {0x1002, 0x9990, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7520G]"}, \ + {0x1002, 0x9991, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7540D]"}, \ + {0x1002, 0x9992, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7420G]"}, \ + {0x1002, 0x9993, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7480D]"}, \ + {0x1002, 0x9994, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7400G]"}, \ + {0x1002, 0x99A0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7520G]"}, \ + {0x1002, 0x99A2, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7420G]"}, \ + {0x1002, 0x99A4, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7400G]"}, \ {0, 0, 0, NULL} #define savage_PCI_IDS \ - {0x5333, 0x8a20, S3_SAVAGE3D, "Savage 3D"}, \ - {0x5333, 0x8a21, S3_SAVAGE3D, "Savage 3D/MV"}, \ - {0x5333, 0x8a22, S3_SAVAGE4, "Savage4"}, \ - {0x5333, 0x8a23, S3_SAVAGE4, "Savage4"}, \ - {0x5333, 0x8c10, S3_SAVAGE_MX, "Savage/MX-MV"}, \ - {0x5333, 0x8c11, S3_SAVAGE_MX, "Savage/MX"}, \ - {0x5333, 0x8c12, S3_SAVAGE_MX, "Savage/IX-MV"}, \ - {0x5333, 0x8c13, S3_SAVAGE_MX, "Savage/IX"}, \ - {0x5333, 0x8c22, S3_SUPERSAVAGE, "SuperSavage MX/128"}, \ - {0x5333, 0x8c24, S3_SUPERSAVAGE, "SuperSavage MX/64"}, \ - {0x5333, 0x8c26, S3_SUPERSAVAGE, "SuperSavage MX/64C"}, \ - {0x5333, 0x8c2a, S3_SUPERSAVAGE, "SuperSavage IX/128 SDR"}, \ - {0x5333, 0x8c2b, S3_SUPERSAVAGE, "SuperSavage IX/128 DDR"}, \ - {0x5333, 0x8c2c, S3_SUPERSAVAGE, "SuperSavage IX/64 SDR"}, \ - {0x5333, 0x8c2d, S3_SUPERSAVAGE, "SuperSavage IX/64 DDR"}, \ - {0x5333, 0x8c2e, S3_SUPERSAVAGE, "SuperSavage IX/C SDR"}, \ - {0x5333, 0x8c2f, S3_SUPERSAVAGE, "SuperSavage IX/C DDR"}, \ - {0x5333, 0x8a25, S3_PROSAVAGE, "ProSavage PM133"}, \ - {0x5333, 0x8a26, S3_PROSAVAGE, "ProSavage KM133"}, \ - {0x5333, 0x8d01, S3_TWISTER, "ProSavage Twister PN133"}, \ - {0x5333, 0x8d02, S3_TWISTER, "ProSavage Twister KN133"}, \ - {0x5333, 0x8d03, S3_PROSAVAGEDDR, "ProSavage DDR"}, \ - {0x5333, 0x8d04, S3_PROSAVAGEDDR, "ProSavage DDR-K"}, \ - {0, 0, 0, NULL} - -#define ffb_PCI_IDS \ + {0x5333, 0x8A20, S3_SAVAGE3D, "Savage 3D"}, \ + {0x5333, 0x8A21, S3_SAVAGE3D, "Savage 3D/MV"}, \ + {0x5333, 0x8A22, S3_SAVAGE4, "Savage4"}, \ + {0x5333, 0x8A23, S3_SAVAGE4, "Savage4"}, \ + {0x5333, 0x8A25, S3_PROSAVAGE, "ProSavage PM133"}, \ + {0x5333, 0x8A26, S3_PROSAVAGE, "ProSavage KM133"}, \ + {0x5333, 0x8C10, S3_SAVAGE_MX, "Savage/MX-MV"}, \ + {0x5333, 0x8C11, S3_SAVAGE_MX, "Savage/MX"}, \ + {0x5333, 0x8C12, S3_SAVAGE_MX, "Savage/IX-MV"}, \ + {0x5333, 0x8C13, S3_SAVAGE_MX, "Savage/IX"}, \ + {0x5333, 0x8C22, S3_SUPERSAVAGE, "SuperSavage MX/128"}, \ + {0x5333, 0x8C24, S3_SUPERSAVAGE, "SuperSavage MX/64"}, \ + {0x5333, 0x8C26, S3_SUPERSAVAGE, "SuperSavage MX/64C"}, \ + {0x5333, 0x8C2A, S3_SUPERSAVAGE, "SuperSavage IX/128 SDR"}, \ + {0x5333, 0x8C2B, S3_SUPERSAVAGE, "SuperSavage IX/128 DDR"}, \ + {0x5333, 0x8C2C, S3_SUPERSAVAGE, "SuperSavage IX/64 SDR"}, \ + {0x5333, 0x8C2D, S3_SUPERSAVAGE, "SuperSavage IX/64 DDR"}, \ + {0x5333, 0x8C2E, S3_SUPERSAVAGE, "SuperSavage IX/C SDR"}, \ + {0x5333, 0x8C2F, S3_SUPERSAVAGE, "SuperSavage IX/C DDR"}, \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 19:54:41 2014 Return-Path: Delivered-To: svn-src-all@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 0693D32B; Sun, 9 Feb 2014 19:54:41 +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 D5CB7118E; Sun, 9 Feb 2014 19:54:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19JsehL090481; Sun, 9 Feb 2014 19:54:40 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19Jse3G090475; Sun, 9 Feb 2014 19:54:40 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201402091954.s19Jse3G090475@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 9 Feb 2014 19:54:40 +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: r261673 - stable/9/sys/dev/drm2 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 19:54:41 -0000 Author: dumbbell Date: Sun Feb 9 19:54:39 2014 New Revision: 261673 URL: http://svnweb.freebsd.org/changeset/base/261673 Log: MFC r258262: drm: Support DRM_CAP_TIMESTAMP_MONOTONIC capability This fixes DPMS with KDE and radeonkms. Without this, the display would freeze when the monitor is put into sleep state, and only resumes after several dozens of minutes once the monitor is powered on again. Tested by: Mathias Picker Modified: stable/9/sys/dev/drm2/drm.h stable/9/sys/dev/drm2/drmP.h stable/9/sys/dev/drm2/drm_drv.c stable/9/sys/dev/drm2/drm_ioctl.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/drm.h ============================================================================== --- stable/9/sys/dev/drm2/drm.h Sun Feb 9 19:36:27 2014 (r261672) +++ stable/9/sys/dev/drm2/drm.h Sun Feb 9 19:54:39 2014 (r261673) @@ -1015,6 +1015,8 @@ struct drm_event_vblank { #define DRM_CAP_VBLANK_HIGH_CRTC 0x2 #define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3 #define DRM_CAP_DUMB_PREFER_SHADOW 0x4 +#define DRM_CAP_PRIME 0x5 +#define DRM_CAP_TIMESTAMP_MONOTONIC 0x6 #include "drm_mode.h" Modified: stable/9/sys/dev/drm2/drmP.h ============================================================================== --- stable/9/sys/dev/drm2/drmP.h Sun Feb 9 19:36:27 2014 (r261672) +++ stable/9/sys/dev/drm2/drmP.h Sun Feb 9 19:54:39 2014 (r261673) @@ -1005,6 +1005,7 @@ extern int drm_debug_flag; extern int drm_notyet_flag; extern unsigned int drm_vblank_offdelay; extern unsigned int drm_timestamp_precision; +extern unsigned int drm_timestamp_monotonic; /* Device setup support (drm_drv.c) */ int drm_probe(device_t kdev, drm_pci_id_list_t *idlist); Modified: stable/9/sys/dev/drm2/drm_drv.c ============================================================================== --- stable/9/sys/dev/drm2/drm_drv.c Sun Feb 9 19:36:27 2014 (r261672) +++ stable/9/sys/dev/drm2/drm_drv.c Sun Feb 9 19:54:39 2014 (r261673) @@ -56,6 +56,12 @@ int drm_notyet_flag = 0; unsigned int drm_vblank_offdelay = 5000; /* Default to 5000 msecs. */ unsigned int drm_timestamp_precision = 20; /* Default to 20 usecs. */ +/* + * Default to use monotonic timestamps for wait-for-vblank and page-flip + * complete events. + */ +unsigned int drm_timestamp_monotonic = 1; + static int drm_load(struct drm_device *dev); static void drm_unload(struct drm_device *dev); static drm_pci_id_list_t *drm_find_description(int vendor, int device, Modified: stable/9/sys/dev/drm2/drm_ioctl.c ============================================================================== --- stable/9/sys/dev/drm2/drm_ioctl.c Sun Feb 9 19:36:27 2014 (r261672) +++ stable/9/sys/dev/drm2/drm_ioctl.c Sun Feb 9 19:54:39 2014 (r261673) @@ -250,6 +250,9 @@ int drm_getcap(struct drm_device *dev, v case DRM_CAP_DUMB_PREFER_SHADOW: req->value = dev->mode_config.prefer_shadow; break; + case DRM_CAP_TIMESTAMP_MONOTONIC: + req->value = drm_timestamp_monotonic; + break; default: return EINVAL; } From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 20:08:17 2014 Return-Path: Delivered-To: svn-src-all@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 73E7A7C6; Sun, 9 Feb 2014 20:08:17 +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 522841269; Sun, 9 Feb 2014 20:08:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19K8HWm096979; Sun, 9 Feb 2014 20:08:17 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19K8HtV096978; Sun, 9 Feb 2014 20:08:17 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201402092008.s19K8HtV096978@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 9 Feb 2014 20:08:17 +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: r261674 - stable/9/sys/dev/drm2 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 20:08:17 -0000 Author: dumbbell Date: Sun Feb 9 20:08:16 2014 New Revision: 261674 URL: http://svnweb.freebsd.org/changeset/base/261674 Log: MFC r258549: drm: Dereference pointers given to qsort_r()'s cmp callback drm_le_cmp() (qsort_r()'s callback) receives pointers to elements in the array passed to qsort_r(), not the elements themselves. Before this fix, the use of qsort_r() shuffled the array, not sorted it, because the compare callback accessed random memory locations, not the expected elements. This bug triggered an infinite loop in KDE/xserver: 1. KDE has a kded module called "randrmonitor" which queries xserver for current monitors at startup and then listens to RandR notifications from xserver. 2. xserver handles the query from "randrmonitor" by polling the video device using the "drm_mode_getconnector()" ioctl. This ioctl returns a list of connectors and, for those with a connected monitor, the available modes. Each modes list is sorted by the kernel before returning. When xserver gets the connectors list, it sorts the modes lists again. In the case of this bug, when two modes are equal (in xserver's compare function PoV), their order is kept stable (ie. the kernel order is kept for those two modes). And because the list was shuffled by the kernel, the order of two equal modes was frequently changed in the final modes list in xserver. 3. xserver compares the returned connectors list with the list obtained earlier. In particular, it compares the sorted modes lists for each connector. If a property of a connector changes (eg. modes), xserver sends a "RRNotify_OutputChange" notification. Because of the change of order between equal modes, xserver sent a notification after each polling of the connectors. 4. "randrmonitor" receives a notification, triggered by its query. The notification doesn't contain the new connectors list, therefore, it asks for the new list using the same function: go back to step #2. Modified: stable/9/sys/dev/drm2/drm_linux_list_sort.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/drm_linux_list_sort.c ============================================================================== --- stable/9/sys/dev/drm2/drm_linux_list_sort.c Sun Feb 9 19:54:39 2014 (r261673) +++ stable/9/sys/dev/drm2/drm_linux_list_sort.c Sun Feb 9 20:08:16 2014 (r261674) @@ -42,8 +42,8 @@ drm_le_cmp(void *priv, const void *d1, c struct drm_list_sort_thunk *thunk; thunk = priv; - le1 = __DECONST(struct list_head *, d1); - le2 = __DECONST(struct list_head *, d2); + le1 = *(__DECONST(struct list_head **, d1)); + le2 = *(__DECONST(struct list_head **, d2)); return ((thunk->cmp)(thunk->priv, le1, le2)); } From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 20:17:40 2014 Return-Path: Delivered-To: svn-src-all@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 CC04CB6A; Sun, 9 Feb 2014 20:17:40 +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 B6D2A1332; Sun, 9 Feb 2014 20:17:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19KHedp002295; Sun, 9 Feb 2014 20:17:40 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19KHeMv002294; Sun, 9 Feb 2014 20:17:40 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201402092017.s19KHeMv002294@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 9 Feb 2014 20:17:40 +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: r261675 - stable/9/sys/dev/drm2 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 20:17:40 -0000 Author: dumbbell Date: Sun Feb 9 20:17:40 2014 New Revision: 261675 URL: http://svnweb.freebsd.org/changeset/base/261675 Log: MFC r259717: drm: Lower priority of "EDID checksum is invalid" message The priority goes from "error" to "debug". Connectors are polled every 10 seconds. Reading EDID is part of this polling. However, when an invalid EDID is returned, this error message is logged. When using Newcons for instance, having a kernel message every 10 seconds is getting annoying. Now that it's a debug message, it'll be logged only if hw.dri.debug is enabled. This fix console spamming for some users. Tested by: Larry Rosenman Modified: stable/9/sys/dev/drm2/drm_edid.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/drm_edid.c ============================================================================== --- stable/9/sys/dev/drm2/drm_edid.c Sun Feb 9 20:08:16 2014 (r261674) +++ stable/9/sys/dev/drm2/drm_edid.c Sun Feb 9 20:17:40 2014 (r261675) @@ -171,7 +171,7 @@ drm_edid_block_valid(u8 *raw_edid) for (i = 0; i < EDID_LENGTH; i++) csum += raw_edid[i]; if (csum) { - DRM_ERROR("EDID checksum is invalid, remainder is %d\n", csum); + DRM_DEBUG("EDID checksum is invalid, remainder is %d\n", csum); /* allow CEA to slide through, switches mangle this */ if (raw_edid[0] != 0x02) From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 20:19:42 2014 Return-Path: Delivered-To: svn-src-all@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 6D771CCE; Sun, 9 Feb 2014 20:19: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 570A6134D; Sun, 9 Feb 2014 20:19:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19KJgh2002779; Sun, 9 Feb 2014 20:19:42 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19KJg5Z002778; Sun, 9 Feb 2014 20:19:42 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402092019.s19KJg5Z002778@svn.freebsd.org> From: Ian Lepore Date: Sun, 9 Feb 2014 20:19:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261676 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 20:19:42 -0000 Author: ian Date: Sun Feb 9 20:19:41 2014 New Revision: 261676 URL: http://svnweb.freebsd.org/changeset/base/261676 Log: Fix the exclude-region clipping logic for the edge-trim case. Modified: head/sys/arm/arm/physmem.c Modified: head/sys/arm/arm/physmem.c ============================================================================== --- head/sys/arm/arm/physmem.c Sun Feb 9 20:17:40 2014 (r261675) +++ head/sys/arm/arm/physmem.c Sun Feb 9 20:19:41 2014 (r261676) @@ -198,14 +198,14 @@ regions_to_avail(vm_paddr_t *avail, uint continue; } /* - * If excluded region partially overlaps this region, - * trim the excluded portion off the appropriate end. + * We know the excluded region overlaps either the start + * or end of this hardware region (but not both), trim + * the excluded portion off the appropriate end. */ - if ((xstart >= start) && (xstart <= end)) { - end = xstart; - } else if ((xend >= start) && (xend <= end)) { + if (xstart <= start) start = xend; - } + else + end = xstart; } /* * If the trimming actions above left a non-zero size, create an From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 20:20:50 2014 Return-Path: Delivered-To: svn-src-all@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 255F0FDA; Sun, 9 Feb 2014 20:20: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 0DD161371; Sun, 9 Feb 2014 20:20:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19KKnPi003542; Sun, 9 Feb 2014 20:20:49 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19KKnnI003541; Sun, 9 Feb 2014 20:20:49 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402092020.s19KKnnI003541@svn.freebsd.org> From: Ian Lepore Date: Sun, 9 Feb 2014 20:20:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261677 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 20:20:50 -0000 Author: ian Date: Sun Feb 9 20:20:49 2014 New Revision: 261677 URL: http://svnweb.freebsd.org/changeset/base/261677 Log: Add some extra debugging output when DEBUG is defined. Modified: head/sys/arm/arm/physmem.c Modified: head/sys/arm/arm/physmem.c ============================================================================== --- head/sys/arm/arm/physmem.c Sun Feb 9 20:19:41 2014 (r261676) +++ head/sys/arm/arm/physmem.c Sun Feb 9 20:20:49 2014 (r261677) @@ -122,6 +122,16 @@ physmem_dump_tables(int (*prfunc)(const (flags & EXFLAG_NOALLOC) ? "NoAlloc" : "", (flags & EXFLAG_NODUMP) ? "NoDump" : ""); } + +#ifdef DEBUG + prfunc("Avail lists:\n"); + for (i = 0; phys_avail[i] != 0; ++i) { + prfunc(" phys_avail[%d] 0x%08x\n", i, phys_avail[i]); + } + for (i = 0; dump_avail[i] != 0; ++i) { + prfunc(" dump_avail[%d] 0x%08x\n", i, dump_avail[i]); + } +#endif } /* From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 20:52:48 2014 Return-Path: Delivered-To: svn-src-all@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 637C2BA6; Sun, 9 Feb 2014 20:52: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 4BE3A1676; Sun, 9 Feb 2014 20:52:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19Kqm1c020086; Sun, 9 Feb 2014 20:52:48 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19KqmjN020085; Sun, 9 Feb 2014 20:52:48 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201402092052.s19KqmjN020085@svn.freebsd.org> From: Dimitry Andric Date: Sun, 9 Feb 2014 20:52:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261680 - head/contrib/llvm/tools/clang/lib/Sema X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 20:52:48 -0000 Author: dim Date: Sun Feb 9 20:52:47 2014 New Revision: 261680 URL: http://svnweb.freebsd.org/changeset/base/261680 Log: Pull in r200899 from upstream clang trunk: Allow transformation of VariableArray to ConstantArray. In the following code: struct A { static const int sz; }; template void f() { T arr[A::sz]; } the array 'arr' is represented as a variable size array in the template. If 'A::sz' gets value below in the translation unit, the array in instantiation can turn into constant size array. This change fixes PR18633. Differential Revision: http://llvm-reviews.chandlerc.com/D2688 This fixes "Assertion failed: (T::isKind(*this)), function castAs" errors, which can occur when building the security/quantis port. Reported by: ale MFC after: 3 days Modified: head/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h Modified: head/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h ============================================================================== --- head/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h Sun Feb 9 20:32:27 2014 (r261679) +++ head/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h Sun Feb 9 20:52:47 2014 (r261680) @@ -3837,7 +3837,9 @@ TreeTransform::TransformVariabl return QualType(); } - VariableArrayTypeLoc NewTL = TLB.push(Result); + // We might have constant size array now, but fortunately it has the same + // location layout. + ArrayTypeLoc NewTL = TLB.push(Result); NewTL.setLBracketLoc(TL.getLBracketLoc()); NewTL.setRBracketLoc(TL.getRBracketLoc()); NewTL.setSizeExpr(Size); From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 20:55:49 2014 Return-Path: Delivered-To: svn-src-all@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 DC6FBD10; Sun, 9 Feb 2014 20:55: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 C4FE5168B; Sun, 9 Feb 2014 20:55:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19KtnNI020644; Sun, 9 Feb 2014 20:55:49 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19Ktnsx020643; Sun, 9 Feb 2014 20:55:49 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201402092055.s19Ktnsx020643@svn.freebsd.org> From: Warner Losh Date: Sun, 9 Feb 2014 20:55:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261681 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 20:55:49 -0000 Author: imp Date: Sun Feb 9 20:55:49 2014 New Revision: 261681 URL: http://svnweb.freebsd.org/changeset/base/261681 Log: Add FDT matching code. Modified: head/sys/arm/at91/at91_mci.c Modified: head/sys/arm/at91/at91_mci.c ============================================================================== --- head/sys/arm/at91/at91_mci.c Sun Feb 9 20:52:47 2014 (r261680) +++ head/sys/arm/at91/at91_mci.c Sun Feb 9 20:55:49 2014 (r261681) @@ -25,6 +25,8 @@ * SUCH DAMAGE. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -62,6 +64,12 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#include +#include +#endif + #include "mmcbr_if.h" #include "opt_at91.h" @@ -342,7 +350,10 @@ at91_mci_fini(device_t dev) static int at91_mci_probe(device_t dev) { - +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "atmel,hsmci")) + return (ENXIO); +#endif device_set_desc(dev, "MCI mmc/sd host bridge"); return (0); } @@ -1393,5 +1404,10 @@ static driver_t at91_mci_driver = { static devclass_t at91_mci_devclass; +#ifdef FDT +DRIVER_MODULE(at91_mci, simplebus, at91_mci_driver, at91_mci_devclass, NULL, + NULL); +#else DRIVER_MODULE(at91_mci, atmelarm, at91_mci_driver, at91_mci_devclass, NULL, NULL); +#endif From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 20:56:40 2014 Return-Path: Delivered-To: svn-src-all@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 75A19E5C; Sun, 9 Feb 2014 20:56:40 +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 6141F1693; Sun, 9 Feb 2014 20:56:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19KueS4020818; Sun, 9 Feb 2014 20:56:40 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19Kue16020817; Sun, 9 Feb 2014 20:56:40 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201402092056.s19Kue16020817@svn.freebsd.org> From: Warner Losh Date: Sun, 9 Feb 2014 20:56:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261682 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 20:56:40 -0000 Author: imp Date: Sun Feb 9 20:56:39 2014 New Revision: 261682 URL: http://svnweb.freebsd.org/changeset/base/261682 Log: Add FDT attachment. Modified: head/sys/arm/at91/at91_pio.c Modified: head/sys/arm/at91/at91_pio.c ============================================================================== --- head/sys/arm/at91/at91_pio.c Sun Feb 9 20:55:49 2014 (r261681) +++ head/sys/arm/at91/at91_pio.c Sun Feb 9 20:56:39 2014 (r261682) @@ -24,6 +24,8 @@ * SUCH DAMAGE. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -48,6 +50,12 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#include +#include +#endif + #define MAX_CHANGE 64 struct at91_pio_softc @@ -122,7 +130,10 @@ static int at91_pio_probe(device_t dev) { const char *name; - +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "atmel,at91rm9200-gpio")) + return (ENXIO); +#endif switch (device_get_unit(dev)) { case 0: name = "PIOA"; @@ -136,6 +147,12 @@ at91_pio_probe(device_t dev) case 3: name = "PIOD"; break; + case 4: + name = "PIOE"; + break; + case 5: + name = "PIOF"; + break; default: name = "PIO"; break; @@ -609,5 +626,10 @@ static driver_t at91_pio_driver = { sizeof(struct at91_pio_softc), }; +#ifdef FDT +DRIVER_MODULE(at91_pio, simplebus, at91_pio_driver, at91_pio_devclass, NULL, + NULL); +#else DRIVER_MODULE(at91_pio, atmelarm, at91_pio_driver, at91_pio_devclass, NULL, NULL); +#endif From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 20:57:27 2014 Return-Path: Delivered-To: svn-src-all@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 00DD4FA4; Sun, 9 Feb 2014 20:57:26 +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 C662C169E; Sun, 9 Feb 2014 20:57:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19KvQKL021035; Sun, 9 Feb 2014 20:57:26 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19KvQCM021029; Sun, 9 Feb 2014 20:57:26 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201402092057.s19KvQCM021029@svn.freebsd.org> From: Warner Losh Date: Sun, 9 Feb 2014 20:57:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261683 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 20:57:27 -0000 Author: imp Date: Sun Feb 9 20:57:26 2014 New Revision: 261683 URL: http://svnweb.freebsd.org/changeset/base/261683 Log: Add FDT attachment, plus minor code shuffle. Modified: head/sys/arm/at91/at91_pit.c Modified: head/sys/arm/at91/at91_pit.c ============================================================================== --- head/sys/arm/at91/at91_pit.c Sun Feb 9 20:56:39 2014 (r261682) +++ head/sys/arm/at91/at91_pit.c Sun Feb 9 20:57:26 2014 (r261683) @@ -24,6 +24,8 @@ * SUCH DAMAGE. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -48,6 +50,12 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#include +#include +#endif + #ifndef PIT_PRESCALE #define PIT_PRESCALE (16) #endif @@ -83,6 +91,9 @@ at91_pit_delay(int us) uint64_t pit_freq; const uint64_t mhz = 1E6; + if (sc == NULL) + return; + last = PIT_PIV(RD4(sc, PIT_PIIR)); /* Max delay ~= 260s. @ 133Mhz */ @@ -111,7 +122,10 @@ static struct timecounter at91_pit_timec static int at91_pit_probe(device_t dev) { - +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "atmel,at91sam9260-pit")) + return (ENXIO); +#endif device_set_desc(dev, "AT91SAM9 PIT"); return (0); } @@ -121,10 +135,8 @@ at91_pit_attach(device_t dev) { void *ih; int rid, err = 0; - struct at91_softc *at91_sc; struct resource *irq; - at91_sc = device_get_softc(device_get_parent(dev)); sc = device_get_softc(dev); sc->sc_dev = dev; @@ -158,22 +170,6 @@ out: return (err); } -static device_method_t at91_pit_methods[] = { - DEVMETHOD(device_probe, at91_pit_probe), - DEVMETHOD(device_attach, at91_pit_attach), - DEVMETHOD_END -}; - -static driver_t at91_pit_driver = { - "at91_pit", - at91_pit_methods, - sizeof(struct pit_softc), -}; - -static devclass_t at91_pit_devclass; - -DRIVER_MODULE(at91_pit, atmelarm, at91_pit_driver, at91_pit_devclass, NULL, - NULL); static int pit_intr(void *arg) @@ -202,3 +198,25 @@ at91_pit_get_timecount(struct timecounte icnt = piir >> 20; /* Overflows */ return (timecount + PIT_PIV(piir) + PIT_PIV(RD4(sc, PIT_MR)) * icnt); } + +static device_method_t at91_pit_methods[] = { + DEVMETHOD(device_probe, at91_pit_probe), + DEVMETHOD(device_attach, at91_pit_attach), + DEVMETHOD_END +}; + +static driver_t at91_pit_driver = { + "at91_pit", + at91_pit_methods, + sizeof(struct pit_softc), +}; + +static devclass_t at91_pit_devclass; + +#ifdef FDT +DRIVER_MODULE(at91_pit, simplebus, at91_pit_driver, at91_pit_devclass, NULL, + NULL); +#else +DRIVER_MODULE(at91_pit, atmelarm, at91_pit_driver, at91_pit_devclass, NULL, + NULL); +#endif From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 20:58:04 2014 Return-Path: Delivered-To: svn-src-all@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 2A7882C9; Sun, 9 Feb 2014 20:58: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 0C1B916AC; Sun, 9 Feb 2014 20:58:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19Kw30v021202; Sun, 9 Feb 2014 20:58:03 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19Kw3Ir021201; Sun, 9 Feb 2014 20:58:03 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201402092058.s19Kw3Ir021201@svn.freebsd.org> From: Warner Losh Date: Sun, 9 Feb 2014 20:58:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261684 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 20:58:04 -0000 Author: imp Date: Sun Feb 9 20:58:03 2014 New Revision: 261684 URL: http://svnweb.freebsd.org/changeset/base/261684 Log: Add FDT attachment. Modified: head/sys/arm/at91/at91_pmc.c Modified: head/sys/arm/at91/at91_pmc.c ============================================================================== --- head/sys/arm/at91/at91_pmc.c Sun Feb 9 20:57:26 2014 (r261683) +++ head/sys/arm/at91/at91_pmc.c Sun Feb 9 20:58:03 2014 (r261684) @@ -24,6 +24,8 @@ * SUCH DAMAGE. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -49,6 +51,12 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#include +#include +#endif + static struct at91_pmc_softc { bus_space_tag_t sc_st; bus_space_handle_t sc_sh; @@ -526,6 +534,8 @@ at91_pmc_init_clock(void) uint32_t mckr; uint32_t mdiv; + soc_info.soc_data->soc_clock_init(); + main_clock = at91_pmc_sense_main_clock(); if (at91_is_sam9() || at91_is_sam9xe()) { @@ -650,7 +660,10 @@ errout: static int at91_pmc_probe(device_t dev) { - +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "atmel,at91rm9200-pmc")) + return (ENXIO); +#endif device_set_desc(dev, "PMC"); return (0); } @@ -695,5 +708,10 @@ static driver_t at91_pmc_driver = { }; static devclass_t at91_pmc_devclass; +#ifdef FDT +DRIVER_MODULE(at91_pmc, simplebus, at91_pmc_driver, at91_pmc_devclass, NULL, + NULL); +#else DRIVER_MODULE(at91_pmc, atmelarm, at91_pmc_driver, at91_pmc_devclass, NULL, NULL); +#endif From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 20:59:46 2014 Return-Path: Delivered-To: svn-src-all@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 AC0AD462; Sun, 9 Feb 2014 20:59: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 7DAA716BB; Sun, 9 Feb 2014 20:59:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19KxkI3021499; Sun, 9 Feb 2014 20:59:46 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19Kxk54021498; Sun, 9 Feb 2014 20:59:46 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201402092059.s19Kxk54021498@svn.freebsd.org> From: Warner Losh Date: Sun, 9 Feb 2014 20:59:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261685 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 20:59:46 -0000 Author: imp Date: Sun Feb 9 20:59:46 2014 New Revision: 261685 URL: http://svnweb.freebsd.org/changeset/base/261685 Log: Add FDT attachment. Flag lost functionality with FDT_HACKS so we can find it later. Modified: head/sys/arm/at91/at91_rst.c Modified: head/sys/arm/at91/at91_rst.c ============================================================================== --- head/sys/arm/at91/at91_rst.c Sun Feb 9 20:58:03 2014 (r261684) +++ head/sys/arm/at91/at91_rst.c Sun Feb 9 20:59:46 2014 (r261685) @@ -23,6 +23,8 @@ * SUCH DAMAGE. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -39,10 +41,19 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#include +#include +#define FDT_HACKS 1 +#endif + #define RST_TIMEOUT (5) /* Seconds to hold NRST for hard reset */ #define RST_TICK (20) /* sample NRST at hz/RST_TICK intervals */ +#ifndef FDT static int at91_rst_intr(void *arg); +#endif static struct at91_rst_softc { struct resource *mem_res; /* Memory resource */ @@ -93,6 +104,10 @@ at91_rst_cpu_reset(void) static int at91_rst_probe(device_t dev) { +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "atmel,at91sam9260-rstc")) + return (ENXIO); +#endif device_set_desc(dev, "AT91SAM9 Reset Controller"); return (0); @@ -103,7 +118,7 @@ at91_rst_attach(device_t dev) { struct at91_rst_softc *sc; const char *cause; - int rid, err; + int rid, err = 0; at91_rst_sc = sc = device_get_softc(dev); sc->sc_dev = dev; @@ -118,6 +133,8 @@ at91_rst_attach(device_t dev) err = ENOMEM; goto out; } + +#ifndef FDT_HACKS rid = 0; sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE | RF_SHAREABLE); @@ -132,6 +149,7 @@ at91_rst_attach(device_t dev) at91_rst_intr, NULL, sc, &sc->intrhand); if (err) device_printf(dev, "could not establish interrupt handler.\n"); +#endif WR4(at91_rst_sc, RST_MR, RST_MR_ERSTL(0xd) | RST_MR_URSIEN | RST_MR_KEY); @@ -161,6 +179,7 @@ out: return (err); } +#ifndef FDT_HACKS static void at91_rst_tick(void *argp) { @@ -191,6 +210,7 @@ at91_rst_intr(void *argp) } return (FILTER_STRAY); } +#endif static device_method_t at91_rst_methods[] = { DEVMETHOD(device_probe, at91_rst_probe), @@ -206,5 +226,10 @@ static driver_t at91_rst_driver = { static devclass_t at91_rst_devclass; +#ifdef FDT +DRIVER_MODULE(at91_rst, simplebus, at91_rst_driver, at91_rst_devclass, NULL, + NULL); +#else DRIVER_MODULE(at91_rst, atmelarm, at91_rst_driver, at91_rst_devclass, NULL, NULL); +#endif From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 21:00:23 2014 Return-Path: Delivered-To: svn-src-all@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 681B75CE; Sun, 9 Feb 2014 21:00: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 5353216D2; Sun, 9 Feb 2014 21:00:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19L0NXE022428; Sun, 9 Feb 2014 21:00:23 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19L0NIq022427; Sun, 9 Feb 2014 21:00:23 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201402092100.s19L0NIq022427@svn.freebsd.org> From: Warner Losh Date: Sun, 9 Feb 2014 21:00:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261686 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 21:00:23 -0000 Author: imp Date: Sun Feb 9 21:00:22 2014 New Revision: 261686 URL: http://svnweb.freebsd.org/changeset/base/261686 Log: Add FDT attachment. Modified: head/sys/arm/at91/at91_spi.c Modified: head/sys/arm/at91/at91_spi.c ============================================================================== --- head/sys/arm/at91/at91_spi.c Sun Feb 9 20:59:46 2014 (r261685) +++ head/sys/arm/at91/at91_spi.c Sun Feb 9 21:00:22 2014 (r261686) @@ -25,6 +25,8 @@ * SUCH DAMAGE. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -49,6 +51,12 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#include +#include +#endif + #include "spibus_if.h" struct at91_spi_softc @@ -96,7 +104,10 @@ static void at91_spi_intr(void *arg); static int at91_spi_probe(device_t dev) { - +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "atmel,at91rm9200-spi")) + return (ENXIO); +#endif device_set_desc(dev, "AT91 SPI"); return (0); } @@ -428,5 +439,10 @@ static driver_t at91_spi_driver = { sizeof(struct at91_spi_softc), }; +#ifdef FDT +DRIVER_MODULE(at91_spi, simplebus, at91_spi_driver, at91_spi_devclass, NULL, + NULL); +#else DRIVER_MODULE(at91_spi, atmelarm, at91_spi_driver, at91_spi_devclass, NULL, NULL); +#endif From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 21:01:10 2014 Return-Path: Delivered-To: svn-src-all@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 C5D10757; Sun, 9 Feb 2014 21:01: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 AE97416EC; Sun, 9 Feb 2014 21:01:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19L1AQw024255; Sun, 9 Feb 2014 21:01:10 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19L1AJK024254; Sun, 9 Feb 2014 21:01:10 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201402092101.s19L1AJK024254@svn.freebsd.org> From: Warner Losh Date: Sun, 9 Feb 2014 21:01:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261687 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 21:01:10 -0000 Author: imp Date: Sun Feb 9 21:01:10 2014 New Revision: 261687 URL: http://svnweb.freebsd.org/changeset/base/261687 Log: Add TWI attachment for FDT. We're only matching the SAMG20 device for now, others to follow. Modified: head/sys/arm/at91/at91_twi.c Modified: head/sys/arm/at91/at91_twi.c ============================================================================== --- head/sys/arm/at91/at91_twi.c Sun Feb 9 21:00:22 2014 (r261686) +++ head/sys/arm/at91/at91_twi.c Sun Feb 9 21:01:10 2014 (r261687) @@ -23,6 +23,8 @@ * SUCH DAMAGE. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -46,6 +48,12 @@ __FBSDID("$FreeBSD$"); #include #include "iicbus_if.h" +#ifdef FDT +#include +#include +#include +#endif + #define TWI_SLOW_CLOCK 1500 #define TWI_FAST_CLOCK 45000 #define TWI_FASTEST_CLOCK 90000 @@ -104,7 +112,11 @@ static void at91_twi_deactivate(device_t static int at91_twi_probe(device_t dev) { - +#ifdef FDT + /* XXXX need a whole list, since there's at least 4 different ones */ + if (!ofw_bus_is_compatible(dev, "atmel,at91sam9g20-i2c")) + return (ENXIO); +#endif device_set_desc(dev, "TWI"); return (0); } @@ -397,7 +409,12 @@ static driver_t at91_twi_driver = { sizeof(struct at91_twi_softc), }; +#ifdef FDT +DRIVER_MODULE(at91_twi, simplebus, at91_twi_driver, at91_twi_devclass, NULL, + NULL); +#else DRIVER_MODULE(at91_twi, atmelarm, at91_twi_driver, at91_twi_devclass, NULL, NULL); +#endif DRIVER_MODULE(iicbus, at91_twi, iicbus_driver, iicbus_devclass, NULL, NULL); MODULE_DEPEND(at91_twi, iicbus, 1, 1, 1); From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 21:01:53 2014 Return-Path: Delivered-To: svn-src-all@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 BC21589B; Sun, 9 Feb 2014 21:01: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 A3DDB174E; Sun, 9 Feb 2014 21:01:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19L1rMO024835; Sun, 9 Feb 2014 21:01:53 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19L1rvr024834; Sun, 9 Feb 2014 21:01:53 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201402092101.s19L1rvr024834@svn.freebsd.org> From: Warner Losh Date: Sun, 9 Feb 2014 21:01:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261688 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 21:01:53 -0000 Author: imp Date: Sun Feb 9 21:01:53 2014 New Revision: 261688 URL: http://svnweb.freebsd.org/changeset/base/261688 Log: FDT attachment... Modified: head/sys/arm/at91/at91_wdt.c Modified: head/sys/arm/at91/at91_wdt.c ============================================================================== --- head/sys/arm/at91/at91_wdt.c Sun Feb 9 21:01:10 2014 (r261687) +++ head/sys/arm/at91/at91_wdt.c Sun Feb 9 21:01:53 2014 (r261688) @@ -29,6 +29,8 @@ * handler. The watchdog is halted in processor debug mode. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -45,6 +47,12 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#include +#include +#endif + struct wdt_softc { struct mtx sc_mtx; device_t sc_dev; @@ -131,12 +139,12 @@ wdt_tick(void *argp) static int wdt_probe(device_t dev) { - - if (at91_is_sam9() || at91_is_sam9xe()) { - device_set_desc(dev, "WDT"); - return (0); - } - return (ENXIO); +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "atmel,at91sam9260-wdt")) + return (ENXIO); +#endif + device_set_desc(dev, "WDT"); + return (0); } static int @@ -223,4 +231,8 @@ static driver_t wdt_driver = { static devclass_t wdt_devclass; +#ifdef FDT +DRIVER_MODULE(at91_wdt, simplebus, wdt_driver, wdt_devclass, NULL, NULL); +#else DRIVER_MODULE(at91_wdt, atmelarm, wdt_driver, wdt_devclass, NULL, NULL); +#endif From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 21:02:46 2014 Return-Path: Delivered-To: svn-src-all@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 DE7AF9F1; Sun, 9 Feb 2014 21:02: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 C756E175F; Sun, 9 Feb 2014 21:02:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19L2kLd025066; Sun, 9 Feb 2014 21:02:46 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19L2k2f025065; Sun, 9 Feb 2014 21:02:46 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201402092102.s19L2k2f025065@svn.freebsd.org> From: Warner Losh Date: Sun, 9 Feb 2014 21:02:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261689 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 21:02:46 -0000 Author: imp Date: Sun Feb 9 21:02:46 2014 New Revision: 261689 URL: http://svnweb.freebsd.org/changeset/base/261689 Log: Add FDT attachment. Modified: head/sys/arm/at91/if_ate.c Modified: head/sys/arm/at91/if_ate.c ============================================================================== --- head/sys/arm/at91/if_ate.c Sun Feb 9 21:01:53 2014 (r261688) +++ head/sys/arm/at91/if_ate.c Sun Feb 9 21:02:46 2014 (r261689) @@ -30,6 +30,8 @@ * 2) GPIO initializtion in board setup code. */ +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -74,6 +76,12 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#include +#include +#endif + #include "miibus_if.h" /* @@ -229,7 +237,10 @@ static int ate_miibus_writereg(device_t static int ate_probe(device_t dev) { - +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "cdns,at32ap7000-macb")) + return (ENXIO); +#endif device_set_desc(dev, "EMAC"); return (0); } @@ -1458,7 +1469,11 @@ static driver_t ate_driver = { sizeof(struct ate_softc), }; +#ifdef FDT +DRIVER_MODULE(ate, simplebus, ate_driver, ate_devclass, NULL, NULL); +#else DRIVER_MODULE(ate, atmelarm, ate_driver, ate_devclass, NULL, NULL); +#endif DRIVER_MODULE(miibus, ate, miibus_driver, miibus_devclass, NULL, NULL); MODULE_DEPEND(ate, miibus, 1, 1, 1); MODULE_DEPEND(ate, ether, 1, 1, 1); From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 21:21:11 2014 Return-Path: Delivered-To: svn-src-all@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 6B863DDE; Sun, 9 Feb 2014 21:21:11 +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 5706518A6; Sun, 9 Feb 2014 21:21:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19LLBgq033519; Sun, 9 Feb 2014 21:21:11 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19LLBxw033490; Sun, 9 Feb 2014 21:21:11 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402092121.s19LLBxw033490@svn.freebsd.org> From: Ian Lepore Date: Sun, 9 Feb 2014 21:21:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261690 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 21:21:11 -0000 Author: ian Date: Sun Feb 9 21:21:10 2014 New Revision: 261690 URL: http://svnweb.freebsd.org/changeset/base/261690 Log: If someone tries to boot a generic ATMEL kernel that has no board_init() routine compiled in, print a friendly error message about it rather than mysteriously hanging while trying to init 4GB of nonexistant ram. Modified: head/sys/arm/at91/at91_machdep.c Modified: head/sys/arm/at91/at91_machdep.c ============================================================================== --- head/sys/arm/at91/at91_machdep.c Sun Feb 9 21:02:46 2014 (r261689) +++ head/sys/arm/at91/at91_machdep.c Sun Feb 9 21:21:10 2014 (r261690) @@ -590,6 +590,11 @@ initarm(struct arm_boot_params *abp) printf("Warning: No soc support for %s found.\n", soc_info.name); memsize = board_init(); + if (memsize == -1) { + printf("board_init() failed, cannot determine ram size; " + "assuming 16MB\n"); + memsize = 16 * 1024 * 1024; + } /* * Pages were allocated during the secondary bootstrap for the From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 21:27:32 2014 Return-Path: Delivered-To: svn-src-all@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 C084BFB6; Sun, 9 Feb 2014 21:27:32 +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 AB58818CE; Sun, 9 Feb 2014 21:27:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19LRWfL034800; Sun, 9 Feb 2014 21:27:32 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19LRWZJ034799; Sun, 9 Feb 2014 21:27:32 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201402092127.s19LRWZJ034799@svn.freebsd.org> From: Antoine Brodin Date: Sun, 9 Feb 2014 21:27:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261691 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 21:27:32 -0000 Author: antoine Date: Sun Feb 9 21:27:32 2014 New Revision: 261691 URL: http://svnweb.freebsd.org/changeset/base/261691 Log: Add more obsolete files. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Feb 9 21:21:10 2014 (r261690) +++ head/ObsoleteFiles.inc Sun Feb 9 21:27:32 2014 (r261691) @@ -38,11 +38,15 @@ # xargs -n1 | sort | uniq -d; # done +# 20140205: Open Firmware device moved +OLD_FILES+=usr/include/dev/ofw/ofw_nexus.h # 20140128: libelf and libdwarf import OLD_LIBS+=usr/lib/libelf.so.1 OLD_LIBS+=usr/lib32/libelf.so.1 OLD_LIBS+=usr/lib/libdwarf.so.3 OLD_LIBS+=usr/lib32/libdwarf.so.3 +# 20140123: apicvar header moved to x86 +OLD_FILES+=usr/include/machine/apicvar.h # 20131215: libcam version bumped OLD_LIBS+=lib/libcam.so.6 usr/lib32/libcam.so.6 # 20131202: libcapsicum and libcasper moved to /lib/ From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 21:42:02 2014 Return-Path: Delivered-To: svn-src-all@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 8D9BC356; Sun, 9 Feb 2014 21:42: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 76C261A2A; Sun, 9 Feb 2014 21:42:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19Lg2NU042375; Sun, 9 Feb 2014 21:42:02 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19Lg2vW042374; Sun, 9 Feb 2014 21:42:02 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201402092142.s19Lg2vW042374@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sun, 9 Feb 2014 21:42:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261692 - head/sbin/casperd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 21:42:02 -0000 Author: pjd Date: Sun Feb 9 21:42:01 2014 New Revision: 261692 URL: http://svnweb.freebsd.org/changeset/base/261692 Log: If the main casperd process exits, zygote process should exit as well instead of spinning. Reported by: Mikhail Modified: head/sbin/casperd/zygote.c Modified: head/sbin/casperd/zygote.c ============================================================================== --- head/sbin/casperd/zygote.c Sun Feb 9 21:27:32 2014 (r261691) +++ head/sbin/casperd/zygote.c Sun Feb 9 21:42:01 2014 (r261692) @@ -132,8 +132,13 @@ zygote_main(int sock) for (;;) { nvlin = nvlist_recv(sock); - if (nvlin == NULL) + if (nvlin == NULL) { + if (errno == ENOTCONN) { + /* Casperd exited. */ + exit(0); + } continue; + } func = (zygote_func_t *)(uintptr_t)nvlist_get_number(nvlin, "func"); flags = (int)nvlist_get_number(nvlin, "flags"); From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 21:47:47 2014 Return-Path: Delivered-To: svn-src-all@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 790C05A2; Sun, 9 Feb 2014 21:47: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 645231A82; Sun, 9 Feb 2014 21:47:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19LllOQ043348; Sun, 9 Feb 2014 21:47:47 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19LllFD043347; Sun, 9 Feb 2014 21:47:47 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201402092147.s19LllFD043347@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sun, 9 Feb 2014 21:47:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261693 - head/lib/libcasper X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 21:47:47 -0000 Author: pjd Date: Sun Feb 9 21:47:46 2014 New Revision: 261693 URL: http://svnweb.freebsd.org/changeset/base/261693 Log: Fix descriptor leak. Modified: head/lib/libcasper/libcasper.c Modified: head/lib/libcasper/libcasper.c ============================================================================== --- head/lib/libcasper/libcasper.c Sun Feb 9 21:42:01 2014 (r261692) +++ head/lib/libcasper/libcasper.c Sun Feb 9 21:47:46 2014 (r261693) @@ -344,7 +344,7 @@ service_message(struct service *service, if (sock == -1) { error = errno; } else { - nvlist_add_descriptor(nvlout, "sock", sock); + nvlist_move_descriptor(nvlout, "sock", sock); error = 0; } } else { From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 21:48:15 2014 Return-Path: Delivered-To: svn-src-all@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 EF6A76EC; Sun, 9 Feb 2014 21:48:14 +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 CB5231A8D; Sun, 9 Feb 2014 21:48:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19LmEUW043476; Sun, 9 Feb 2014 21:48:14 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19LmE9h043475; Sun, 9 Feb 2014 21:48:14 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201402092148.s19LmE9h043475@svn.freebsd.org> From: "George V. Neville-Neil" Date: Sun, 9 Feb 2014 21:48: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: r261694 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 21:48:15 -0000 Author: gnn Date: Sun Feb 9 21:48:14 2014 New Revision: 261694 URL: http://svnweb.freebsd.org/changeset/base/261694 Log: MFC: 260796 Fix various places where we don't properly release a lock. PR: 185043 Submitted by: Michael Bentkofsky Modified: stable/9/sys/netinet/in_mcast.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/in_mcast.c ============================================================================== --- stable/9/sys/netinet/in_mcast.c Sun Feb 9 21:47:46 2014 (r261693) +++ stable/9/sys/netinet/in_mcast.c Sun Feb 9 21:48:14 2014 (r261694) @@ -1446,7 +1446,7 @@ inp_block_unblock_source(struct inpcb *i error = inm_merge(inm, imf); if (error) { CTR1(KTR_IGMPV3, "%s: failed to merge inm state", __func__); - goto out_imf_rollback; + goto out_in_multi_locked; } CTR1(KTR_IGMPV3, "%s: doing igmp downcall", __func__); @@ -1454,6 +1454,8 @@ inp_block_unblock_source(struct inpcb *i if (error) CTR1(KTR_IGMPV3, "%s: failed igmp downcall", __func__); +out_in_multi_locked: + IN_MULTI_UNLOCK(); out_imf_rollback: @@ -2094,8 +2096,12 @@ inp_join_group(struct inpcb *inp, struct if (is_new) { error = in_joingroup_locked(ifp, &gsa->sin.sin_addr, imf, &inm); - if (error) + if (error) { + CTR1(KTR_IGMPV3, "%s: in_joingroup_locked failed", + __func__); + IN_MULTI_UNLOCK(); goto out_imo_free; + } imo->imo_membership[idx] = inm; } else { CTR1(KTR_IGMPV3, "%s: merge inm state", __func__); @@ -2103,20 +2109,21 @@ inp_join_group(struct inpcb *inp, struct if (error) { CTR1(KTR_IGMPV3, "%s: failed to merge inm state", __func__); - goto out_imf_rollback; + goto out_in_multi_locked; } CTR1(KTR_IGMPV3, "%s: doing igmp downcall", __func__); error = igmp_change_state(inm); if (error) { CTR1(KTR_IGMPV3, "%s: failed igmp downcall", __func__); - goto out_imf_rollback; + goto out_in_multi_locked; } } +out_in_multi_locked: + IN_MULTI_UNLOCK(); -out_imf_rollback: INP_WLOCK_ASSERT(inp); if (error) { imf_rollback(imf); @@ -2320,7 +2327,7 @@ inp_leave_group(struct inpcb *inp, struc if (error) { CTR1(KTR_IGMPV3, "%s: failed to merge inm state", __func__); - goto out_imf_rollback; + goto out_in_multi_locked; } CTR1(KTR_IGMPV3, "%s: doing igmp downcall", __func__); @@ -2331,9 +2338,10 @@ inp_leave_group(struct inpcb *inp, struc } } +out_in_multi_locked: + IN_MULTI_UNLOCK(); -out_imf_rollback: if (error) imf_rollback(imf); else @@ -2567,7 +2575,7 @@ inp_set_source_filters(struct inpcb *inp error = inm_merge(inm, imf); if (error) { CTR1(KTR_IGMPV3, "%s: failed to merge inm state", __func__); - goto out_imf_rollback; + goto out_in_multi_locked; } CTR1(KTR_IGMPV3, "%s: doing igmp downcall", __func__); @@ -2575,6 +2583,8 @@ inp_set_source_filters(struct inpcb *inp if (error) CTR1(KTR_IGMPV3, "%s: failed igmp downcall", __func__); +out_in_multi_locked: + IN_MULTI_UNLOCK(); out_imf_rollback: From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 22:10:15 2014 Return-Path: Delivered-To: svn-src-all@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 B686E317; Sun, 9 Feb 2014 22:10: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 A10831C2D; Sun, 9 Feb 2014 22:10:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19MAFxr055272; Sun, 9 Feb 2014 22:10:15 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19MAEiF054990; Sun, 9 Feb 2014 22:10:14 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402092210.s19MAEiF054990@svn.freebsd.org> From: Ian Lepore Date: Sun, 9 Feb 2014 22:10:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261698 - in head/sys/arm: sa11x0 xscale/i80321 xscale/i8134x xscale/pxa X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 22:10:15 -0000 Author: ian Date: Sun Feb 9 22:10:14 2014 New Revision: 261698 URL: http://svnweb.freebsd.org/changeset/base/261698 Log: Update legacy platforms to use new arm_physmem helper routines. Modified: head/sys/arm/sa11x0/assabet_machdep.c head/sys/arm/xscale/i80321/ep80219_machdep.c head/sys/arm/xscale/i80321/iq31244_machdep.c head/sys/arm/xscale/i8134x/crb_machdep.c head/sys/arm/xscale/pxa/pxa_machdep.c Modified: head/sys/arm/sa11x0/assabet_machdep.c ============================================================================== --- head/sys/arm/sa11x0/assabet_machdep.c Sun Feb 9 22:10:00 2014 (r261697) +++ head/sys/arm/sa11x0/assabet_machdep.c Sun Feb 9 22:10:14 2014 (r261698) @@ -374,16 +374,25 @@ initarm(struct arm_boot_params *abp) cpu_setup(""); pmap_curmaxkvaddr = freemempos + KERNEL_PT_VMDATA_NUM * 0x400000; - - dump_avail[0] = phys_avail[0] = round_page(virtual_avail); - dump_avail[1] = phys_avail[1] = 0xc0000000 + 0x02000000 - 1; - dump_avail[2] = phys_avail[2] = 0; - dump_avail[3] = phys_avail[3] = 0; - mutex_init(); vm_max_kernel_address = 0xd0000000; pmap_bootstrap(freemempos, &kernel_l1pt); + /* + * Add the physical ram we have available. + * + * Exclude the kernel (and all the things we allocated which immediately + * follow the kernel) from the VM allocation pool but not from crash + * dumps. virtual_avail is a global variable which tracks the kva we've + * "allocated" while setting up pmaps. + * + * Prepare the list of physical memory available to the vm subsystem. + */ + arm_physmem_hardware_region(physical_start, memsize); + arm_physmem_exclude_region(abp->abp_physaddr, + virtual_avail - KERNVIRTADDR, EXFLAG_NOALLOC); + arm_physmem_init_kernel_globals(); + init_param2(physmem); kdb_init(); return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - Modified: head/sys/arm/xscale/i80321/ep80219_machdep.c ============================================================================== --- head/sys/arm/xscale/i80321/ep80219_machdep.c Sun Feb 9 22:10:00 2014 (r261697) +++ head/sys/arm/xscale/i80321/ep80219_machdep.c Sun Feb 9 22:10:14 2014 (r261698) @@ -333,24 +333,27 @@ initarm(struct arm_boot_params *abp) /* Enable MMU, I-cache, D-cache, write buffer. */ arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); - pmap_curmaxkvaddr = afterkern + PAGE_SIZE; - dump_avail[0] = 0xa0000000; - dump_avail[1] = 0xa0000000 + memsize; - dump_avail[2] = 0; - dump_avail[3] = 0; - vm_max_kernel_address = 0xe0000000; pmap_bootstrap(pmap_curmaxkvaddr, &kernel_l1pt); msgbufp = (void*)msgbufpv.pv_va; msgbufinit(msgbufp, msgbufsize); mutex_init(); - i = 0; - phys_avail[i++] = round_page(virtual_avail - KERNBASE + IQ80321_SDRAM_START); - phys_avail[i++] = trunc_page(0xa0000000 + memsize - 1); - phys_avail[i++] = 0; - phys_avail[i] = 0; - + /* + * Add the physical ram we have available. + * + * Exclude the kernel (and all the things we allocated which immediately + * follow the kernel) from the VM allocation pool but not from crash + * dumps. virtual_avail is a global variable which tracks the kva we've + * "allocated" while setting up pmaps. + * + * Prepare the list of physical memory available to the vm subsystem. + */ + arm_physmem_hardware_region(IQ80321_SDRAM_START, memsize); + arm_physmem_exclude_region(abp->abp_physaddr, + virtual_avail - KERNVIRTADDR, EXFLAG_NOALLOC); + arm_physmem_init_kernel_globals(); + init_param2(physmem); kdb_init(); return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - Modified: head/sys/arm/xscale/i80321/iq31244_machdep.c ============================================================================== --- head/sys/arm/xscale/i80321/iq31244_machdep.c Sun Feb 9 22:10:00 2014 (r261697) +++ head/sys/arm/xscale/i80321/iq31244_machdep.c Sun Feb 9 22:10:14 2014 (r261698) @@ -335,23 +335,27 @@ initarm(struct arm_boot_params *abp) arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); pmap_curmaxkvaddr = afterkern + PAGE_SIZE; - dump_avail[0] = 0xa0000000; - dump_avail[1] = 0xa0000000 + memsize; - dump_avail[2] = 0; - dump_avail[3] = 0; - vm_max_kernel_address = 0xe0000000; pmap_bootstrap(pmap_curmaxkvaddr, &kernel_l1pt); msgbufp = (void*)msgbufpv.pv_va; msgbufinit(msgbufp, msgbufsize); mutex_init(); - i = 0; - phys_avail[i++] = round_page(virtual_avail - KERNBASE + SDRAM_START); - phys_avail[i++] = trunc_page(0xa0000000 + memsize - 1); - phys_avail[i++] = 0; - phys_avail[i] = 0; - + /* + * Add the physical ram we have available. + * + * Exclude the kernel (and all the things we allocated which immediately + * follow the kernel) from the VM allocation pool but not from crash + * dumps. virtual_avail is a global variable which tracks the kva we've + * "allocated" while setting up pmaps. + * + * Prepare the list of physical memory available to the vm subsystem. + */ + arm_physmem_hardware_region(SDRAM_START, memsize); + arm_physmem_exclude_region(abp->abp_physaddr, + virtual_avail - KERNVIRTADDR, EXFLAG_NOALLOC); + arm_physmem_init_kernel_globals(); + init_param2(physmem); kdb_init(); return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - Modified: head/sys/arm/xscale/i8134x/crb_machdep.c ============================================================================== --- head/sys/arm/xscale/i8134x/crb_machdep.c Sun Feb 9 22:10:00 2014 (r261697) +++ head/sys/arm/xscale/i8134x/crb_machdep.c Sun Feb 9 22:10:14 2014 (r261698) @@ -313,23 +313,27 @@ initarm(struct arm_boot_params *abp) pmap_curmaxkvaddr = afterkern + PAGE_SIZE; - dump_avail[0] = 0x00000000; - dump_avail[1] = 0x00000000 + memsize; - dump_avail[2] = 0; - dump_avail[3] = 0; - vm_max_kernel_address = 0xe0000000; pmap_bootstrap(pmap_curmaxkvaddr, &kernel_l1pt); msgbufp = (void*)msgbufpv.pv_va; msgbufinit(msgbufp, msgbufsize); mutex_init(); - - i = 0; - phys_avail[i++] = round_page(virtual_avail - KERNBASE + SDRAM_START); - phys_avail[i++] = trunc_page(0x00000000 + memsize - 1); - phys_avail[i++] = 0; - phys_avail[i] = 0; - + + /* + * Add the physical ram we have available. + * + * Exclude the kernel (and all the things we allocated which immediately + * follow the kernel) from the VM allocation pool but not from crash + * dumps. virtual_avail is a global variable which tracks the kva we've + * "allocated" while setting up pmaps. + * + * Prepare the list of physical memory available to the vm subsystem. + */ + arm_physmem_hardware_region(SDRAM_START, memsize); + arm_physmem_exclude_region(abp->abp_physaddr, + virtual_avail - KERNVIRTADDR, EXFLAG_NOALLOC); + arm_physmem_init_kernel_globals(); + init_param2(physmem); kdb_init(); return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - Modified: head/sys/arm/xscale/pxa/pxa_machdep.c ============================================================================== --- head/sys/arm/xscale/pxa/pxa_machdep.c Sun Feb 9 22:10:00 2014 (r261697) +++ head/sys/arm/xscale/pxa/pxa_machdep.c Sun Feb 9 22:10:14 2014 (r261698) @@ -308,11 +308,6 @@ initarm(struct arm_boot_params *abp) */ pxa_probe_sdram(obio_tag, PXA2X0_MEMCTL_BASE, memstart, memsize); - physmem = 0; - for (i = 0; i < PXA2X0_SDRAM_BANKS; i++) { - physmem += memsize[i] / PAGE_SIZE; - } - /* Fire up consoles. */ cninit(); @@ -328,39 +323,29 @@ initarm(struct arm_boot_params *abp) arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); pmap_curmaxkvaddr = afterkern + PAGE_SIZE; - i = 0; - for (j = 0; j < PXA2X0_SDRAM_BANKS; j++) { - if (memsize[j] > 0) { - dump_avail[i++] = round_page(memstart[j]); - dump_avail[i++] = - trunc_page(memstart[j] + memsize[j]); - } - } - dump_avail[i] = 0; - dump_avail[i] = 0; vm_max_kernel_address = 0xe0000000; pmap_bootstrap(pmap_curmaxkvaddr, &kernel_l1pt); msgbufp = (void*)msgbufpv.pv_va; msgbufinit(msgbufp, msgbufsize); mutex_init(); - i = 0; + /* + * Add the physical ram we have available. + * + * Exclude the kernel (and all the things we allocated which immediately + * follow the kernel) from the VM allocation pool but not from crash + * dumps. virtual_avail is a global variable which tracks the kva we've + * "allocated" while setting up pmaps. + * + * Prepare the list of physical memory available to the vm subsystem. + */ for (j = 0; j < PXA2X0_SDRAM_BANKS; j++) { - if (memsize[j] > 0) { - phys_avail[i] = round_page(memstart[j]); - dump_avail[i++] = round_page(memstart[j]); - phys_avail[i] = - trunc_page(memstart[j] + memsize[j]); - dump_avail[i++] = - trunc_page(memstart[j] + memsize[j]); - } + if (memsize[j] > 0) + arm_physmem_hardware_region(memstart[j], memsize[j]); } - - dump_avail[i] = 0; - phys_avail[i++] = 0; - dump_avail[i] = 0; - phys_avail[i] = 0; - phys_avail[0] = round_page(virtual_avail - KERNBASE + phys_avail[0]); + arm_physmem_exclude_region(abp->abp_physaddr, + virtual_avail - KERNVIRTADDR, EXFLAG_NOALLOC); + arm_physmem_init_kernel_globals(); init_param2(physmem); kdb_init(); From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 22:42:15 2014 Return-Path: Delivered-To: svn-src-all@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 1EB32293; Sun, 9 Feb 2014 22:42: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 E22F61FF3; Sun, 9 Feb 2014 22:42:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19MgE32069740; Sun, 9 Feb 2014 22:42:14 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19MgEmT069737; Sun, 9 Feb 2014 22:42:14 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402092242.s19MgEmT069737@svn.freebsd.org> From: Christian Brueffer Date: Sun, 9 Feb 2014 22:42:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261701 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 22:42:15 -0000 Author: brueffer Date: Sun Feb 9 22:42:14 2014 New Revision: 261701 URL: http://svnweb.freebsd.org/changeset/base/261701 Log: Allow iwn2000 and iwn2030 firmware to be linked into the kernel. PR: 184631 Submitted by: Oliver Pinter MFC after: 1 week Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Feb 9 22:13:53 2014 (r261700) +++ head/sys/conf/files Sun Feb 9 22:42:14 2014 (r261701) @@ -1569,6 +1569,34 @@ iwn1000.fw optional iwn1000fw | iwnfw compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn1000.fw" +iwn2000fw.c optional iwn2000fw | iwnfw \ + compile-with "${AWK} -f $S/tools/fw_stub.awk iwn2000.fw:iwn2000fw -miwn2000fw -c${.TARGET}" \ + no-implicit-rule before-depend local \ + clean "iwn2000fw.c" +iwn2000fw.fwo optional iwn2000fw | iwnfw \ + dependency "iwn2000.fw" \ + compile-with "${NORMAL_FWO}" \ + no-implicit-rule \ + clean "iwn2000fw.fwo" +iwn2000.fw optional iwn2000fw | iwnfw \ + dependency "$S/contrib/dev/iwn/iwlwifi-2000-18.168.6.1.fw.uu" \ + compile-with "${NORMAL_FW}" \ + no-obj no-implicit-rule \ + clean "iwn2000.fw" +iwn2030fw.c optional iwn2030fw | iwnfw \ + compile-with "${AWK} -f $S/tools/fw_stub.awk iwn2030.fw:iwn2030fw -miwn2030fw -c${.TARGET}" \ + no-implicit-rule before-depend local \ + clean "iwn2030fw.c" +iwn2030fw.fwo optional iwn2030fw | iwnfw \ + dependency "iwn2030.fw" \ + compile-with "${NORMAL_FWO}" \ + no-implicit-rule \ + clean "iwn2030fw.fwo" +iwn2030.fw optional iwn2030fw | iwnfw \ + dependency "$S/contrib/dev/iwn/iwnwifi-2030-18.168.6.1.fw.uu" \ + compile-with "${NORMAL_FW}" \ + no-obj no-implicit-rule \ + clean "iwn2030.fw" iwn4965fw.c optional iwn4965fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn4965.fw:iwn4965fw -miwn4965fw -c${.TARGET}" \ no-implicit-rule before-depend local \ From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 22:43:17 2014 Return-Path: Delivered-To: svn-src-all@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 9F1563D5; Sun, 9 Feb 2014 22:43:17 +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 71FCF1FF9; Sun, 9 Feb 2014 22:43:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19MhHad069938; Sun, 9 Feb 2014 22:43:17 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19MhHH5069936; Sun, 9 Feb 2014 22:43:17 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402092243.s19MhHH5069936@svn.freebsd.org> From: Christian Brueffer Date: Sun, 9 Feb 2014 22:43:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261702 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 22:43:17 -0000 Author: brueffer Date: Sun Feb 9 22:43:16 2014 New Revision: 261702 URL: http://svnweb.freebsd.org/changeset/base/261702 Log: Update and sort the list of iwn(4) firmware. MFC after: 1 week Modified: head/share/man/man4/iwn.4 head/share/man/man4/iwnfw.4 Modified: head/share/man/man4/iwn.4 ============================================================================== --- head/share/man/man4/iwn.4 Sun Feb 9 22:42:14 2014 (r261701) +++ head/share/man/man4/iwn.4 Sun Feb 9 22:43:16 2014 (r261702) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 19, 2013 +.Dd February 9, 2014 .Dt IWN 4 .Os .Sh NAME @@ -45,8 +45,10 @@ kernel configuration file: You also need to select a firmware for your device. Choose one from: .Bd -ragged -offset indent -.Cd "device iwn4965fw" .Cd "device iwn1000fw" +.Cd "device iwn2000fw" +.Cd "device iwn2030fw" +.Cd "device iwn4965fw" .Cd "device iwn5000fw" .Cd "device iwn5150fw" .Cd "device iwn6000fw" @@ -67,8 +69,10 @@ module at boot time, place the following .Xr loader.conf 5 : .Bd -literal -offset indent if_iwn_load="YES" -iwn4965fw_load="YES" iwn1000fw_load="YES" +iwn2000fw_load="YES" +iwn2030fw_load="YES" +iwn4965fw_load="YES" iwn5000fw_load="YES" iwn5150fw_load="YES" iwn6000fw_load="YES" Modified: head/share/man/man4/iwnfw.4 ============================================================================== --- head/share/man/man4/iwnfw.4 Sun Feb 9 22:42:14 2014 (r261701) +++ head/share/man/man4/iwnfw.4 Sun Feb 9 22:43:16 2014 (r261702) @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 20, 2011 +.Dd February 9, 2014 .Dt IWNFW 4 .Os .Sh NAME @@ -40,8 +40,10 @@ This will include three firmware images If you want to pick only the firmware image for your network adapter choose one of the following: .Bd -ragged -offset indent -.Cd "device iwn4965fw" .Cd "device iwn1000fw" +.Cd "device iwn2000fw" +.Cd "device iwn2030fw" +.Cd "device iwn4965fw" .Cd "device iwn5000fw" .Cd "device iwn5150fw" .Cd "device iwn6000fw" @@ -54,8 +56,10 @@ Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent -iwn4965fw_load="YES" iwn1000fw_load="YES" +iwn2000fw_load="YES" +iwn2030fw_load="YES" +iwn4965fw_load="YES" iwn5000fw_load="YES" iwn5150fw_load="YES" iwn6000fw_load="YES" @@ -65,7 +69,7 @@ iwn6050fw_load="YES" .Ed .Sh DESCRIPTION This module provides access to firmware sets for the -Intel Wireless WiFi Link 4965, 1000, 5000 and 6000 series of +Intel Wireless WiFi Link 1000, 2000, 2030, 4965, 5000 and 6000 series of IEEE 802.11n adapters. It may be statically linked into the kernel, or loaded as a module. From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 00:11:54 2014 Return-Path: Delivered-To: svn-src-all@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 C8C5FB9F; Mon, 10 Feb 2014 00:11:54 +0000 (UTC) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 85F341688; Mon, 10 Feb 2014 00:11:54 +0000 (UTC) Received: from lgwl-lstewart2.corp.netflix.com (lstewart-laptop.caia.swin.edu.au [136.186.229.148]) by lauren.room52.net (Postfix) with ESMTPSA id A66FA7E84F; Mon, 10 Feb 2014 11:11:46 +1100 (EST) Message-ID: <52F81936.6030703@freebsd.org> Date: Mon, 10 Feb 2014 11:11:34 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Jason Evans Subject: Re: svn commit: r261071 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src include lib/libc/gen lib/libc/... References: <201401230247.s0N2lbkU098546@svn.freebsd.org> <52F45AA4.4000004@freebsd.org> <78E18422-AA85-41D4-9DE8-D33D00881ABA@freebsd.org> In-Reply-To: <78E18422-AA85-41D4-9DE8-D33D00881ABA@freebsd.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lauren.room52.net Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 00:11:54 -0000 On 02/07/14 16:06, Jason Evans wrote: > On Feb 6, 2014, at 8:01 PM, Lawrence Stewart > wrote: >> On 01/23/14 13:47, Jason Evans wrote: >>> Author: jasone Date: Thu Jan 23 02:47:36 2014 New Revision: >>> 261071 URL: http://svnweb.freebsd.org/changeset/base/261071 >>> >>> Log: Update jemalloc to version 3.5.0. >> >> I suspect that this commit is related to the assertion failures >> I've been seeing on recent head when I updated from r260427 to >> r261453. Here's two I noticed today: >> >> : >> /usr/local/poudriere/jails/head-amd64/usr/src/lib/libc/../../contrib/jemalloc/include/jemalloc/internal/arena.h:7 >> >> 76: Failed assertion: "binind == actual_binind" >> *** Signal 6 >> >> and >> >> : >> /usr/src/lib/libc/../../contrib/jemalloc/include/jemalloc/internal/arena.h:776: >> >> Failed assertion: "binind == actual_binind" >> Abort trap >> >> I seem to be able to reproduce the first one readily when >> poudriere tries to build chromium so I can provide more info and >> help test ideas. >> >> Cheers, Lawrence > > Are the failures you saw happening only for the chromium build, or > have you seen that same failure for other things as well? Other things as well. The second example came from a completely unrelated app - dnsmasq if I remember correctly. The assertion failures are not deterministic. I do recall the machine was using a fairly substantial amount of swap at the time which might be relevant, as I haven't noted a failure recently since rebooting the laptop. > If this is an application bug, its probably due do a buffer overrun > corrupting an adjacent page that contains page run metadata. If its > a jemalloc bug, Im going to need to reproduce it and dig in; its > unlikely to be easy to diagnose. I'll keep an eye out for further failures and see if I can figure out a reproduction recipe. Cheers, Lawrence From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 06:29:06 2014 Return-Path: Delivered-To: svn-src-all@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 7F73722C; Mon, 10 Feb 2014 06:29: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 6AB8E1872; Mon, 10 Feb 2014 06:29:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1A6T67x055899; Mon, 10 Feb 2014 06:29:06 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1A6T6cC055898; Mon, 10 Feb 2014 06:29:06 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201402100629.s1A6T6cC055898@svn.freebsd.org> From: Adrian Chadd Date: Mon, 10 Feb 2014 06:29:06 +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: r261705 - 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-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 06:29:06 -0000 Author: adrian Date: Mon Feb 10 06:29:05 2014 New Revision: 261705 URL: http://svnweb.freebsd.org/changeset/base/261705 Log: MFC r260871: If the flowid is available for the mbuf that finalised the creation of a syncache connection, copy it into the inp_flowid field. Without this, an incoming TCP connection won't have an inp_flowid marked until some data comes in, and this means that things like the per-CPU TCP timer option will choose a different CPU for the timer work. (It also means that if one grabbed the flowid via an ioctl from userland, it won't be available until some data has been received.) Sponsored by: Netflix, Inc. Modified: stable/10/sys/netinet/tcp_syncache.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/tcp_syncache.c ============================================================================== --- stable/10/sys/netinet/tcp_syncache.c Mon Feb 10 05:37:04 2014 (r261704) +++ stable/10/sys/netinet/tcp_syncache.c Mon Feb 10 06:29:05 2014 (r261705) @@ -721,6 +721,16 @@ syncache_socket(struct syncache *sc, str #endif /* + * If there's an mbuf and it has a flowid, then let's initialise the + * inp with that particular flowid. + */ + if (m != NULL && m->m_flags & M_FLOWID) { + inp->inp_flags |= INP_HW_FLOWID; + inp->inp_flags &= ~INP_SW_FLOWID; + inp->inp_flowid = m->m_pkthdr.flowid; + } + + /* * Install in the reservation hash table for now, but don't yet * install a connection group since the full 4-tuple isn't yet * configured. From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 07:16:47 2014 Return-Path: Delivered-To: svn-src-all@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 77B16FC9; Mon, 10 Feb 2014 07:16: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 628861BED; Mon, 10 Feb 2014 07:16:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1A7Gl2F075453; Mon, 10 Feb 2014 07:16:47 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1A7GljI075452; Mon, 10 Feb 2014 07:16:47 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201402100716.s1A7GljI075452@svn.freebsd.org> From: Glen Barber Date: Mon, 10 Feb 2014 07:16: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: r261706 - stable/10/release X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 07:16:47 -0000 Author: gjb Date: Mon Feb 10 07:16:46 2014 New Revision: 261706 URL: http://svnweb.freebsd.org/changeset/base/261706 Log: Run ldconfig(8) rc script before building ports so ld-elf.so.hints exists for pkg(8). This is a direct commit to stable/10 as generate-release.sh does not exist in head/. PR: 186554 Sponsored by: The FreeBSD Foundation Modified: stable/10/release/generate-release.sh Modified: stable/10/release/generate-release.sh ============================================================================== --- stable/10/release/generate-release.sh Mon Feb 10 06:29:05 2014 (r261705) +++ stable/10/release/generate-release.sh Mon Feb 10 07:16:46 2014 (r261706) @@ -109,6 +109,7 @@ if [ -d ${CHROOTDIR}/usr/doc ]; then cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf # Install docproj to build release documentation + ${CHROOT_CMD} /etc/rc.d/ldconfig forcerestart ${CHROOT_CMD} /bin/sh -c \ 'make -C /usr/ports/textproc/docproj \ BATCH=yes \ From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 07:17:47 2014 Return-Path: Delivered-To: svn-src-all@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 3824E174; Mon, 10 Feb 2014 07:17: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 20DC91BF3; Mon, 10 Feb 2014 07:17:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1A7Hkq8075599; Mon, 10 Feb 2014 07:17:46 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1A7HkF0075598; Mon, 10 Feb 2014 07:17:46 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201402100717.s1A7HkF0075598@svn.freebsd.org> From: Glen Barber Date: Mon, 10 Feb 2014 07:17:46 +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: r261707 - stable/9/release X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 07:17:47 -0000 Author: gjb Date: Mon Feb 10 07:17:46 2014 New Revision: 261707 URL: http://svnweb.freebsd.org/changeset/base/261707 Log: Run ldconfig(8) rc script before building ports so ld-elf.so.hints exists for pkg(8). This is a direct commit to stable/9 as generate-release.sh does not exist in head/. PR: 186554 Sponsored by: The FreeBSD Foundation Modified: stable/9/release/generate-release.sh Modified: stable/9/release/generate-release.sh ============================================================================== --- stable/9/release/generate-release.sh Mon Feb 10 07:16:46 2014 (r261706) +++ stable/9/release/generate-release.sh Mon Feb 10 07:17:46 2014 (r261707) @@ -109,6 +109,7 @@ if [ -d ${CHROOTDIR}/usr/doc ]; then cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf # Install docproj to build release documentation + ${CHROOT_CMD} /etc/rc.d/ldconfig forcerestart ${CHROOT_CMD} /bin/sh -c \ 'make -C /usr/ports/textproc/docproj \ BATCH=yes \ From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 12:52:34 2014 Return-Path: Delivered-To: svn-src-all@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 087755B8; Mon, 10 Feb 2014 12:52: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 D968A1A49; Mon, 10 Feb 2014 12:52:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1ACqXjl010239; Mon, 10 Feb 2014 12:52:33 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1ACqXpT010238; Mon, 10 Feb 2014 12:52:33 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201402101252.s1ACqXpT010238@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Mon, 10 Feb 2014 12:52:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261708 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 12:52:34 -0000 Author: melifaro Date: Mon Feb 10 12:52:33 2014 New Revision: 261708 URL: http://svnweb.freebsd.org/changeset/base/261708 Log: Simplify nd6_output_lle: * Check ND6_IFF_IFDISABLED before acquiring any locks * Assume m is always non-NULL * remove 'bad' case not used anymore * Simply if_output conditional MFC after: 2 weeks Sponsored by: Yandex LLC Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Mon Feb 10 07:17:46 2014 (r261707) +++ head/sys/netinet6/nd6.c Mon Feb 10 12:52:33 2014 (r261708) @@ -1849,8 +1849,6 @@ nd6_output(struct ifnet *ifp, struct ifn * KMM * */ -#define senderr(e) { error = (e); goto bad;} - int nd6_output_lle(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m0, struct sockaddr_in6 *dst, struct rtentry *rt0, struct llentry *lle, @@ -1872,6 +1870,13 @@ nd6_output_lle(struct ifnet *ifp, struct KASSERT(chain != NULL, (" lle locked but no mbuf chain pointer passed")); } #endif + KASSERT(m != NULL, ("NULL mbuf, nothing to send")); + /* discard the packet if IPv6 operation is disabled on the interface */ + if ((ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED)) { + m_freem(m); + return (ENETDOWN); /* better error? */ + } + if (IN6_IS_ADDR_MULTICAST(&dst->sin6_addr)) goto sendpkt; @@ -1901,7 +1906,7 @@ nd6_output_lle(struct ifnet *ifp, struct * the condition below is not very efficient. But we believe * it is tolerable, because this should be a rare case. */ - flags = ND6_CREATE | (m ? ND6_EXCLUSIVE : 0); + flags = ND6_CREATE | ND6_EXCLUSIVE; IF_AFDATA_LOCK(ifp); ln = nd6_lookup(&dst->sin6_addr, flags, ifp); IF_AFDATA_UNLOCK(ifp); @@ -1915,7 +1920,8 @@ nd6_output_lle(struct ifnet *ifp, struct "nd6_output: can't allocate llinfo for %s " "(ln=%p)\n", ip6_sprintf(ip6buf, &dst->sin6_addr), ln); - senderr(EIO); /* XXX: good error? */ + m_freem(m); + return (ENOBUFS); } goto sendpkt; /* send anyway */ } @@ -2023,11 +2029,6 @@ nd6_output_lle(struct ifnet *ifp, struct return (0); sendpkt: - /* discard the packet if IPv6 operation is disabled on the interface */ - if ((ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED)) { - error = ENETDOWN; /* better error? */ - goto bad; - } /* * ln is valid and the caller did not pass in * an llentry @@ -2090,29 +2091,13 @@ nd6_output_lle(struct ifnet *ifp, struct m_clrprotoflags(m); /* Avoid confusing lower layers. */ IP_PROBE(send, NULL, NULL, mtod(m, struct ip6_hdr *), ifp, NULL, mtod(m, struct ip6_hdr *)); - if ((ifp->if_flags & IFF_LOOPBACK) != 0) { - return ((*ifp->if_output)(origifp, m, (struct sockaddr *)dst, - NULL)); - } - error = (*ifp->if_output)(ifp, m, (struct sockaddr *)dst, NULL); - return (error); - bad: - /* - * ln is valid and the caller did not pass in - * an llentry - */ - if ((ln != NULL) && (lle == NULL)) { - if (flags & LLE_EXCLUSIVE) - LLE_WUNLOCK(ln); - else - LLE_RUNLOCK(ln); - } - if (m) - m_freem(m); + if ((ifp->if_flags & IFF_LOOPBACK) != 0) + origifp = ifp; + + error = (*ifp->if_output)(origifp, m, (struct sockaddr *)dst, NULL); return (error); } -#undef senderr int From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 14:36:51 2014 Return-Path: Delivered-To: svn-src-all@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 EF1AE5D6; Mon, 10 Feb 2014 14:36: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 D88EB131D; Mon, 10 Feb 2014 14:36:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1AEapGR060691; Mon, 10 Feb 2014 14:36:51 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1AEapkP060690; Mon, 10 Feb 2014 14:36:51 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402101436.s1AEapkP060690@svn.freebsd.org> From: Christian Brueffer Date: Mon, 10 Feb 2014 14:36:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261709 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 14:36:52 -0000 Author: brueffer Date: Mon Feb 10 14:36:51 2014 New Revision: 261709 URL: http://svnweb.freebsd.org/changeset/base/261709 Log: For IPv6, return the same error code as IPv4 when mrouter is not initialized. PR: 178472 Submitted by: Sven-Thorsten Dietrich Reviewed by: bms Modified: head/sys/netinet6/ip6_mroute.c Modified: head/sys/netinet6/ip6_mroute.c ============================================================================== --- head/sys/netinet6/ip6_mroute.c Mon Feb 10 12:52:33 2014 (r261708) +++ head/sys/netinet6/ip6_mroute.c Mon Feb 10 14:36:51 2014 (r261709) @@ -361,7 +361,7 @@ X_ip6_mrouter_set(struct socket *so, str mifi_t mifi; if (so != V_ip6_mrouter && sopt->sopt_name != MRT6_INIT) - return (EACCES); + return (EPERM); switch (sopt->sopt_name) { case MRT6_INIT: From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 14:47:52 2014 Return-Path: Delivered-To: svn-src-all@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 53E12C5B; Mon, 10 Feb 2014 14:47: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 3F4F11433; Mon, 10 Feb 2014 14:47:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1AElqKV065134; Mon, 10 Feb 2014 14:47:52 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1AElqJ4065133; Mon, 10 Feb 2014 14:47:52 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402101447.s1AElqJ4065133@svn.freebsd.org> From: Christian Brueffer Date: Mon, 10 Feb 2014 14:47:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261710 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 14:47:52 -0000 Author: brueffer Date: Mon Feb 10 14:47:51 2014 New Revision: 261710 URL: http://svnweb.freebsd.org/changeset/base/261710 Log: Only count table lookups when we're actually processing packets. PR: 183462 Submitted by: Sven-Thorsten Dietrich Reviewed by: bms MFC after: 1 month Modified: head/sys/netinet6/ip6_mroute.c Modified: head/sys/netinet6/ip6_mroute.c ============================================================================== --- head/sys/netinet6/ip6_mroute.c Mon Feb 10 14:36:51 2014 (r261709) +++ head/sys/netinet6/ip6_mroute.c Mon Feb 10 14:47:51 2014 (r261710) @@ -283,7 +283,6 @@ static VNET_DEFINE(int, pim6); #define MF6CFIND(o, g, rt) do { \ struct mf6c *_rt = mf6ctable[MF6CHASH(o,g)]; \ rt = NULL; \ - MRT6STAT_INC(mrt6s_mfc_lookups); \ while (_rt) { \ if (IN6_ARE_ADDR_EQUAL(&_rt->mf6c_origin.sin6_addr, &(o)) && \ IN6_ARE_ADDR_EQUAL(&_rt->mf6c_mcastgrp.sin6_addr, &(g)) && \ @@ -1099,6 +1098,7 @@ X_ip6_mforward(struct ip6_hdr *ip6, stru * Determine forwarding mifs from the forwarding cache table */ MF6CFIND(ip6->ip6_src, ip6->ip6_dst, rt); + MRT6STAT_INC(mrt6s_mfc_lookups); /* Entry exists, so forward if necessary */ if (rt) { From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 15:01:24 2014 Return-Path: Delivered-To: svn-src-all@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 D3336251; Mon, 10 Feb 2014 15:01: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 B0D7D15DE; Mon, 10 Feb 2014 15:01:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1AF1OMe072190; Mon, 10 Feb 2014 15:01:24 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1AF1OFi072189; Mon, 10 Feb 2014 15:01:24 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402101501.s1AF1OFi072189@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 10 Feb 2014 15:01:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261711 - head/usr.bin/iscsictl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 15:01:24 -0000 Author: trasz Date: Mon Feb 10 15:01:24 2014 New Revision: 261711 URL: http://svnweb.freebsd.org/changeset/base/261711 Log: Yacc cleanup; no functional changes. Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/iscsictl/parse.y Modified: head/usr.bin/iscsictl/parse.y ============================================================================== --- head/usr.bin/iscsictl/parse.y Mon Feb 10 14:47:51 2014 (r261710) +++ head/usr.bin/iscsictl/parse.y Mon Feb 10 15:01:24 2014 (r261711) @@ -69,12 +69,12 @@ extern void yyrestart(FILE *); %% -statements: +targets: | - statements target_statement + targets target ; -target_statement: STR OPENING_BRACKET target_entries CLOSING_BRACKET +target: STR OPENING_BRACKET target_entries CLOSING_BRACKET { if (target_find(conf, $1) != NULL) errx(1, "duplicated target %s", $1); @@ -89,38 +89,38 @@ target_entries: ; target_entry: - target_name_statement + target_name | - target_address_statement + target_address | - initiator_name_statement + initiator_name | - initiator_address_statement + initiator_address | - initiator_alias_statement + initiator_alias | - user_statement + user | - secret_statement + secret | - mutual_user_statement + mutual_user | - mutual_secret_statement + mutual_secret | - auth_method_statement + auth_method | - header_digest_statement + header_digest | - data_digest_statement + data_digest | - session_type_statement + session_type | - protocol_statement + protocol | - ignored_statement + ignored ; -target_name_statement: TARGET_NAME EQUALS STR +target_name: TARGET_NAME EQUALS STR { if (target->t_name != NULL) errx(1, "duplicated TargetName at line %d", lineno + 1); @@ -128,7 +128,7 @@ target_name_statement: TARGET_NAME EQUAL } ; -target_address_statement: TARGET_ADDRESS EQUALS STR +target_address: TARGET_ADDRESS EQUALS STR { if (target->t_address != NULL) errx(1, "duplicated TargetAddress at line %d", lineno + 1); @@ -136,7 +136,7 @@ target_address_statement: TARGET_ADDRESS } ; -initiator_name_statement: INITIATOR_NAME EQUALS STR +initiator_name: INITIATOR_NAME EQUALS STR { if (target->t_initiator_name != NULL) errx(1, "duplicated InitiatorName at line %d", lineno + 1); @@ -144,7 +144,7 @@ initiator_name_statement: INITIATOR_NAME } ; -initiator_address_statement: INITIATOR_ADDRESS EQUALS STR +initiator_address: INITIATOR_ADDRESS EQUALS STR { if (target->t_initiator_address != NULL) errx(1, "duplicated InitiatorAddress at line %d", lineno + 1); @@ -152,7 +152,7 @@ initiator_address_statement: INITIATOR_A } ; -initiator_alias_statement: INITIATOR_ALIAS EQUALS STR +initiator_alias: INITIATOR_ALIAS EQUALS STR { if (target->t_initiator_alias != NULL) errx(1, "duplicated InitiatorAlias at line %d", lineno + 1); @@ -160,7 +160,7 @@ initiator_alias_statement: INITIATOR_ALI } ; -user_statement: USER EQUALS STR +user: USER EQUALS STR { if (target->t_user != NULL) errx(1, "duplicated chapIName at line %d", lineno + 1); @@ -168,7 +168,7 @@ user_statement: USER EQUALS STR } ; -secret_statement: SECRET EQUALS STR +secret: SECRET EQUALS STR { if (target->t_secret != NULL) errx(1, "duplicated chapSecret at line %d", lineno + 1); @@ -176,7 +176,7 @@ secret_statement: SECRET EQUALS STR } ; -mutual_user_statement: MUTUAL_USER EQUALS STR +mutual_user: MUTUAL_USER EQUALS STR { if (target->t_mutual_user != NULL) errx(1, "duplicated tgtChapName at line %d", lineno + 1); @@ -184,7 +184,7 @@ mutual_user_statement: MUTUAL_USER EQUAL } ; -mutual_secret_statement:MUTUAL_SECRET EQUALS STR +mutual_secret: MUTUAL_SECRET EQUALS STR { if (target->t_mutual_secret != NULL) errx(1, "duplicated tgtChapSecret at line %d", lineno + 1); @@ -192,7 +192,7 @@ mutual_secret_statement:MUTUAL_SECRET EQ } ; -auth_method_statement: AUTH_METHOD EQUALS STR +auth_method: AUTH_METHOD EQUALS STR { if (target->t_auth_method != AUTH_METHOD_UNSPECIFIED) errx(1, "duplicated AuthMethod at line %d", lineno + 1); @@ -206,7 +206,7 @@ auth_method_statement: AUTH_METHOD EQUAL } ; -header_digest_statement: HEADER_DIGEST EQUALS STR +header_digest: HEADER_DIGEST EQUALS STR { if (target->t_header_digest != DIGEST_UNSPECIFIED) errx(1, "duplicated HeaderDigest at line %d", lineno + 1); @@ -220,7 +220,7 @@ header_digest_statement: HEADER_DIGEST E } ; -data_digest_statement: DATA_DIGEST EQUALS STR +data_digest: DATA_DIGEST EQUALS STR { if (target->t_data_digest != DIGEST_UNSPECIFIED) errx(1, "duplicated DataDigest at line %d", lineno + 1); @@ -234,7 +234,7 @@ data_digest_statement: DATA_DIGEST EQUAL } ; -session_type_statement: SESSION_TYPE EQUALS STR +session_type: SESSION_TYPE EQUALS STR { if (target->t_session_type != SESSION_TYPE_UNSPECIFIED) errx(1, "duplicated SessionType at line %d", lineno + 1); @@ -248,7 +248,7 @@ session_type_statement: SESSION_TYPE EQU } ; -protocol_statement: PROTOCOL EQUALS STR +protocol: PROTOCOL EQUALS STR { if (target->t_protocol != PROTOCOL_UNSPECIFIED) errx(1, "duplicated protocol at line %d", lineno + 1); @@ -262,7 +262,7 @@ protocol_statement: PROTOCOL EQUALS STR } ; -ignored_statement: IGNORED EQUALS STR +ignored: IGNORED EQUALS STR { warnx("obsolete statement ignored at line %d", lineno + 1); } From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 15:02:03 2014 Return-Path: Delivered-To: svn-src-all@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 5EB0B3A8; Mon, 10 Feb 2014 15:02:03 +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 4910915ED; Mon, 10 Feb 2014 15:02:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1AF23Ui072323; Mon, 10 Feb 2014 15:02:03 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1AF232T072322; Mon, 10 Feb 2014 15:02:03 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402101502.s1AF232T072322@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 10 Feb 2014 15:02:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261712 - head/usr.bin/iscsictl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 15:02:03 -0000 Author: trasz Date: Mon Feb 10 15:02:02 2014 New Revision: 261712 URL: http://svnweb.freebsd.org/changeset/base/261712 Log: Remove unused variable. Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/iscsictl/iscsictl.c Modified: head/usr.bin/iscsictl/iscsictl.c ============================================================================== --- head/usr.bin/iscsictl/iscsictl.c Mon Feb 10 15:01:24 2014 (r261711) +++ head/usr.bin/iscsictl/iscsictl.c Mon Feb 10 15:02:02 2014 (r261712) @@ -381,7 +381,6 @@ kernel_list(int iscsi_fd, const struct t struct iscsi_session_list isl; unsigned int i, nentries = 1; int error; - bool show_periphs; for (;;) { states = realloc(states, @@ -455,7 +454,6 @@ kernel_list(int iscsi_fd, const struct t for (i = 0; i < isl.isl_nentries; i++) { state = &states[i]; conf = &state->iss_conf; - show_periphs = false; printf("%-36s %-16s ", conf->isc_target, conf->isc_target_addr); From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 15:03:08 2014 Return-Path: Delivered-To: svn-src-all@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 96EFD51C; Mon, 10 Feb 2014 15:03: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 8012B15FB; Mon, 10 Feb 2014 15:03:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1AF38OL072524; Mon, 10 Feb 2014 15:03:08 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1AF38vK072523; Mon, 10 Feb 2014 15:03:08 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402101503.s1AF38vK072523@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 10 Feb 2014 15:03:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261713 - head/usr.bin/iscsictl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 15:03:08 -0000 Author: trasz Date: Mon Feb 10 15:03:08 2014 New Revision: 261713 URL: http://svnweb.freebsd.org/changeset/base/261713 Log: Simplify. Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/iscsictl/parse.y Modified: head/usr.bin/iscsictl/parse.y ============================================================================== --- head/usr.bin/iscsictl/parse.y Mon Feb 10 15:02:02 2014 (r261712) +++ head/usr.bin/iscsictl/parse.y Mon Feb 10 15:03:08 2014 (r261713) @@ -123,7 +123,7 @@ target_entry: target_name: TARGET_NAME EQUALS STR { if (target->t_name != NULL) - errx(1, "duplicated TargetName at line %d", lineno + 1); + errx(1, "duplicated TargetName at line %d", lineno); target->t_name = $3; } ; @@ -131,7 +131,7 @@ target_name: TARGET_NAME EQUALS STR target_address: TARGET_ADDRESS EQUALS STR { if (target->t_address != NULL) - errx(1, "duplicated TargetAddress at line %d", lineno + 1); + errx(1, "duplicated TargetAddress at line %d", lineno); target->t_address = $3; } ; @@ -139,7 +139,7 @@ target_address: TARGET_ADDRESS EQUALS ST initiator_name: INITIATOR_NAME EQUALS STR { if (target->t_initiator_name != NULL) - errx(1, "duplicated InitiatorName at line %d", lineno + 1); + errx(1, "duplicated InitiatorName at line %d", lineno); target->t_initiator_name = $3; } ; @@ -147,7 +147,7 @@ initiator_name: INITIATOR_NAME EQUALS ST initiator_address: INITIATOR_ADDRESS EQUALS STR { if (target->t_initiator_address != NULL) - errx(1, "duplicated InitiatorAddress at line %d", lineno + 1); + errx(1, "duplicated InitiatorAddress at line %d", lineno); target->t_initiator_address = $3; } ; @@ -155,7 +155,7 @@ initiator_address: INITIATOR_ADDRESS EQU initiator_alias: INITIATOR_ALIAS EQUALS STR { if (target->t_initiator_alias != NULL) - errx(1, "duplicated InitiatorAlias at line %d", lineno + 1); + errx(1, "duplicated InitiatorAlias at line %d", lineno); target->t_initiator_alias = $3; } ; @@ -163,7 +163,7 @@ initiator_alias: INITIATOR_ALIAS EQUALS user: USER EQUALS STR { if (target->t_user != NULL) - errx(1, "duplicated chapIName at line %d", lineno + 1); + errx(1, "duplicated chapIName at line %d", lineno); target->t_user = $3; } ; @@ -171,7 +171,7 @@ user: USER EQUALS STR secret: SECRET EQUALS STR { if (target->t_secret != NULL) - errx(1, "duplicated chapSecret at line %d", lineno + 1); + errx(1, "duplicated chapSecret at line %d", lineno); target->t_secret = $3; } ; @@ -179,7 +179,7 @@ secret: SECRET EQUALS STR mutual_user: MUTUAL_USER EQUALS STR { if (target->t_mutual_user != NULL) - errx(1, "duplicated tgtChapName at line %d", lineno + 1); + errx(1, "duplicated tgtChapName at line %d", lineno); target->t_mutual_user = $3; } ; @@ -187,7 +187,7 @@ mutual_user: MUTUAL_USER EQUALS STR mutual_secret: MUTUAL_SECRET EQUALS STR { if (target->t_mutual_secret != NULL) - errx(1, "duplicated tgtChapSecret at line %d", lineno + 1); + errx(1, "duplicated tgtChapSecret at line %d", lineno); target->t_mutual_secret = $3; } ; @@ -195,76 +195,76 @@ mutual_secret: MUTUAL_SECRET EQUALS STR auth_method: AUTH_METHOD EQUALS STR { if (target->t_auth_method != AUTH_METHOD_UNSPECIFIED) - errx(1, "duplicated AuthMethod at line %d", lineno + 1); + errx(1, "duplicated AuthMethod at line %d", lineno); if (strcasecmp($3, "none") == 0) target->t_auth_method = AUTH_METHOD_NONE; else if (strcasecmp($3, "chap") == 0) target->t_auth_method = AUTH_METHOD_CHAP; else errx(1, "invalid AuthMethod at line %d; " - "must be either \"none\" or \"CHAP\"", lineno + 1); + "must be either \"none\" or \"CHAP\"", lineno); } ; header_digest: HEADER_DIGEST EQUALS STR { if (target->t_header_digest != DIGEST_UNSPECIFIED) - errx(1, "duplicated HeaderDigest at line %d", lineno + 1); + errx(1, "duplicated HeaderDigest at line %d", lineno); if (strcasecmp($3, "none") == 0) target->t_header_digest = DIGEST_NONE; else if (strcasecmp($3, "CRC32C") == 0) target->t_header_digest = DIGEST_CRC32C; else errx(1, "invalid HeaderDigest at line %d; " - "must be either \"none\" or \"CRC32C\"", lineno + 1); + "must be either \"none\" or \"CRC32C\"", lineno); } ; data_digest: DATA_DIGEST EQUALS STR { if (target->t_data_digest != DIGEST_UNSPECIFIED) - errx(1, "duplicated DataDigest at line %d", lineno + 1); + errx(1, "duplicated DataDigest at line %d", lineno); if (strcasecmp($3, "none") == 0) target->t_data_digest = DIGEST_NONE; else if (strcasecmp($3, "CRC32C") == 0) target->t_data_digest = DIGEST_CRC32C; else errx(1, "invalid DataDigest at line %d; " - "must be either \"none\" or \"CRC32C\"", lineno + 1); + "must be either \"none\" or \"CRC32C\"", lineno); } ; session_type: SESSION_TYPE EQUALS STR { if (target->t_session_type != SESSION_TYPE_UNSPECIFIED) - errx(1, "duplicated SessionType at line %d", lineno + 1); + errx(1, "duplicated SessionType at line %d", lineno); if (strcasecmp($3, "normal") == 0) target->t_session_type = SESSION_TYPE_NORMAL; else if (strcasecmp($3, "discovery") == 0) target->t_session_type = SESSION_TYPE_DISCOVERY; else errx(1, "invalid SessionType at line %d; " - "must be either \"normal\" or \"discovery\"", lineno + 1); + "must be either \"normal\" or \"discovery\"", lineno); } ; protocol: PROTOCOL EQUALS STR { if (target->t_protocol != PROTOCOL_UNSPECIFIED) - errx(1, "duplicated protocol at line %d", lineno + 1); + errx(1, "duplicated protocol at line %d", lineno); if (strcasecmp($3, "iscsi") == 0) target->t_protocol = PROTOCOL_ISCSI; else if (strcasecmp($3, "iser") == 0) target->t_protocol = PROTOCOL_ISER; else errx(1, "invalid protocol at line %d; " - "must be either \"iscsi\" or \"iser\"", lineno + 1); + "must be either \"iscsi\" or \"iser\"", lineno); } ; ignored: IGNORED EQUALS STR { - warnx("obsolete statement ignored at line %d", lineno + 1); + warnx("obsolete statement ignored at line %d", lineno); } ; @@ -275,7 +275,7 @@ yyerror(const char *str) { errx(1, "error in configuration file at line %d near '%s': %s", - lineno + 1, yytext, str); + lineno, yytext, str); } static void @@ -318,7 +318,7 @@ conf_new_from_file(const char *path) if (yyin == NULL) err(1, "unable to open configuration file %s", path); check_perms(path); - lineno = 0; + lineno = 1; yyrestart(yyin); error = yyparse(); assert(error == 0); From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 15:05:00 2014 Return-Path: Delivered-To: svn-src-all@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 19D0F88A; Mon, 10 Feb 2014 15:05: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 02466161D; Mon, 10 Feb 2014 15:05:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1AF4xGe072891; Mon, 10 Feb 2014 15:04:59 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1AF4xt0072886; Mon, 10 Feb 2014 15:04:59 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402101504.s1AF4xt0072886@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 10 Feb 2014 15:04:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261714 - head/usr.bin/iscsictl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 15:05:00 -0000 Author: trasz Date: Mon Feb 10 15:04:59 2014 New Revision: 261714 URL: http://svnweb.freebsd.org/changeset/base/261714 Log: Make iscsictl(8) properly handle (optional) semicolons in iscsi.conf, instead of ignoring them and echoing them to stdout. Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/iscsictl/parse.y head/usr.bin/iscsictl/token.l Modified: head/usr.bin/iscsictl/parse.y ============================================================================== --- head/usr.bin/iscsictl/parse.y Mon Feb 10 15:03:08 2014 (r261713) +++ head/usr.bin/iscsictl/parse.y Mon Feb 10 15:04:59 2014 (r261714) @@ -57,7 +57,7 @@ extern void yyrestart(FILE *); %token AUTH_METHOD HEADER_DIGEST DATA_DIGEST TARGET_NAME TARGET_ADDRESS %token INITIATOR_NAME INITIATOR_ADDRESS INITIATOR_ALIAS USER SECRET -%token MUTUAL_USER MUTUAL_SECRET SESSION_TYPE PROTOCOL IGNORED +%token MUTUAL_USER MUTUAL_SECRET SEMICOLON SESSION_TYPE PROTOCOL IGNORED %token EQUALS OPENING_BRACKET CLOSING_BRACKET %union @@ -86,6 +86,8 @@ target: STR OPENING_BRACKET target_entr target_entries: | target_entries target_entry + | + target_entries target_entry SEMICOLON ; target_entry: Modified: head/usr.bin/iscsictl/token.l ============================================================================== --- head/usr.bin/iscsictl/token.l Mon Feb 10 15:03:08 2014 (r261713) +++ head/usr.bin/iscsictl/token.l Mon Feb 10 15:04:59 2014 (r261714) @@ -87,7 +87,9 @@ chapDigest { return IGNORED; } \{ { return OPENING_BRACKET; } \} { return CLOSING_BRACKET; } = { return EQUALS; } +; { return SEMICOLON; } #.*$ /* ignore comments */; \n { lineno++; } [ \t]+ /* ignore whitespace */; +. { yylval.str = strdup(yytext); return STR; } %% From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 15:13:00 2014 Return-Path: Delivered-To: svn-src-all@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 50F86C60; Mon, 10 Feb 2014 15:13: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 395E116CB; Mon, 10 Feb 2014 15:13:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1AFD0ZU076995; Mon, 10 Feb 2014 15:13:00 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1AFD0vt076994; Mon, 10 Feb 2014 15:13:00 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402101513.s1AFD0vt076994@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 10 Feb 2014 15:13:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261715 - head/usr.sbin/iscsid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 15:13:00 -0000 Author: trasz Date: Mon Feb 10 15:12:59 2014 New Revision: 261715 URL: http://svnweb.freebsd.org/changeset/base/261715 Log: The log_whatever() routines don't accept NULL for format strings, so mark them as __printflike instead of __printf0like. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/iscsid/iscsid.h Modified: head/usr.sbin/iscsid/iscsid.h ============================================================================== --- head/usr.sbin/iscsid/iscsid.h Mon Feb 10 15:04:59 2014 (r261714) +++ head/usr.sbin/iscsid/iscsid.h Mon Feb 10 15:12:59 2014 (r261715) @@ -106,12 +106,12 @@ void log_init(int level); void log_set_peer_name(const char *name); void log_set_peer_addr(const char *addr); void log_err(int, const char *, ...) - __dead2 __printf0like(2, 3); + __dead2 __printflike(2, 3); void log_errx(int, const char *, ...) - __dead2 __printf0like(2, 3); -void log_warn(const char *, ...) __printf0like(1, 2); + __dead2 __printflike(2, 3); +void log_warn(const char *, ...) __printflike(1, 2); void log_warnx(const char *, ...) __printflike(1, 2); -void log_debugx(const char *, ...) __printf0like(1, 2); +void log_debugx(const char *, ...) __printflike(1, 2); char *checked_strdup(const char *); bool timed_out(void); From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 15:23:41 2014 Return-Path: Delivered-To: svn-src-all@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 627B528F; Mon, 10 Feb 2014 15:23:41 +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 4BEAA17A9; Mon, 10 Feb 2014 15:23:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1AFNf8A080995; Mon, 10 Feb 2014 15:23:41 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1AFNfWx080994; Mon, 10 Feb 2014 15:23:41 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201402101523.s1AFNfWx080994@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 10 Feb 2014 15:23:41 +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: r261716 - stable/10/sys/netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 15:23:41 -0000 Author: ae Date: Mon Feb 10 15:23:40 2014 New Revision: 261716 URL: http://svnweb.freebsd.org/changeset/base/261716 Log: MFC r261400: Take exclusive lock only when lle isn't NULL. We don't need write access to lle in most cases. MFC r261583: Unlock entry before retry. Sponsored by: Yandex LLC Modified: stable/10/sys/netinet6/nd6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/nd6.c ============================================================================== --- stable/10/sys/netinet6/nd6.c Mon Feb 10 15:12:59 2014 (r261715) +++ stable/10/sys/netinet6/nd6.c Mon Feb 10 15:23:40 2014 (r261716) @@ -1888,7 +1888,7 @@ nd6_output_lle(struct ifnet *ifp, struct * or an anycast address(i.e. not a multicast). */ - flags = ((m != NULL) || (lle != NULL)) ? LLE_EXCLUSIVE : 0; + flags = (lle != NULL) ? LLE_EXCLUSIVE : 0; if (ln == NULL) { retry: IF_AFDATA_RLOCK(ifp); @@ -1924,6 +1924,7 @@ nd6_output_lle(struct ifnet *ifp, struct ln->ln_state < ND6_LLINFO_REACHABLE) { if ((flags & LLE_EXCLUSIVE) == 0) { flags |= LLE_EXCLUSIVE; + LLE_RUNLOCK(ln); goto retry; } ln->ln_state = ND6_LLINFO_STALE; From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 16:13:46 2014 Return-Path: Delivered-To: svn-src-all@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 1C2A52AA; Mon, 10 Feb 2014 16:13: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 05A3A1BFB; Mon, 10 Feb 2014 16:13:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1AGDjAH099775; Mon, 10 Feb 2014 16:13:45 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1AGDj4X099774; Mon, 10 Feb 2014 16:13:45 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201402101613.s1AGDj4X099774@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 10 Feb 2014 16:13:45 +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: r261717 - stable/9/sys/netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 16:13:46 -0000 Author: ae Date: Mon Feb 10 16:13:45 2014 New Revision: 261717 URL: http://svnweb.freebsd.org/changeset/base/261717 Log: MFC r261400: Take exclusive lock only when lle isn't NULL. We don't need write access to lle in most cases. MFC r261583: Unlock entry before retry. Sponsored by: Yandex LLC Modified: stable/9/sys/netinet6/nd6.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet6/nd6.c ============================================================================== --- stable/9/sys/netinet6/nd6.c Mon Feb 10 15:23:40 2014 (r261716) +++ stable/9/sys/netinet6/nd6.c Mon Feb 10 16:13:45 2014 (r261717) @@ -1895,7 +1895,7 @@ nd6_output_lle(struct ifnet *ifp, struct * or an anycast address(i.e. not a multicast). */ - flags = ((m != NULL) || (lle != NULL)) ? LLE_EXCLUSIVE : 0; + flags = (lle != NULL) ? LLE_EXCLUSIVE : 0; if (ln == NULL) { retry: IF_AFDATA_RLOCK(ifp); @@ -1931,6 +1931,7 @@ nd6_output_lle(struct ifnet *ifp, struct ln->ln_state < ND6_LLINFO_REACHABLE) { if ((flags & LLE_EXCLUSIVE) == 0) { flags |= LLE_EXCLUSIVE; + LLE_RUNLOCK(ln); goto retry; } ln->ln_state = ND6_LLINFO_STALE; From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 16:29:51 2014 Return-Path: Delivered-To: svn-src-all@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 5E7097B2; Mon, 10 Feb 2014 16:29: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 47F861D3A; Mon, 10 Feb 2014 16:29:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1AGTpHp004453; Mon, 10 Feb 2014 16:29:51 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1AGTptJ004452; Mon, 10 Feb 2014 16:29:51 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201402101629.s1AGTptJ004452@svn.freebsd.org> From: Alexander Motin Date: Mon, 10 Feb 2014 16:29:51 +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: r261718 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 16:29:51 -0000 Author: mav Date: Mon Feb 10 16:29:50 2014 New Revision: 261718 URL: http://svnweb.freebsd.org/changeset/base/261718 Log: MFC r261515: Fix I/O freezes in some cases, caused by r257916. Delaying isp_reqodx update, we should be ready to update it every time we read it. Otherwise requests using several indexes may be requeued ndefinitely without ever updating the variable. Modified: stable/10/sys/dev/isp/isp_library.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp_library.c ============================================================================== --- stable/10/sys/dev/isp/isp_library.c Mon Feb 10 16:13:45 2014 (r261717) +++ stable/10/sys/dev/isp/isp_library.c Mon Feb 10 16:29:50 2014 (r261718) @@ -144,7 +144,9 @@ isp_send_cmd(ispsoftc_t *isp, void *fqe, while (seg < nsegs) { nxtnxt = ISP_NXT_QENTRY(nxt, RQUEST_QUEUE_LEN(isp)); if (nxtnxt == isp->isp_reqodx) { - return (CMD_EAGAIN); + isp->isp_reqodx = ISP_READ(isp, isp->isp_rqstoutrp); + if (nxtnxt == isp->isp_reqodx) + return (CMD_EAGAIN); } ISP_MEMZERO(storage, QENTRY_LEN); qe1 = ISP_QUEUE_ENTRY(isp->isp_rquest, nxt); @@ -2210,7 +2212,9 @@ isp_send_tgt_cmd(ispsoftc_t *isp, void * while (seg < nsegs) { nxtnxt = ISP_NXT_QENTRY(nxt, RQUEST_QUEUE_LEN(isp)); if (nxtnxt == isp->isp_reqodx) { - return (CMD_EAGAIN); + isp->isp_reqodx = ISP_READ(isp, isp->isp_rqstoutrp); + if (nxtnxt == isp->isp_reqodx) + return (CMD_EAGAIN); } ISP_MEMZERO(storage, QENTRY_LEN); qe1 = ISP_QUEUE_ENTRY(isp->isp_rquest, nxt); From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 16:40:14 2014 Return-Path: Delivered-To: svn-src-all@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 89CA9C83; Mon, 10 Feb 2014 16:40:14 +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 759231E2E; Mon, 10 Feb 2014 16:40:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1AGeE75008659; Mon, 10 Feb 2014 16:40:14 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1AGeEl6008658; Mon, 10 Feb 2014 16:40:14 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201402101640.s1AGeEl6008658@svn.freebsd.org> From: Alexander Motin Date: Mon, 10 Feb 2014 16:40:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261719 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 16:40:14 -0000 Author: mav Date: Mon Feb 10 16:40:13 2014 New Revision: 261719 URL: http://svnweb.freebsd.org/changeset/base/261719 Log: Fix wrong device name in example. PR: docs/185602 Submitted by: koitsu MFC after: 1 week Modified: head/share/man/man4/scsi.4 Modified: head/share/man/man4/scsi.4 ============================================================================== --- head/share/man/man4/scsi.4 Mon Feb 10 16:29:50 2014 (r261718) +++ head/share/man/man4/scsi.4 Mon Feb 10 16:40:13 2014 (r261719) @@ -195,7 +195,7 @@ hint.scbus.0.bus="1" This assigns .Nm bus 0 to the bus 1 instance on -.Em ahc0 . +.Em ahc1 . Peripheral drivers can be wired to a specific bus, target, and lun as so: .Bd -literal -offset indent hint.da.0.at="scbus0" From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 17:37:34 2014 Return-Path: Delivered-To: svn-src-all@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 C80DE60D; Mon, 10 Feb 2014 17:37: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 B258414E3; Mon, 10 Feb 2014 17:37:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1AHbYaL032356; Mon, 10 Feb 2014 17:37:34 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1AHbYLt032355; Mon, 10 Feb 2014 17:37:34 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201402101737.s1AHbYLt032355@svn.freebsd.org> From: Warren Block Date: Mon, 10 Feb 2014 17:37:34 +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: r261720 - stable/10/sys/boot/i386/gptboot X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 17:37:34 -0000 Author: wblock (doc committer) Date: Mon Feb 10 17:37:34 2014 New Revision: 261720 URL: http://svnweb.freebsd.org/changeset/base/261720 Log: MFC r261522: Describe the use of a freebsd-boot GPT partition, brought up by Scot Hetzel on the -doc mailing list. Also modify the Author section to be clear that I wrote the man page, not gptboot. Modified: stable/10/sys/boot/i386/gptboot/gptboot.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/i386/gptboot/gptboot.8 ============================================================================== --- stable/10/sys/boot/i386/gptboot/gptboot.8 Mon Feb 10 16:40:13 2014 (r261719) +++ stable/10/sys/boot/i386/gptboot/gptboot.8 Mon Feb 10 17:37:34 2014 (r261720) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 3, 2013 +.Dd February 5, 2014 .Dt GPTBOOT 8 .Os .Sh NAME @@ -190,12 +190,18 @@ parameters for the boot blocks .El .Sh EXAMPLES .Nm -is typically installed in combination with a +is installed in a +.Cm freebsd-boot +partition, usually the first partition on the disk. +A .Dq protective MBR .Po see .Xr gpart 8 -.Pc . +.Pc +is typically installed in combination with +.Nm . +.Pp Install .Nm on the @@ -235,4 +241,5 @@ gpart set -a bootonce -i 2 ada0 .Nm appeared in FreeBSD 7.1. .Sh AUTHORS -Warren Block +.An +This manual page written by Warren Block . From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 17:41:41 2014 Return-Path: Delivered-To: svn-src-all@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 4F78786A; Mon, 10 Feb 2014 17:41:41 +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 3A3C01583; Mon, 10 Feb 2014 17:41:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1AHffLt035538; Mon, 10 Feb 2014 17:41:41 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1AHffD0035537; Mon, 10 Feb 2014 17:41:41 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201402101741.s1AHffD0035537@svn.freebsd.org> From: Warren Block Date: Mon, 10 Feb 2014 17:41: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: r261721 - stable/9/sys/boot/i386/gptboot X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 17:41:41 -0000 Author: wblock (doc committer) Date: Mon Feb 10 17:41:40 2014 New Revision: 261721 URL: http://svnweb.freebsd.org/changeset/base/261721 Log: MFC r261522: Describe the use of a freebsd-boot GPT partition, brought up by Scot Hetzel on the -doc mailing list. Also modify the Author section to be clear that I wrote the man page, not gptboot. Modified: stable/9/sys/boot/i386/gptboot/gptboot.8 Directory Properties: stable/9/sys/boot/i386/gptboot/ (props changed) Modified: stable/9/sys/boot/i386/gptboot/gptboot.8 ============================================================================== --- stable/9/sys/boot/i386/gptboot/gptboot.8 Mon Feb 10 17:37:34 2014 (r261720) +++ stable/9/sys/boot/i386/gptboot/gptboot.8 Mon Feb 10 17:41:40 2014 (r261721) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 3, 2013 +.Dd February 5, 2014 .Dt GPTBOOT 8 .Os .Sh NAME @@ -190,12 +190,18 @@ parameters for the boot blocks .El .Sh EXAMPLES .Nm -is typically installed in combination with a +is installed in a +.Cm freebsd-boot +partition, usually the first partition on the disk. +A .Dq protective MBR .Po see .Xr gpart 8 -.Pc . +.Pc +is typically installed in combination with +.Nm . +.Pp Install .Nm on the @@ -235,4 +241,5 @@ gpart set -a bootonce -i 2 ada0 .Nm appeared in FreeBSD 7.1. .Sh AUTHORS -Warren Block +.An +This manual page written by Warren Block . From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 19:47:15 2014 Return-Path: Delivered-To: svn-src-all@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 04313CDD; Mon, 10 Feb 2014 19:47: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 E3F42117C; Mon, 10 Feb 2014 19:47:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1AJlESn083761; Mon, 10 Feb 2014 19:47:14 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1AJlE9Q083760; Mon, 10 Feb 2014 19:47:14 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201402101947.s1AJlE9Q083760@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 10 Feb 2014 19:47:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261722 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 19:47:15 -0000 Author: glebius Date: Mon Feb 10 19:47:14 2014 New Revision: 261722 URL: http://svnweb.freebsd.org/changeset/base/261722 Log: Add zpcpu_get_cpu() that converts base pointer of UMA_ZPCPU_ZONE to a pointer private to a given cpuid. Sponsored by: Nginx, Inc. Modified: head/sys/sys/pcpu.h Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Mon Feb 10 17:41:40 2014 (r261721) +++ head/sys/sys/pcpu.h Mon Feb 10 19:47:14 2014 (r261722) @@ -210,6 +210,13 @@ zpcpu_get(void *base) return ((char *)(base) + sizeof(struct pcpu) * curcpu); } +static inline void * +zpcpu_get_cpu(void *base, int cpu) +{ + + return ((char *)(base) + sizeof(struct pcpu) * cpu); +} + /* * Machine dependent callouts. cpu_pcpu_init() is responsible for * initializing machine dependent fields of struct pcpu, and From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 19:48:26 2014 Return-Path: Delivered-To: svn-src-all@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 C503FE7F; Mon, 10 Feb 2014 19:48:26 +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 B0C0B11A0; Mon, 10 Feb 2014 19:48:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1AJmQFb083934; Mon, 10 Feb 2014 19:48:26 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1AJmQZb083933; Mon, 10 Feb 2014 19:48:26 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201402101948.s1AJmQZb083933@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 10 Feb 2014 19:48:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261723 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 19:48:26 -0000 Author: glebius Date: Mon Feb 10 19:48:26 2014 New Revision: 261723 URL: http://svnweb.freebsd.org/changeset/base/261723 Log: Make M_ZERO flag work correctly on UMA_ZONE_PCPU zones. Sponsored by: Nginx, Inc. Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Mon Feb 10 19:47:14 2014 (r261722) +++ head/sys/vm/uma_core.c Mon Feb 10 19:48:26 2014 (r261723) @@ -267,6 +267,7 @@ static uma_keg_t uma_kcreate(uma_zone_t uma_fini fini, int align, uint32_t flags); static int zone_import(uma_zone_t zone, void **bucket, int max, int flags); static void zone_release(uma_zone_t zone, void **bucket, int cnt); +static void uma_zero_item(void *item, uma_zone_t zone); void uma_print_zone(uma_zone_t); void uma_print_stats(void); @@ -2170,7 +2171,7 @@ zalloc_start: uma_dbg_alloc(zone, NULL, item); #endif if (flags & M_ZERO) - bzero(item, zone->uz_size); + uma_zero_item(item, zone); return (item); } @@ -2620,7 +2621,7 @@ zone_alloc_item(uma_zone_t zone, void *u uma_dbg_alloc(zone, NULL, item); #endif if (flags & M_ZERO) - bzero(item, zone->uz_size); + uma_zero_item(item, zone); return (item); @@ -3237,6 +3238,17 @@ uma_large_free(uma_slab_t slab) zone_free_item(slabzone, slab, NULL, SKIP_NONE); } +static void +uma_zero_item(void *item, uma_zone_t zone) +{ + + if (zone->uz_flags & UMA_ZONE_PCPU) { + for (int i = 0; i < mp_ncpus; i++) + bzero(zpcpu_get_cpu(item, i), zone->uz_size); + } else + bzero(item, zone->uz_size); +} + void uma_print_stats(void) { From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 19:51:15 2014 Return-Path: Delivered-To: svn-src-all@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 ED0617C; Mon, 10 Feb 2014 19:51: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 D90A51218; Mon, 10 Feb 2014 19:51:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1AJpFwC086900; Mon, 10 Feb 2014 19:51:15 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1AJpFTM086899; Mon, 10 Feb 2014 19:51:15 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201402101951.s1AJpFTM086899@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 10 Feb 2014 19:51:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261724 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 19:51:16 -0000 Author: glebius Date: Mon Feb 10 19:51:15 2014 New Revision: 261724 URL: http://svnweb.freebsd.org/changeset/base/261724 Log: Style. Modified: head/sys/vm/uma.h Modified: head/sys/vm/uma.h ============================================================================== --- head/sys/vm/uma.h Mon Feb 10 19:48:26 2014 (r261723) +++ head/sys/vm/uma.h Mon Feb 10 19:51:15 2014 (r261724) @@ -33,8 +33,8 @@ * */ -#ifndef VM_UMA_H -#define VM_UMA_H +#ifndef _VM_UMA_H_ +#define _VM_UMA_H_ #include /* For NULL */ #include /* For M_* */ @@ -683,4 +683,4 @@ struct uma_percpu_stat { uint64_t _ups_reserved[5]; /* Reserved. */ }; -#endif +#endif /* _VM_UMA_H_ */ From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 19:59:47 2014 Return-Path: Delivered-To: svn-src-all@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 6995C370; Mon, 10 Feb 2014 19:59: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 54E33127C; Mon, 10 Feb 2014 19:59:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1AJxlLl087809; Mon, 10 Feb 2014 19:59:47 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1AJxk0U087806; Mon, 10 Feb 2014 19:59:46 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201402101959.s1AJxk0U087806@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 10 Feb 2014 19:59:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261725 - in head/sys: kern vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 19:59:47 -0000 Author: glebius Date: Mon Feb 10 19:59:46 2014 New Revision: 261725 URL: http://svnweb.freebsd.org/changeset/base/261725 Log: Create two public UMA_ZONE_PCPU zones: 64 bit sized and pointer sized. Sponsored by: Nginx, Inc. Modified: head/sys/kern/subr_counter.c head/sys/kern/subr_pcpu.c head/sys/vm/uma.h Modified: head/sys/kern/subr_counter.c ============================================================================== --- head/sys/kern/subr_counter.c Mon Feb 10 19:51:15 2014 (r261724) +++ head/sys/kern/subr_counter.c Mon Feb 10 19:59:46 2014 (r261725) @@ -41,8 +41,6 @@ __FBSDID("$FreeBSD$"); #define IN_SUBR_COUNTER_C #include -static uma_zone_t uint64_pcpu_zone; - void counter_u64_zero(counter_u64_t c) { @@ -62,7 +60,7 @@ counter_u64_alloc(int flags) { counter_u64_t r; - r = uma_zalloc(uint64_pcpu_zone, flags); + r = uma_zalloc(pcpu_zone_64, flags); if (r != NULL) counter_u64_zero(r); @@ -73,7 +71,7 @@ void counter_u64_free(counter_u64_t c) { - uma_zfree(uint64_pcpu_zone, c); + uma_zfree(pcpu_zone_64, c); } int @@ -96,12 +94,3 @@ sysctl_handle_counter_u64(SYSCTL_HANDLER return (0); } - -static void -counter_startup(void) -{ - - uint64_pcpu_zone = uma_zcreate("uint64 pcpu", sizeof(uint64_t), - NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_PCPU); -} -SYSINIT(counter, SI_SUB_KMEM, SI_ORDER_ANY, counter_startup, NULL); Modified: head/sys/kern/subr_pcpu.c ============================================================================== --- head/sys/kern/subr_pcpu.c Mon Feb 10 19:51:15 2014 (r261724) +++ head/sys/kern/subr_pcpu.c Mon Feb 10 19:59:46 2014 (r261725) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include static MALLOC_DEFINE(M_PCPU, "Per-cpu", "Per-cpu resource accouting."); @@ -127,6 +128,30 @@ dpcpu_startup(void *dummy __unused) SYSINIT(dpcpu, SI_SUB_KLD, SI_ORDER_FIRST, dpcpu_startup, 0); /* + * UMA_PCPU_ZONE zones, that are available for all kernel + * consumers. Right now 64 bit zone is used for counter(9) + * and pointer zone is used by flowtable. + */ + +uma_zone_t pcpu_zone_64; +uma_zone_t pcpu_zone_ptr; + +static void +pcpu_zones_startup(void) +{ + + pcpu_zone_64 = uma_zcreate("64 pcpu", sizeof(uint64_t), + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_PCPU); + + if (sizeof(uint64_t) == sizeof(void *)) + pcpu_zone_ptr = pcpu_zone_64; + else + pcpu_zone_ptr = uma_zcreate("ptr pcpu", sizeof(void *), + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_PCPU); +} +SYSINIT(pcpu_zones, SI_SUB_KMEM, SI_ORDER_ANY, pcpu_zones_startup, NULL); + +/* * First-fit extent based allocator for allocating space in the per-cpu * region reserved for modules. This is only intended for use by the * kernel linkers to place module linker sets. Modified: head/sys/vm/uma.h ============================================================================== --- head/sys/vm/uma.h Mon Feb 10 19:51:15 2014 (r261724) +++ head/sys/vm/uma.h Mon Feb 10 19:59:46 2014 (r261725) @@ -636,6 +636,12 @@ int uma_zone_exhausted(uma_zone_t zone); int uma_zone_exhausted_nolock(uma_zone_t zone); /* + * Common UMA_ZONE_PCPU zones. + */ +extern uma_zone_t pcpu_zone_64; +extern uma_zone_t pcpu_zone_ptr; + +/* * Exported statistics structures to be used by user space monitoring tools. * Statistics stream consists of a uma_stream_header, followed by a series of * alternative uma_type_header and uma_type_stat structures. From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 20:09:11 2014 Return-Path: Delivered-To: svn-src-all@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 B72A9829; Mon, 10 Feb 2014 20:09:11 +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 9E1B41368; Mon, 10 Feb 2014 20:09:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1AK9B2U092180; Mon, 10 Feb 2014 20:09:11 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1AK9Amt092172; Mon, 10 Feb 2014 20:09:10 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201402102009.s1AK9Amt092172@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 10 Feb 2014 20:09:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261726 - head/lib/libmemstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 20:09:11 -0000 Author: glebius Date: Mon Feb 10 20:09:10 2014 New Revision: 261726 URL: http://svnweb.freebsd.org/changeset/base/261726 Log: Expose real size of UMA allocations via libmemstat(3). Sponsored by: Nginx, Inc. Modified: head/lib/libmemstat/libmemstat.3 head/lib/libmemstat/memstat.c head/lib/libmemstat/memstat.h head/lib/libmemstat/memstat_internal.h head/lib/libmemstat/memstat_uma.c Modified: head/lib/libmemstat/libmemstat.3 ============================================================================== --- head/lib/libmemstat/libmemstat.3 Mon Feb 10 19:59:46 2014 (r261725) +++ head/lib/libmemstat/libmemstat.3 Mon Feb 10 20:09:10 2014 (r261726) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 25, 2012 +.Dd February 11, 2014 .Dt LIBMEMSTAT 3 .Os .Sh NAME @@ -80,6 +80,8 @@ .Ft uint64_t .Fn memstat_get_size "const struct memory_type *mtp" .Ft uint64_t +.Fn memstat_get_rsize "const struct memory_type *mtp" +.Ft uint64_t .Fn memstat_get_memalloced "const struct memory_type *mtp" .Ft uint64_t .Fn memstat_get_memfreed "const struct memory_type *mtp" @@ -287,6 +289,11 @@ If the memory type supports variable all sizes allocated for the memory type. .It Fn memstat_get_size If the memory type supports a fixed allocation size, return that size. +.It Fn memstat_get_rsize +If the memory type supports a fixed allocation size, return real size +of an allocation. +Real size can exceed requested size due to alignment constraints or +implicit padding. .It Fn memstat_get_memalloced Return the total number of bytes allocated for the memory type over its lifetime. Modified: head/lib/libmemstat/memstat.c ============================================================================== --- head/lib/libmemstat/memstat.c Mon Feb 10 19:59:46 2014 (r261725) +++ head/lib/libmemstat/memstat.c Mon Feb 10 20:09:10 2014 (r261726) @@ -254,6 +254,13 @@ memstat_get_size(const struct memory_typ } uint64_t +memstat_get_rsize(const struct memory_type *mtp) +{ + + return (mtp->mt_rsize); +} + +uint64_t memstat_get_memalloced(const struct memory_type *mtp) { Modified: head/lib/libmemstat/memstat.h ============================================================================== --- head/lib/libmemstat/memstat.h Mon Feb 10 19:59:46 2014 (r261725) +++ head/lib/libmemstat/memstat.h Mon Feb 10 20:09:10 2014 (r261726) @@ -124,6 +124,7 @@ uint64_t memstat_get_countlimit(const s uint64_t memstat_get_byteslimit(const struct memory_type *mtp); uint64_t memstat_get_sizemask(const struct memory_type *mtp); uint64_t memstat_get_size(const struct memory_type *mtp); +uint64_t memstat_get_rsize(const struct memory_type *mtp); uint64_t memstat_get_memalloced(const struct memory_type *mtp); uint64_t memstat_get_memfreed(const struct memory_type *mtp); uint64_t memstat_get_numallocs(const struct memory_type *mtp); Modified: head/lib/libmemstat/memstat_internal.h ============================================================================== --- head/lib/libmemstat/memstat_internal.h Mon Feb 10 19:59:46 2014 (r261725) +++ head/lib/libmemstat/memstat_internal.h Mon Feb 10 20:09:10 2014 (r261726) @@ -51,6 +51,7 @@ struct memory_type { uint64_t mt_byteslimit; /* 0, or maximum bytes. */ uint64_t mt_sizemask; /* malloc: allocated size bitmask. */ uint64_t mt_size; /* uma: size of objects. */ + uint64_t mt_rsize; /* uma: real size of objects. */ /* * Zone or type information that includes all caches and any central Modified: head/lib/libmemstat/memstat_uma.c ============================================================================== --- head/lib/libmemstat/memstat_uma.c Mon Feb 10 19:59:46 2014 (r261725) +++ head/lib/libmemstat/memstat_uma.c Mon Feb 10 20:09:10 2014 (r261726) @@ -212,6 +212,7 @@ retry: } mtp->mt_size = uthp->uth_size; + mtp->mt_rsize = uthp->uth_rsize; mtp->mt_memalloced = mtp->mt_numallocs * uthp->uth_size; mtp->mt_memfreed = mtp->mt_numfrees * uthp->uth_size; mtp->mt_bytes = mtp->mt_memalloced - mtp->mt_memfreed; @@ -435,6 +436,7 @@ memstat_kvm_uma(struct memory_type_list } skip_percpu: mtp->mt_size = kz.uk_size; + mtp->mt_rsize = kz.uk_rsize; mtp->mt_memalloced = mtp->mt_numallocs * mtp->mt_size; mtp->mt_memfreed = mtp->mt_numfrees * mtp->mt_size; mtp->mt_bytes = mtp->mt_memalloced - mtp->mt_memfreed; From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 20:25:41 2014 Return-Path: Delivered-To: svn-src-all@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 2B035E40; Mon, 10 Feb 2014 20:25:41 +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 146761585; Mon, 10 Feb 2014 20:25:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1AKPe0a099901; Mon, 10 Feb 2014 20:25:40 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1AKPewB099900; Mon, 10 Feb 2014 20:25:40 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201402102025.s1AKPewB099900@svn.freebsd.org> From: Dimitry Andric Date: Mon, 10 Feb 2014 20:25:40 +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: r261727 - in stable: 10/contrib/libcxxrt 9/contrib/libcxxrt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 20:25:41 -0000 Author: dim Date: Mon Feb 10 20:25:40 2014 New Revision: 261727 URL: http://svnweb.freebsd.org/changeset/base/261727 Log: MFC r261609: Pull in upstream libcxxrt commit 8006101, which makes its cxxabi.h file compilable just by itself. PR: kern/184019 Modified: stable/10/contrib/libcxxrt/cxxabi.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/contrib/libcxxrt/cxxabi.h Directory Properties: stable/9/ (props changed) stable/9/contrib/libcxxrt/ (props changed) Modified: stable/10/contrib/libcxxrt/cxxabi.h ============================================================================== --- stable/10/contrib/libcxxrt/cxxabi.h Mon Feb 10 20:09:10 2014 (r261726) +++ stable/10/contrib/libcxxrt/cxxabi.h Mon Feb 10 20:25:40 2014 (r261727) @@ -22,6 +22,7 @@ #ifndef __CXXABI_H_ #define __CXXABI_H_ +#include #include #include "unwind.h" namespace std From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 20:25:40 2014 Return-Path: Delivered-To: svn-src-all@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 C8E43E3F; Mon, 10 Feb 2014 20:25:40 +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 B37961584; Mon, 10 Feb 2014 20:25:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1AKPebN099894; Mon, 10 Feb 2014 20:25:40 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1AKPeSL099893; Mon, 10 Feb 2014 20:25:40 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201402102025.s1AKPeSL099893@svn.freebsd.org> From: Dimitry Andric Date: Mon, 10 Feb 2014 20:25:40 +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: r261727 - in stable: 10/contrib/libcxxrt 9/contrib/libcxxrt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 20:25:40 -0000 Author: dim Date: Mon Feb 10 20:25:40 2014 New Revision: 261727 URL: http://svnweb.freebsd.org/changeset/base/261727 Log: MFC r261609: Pull in upstream libcxxrt commit 8006101, which makes its cxxabi.h file compilable just by itself. PR: kern/184019 Modified: stable/9/contrib/libcxxrt/cxxabi.h Directory Properties: stable/9/ (props changed) stable/9/contrib/libcxxrt/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/libcxxrt/cxxabi.h Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/libcxxrt/cxxabi.h ============================================================================== --- stable/9/contrib/libcxxrt/cxxabi.h Mon Feb 10 20:09:10 2014 (r261726) +++ stable/9/contrib/libcxxrt/cxxabi.h Mon Feb 10 20:25:40 2014 (r261727) @@ -22,6 +22,7 @@ #ifndef __CXXABI_H_ #define __CXXABI_H_ +#include #include #include "unwind.h" namespace std From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 22:16:23 2014 Return-Path: Delivered-To: svn-src-all@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 92D4C22D; Mon, 10 Feb 2014 22:16: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 7B3AA1FAC; Mon, 10 Feb 2014 22:16:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1AMGNth043486; Mon, 10 Feb 2014 22:16:23 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1AMGNbw043485; Mon, 10 Feb 2014 22:16:23 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402102216.s1AMGNbw043485@svn.freebsd.org> From: Christian Brueffer Date: Mon, 10 Feb 2014 22:16: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: r261729 - stable/10/lib/libc/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-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 22:16:23 -0000 Author: brueffer Date: Mon Feb 10 22:16:22 2014 New Revision: 261729 URL: http://svnweb.freebsd.org/changeset/base/261729 Log: MFC: r261447 Fix a typo. Modified: stable/10/lib/libc/sys/cap_enter.2 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/cap_enter.2 ============================================================================== --- stable/10/lib/libc/sys/cap_enter.2 Mon Feb 10 21:20:42 2014 (r261728) +++ stable/10/lib/libc/sys/cap_enter.2 Mon Feb 10 22:16:22 2014 (r261729) @@ -52,7 +52,7 @@ Access to global name spaces, such as fi prevented. If the process is already in a capability mode sandbox, the system call is a no-op. -Future process descendants create with +Future process descendants created with .Xr fork 2 or .Xr pdfork 2 From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 22:21:23 2014 Return-Path: Delivered-To: svn-src-all@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 3939651C; Mon, 10 Feb 2014 22:21: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 215CC1081; Mon, 10 Feb 2014 22:21:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1AMLMcw046693; Mon, 10 Feb 2014 22:21:23 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1AMLMRO046692; Mon, 10 Feb 2014 22:21:22 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402102221.s1AMLMRO046692@svn.freebsd.org> From: Christian Brueffer Date: Mon, 10 Feb 2014 22:21:22 +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: r261730 - stable/9/lib/libc/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-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 22:21:23 -0000 Author: brueffer Date: Mon Feb 10 22:21:22 2014 New Revision: 261730 URL: http://svnweb.freebsd.org/changeset/base/261730 Log: MFC: r261447 Fix a typo. Modified: stable/9/lib/libc/sys/cap_enter.2 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Modified: stable/9/lib/libc/sys/cap_enter.2 ============================================================================== --- stable/9/lib/libc/sys/cap_enter.2 Mon Feb 10 22:16:22 2014 (r261729) +++ stable/9/lib/libc/sys/cap_enter.2 Mon Feb 10 22:21:22 2014 (r261730) @@ -52,7 +52,7 @@ Access to global name spaces, such as fi prevented. If the process is already in a capability mode sandbox, the system call is a no-op. -Future process descendants create with +Future process descendants created with .Xr fork 2 or .Xr pdfork 2 From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 22:24:49 2014 Return-Path: Delivered-To: svn-src-all@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 E3933757; Mon, 10 Feb 2014 22:24: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 CC5CC10A9; Mon, 10 Feb 2014 22:24:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1AMOnEf047132; Mon, 10 Feb 2014 22:24:49 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1AMOnis047131; Mon, 10 Feb 2014 22:24:49 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402102224.s1AMOnis047131@svn.freebsd.org> From: Christian Brueffer Date: Mon, 10 Feb 2014 22:24:49 +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: r261731 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 22:24:50 -0000 Author: brueffer Date: Mon Feb 10 22:24:49 2014 New Revision: 261731 URL: http://svnweb.freebsd.org/changeset/base/261731 Log: MFC: r261339 MLINK ixgbe.4 to {if_ix.4, ix.4}. An update for ixgbe.4 which deals with the "ix prefix being shared by two drivers" situation is forthcoming. Modified: stable/10/share/man/man4/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Mon Feb 10 22:21:22 2014 (r261730) +++ stable/10/share/man/man4/Makefile Mon Feb 10 22:24:49 2014 (r261731) @@ -635,6 +635,8 @@ MLINKS+=ipw.4 if_ipw.4 MLINKS+=iwi.4 if_iwi.4 MLINKS+=iwn.4 if_iwn.4 MLINKS+=ixgb.4 if_ixgb.4 +MLINKS+=ixgbe.4 ix.4 +MLINKS+=ixgbe.4 if_ix.4 MLINKS+=ixgbe.4 if_ixgbe.4 MLINKS+=jme.4 if_jme.4 MLINKS+=kue.4 if_kue.4 From owner-svn-src-all@FreeBSD.ORG Mon Feb 10 22:27:40 2014 Return-Path: Delivered-To: svn-src-all@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 D61158BA; Mon, 10 Feb 2014 22:27:40 +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 B98FF10BC; Mon, 10 Feb 2014 22:27:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1AMReWM047501; Mon, 10 Feb 2014 22:27:40 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1AMRexg047500; Mon, 10 Feb 2014 22:27:40 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402102227.s1AMRexg047500@svn.freebsd.org> From: Christian Brueffer Date: Mon, 10 Feb 2014 22:27:40 +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: r261732 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Feb 2014 22:27:40 -0000 Author: brueffer Date: Mon Feb 10 22:27:40 2014 New Revision: 261732 URL: http://svnweb.freebsd.org/changeset/base/261732 Log: MFC: r261339 MLINK ixgbe.4 to {if_ix.4, ix.4}. An update for ixgbe.4 which deals with the "ix prefix being shared by two drivers" situation is forthcoming. Modified: stable/9/share/man/man4/Makefile Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Mon Feb 10 22:24:49 2014 (r261731) +++ stable/9/share/man/man4/Makefile Mon Feb 10 22:27:40 2014 (r261732) @@ -613,6 +613,8 @@ MLINKS+=ipw.4 if_ipw.4 MLINKS+=iwi.4 if_iwi.4 MLINKS+=iwn.4 if_iwn.4 MLINKS+=ixgb.4 if_ixgb.4 +MLINKS+=ixgbe.4 ix.4 +MLINKS+=ixgbe.4 if_ix.4 MLINKS+=ixgbe.4 if_ixgbe.4 MLINKS+=jme.4 if_jme.4 MLINKS+=kue.4 if_kue.4 From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 01:07:58 2014 Return-Path: Delivered-To: svn-src-all@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 7DDC5243; Tue, 11 Feb 2014 01:07:58 +0000 (UTC) Received: from m2.gritton.org (gritton.org [199.192.164.235]) (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 4F3D51E1C; Tue, 11 Feb 2014 01:07:57 +0000 (UTC) Received: from [192.168.0.34] (c-50-168-192-61.hsd1.ut.comcast.net [50.168.192.61]) (authenticated bits=0) by m2.gritton.org (8.14.7/8.14.7) with ESMTP id s1B17hHn006615; Mon, 10 Feb 2014 18:07:43 -0700 (MST) (envelope-from jamie@freebsd.org) Message-ID: <52F977D9.5010200@freebsd.org> Date: Mon, 10 Feb 2014 18:07:37 -0700 From: James Gritton User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: John Baldwin , Doug Ambrisko Subject: Re: svn commit: r261266 - in head: sys/dev/drm sys/kern sys/sys usr.sbin/jail References: <201401291341.s0TDfDcB068211@svn.freebsd.org> <52EC4DBB.50804@freebsd.org> <20140203235336.GA46006@ambrisko.com> <2362081.WrjYmKeYu9@ralph.baldwin.cx> In-Reply-To: <2362081.WrjYmKeYu9@ralph.baldwin.cx> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , Robert Watson , svn-src-head@freebsd.org, Alexander Leidinger X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 01:07:58 -0000 On 2/5/2014 12:05 PM, John Baldwin wrote: > I think having a "kmem" flag for jails is a hack and not the right approach. > It does make a jail useless security-wise, but by masquerading as a flag, it > implies that it is only partially violating security which gives a false sense > of security. > > A short term solution that would permit non-security jails without having to > do the longer term work that Robert would like might be to add a new per-jail > flag that in effect means "no security at all". You would then modify one > place (prison_priv_check() in kern_jail.c) to treat a jail with this flag set > as if it wasn't jailed at all. This would clearly communicate to a user what > they were doing by enabling this flag (jail --root-me-please), and it would > also avoid future proliferation of new flags to add more optional and obscure > holes in jails. So is it worthwhile to add a new jail parameter called "insecure" (or somesuch)? That way you could easily add the encapsulation without any of the security. The other vibe I'm getting is not to do anything. Either way, it sounds like the Xorg-enabling patch will remain a patch - not seeing a lot of buy-in here. I'm not against more optional and obscure holes if they have a use; I just call that "a fine-grained capabilities model." - Jamie From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 01:24:11 2014 Return-Path: Delivered-To: svn-src-all@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 41344583; Tue, 11 Feb 2014 01:24:11 +0000 (UTC) Received: from mail-qa0-x22a.google.com (mail-qa0-x22a.google.com [IPv6:2607:f8b0:400d:c00::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7F161107B; Tue, 11 Feb 2014 01:24:10 +0000 (UTC) Received: by mail-qa0-f42.google.com with SMTP id k4so10855300qaq.15 for ; Mon, 10 Feb 2014 17:24:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=ijrHcRlXr5iRN8EN5k1+NTjZIXdUUkgzyFu6k6PW8BY=; b=LnPRD9Kh6gfsYHiq+EgwCsfdsy7Kd64Xo4zFJYqklyfjDHS3DNKaAiTFG5pK+HjaiF PU3Pfo/lIEnFn+uVIs42weJxkHQZaTuu9IbTXY0GYVJ4gQzbkDpkJTiTBf1lG74HhfCn +cXOFhsAOdDjDiR+RA94rEKfOpNUEqSpEiTqqMWikg9broPGMpy5zd5dnOX9tKNzfE6N QZVRcXRnQ71t7slLCTlo2ffmXr8/DpLym8c3zAl2xSV7/mxXsuSPsGTbbsooYx9Alvji CdCfmpRttnsyWuOFc66KAiSo2S2+RDXFmG3t2Ro6NU1flBx9u18rYNqnlg6yzjoszN7W pJMg== MIME-Version: 1.0 X-Received: by 10.140.96.180 with SMTP id k49mr49332355qge.4.1392081849559; Mon, 10 Feb 2014 17:24:09 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.52.8 with HTTP; Mon, 10 Feb 2014 17:24:09 -0800 (PST) In-Reply-To: <52F977D9.5010200@freebsd.org> References: <201401291341.s0TDfDcB068211@svn.freebsd.org> <52EC4DBB.50804@freebsd.org> <20140203235336.GA46006@ambrisko.com> <2362081.WrjYmKeYu9@ralph.baldwin.cx> <52F977D9.5010200@freebsd.org> Date: Mon, 10 Feb 2014 17:24:09 -0800 X-Google-Sender-Auth: hbTlafeXwKBaILra1-Z5chYNwVU Message-ID: Subject: Re: svn commit: r261266 - in head: sys/dev/drm sys/kern sys/sys usr.sbin/jail From: Adrian Chadd To: James Gritton Content-Type: text/plain; charset=ISO-8859-1 Cc: "src-committers@freebsd.org" , Doug Ambrisko , John Baldwin , "svn-src-all@freebsd.org" , Gleb Smirnoff , Robert Watson , "svn-src-head@freebsd.org" , Alexander Leidinger X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 01:24:11 -0000 On 10 February 2014 17:07, James Gritton wrote: > On 2/5/2014 12:05 PM, John Baldwin wrote: > >> I think having a "kmem" flag for jails is a hack and not the right >> approach. >> It does make a jail useless security-wise, but by masquerading as a flag, >> it >> implies that it is only partially violating security which gives a false >> sense >> of security. >> >> A short term solution that would permit non-security jails without having >> to >> do the longer term work that Robert would like might be to add a new >> per-jail >> flag that in effect means "no security at all". You would then modify one >> place (prison_priv_check() in kern_jail.c) to treat a jail with this flag >> set >> as if it wasn't jailed at all. This would clearly communicate to a user >> what >> they were doing by enabling this flag (jail --root-me-please), and it >> would >> also avoid future proliferation of new flags to add more optional and >> obscure >> holes in jails. > > So is it worthwhile to add a new jail parameter called "insecure" (or > somesuch)? That way you could easily add the encapsulation without > any of the security. The other vibe I'm getting is not to do > anything. Either way, it sounds like the Xorg-enabling patch will > remain a patch - not seeing a lot of buy-in here. > > I'm not against more optional and obscure holes if they have a use; I > just call that "a fine-grained capabilities model." I'd rather it stay a patch. IMHO the only viable solution is to create a sandboxable API for this DRI/IO-MMU stuff to, well, DRI via. So hm. Can you actually run clients in different jails, but have them access the same DRI window(s)? Or does running a client in a jail force it to go all over the socket(s) and not via DRI? -a From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 04:16:32 2014 Return-Path: Delivered-To: svn-src-all@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 D3304223; Tue, 11 Feb 2014 04:16:32 +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 BEE141174; Tue, 11 Feb 2014 04:16:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1B4GWEJ087076; Tue, 11 Feb 2014 04:16:32 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1B4GW2n087075; Tue, 11 Feb 2014 04:16:32 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201402110416.s1B4GW2n087075@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 11 Feb 2014 04:16:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261733 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 04:16:32 -0000 Author: marcel Date: Tue Feb 11 04:16:32 2014 New Revision: 261733 URL: http://svnweb.freebsd.org/changeset/base/261733 Log: Fix spelling of eight (was spelled eigth) in struct pkthdr. Modified: head/sys/sys/mbuf.h Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Mon Feb 10 22:27:40 2014 (r261732) +++ head/sys/sys/mbuf.h Tue Feb 11 04:16:32 2014 (r261733) @@ -135,7 +135,7 @@ struct pkthdr { uint8_t l4hlen; /* layer 4 header length */ uint8_t l5hlen; /* layer 5 header length */ union { - uint8_t eigth[8]; + uint8_t eight[8]; uint16_t sixteen[4]; uint32_t thirtytwo[2]; uint64_t sixtyfour[1]; @@ -145,7 +145,7 @@ struct pkthdr { /* Layer specific non-persistent local storage for reassembly, etc. */ union { - uint8_t eigth[8]; + uint8_t eight[8]; uint16_t sixteen[4]; uint32_t thirtytwo[2]; uint64_t sixtyfour[1]; From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 08:08:53 2014 Return-Path: Delivered-To: svn-src-all@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 B1F95DEE; Tue, 11 Feb 2014 08:08: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 9CA5E1504; Tue, 11 Feb 2014 08:08:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1B88rjh075942; Tue, 11 Feb 2014 08:08:53 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1B88rld075941; Tue, 11 Feb 2014 08:08:53 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402110808.s1B88rld075941@svn.freebsd.org> From: Christian Brueffer Date: Tue, 11 Feb 2014 08:08: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: r261738 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 08:08:53 -0000 Author: brueffer Date: Tue Feb 11 08:08:53 2014 New Revision: 261738 URL: http://svnweb.freebsd.org/changeset/base/261738 Log: MFC: r261494 Actually install acpi_rapidstart.4. Modified: stable/10/share/man/man4/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Tue Feb 11 08:02:02 2014 (r261737) +++ stable/10/share/man/man4/Makefile Tue Feb 11 08:08:53 2014 (r261738) @@ -13,6 +13,7 @@ MAN= aac.4 \ ${_acpi_hp.4} \ ${_acpi_ibm.4} \ ${_acpi_panasonic.4} \ + ${_acpi_rapidstart.4} \ ${_acpi_sony.4} \ acpi_thermal.4 \ ${_acpi_toshiba.4} \ @@ -733,6 +734,7 @@ _acpi_fujitsu.4=acpi_fujitsu.4 _acpi_hp.4= acpi_hp.4 _acpi_ibm.4= acpi_ibm.4 _acpi_panasonic.4=acpi_panasonic.4 +_acpi_rapidstart.4=acpi_rapidstart.4 _acpi_sony.4= acpi_sony.4 _acpi_toshiba.4=acpi_toshiba.4 _acpi_wmi.4= acpi_wmi.4 From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 08:11:35 2014 Return-Path: Delivered-To: svn-src-all@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 5840AF8C; Tue, 11 Feb 2014 08:11:35 +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 42BD515A0; Tue, 11 Feb 2014 08:11:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1B8BZi6079087; Tue, 11 Feb 2014 08:11:35 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1B8BYMv079085; Tue, 11 Feb 2014 08:11:34 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402110811.s1B8BYMv079085@svn.freebsd.org> From: Christian Brueffer Date: Tue, 11 Feb 2014 08:11:34 +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: r261739 - in stable/10/release/doc: en_US.ISO8859-1/hardware share/misc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 08:11:35 -0000 Author: brueffer Date: Tue Feb 11 08:11:34 2014 New Revision: 261739 URL: http://svnweb.freebsd.org/changeset/base/261739 Log: MFC: r261487 Add qlxgbe(4) and qlxge(4) to the hardware notes. Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml stable/10/release/doc/share/misc/dev.archlist.txt Directory Properties: stable/10/ (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 Tue Feb 11 08:08:53 2014 (r261738) +++ stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Tue Feb 11 08:11:34 2014 (r261739) @@ -893,6 +893,10 @@ &hwlist.qlxgb; + &hwlist.qlxgbe; + + &hwlist.qlxge; + &hwlist.re; &hwlist.rl; Modified: stable/10/release/doc/share/misc/dev.archlist.txt ============================================================================== --- stable/10/release/doc/share/misc/dev.archlist.txt Tue Feb 11 08:08:53 2014 (r261738) +++ stable/10/release/doc/share/misc/dev.archlist.txt Tue Feb 11 08:11:34 2014 (r261739) @@ -105,6 +105,8 @@ oltr i386 pcn i386,pc98,ia64,amd64 pst i386 qlxgb amd64 +qlxgbe amd64 +qlxge amd64 rc i386 ral i386,amd64 rue i386,pc98,amd64 From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 08:15:40 2014 Return-Path: Delivered-To: svn-src-all@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 E74C3246; Tue, 11 Feb 2014 08:15:40 +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 CFADC15C3; Tue, 11 Feb 2014 08:15:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1B8FeuJ079708; Tue, 11 Feb 2014 08:15:40 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1B8FeYS079706; Tue, 11 Feb 2014 08:15:40 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402110815.s1B8FeYS079706@svn.freebsd.org> From: Christian Brueffer Date: Tue, 11 Feb 2014 08:15:40 +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: r261740 - in stable/9/release/doc: en_US.ISO8859-1/hardware share/misc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 08:15:41 -0000 Author: brueffer Date: Tue Feb 11 08:15:40 2014 New Revision: 261740 URL: http://svnweb.freebsd.org/changeset/base/261740 Log: MFC: r261487 Add qlxgbe(4) and glxge(4) to the hardware notes. Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.xml stable/9/release/doc/share/misc/dev.archlist.txt Directory Properties: stable/9/release/doc/ (props changed) stable/9/release/doc/en_US.ISO8859-1/hardware/ (props changed) Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/hardware/article.xml Tue Feb 11 08:11:34 2014 (r261739) +++ stable/9/release/doc/en_US.ISO8859-1/hardware/article.xml Tue Feb 11 08:15:40 2014 (r261740) @@ -952,6 +952,10 @@ &hwlist.qlxgb; + &hwlist.qlxgbe; + + &hwlist.qlxge; + &hwlist.re; &hwlist.rl; Modified: stable/9/release/doc/share/misc/dev.archlist.txt ============================================================================== --- stable/9/release/doc/share/misc/dev.archlist.txt Tue Feb 11 08:11:34 2014 (r261739) +++ stable/9/release/doc/share/misc/dev.archlist.txt Tue Feb 11 08:15:40 2014 (r261740) @@ -104,6 +104,8 @@ oltr i386 pcn i386,pc98,ia64,amd64 pst i386 qlxgb amd64 +qlxgbe amd64 +qlxge amd64 rc i386 ral i386,amd64 rue i386,pc98,amd64 From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 08:20:46 2014 Return-Path: Delivered-To: svn-src-all@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 517F8552; Tue, 11 Feb 2014 08:20: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 3A55E15F3; Tue, 11 Feb 2014 08:20:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1B8Kk32082260; Tue, 11 Feb 2014 08:20:46 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1B8KkbQ082259; Tue, 11 Feb 2014 08:20:46 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402110820.s1B8KkbQ082259@svn.freebsd.org> From: Christian Brueffer Date: Tue, 11 Feb 2014 08:20: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: r261741 - stable/10/sbin/mount_udf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 08:20:46 -0000 Author: brueffer Date: Tue Feb 11 08:20:45 2014 New Revision: 261741 URL: http://svnweb.freebsd.org/changeset/base/261741 Log: MFC: r261496 Unbreak mount_udf by passing the correct iovec length into nmount(). This has been broken since r247861. PR: bin/186193 Submitted by: Arnot Belohlavek Modified: stable/10/sbin/mount_udf/mount_udf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mount_udf/mount_udf.c ============================================================================== --- stable/10/sbin/mount_udf/mount_udf.c Tue Feb 11 08:15:40 2014 (r261740) +++ stable/10/sbin/mount_udf/mount_udf.c Tue Feb 11 08:20:45 2014 (r261741) @@ -77,9 +77,9 @@ main(int argc, char **argv) char fstype[] = "udf"; struct iovec *iov; char *cs_disk, *cs_local, *dev, *dir; - int ch, i, iovlen, mntflags, udf_flags, verbose; + int ch, iovlen, mntflags, udf_flags, verbose; - i = iovlen = mntflags = udf_flags = verbose = 0; + iovlen = mntflags = udf_flags = verbose = 0; cs_disk = cs_local = NULL; iov = NULL; while ((ch = getopt(argc, argv, "o:vC:")) != -1) @@ -129,7 +129,7 @@ main(int argc, char **argv) build_iovec(&iov, &iovlen, "cs_disk", cs_disk, (size_t)-1); build_iovec(&iov, &iovlen, "cs_local", cs_local, (size_t)-1); } - if (nmount(iov, i, mntflags) < 0) + if (nmount(iov, iovlen, mntflags) < 0) err(1, "%s", dev); exit(0); } From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 09:17:18 2014 Return-Path: Delivered-To: svn-src-all@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 35DA5E2; Tue, 11 Feb 2014 09:17: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 1FAD61A69; Tue, 11 Feb 2014 09:17:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1B9HHoe003860; Tue, 11 Feb 2014 09:17:17 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1B9HHck003859; Tue, 11 Feb 2014 09:17:17 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201402110917.s1B9HHck003859@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 11 Feb 2014 09:17:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261742 - head/gnu/usr.bin/groff/tmac X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 09:17:18 -0000 Author: pjd Date: Tue Feb 11 09:17:17 2014 New Revision: 261742 URL: http://svnweb.freebsd.org/changeset/base/261742 Log: Add missing libraries here as well, so a warning is not printed when one tries to view their manual pages. Reported by: rwatson Explained by: pluknet Modified: head/gnu/usr.bin/groff/tmac/mdoc.local Modified: head/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- head/gnu/usr.bin/groff/tmac/mdoc.local Tue Feb 11 08:20:45 2014 (r261741) +++ head/gnu/usr.bin/groff/tmac/mdoc.local Tue Feb 11 09:17:17 2014 (r261742) @@ -34,11 +34,13 @@ .\" FreeBSD .Lb values .ds doc-str-Lb-libarchive Streaming Archive Library (libarchive, \-larchive) .ds doc-str-Lb-libbluetooth Bluetooth User Library (libbluetooth, \-lbluetooth) +.ds doc-str-Lb-libcapsicum Capsicum Library (libcapsicum, \-lcapsicum) .ds doc-str-Lb-libedit Line Editor and History Library (libedit, \-ledit) .ds doc-str-Lb-libefi EFI Runtime Services Library (libefi, \-lefi) .ds doc-str-Lb-libelf ELF Parsing Library (libelf, \-lelf) .ds doc-str-Lb-libexecinfo Backtrace Access Library (libexecinfo, \-lexecinfo) .ds doc-str-Lb-libfetch File Transfer Library (libfetch, \-lfetch) +.ds doc-str-Lb-libnv Name/value pairs library (libnv, \-lnv) .ds doc-str-Lb-libpmc Performance Monitoring Counters Interface Library (libpmc, \-lpmc) .ds doc-str-Lb-libproc Processor Monitoring and Analysis Library (libproc, \-lproc) .ds doc-str-Lb-libprocstat Process and Files Information Retrieval (libprocstat, \-lprocstat) From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 10:45:21 2014 Return-Path: Delivered-To: svn-src-all@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 1FE19103; Tue, 11 Feb 2014 10:45:21 +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 E3C781301; Tue, 11 Feb 2014 10:45:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BAjKhk039102; Tue, 11 Feb 2014 10:45:20 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BAjKca039097; Tue, 11 Feb 2014 10:45:20 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402111045.s1BAjKca039097@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 11 Feb 2014 10:45:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261747 - head/usr.sbin/iscsid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 10:45:21 -0000 Author: trasz Date: Tue Feb 11 10:45:20 2014 New Revision: 261747 URL: http://svnweb.freebsd.org/changeset/base/261747 Log: Empty data segment during Login Phase is rather unlikely, but it's not a protocol error. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/iscsid/discovery.c head/usr.sbin/iscsid/keys.c head/usr.sbin/iscsid/login.c Modified: head/usr.sbin/iscsid/discovery.c ============================================================================== --- head/usr.sbin/iscsid/discovery.c Tue Feb 11 09:29:36 2014 (r261746) +++ head/usr.sbin/iscsid/discovery.c Tue Feb 11 10:45:20 2014 (r261747) @@ -62,8 +62,6 @@ text_receive(struct connection *conn) */ if ((bhstr->bhstr_flags & BHSTR_FLAGS_CONTINUE) != 0) log_errx(1, "received Text PDU with unsupported \"C\" flag"); - if (response->pdu_data_len == 0) - log_errx(1, "received Text PDU with empty data segment"); if (ntohl(bhstr->bhstr_statsn) != conn->conn_statsn + 1) { log_errx(1, "received Text PDU with wrong StatSN: " "is %d, should be %d", ntohl(bhstr->bhstr_statsn), Modified: head/usr.sbin/iscsid/keys.c ============================================================================== --- head/usr.sbin/iscsid/keys.c Tue Feb 11 09:29:36 2014 (r261746) +++ head/usr.sbin/iscsid/keys.c Tue Feb 11 10:45:20 2014 (r261747) @@ -65,7 +65,7 @@ keys_load(struct keys *keys, const struc size_t pair_len; if (pdu->pdu_data_len == 0) - log_errx(1, "protocol error: empty data segment"); + return; if (pdu->pdu_data[pdu->pdu_data_len - 1] != '\0') log_errx(1, "protocol error: key not NULL-terminated\n"); Modified: head/usr.sbin/iscsid/login.c ============================================================================== --- head/usr.sbin/iscsid/login.c Tue Feb 11 09:29:36 2014 (r261746) +++ head/usr.sbin/iscsid/login.c Tue Feb 11 10:45:20 2014 (r261747) @@ -189,10 +189,6 @@ login_receive(struct connection *conn, b fail(conn, errorstr); log_errx(1, "target returned error: %s", errorstr); } -#if 0 - if (response->pdu_data_len == 0) - log_errx(1, "received Login PDU with empty data segment"); -#endif if (initial == false && ntohl(bhslr->bhslr_statsn) != conn->conn_statsn + 1) { /* From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 10:47:29 2014 Return-Path: Delivered-To: svn-src-all@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 67430339; Tue, 11 Feb 2014 10:47: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 5001B1316; Tue, 11 Feb 2014 10:47:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BAlTFe039381; Tue, 11 Feb 2014 10:47:29 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BAlTjN039380; Tue, 11 Feb 2014 10:47:29 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402111047.s1BAlTjN039380@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 11 Feb 2014 10:47:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261748 - head/usr.sbin/iscsid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 10:47:29 -0000 Author: trasz Date: Tue Feb 11 10:47:28 2014 New Revision: 261748 URL: http://svnweb.freebsd.org/changeset/base/261748 Log: So, it turns out SIGCHLD is discarded by default, so we have to set up a dummy handler to make it interrupt an ioctl(2) or select(2). This makes those short-lived iscsid(8) zombies disappear. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/iscsid/iscsid.c Modified: head/usr.sbin/iscsid/iscsid.c ============================================================================== --- head/usr.sbin/iscsid/iscsid.c Tue Feb 11 10:45:20 2014 (r261747) +++ head/usr.sbin/iscsid/iscsid.c Tue Feb 11 10:47:28 2014 (r261748) @@ -394,6 +394,32 @@ set_timeout(int timeout) } static void +sigchld_handler(int dummy __unused) +{ + + /* + * The only purpose of this handler is to make SIGCHLD + * interrupt the ISCSIDWAIT ioctl(2), so we can call + * wait_for_children(). + */ +} + +static void +register_sigchld(void) +{ + struct sigaction sa; + int error; + + bzero(&sa, sizeof(sa)); + sa.sa_handler = sigchld_handler; + sigfillset(&sa.sa_mask); + error = sigaction(SIGCHLD, &sa, NULL); + if (error != 0) + log_err(1, "sigaction"); + +} + +static void handle_request(int iscsi_fd, const struct iscsi_daemon_request *request, int timeout) { struct connection *conn; @@ -522,6 +548,8 @@ main(int argc, char **argv) pidfile_write(pidfh); + register_sigchld(); + for (;;) { log_debugx("waiting for request from the kernel"); From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 10:53:09 2014 Return-Path: Delivered-To: svn-src-all@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 41AE25FB; Tue, 11 Feb 2014 10:53: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 2AA9213A2; Tue, 11 Feb 2014 10:53:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BAr9lr042623; Tue, 11 Feb 2014 10:53:09 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BAr9bA042622; Tue, 11 Feb 2014 10:53:09 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402111053.s1BAr9bA042622@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 11 Feb 2014 10:53:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261749 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 10:53:09 -0000 Author: trasz Date: Tue Feb 11 10:53:08 2014 New Revision: 261749 URL: http://svnweb.freebsd.org/changeset/base/261749 Log: Refactor. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctld.c Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Tue Feb 11 10:47:28 2014 (r261748) +++ head/usr.sbin/ctld/ctld.c Tue Feb 11 10:53:08 2014 (r261749) @@ -869,14 +869,74 @@ conf_print(struct conf *conf) } #endif +static int +conf_verify_lun(struct lun *lun) +{ + const struct lun *lun2; + + if (lun->l_backend == NULL) + lun_set_backend(lun, "block"); + if (strcmp(lun->l_backend, "block") == 0) { + if (lun->l_path == NULL) { + log_warnx("missing path for lun %d, target \"%s\"", + lun->l_lun, lun->l_target->t_iqn); + return (1); + } + } else if (strcmp(lun->l_backend, "ramdisk") == 0) { + if (lun->l_size == 0) { + log_warnx("missing size for ramdisk-backed lun %d, " + "target \"%s\"", lun->l_lun, lun->l_target->t_iqn); + return (1); + } + if (lun->l_path != NULL) { + log_warnx("path must not be specified " + "for ramdisk-backed lun %d, target \"%s\"", + lun->l_lun, lun->l_target->t_iqn); + return (1); + } + } + if (lun->l_lun < 0 || lun->l_lun > 255) { + log_warnx("invalid lun number for lun %d, target \"%s\"; " + "must be between 0 and 255", lun->l_lun, + lun->l_target->t_iqn); + return (1); + } +#if 1 /* Should we? */ + TAILQ_FOREACH(lun2, &lun->l_target->t_luns, l_next) { + if (lun == lun2) + continue; + if (lun->l_path != NULL && lun2->l_path != NULL && + strcmp(lun->l_path, lun2->l_path) == 0) + log_debugx("WARNING: duplicate path for lun %d, " + "target \"%s\"", lun->l_lun, lun->l_target->t_iqn); + } +#endif + if (lun->l_blocksize == 0) { + lun_set_blocksize(lun, DEFAULT_BLOCKSIZE); + } else if (lun->l_blocksize < 0) { + log_warnx("invalid blocksize for lun %d, target \"%s\"; " + "must be larger than 0", lun->l_lun, lun->l_target->t_iqn); + return (1); + } + if (lun->l_size != 0 && lun->l_size % lun->l_blocksize != 0) { + log_warnx("invalid size for lun %d, target \"%s\"; " + "must be multiple of blocksize", lun->l_lun, + lun->l_target->t_iqn); + return (1); + } + + return (0); +} + int conf_verify(struct conf *conf) { struct auth_group *ag; struct portal_group *pg; struct target *targ; - struct lun *lun, *lun2; + struct lun *lun; bool found_lun0; + int error; if (conf->conf_pidfile_path == NULL) conf->conf_pidfile_path = checked_strdup(DEFAULT_PIDFILE); @@ -895,65 +955,11 @@ conf_verify(struct conf *conf) } found_lun0 = false; TAILQ_FOREACH(lun, &targ->t_luns, l_next) { + error = conf_verify_lun(lun); + if (error != 0) + return (error); if (lun->l_lun == 0) found_lun0 = true; - if (lun->l_backend == NULL) - lun_set_backend(lun, "block"); - if (strcmp(lun->l_backend, "block") == 0 && - lun->l_path == NULL) { - log_warnx("missing path for lun %d, " - "target \"%s\"", lun->l_lun, targ->t_iqn); - return (1); - } - if (strcmp(lun->l_backend, "ramdisk") == 0) { - if (lun->l_size == 0) { - log_warnx("missing size for " - "ramdisk-backed lun %d, " - "target \"%s\"", - lun->l_lun, targ->t_iqn); - return (1); - } - if (lun->l_path != NULL) { - log_warnx("path must not be specified " - "for ramdisk-backed lun %d, " - "target \"%s\"", - lun->l_lun, targ->t_iqn); - return (1); - } - } - if (lun->l_lun < 0 || lun->l_lun > 255) { - log_warnx("invalid lun number for lun %d, " - "target \"%s\"; must be between 0 and 255", - lun->l_lun, targ->t_iqn); - return (1); - } -#if 1 /* Should we? */ - TAILQ_FOREACH(lun2, &targ->t_luns, l_next) { - if (lun == lun2) - continue; - if (lun->l_path != NULL && - lun2->l_path != NULL && - strcmp(lun->l_path, lun2->l_path) == 0) - log_debugx("WARNING: duplicate path " - "for lun %d, target \"%s\"", - lun->l_lun, targ->t_iqn); - } -#endif - if (lun->l_blocksize == 0) { - lun_set_blocksize(lun, DEFAULT_BLOCKSIZE); - } else if (lun->l_blocksize <= 0) { - log_warnx("invalid blocksize for lun %d, " - "target \"%s\"; must be larger than 0", - lun->l_lun, targ->t_iqn); - return (1); - } - if (lun->l_size != 0 && - lun->l_size % lun->l_blocksize != 0) { - log_warnx("invalid size for lun %d, target " - "\"%s\"; must be multiple of blocksize", - lun->l_lun, targ->t_iqn); - return (1); - } } if (!found_lun0) { log_warnx("mandatory LUN 0 not configured " From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 10:55:33 2014 Return-Path: Delivered-To: svn-src-all@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 0D17E86F; Tue, 11 Feb 2014 10:55: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 EBD7013D2; Tue, 11 Feb 2014 10:55:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BAtWFN043084; Tue, 11 Feb 2014 10:55:32 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BAtWOx043083; Tue, 11 Feb 2014 10:55:32 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402111055.s1BAtWOx043083@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 11 Feb 2014 10:55:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261750 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 10:55:33 -0000 Author: trasz Date: Tue Feb 11 10:55:32 2014 New Revision: 261750 URL: http://svnweb.freebsd.org/changeset/base/261750 Log: Improve check for duplicated paths. It shows the warning twice for every path (once for each duplicate found), but it should do for now. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctld.c Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Tue Feb 11 10:53:08 2014 (r261749) +++ head/usr.sbin/ctld/ctld.c Tue Feb 11 10:55:32 2014 (r261750) @@ -873,6 +873,7 @@ static int conf_verify_lun(struct lun *lun) { const struct lun *lun2; + const struct target *targ2; if (lun->l_backend == NULL) lun_set_backend(lun, "block"); @@ -901,16 +902,6 @@ conf_verify_lun(struct lun *lun) lun->l_target->t_iqn); return (1); } -#if 1 /* Should we? */ - TAILQ_FOREACH(lun2, &lun->l_target->t_luns, l_next) { - if (lun == lun2) - continue; - if (lun->l_path != NULL && lun2->l_path != NULL && - strcmp(lun->l_path, lun2->l_path) == 0) - log_debugx("WARNING: duplicate path for lun %d, " - "target \"%s\"", lun->l_lun, lun->l_target->t_iqn); - } -#endif if (lun->l_blocksize == 0) { lun_set_blocksize(lun, DEFAULT_BLOCKSIZE); } else if (lun->l_blocksize < 0) { @@ -924,6 +915,20 @@ conf_verify_lun(struct lun *lun) lun->l_target->t_iqn); return (1); } + TAILQ_FOREACH(targ2, &lun->l_target->t_conf->conf_targets, t_next) { + TAILQ_FOREACH(lun2, &targ2->t_luns, l_next) { + if (lun == lun2) + continue; + if (lun->l_path != NULL && lun2->l_path != NULL && + strcmp(lun->l_path, lun2->l_path) == 0) { + log_debugx("WARNING: path \"%s\" duplicated " + "between lun %d, target \"%s\", and " + "lun %d, target \"%s\"", lun->l_path, + lun->l_lun, lun->l_target->t_iqn, + lun2->l_lun, lun2->l_target->t_iqn); + } + } + } return (0); } From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 10:56:44 2014 Return-Path: Delivered-To: svn-src-all@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 8050D9C8; Tue, 11 Feb 2014 10:56:44 +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 6A5AF13E0; Tue, 11 Feb 2014 10:56:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BAuig2043248; Tue, 11 Feb 2014 10:56:44 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BAuilm043247; Tue, 11 Feb 2014 10:56:44 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402111056.s1BAuilm043247@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 11 Feb 2014 10:56:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261751 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 10:56:44 -0000 Author: trasz Date: Tue Feb 11 10:56:43 2014 New Revision: 261751 URL: http://svnweb.freebsd.org/changeset/base/261751 Log: The log_whatever() routines don't accept NULL for format strings, so mark them as __printflike instead of__printf0like. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctld.h Modified: head/usr.sbin/ctld/ctld.h ============================================================================== --- head/usr.sbin/ctld/ctld.h Tue Feb 11 10:55:32 2014 (r261750) +++ head/usr.sbin/ctld/ctld.h Tue Feb 11 10:56:43 2014 (r261751) @@ -263,12 +263,12 @@ void log_init(int level); void log_set_peer_name(const char *name); void log_set_peer_addr(const char *addr); void log_err(int, const char *, ...) - __dead2 __printf0like(2, 3); + __dead2 __printflike(2, 3); void log_errx(int, const char *, ...) - __dead2 __printf0like(2, 3); -void log_warn(const char *, ...) __printf0like(1, 2); + __dead2 __printflike(2, 3); +void log_warn(const char *, ...) __printflike(1, 2); void log_warnx(const char *, ...) __printflike(1, 2); -void log_debugx(const char *, ...) __printf0like(1, 2); +void log_debugx(const char *, ...) __printflike(1, 2); char *checked_strdup(const char *); bool valid_iscsi_name(const char *name); From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 10:58:33 2014 Return-Path: Delivered-To: svn-src-all@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 45FB8BB9; Tue, 11 Feb 2014 10:58: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 14EB41436; Tue, 11 Feb 2014 10:58:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BAwWbT043472; Tue, 11 Feb 2014 10:58:32 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BAwWjZ043469; Tue, 11 Feb 2014 10:58:32 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402111058.s1BAwWjZ043469@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 11 Feb 2014 10:58:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261752 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 10:58:33 -0000 Author: trasz Date: Tue Feb 11 10:58:32 2014 New Revision: 261752 URL: http://svnweb.freebsd.org/changeset/base/261752 Log: Empty data segment during Login Phase is rather unlikely, but it's not, by itself, a protocol error. This fixes interoperability with OpenBSD initiator. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/discovery.c head/usr.sbin/ctld/keys.c head/usr.sbin/ctld/login.c Modified: head/usr.sbin/ctld/discovery.c ============================================================================== --- head/usr.sbin/ctld/discovery.c Tue Feb 11 10:56:43 2014 (r261751) +++ head/usr.sbin/ctld/discovery.c Tue Feb 11 10:58:32 2014 (r261752) @@ -61,9 +61,6 @@ text_receive(struct connection *conn) */ if ((bhstr->bhstr_flags & BHSTR_FLAGS_CONTINUE) != 0) log_errx(1, "received Text PDU with unsupported \"C\" flag"); - if (request->pdu_data_len == 0) - log_errx(1, "received Text PDU with empty data segment"); - if (ntohl(bhstr->bhstr_cmdsn) < conn->conn_cmdsn) { log_errx(1, "received Text PDU with decreasing CmdSN: " "was %d, is %d", conn->conn_cmdsn, ntohl(bhstr->bhstr_cmdsn)); Modified: head/usr.sbin/ctld/keys.c ============================================================================== --- head/usr.sbin/ctld/keys.c Tue Feb 11 10:56:43 2014 (r261751) +++ head/usr.sbin/ctld/keys.c Tue Feb 11 10:58:32 2014 (r261752) @@ -64,7 +64,7 @@ keys_load(struct keys *keys, const struc size_t pair_len; if (pdu->pdu_data_len == 0) - log_errx(1, "protocol error: empty data segment"); + return; if (pdu->pdu_data[pdu->pdu_data_len - 1] != '\0') log_errx(1, "protocol error: key not NULL-terminated\n"); Modified: head/usr.sbin/ctld/login.c ============================================================================== --- head/usr.sbin/ctld/login.c Tue Feb 11 10:56:43 2014 (r261751) +++ head/usr.sbin/ctld/login.c Tue Feb 11 10:58:32 2014 (r261752) @@ -128,10 +128,6 @@ login_receive(struct connection *conn, b log_errx(1, "received Login PDU with unsupported " "Version-min 0x%x", bhslr->bhslr_version_min); } - if (request->pdu_data_len == 0) { - login_send_error(request, 0x02, 0x00); - log_errx(1, "received Login PDU with empty data segment"); - } if (ntohl(bhslr->bhslr_cmdsn) < conn->conn_cmdsn) { login_send_error(request, 0x02, 0x05); log_errx(1, "received Login PDU with decreasing CmdSN: " From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 10:59:58 2014 Return-Path: Delivered-To: svn-src-all@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 5349ED1F; Tue, 11 Feb 2014 10:59:58 +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 3EEEA144B; Tue, 11 Feb 2014 10:59:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BAxwaI043648; Tue, 11 Feb 2014 10:59:58 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BAxwaj043647; Tue, 11 Feb 2014 10:59:58 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402111059.s1BAxwaj043647@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 11 Feb 2014 10:59:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261753 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 10:59:58 -0000 Author: trasz Date: Tue Feb 11 10:59:57 2014 New Revision: 261753 URL: http://svnweb.freebsd.org/changeset/base/261753 Log: Daemonize after applying configuration, not before, so that any problems - including "daemon already running" - are visible on the terminal and not just in logs. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctld.c Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Tue Feb 11 10:58:32 2014 (r261752) +++ head/usr.sbin/ctld/ctld.c Tue Feb 11 10:59:57 2014 (r261753) @@ -1644,14 +1644,6 @@ main(int argc, char **argv) newconf->conf_debug = debug; } - if (dont_daemonize == false) { - if (daemon(0, 0) == -1) { - log_warn("cannot daemonize"); - pidfile_remove(newconf->conf_pidfh); - exit(1); - } - } - #ifdef ICL_KERNEL_PROXY log_debugx("enabling CTL iSCSI port"); error = kernel_port_on(); @@ -1674,6 +1666,15 @@ main(int argc, char **argv) log_errx(1, "failed to enable CTL iSCSI port, exiting"); #endif + if (dont_daemonize == false) { + log_debugx("daemonizing"); + if (daemon(0, 0) == -1) { + log_warn("cannot daemonize"); + pidfile_remove(newconf->conf_pidfh); + exit(1); + } + } + for (;;) { main_loop(newconf, dont_daemonize); if (sighup_received) { From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 11:08:06 2014 Return-Path: Delivered-To: svn-src-all@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 1BEC9F5E; Tue, 11 Feb 2014 11: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 EF7061501; Tue, 11 Feb 2014 11:08:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BB85WO047494; Tue, 11 Feb 2014 11:08:05 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BB84IM047487; Tue, 11 Feb 2014 11:08:04 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402111108.s1BB84IM047487@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 11 Feb 2014 11:08:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261754 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 11:08:06 -0000 Author: trasz Date: Tue Feb 11 11:08:04 2014 New Revision: 261754 URL: http://svnweb.freebsd.org/changeset/base/261754 Log: Implement initiator-name and initiator-portal restrictions. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctl.conf.5 head/usr.sbin/ctld/ctld.c head/usr.sbin/ctld/ctld.h head/usr.sbin/ctld/login.c head/usr.sbin/ctld/parse.y head/usr.sbin/ctld/token.l Modified: head/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- head/usr.sbin/ctld/ctl.conf.5 Tue Feb 11 10:59:57 2014 (r261753) +++ head/usr.sbin/ctld/ctl.conf.5 Tue Feb 11 11:08:04 2014 (r261754) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 2, 2013 +.Dd February 11, 2014 .Dt CTL.CONF 5 .Os .Sh NAME @@ -107,6 +107,18 @@ Specifies CHAP authentication credential Specifies mutual CHAP authentication credentials. Note that for any auth-group, configuration may contain either chap, or chap-mutual entries; it's an error to mix them. +.It Ic initiator-name Ao Ar initiator-name Ac +Specifies iSCSI initiator name. +If not defined, there will be no restrictions based on initiator +name. +Otherwise, only initiators with names matching one of defined +ones will be allowed to connect. +.It Ic initiator-portal Ao Ar address Ac +Specifies iSCSI initiator portal - IPv4 or IPv6 address. +If not defined, there will be no restrictions based on initiator +address. +Otherwise, only initiators with addresses matching one of defined +ones will be allowed to connect. .El .Ss portal-group level The following statements are available at the portal-group level: @@ -143,6 +155,22 @@ or chap-mutual clauses; it's a configura Specifies mutual CHAP authentication credentials. 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 initiator-name Ao Ar initiator-name Ac +Specifies iSCSI initiator name. +If not defined, there will be no restrictions based on initiator +name. +Otherwise, only initiators with names matching one of defined +ones will be allowed to connect. +This clause is mutually exclusive with auth-group; one cannot use +both in a single target. +.It Ic initiator-portal Ao Ar address Ac +Specifies iSCSI initiator portal - IPv4 or IPv6 address. +If not defined, there will be no restrictions based on initiator +address. +Otherwise, only initiators with addresses matching one of defined +ones will be allowed to connect. +This clause is mutually exclusive with auth-group; one cannot use +both in a single target. .It Ic portal-group Aq Ar name Assigns previously defined portal group to that target. Default portal group is "default", which makes the target available Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Tue Feb 11 10:59:57 2014 (r261753) +++ head/usr.sbin/ctld/ctld.c Tue Feb 11 11:08:04 2014 (r261754) @@ -149,6 +149,94 @@ auth_find(struct auth_group *ag, const c return (NULL); } +const struct auth_name * +auth_name_new(struct auth_group *ag, const char *name) +{ + struct auth_name *an; + + an = calloc(1, sizeof(*an)); + if (an == NULL) + log_err(1, "calloc"); + an->an_auth_group = ag; + an->an_initator_name = checked_strdup(name); + TAILQ_INSERT_TAIL(&ag->ag_names, an, an_next); + return (an); +} + +static void +auth_name_delete(struct auth_name *an) +{ + TAILQ_REMOVE(&an->an_auth_group->ag_names, an, an_next); + + free(an->an_initator_name); + free(an); +} + +bool +auth_name_defined(const struct auth_group *ag) +{ + if (TAILQ_EMPTY(&ag->ag_names)) + return (false); + return (true); +} + +const struct auth_name * +auth_name_find(const struct auth_group *ag, const char *name) +{ + const struct auth_name *auth_name; + + TAILQ_FOREACH(auth_name, &ag->ag_names, an_next) { + if (strcmp(auth_name->an_initator_name, name) == 0) + return (auth_name); + } + + return (NULL); +} + +const struct auth_portal * +auth_portal_new(struct auth_group *ag, const char *portal) +{ + struct auth_portal *ap; + + ap = calloc(1, sizeof(*ap)); + if (ap == NULL) + log_err(1, "calloc"); + ap->ap_auth_group = ag; + ap->ap_initator_portal = checked_strdup(portal); + TAILQ_INSERT_TAIL(&ag->ag_portals, ap, ap_next); + return (ap); +} + +static void +auth_portal_delete(struct auth_portal *ap) +{ + TAILQ_REMOVE(&ap->ap_auth_group->ag_portals, ap, ap_next); + + free(ap->ap_initator_portal); + free(ap); +} + +bool +auth_portal_defined(const struct auth_group *ag) +{ + if (TAILQ_EMPTY(&ag->ag_portals)) + return (false); + return (true); +} + +const struct auth_portal * +auth_portal_find(const struct auth_group *ag, const char *portal) +{ + const struct auth_portal *auth_portal; + + TAILQ_FOREACH(auth_portal, &ag->ag_portals, ap_next) { + if (strcmp(auth_portal->ap_initator_portal, portal) == 0) + return (auth_portal); + } + + return (NULL); +} + struct auth_group * auth_group_new(struct conf *conf, const char *name) { @@ -168,6 +256,8 @@ auth_group_new(struct conf *conf, const if (name != NULL) ag->ag_name = checked_strdup(name); TAILQ_INIT(&ag->ag_auths); + TAILQ_INIT(&ag->ag_names); + TAILQ_INIT(&ag->ag_portals); ag->ag_conf = conf; TAILQ_INSERT_TAIL(&conf->conf_auth_groups, ag, ag_next); @@ -177,12 +267,19 @@ auth_group_new(struct conf *conf, const void auth_group_delete(struct auth_group *ag) { - struct auth *auth, *tmp; + struct auth *auth, *auth_tmp; + struct auth_name *auth_name, *auth_name_tmp; + struct auth_portal *auth_portal, *auth_portal_tmp; TAILQ_REMOVE(&ag->ag_conf->conf_auth_groups, ag, ag_next); - TAILQ_FOREACH_SAFE(auth, &ag->ag_auths, a_next, tmp) + TAILQ_FOREACH_SAFE(auth, &ag->ag_auths, a_next, auth_tmp) auth_delete(auth); + TAILQ_FOREACH_SAFE(auth_name, &ag->ag_names, an_next, auth_name_tmp) + auth_name_delete(auth_name); + TAILQ_FOREACH_SAFE(auth_portal, &ag->ag_portals, ap_next, + auth_portal_tmp) + auth_portal_delete(auth_portal); free(ag->ag_name); free(ag); } @@ -832,6 +929,8 @@ conf_print(struct conf *conf) { struct auth_group *ag; struct auth *auth; + struct auth_name *auth_name; + struct auth_portal *auth_portal; struct portal_group *pg; struct portal *portal; struct target *targ; @@ -844,6 +943,12 @@ conf_print(struct conf *conf) fprintf(stderr, "\t chap-mutual %s %s %s %s\n", auth->a_user, auth->a_secret, auth->a_mutual_user, auth->a_mutual_secret); + TAILQ_FOREACH(auth_name, &ag->ag_names, an_next) + fprintf(stderr, "\t initiator-name %s\n", + auth_name->an_initator_name); + TAILQ_FOREACH(auth_portal, &ag->ag_portals, an_next) + fprintf(stderr, "\t initiator-portal %s\n", + auth_portal->an_initator_portal); fprintf(stderr, "}\n"); } TAILQ_FOREACH(pg, &conf->conf_portal_groups, pg_next) { Modified: head/usr.sbin/ctld/ctld.h ============================================================================== --- head/usr.sbin/ctld/ctld.h Tue Feb 11 10:59:57 2014 (r261753) +++ head/usr.sbin/ctld/ctld.h Tue Feb 11 11:08:04 2014 (r261754) @@ -53,6 +53,18 @@ struct auth { char *a_mutual_secret; }; +struct auth_name { + TAILQ_ENTRY(auth_name) an_next; + struct auth_group *an_auth_group; + char *an_initator_name; +}; + +struct auth_portal { + TAILQ_ENTRY(auth_portal) ap_next; + struct auth_group *ap_auth_group; + char *ap_initator_portal; +}; + #define AG_TYPE_UNKNOWN 0 #define AG_TYPE_NO_AUTHENTICATION 1 #define AG_TYPE_CHAP 2 @@ -65,6 +77,8 @@ struct auth_group { struct target *ag_target; int ag_type; TAILQ_HEAD(, auth) ag_auths; + TAILQ_HEAD(, auth_name) ag_names; + TAILQ_HEAD(, auth_portal) ag_portals; }; struct portal { @@ -192,6 +206,18 @@ const struct auth *auth_new_chap_mutual( const struct auth *auth_find(struct auth_group *ag, const char *user); +const struct auth_name *auth_name_new(struct auth_group *ag, + const char *initiator_name); +bool auth_name_defined(const struct auth_group *ag); +const struct auth_name *auth_name_find(const struct auth_group *ag, + const char *initiator_name); + +const struct auth_portal *auth_portal_new(struct auth_group *ag, + const char *initiator_portal); +bool auth_portal_defined(const struct auth_group *ag); +const struct auth_portal *auth_portal_find(const struct auth_group *ag, + const char *initiator_portal); + struct portal_group *portal_group_new(struct conf *conf, const char *name); void portal_group_delete(struct portal_group *pg); struct portal_group *portal_group_find(struct conf *conf, const char *name); Modified: head/usr.sbin/ctld/login.c ============================================================================== --- head/usr.sbin/ctld/login.c Tue Feb 11 10:59:57 2014 (r261753) +++ head/usr.sbin/ctld/login.c Tue Feb 11 11:08:04 2014 (r261754) @@ -936,6 +936,33 @@ login(struct connection *conn) } /* + * Enforce initiator-name and initiator-portal. + */ + if (auth_name_defined(ag)) { + if (auth_name_find(ag, initiator_name) == NULL) { + login_send_error(request, 0x02, 0x02); + log_errx(1, "initiator does not match allowed " + "initiator names"); + } + log_debugx("initiator matches allowed initiator names"); + } else { + log_debugx("auth-group does not define initiator name " + "restrictions"); + } + + if (auth_portal_defined(ag)) { + if (auth_portal_find(ag, conn->conn_initiator_addr) == NULL) { + login_send_error(request, 0x02, 0x02); + log_errx(1, "initiator does not match allowed " + "initiator portals"); + } + log_debugx("initiator matches allowed initiator portals"); + } else { + log_debugx("auth-group does not define initiator portal " + "restrictions"); + } + + /* * Let's see if the initiator intends to do any kind of authentication * at all. */ Modified: head/usr.sbin/ctld/parse.y ============================================================================== --- head/usr.sbin/ctld/parse.y Tue Feb 11 10:59:57 2014 (r261753) +++ head/usr.sbin/ctld/parse.y Tue Feb 11 11:08:04 2014 (r261754) @@ -58,9 +58,9 @@ extern void yyrestart(FILE *); %} %token ALIAS AUTH_GROUP BACKEND BLOCKSIZE CHAP CHAP_MUTUAL CLOSING_BRACKET -%token DEBUG DEVICE_ID DISCOVERY_AUTH_GROUP LISTEN LISTEN_ISER LUN MAXPROC NUM -%token OPENING_BRACKET OPTION PATH PIDFILE PORTAL_GROUP SERIAL SIZE STR TARGET -%token TIMEOUT +%token DEBUG DEVICE_ID DISCOVERY_AUTH_GROUP INITIATOR_NAME INITIATOR_PORTAL +%token LISTEN LISTEN_ISER LUN MAXPROC NUM OPENING_BRACKET OPTION PATH PIDFILE +%token PORTAL_GROUP SERIAL SIZE STR TARGET TIMEOUT %union { @@ -148,6 +148,10 @@ auth_group_entry: auth_group_chap | auth_group_chap_mutual + | + auth_group_initiator_name + | + auth_group_initiator_portal ; auth_group_chap: CHAP STR STR @@ -176,6 +180,28 @@ auth_group_chap_mutual: CHAP_MUTUAL STR } ; +auth_group_initiator_name: INITIATOR_NAME STR + { + const struct auth_name *an; + + an = auth_name_new(auth_group, $2); + free($2); + if (an == NULL) + return (1); + } + ; + +auth_group_initiator_portal: INITIATOR_PORTAL STR + { + const struct auth_portal *ap; + + ap = auth_portal_new(auth_group, $2); + free($2); + if (ap == NULL) + return (1); + } + ; + portal_group_definition: PORTAL_GROUP portal_group_name OPENING_BRACKET portal_group_entries CLOSING_BRACKET { @@ -277,6 +303,10 @@ target_entry: | chap_mutual_statement | + initiator_name_statement + | + initiator_portal_statement + | portal_group_statement | lun_statement @@ -382,6 +412,60 @@ chap_mutual_statement: CHAP_MUTUAL STR S } ; +initiator_name_statement: INITIATOR_NAME STR + { + const struct auth_name *an; + + if (target->t_auth_group != NULL) { + if (target->t_auth_group->ag_name != NULL) { + log_warnx("cannot mix auth-group with " + "initiator-name for target \"%s\"", + target->t_iqn); + free($2); + return (1); + } + } else { + target->t_auth_group = auth_group_new(conf, NULL); + if (target->t_auth_group == NULL) { + free($2); + return (1); + } + target->t_auth_group->ag_target = target; + } + an = auth_name_new(target->t_auth_group, $2); + free($2); + if (an == NULL) + return (1); + } + ; + +initiator_portal_statement: INITIATOR_PORTAL STR + { + const struct auth_portal *ap; + + if (target->t_auth_group != NULL) { + if (target->t_auth_group->ag_name != NULL) { + log_warnx("cannot mix auth-group with " + "initiator-portal for target \"%s\"", + target->t_iqn); + free($2); + return (1); + } + } else { + target->t_auth_group = auth_group_new(conf, NULL); + if (target->t_auth_group == NULL) { + free($2); + return (1); + } + target->t_auth_group->ag_target = target; + } + ap = auth_portal_new(target->t_auth_group, $2); + free($2); + if (ap == NULL) + return (1); + } + ; + portal_group_statement: PORTAL_GROUP STR { if (target->t_portal_group != NULL) { Modified: head/usr.sbin/ctld/token.l ============================================================================== --- head/usr.sbin/ctld/token.l Tue Feb 11 10:59:57 2014 (r261753) +++ head/usr.sbin/ctld/token.l Tue Feb 11 11:08:04 2014 (r261754) @@ -57,6 +57,8 @@ chap-mutual { return CHAP_MUTUAL; } debug { return DEBUG; } device-id { return DEVICE_ID; } discovery-auth-group { return DISCOVERY_AUTH_GROUP; } +initiator-name { return INITIATOR_NAME; } +initiator-portal { return INITIATOR_PORTAL; } listen { return LISTEN; } listen-iser { return LISTEN_ISER; } lun { return LUN; } From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 11:10:02 2014 Return-Path: Delivered-To: svn-src-all@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 8972713F; Tue, 11 Feb 2014 11:10: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 66966151A; Tue, 11 Feb 2014 11:10:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BBA20w047785; Tue, 11 Feb 2014 11:10:02 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BBA2ul047784; Tue, 11 Feb 2014 11:10:02 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402111110.s1BBA2ul047784@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 11 Feb 2014 11:10:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261755 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 11:10:02 -0000 Author: trasz Date: Tue Feb 11 11:10:01 2014 New Revision: 261755 URL: http://svnweb.freebsd.org/changeset/base/261755 Log: Make function ordering slightly more logical; no functional changes. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctld.c Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Tue Feb 11 11:08:04 2014 (r261754) +++ head/usr.sbin/ctld/ctld.c Tue Feb 11 11:10:01 2014 (r261755) @@ -149,6 +149,126 @@ auth_find(struct auth_group *ag, const c return (NULL); } +static void +auth_check_secret_length(struct auth *auth) +{ + size_t len; + + len = strlen(auth->a_secret); + if (len > 16) { + if (auth->a_auth_group->ag_name != NULL) + log_warnx("secret for user \"%s\", auth-group \"%s\", " + "is too long; it should be at most 16 characters " + "long", auth->a_user, auth->a_auth_group->ag_name); + else + log_warnx("secret for user \"%s\", target \"%s\", " + "is too long; it should be at most 16 characters " + "long", auth->a_user, + auth->a_auth_group->ag_target->t_iqn); + } + if (len < 12) { + if (auth->a_auth_group->ag_name != NULL) + log_warnx("secret for user \"%s\", auth-group \"%s\", " + "is too short; it should be at least 12 characters " + "long", auth->a_user, + auth->a_auth_group->ag_name); + else + log_warnx("secret for user \"%s\", target \"%s\", " + "is too short; it should be at least 16 characters " + "long", auth->a_user, + auth->a_auth_group->ag_target->t_iqn); + } + + if (auth->a_mutual_secret != NULL) { + len = strlen(auth->a_secret); + if (len > 16) { + if (auth->a_auth_group->ag_name != NULL) + log_warnx("mutual secret for user \"%s\", " + "auth-group \"%s\", is too long; it should " + "be at most 16 characters long", + auth->a_user, auth->a_auth_group->ag_name); + else + log_warnx("mutual secret for user \"%s\", " + "target \"%s\", is too long; it should " + "be at most 16 characters long", + auth->a_user, + auth->a_auth_group->ag_target->t_iqn); + } + if (len < 12) { + if (auth->a_auth_group->ag_name != NULL) + log_warnx("mutual secret for user \"%s\", " + "auth-group \"%s\", is too short; it " + "should be at least 12 characters long", + auth->a_user, auth->a_auth_group->ag_name); + else + log_warnx("mutual secret for user \"%s\", " + "target \"%s\", is too short; it should be " + "at least 16 characters long", + auth->a_user, + auth->a_auth_group->ag_target->t_iqn); + } + } +} + +const struct auth * +auth_new_chap(struct auth_group *ag, const char *user, + const char *secret) +{ + struct auth *auth; + + if (ag->ag_type == AG_TYPE_UNKNOWN) + ag->ag_type = AG_TYPE_CHAP; + if (ag->ag_type != AG_TYPE_CHAP) { + if (ag->ag_name != NULL) + log_warnx("cannot mix \"chap\" authentication with " + "other types for auth-group \"%s\"", ag->ag_name); + else + log_warnx("cannot mix \"chap\" authentication with " + "other types for target \"%s\"", + ag->ag_target->t_iqn); + return (NULL); + } + + auth = auth_new(ag); + auth->a_user = checked_strdup(user); + auth->a_secret = checked_strdup(secret); + + auth_check_secret_length(auth); + + return (auth); +} + +const struct auth * +auth_new_chap_mutual(struct auth_group *ag, const char *user, + const char *secret, const char *user2, const char *secret2) +{ + struct auth *auth; + + if (ag->ag_type == AG_TYPE_UNKNOWN) + ag->ag_type = AG_TYPE_CHAP_MUTUAL; + if (ag->ag_type != AG_TYPE_CHAP_MUTUAL) { + if (ag->ag_name != NULL) + log_warnx("cannot mix \"chap-mutual\" authentication " + "with other types for auth-group \"%s\"", + ag->ag_name); + else + log_warnx("cannot mix \"chap-mutual\" authentication " + "with other types for target \"%s\"", + ag->ag_target->t_iqn); + return (NULL); + } + + auth = auth_new(ag); + auth->a_user = checked_strdup(user); + auth->a_secret = checked_strdup(secret); + auth->a_mutual_user = checked_strdup(user2); + auth->a_mutual_secret = checked_strdup(secret2); + + auth_check_secret_length(auth); + + return (auth); +} + const struct auth_name * auth_name_new(struct auth_group *ag, const char *name) { @@ -297,126 +417,6 @@ auth_group_find(struct conf *conf, const return (NULL); } -static void -auth_check_secret_length(struct auth *auth) -{ - size_t len; - - len = strlen(auth->a_secret); - if (len > 16) { - if (auth->a_auth_group->ag_name != NULL) - log_warnx("secret for user \"%s\", auth-group \"%s\", " - "is too long; it should be at most 16 characters " - "long", auth->a_user, auth->a_auth_group->ag_name); - else - log_warnx("secret for user \"%s\", target \"%s\", " - "is too long; it should be at most 16 characters " - "long", auth->a_user, - auth->a_auth_group->ag_target->t_iqn); - } - if (len < 12) { - if (auth->a_auth_group->ag_name != NULL) - log_warnx("secret for user \"%s\", auth-group \"%s\", " - "is too short; it should be at least 12 characters " - "long", auth->a_user, - auth->a_auth_group->ag_name); - else - log_warnx("secret for user \"%s\", target \"%s\", " - "is too short; it should be at least 16 characters " - "long", auth->a_user, - auth->a_auth_group->ag_target->t_iqn); - } - - if (auth->a_mutual_secret != NULL) { - len = strlen(auth->a_secret); - if (len > 16) { - if (auth->a_auth_group->ag_name != NULL) - log_warnx("mutual secret for user \"%s\", " - "auth-group \"%s\", is too long; it should " - "be at most 16 characters long", - auth->a_user, auth->a_auth_group->ag_name); - else - log_warnx("mutual secret for user \"%s\", " - "target \"%s\", is too long; it should " - "be at most 16 characters long", - auth->a_user, - auth->a_auth_group->ag_target->t_iqn); - } - if (len < 12) { - if (auth->a_auth_group->ag_name != NULL) - log_warnx("mutual secret for user \"%s\", " - "auth-group \"%s\", is too short; it " - "should be at least 12 characters long", - auth->a_user, auth->a_auth_group->ag_name); - else - log_warnx("mutual secret for user \"%s\", " - "target \"%s\", is too short; it should be " - "at least 16 characters long", - auth->a_user, - auth->a_auth_group->ag_target->t_iqn); - } - } -} - -const struct auth * -auth_new_chap(struct auth_group *ag, const char *user, - const char *secret) -{ - struct auth *auth; - - if (ag->ag_type == AG_TYPE_UNKNOWN) - ag->ag_type = AG_TYPE_CHAP; - if (ag->ag_type != AG_TYPE_CHAP) { - if (ag->ag_name != NULL) - log_warnx("cannot mix \"chap\" authentication with " - "other types for auth-group \"%s\"", ag->ag_name); - else - log_warnx("cannot mix \"chap\" authentication with " - "other types for target \"%s\"", - ag->ag_target->t_iqn); - return (NULL); - } - - auth = auth_new(ag); - auth->a_user = checked_strdup(user); - auth->a_secret = checked_strdup(secret); - - auth_check_secret_length(auth); - - return (auth); -} - -const struct auth * -auth_new_chap_mutual(struct auth_group *ag, const char *user, - const char *secret, const char *user2, const char *secret2) -{ - struct auth *auth; - - if (ag->ag_type == AG_TYPE_UNKNOWN) - ag->ag_type = AG_TYPE_CHAP_MUTUAL; - if (ag->ag_type != AG_TYPE_CHAP_MUTUAL) { - if (ag->ag_name != NULL) - log_warnx("cannot mix \"chap-mutual\" authentication " - "with other types for auth-group \"%s\"", - ag->ag_name); - else - log_warnx("cannot mix \"chap-mutual\" authentication " - "with other types for target \"%s\"", - ag->ag_target->t_iqn); - return (NULL); - } - - auth = auth_new(ag); - auth->a_user = checked_strdup(user); - auth->a_secret = checked_strdup(secret); - auth->a_mutual_user = checked_strdup(user2); - auth->a_mutual_secret = checked_strdup(secret2); - - auth_check_secret_length(auth); - - return (auth); -} - static struct portal * portal_new(struct portal_group *pg) { From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 11:11:38 2014 Return-Path: Delivered-To: svn-src-all@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 82737295; Tue, 11 Feb 2014 11:11: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 5D13B15A0; Tue, 11 Feb 2014 11:11:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BBBcKt050639; Tue, 11 Feb 2014 11:11:38 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BBBcQA050638; Tue, 11 Feb 2014 11:11:38 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402111111.s1BBBcQA050638@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 11 Feb 2014 11:11:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261756 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 11:11:38 -0000 Author: trasz Date: Tue Feb 11 11:11:37 2014 New Revision: 261756 URL: http://svnweb.freebsd.org/changeset/base/261756 Log: Yacc cleanup; no functional changes. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/parse.y Modified: head/usr.sbin/ctld/parse.y ============================================================================== --- head/usr.sbin/ctld/parse.y Tue Feb 11 11:10:01 2014 (r261755) +++ head/usr.sbin/ctld/parse.y Tue Feb 11 11:11:37 2014 (r261756) @@ -79,40 +79,40 @@ statements: ; statement: - debug_statement + debug | - timeout_statement + timeout | - maxproc_statement + maxproc | - pidfile_statement + pidfile | - auth_group_definition + auth_group | - portal_group_definition + portal_group | - target_statement + target ; -debug_statement: DEBUG NUM +debug: DEBUG NUM { conf->conf_debug = $2; } ; -timeout_statement: TIMEOUT NUM +timeout: TIMEOUT NUM { conf->conf_timeout = $2; } ; -maxproc_statement: MAXPROC NUM +maxproc: MAXPROC NUM { conf->conf_maxproc = $2; } ; -pidfile_statement: PIDFILE STR +pidfile: PIDFILE STR { if (conf->conf_pidfile_path != NULL) { log_warnx("pidfile specified more than once"); @@ -123,7 +123,7 @@ pidfile_statement: PIDFILE STR } ; -auth_group_definition: AUTH_GROUP auth_group_name +auth_group: AUTH_GROUP auth_group_name OPENING_BRACKET auth_group_entries CLOSING_BRACKET { auth_group = NULL; @@ -202,7 +202,7 @@ auth_group_initiator_portal: INITIATOR_P } ; -portal_group_definition: PORTAL_GROUP portal_group_name +portal_group: PORTAL_GROUP portal_group_name OPENING_BRACKET portal_group_entries CLOSING_BRACKET { portal_group = NULL; @@ -273,14 +273,14 @@ portal_group_listen_iser: LISTEN_ISER ST } ; -target_statement: TARGET target_iqn +target: TARGET target_name OPENING_BRACKET target_entries CLOSING_BRACKET { target = NULL; } ; -target_iqn: STR +target_name: STR { target = target_new(conf, $1); free($1); @@ -295,24 +295,24 @@ target_entries: ; target_entry: - alias_statement + target_alias | - auth_group_statement + target_auth_group | - chap_statement + target_chap | - chap_mutual_statement + target_chap_mutual | - initiator_name_statement + target_initiator_name | - initiator_portal_statement + target_initiator_portal | - portal_group_statement + target_portal_group | - lun_statement + target_lun ; -alias_statement: ALIAS STR +target_alias: ALIAS STR { if (target->t_alias != NULL) { log_warnx("alias for target \"%s\" " @@ -323,7 +323,7 @@ alias_statement: ALIAS STR } ; -auth_group_statement: AUTH_GROUP STR +target_auth_group: AUTH_GROUP STR { if (target->t_auth_group != NULL) { if (target->t_auth_group->ag_name != NULL) @@ -345,7 +345,7 @@ auth_group_statement: AUTH_GROUP STR } ; -chap_statement: CHAP STR STR +target_chap: CHAP STR STR { const struct auth *ca; @@ -375,7 +375,7 @@ chap_statement: CHAP STR STR } ; -chap_mutual_statement: CHAP_MUTUAL STR STR STR STR +target_chap_mutual: CHAP_MUTUAL STR STR STR STR { const struct auth *ca; @@ -412,7 +412,7 @@ chap_mutual_statement: CHAP_MUTUAL STR S } ; -initiator_name_statement: INITIATOR_NAME STR +target_initiator_name: INITIATOR_NAME STR { const struct auth_name *an; @@ -439,7 +439,7 @@ initiator_name_statement: INITIATOR_NAME } ; -initiator_portal_statement: INITIATOR_PORTAL STR +target_initiator_portal: INITIATOR_PORTAL STR { const struct auth_portal *ap; @@ -466,7 +466,7 @@ initiator_portal_statement: INITIATOR_PO } ; -portal_group_statement: PORTAL_GROUP STR +target_portal_group: PORTAL_GROUP STR { if (target->t_portal_group != NULL) { log_warnx("portal-group for target \"%s\" " @@ -485,8 +485,8 @@ portal_group_statement: PORTAL_GROUP STR } ; -lun_statement: LUN lun_number - OPENING_BRACKET lun_statement_entries CLOSING_BRACKET +target_lun: LUN lun_number + OPENING_BRACKET lun_entries CLOSING_BRACKET { lun = NULL; } @@ -500,28 +500,28 @@ lun_number: NUM } ; -lun_statement_entries: +lun_entries: | - lun_statement_entries lun_statement_entry + lun_entries lun_entry ; -lun_statement_entry: - backend_statement +lun_entry: + lun_backend | - blocksize_statement + lun_blocksize | - device_id_statement + lun_device_id | - option_statement + lun_option | - path_statement + lun_path | - serial_statement + lun_serial | - size_statement + lun_size ; -backend_statement: BACKEND STR +lun_backend: BACKEND STR { if (lun->l_backend != NULL) { log_warnx("backend for lun %d, target \"%s\" " @@ -535,7 +535,7 @@ backend_statement: BACKEND STR } ; -blocksize_statement: BLOCKSIZE NUM +lun_blocksize: BLOCKSIZE NUM { if (lun->l_blocksize != 0) { log_warnx("blocksize for lun %d, target \"%s\" " @@ -547,7 +547,7 @@ blocksize_statement: BLOCKSIZE NUM } ; -device_id_statement: DEVICE_ID STR +lun_device_id: DEVICE_ID STR { if (lun->l_device_id != NULL) { log_warnx("device_id for lun %d, target \"%s\" " @@ -561,7 +561,7 @@ device_id_statement: DEVICE_ID STR } ; -option_statement: OPTION STR STR +lun_option: OPTION STR STR { struct lun_option *clo; @@ -573,7 +573,7 @@ option_statement: OPTION STR STR } ; -path_statement: PATH STR +lun_path: PATH STR { if (lun->l_path != NULL) { log_warnx("path for lun %d, target \"%s\" " @@ -587,7 +587,7 @@ path_statement: PATH STR } ; -serial_statement: SERIAL STR +lun_serial: SERIAL STR { if (lun->l_serial != NULL) { log_warnx("serial for lun %d, target \"%s\" " @@ -601,7 +601,7 @@ serial_statement: SERIAL STR } ; -size_statement: SIZE NUM +lun_size: SIZE NUM { if (lun->l_size != 0) { log_warnx("size for lun %d, target \"%s\" " From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 11:14:51 2014 Return-Path: Delivered-To: svn-src-all@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 91D6F528; Tue, 11 Feb 2014 11:14: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 7B3F815D7; Tue, 11 Feb 2014 11:14:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BBEpCH051022; Tue, 11 Feb 2014 11:14:51 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BBEoY6051016; Tue, 11 Feb 2014 11:14:50 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402111114.s1BBEoY6051016@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 11 Feb 2014 11:14:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261757 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 11:14:51 -0000 Author: trasz Date: Tue Feb 11 11:14:50 2014 New Revision: 261757 URL: http://svnweb.freebsd.org/changeset/base/261757 Log: Rename a variable, no functional changes. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctld.c head/usr.sbin/ctld/ctld.h head/usr.sbin/ctld/discovery.c head/usr.sbin/ctld/kernel.c head/usr.sbin/ctld/login.c head/usr.sbin/ctld/parse.y Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Tue Feb 11 11:11:37 2014 (r261756) +++ head/usr.sbin/ctld/ctld.c Tue Feb 11 11:14:50 2014 (r261757) @@ -164,7 +164,7 @@ auth_check_secret_length(struct auth *au log_warnx("secret for user \"%s\", target \"%s\", " "is too long; it should be at most 16 characters " "long", auth->a_user, - auth->a_auth_group->ag_target->t_iqn); + auth->a_auth_group->ag_target->t_name); } if (len < 12) { if (auth->a_auth_group->ag_name != NULL) @@ -176,7 +176,7 @@ auth_check_secret_length(struct auth *au log_warnx("secret for user \"%s\", target \"%s\", " "is too short; it should be at least 16 characters " "long", auth->a_user, - auth->a_auth_group->ag_target->t_iqn); + auth->a_auth_group->ag_target->t_name); } if (auth->a_mutual_secret != NULL) { @@ -192,7 +192,7 @@ auth_check_secret_length(struct auth *au "target \"%s\", is too long; it should " "be at most 16 characters long", auth->a_user, - auth->a_auth_group->ag_target->t_iqn); + auth->a_auth_group->ag_target->t_name); } if (len < 12) { if (auth->a_auth_group->ag_name != NULL) @@ -205,7 +205,7 @@ auth_check_secret_length(struct auth *au "target \"%s\", is too short; it should be " "at least 16 characters long", auth->a_user, - auth->a_auth_group->ag_target->t_iqn); + auth->a_auth_group->ag_target->t_name); } } } @@ -225,7 +225,7 @@ auth_new_chap(struct auth_group *ag, con else log_warnx("cannot mix \"chap\" authentication with " "other types for target \"%s\"", - ag->ag_target->t_iqn); + ag->ag_target->t_name); return (NULL); } @@ -254,7 +254,7 @@ auth_new_chap_mutual(struct auth_group * else log_warnx("cannot mix \"chap-mutual\" authentication " "with other types for target \"%s\"", - ag->ag_target->t_iqn); + ag->ag_target->t_name); return (NULL); } @@ -686,31 +686,31 @@ valid_iscsi_name(const char *name) } struct target * -target_new(struct conf *conf, const char *iqn) +target_new(struct conf *conf, const char *name) { struct target *targ; int i, len; - targ = target_find(conf, iqn); + targ = target_find(conf, name); if (targ != NULL) { - log_warnx("duplicated target \"%s\"", iqn); + log_warnx("duplicated target \"%s\"", name); return (NULL); } - if (valid_iscsi_name(iqn) == false) { - log_warnx("target name \"%s\" is invalid", iqn); + if (valid_iscsi_name(name) == false) { + log_warnx("target name \"%s\" is invalid", name); return (NULL); } targ = calloc(1, sizeof(*targ)); if (targ == NULL) log_err(1, "calloc"); - targ->t_iqn = checked_strdup(iqn); + targ->t_name = checked_strdup(name); /* * RFC 3722 requires us to normalize the name to lowercase. */ - len = strlen(iqn); + len = strlen(name); for (i = 0; i < len; i++) - targ->t_iqn[i] = tolower(targ->t_iqn[i]); + targ->t_name[i] = tolower(targ->t_name[i]); TAILQ_INIT(&targ->t_luns); targ->t_conf = conf; @@ -728,17 +728,17 @@ target_delete(struct target *targ) TAILQ_FOREACH_SAFE(lun, &targ->t_luns, l_next, tmp) lun_delete(lun); - free(targ->t_iqn); + free(targ->t_name); free(targ); } struct target * -target_find(struct conf *conf, const char *iqn) +target_find(struct conf *conf, const char *name) { struct target *targ; TAILQ_FOREACH(targ, &conf->conf_targets, t_next) { - if (strcasecmp(targ->t_iqn, iqn) == 0) + if (strcasecmp(targ->t_name, name) == 0) return (targ); } @@ -753,7 +753,7 @@ lun_new(struct target *targ, int lun_id) lun = lun_find(targ, lun_id); if (lun != NULL) { log_warnx("duplicated lun %d for target \"%s\"", - lun_id, targ->t_iqn); + lun_id, targ->t_name); return (NULL); } @@ -854,7 +854,7 @@ lun_option_new(struct lun *lun, const ch lo = lun_option_find(lun, name); if (lo != NULL) { log_warnx("duplicated lun option %s for lun %d, target \"%s\"", - name, lun->l_lun, lun->l_target->t_iqn); + name, lun->l_lun, lun->l_target->t_name); return (NULL); } @@ -958,7 +958,7 @@ conf_print(struct conf *conf) fprintf(stderr, "}\n"); } TAILQ_FOREACH(targ, &conf->conf_targets, t_next) { - fprintf(stderr, "target %s {\n", targ->t_iqn); + fprintf(stderr, "target %s {\n", targ->t_name); if (targ->t_alias != NULL) fprintf(stderr, "\t alias %s\n", targ->t_alias); TAILQ_FOREACH(lun, &targ->t_luns, l_next) { @@ -985,39 +985,39 @@ conf_verify_lun(struct lun *lun) if (strcmp(lun->l_backend, "block") == 0) { if (lun->l_path == NULL) { log_warnx("missing path for lun %d, target \"%s\"", - lun->l_lun, lun->l_target->t_iqn); + lun->l_lun, lun->l_target->t_name); return (1); } } else if (strcmp(lun->l_backend, "ramdisk") == 0) { if (lun->l_size == 0) { log_warnx("missing size for ramdisk-backed lun %d, " - "target \"%s\"", lun->l_lun, lun->l_target->t_iqn); + "target \"%s\"", lun->l_lun, lun->l_target->t_name); return (1); } if (lun->l_path != NULL) { log_warnx("path must not be specified " "for ramdisk-backed lun %d, target \"%s\"", - lun->l_lun, lun->l_target->t_iqn); + lun->l_lun, lun->l_target->t_name); return (1); } } if (lun->l_lun < 0 || lun->l_lun > 255) { log_warnx("invalid lun number for lun %d, target \"%s\"; " "must be between 0 and 255", lun->l_lun, - lun->l_target->t_iqn); + lun->l_target->t_name); return (1); } if (lun->l_blocksize == 0) { lun_set_blocksize(lun, DEFAULT_BLOCKSIZE); } else if (lun->l_blocksize < 0) { log_warnx("invalid blocksize for lun %d, target \"%s\"; " - "must be larger than 0", lun->l_lun, lun->l_target->t_iqn); + "must be larger than 0", lun->l_lun, lun->l_target->t_name); return (1); } if (lun->l_size != 0 && lun->l_size % lun->l_blocksize != 0) { log_warnx("invalid size for lun %d, target \"%s\"; " "must be multiple of blocksize", lun->l_lun, - lun->l_target->t_iqn); + lun->l_target->t_name); return (1); } TAILQ_FOREACH(targ2, &lun->l_target->t_conf->conf_targets, t_next) { @@ -1029,8 +1029,8 @@ conf_verify_lun(struct lun *lun) log_debugx("WARNING: path \"%s\" duplicated " "between lun %d, target \"%s\", and " "lun %d, target \"%s\"", lun->l_path, - lun->l_lun, lun->l_target->t_iqn, - lun2->l_lun, lun2->l_target->t_iqn); + lun->l_lun, lun->l_target->t_name, + lun2->l_lun, lun2->l_target->t_name); } } } @@ -1055,7 +1055,7 @@ conf_verify(struct conf *conf) if (targ->t_auth_group == NULL) { log_warnx("missing authentication for target \"%s\"; " "must specify either \"auth-group\", \"chap\", " - "or \"chap-mutual\"", targ->t_iqn); + "or \"chap-mutual\"", targ->t_name); return (1); } if (targ->t_portal_group == NULL) { @@ -1073,7 +1073,7 @@ conf_verify(struct conf *conf) } if (!found_lun0) { log_warnx("mandatory LUN 0 not configured " - "for target \"%s\"", targ->t_iqn); + "for target \"%s\"", targ->t_name); return (1); } } @@ -1169,20 +1169,20 @@ conf_apply(struct conf *oldconf, struct * First, remove any targets present in the old configuration * and missing in the new one. */ - newtarg = target_find(newconf, oldtarg->t_iqn); + newtarg = target_find(newconf, oldtarg->t_name); if (newtarg == NULL) { TAILQ_FOREACH_SAFE(oldlun, &oldtarg->t_luns, l_next, tmplun) { log_debugx("target %s not found in the " "configuration file; removing its lun %d, " "backed by CTL lun %d", - oldtarg->t_iqn, oldlun->l_lun, + oldtarg->t_name, oldlun->l_lun, oldlun->l_ctl_lun); error = kernel_lun_remove(oldlun); if (error != 0) { log_warnx("failed to remove lun %d, " "target %s, CTL lun %d", - oldlun->l_lun, oldtarg->t_iqn, + oldlun->l_lun, oldtarg->t_name, oldlun->l_ctl_lun); cumulated_error++; } @@ -1201,13 +1201,13 @@ conf_apply(struct conf *oldconf, struct if (newlun == NULL) { log_debugx("lun %d, target %s, CTL lun %d " "not found in the configuration file; " - "removing", oldlun->l_lun, oldtarg->t_iqn, + "removing", oldlun->l_lun, oldtarg->t_name, oldlun->l_ctl_lun); error = kernel_lun_remove(oldlun); if (error != 0) { log_warnx("failed to remove lun %d, " "target %s, CTL lun %d", - oldlun->l_lun, oldtarg->t_iqn, + oldlun->l_lun, oldtarg->t_name, oldlun->l_ctl_lun); cumulated_error++; } @@ -1224,14 +1224,14 @@ conf_apply(struct conf *oldconf, struct if (strcmp(newlun->l_backend, oldlun->l_backend) != 0) { log_debugx("backend for lun %d, target %s, " "CTL lun %d changed; removing", - oldlun->l_lun, oldtarg->t_iqn, + oldlun->l_lun, oldtarg->t_name, oldlun->l_ctl_lun); changed = 1; } if (oldlun->l_blocksize != newlun->l_blocksize) { log_debugx("blocksize for lun %d, target %s, " "CTL lun %d changed; removing", - oldlun->l_lun, oldtarg->t_iqn, + oldlun->l_lun, oldtarg->t_name, oldlun->l_ctl_lun); changed = 1; } @@ -1241,7 +1241,7 @@ conf_apply(struct conf *oldconf, struct 0)) { log_debugx("device-id for lun %d, target %s, " "CTL lun %d changed; removing", - oldlun->l_lun, oldtarg->t_iqn, + oldlun->l_lun, oldtarg->t_name, oldlun->l_ctl_lun); changed = 1; } @@ -1250,7 +1250,7 @@ conf_apply(struct conf *oldconf, struct strcmp(oldlun->l_path, newlun->l_path) != 0)) { log_debugx("path for lun %d, target %s, " "CTL lun %d, changed; removing", - oldlun->l_lun, oldtarg->t_iqn, + oldlun->l_lun, oldtarg->t_name, oldlun->l_ctl_lun); changed = 1; } @@ -1259,7 +1259,7 @@ conf_apply(struct conf *oldconf, struct strcmp(oldlun->l_serial, newlun->l_serial) != 0)) { log_debugx("serial for lun %d, target %s, " "CTL lun %d changed; removing", - oldlun->l_lun, oldtarg->t_iqn, + oldlun->l_lun, oldtarg->t_name, oldlun->l_ctl_lun); changed = 1; } @@ -1268,7 +1268,7 @@ conf_apply(struct conf *oldconf, struct if (error != 0) { log_warnx("failed to remove lun %d, " "target %s, CTL lun %d", - oldlun->l_lun, oldtarg->t_iqn, + oldlun->l_lun, oldtarg->t_name, oldlun->l_ctl_lun); cumulated_error++; } @@ -1284,7 +1284,7 @@ conf_apply(struct conf *oldconf, struct * Now add new targets or modify existing ones. */ TAILQ_FOREACH(newtarg, &newconf->conf_targets, t_next) { - oldtarg = target_find(oldconf, newtarg->t_iqn); + oldtarg = target_find(oldconf, newtarg->t_name); TAILQ_FOREACH(newlun, &newtarg->t_luns, l_next) { if (oldtarg != NULL) { @@ -1294,7 +1294,7 @@ conf_apply(struct conf *oldconf, struct log_debugx("resizing lun %d, " "target %s, CTL lun %d", newlun->l_lun, - newtarg->t_iqn, + newtarg->t_name, newlun->l_ctl_lun); error = kernel_lun_resize(newlun); @@ -1304,7 +1304,7 @@ conf_apply(struct conf *oldconf, struct "target %s, " "CTL lun %d", newlun->l_lun, - newtarg->t_iqn, + newtarg->t_name, newlun->l_lun); cumulated_error++; } @@ -1313,11 +1313,11 @@ conf_apply(struct conf *oldconf, struct } } log_debugx("adding lun %d, target %s", - newlun->l_lun, newtarg->t_iqn); + newlun->l_lun, newtarg->t_name); error = kernel_lun_add(newlun); if (error != 0) { log_warnx("failed to add lun %d, target %s", - newlun->l_lun, newtarg->t_iqn); + newlun->l_lun, newtarg->t_name); cumulated_error++; } } Modified: head/usr.sbin/ctld/ctld.h ============================================================================== --- head/usr.sbin/ctld/ctld.h Tue Feb 11 11:11:37 2014 (r261756) +++ head/usr.sbin/ctld/ctld.h Tue Feb 11 11:14:50 2014 (r261757) @@ -131,7 +131,7 @@ struct target { struct conf *t_conf; struct auth_group *t_auth_group; struct portal_group *t_portal_group; - char *t_iqn; + char *t_name; char *t_alias; }; @@ -224,10 +224,10 @@ struct portal_group *portal_group_find(s int portal_group_add_listen(struct portal_group *pg, const char *listen, bool iser); -struct target *target_new(struct conf *conf, const char *iqn); +struct target *target_new(struct conf *conf, const char *name); void target_delete(struct target *target); struct target *target_find(struct conf *conf, - const char *iqn); + const char *name); struct lun *lun_new(struct target *target, int lun_id); void lun_delete(struct lun *lun); Modified: head/usr.sbin/ctld/discovery.c ============================================================================== --- head/usr.sbin/ctld/discovery.c Tue Feb 11 11:11:37 2014 (r261756) +++ head/usr.sbin/ctld/discovery.c Tue Feb 11 11:14:50 2014 (r261757) @@ -183,10 +183,10 @@ discovery(struct connection *conn) conn->conn_portal->p_portal_group) { log_debugx("not returning target \"%s\"; " "belongs to a different portal group", - targ->t_iqn); + targ->t_name); continue; } - keys_add(response_keys, "TargetName", targ->t_iqn); + keys_add(response_keys, "TargetName", targ->t_name); } } else { targ = target_find(conn->conn_portal->p_portal_group->pg_conf, @@ -195,7 +195,7 @@ discovery(struct connection *conn) log_debugx("initiator requested information on unknown " "target \"%s\"; returning nothing", send_targets); } else { - keys_add(response_keys, "TargetName", targ->t_iqn); + keys_add(response_keys, "TargetName", targ->t_name); } } keys_save(response_keys, response); Modified: head/usr.sbin/ctld/kernel.c ============================================================================== --- head/usr.sbin/ctld/kernel.c Tue Feb 11 11:11:37 2014 (r261756) +++ head/usr.sbin/ctld/kernel.c Tue Feb 11 11:14:50 2014 (r261757) @@ -352,7 +352,7 @@ retry: log_warnx("found CTL lun %ju, backing lun %d, target " "%s, also backed by CTL lun %d; ignoring", (uintmax_t) lun->lun_id, cl->l_lun, - cl->l_target->t_iqn, cl->l_ctl_lun); + cl->l_target->t_name, cl->l_ctl_lun); continue; } @@ -382,7 +382,7 @@ retry: log_warnx("unable to add CTL lun option %s " "for CTL lun %ju for lun %d, target %s", nv->name, (uintmax_t) lun->lun_id, - cl->l_lun, cl->l_target->t_iqn); + cl->l_lun, cl->l_target->t_name); } } @@ -434,10 +434,10 @@ kernel_lun_add(struct lun *lun) lo = lun_option_find(lun, "cfiscsi_target"); if (lo != NULL) { - lun_option_set(lo, lun->l_target->t_iqn); + lun_option_set(lo, lun->l_target->t_name); } else { lo = lun_option_new(lun, "cfiscsi_target", - lun->l_target->t_iqn); + lun->l_target->t_name); assert(lo != NULL); } @@ -598,7 +598,7 @@ kernel_handoff(struct connection *conn) conn->conn_initiator_alias, sizeof(req.data.handoff.initiator_alias)); } strlcpy(req.data.handoff.target_name, - conn->conn_target->t_iqn, sizeof(req.data.handoff.target_name)); + conn->conn_target->t_name, sizeof(req.data.handoff.target_name)); req.data.handoff.socket = conn->conn_socket; req.data.handoff.portal_group_tag = conn->conn_portal->p_portal_group->pg_tag; Modified: head/usr.sbin/ctld/login.c ============================================================================== --- head/usr.sbin/ctld/login.c Tue Feb 11 11:11:37 2014 (r261756) +++ head/usr.sbin/ctld/login.c Tue Feb 11 11:14:50 2014 (r261757) @@ -918,11 +918,11 @@ login(struct connection *conn) if (ag->ag_name != NULL) { log_debugx("initiator requests to connect " "to target \"%s\"; auth-group \"%s\"", - conn->conn_target->t_iqn, + conn->conn_target->t_name, conn->conn_target->t_auth_group->ag_name); } else { log_debugx("initiator requests to connect " - "to target \"%s\"", conn->conn_target->t_iqn); + "to target \"%s\"", conn->conn_target->t_name); } } else { assert(conn->conn_session_type == CONN_SESSION_TYPE_DISCOVERY); Modified: head/usr.sbin/ctld/parse.y ============================================================================== --- head/usr.sbin/ctld/parse.y Tue Feb 11 11:11:37 2014 (r261756) +++ head/usr.sbin/ctld/parse.y Tue Feb 11 11:14:50 2014 (r261757) @@ -316,7 +316,7 @@ target_alias: ALIAS STR { if (target->t_alias != NULL) { log_warnx("alias for target \"%s\" " - "specified more than once", target->t_iqn); + "specified more than once", target->t_name); return (1); } target->t_alias = $2; @@ -328,17 +328,17 @@ target_auth_group: AUTH_GROUP STR if (target->t_auth_group != NULL) { if (target->t_auth_group->ag_name != NULL) log_warnx("auth-group for target \"%s\" " - "specified more than once", target->t_iqn); + "specified more than once", target->t_name); else log_warnx("cannot mix auth-group with explicit " "authorisations for target \"%s\"", - target->t_iqn); + target->t_name); return (1); } target->t_auth_group = auth_group_find(conf, $2); if (target->t_auth_group == NULL) { log_warnx("unknown auth-group \"%s\" for target " - "\"%s\"", $2, target->t_iqn); + "\"%s\"", $2, target->t_name); return (1); } free($2); @@ -353,7 +353,7 @@ target_chap: CHAP STR STR if (target->t_auth_group->ag_name != NULL) { log_warnx("cannot mix auth-group with explicit " "authorisations for target \"%s\"", - target->t_iqn); + target->t_name); free($2); free($3); return (1); @@ -383,7 +383,7 @@ target_chap_mutual: CHAP_MUTUAL STR STR if (target->t_auth_group->ag_name != NULL) { log_warnx("cannot mix auth-group with explicit " "authorisations for target \"%s\"", - target->t_iqn); + target->t_name); free($2); free($3); free($4); @@ -420,7 +420,7 @@ target_initiator_name: INITIATOR_NAME ST if (target->t_auth_group->ag_name != NULL) { log_warnx("cannot mix auth-group with " "initiator-name for target \"%s\"", - target->t_iqn); + target->t_name); free($2); return (1); } @@ -447,7 +447,7 @@ target_initiator_portal: INITIATOR_PORTA if (target->t_auth_group->ag_name != NULL) { log_warnx("cannot mix auth-group with " "initiator-portal for target \"%s\"", - target->t_iqn); + target->t_name); free($2); return (1); } @@ -470,14 +470,14 @@ target_portal_group: PORTAL_GROUP STR { if (target->t_portal_group != NULL) { log_warnx("portal-group for target \"%s\" " - "specified more than once", target->t_iqn); + "specified more than once", target->t_name); free($2); return (1); } target->t_portal_group = portal_group_find(conf, $2); if (target->t_portal_group == NULL) { log_warnx("unknown portal-group \"%s\" for target " - "\"%s\"", $2, target->t_iqn); + "\"%s\"", $2, target->t_name); free($2); return (1); } @@ -526,7 +526,7 @@ lun_backend: BACKEND STR if (lun->l_backend != NULL) { log_warnx("backend for lun %d, target \"%s\" " "specified more than once", - lun->l_lun, target->t_iqn); + lun->l_lun, target->t_name); free($2); return (1); } @@ -540,7 +540,7 @@ lun_blocksize: BLOCKSIZE NUM if (lun->l_blocksize != 0) { log_warnx("blocksize for lun %d, target \"%s\" " "specified more than once", - lun->l_lun, target->t_iqn); + lun->l_lun, target->t_name); return (1); } lun_set_blocksize(lun, $2); @@ -552,7 +552,7 @@ lun_device_id: DEVICE_ID STR if (lun->l_device_id != NULL) { log_warnx("device_id for lun %d, target \"%s\" " "specified more than once", - lun->l_lun, target->t_iqn); + lun->l_lun, target->t_name); free($2); return (1); } @@ -578,7 +578,7 @@ lun_path: PATH STR if (lun->l_path != NULL) { log_warnx("path for lun %d, target \"%s\" " "specified more than once", - lun->l_lun, target->t_iqn); + lun->l_lun, target->t_name); free($2); return (1); } @@ -592,7 +592,7 @@ lun_serial: SERIAL STR if (lun->l_serial != NULL) { log_warnx("serial for lun %d, target \"%s\" " "specified more than once", - lun->l_lun, target->t_iqn); + lun->l_lun, target->t_name); free($2); return (1); } @@ -606,7 +606,7 @@ lun_size: SIZE NUM if (lun->l_size != 0) { log_warnx("size for lun %d, target \"%s\" " "specified more than once", - lun->l_lun, target->t_iqn); + lun->l_lun, target->t_name); return (1); } lun_set_size(lun, $2); From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 11:26:06 2014 Return-Path: Delivered-To: svn-src-all@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 8DCD7814; Tue, 11 Feb 2014 11:26: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 6BAAF168F; Tue, 11 Feb 2014 11:26:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BBQ6qV055009; Tue, 11 Feb 2014 11:26:06 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BBQ58T055003; Tue, 11 Feb 2014 11:26:05 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402111126.s1BBQ58T055003@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 11 Feb 2014 11:26:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261758 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 11:26:06 -0000 Author: trasz Date: Tue Feb 11 11:26:05 2014 New Revision: 261758 URL: http://svnweb.freebsd.org/changeset/base/261758 Log: Add auth-type. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctl.conf.5 head/usr.sbin/ctld/ctld.c head/usr.sbin/ctld/ctld.h head/usr.sbin/ctld/parse.y head/usr.sbin/ctld/token.l Modified: head/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- head/usr.sbin/ctld/ctl.conf.5 Tue Feb 11 11:14:50 2014 (r261757) +++ head/usr.sbin/ctld/ctl.conf.5 Tue Feb 11 11:26:05 2014 (r261758) @@ -101,6 +101,11 @@ Setting it to 0 disables the timeout. .Ss auth-group level The following statements are available at the auth-group level: .Bl -tag -width indent +.It Ic auth-type Ao Ar type Ac +Specifies authentication type. +Type can be either "none", "chap", or "chap-mutual". +In most cases it is not neccessary to set the type using this clause; +it is usually used to disable authentication for a given auth-group. .It Ic chap Ao Ar user Ac Aq Ar secret Specifies CHAP authentication credentials. .It Ic chap-mutual Ao Ar user Ac Ao Ar secret Ac Ao Ar mutualuser Ac Aq Ar mutualsecret @@ -147,6 +152,13 @@ There is no default; every target must u or chap, or chap-mutual statements. A special auth-group, "no-authentication", may be used to permit access without authentication. +.It Ic auth-type Ao Ar type Ac +Specifies authentication type. +Type can be either "none", "chap", or "chap-mutual". +In most cases it is not neccessary to set the type using this clause; +it is usually used to disable authentication for a given target. +This clause is mutually exclusive with auth-group; one cannot use +both in a single target. .It Ic chap Ao Ar user Ac Aq Ar secret Specifies CHAP authentication credentials. Note that targets must use either auth-group, or chap, Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Tue Feb 11 11:14:50 2014 (r261757) +++ head/usr.sbin/ctld/ctld.c Tue Feb 11 11:26:05 2014 (r261758) @@ -417,6 +417,58 @@ auth_group_find(struct conf *conf, const return (NULL); } +static int +auth_group_set_type(struct auth_group *ag, int type) +{ + + if (ag->ag_type == AG_TYPE_UNKNOWN) { + ag->ag_type = type; + return (0); + } + + if (ag->ag_type == type) + return (0); + + return (1); +} + +int +auth_group_set_type_str(struct auth_group *ag, const char *str) +{ + int error, type; + + if (strcmp(str, "none") == 0) { + type = AG_TYPE_NO_AUTHENTICATION; + } else if (strcmp(str, "chap") == 0) { + type = AG_TYPE_CHAP; + } else if (strcmp(str, "chap-mutual") == 0) { + type = AG_TYPE_CHAP_MUTUAL; + } else { + if (ag->ag_name != NULL) + log_warnx("invalid auth-type \"%s\" for auth-group " + "\"%s\"", str, ag->ag_name); + else + log_warnx("invalid auth-type \"%s\" for target " + "\"%s\"", str, ag->ag_target->t_name); + return (1); + } + + error = auth_group_set_type(ag, type); + if (error != 0) { + if (ag->ag_name != NULL) + log_warnx("cannot set auth-type to \"%s\" for " + "auth-group \"%s\"; already has a different " + "type", str, ag->ag_name); + else + log_warnx("cannot set auth-type to \"%s\" for target " + "\"%s\"; already has a different type", + str, ag->ag_target->t_name); + return (1); + } + + return (error); +} + static struct portal * portal_new(struct portal_group *pg) { Modified: head/usr.sbin/ctld/ctld.h ============================================================================== --- head/usr.sbin/ctld/ctld.h Tue Feb 11 11:14:50 2014 (r261757) +++ head/usr.sbin/ctld/ctld.h Tue Feb 11 11:26:05 2014 (r261758) @@ -197,6 +197,8 @@ int conf_verify(struct conf *conf); struct auth_group *auth_group_new(struct conf *conf, const char *name); void auth_group_delete(struct auth_group *ag); struct auth_group *auth_group_find(struct conf *conf, const char *name); +int auth_group_set_type_str(struct auth_group *ag, + const char *type); const struct auth *auth_new_chap(struct auth_group *ag, const char *user, const char *secret); Modified: head/usr.sbin/ctld/parse.y ============================================================================== --- head/usr.sbin/ctld/parse.y Tue Feb 11 11:14:50 2014 (r261757) +++ head/usr.sbin/ctld/parse.y Tue Feb 11 11:26:05 2014 (r261758) @@ -57,10 +57,10 @@ extern void yyrestart(FILE *); %} -%token ALIAS AUTH_GROUP BACKEND BLOCKSIZE CHAP CHAP_MUTUAL CLOSING_BRACKET -%token DEBUG DEVICE_ID DISCOVERY_AUTH_GROUP INITIATOR_NAME INITIATOR_PORTAL -%token LISTEN LISTEN_ISER LUN MAXPROC NUM OPENING_BRACKET OPTION PATH PIDFILE -%token PORTAL_GROUP SERIAL SIZE STR TARGET TIMEOUT +%token ALIAS AUTH_GROUP AUTH_TYPE BACKEND BLOCKSIZE CHAP CHAP_MUTUAL +%token CLOSING_BRACKET DEBUG DEVICE_ID DISCOVERY_AUTH_GROUP INITIATOR_NAME +%token INITIATOR_PORTAL LISTEN LISTEN_ISER LUN MAXPROC NUM OPENING_BRACKET +%token OPTION PATH PIDFILE PORTAL_GROUP SERIAL SIZE STR TARGET TIMEOUT %union { @@ -145,6 +145,8 @@ auth_group_entries: ; auth_group_entry: + auth_group_auth_type + | auth_group_chap | auth_group_chap_mutual @@ -154,6 +156,17 @@ auth_group_entry: auth_group_initiator_portal ; +auth_group_auth_type: AUTH_TYPE STR + { + int error; + + error = auth_group_set_type_str(auth_group, $2); + free($2); + if (error != 0) + return (1); + } + ; + auth_group_chap: CHAP STR STR { const struct auth *ca; @@ -299,6 +312,8 @@ target_entry: | target_auth_group | + target_auth_type + | target_chap | target_chap_mutual @@ -330,7 +345,7 @@ target_auth_group: AUTH_GROUP STR log_warnx("auth-group for target \"%s\" " "specified more than once", target->t_name); else - log_warnx("cannot mix auth-group with explicit " + log_warnx("cannot use both auth-group and explicit " "authorisations for target \"%s\"", target->t_name); return (1); @@ -345,14 +360,40 @@ target_auth_group: AUTH_GROUP STR } ; +target_auth_type: AUTH_TYPE STR + { + int error; + + if (target->t_auth_group != NULL) { + if (target->t_auth_group->ag_name != NULL) { + log_warnx("cannot use both auth-group and " + "auth-type for target \"%s\"", + target->t_name); + return (1); + } + } else { + target->t_auth_group = auth_group_new(conf, NULL); + if (target->t_auth_group == NULL) { + free($2); + return (1); + } + target->t_auth_group->ag_target = target; + } + error = auth_group_set_type_str(target->t_auth_group, $2); + free($2); + if (error != 0) + return (1); + } + ; + target_chap: CHAP STR STR { const struct auth *ca; if (target->t_auth_group != NULL) { if (target->t_auth_group->ag_name != NULL) { - log_warnx("cannot mix auth-group with explicit " - "authorisations for target \"%s\"", + log_warnx("cannot use both auth-group and " + "chap for target \"%s\"", target->t_name); free($2); free($3); @@ -381,8 +422,8 @@ target_chap_mutual: CHAP_MUTUAL STR STR if (target->t_auth_group != NULL) { if (target->t_auth_group->ag_name != NULL) { - log_warnx("cannot mix auth-group with explicit " - "authorisations for target \"%s\"", + log_warnx("cannot use both auth-group and " + "chap-mutual for target \"%s\"", target->t_name); free($2); free($3); @@ -418,7 +459,7 @@ target_initiator_name: INITIATOR_NAME ST if (target->t_auth_group != NULL) { if (target->t_auth_group->ag_name != NULL) { - log_warnx("cannot mix auth-group with " + log_warnx("cannot use both auth-group and " "initiator-name for target \"%s\"", target->t_name); free($2); @@ -445,7 +486,7 @@ target_initiator_portal: INITIATOR_PORTA if (target->t_auth_group != NULL) { if (target->t_auth_group->ag_name != NULL) { - log_warnx("cannot mix auth-group with " + log_warnx("cannot use both auth-group and " "initiator-portal for target \"%s\"", target->t_name); free($2); Modified: head/usr.sbin/ctld/token.l ============================================================================== --- head/usr.sbin/ctld/token.l Tue Feb 11 11:14:50 2014 (r261757) +++ head/usr.sbin/ctld/token.l Tue Feb 11 11:26:05 2014 (r261758) @@ -50,6 +50,7 @@ extern int yylex(void); %% alias { return ALIAS; } auth-group { return AUTH_GROUP; } +auth-type { return AUTH_TYPE; } backend { return BACKEND; } blocksize { return BLOCKSIZE; } chap { return CHAP; } From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 11:27:26 2014 Return-Path: Delivered-To: svn-src-all@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 9935495A; Tue, 11 Feb 2014 11:27:26 +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 6AC1A1698; Tue, 11 Feb 2014 11:27:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BBRQgF055177; Tue, 11 Feb 2014 11:27:26 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BBRQgT055173; Tue, 11 Feb 2014 11:27:26 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402111127.s1BBRQgT055173@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 11 Feb 2014 11:27:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261759 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 11:27:26 -0000 Author: trasz Date: Tue Feb 11 11:27:25 2014 New Revision: 261759 URL: http://svnweb.freebsd.org/changeset/base/261759 Log: Make it possible to redefine portal-group "default". Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctld.h head/usr.sbin/ctld/parse.y Modified: head/usr.sbin/ctld/ctld.h ============================================================================== --- head/usr.sbin/ctld/ctld.h Tue Feb 11 11:26:05 2014 (r261758) +++ head/usr.sbin/ctld/ctld.h Tue Feb 11 11:27:25 2014 (r261759) @@ -146,6 +146,9 @@ struct conf { uint16_t conf_last_portal_group_tag; struct pidfh *conf_pidfh; + + bool conf_default_pg_defined; + bool conf_default_ag_defined; }; #define CONN_SESSION_TYPE_NONE 0 Modified: head/usr.sbin/ctld/parse.y ============================================================================== --- head/usr.sbin/ctld/parse.y Tue Feb 11 11:26:05 2014 (r261758) +++ head/usr.sbin/ctld/parse.y Tue Feb 11 11:27:25 2014 (r261759) @@ -224,7 +224,17 @@ portal_group: PORTAL_GROUP portal_group_ portal_group_name: STR { - portal_group = portal_group_new(conf, $1); + /* + * Make it possible to redefine default + * portal-group. but only once. + */ + if (strcmp($1, "default") == 0 && + conf->conf_default_pg_defined == false) { + portal_group = portal_group_find(conf, $1); + conf->conf_default_pg_defined = true; + } else { + portal_group = portal_group_new(conf, $1); + } free($1); if (portal_group == NULL) return (1); @@ -703,6 +713,7 @@ conf_new_from_file(const char *path) conf = conf_new(); ag = auth_group_new(conf, "no-authentication"); + assert(ag != NULL); ag->ag_type = AG_TYPE_NO_AUTHENTICATION; /* @@ -710,11 +721,11 @@ conf_new_from_file(const char *path) * any entries and thus will always deny access. */ ag = auth_group_new(conf, "no-access"); + assert(ag != NULL); ag->ag_type = AG_TYPE_CHAP; pg = portal_group_new(conf, "default"); - portal_group_add_listen(pg, "0.0.0.0:3260", false); - portal_group_add_listen(pg, "[::]:3260", false); + assert(pg != NULL); yyin = fopen(path, "r"); if (yyin == NULL) { @@ -736,6 +747,15 @@ conf_new_from_file(const char *path) return (NULL); } + if (conf->conf_default_pg_defined == false) { + log_debugx("portal-group \"default\" not defined; " + "going with defaults"); + pg = portal_group_find(conf, "default"); + assert(pg != NULL); + portal_group_add_listen(pg, "0.0.0.0:3260", false); + portal_group_add_listen(pg, "[::]:3260", false); + } + error = conf_verify(conf); if (error != 0) { conf_delete(conf); From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 11:29:06 2014 Return-Path: Delivered-To: svn-src-all@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 1C46BB4C; Tue, 11 Feb 2014 11:29: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 DDD0C16AD; Tue, 11 Feb 2014 11:29:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BBT5O9055382; Tue, 11 Feb 2014 11:29:05 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BBT52C055380; Tue, 11 Feb 2014 11:29:05 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402111129.s1BBT52C055380@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 11 Feb 2014 11:29:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261760 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 11:29:06 -0000 Author: trasz Date: Tue Feb 11 11:29:05 2014 New Revision: 261760 URL: http://svnweb.freebsd.org/changeset/base/261760 Log: Add a new auth-group "default", defaulting to deny, and make it possible to redefine it. From now on, assigning auth-group to a target is no longer mandatory. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctld.c head/usr.sbin/ctld/parse.y Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Tue Feb 11 11:27:25 2014 (r261759) +++ head/usr.sbin/ctld/ctld.c Tue Feb 11 11:29:05 2014 (r261760) @@ -1105,10 +1105,9 @@ conf_verify(struct conf *conf) TAILQ_FOREACH(targ, &conf->conf_targets, t_next) { if (targ->t_auth_group == NULL) { - log_warnx("missing authentication for target \"%s\"; " - "must specify either \"auth-group\", \"chap\", " - "or \"chap-mutual\"", targ->t_name); - return (1); + targ->t_auth_group = auth_group_find(conf, + "default"); + assert(targ->t_auth_group != NULL); } if (targ->t_portal_group == NULL) { targ->t_portal_group = portal_group_find(conf, Modified: head/usr.sbin/ctld/parse.y ============================================================================== --- head/usr.sbin/ctld/parse.y Tue Feb 11 11:27:25 2014 (r261759) +++ head/usr.sbin/ctld/parse.y Tue Feb 11 11:29:05 2014 (r261760) @@ -132,7 +132,17 @@ auth_group: AUTH_GROUP auth_group_name auth_group_name: STR { - auth_group = auth_group_new(conf, $1); + /* + * Make it possible to redefine default + * auth-group. but only once. + */ + if (strcmp($1, "default") == 0 && + conf->conf_default_ag_defined == false) { + auth_group = auth_group_find(conf, $1); + conf->conf_default_ag_defined = true; + } else { + auth_group = auth_group_new(conf, $1); + } free($1); if (auth_group == NULL) return (1); @@ -712,6 +722,9 @@ conf_new_from_file(const char *path) conf = conf_new(); + ag = auth_group_new(conf, "default"); + assert(ag != NULL); + ag = auth_group_new(conf, "no-authentication"); assert(ag != NULL); ag->ag_type = AG_TYPE_NO_AUTHENTICATION; @@ -747,6 +760,14 @@ conf_new_from_file(const char *path) return (NULL); } + if (conf->conf_default_ag_defined == false) { + log_debugx("auth-group \"default\" not defined; " + "going with defaults"); + ag = auth_group_find(conf, "default"); + assert(ag != NULL); + ag->ag_type = AG_TYPE_CHAP; + } + if (conf->conf_default_pg_defined == false) { log_debugx("portal-group \"default\" not defined; " "going with defaults"); From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 11:29:59 2014 Return-Path: Delivered-To: svn-src-all@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 44903C96; Tue, 11 Feb 2014 11:29: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 3041916B6; Tue, 11 Feb 2014 11:29:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BBTxtX055508; Tue, 11 Feb 2014 11:29:59 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BBTxXM055507; Tue, 11 Feb 2014 11:29:59 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402111129.s1BBTxXM055507@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 11 Feb 2014 11:29:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261761 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 11:29:59 -0000 Author: trasz Date: Tue Feb 11 11:29:58 2014 New Revision: 261761 URL: http://svnweb.freebsd.org/changeset/base/261761 Log: Update manual page to match recent auth-group "default" changes. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctl.conf.5 Modified: head/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- head/usr.sbin/ctld/ctl.conf.5 Tue Feb 11 11:29:05 2014 (r261760) +++ head/usr.sbin/ctld/ctl.conf.5 Tue Feb 11 11:29:58 2014 (r261761) @@ -148,9 +148,10 @@ Assigns human-readable description to th There is no default. .It Ic auth-group Aq Ar name Assigns previously defined authentication group to that target. -There is no default; every target must use either auth-group, -or chap, or chap-mutual statements. -A special auth-group, "no-authentication", may be used to permit access +By default, targets that do not specify their own auth settings, +using clauses such as "chap" or "initiator-name", are assigned +predefined auth-group "default", which denies all access. +Another predefined auth-group, "no-authentication", may be used to permit access without authentication. .It Ic auth-type Ao Ar type Ac Specifies authentication type. From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 11:31:09 2014 Return-Path: Delivered-To: svn-src-all@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 25573DF3; Tue, 11 Feb 2014 11:31: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 EB13B172A; Tue, 11 Feb 2014 11:31:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BBV8Wt056774; Tue, 11 Feb 2014 11:31:08 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BBV8fD056771; Tue, 11 Feb 2014 11:31:08 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402111131.s1BBV8fD056771@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 11 Feb 2014 11:31:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261762 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 11:31:09 -0000 Author: trasz Date: Tue Feb 11 11:31:08 2014 New Revision: 261762 URL: http://svnweb.freebsd.org/changeset/base/261762 Log: Use "default" as default discovery-auth-group, instead of "no-access". It doesn't change visible behaviour, as previously auth-group "default" wasn't redefinable, so by default access was always denied. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctl.conf.5 head/usr.sbin/ctld/ctld.c Modified: head/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- head/usr.sbin/ctld/ctl.conf.5 Tue Feb 11 11:29:58 2014 (r261761) +++ head/usr.sbin/ctld/ctl.conf.5 Tue Feb 11 11:31:08 2014 (r261762) @@ -131,9 +131,11 @@ The following statements are available a .It Ic discovery-auth-group Aq Ar name Assigns previously defined authentication group to that portal group, to be used for target discovery. -By default, the discovery will be denied. -A special auth-group, "no-authentication", may be used to allow for discovery -without authentication. +By default, portal groups that do not specify their own auth settings, +using clauses such as "chap" or "initiator-name", are assigned +predefined auth-group "default", which denies discovery. +Another predefined auth-group, "no-authentication", may be used +to permit discovery without authentication. .It Ic listen Aq Ar address Specifies IPv4 or IPv6 address and port to listen on for incoming connections. .It Ic listen-iser Aq Ar address Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Tue Feb 11 11:29:58 2014 (r261761) +++ head/usr.sbin/ctld/ctld.c Tue Feb 11 11:31:08 2014 (r261762) @@ -1132,7 +1132,7 @@ conf_verify(struct conf *conf) assert(pg->pg_name != NULL); if (pg->pg_discovery_auth_group == NULL) { pg->pg_discovery_auth_group = - auth_group_find(conf, "no-access"); + auth_group_find(conf, "default"); assert(pg->pg_discovery_auth_group != NULL); } @@ -1159,6 +1159,7 @@ conf_verify(struct conf *conf) break; } if (targ == NULL && ag->ag_name != NULL && + strcmp(ag->ag_name, "default") != 0 && strcmp(ag->ag_name, "no-authentication") != 0 && strcmp(ag->ag_name, "no-access") != 0) { log_warnx("auth-group \"%s\" not assigned " From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 11:32:37 2014 Return-Path: Delivered-To: svn-src-all@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 6E756F52; Tue, 11 Feb 2014 11:32:37 +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 57C2A173E; Tue, 11 Feb 2014 11:32:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BBWbrT058593; Tue, 11 Feb 2014 11:32:37 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BBWa7W058586; Tue, 11 Feb 2014 11:32:36 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402111132.s1BBWa7W058586@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 11 Feb 2014 11:32:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261763 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 11:32:37 -0000 Author: trasz Date: Tue Feb 11 11:32:36 2014 New Revision: 261763 URL: http://svnweb.freebsd.org/changeset/base/261763 Log: Use new auth-type "deny" instead of using "chap" with no chap entries; it's cleaner this way, and gives better feedback to the user. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctl.conf.5 head/usr.sbin/ctld/ctld.c head/usr.sbin/ctld/ctld.h head/usr.sbin/ctld/login.c head/usr.sbin/ctld/parse.y Modified: head/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- head/usr.sbin/ctld/ctl.conf.5 Tue Feb 11 11:31:08 2014 (r261762) +++ head/usr.sbin/ctld/ctl.conf.5 Tue Feb 11 11:32:36 2014 (r261763) @@ -103,7 +103,7 @@ The following statements are available a .Bl -tag -width indent .It Ic auth-type Ao Ar type Ac Specifies authentication type. -Type can be either "none", "chap", or "chap-mutual". +Type can be either "none", "deny", "chap", or "chap-mutual". In most cases it is not neccessary to set the type using this clause; it is usually used to disable authentication for a given auth-group. .It Ic chap Ao Ar user Ac Aq Ar secret @@ -157,7 +157,7 @@ Another predefined auth-group, "no-authe without authentication. .It Ic auth-type Ao Ar type Ac Specifies authentication type. -Type can be either "none", "chap", or "chap-mutual". +Type can be either "none", "deny", "chap", or "chap-mutual". In most cases it is not neccessary to set the type using this clause; it is usually used to disable authentication for a given target. This clause is mutually exclusive with auth-group; one cannot use Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Tue Feb 11 11:31:08 2014 (r261762) +++ head/usr.sbin/ctld/ctld.c Tue Feb 11 11:32:36 2014 (r261763) @@ -439,6 +439,8 @@ auth_group_set_type_str(struct auth_grou if (strcmp(str, "none") == 0) { type = AG_TYPE_NO_AUTHENTICATION; + } else if (strcmp(str, "deny") == 0) { + type = AG_TYPE_DENY; } else if (strcmp(str, "chap") == 0) { type = AG_TYPE_CHAP; } else if (strcmp(str, "chap-mutual") == 0) { Modified: head/usr.sbin/ctld/ctld.h ============================================================================== --- head/usr.sbin/ctld/ctld.h Tue Feb 11 11:31:08 2014 (r261762) +++ head/usr.sbin/ctld/ctld.h Tue Feb 11 11:32:36 2014 (r261763) @@ -66,9 +66,10 @@ struct auth_portal { }; #define AG_TYPE_UNKNOWN 0 -#define AG_TYPE_NO_AUTHENTICATION 1 -#define AG_TYPE_CHAP 2 -#define AG_TYPE_CHAP_MUTUAL 3 +#define AG_TYPE_DENY 1 +#define AG_TYPE_NO_AUTHENTICATION 2 +#define AG_TYPE_CHAP 3 +#define AG_TYPE_CHAP_MUTUAL 4 struct auth_group { TAILQ_ENTRY(auth_group) ag_next; Modified: head/usr.sbin/ctld/login.c ============================================================================== --- head/usr.sbin/ctld/login.c Tue Feb 11 11:31:08 2014 (r261762) +++ head/usr.sbin/ctld/login.c Tue Feb 11 11:32:36 2014 (r261763) @@ -1030,6 +1030,11 @@ login(struct connection *conn) return; } + if (ag->ag_type == AG_TYPE_DENY) { + login_send_error(request, 0x02, 0x01); + log_errx(1, "auth-group type is \"deny\""); + } + if (ag->ag_type == AG_TYPE_UNKNOWN) { /* * This can happen with empty auth-group. Modified: head/usr.sbin/ctld/parse.y ============================================================================== --- head/usr.sbin/ctld/parse.y Tue Feb 11 11:31:08 2014 (r261762) +++ head/usr.sbin/ctld/parse.y Tue Feb 11 11:32:36 2014 (r261763) @@ -729,13 +729,9 @@ conf_new_from_file(const char *path) assert(ag != NULL); ag->ag_type = AG_TYPE_NO_AUTHENTICATION; - /* - * Here, the type doesn't really matter, as the group doesn't contain - * any entries and thus will always deny access. - */ ag = auth_group_new(conf, "no-access"); assert(ag != NULL); - ag->ag_type = AG_TYPE_CHAP; + ag->ag_type = AG_TYPE_DENY; pg = portal_group_new(conf, "default"); assert(pg != NULL); @@ -765,7 +761,7 @@ conf_new_from_file(const char *path) "going with defaults"); ag = auth_group_find(conf, "default"); assert(ag != NULL); - ag->ag_type = AG_TYPE_CHAP; + ag->ag_type = AG_TYPE_DENY; } if (conf->conf_default_pg_defined == false) { From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 11:33:44 2014 Return-Path: Delivered-To: svn-src-all@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 A1C921EC; Tue, 11 Feb 2014 11:33:44 +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 8B5ED174B; Tue, 11 Feb 2014 11:33:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BBXiMw058929; Tue, 11 Feb 2014 11:33:44 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BBXi2J058928; Tue, 11 Feb 2014 11:33:44 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402111133.s1BBXi2J058928@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 11 Feb 2014 11:33:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261764 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 11:33:44 -0000 Author: trasz Date: Tue Feb 11 11:33:44 2014 New Revision: 261764 URL: http://svnweb.freebsd.org/changeset/base/261764 Log: So, it turns out SIGCHLD is discarded by default, so we have to set up a dummy handler to make it interrupt an ioctl(2) or select(2). This makes those short-lived ctld(8) zombies disappear. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctld.c Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Tue Feb 11 11:32:36 2014 (r261763) +++ head/usr.sbin/ctld/ctld.c Tue Feb 11 11:33:44 2014 (r261764) @@ -1742,6 +1742,17 @@ sigterm_handler(int dummy __unused) } static void +sigchld_handler(int dummy __unused) +{ + + /* + * The only purpose of this handler is to make SIGCHLD + * interrupt the ISCSIDWAIT ioctl(2), so we can call + * wait_for_children(). + */ +} + +static void register_signals(void) { struct sigaction sa; @@ -1763,6 +1774,11 @@ register_signals(void) error = sigaction(SIGINT, &sa, NULL); if (error != 0) log_err(1, "sigaction"); + + sa.sa_handler = sigchld_handler; + error = sigaction(SIGCHLD, &sa, NULL); + if (error != 0) + log_err(1, "sigaction"); } int From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 11:35:27 2014 Return-Path: Delivered-To: svn-src-all@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 300AF346; Tue, 11 Feb 2014 11:35: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 00678175B; Tue, 11 Feb 2014 11:35:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BBZQZu059182; Tue, 11 Feb 2014 11:35:26 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BBZQef059181; Tue, 11 Feb 2014 11:35:26 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402111135.s1BBZQef059181@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 11 Feb 2014 11:35:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261765 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 11:35:27 -0000 Author: trasz Date: Tue Feb 11 11:35:26 2014 New Revision: 261765 URL: http://svnweb.freebsd.org/changeset/base/261765 Log: Improve error reporting. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/kernel.c Modified: head/usr.sbin/ctld/kernel.c ============================================================================== --- head/usr.sbin/ctld/kernel.c Tue Feb 11 11:33:44 2014 (r261764) +++ head/usr.sbin/ctld/kernel.c Tue Feb 11 11:35:26 2014 (r261765) @@ -678,8 +678,15 @@ kernel_listen(struct addrinfo *ai, bool req.data.listen.addr = ai->ai_addr; req.data.listen.addrlen = ai->ai_addrlen; - if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) - log_warn("error issuing CTL_ISCSI_LISTEN ioctl"); + if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) { + log_err(1, "error issuing CTL_ISCSI ioctl"); + return; + } + + if (req.status != CTL_ISCSI_OK) { + log_errx(1, "error returned from CTL iSCSI listen: %s", + req.error_str); + } } int @@ -692,7 +699,13 @@ kernel_accept(void) req.type = CTL_ISCSI_ACCEPT; if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) { - log_warn("error issuing CTL_ISCSI_LISTEN ioctl"); + log_warn("error issuing CTL_ISCSI ioctl"); + return (0); + } + + if (req.status != CTL_ISCSI_OK) { + log_warnx("error returned from CTL iSCSI accept: %s", + req.error_str); return (0); } @@ -712,13 +725,15 @@ kernel_send(struct pdu *pdu) req.data.send.data_segment_len = pdu->pdu_data_len; req.data.send.data_segment = pdu->pdu_data; - if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) + if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) { log_err(1, "error issuing CTL_ISCSI ioctl; " "dropping connection"); + } - if (req.status != CTL_ISCSI_OK) + if (req.status != CTL_ISCSI_OK) { log_errx(1, "error returned from CTL iSCSI send: " "%s; dropping connection", req.error_str); + } } void @@ -738,13 +753,15 @@ kernel_receive(struct pdu *pdu) req.data.receive.data_segment_len = MAX_DATA_SEGMENT_LENGTH; req.data.receive.data_segment = pdu->pdu_data; - if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) + if (ioctl(ctl_fd, CTL_ISCSI, &req) == -1) { log_err(1, "error issuing CTL_ISCSI ioctl; " "dropping connection"); + } - if (req.status != CTL_ISCSI_OK) + if (req.status != CTL_ISCSI_OK) { log_errx(1, "error returned from CTL iSCSI receive: " "%s; dropping connection", req.error_str); + } } From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 11:36:15 2014 Return-Path: Delivered-To: svn-src-all@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 A570F49D; Tue, 11 Feb 2014 11:36: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 901D61761; Tue, 11 Feb 2014 11:36:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BBaFQ9059303; Tue, 11 Feb 2014 11:36:15 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BBaFhl059302; Tue, 11 Feb 2014 11:36:15 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402111136.s1BBaFhl059302@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 11 Feb 2014 11:36:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261766 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 11:36:15 -0000 Author: trasz Date: Tue Feb 11 11:36:15 2014 New Revision: 261766 URL: http://svnweb.freebsd.org/changeset/base/261766 Log: Make ctld error out on invalid characters in ctl.conf. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/token.l Modified: head/usr.sbin/ctld/token.l ============================================================================== --- head/usr.sbin/ctld/token.l Tue Feb 11 11:35:26 2014 (r261765) +++ head/usr.sbin/ctld/token.l Tue Feb 11 11:36:15 2014 (r261766) @@ -85,4 +85,5 @@ timeout { return TIMEOUT; } #.*$ /* ignore comments */; \n { lineno++; } [ \t]+ /* ignore whitespace */; +. { yylval.str = strdup(yytext); return STR; } %% From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 11:37:49 2014 Return-Path: Delivered-To: svn-src-all@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 CB3715F5; Tue, 11 Feb 2014 11:37: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 B6AB91773; Tue, 11 Feb 2014 11:37:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BBbntU059504; Tue, 11 Feb 2014 11:37:49 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BBbnSb059503; Tue, 11 Feb 2014 11:37:49 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402111137.s1BBbnSb059503@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 11 Feb 2014 11:37:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261767 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 11:37:49 -0000 Author: trasz Date: Tue Feb 11 11:37:49 2014 New Revision: 261767 URL: http://svnweb.freebsd.org/changeset/base/261767 Log: Show proper configuration file line numbers in error messages. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/parse.y Modified: head/usr.sbin/ctld/parse.y ============================================================================== --- head/usr.sbin/ctld/parse.y Tue Feb 11 11:36:15 2014 (r261766) +++ head/usr.sbin/ctld/parse.y Tue Feb 11 11:37:49 2014 (r261767) @@ -743,7 +743,7 @@ conf_new_from_file(const char *path) return (NULL); } check_perms(path); - lineno = 0; + lineno = 1; yyrestart(yyin); error = yyparse(); auth_group = NULL; From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 11:38:45 2014 Return-Path: Delivered-To: svn-src-all@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 0E26F746; Tue, 11 Feb 2014 11:38: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 EBB3A1781; Tue, 11 Feb 2014 11:38:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BBciUY059644; Tue, 11 Feb 2014 11:38:44 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BBci2K059643; Tue, 11 Feb 2014 11:38:44 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402111138.s1BBci2K059643@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 11 Feb 2014 11:38:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261768 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 11:38:45 -0000 Author: trasz Date: Tue Feb 11 11:38:44 2014 New Revision: 261768 URL: http://svnweb.freebsd.org/changeset/base/261768 Log: Make the debug messages during ctld(8) shutdown less confusing. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctld.c Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Tue Feb 11 11:37:49 2014 (r261767) +++ head/usr.sbin/ctld/ctld.c Tue Feb 11 11:38:44 2014 (r261768) @@ -1227,8 +1227,8 @@ conf_apply(struct conf *oldconf, struct if (newtarg == NULL) { TAILQ_FOREACH_SAFE(oldlun, &oldtarg->t_luns, l_next, tmplun) { - log_debugx("target %s not found in the " - "configuration file; removing its lun %d, " + log_debugx("target %s not found in new " + "configuration; removing its lun %d, " "backed by CTL lun %d", oldtarg->t_name, oldlun->l_lun, oldlun->l_ctl_lun); @@ -1254,7 +1254,7 @@ conf_apply(struct conf *oldconf, struct newlun = lun_find(newtarg, oldlun->l_lun); if (newlun == NULL) { log_debugx("lun %d, target %s, CTL lun %d " - "not found in the configuration file; " + "not found in new configuration; " "removing", oldlun->l_lun, oldtarg->t_name, oldlun->l_ctl_lun); error = kernel_lun_remove(oldlun); From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 11:56:51 2014 Return-Path: Delivered-To: svn-src-all@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 4AA66A0B; Tue, 11 Feb 2014 11:56: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 357DE18E2; Tue, 11 Feb 2014 11:56:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BBupej066907; Tue, 11 Feb 2014 11:56:51 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BBupqO066906; Tue, 11 Feb 2014 11:56:51 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402111156.s1BBupqO066906@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 11 Feb 2014 11:56:51 +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: r261769 - stable/10/usr.bin/iscsictl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 11:56:51 -0000 Author: trasz Date: Tue Feb 11 11:56:50 2014 New Revision: 261769 URL: http://svnweb.freebsd.org/changeset/base/261769 Log: MFC r260255: Properly document -u and -s. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/iscsictl/iscsictl.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/iscsictl/iscsictl.8 ============================================================================== --- stable/10/usr.bin/iscsictl/iscsictl.8 Tue Feb 11 11:38:44 2014 (r261768) +++ stable/10/usr.bin/iscsictl/iscsictl.8 Tue Feb 11 11:56:50 2014 (r261769) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 30, 2013 +.Dd January 4, 2014 .Dt ISCSICTL 8 .Os .Sh NAME @@ -88,8 +88,12 @@ and the temporary discovery sesion will The "nickname" of session defined in the configuration file. .It Fl p Target portal - host name or address - for statically defined targets. +.It Fl s +CHAP secret. .It Fl t Target name. +.It Fl u +CHAP login. .It Fl v Verbose mode. .El From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 11:58:54 2014 Return-Path: Delivered-To: svn-src-all@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 C2F1BB52; Tue, 11 Feb 2014 11:58: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 AD7A118EF; Tue, 11 Feb 2014 11:58:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BBws6F067149; Tue, 11 Feb 2014 11:58:54 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BBwsi4067148; Tue, 11 Feb 2014 11:58:54 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402111158.s1BBwsi4067148@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 11 Feb 2014 11:58:54 +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: r261770 - 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-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 11:58:54 -0000 Author: trasz Date: Tue Feb 11 11:58:54 2014 New Revision: 261770 URL: http://svnweb.freebsd.org/changeset/base/261770 Log: MFC r260083: Fix extremely slow operation with data digests enabled. This was caused by receive code waiting for data digest even when the data segment was empty. It didn't actually read it, but it waited until those four bytes become available in the socket buffer, i.e. until any other PDU (e.g. NOP) came in. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/icl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/icl.c ============================================================================== --- stable/10/sys/dev/iscsi/icl.c Tue Feb 11 11:56:50 2014 (r261769) +++ stable/10/sys/dev/iscsi/icl.c Tue Feb 11 11:58:54 2014 (r261770) @@ -239,7 +239,7 @@ icl_pdu_size(const struct icl_pdu *respo icl_pdu_padding(response); if (response->ip_conn->ic_header_crc32c) len += ISCSI_HEADER_DIGEST_SIZE; - if (response->ip_conn->ic_data_crc32c) + if (response->ip_data_len != 0 && response->ip_conn->ic_data_crc32c) len += ISCSI_DATA_DIGEST_SIZE; return (len); @@ -615,7 +615,7 @@ icl_conn_receive_pdu(struct icl_conn *ic break; ic->ic_receive_state = ICL_CONN_STATE_DATA_DIGEST; - if (ic->ic_data_crc32c == false) + if (request->ip_data_len == 0 || ic->ic_data_crc32c == false) ic->ic_receive_len = 0; else ic->ic_receive_len = ISCSI_DATA_DIGEST_SIZE; From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 12:01:11 2014 Return-Path: Delivered-To: svn-src-all@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 BDE30CCC; Tue, 11 Feb 2014 12:01:11 +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 A2DC1197B; Tue, 11 Feb 2014 12:01:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BC1Bwl068611; Tue, 11 Feb 2014 12:01:11 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BC1BYO068610; Tue, 11 Feb 2014 12:01:11 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201402111201.s1BC1BYO068610@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 11 Feb 2014 12:01:11 +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: r261771 - 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-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 12:01:11 -0000 Author: trasz Date: Tue Feb 11 12:01:11 2014 New Revision: 261771 URL: http://svnweb.freebsd.org/changeset/base/261771 Log: MFC r260389: Fix a rare "truncated checksums" problem, which manifested like this: WARNING: icl_pdu_check_data_digest: data digest check failed; got 0xf23b, should be 0xdb7f23b Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/icl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/icl.c ============================================================================== --- stable/10/sys/dev/iscsi/icl.c Tue Feb 11 11:58:54 2014 (r261770) +++ stable/10/sys/dev/iscsi/icl.c Tue Feb 11 12:01:11 2014 (r261771) @@ -324,7 +324,7 @@ icl_pdu_check_header_digest(struct icl_p } CTASSERT(sizeof(received_digest) == ISCSI_HEADER_DIGEST_SIZE); - memcpy(&received_digest, mtod(m, void *), ISCSI_HEADER_DIGEST_SIZE); + m_copydata(m, 0, ISCSI_HEADER_DIGEST_SIZE, (void *)&received_digest); m_freem(m); *availablep -= ISCSI_HEADER_DIGEST_SIZE; @@ -482,7 +482,7 @@ icl_pdu_check_data_digest(struct icl_pdu } CTASSERT(sizeof(received_digest) == ISCSI_DATA_DIGEST_SIZE); - memcpy(&received_digest, mtod(m, void *), ISCSI_DATA_DIGEST_SIZE); + m_copydata(m, 0, ISCSI_DATA_DIGEST_SIZE, (void *)&received_digest); m_freem(m); *availablep -= ISCSI_DATA_DIGEST_SIZE; From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 12:25:33 2014 Return-Path: Delivered-To: svn-src-all@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 8CBF211C; Tue, 11 Feb 2014 12:25:33 +0000 (UTC) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id E1E4E1B0B; Tue, 11 Feb 2014 12:25:32 +0000 (UTC) Received: from outgoing.leidinger.net (p57A39136.dip0.t-ipconnect.de [87.163.145.54]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 58880844009; Tue, 11 Feb 2014 13:16:26 +0100 (CET) Received: from webmail.leidinger.net (webmail.Leidinger.net [IPv6:fd73:10c7:2053:1::3:102]) by outgoing.leidinger.net (Postfix) with ESMTPS id A2AE33852; Tue, 11 Feb 2014 13:16:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=leidinger.net; s=outgoing-alex; t=1392120983; bh=sIrZyMeZ+WpvEKRj+9tiVI9lcDvQTgVE08Mv0wGpja4=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=SYkl9CmQi1FLq5GIo/ciSbJ+/TSRLDx9YJ6C/TyT+gVKiV49mfNhBrgBY+k2EzCmo +B2NZL83eUZp2XUalGtUC4Dwmg7nOPDo1phJavPznynZ8SRaUMwjEFYsTpVLRrdeew OZ8HS+xTJK0t0UHtVekE2Sn0lCxuJrkpZmd7LXesCQ7yt0MD0UdI4N2qepfCn4qJem kNDaiWlFYgIch+S8v5N01fyijJ3x15zl2o5kQFKznn8Zp+wz1SUL7NEGIjn5ohaAaJ 4I8DcbUnC3xaSpHPPs3eLsR4RbWOgAv1j48sc7m1/zHb6S/RS+wz7/ql/78Lqp8DIA nXEe/jk6+OBBA== Received: (from www@localhost) by webmail.leidinger.net (8.14.7/8.14.4/Submit) id s1BCGLnr018576; Tue, 11 Feb 2014 13:16:21 +0100 (CET) (envelope-from Alexander@leidinger.net) X-Authentication-Warning: webmail.leidinger.net: www set sender to Alexander@leidinger.net using -f Received: from 217.197.101.97 ([217.197.101.97]) by webmail.leidinger.net (Horde Framework) with HTTP; Tue, 11 Feb 2014 13:16:21 +0100 Date: Tue, 11 Feb 2014 13:16:20 +0100 Message-ID: <20140211131620.Horde.tGeutf6n8Vfaosr3bjHnhQ1@webmail.leidinger.net> From: Alexander Leidinger To: Adrian Chadd Subject: Re: svn commit: r261266 - in head: sys/dev/drm sys/kern sys/sys usr.sbin/jail References: <201401291341.s0TDfDcB068211@svn.freebsd.org> <52EC4DBB.50804@freebsd.org> <20140203235336.GA46006@ambrisko.com> <2362081.WrjYmKeYu9@ralph.baldwin.cx> <52F977D9.5010200@freebsd.org> In-Reply-To: User-Agent: Internet Messaging Program (IMP) H5 (6.1.6) Content-Type: text/plain; charset=UTF-8; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 58880844009.A1ABF X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-0.107, required 6, autolearn=disabled, AWL -0.08, DKIM_SIGNED 0.10, DKIM_VALID -0.10, DKIM_VALID_AU -0.10, RP_MATCHES_RCVD -0.00, TW_SV 0.08) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1392725787.6996@ZSGHz7keCA+5b0g7JQR3hw X-EBL-Spam-Status: No Cc: src-committers@freebsd.org, Doug Ambrisko , John Baldwin , svn-src-all@freebsd.org, Gleb Smirnoff , Robert Watson , James Gritton , svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 12:25:33 -0000 Quoting Adrian Chadd (from Mon, 10 Feb 2014 17:24:09 -0800): > On 10 February 2014 17:07, James Gritton wrote: >> So is it worthwhile to add a new jail parameter called "insecure" (or >> somesuch)? That way you could easily add the encapsulation without >> any of the security. The other vibe I'm getting is not to do >> anything. Either way, it sounds like the Xorg-enabling patch will >> remain a patch - not seeing a lot of buy-in here. >> >> I'm not against more optional and obscure holes if they have a use; I >> just call that "a fine-grained capabilities model." > > I'd rather it stay a patch. IMHO the only viable solution is to create > a sandboxable API for this DRI/IO-MMU stuff to, well, DRI via. > > So hm. Can you actually run clients in different jails, but have them > access the same DRI window(s)? Or does running a client in a jail > force it to go all over the socket(s) and not via DRI? I would assume that a client somehow determines if he is rendering local or remotely. If he is doing it local (= in the same "container" as the X server) it uses DRI. I do not expect that two jails with "allow.kmem" allow to use DRI to the same X server, but I haven't tested it, so take it only as a gut-feeling. Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 13:33:03 2014 Return-Path: Delivered-To: svn-src-all@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 9D507757; Tue, 11 Feb 2014 13:33:03 +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 7D40B1317; Tue, 11 Feb 2014 13:33:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BDX3Fd005211; Tue, 11 Feb 2014 13:33:03 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BDX39j005210; Tue, 11 Feb 2014 13:33:03 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402111333.s1BDX39j005210@svn.freebsd.org> From: Christian Brueffer Date: Tue, 11 Feb 2014 13:33:03 +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: r261772 - stable/10/sbin/etherswitchcfg X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 13:33:03 -0000 Author: brueffer Date: Tue Feb 11 13:33:03 2014 New Revision: 261772 URL: http://svnweb.freebsd.org/changeset/base/261772 Log: MFC: r261500 Add a license (1) and do some cleanup. Approved by: Stefan Bethke (original author, by private mail) (1) Modified: stable/10/sbin/etherswitchcfg/etherswitchcfg.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/etherswitchcfg/etherswitchcfg.8 ============================================================================== --- stable/10/sbin/etherswitchcfg/etherswitchcfg.8 Tue Feb 11 12:01:11 2014 (r261771) +++ stable/10/sbin/etherswitchcfg/etherswitchcfg.8 Tue Feb 11 13:33:03 2014 (r261772) @@ -1,4 +1,29 @@ +.\" Copyright (c) 2011-2012 Stefan Bethke. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" .\" $FreeBSD$ +.\" .Dd September 20, 2013 .Dt ETHERSWITCHCFG 8 .Os @@ -35,13 +60,14 @@ The utility is used to configure an Ethernet switch built into the system. .Nm accepts a number of options: +.Pp .Bl -tag -width ".Fl f" -compact .It Fl "f control file" Specifies the .Xr etherswitch 4 control file that represents the switch to be configured. It defaults to -.Li /dev/etherswitch0 . +.Pa /dev/etherswitch0 . .It Fl m When reporting port information, also list available media options for that port. @@ -54,6 +80,7 @@ options are omitted. The config command provides access to global switch configuration parameters. It support the following commands: +.Pp .Bl -tag -width ".Ar vlan_mode mode" -compact .It Ar vlan_mode mode Sets the switch VLAN mode (depends on the hardware). @@ -74,6 +101,7 @@ To set the register value, use the form .Ss port The port command selects one of the ports of the switch. It supports the following commands: +.Pp .Bl -tag -width ".Ar pvid number" -compact .It Ar pvid number Sets the default port VID that is used to process incoming frames that are not tagged. @@ -88,8 +116,10 @@ for details on and .Ar mediaopt . .El +.Pp And the following flags (please note that not all flags -are supporterd by all switch drivers): +are supported by all switch drivers): +.Pp .Bl -tag -width ".Ar addtag" -compact .It Ar addtag Add VLAN tag to each packet sent by the port. @@ -100,7 +130,7 @@ Strip the VLAN tags from the packets sen .It Ar -striptag Disable the strip VLAN tag option. .It Ar firstlock -This options makes the switch port lock on the first MAC address it seems. +This options makes the switch port lock on the first MAC address it sees. After that, usually you need to reset the switch to learn different MAC addresses. .It Ar -firstlock @@ -125,6 +155,7 @@ The reg command provides access to the r .Ss vlangroup The vlangroup command selects one of the VLAN groups for configuration. It supports the following commands: +.Pp .Bl -tag -width ".Ar vlangroup" -compact .It Ar vlan VID Sets the VLAN ID (802.1q VID) for this VLAN group. @@ -142,13 +173,14 @@ to indicate that frames on this port are .Sh FILES .Bl -tag -width /dev/etherswitch? -compact .It Pa /dev/etherswitch? -Control file for the ethernet switch driver. +Control file for the Ethernet switch driver. .El .Sh EXAMPLES Configure VLAN group 1 with a VID of 2 and make ports 0 and 5 its members while excluding all other ports. Port 5 will send and receive tagged frames while port 0 will be untagged. Incoming untagged frames on port 0 are assigned to vlangroup1. +.Pp .Dl # etherswitchcfg vlangroup1 vlan 2 members 0,5t port0 pvid 2 .Sh SEE ALSO .Xr etherswitch 4 From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 15:16:50 2014 Return-Path: Delivered-To: svn-src-all@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 3F0FE152; Tue, 11 Feb 2014 15:16: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 29C131C70; Tue, 11 Feb 2014 15:16:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BFGoAm045939; Tue, 11 Feb 2014 15:16:50 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BFGoKO045938; Tue, 11 Feb 2014 15:16:50 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402111516.s1BFGoKO045938@svn.freebsd.org> From: Christian Brueffer Date: Tue, 11 Feb 2014 15:16:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261773 - head/usr.sbin/powerd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 15:16:50 -0000 Author: brueffer Date: Tue Feb 11 15:16:49 2014 New Revision: 261773 URL: http://svnweb.freebsd.org/changeset/base/261773 Log: In acline_init(), initialize ac_line to SRC_UNKNOWN. Previously this could lead to the -n option effectively being ignored (in case ac_line happened to be 0 aka SRC_AC), or other undefined behaviour. PR: 169779 Submitted by: Alex Gonzalez Reviewed by: jhb MFC after: 2 weeks Modified: head/usr.sbin/powerd/powerd.c Modified: head/usr.sbin/powerd/powerd.c ============================================================================== --- head/usr.sbin/powerd/powerd.c Tue Feb 11 13:33:03 2014 (r261772) +++ head/usr.sbin/powerd/powerd.c Tue Feb 11 15:16:49 2014 (r261773) @@ -279,6 +279,7 @@ static void acline_init(void) { acline_mib_len = 4; + acline_status = SRC_UNKNOWN; if (sysctlnametomib(ACPIAC, acline_mib, &acline_mib_len) == 0) { acline_mode = ac_sysctl; From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 15:38:30 2014 Return-Path: Delivered-To: svn-src-all@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 334607C9; Tue, 11 Feb 2014 15:38: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 1DBAA1F5D; Tue, 11 Feb 2014 15:38:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BFcTFJ053812; Tue, 11 Feb 2014 15:38:29 GMT (envelope-from feld@svn.freebsd.org) Received: (from feld@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BFcTcd053811; Tue, 11 Feb 2014 15:38:29 GMT (envelope-from feld@svn.freebsd.org) Message-Id: <201402111538.s1BFcTcd053811@svn.freebsd.org> From: Mark Felder Date: Tue, 11 Feb 2014 15:38:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261774 - head/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 15:38:30 -0000 Author: feld (ports committer) Date: Tue Feb 11 15:38:29 2014 New Revision: 261774 URL: http://svnweb.freebsd.org/changeset/base/261774 Log: Add caveat to zpool manpage indicating that we do not automatically activate hot spares. This should be MFC'd to all STABLE branches. Upon the availability of zfsd, the zpool manpage on relevant branches should be updated to remove this caveat and document hot spare's reliance on zfsd. Approved by: avg MFC after: 1 week Sponsored by: SupraNet Communications Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Tue Feb 11 15:16:49 2014 (r261773) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Tue Feb 11 15:38:29 2014 (r261774) @@ -1956,3 +1956,9 @@ The .Xr mdoc 7 implementation of this manual page was initially written by .An Martin Matuska Aq mm@FreeBSD.org . +.Sh CAVEATS +The +.Cm spare +feature requires a utility to detect zpool degradation and initiate +disk replacement within the zpool. FreeBSD does not provide such a +utility at this time. From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 17:07:29 2014 Return-Path: Delivered-To: svn-src-all@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 BDAF7B65; Tue, 11 Feb 2014 17:07: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 9915F178A; Tue, 11 Feb 2014 17:07:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BH7Tf8090129; Tue, 11 Feb 2014 17:07:29 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BH7T4B090127; Tue, 11 Feb 2014 17:07:29 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201402111707.s1BH7T4B090127@svn.freebsd.org> From: Peter Wemm Date: Tue, 11 Feb 2014 17:07:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r261775 - stable/8/usr.bin/uname X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 17:07:29 -0000 Author: peter Date: Tue Feb 11 17:07:28 2014 New Revision: 261775 URL: http://svnweb.freebsd.org/changeset/base/261775 Log: MFC r256557 - kernel and userland osreldate helpers. Modified: stable/8/usr.bin/uname/uname.1 stable/8/usr.bin/uname/uname.c Modified: stable/8/usr.bin/uname/uname.1 ============================================================================== --- stable/8/usr.bin/uname/uname.1 Tue Feb 11 15:38:29 2014 (r261774) +++ stable/8/usr.bin/uname/uname.1 Tue Feb 11 17:07:28 2014 (r261775) @@ -32,7 +32,7 @@ .\" @(#)uname.1 8.3 (Berkeley) 4/8/94 .\" $FreeBSD$ .\" -.Dd January 26, 2010 +.Dd February 11, 2014 .Dt UNAME 1 .Os .Sh NAME @@ -40,7 +40,7 @@ .Nd display information about the system .Sh SYNOPSIS .Nm -.Op Fl aimnoprsv +.Op Fl aiKmnoprsUv .Sh DESCRIPTION The .Nm @@ -59,6 +59,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 @@ -74,6 +78,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. @@ -83,6 +91,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_ @@ -95,6 +111,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 @@ -108,3 +126,11 @@ 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 older stable branches. Modified: stable/8/usr.bin/uname/uname.c ============================================================================== --- stable/8/usr.bin/uname/uname.c Tue Feb 11 15:38:29 2014 (r261774) +++ stable/8/usr.bin/uname/uname.c Tue Feb 11 17:07:28 2014 (r261775) @@ -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_ident, get_platform, get_hostname, get_arch, + get_release, get_sysname, get_kernvers, get_uservers, get_version; 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-all@FreeBSD.ORG Tue Feb 11 17:07:46 2014 Return-Path: Delivered-To: svn-src-all@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 83DACCAB; Tue, 11 Feb 2014 17:07: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 62252178E; Tue, 11 Feb 2014 17:07:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BH7ka6090202; Tue, 11 Feb 2014 17:07:46 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BH7kYs090199; Tue, 11 Feb 2014 17:07:46 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201402111707.s1BH7kYs090199@svn.freebsd.org> From: Peter Wemm Date: Tue, 11 Feb 2014 17:07:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r261776 - stable/7/usr.bin/uname X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 17:07:46 -0000 Author: peter Date: Tue Feb 11 17:07:45 2014 New Revision: 261776 URL: http://svnweb.freebsd.org/changeset/base/261776 Log: MFC r256557 - kernel and userland osreldate helpers. Modified: stable/7/usr.bin/uname/uname.1 stable/7/usr.bin/uname/uname.c Modified: stable/7/usr.bin/uname/uname.1 ============================================================================== --- stable/7/usr.bin/uname/uname.1 Tue Feb 11 17:07:28 2014 (r261775) +++ stable/7/usr.bin/uname/uname.1 Tue Feb 11 17:07:45 2014 (r261776) @@ -32,7 +32,7 @@ .\" @(#)uname.1 8.3 (Berkeley) 4/8/94 .\" $FreeBSD$ .\" -.Dd January 26, 2010 +.Dd February 11, 2014 .Dt UNAME 1 .Os .Sh NAME @@ -40,7 +40,7 @@ .Nd display information about the system .Sh SYNOPSIS .Nm -.Op Fl aimnoprsv +.Op Fl aiKmnoprsUv .Sh DESCRIPTION The .Nm @@ -59,6 +59,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 @@ -74,6 +78,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. @@ -83,6 +91,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_ @@ -95,6 +111,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 @@ -108,3 +126,11 @@ 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 older stable branches. Modified: stable/7/usr.bin/uname/uname.c ============================================================================== --- stable/7/usr.bin/uname/uname.c Tue Feb 11 17:07:28 2014 (r261775) +++ stable/7/usr.bin/uname/uname.c Tue Feb 11 17:07:45 2014 (r261776) @@ -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_ident, get_platform, get_hostname, get_arch, + get_release, get_sysname, get_kernvers, get_uservers, get_version; 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-all@FreeBSD.ORG Tue Feb 11 17:11:55 2014 Return-Path: Delivered-To: svn-src-all@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 611FCE41; Tue, 11 Feb 2014 17:11:55 +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 3DF82183B; Tue, 11 Feb 2014 17:11:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BHBtQ8093522; Tue, 11 Feb 2014 17:11:55 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BHBs97093520; Tue, 11 Feb 2014 17:11:54 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201402111711.s1BHBs97093520@svn.freebsd.org> From: Peter Wemm Date: Tue, 11 Feb 2014 17:11:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org Subject: svn commit: r261777 - stable/6/usr.bin/uname X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 17:11:55 -0000 Author: peter Date: Tue Feb 11 17:11:54 2014 New Revision: 261777 URL: http://svnweb.freebsd.org/changeset/base/261777 Log: MFC r256557 - kernel and userland osreldate helpers. Modified: stable/6/usr.bin/uname/uname.1 stable/6/usr.bin/uname/uname.c Modified: stable/6/usr.bin/uname/uname.1 ============================================================================== --- stable/6/usr.bin/uname/uname.1 Tue Feb 11 17:07:45 2014 (r261776) +++ stable/6/usr.bin/uname/uname.1 Tue Feb 11 17:11:54 2014 (r261777) @@ -40,7 +40,7 @@ .Nd display information about the system .Sh SYNOPSIS .Nm -.Op Fl aimnprsv +.Op Fl aiKmnprsUv .Sh DESCRIPTION The .Nm @@ -59,6 +59,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,11 @@ 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 older stable branches. Modified: stable/6/usr.bin/uname/uname.c ============================================================================== --- stable/6/usr.bin/uname/uname.c Tue Feb 11 17:07:45 2014 (r261776) +++ stable/6/usr.bin/uname/uname.c Tue Feb 11 17:11:54 2014 (r261777) @@ -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_ident, get_platform, get_hostname, get_arch, + get_release, get_sysname, get_kernvers, get_uservers, get_version; 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, "aimnprsv")) != -1) + while ((ch = getopt(argc, argv, "aiKmnprsUv")) != -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; @@ -111,6 +121,9 @@ main(int argc, char *argv[]) case 's': flags |= SFLAG; break; + case 'U': + flags |= UFLAG; + break; case 'v': flags |= VFLAG; break; @@ -151,6 +164,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) \ @@ -174,6 +189,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"); } @@ -242,6 +259,24 @@ 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 [-aimnprsv]\n"); From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 20:14:55 2014 Return-Path: Delivered-To: svn-src-all@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 85E13417; Tue, 11 Feb 2014 20:14:55 +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 7160B1C6B; Tue, 11 Feb 2014 20:14:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BKEt0p065959; Tue, 11 Feb 2014 20:14:55 GMT (envelope-from br@svn.freebsd.org) Received: (from br@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BKEtiE065958; Tue, 11 Feb 2014 20:14:55 GMT (envelope-from br@svn.freebsd.org) Message-Id: <201402112014.s1BKEtiE065958@svn.freebsd.org> From: Ruslan Bukin Date: Tue, 11 Feb 2014 20:14:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261778 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 20:14:55 -0000 Author: br Date: Tue Feb 11 20:14:54 2014 New Revision: 261778 URL: http://svnweb.freebsd.org/changeset/base/261778 Log: Disable debugging by default. Modified: head/sys/arm/conf/VYBRID.common Modified: head/sys/arm/conf/VYBRID.common ============================================================================== --- head/sys/arm/conf/VYBRID.common Tue Feb 11 17:11:54 2014 (r261777) +++ head/sys/arm/conf/VYBRID.common Tue Feb 11 20:14:54 2014 (r261778) @@ -61,11 +61,11 @@ options BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT #Enable verbose sysinit messages options KDB options DDB #Enable the kernel debugger -options INVARIANTS #Enable calls of extra sanity checking -options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options INVARIANTS #Enable calls of extra sanity checking +#options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles #options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed -options DIAGNOSTIC +#options DIAGNOSTIC # NFS support options NFSCL #Network Filesystem Client From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 21:13:37 2014 Return-Path: Delivered-To: svn-src-all@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 D8A3FC0D; Tue, 11 Feb 2014 21:13:37 +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 B5A7512D5; Tue, 11 Feb 2014 21:13:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BLDbfQ089727; Tue, 11 Feb 2014 21:13:37 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BLDbcO089726; Tue, 11 Feb 2014 21:13:37 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402112113.s1BLDbcO089726@svn.freebsd.org> From: Ian Lepore Date: Tue, 11 Feb 2014 21:13:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261779 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 21:13:37 -0000 Author: ian Date: Tue Feb 11 21:13:37 2014 New Revision: 261779 URL: http://svnweb.freebsd.org/changeset/base/261779 Log: Check in the "real" board_tsc4370 file in place of the stubbed out one. Real means the one TSC / Symmetricom / Microsemi actually uses on their 4370 and other rm9200 boards. This code demonstrates a variety of useful things board init code can do, including adjusting the master clock frequency. Modified: head/sys/arm/at91/board_tsc4370.c Modified: head/sys/arm/at91/board_tsc4370.c ============================================================================== --- head/sys/arm/at91/board_tsc4370.c Tue Feb 11 20:14:54 2014 (r261778) +++ head/sys/arm/at91/board_tsc4370.c Tue Feb 11 21:13:37 2014 (r261779) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2005-2008 Olivier Houchard. All rights reserved. * Copyright (c) 2005-2012 Warner Losh. All rights reserved. + * Copyright (c) 2007-2014 Ian Lepore. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -24,45 +25,573 @@ * SUCH DAMAGE. */ +/* + * Board init code for the TSC4370, and all other current TSC mainboards. + */ + #include __FBSDID("$FreeBSD$"); #include #include -#include +#include +#include +#include +#include +#include +#include #include #include -#include #include -#include -#include +#include +#include +#include +#include +#include +#include +#include + +/* + * RD4HW()/WR4HW() read and write at91rm9200 hardware register space directly. + * They serve the same purpose as the RD4()/WR4() idiom you see in many drivers, + * except that those translate to bus_space calls, but in this code we need to + * access the registers directly before the at91 bus_space stuff is set up. + */ + +static inline uint32_t +RD4HW(uint32_t devbase, uint32_t regoff) +{ + return *(volatile uint32_t *)(AT91_BASE + devbase + regoff); +} + +static inline void +WR4HW(uint32_t devbase, uint32_t regoff, uint32_t val) +{ + *(volatile uint32_t *)(AT91_BASE + devbase + regoff) = val; +} + +#ifndef BAUD2DIVISOR +#define BAUD2DIVISOR(b) \ + ((((at91_master_clock * 10) / ((b) * 16)) + 5) / 10) +#endif + +/* + * If doing an in-house build, use tsc_bootinfo.h which is shared with our + * custom boot2. Otherwise define some crucial bits of it here, enough to allow + * this code to compile. + */ +#ifdef TSC_BUILD +#include +#else +struct tsc_bootinfo { + uint32_t bi_size; + uint32_t bi_version; + uint32_t bi_flags; /* RB_xxxxx flags from sys/reboot.h */ + char bi_rootdevname[64]; +}; +#define TSC_BOOTINFO_MAGIC 0x06C30000 +#endif + +static struct arm_boot_params boot_params; +static struct tsc_bootinfo inkernel_bootinfo; + +/* + * Override the default boot param parser (supplied via weak linkage) with one + * that knows how to handle our custom tsc_bootinfo passed in from boot2. + */ +vm_offset_t +parse_boot_param(struct arm_boot_params *abp) +{ + + boot_params = *abp; + + /* + * If the right magic is in r0 and a non-NULL pointer is in r1, then + * it's our bootinfo, copy it. The pointer in r1 is a physical address + * passed from boot2. This routine is called immediately upon entry to + * initarm() and is in very nearly the same environment as boot2. In + * particular, va=pa and we can safely copy the args before we lose easy + * access to the memory they're stashed in right now. + * + * Note that all versions of boot2 that we've ever shipped have put + * zeroes into r2 and r3. Maybe that'll be useful some day. + */ + if (abp->abp_r0 == TSC_BOOTINFO_MAGIC && abp->abp_r1 != 0) { + inkernel_bootinfo = *(struct tsc_bootinfo *)(abp->abp_r1); + } + + return fake_preload_metadata(abp); +} + +/* + * Change the master clock config and wait for it to stabilize. + */ +static void +change_mckr(uint32_t mckr) +{ + int i; + + WR4HW(AT91RM92_PMC_BASE, PMC_MCKR, mckr); + + for (i = 0; i < 1000; ++i) + if ((RD4HW(AT91RM92_PMC_BASE, PMC_SR) & PMC_IER_MCKRDY)) + return; +} + +/* + * Allow the master clock frequency to be changed from whatever the bootloader + * set up, because sometimes it's harder to change/update a bootloader than it + * is to change/update the kernel once a product is in the field. + */ +static void +master_clock_init(void) +{ + uint32_t mckr = RD4HW(AT91RM92_PMC_BASE, PMC_MCKR); + int hintvalue = 0; + int newmckr = 0; + + /* + * If there's a hint that specifies the contents of MCKR, use it + * without question (it had better be right). + * + * If there's a "mckfreq" hint it might be in hertz or mhz (convert the + * latter to hz). Calculate the new MCK divider. If the CPU frequency + * is not a sane multiple of the hinted MCK frequency this is likely to + * behave badly. The moral is: don't hint at impossibilities. + */ + + if (resource_int_value("at91", 0, "mckr", &hintvalue) == 0) { + newmckr = hintvalue; + } else { + hintvalue = 90; /* Default to 90mhz if not specified. */ + resource_int_value("at91", 0, "mckfreq", &hintvalue); + if (hintvalue != 0) { + if (hintvalue < 1000) + hintvalue *= 1000000; + if (hintvalue != at91_master_clock) { + uint32_t divider; + struct at91_pmc_clock * cpuclk; + cpuclk = at91_pmc_clock_ref("cpu"); + divider = (cpuclk->hz / hintvalue) - 1; + newmckr = (mckr & 0xFFFFFCFF) | ((divider & 0x03) << 8); + at91_pmc_clock_deref(cpuclk); + } + } + } + + /* If the new mckr value is different than what's in the register now, + * make the change and wait for the clocks to settle (MCKRDY status). + * + * MCKRDY will never be asserted unless either the selected clock or the + * prescaler value changes (but not both at once) [this is detailed in + * the rm9200 errata]. This code assumes the prescaler value is always + * zero and that by time we get to here we're running on something other + * than the slow clock, so to change the mckr divider we first change + * back to the slow clock (keeping prescaler and divider unchanged), + * then go back to the original selected clock with the new divider. + * + * After changing MCK, go re-init everything clock-related, and reset + * the baud rate generator for the console (doing this here is kind of a + * rude hack, but hey, you do what you have to to run MCK faster). + */ + + if (newmckr != 0 && newmckr != mckr) { + if (mckr & 0x03) + change_mckr(mckr & ~0x03); + change_mckr(newmckr); + at91_pmc_init_clock(); + WR4HW(AT91RM92_DBGU_BASE, USART_BRGR, BAUD2DIVISOR(115200)); + } +} + +/* + * TSC-specific code to read the ID eeprom on the mainboard and extract the + * unit's EUI-64 which gets translated into a MAC-48 for ethernet. + */ +static void +eeprom_init(void) +{ + const uint32_t twiHz = 400000; + const uint32_t twiCkDiv = 1 << 16; + const uint32_t twiChDiv = ((at91_master_clock / twiHz) - 2) << 8; + const uint32_t twiClDiv = ((at91_master_clock / twiHz) - 2); + + /* + * Set the TWCK and TWD lines for Periph A, no pullup, open-drain. + */ + at91_pio_use_periph_a(AT91RM92_PIOA_BASE, + AT91C_PIO_PA25 | AT91C_PIO_PA26, 0); + at91_pio_gpio_high_z(AT91RM92_PIOA_BASE, AT91C_PIO_PA25, 1); + + /* + * Enable TWI power (irq numbers are also device IDs for power) + */ + WR4HW(AT91RM92_PMC_BASE, PMC_PCER, 1u << AT91RM92_IRQ_TWI); + + /* + * Disable TWI interrupts, reset device, enable Master mode, + * disable Slave mode, set the clock. + */ + WR4HW(AT91RM92_TWI_BASE, TWI_IDR, 0xffffffff); + WR4HW(AT91RM92_TWI_BASE, TWI_CR, TWI_CR_SWRST); + WR4HW(AT91RM92_TWI_BASE, TWI_CR, TWI_CR_MSEN | TWI_CR_SVDIS); + WR4HW(AT91RM92_TWI_BASE, TWI_CWGR, twiCkDiv | twiChDiv | twiClDiv); +} + +static int +eeprom_read(uint32_t EE_DEV_ADDR, uint32_t ee_off, void * buf, uint32_t size) +{ + uint8_t *bufptr = (uint8_t *)buf; + uint32_t status; + uint32_t count; + + /* Clean out any old status and received byte. */ + status = RD4HW(AT91RM92_TWI_BASE, TWI_SR); + status = RD4HW(AT91RM92_TWI_BASE, TWI_RHR); + + /* Set the TWI Master Mode Register */ + WR4HW(AT91RM92_TWI_BASE, TWI_MMR, + TWI_MMR_DADR(EE_DEV_ADDR) | TWI_MMR_IADRSZ(2) | TWI_MMR_MREAD); + + /* Set TWI Internal Address Register */ + WR4HW(AT91RM92_TWI_BASE, TWI_IADR, ee_off); + + /* Start transfer */ + WR4HW(AT91RM92_TWI_BASE, TWI_CR, TWI_CR_START); + + status = RD4HW(AT91RM92_TWI_BASE, TWI_SR); + + while (size-- > 1){ + /* Wait until Receive Holding Register is full */ + count = 1000000; + while (!(RD4HW(AT91RM92_TWI_BASE, TWI_SR) & TWI_SR_RXRDY) && + --count != 0) + continue; + if (count <= 0) + return -1; + /* Read and store byte */ + *bufptr++ = (uint8_t)RD4HW(AT91RM92_TWI_BASE, TWI_RHR); + } + WR4HW(AT91RM92_TWI_BASE, TWI_CR, TWI_CR_STOP); + + status = RD4HW(AT91RM92_TWI_BASE, TWI_SR); + + /* Wait until transfer is finished */ + while (!(RD4HW(AT91RM92_TWI_BASE, TWI_SR) & TWI_SR_TXCOMP)) + continue; + + /* Read last byte */ + *bufptr = (uint8_t)RD4HW(AT91RM92_TWI_BASE, TWI_RHR); + + return 0; +} + +static int +set_mac_from_idprom(void) +{ +#define SIGNATURE_SIZE 4 +#define EETYPE_SIZE 2 +#define BSLENGTH_SIZE 2 +#define RAW_SIZE 52 +#define EUI64_SIZE 8 +#define BS_SIGNATURE 0x21706d69 +#define BSO_SIGNATURE 0x216f7362 +#define DEVOFFSET_BSO_SIGNATURE 0x20 +#define OFFSET_BS_SIGNATURE 0 +#define SIZE_BS_SIGNATURE SIGNATURE_SIZE +#define OFFSET_EETYPE (OFFSET_BS_SIGNATURE + SIZE_BS_SIGNATURE) +#define SIZE_EETYPE EETYPE_SIZE +#define OFFSET_BOOTSECTSIZE (OFFSET_EETYPE + SIZE_EETYPE) +#define SIZE_BOOTSECTSIZE BSLENGTH_SIZE +#define OFFSET_RAW (OFFSET_BOOTSECTSIZE + SIZE_BOOTSECTSIZE) +#define OFFSET_EUI64 (OFFSET_RAW + RAW_SIZE) +#define EE_DEV_ADDR 0xA0 /* eeprom is AT24C256 at address 0xA0 */ + + int status; + uint32_t dev_offset = 0; + uint32_t sig; + uint8_t eui64[EUI64_SIZE]; + uint8_t eaddr[ETHER_ADDR_LEN]; + + eeprom_init(); + + /* Check for the boot section signature at offset 0. */ + status = eeprom_read(EE_DEV_ADDR, OFFSET_BS_SIGNATURE, &sig, sizeof(sig)); + if (status == -1) + return -1; + + if (sig != BS_SIGNATURE) { + /* Check for the boot section offset signature. */ + status = eeprom_read(EE_DEV_ADDR, + DEVOFFSET_BSO_SIGNATURE, &sig, sizeof(sig)); + if ((status == -1) || (sig != BSO_SIGNATURE)) + return -1; + + /* Read the device offset of the boot section structure. */ + status = eeprom_read(EE_DEV_ADDR, + DEVOFFSET_BSO_SIGNATURE + sizeof(sig), + &dev_offset, sizeof(dev_offset)); + if (status == -1) + return -1;; + + /* Check for the boot section signature. */ + status = eeprom_read(EE_DEV_ADDR, + dev_offset + OFFSET_BS_SIGNATURE, &sig, sizeof(sig)); + if ((status == -1) || (sig != BS_SIGNATURE)) + return -1;; + } + dev_offset += OFFSET_EUI64; + + /* Read the EUI64 from the device. */ + if (eeprom_read(EE_DEV_ADDR, dev_offset, eui64, sizeof(eui64)) == -1) + return -1;; + + /* Transcribe the EUI-64 to a MAC-48. + * + * Given an EUI-64 of aa:bb:cc:dd:ee:ff:gg:hh + * + * if (ff is zero and ee is non-zero) + * mac is aa:bb:cc:ee:gg:hh + * else + * mac is aa:bb:cc:ff:gg:hh + * + * This logic fixes a glitch in our mfg process in which the ff byte was + * always zero and the ee byte contained a non-zero value. This + * resulted in duplicate MAC addresses because we discarded the ee byte. + * Now they've fixed the process so that the ff byte is non-zero and + * unique addresses are formed from the ff:gg:hh bytes. If the ff byte + * is zero, then we have a unit manufactured during the glitch era, and + * we fix the problem by grabbing the ee byte rather than the ff byte. + */ + eaddr[0] = eui64[0]; + eaddr[1] = eui64[1]; + eaddr[2] = eui64[2]; + eaddr[3] = eui64[5]; + eaddr[4] = eui64[6]; + eaddr[5] = eui64[7]; + + if (eui64[5] == 0 && eui64[4] != 0) { + eaddr[3] = eui64[4]; + } + + /* + * Set the address in the hardware regs where the ate driver + * looks for it. + */ + WR4HW(AT91RM92_EMAC_BASE, ETH_SA1L, + (eaddr[3] << 24) | (eaddr[2] << 16) | (eaddr[1] << 8) | eaddr[0]); + WR4HW(AT91RM92_EMAC_BASE, ETH_SA1H, + (eaddr[5] << 8) | (eaddr[4])); + + printf( + "ID: EUI-64 %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n" + " MAC-48 %02x:%02x:%02x:%02x:%02x:%02x\n" + " read from i2c device 0x%02X offset 0x%x\n", + eui64[0], eui64[1], eui64[2], eui64[3], + eui64[4], eui64[5], eui64[6], eui64[7], + eaddr[0], eaddr[1], eaddr[2], + eaddr[3], eaddr[4], eaddr[5], + EE_DEV_ADDR, dev_offset); + + return (0); +} + +/* + * Assign SPI chip select pins based on which chip selects are found in hints. + */ +static void +assign_spi_pins(void) +{ + struct { + uint32_t num; + const char * name; + } chipsel_pins[] = { + { AT91C_PIO_PA3, "PA3", }, + { AT91C_PIO_PA4, "PA4", }, + { AT91C_PIO_PA5, "PA5", }, + { AT91C_PIO_PA6, "PA6", }, + }; + int anchor = 0; + uint32_t chipsel_inuse = 0; + + /* + * Search through all device hints looking for any that have + * ".at=spibus0". For each one found, ensure that there is also a + * chip select hint ".cs=" and that is 0-3, and assign the + * corresponding pin to the SPI peripheral. Whine if we find a SPI + * device with a missing or invalid chipsel hint. + */ + for (;;) { + const char * rName = ""; + int unit = 0; + int cs = 0; + int ret; + + ret = resource_find_match(&anchor, &rName, &unit, "at", "spibus0"); + if (ret != 0) + break; + + ret = resource_int_value(rName, unit, "cs", &cs); + if (ret != 0) { + printf( "Error: hint for SPI device %s%d " + "without a chip select hint; " + "device will not function.\n", + rName, unit); + continue; + } + if (cs < 0 || cs > 3) { + printf( "Error: hint for SPI device %s%d " + "contains an invalid chip select " + "value: %d\n", + rName, unit, cs); + continue; + } + if (chipsel_inuse & (1 << cs)) { + printf( "Error: hint for SPI device %s%d " + "specifies chip select %d, which " + "is already used by another device\n", + rName, unit, cs); + continue; + } + chipsel_inuse |= 1 << cs; + at91_pio_use_periph_a(AT91RM92_PIOA_BASE, + chipsel_pins[cs].num, 1); + printf( "Configured pin %s as SPI chip " + "select %d for %s%d\n", + chipsel_pins[cs].name, cs, rName, unit); + } + + /* + * If there were hints for any SPI devices, assign the basic SPI IO pins + * and enable SPI power (irq numbers are also device IDs for power). + */ + if (chipsel_inuse != 0) { + at91_pio_use_periph_a(AT91RM92_PIOA_BASE, + AT91C_PIO_PA1 | AT91C_PIO_PA0 | AT91C_PIO_PA2, 0); + WR4HW(AT91RM92_PMC_BASE, PMC_PCER, 1u << AT91RM92_IRQ_SPI); + } +} BOARD_INIT long board_init(void) { + int is_bga, rev_mii; + + /* + * Deal with bootinfo (if any) passed in from the boot2 bootloader and + * copied to the static inkernel_bootinfo earlier in the init. Do this + * early so that bootverbose is set from this point on. + */ + if (inkernel_bootinfo.bi_size > 0 && + (inkernel_bootinfo.bi_flags & RB_BOOTINFO)) { + struct tsc_bootinfo *bip = &inkernel_bootinfo; + printf("TSC_BOOTINFO: size %u howtoflags=0x%08x rootdev='%s'\n", + bip->bi_size, bip->bi_flags, bip->bi_rootdevname); + boothowto = bip->bi_flags; + bootverbose = (boothowto & RB_VERBOSE); + if (bip->bi_rootdevname[0] != 0) + rootdevnames[0] = bip->bi_rootdevname; + } - at91rm9200_set_subtype(AT91_ST_RM9200_PQFP); + /* + * The only way to know if we're in a BGA package (and thus have PIOD) + * is to be told via a hint; there's nothing detectable in the silicon. + * This is esentially an rm92-specific extension to getting the chip ID + * (which was done by at91_machdep just before calling this routine). + * If it is the BGA package, enable the clock for PIOD. + */ + is_bga = 0; + resource_int_value("at91", 0, "is_bga_package", &is_bga); + + if (is_bga) + WR4HW(AT91RM92_PMC_BASE, PMC_PCER, 1u << AT91RM92_IRQ_PIOD); + +#if __FreeBSD_version >= 1000000 + at91rm9200_set_subtype(is_bga ? AT91_ST_RM9200_BGA : + AT91_ST_RM9200_PQFP); +#endif + /* + * Go reprogram the MCK frequency based on hints. + */ + master_clock_init(); + + /* + * Configure UARTs. + */ at91rm9200_config_uart(AT91_ID_DBGU, 0, 0); /* DBGU just Tx and Rx */ at91rm9200_config_uart(AT91RM9200_ID_USART0, 1, 0); /* Tx and Rx */ at91rm9200_config_uart(AT91RM9200_ID_USART1, 2, 0); /* Tx and Rx */ at91rm9200_config_uart(AT91RM9200_ID_USART2, 3, 0); /* Tx and Rx */ at91rm9200_config_uart(AT91RM9200_ID_USART3, 4, 0); /* Tx and Rx */ - at91rm9200_config_mci(0); /* tsc4370 board has only 1 wire */ - /* Newer boards may have 4 wires */ + /* + * Configure MCI (sdcard) + */ + at91rm9200_config_mci(0); + + /* + * Assign the pins needed by the emac device, and power it up. Also, + * configure it for RMII operation unless the 'revmii_mode' hint is set, + * in which case configure the full set of MII pins. The revmii_mode + * hint is for so-called reverse-MII, used for connections to a Broadcom + * 5325E switch on some boards. Note that order is important here: + * configure pins, then power on the device, then access the device's + * config registers. + */ + rev_mii = 0; + resource_int_value("ate", 0, "phy_revmii_mode", &rev_mii); + + at91_pio_use_periph_a(AT91RM92_PIOA_BASE, + AT91C_PIO_PA7 | AT91C_PIO_PA8 | AT91C_PIO_PA9 | + AT91C_PIO_PA10 | AT91C_PIO_PA11 | AT91C_PIO_PA12 | + AT91C_PIO_PA13 | AT91C_PIO_PA14 | AT91C_PIO_PA15 | + AT91C_PIO_PA16, 0); + if (rev_mii) { + at91_pio_use_periph_b(AT91RM92_PIOB_BASE, + AT91C_PIO_PB12 | AT91C_PIO_PB13 | AT91C_PIO_PB14 | + AT91C_PIO_PB15 | AT91C_PIO_PB16 | AT91C_PIO_PB17 | + AT91C_PIO_PB18 | AT91C_PIO_PB19, 0); + } + WR4HW(AT91RM92_PMC_BASE, PMC_PCER, 1u << AT91RM92_IRQ_EMAC); + if (!rev_mii) { + WR4HW(AT91RM92_EMAC_BASE, ETH_CFG, + RD4HW(AT91RM92_EMAC_BASE, ETH_CFG) | ETH_CFG_RMII); + } - /* Configure TWI */ - /* Configure SPI + dataflash */ - /* Configure SSC */ - /* Configure USB Host */ - /* Configure FPGA attached to chip selects */ - - /* Pin assignment */ - /* Assert PA24 low -- talk to rubidium */ - at91_pio_use_gpio(AT91RM92_PIOA_BASE, AT91C_PIO_PA24); - at91_pio_gpio_output(AT91RM92_PIOA_BASE, AT91C_PIO_PA24, 0); - at91_pio_gpio_clear(AT91RM92_PIOA_BASE, AT91C_PIO_PA24); + /* + * Get our ethernet MAC address from the ID eeprom. + * Configures TWI as a side effect. + */ + set_mac_from_idprom(); + + /* + * Configure SPI + */ + assign_spi_pins(); + + /* + * Configure SSC + */ + at91_pio_use_periph_a( + AT91RM92_PIOB_BASE, + AT91C_PIO_PB6 | AT91C_PIO_PB7 | AT91C_PIO_PB8 | /* transmit */ + AT91C_PIO_PB9 | AT91C_PIO_PB10 | AT91C_PIO_PB11, /* receive */ + 0); /* no pullup */ + + /* + * We're using TC1's A1 input for PPS measurements that drive the + * kernel PLL and our NTP refclock. On some old boards we route a 5mhz + * signal to TC1's A2 input (pin PA21), but we have never used that + * clock (it rolls over too fast for hz=100), and now newer boards are + * using pin PA21 as a CTS0 for USART1, so we no longer assign it to + * the timer block like we used to here. + */ + at91_pio_use_periph_b(AT91RM92_PIOA_BASE, AT91C_PIO_PA19, 0); + + /* + * Configure pins used to bitbang-upload the firmware to the main FPGA. + */ at91_pio_use_gpio(AT91RM92_PIOB_BASE, AT91C_PIO_PB16 | AT91C_PIO_PB17 | AT91C_PIO_PB18 | AT91C_PIO_PB19); @@ -70,3 +599,4 @@ board_init(void) } ARM_BOARD(NONE, "TSC4370 Controller Board"); + From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 21:57:38 2014 Return-Path: Delivered-To: svn-src-all@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 E2714A8F; Tue, 11 Feb 2014 21:57: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 B361316DB; Tue, 11 Feb 2014 21:57:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BLvcLI005938; Tue, 11 Feb 2014 21:57:38 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BLvbPA005934; Tue, 11 Feb 2014 21:57:37 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201402112157.s1BLvbPA005934@svn.freebsd.org> From: John Baldwin Date: Tue, 11 Feb 2014 21:57:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261780 - in head: sys/kern sys/sys usr.bin/procstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 21:57:39 -0000 Author: jhb Date: Tue Feb 11 21:57:37 2014 New Revision: 261780 URL: http://svnweb.freebsd.org/changeset/base/261780 Log: Expose OBJT_MGTDEVICE VM objects used for GEM/TTM with drm2 as an explicit object type. Reviewed by: kib MFC after: 1 week Modified: head/sys/kern/kern_proc.c head/sys/sys/user.h head/usr.bin/procstat/procstat.1 head/usr.bin/procstat/procstat_vm.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Tue Feb 11 21:13:37 2014 (r261779) +++ head/sys/kern/kern_proc.c Tue Feb 11 21:57:37 2014 (r261780) @@ -2255,6 +2255,9 @@ kern_proc_vmmap_out(struct proc *p, stru case OBJT_SG: kve->kve_type = KVME_TYPE_SG; break; + case OBJT_MGTDEVICE: + kve->kve_type = KVME_TYPE_MGTDEVICE; + break; default: kve->kve_type = KVME_TYPE_UNKNOWN; break; Modified: head/sys/sys/user.h ============================================================================== --- head/sys/sys/user.h Tue Feb 11 21:13:37 2014 (r261779) +++ head/sys/sys/user.h Tue Feb 11 21:57:37 2014 (r261780) @@ -414,6 +414,7 @@ struct kinfo_file { #define KVME_TYPE_PHYS 5 #define KVME_TYPE_DEAD 6 #define KVME_TYPE_SG 7 +#define KVME_TYPE_MGTDEVICE 8 #define KVME_TYPE_UNKNOWN 255 #define KVME_PROT_READ 0x00000001 Modified: head/usr.bin/procstat/procstat.1 ============================================================================== --- head/usr.bin/procstat/procstat.1 Tue Feb 11 21:13:37 2014 (r261779) +++ head/usr.bin/procstat/procstat.1 Tue Feb 11 21:57:37 2014 (r261780) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 27, 2013 +.Dd February 11, 2014 .Dt PROCSTAT 1 .Os .Sh NAME @@ -416,6 +416,9 @@ dead default .It dv device +.It md +device with managed pages +.Pq GEM/TTM .It ph physical .It sg Modified: head/usr.bin/procstat/procstat_vm.c ============================================================================== --- head/usr.bin/procstat/procstat_vm.c Tue Feb 11 21:13:37 2014 (r261779) +++ head/usr.bin/procstat/procstat_vm.c Tue Feb 11 21:57:37 2014 (r261780) @@ -100,6 +100,9 @@ procstat_vm(struct procstat *procstat, s case KVME_TYPE_SG: str = "sg"; break; + case KVME_TYPE_MGTDEVICE: + str = "md"; + break; case KVME_TYPE_UNKNOWN: default: str = "??"; From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 22:02:41 2014 Return-Path: Delivered-To: svn-src-all@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 D991FCDD; Tue, 11 Feb 2014 22:02:41 +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 B76FD1779; Tue, 11 Feb 2014 22:02:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BM2fgs009392; Tue, 11 Feb 2014 22:02:41 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BM2eaL009384; Tue, 11 Feb 2014 22:02:40 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201402112202.s1BM2eaL009384@svn.freebsd.org> From: John Baldwin Date: Tue, 11 Feb 2014 22:02:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261781 - in head/sys: amd64/amd64 i386/i386 i386/include i386/xen pc98/pc98 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 22:02:41 -0000 Author: jhb Date: Tue Feb 11 22:02:40 2014 New Revision: 261781 URL: http://svnweb.freebsd.org/changeset/base/261781 Log: Don't waste a page of KVA for the boot-time memory test on x86. For amd64, reuse the first page of the crashdumpmap as CMAP1/CADDR1. For i386, remove CMAP1/CADDR1 entirely and reuse CMAP3/CADDR3 for the memory test. Reviewed by: alc, peter MFC after: 2 weeks Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/machdep.c head/sys/i386/i386/pmap.c head/sys/i386/include/pmap.h head/sys/i386/xen/pmap.c head/sys/pc98/pc98/machdep.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Tue Feb 11 21:57:37 2014 (r261780) +++ head/sys/amd64/amd64/pmap.c Tue Feb 11 22:02:40 2014 (r261781) @@ -812,7 +812,7 @@ void pmap_bootstrap(vm_paddr_t *firstaddr) { vm_offset_t va; - pt_entry_t *pte, *unused; + pt_entry_t *pte; /* * Create an initial set of page tables to run the kernel in. @@ -858,14 +858,11 @@ pmap_bootstrap(vm_paddr_t *firstaddr) pte = vtopte(va); /* - * CMAP1 is only used for the memory test. - */ - SYSMAP(caddr_t, CMAP1, CADDR1, 1) - - /* - * Crashdump maps. + * Crashdump maps. The first page is reused as CMAP1 for the + * memory test. */ - SYSMAP(caddr_t, unused, crashdumpmap, MAXDUMPPGS) + SYSMAP(caddr_t, CMAP1, crashdumpmap, MAXDUMPPGS) + CADDR1 = crashdumpmap; virtual_avail = va; Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Tue Feb 11 21:57:37 2014 (r261780) +++ head/sys/i386/i386/machdep.c Tue Feb 11 22:02:40 2014 (r261781) @@ -2403,7 +2403,7 @@ physmap_done: phys_avail[pa_indx++] = physmap[0]; phys_avail[pa_indx] = physmap[0]; dump_avail[da_indx] = physmap[0]; - pte = CMAP1; + pte = CMAP3; /* * Get dcons buffer address @@ -2425,7 +2425,7 @@ physmap_done: end = trunc_page(physmap[i + 1]); for (pa = round_page(physmap[i]); pa < end; pa += PAGE_SIZE) { int tmp, page_bad, full; - int *ptr = (int *)CADDR1; + int *ptr = (int *)CADDR3; full = FALSE; /* Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Tue Feb 11 21:57:37 2014 (r261780) +++ head/sys/i386/i386/pmap.c Tue Feb 11 22:02:40 2014 (r261781) @@ -256,11 +256,10 @@ struct sysmaps { caddr_t CADDR2; }; static struct sysmaps sysmaps_pcpu[MAXCPU]; -pt_entry_t *CMAP1 = 0; -static pt_entry_t *CMAP3; +pt_entry_t *CMAP3; static pd_entry_t *KPTD; -caddr_t CADDR1 = 0, ptvmmap = 0; -static caddr_t CADDR3; +caddr_t ptvmmap = 0; +caddr_t CADDR3; struct msgbuf *msgbufp = 0; /* @@ -434,7 +433,6 @@ pmap_bootstrap(vm_paddr_t firstaddr) SYSMAP(caddr_t, sysmaps->CMAP1, sysmaps->CADDR1, 1) SYSMAP(caddr_t, sysmaps->CMAP2, sysmaps->CADDR2, 1) } - SYSMAP(caddr_t, CMAP1, CADDR1, 1) SYSMAP(caddr_t, CMAP3, CADDR3, 1) /* Modified: head/sys/i386/include/pmap.h ============================================================================== --- head/sys/i386/include/pmap.h Tue Feb 11 21:57:37 2014 (r261780) +++ head/sys/i386/include/pmap.h Tue Feb 11 22:02:40 2014 (r261781) @@ -420,8 +420,8 @@ struct pv_chunk { #ifdef _KERNEL -extern caddr_t CADDR1; -extern pt_entry_t *CMAP1; +extern caddr_t CADDR3; +extern pt_entry_t *CMAP3; extern vm_paddr_t phys_avail[]; extern vm_paddr_t dump_avail[]; extern int pseflag; Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Tue Feb 11 21:57:37 2014 (r261780) +++ head/sys/i386/xen/pmap.c Tue Feb 11 22:02:40 2014 (r261781) @@ -249,9 +249,9 @@ struct sysmaps { caddr_t CADDR2; }; static struct sysmaps sysmaps_pcpu[MAXCPU]; -static pt_entry_t *CMAP3; +pt_entry_t *CMAP3; caddr_t ptvmmap = 0; -static caddr_t CADDR3; +caddr_t CADDR3; struct msgbuf *msgbufp = 0; /* Modified: head/sys/pc98/pc98/machdep.c ============================================================================== --- head/sys/pc98/pc98/machdep.c Tue Feb 11 21:57:37 2014 (r261780) +++ head/sys/pc98/pc98/machdep.c Tue Feb 11 22:02:40 2014 (r261781) @@ -1961,7 +1961,7 @@ getmemsize(int first) phys_avail[pa_indx++] = physmap[0]; phys_avail[pa_indx] = physmap[0]; dump_avail[da_indx] = physmap[0]; - pte = CMAP1; + pte = CMAP3; /* * Get dcons buffer address @@ -1982,7 +1982,7 @@ getmemsize(int first) end = trunc_page(physmap[i + 1]); for (pa = round_page(physmap[i]); pa < end; pa += PAGE_SIZE) { int tmp, page_bad, full; - int *ptr = (int *)CADDR1; + int *ptr = (int *)CADDR3; full = FALSE; /* From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 22:05:21 2014 Return-Path: Delivered-To: svn-src-all@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 D9B43E63; Tue, 11 Feb 2014 22:05:21 +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 C471D1798; Tue, 11 Feb 2014 22:05:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BM5LwZ011022; Tue, 11 Feb 2014 22:05:21 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BM5LiF011020; Tue, 11 Feb 2014 22:05:21 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201402112205.s1BM5LiF011020@svn.freebsd.org> From: John Baldwin Date: Tue, 11 Feb 2014 22:05:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261782 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 22:05:21 -0000 Author: jhb Date: Tue Feb 11 22:05:21 2014 New Revision: 261782 URL: http://svnweb.freebsd.org/changeset/base/261782 Log: Correct assertion to assert that the existing device VM object uses the same type rather than asserting in the case where we just created a new VM object. Reviewed by: kib Modified: head/sys/vm/device_pager.c Modified: head/sys/vm/device_pager.c ============================================================================== --- head/sys/vm/device_pager.c Tue Feb 11 22:02:40 2014 (r261781) +++ head/sys/vm/device_pager.c Tue Feb 11 22:05:21 2014 (r261782) @@ -169,18 +169,20 @@ cdev_pager_allocate(void *handle, enum o */ if (pindex > object->size) object->size = pindex; + KASSERT(object->type == tp, + ("Inconsistent device pager type %p %d", object, tp)); } else { object = object1; object1 = NULL; object->handle = handle; TAILQ_INSERT_TAIL(&dev_pager_object_list, object, pager_object_list); - KASSERT(object->type == tp, - ("Inconsistent device pager type %p %d", object, tp)); } } else { if (pindex > object->size) object->size = pindex; + KASSERT(object->type == tp, + ("Inconsistent device pager type %p %d", object, tp)); } mtx_unlock(&dev_pager_mtx); if (object1 != NULL) { From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 22:09:04 2014 Return-Path: Delivered-To: svn-src-all@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 8C83637F; Tue, 11 Feb 2014 22:09: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 75E5A17E9; Tue, 11 Feb 2014 22:09:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BM94Qw013594; Tue, 11 Feb 2014 22:09:04 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BM94Td013593; Tue, 11 Feb 2014 22:09:04 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201402112209.s1BM94Td013593@svn.freebsd.org> From: Warner Losh Date: Tue, 11 Feb 2014 22:09:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261783 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 22:09:04 -0000 Author: imp Date: Tue Feb 11 22:09:03 2014 New Revision: 261783 URL: http://svnweb.freebsd.org/changeset/base/261783 Log: Swap PA and VA so they are in the right registers... Modified: head/sys/arm/arm/locore.S Modified: head/sys/arm/arm/locore.S ============================================================================== --- head/sys/arm/arm/locore.S Tue Feb 11 22:05:21 2014 (r261782) +++ head/sys/arm/arm/locore.S Tue Feb 11 22:09:03 2014 (r261783) @@ -170,8 +170,8 @@ Lunmapped: #if defined(SOCDEV_PA) && defined(SOCDEV_VA) /* Create the custom map */ - ldr r1, =SOCDEV_VA - ldr r2, =SOCDEV_PA + ldr r1, =SOCDEV_PA + ldr r2, =SOCDEV_VA bl build_pagetables #endif From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 23:11:12 2014 Return-Path: Delivered-To: svn-src-all@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 375AD97E; Tue, 11 Feb 2014 23:11:12 +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 AE5F81D20; Tue, 11 Feb 2014 23:11:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BNBBJj060490; Tue, 11 Feb 2014 23:11:11 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BNBB0a060489; Tue, 11 Feb 2014 23:11:11 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201402112311.s1BNBB0a060489@svn.freebsd.org> From: Hiroki Sato Date: Tue, 11 Feb 2014 23:11:11 +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: r261784 - stable/10/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 23:11:12 -0000 Author: hrs Date: Tue Feb 11 23:11:11 2014 New Revision: 261784 URL: http://svnweb.freebsd.org/changeset/base/261784 Log: Docuemnt mount_udf(8) issue. Submitted by: brueffer Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Tue Feb 11 22:09:03 2014 (r261783) +++ stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Tue Feb 11 23:11:11 2014 (r261784) @@ -233,6 +233,12 @@ boot on &os;-CURRENT and will be fixed in &os; &release.current;. + + + The &man.mount.udf.8; utility has a bug which prevents + it from mounting any UDF file system. This has been fixed + in &os;-CURRENT and &os; &release.current;. + From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 00:32:15 2014 Return-Path: Delivered-To: svn-src-all@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 5FB0F9E8; Wed, 12 Feb 2014 00:32: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 4A231156D; Wed, 12 Feb 2014 00:32:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1C0WFnn092912; Wed, 12 Feb 2014 00:32:15 GMT (envelope-from tychon@svn.freebsd.org) Received: (from tychon@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1C0WFlG092911; Wed, 12 Feb 2014 00:32:15 GMT (envelope-from tychon@svn.freebsd.org) Message-Id: <201402120032.s1C0WFlG092911@svn.freebsd.org> From: Tycho Nightingale Date: Wed, 12 Feb 2014 00:32:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261785 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 00:32:15 -0000 Author: tychon Date: Wed Feb 12 00:32:14 2014 New Revision: 261785 URL: http://svnweb.freebsd.org/changeset/base/261785 Log: Provide an indication a "PIO Setup Device to Host FIS" occurred while executing the IDENTIFY DEVICE and IDENTIFY PACKET DEVICE commands. Also, provide an indication a "D2H Register FIS" occurred during a SET FEATURES command. Approved by: grehan (co-mentor) Modified: head/usr.sbin/bhyve/pci_ahci.c Modified: head/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- head/usr.sbin/bhyve/pci_ahci.c Tue Feb 11 23:11:11 2014 (r261784) +++ head/usr.sbin/bhyve/pci_ahci.c Wed Feb 12 00:32:14 2014 (r261785) @@ -254,6 +254,16 @@ ahci_write_fis(struct ahci_port *p, enum } static void +ahci_write_fis_piosetup(struct ahci_port *p) +{ + uint8_t fis[20]; + + memset(fis, 0, sizeof(fis)); + fis[0] = FIS_TYPE_PIOSETUP; + ahci_write_fis(p, FIS_TYPE_PIOSETUP, fis); +} + +static void ahci_write_fis_sdb(struct ahci_port *p, int slot, uint32_t tfd) { uint8_t fis[8]; @@ -587,6 +597,7 @@ handle_identify(struct ahci_port *p, int buf[101] = (sectors >> 16); buf[102] = (sectors >> 32); buf[103] = (sectors >> 48); + ahci_write_fis_piosetup(p); write_prdt(p, slot, cfis, (void *)buf, sizeof(buf)); p->tfd = ATA_S_DSC | ATA_S_READY; p->is |= AHCI_P_IX_DP; @@ -629,6 +640,7 @@ handle_atapi_identify(struct ahci_port * buf[85] = (1 << 4); buf[87] = (1 << 14); buf[88] = (1 << 14 | 0x7f); + ahci_write_fis_piosetup(p); write_prdt(p, slot, cfis, (void *)buf, sizeof(buf)); p->tfd = ATA_S_DSC | ATA_S_READY; p->is |= AHCI_P_IX_DHR; @@ -1182,9 +1194,7 @@ ahci_handle_cmd(struct ahci_port *p, int p->tfd |= (ATA_ERROR_ABORT << 8); break; } - p->is |= AHCI_P_IX_DP; - p->ci &= ~(1 << slot); - ahci_generate_intr(p->pr_sc); + ahci_write_fis_d2h(p, slot, cfis, p->tfd); break; } case ATA_SET_MULTI: From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 00:53:40 2014 Return-Path: Delivered-To: svn-src-all@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 0231BEA1; Wed, 12 Feb 2014 00:53:40 +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 D28DA16FB; Wed, 12 Feb 2014 00:53:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1C0rdbG000697; Wed, 12 Feb 2014 00:53:39 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1C0rdj6000693; Wed, 12 Feb 2014 00:53:39 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402120053.s1C0rdj6000693@svn.freebsd.org> From: Ian Lepore Date: Wed, 12 Feb 2014 00:53:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261786 - in head/sys: arm/at91 kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 00:53:40 -0000 Author: ian Date: Wed Feb 12 00:53:38 2014 New Revision: 261786 URL: http://svnweb.freebsd.org/changeset/base/261786 Log: Rework the EARLY_PRINTF mechanism. Instead of defining a special eprintf() routine, now a platform can provide a pointer to an early_putc() routine which is used instead of cn_putc(). Control can be handed off from early printf support to standard console support by NULLing out the pointer during standard console init. This leverages all the existing error reporting that uses printf calls, such as panic() which can now be usefully employed even in early platform init code (useful at least to those who maintain that code and build kernels with EARLY_PRINTF defined). Reviewed by: imp, eadler Modified: head/sys/arm/at91/uart_dev_at91usart.c head/sys/kern/kern_cons.c head/sys/kern/subr_prf.c head/sys/sys/systm.h Modified: head/sys/arm/at91/uart_dev_at91usart.c ============================================================================== --- head/sys/arm/at91/uart_dev_at91usart.c Wed Feb 12 00:32:14 2014 (r261785) +++ head/sys/arm/at91/uart_dev_at91usart.c Wed Feb 12 00:53:38 2014 (r261786) @@ -228,6 +228,27 @@ static struct uart_ops at91_usart_ops = .getc = at91_usart_getc, }; +#ifdef EARLY_PRINTF +/* + * Early printf support. This assumes that we have the SoC "system" devices + * mapped into AT91_BASE. To use this before we adjust the boostrap tables, + * you'll need to define SOCDEV_VA to be 0xdc000000 and SOCDEV_PA to be + * 0xfc000000 in your config file where you define EARLY_PRINTF + */ +volatile uint32_t *at91_dbgu = (volatile uint32_t *)(AT91_BASE + AT91_DBGU0); + +static void +eputc(int c) +{ + + while (!(at91_dbgu[USART_CSR / 4] & USART_CSR_TXRDY)) + continue; + at91_dbgu[USART_THR / 4] = c; +} + +early_putc_t * early_putc = eputc; +#endif + static int at91_usart_probe(struct uart_bas *bas) { @@ -244,6 +265,22 @@ at91_usart_init(struct uart_bas *bas, in int parity) { +#ifdef EARLY_PRINTF + if (early_putc != NULL) { + printf("Early printf yielding control to the real console.\n"); + early_putc = NULL; + } +#endif + + /* + * This routine is called multiple times, sometimes right after writing + * some output, and the last byte is still shifting out. If that's the + * case delay briefly before resetting, but don't loop on TXRDY because + * we don't want to hang here forever if the hardware is in a bad state. + */ + if (!(RD4(bas, USART_CSR) & USART_CSR_TXRDY)) + DELAY(1000); + at91_usart_param(bas, baudrate, databits, stopbits, parity); /* Reset the rx and tx buffers and turn on rx and tx */ @@ -276,28 +313,6 @@ at91_usart_putc(struct uart_bas *bas, in WR4(bas, USART_THR, c); } -#ifdef EARLY_PRINTF -/* - * Early printf support. This assumes that we have the SoC "system" devices - * mapped into AT91_BASE. To use this before we adjust the boostrap tables, - * You'll need to define SOCDEV_VA to be 0xdc000000 and SOCDEV_PA to be - * 0xfc000000 in your config file where you define EARLY_PRINTF - */ -volatile uint32_t *at91_dbgu = (volatile uint32_t *)(AT91_BASE + AT91_DBGU0); - -void -eputc(int c) -{ - - if (c == '\n') - eputc('\r'); - - while (!(at91_dbgu[USART_CSR / 4] & USART_CSR_TXRDY)) - continue; - at91_dbgu[USART_THR / 4] = c; -} -#endif - /* * Check for a character available. */ Modified: head/sys/kern/kern_cons.c ============================================================================== --- head/sys/kern/kern_cons.c Wed Feb 12 00:32:14 2014 (r261785) +++ head/sys/kern/kern_cons.c Wed Feb 12 00:53:38 2014 (r261786) @@ -464,6 +464,15 @@ cnputc(int c) struct consdev *cn; char *cp; +#ifdef EARLY_PRINTF + if (early_putc != NULL) { + if (c == '\n') + early_putc('\r'); + early_putc(c); + return; + } +#endif + if (cn_mute || c == '\0') return; STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) { Modified: head/sys/kern/subr_prf.c ============================================================================== --- head/sys/kern/subr_prf.c Wed Feb 12 00:32:14 2014 (r261785) +++ head/sys/kern/subr_prf.c Wed Feb 12 00:53:38 2014 (r261786) @@ -1137,25 +1137,3 @@ hexdump(const void *ptr, int length, con } } -#ifdef EARLY_PRINTF -/* - * Support for calling an alternate printf early in boot (like before - * cn_init() can be called). Platforms need to define eputc that want - * to use this. - */ -static void -early_putc_func(int ch, void *arg __unused) -{ - eputc(ch); -} - -void -eprintf(const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - kvprintf(fmt, early_putc_func, NULL, 10, ap); - va_end(ap); -} -#endif Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Wed Feb 12 00:32:14 2014 (r261785) +++ head/sys/sys/systm.h Wed Feb 12 00:53:38 2014 (r261786) @@ -197,8 +197,8 @@ void init_param2(long physpages); void init_static_kenv(char *, size_t); void tablefull(const char *); #ifdef EARLY_PRINTF -void eprintf(const char *, ...) __printflike(1, 2); -void eputc(int ch); +typedef void early_putc_t(int ch); +extern early_putc_t *early_putc; #endif int kvprintf(char const *, void (*)(int, void*), void *, int, __va_list) __printflike(1, 0); From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 02:03:38 2014 Return-Path: Delivered-To: svn-src-all@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 995FB34D; Wed, 12 Feb 2014 02:03: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 843E1135F; Wed, 12 Feb 2014 02:03:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1C23ccr029905; Wed, 12 Feb 2014 02:03:38 GMT (envelope-from jmg@svn.freebsd.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1C23cLK029903; Wed, 12 Feb 2014 02:03:38 GMT (envelope-from jmg@svn.freebsd.org) Message-Id: <201402120203.s1C23cLK029903@svn.freebsd.org> From: John-Mark Gurney Date: Wed, 12 Feb 2014 02:03:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261787 - head/contrib/gdb/gdb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 02:03:38 -0000 Author: jmg Date: Wed Feb 12 02:03:37 2014 New Revision: 261787 URL: http://svnweb.freebsd.org/changeset/base/261787 Log: recognize the FreeBSD ARCH tag that is put on binaries like on armeb EABI binaries... MFC after: 1 week Modified: head/contrib/gdb/gdb/osabi.c Modified: head/contrib/gdb/gdb/osabi.c ============================================================================== --- head/contrib/gdb/gdb/osabi.c Wed Feb 12 00:53:38 2014 (r261786) +++ head/contrib/gdb/gdb/osabi.c Wed Feb 12 02:03:37 2014 (r261787) @@ -365,11 +365,11 @@ check_note (bfd *abfd, asection *sect, c const char *name, unsigned long descsz, unsigned long type) { unsigned long notesz; + unsigned long rdescsz; /* Calculate the size of this note. */ - notesz = strlen (name) + 1; - notesz = ((notesz + 3) & ~3); - notesz += descsz; + notesz = 4 * 3; /* namelen, optlen, type */ + notesz += strlen (name) + 1; notesz = ((notesz + 3) & ~3); /* If this assertion triggers, increase MAX_NOTESZ. */ @@ -385,7 +385,15 @@ check_note (bfd *abfd, asection *sect, c return 0; /* Check the descriptor size. */ - if (bfd_h_get_32 (abfd, note + 4) != descsz) + rdescsz = bfd_h_get_32 (abfd, note + 4); + if (descsz != (unsigned long)-1 && rdescsz != descsz) + return 0; + + notesz += rdescsz; + notesz = ((notesz + 3) & ~3); + + /* Check whether SECT is big enough to comtain the complete note. */ + if (notesz > bfd_section_size (abfd, sect)) return 0; /* Check the note type. */ @@ -480,6 +488,12 @@ generic_elf_osabi_sniff_abi_tag_sections *osabi = GDB_OSABI_FREEBSD_ELF; return; } + if (check_note (abfd, sect, note, "FreeBSD", -1, NT_FREEBSD_ARCH_TAG)) + { + /* There is no need to check the version yet. */ + *osabi = GDB_OSABI_FREEBSD_ELF; + return; + } return; } From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 02:08:43 2014 Return-Path: Delivered-To: svn-src-all@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 2BF106E2; Wed, 12 Feb 2014 02:08:43 +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 F18F0138F; Wed, 12 Feb 2014 02:08:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1C28g23030759; Wed, 12 Feb 2014 02:08:42 GMT (envelope-from jmg@svn.freebsd.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1C28gel030755; Wed, 12 Feb 2014 02:08:42 GMT (envelope-from jmg@svn.freebsd.org) Message-Id: <201402120208.s1C28gel030755@svn.freebsd.org> From: John-Mark Gurney Date: Wed, 12 Feb 2014 02:08:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261788 - in head: gnu/usr.bin/gdb/kgdb lib/libkvm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 02:08:43 -0000 Author: jmg Date: Wed Feb 12 02:08:42 2014 New Revision: 261788 URL: http://svnweb.freebsd.org/changeset/base/261788 Log: add support for building a cross-gdb for ARM... This isn't hooked up to xdev yet as I don't know how to make it work properly... It also isn't heavily tested... Reviewed by: silence on -arm Modified: head/gnu/usr.bin/gdb/kgdb/trgt_arm.c head/lib/libkvm/kvm_arm.c head/lib/libkvm/kvm_minidump_arm.c Modified: head/gnu/usr.bin/gdb/kgdb/trgt_arm.c ============================================================================== --- head/gnu/usr.bin/gdb/kgdb/trgt_arm.c Wed Feb 12 02:03:37 2014 (r261787) +++ head/gnu/usr.bin/gdb/kgdb/trgt_arm.c Wed Feb 12 02:08:42 2014 (r261788) @@ -50,7 +50,11 @@ __FBSDID("$FreeBSD$"); CORE_ADDR kgdb_trgt_core_pcb(u_int cpuid) { +#ifndef CROSS_DEBUGGER return (kgdb_trgt_stop_pcb(cpuid, sizeof(struct pcb))); +#else + return -1; +#endif } void Modified: head/lib/libkvm/kvm_arm.c ============================================================================== --- head/lib/libkvm/kvm_arm.c Wed Feb 12 02:03:37 2014 (r261787) +++ head/lib/libkvm/kvm_arm.c Wed Feb 12 02:08:42 2014 (r261788) @@ -42,11 +42,15 @@ __FBSDID("$FreeBSD$"); #include #include +#ifndef CROSS_LIBKVM #include #include #include - #include +#else +#include "../../sys/arm/include/pte.h" +#include "../../sys/arm/include/vmparam.h" +#endif #include #include Modified: head/lib/libkvm/kvm_minidump_arm.c ============================================================================== --- head/lib/libkvm/kvm_minidump_arm.c Wed Feb 12 02:03:37 2014 (r261787) +++ head/lib/libkvm/kvm_minidump_arm.c Wed Feb 12 02:08:42 2014 (r261788) @@ -34,7 +34,9 @@ __FBSDID("$FreeBSD$"); */ #include +#ifndef CROSS_LIBKVM #include +#endif #include #include #include @@ -45,12 +47,18 @@ __FBSDID("$FreeBSD$"); #include #include +#ifndef CROSS_LIBKVM #include #include #include #include #include +#else +#include "../../sys/arm/include/pte.h" +#include "../../sys/arm/include/vmparam.h" +#include "../../sys/arm/include/minidump.h" +#endif #include From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 03:19:36 2014 Return-Path: Delivered-To: svn-src-all@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 6E67EEF6; Wed, 12 Feb 2014 03:19: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 59B141C16; Wed, 12 Feb 2014 03:19:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1C3JaDr059577; Wed, 12 Feb 2014 03:19:36 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1C3Jalx059576; Wed, 12 Feb 2014 03:19:36 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201402120319.s1C3Jalx059576@svn.freebsd.org> From: Warner Losh Date: Wed, 12 Feb 2014 03:19:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261789 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 03:19:36 -0000 Author: imp Date: Wed Feb 12 03:19:35 2014 New Revision: 261789 URL: http://svnweb.freebsd.org/changeset/base/261789 Log: Convert two while(1); statements into proper panics. Soon, kernels with early printf support will print this info... For kernels without, the observed behavior will be the same as it is now... Modified: head/sys/arm/arm/machdep.c Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Wed Feb 12 02:08:42 2014 (r261788) +++ head/sys/arm/arm/machdep.c Wed Feb 12 03:19:35 2014 (r261789) @@ -1056,10 +1056,10 @@ initarm(struct arm_boot_params *abp) #endif if (OF_install(OFW_FDT, 0) == FALSE) - while (1); + panic("Cannot install FDT"); if (OF_init((void *)dtbp) != 0) - while (1); + panic("OF_init failed with the found device tree"); /* Grab physical memory regions information from device tree. */ if (fdt_get_mem_regions(mem_regions, &mem_regions_sz, &memsize) != 0) From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 04:30:40 2014 Return-Path: Delivered-To: svn-src-all@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 8B798715; Wed, 12 Feb 2014 04:30:40 +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 75558126E; Wed, 12 Feb 2014 04:30:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1C4Uegd088081; Wed, 12 Feb 2014 04:30:40 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1C4Uctm088069; Wed, 12 Feb 2014 04:30:38 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201402120430.s1C4Uctm088069@svn.freebsd.org> From: John Baldwin Date: Wed, 12 Feb 2014 04:30:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261790 - in head/sys: amd64/include dev/acpica dev/cardbus dev/pccbb dev/pci i386/include sparc64/pci x86/include x86/pci x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 04:30:40 -0000 Author: jhb Date: Wed Feb 12 04:30:37 2014 New Revision: 261790 URL: http://svnweb.freebsd.org/changeset/base/261790 Log: Add support for managing PCI bus numbers. As with BARs and PCI-PCI bridge I/O windows, the default is to preserve the firmware-assigned resources. PCI bus numbers are only managed if NEW_PCIB is enabled and the architecture defines a PCI_RES_BUS resource type. - Add a helper API to create top-level PCI bus resource managers for each PCI domain/segment. Host-PCI bridge drivers use this API to allocate bus numbers from their associated domain. - Change the PCI bus and CardBus drivers to allocate a bus resource for their bus number from the parent PCI bridge device. - Change the PCI-PCI and PCI-CardBus bridge drivers to allocate the full range of bus numbers from secbus to subbus from their parent bridge. The drivers also always program their primary bus register. The bridge drivers also support growing their bus range by extending the bus resource and updating subbus to match the larger range. - Add support for managing PCI bus resources to the Host-PCI bridge drivers used for amd64 and i386 (acpi_pcib, mptable_pcib, legacy_pcib, and qpi_pcib). - Define a PCI_RES_BUS resource type for amd64 and i386. Reviewed by: imp MFC after: 1 month Modified: head/sys/amd64/include/resource.h head/sys/dev/acpica/acpi_pcib_acpi.c head/sys/dev/acpica/acpi_pcib_pci.c head/sys/dev/cardbus/cardbus.c head/sys/dev/cardbus/cardbusvar.h head/sys/dev/pccbb/pccbb.c head/sys/dev/pccbb/pccbb_isa.c head/sys/dev/pccbb/pccbb_pci.c head/sys/dev/pccbb/pccbbvar.h head/sys/dev/pci/pci.c head/sys/dev/pci/pci_pci.c head/sys/dev/pci/pci_private.h head/sys/dev/pci/pci_subr.c head/sys/dev/pci/pcib_private.h head/sys/i386/include/resource.h head/sys/sparc64/pci/apb.c head/sys/x86/include/legacyvar.h head/sys/x86/pci/pci_bus.c head/sys/x86/pci/qpi.c head/sys/x86/x86/mptable_pci.c Modified: head/sys/amd64/include/resource.h ============================================================================== --- head/sys/amd64/include/resource.h Wed Feb 12 03:19:35 2014 (r261789) +++ head/sys/amd64/include/resource.h Wed Feb 12 04:30:37 2014 (r261790) @@ -40,5 +40,8 @@ #define SYS_RES_DRQ 2 /* isa dma lines */ #define SYS_RES_MEMORY 3 /* i/o memory */ #define SYS_RES_IOPORT 4 /* i/o ports */ +#ifdef NEW_PCIB +#define PCI_RES_BUS 5 /* PCI bus numbers */ +#endif #endif /* !_MACHINE_RESOURCE_H_ */ Modified: head/sys/dev/acpica/acpi_pcib_acpi.c ============================================================================== --- head/sys/dev/acpica/acpi_pcib_acpi.c Wed Feb 12 03:19:35 2014 (r261789) +++ head/sys/dev/acpica/acpi_pcib_acpi.c Wed Feb 12 04:30:37 2014 (r261790) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include "pcib_if.h" @@ -96,6 +97,11 @@ static struct resource *acpi_pcib_acpi_a static int acpi_pcib_acpi_adjust_resource(device_t dev, device_t child, int type, struct resource *r, u_long start, u_long end); +#ifdef PCI_RES_BUS +static int acpi_pcib_acpi_release_resource(device_t dev, + device_t child, int type, int rid, + struct resource *r); +#endif #endif static device_method_t acpi_pcib_acpi_methods[] = { @@ -115,7 +121,11 @@ static device_method_t acpi_pcib_acpi_me #else DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), #endif +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + DEVMETHOD(bus_release_resource, acpi_pcib_acpi_release_resource), +#else DEVMETHOD(bus_release_resource, bus_generic_release_resource), +#endif DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), @@ -271,6 +281,20 @@ acpi_pcib_producer_handler(ACPI_RESOURCE } #endif +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +static int +first_decoded_bus(struct acpi_hpcib_softc *sc, u_long *startp) +{ + struct resource_list_entry *rle; + + rle = resource_list_find(&sc->ap_host_res.hr_rl, PCI_RES_BUS, 0); + if (rle == NULL) + return (ENXIO); + *startp = rle->start; + return (0); +} +#endif + static int acpi_pcib_acpi_attach(device_t dev) { @@ -278,6 +302,11 @@ acpi_pcib_acpi_attach(device_t dev) ACPI_STATUS status; static int bus0_seen = 0; u_int slot, func, busok; +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + struct resource *bus_res; + u_long start; + int rid; +#endif uint8_t busno; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); @@ -389,6 +418,39 @@ acpi_pcib_acpi_attach(device_t dev) } } +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + /* + * If nothing else worked, hope that ACPI at least lays out the + * Host-PCI bridges in order and that as a result the next free + * bus number is our bus number. + */ + if (busok == 0) { + /* + * If we have a region of bus numbers, use the first + * number for our bus. + */ + if (first_decoded_bus(sc, &start) == 0) + sc->ap_bus = start; + else { + rid = 0; + bus_res = pci_domain_alloc_bus(sc->ap_segment, dev, &rid, 0, + PCI_BUSMAX, 1, 0); + if (bus_res == NULL) { + device_printf(dev, + "could not allocate bus number\n"); + pcib_host_res_free(dev, &sc->ap_host_res); + return (ENXIO); + } + sc->ap_bus = rman_get_start(bus_res); + pci_domain_release_bus(sc->ap_segment, dev, rid, bus_res); + } + } else { +#ifdef INVARIANTS + if (first_decoded_bus(sc, &start) == 0) + KASSERT(start == sc->ap_bus, ("bus number mismatch")); +#endif + } +#else /* * If nothing else worked, hope that ACPI at least lays out the * host-PCI bridges in order and that as a result our unit number @@ -399,6 +461,7 @@ acpi_pcib_acpi_attach(device_t dev) sc->ap_bus = device_get_unit(dev); device_printf(dev, "trying bus number %d\n", sc->ap_bus); } +#endif /* If this is bus 0 on segment 0, note that it has been seen already. */ if (sc->ap_segment == 0 && sc->ap_bus == 0) @@ -534,6 +597,11 @@ acpi_pcib_acpi_alloc_resource(device_t d #ifdef NEW_PCIB sc = device_get_softc(dev); +#ifdef PCI_RES_BUS + if (type == PCI_RES_BUS) + return (pci_domain_alloc_bus(sc->ap_segment, child, rid, start, end, + count, flags)); +#endif res = pcib_host_res_alloc(&sc->ap_host_res, child, type, rid, start, end, count, flags); @@ -562,7 +630,26 @@ acpi_pcib_acpi_adjust_resource(device_t struct acpi_hpcib_softc *sc; sc = device_get_softc(dev); +#ifdef PCI_RES_BUS + if (type == PCI_RES_BUS) + return (pci_domain_adjust_bus(sc->ap_segment, child, r, start, + end)); +#endif return (pcib_host_res_adjust(&sc->ap_host_res, child, type, r, start, end)); } + +#ifdef PCI_RES_BUS +int +acpi_pcib_acpi_release_resource(device_t dev, device_t child, int type, int rid, + struct resource *r) +{ + struct acpi_hpcib_softc *sc; + + sc = device_get_softc(dev); + if (type == PCI_RES_BUS) + return (pci_domain_release_bus(sc->ap_segment, child, rid, r)); + return (bus_generic_release_resource(dev, child, type, rid, r)); +} +#endif #endif Modified: head/sys/dev/acpica/acpi_pcib_pci.c ============================================================================== --- head/sys/dev/acpica/acpi_pcib_pci.c Wed Feb 12 03:19:35 2014 (r261789) +++ head/sys/dev/acpica/acpi_pcib_pci.c Wed Feb 12 04:30:37 2014 (r261790) @@ -120,7 +120,7 @@ acpi_pcib_pci_attach(device_t dev) pcib_attach_common(dev); sc = device_get_softc(dev); sc->ap_handle = acpi_get_handle(dev); - return (acpi_pcib_attach(dev, &sc->ap_prt, sc->ap_pcibsc.secbus)); + return (acpi_pcib_attach(dev, &sc->ap_prt, sc->ap_pcibsc.bus.sec)); } static int Modified: head/sys/dev/cardbus/cardbus.c ============================================================================== --- head/sys/dev/cardbus/cardbus.c Wed Feb 12 03:19:35 2014 (r261789) +++ head/sys/dev/cardbus/cardbus.c Wed Feb 12 04:30:37 2014 (r261790) @@ -96,17 +96,36 @@ static int cardbus_attach(device_t cbdev) { struct cardbus_softc *sc; +#ifdef PCI_RES_BUS + int rid; +#endif sc = device_get_softc(cbdev); sc->sc_dev = cbdev; +#ifdef PCI_RES_BUS + rid = 0; + sc->sc_bus = bus_alloc_resource(cbdev, PCI_RES_BUS, &rid, + pcib_get_bus(cbdev), pcib_get_bus(cbdev), 1, 0); + if (sc->sc_bus == NULL) { + device_printf(cbdev, "failed to allocate bus number\n"); + return (ENXIO); + } +#endif return (0); } static int cardbus_detach(device_t cbdev) { +#ifdef PCI_RES_BUS + struct cardbus_softc *sc; +#endif cardbus_detach_card(cbdev); +#ifdef PCI_RES_BUS + sc = device_get_softc(cbdev); + (void)bus_release_resource(cbdev, PCI_RES_BUS, 0, sc->sc_bus); +#endif return (0); } Modified: head/sys/dev/cardbus/cardbusvar.h ============================================================================== --- head/sys/dev/cardbus/cardbusvar.h Wed Feb 12 03:19:35 2014 (r261789) +++ head/sys/dev/cardbus/cardbusvar.h Wed Feb 12 04:30:37 2014 (r261790) @@ -69,6 +69,9 @@ struct cardbus_devinfo struct cardbus_softc { device_t sc_dev; +#ifdef PCI_RES_BUS + struct resource *sc_bus; +#endif }; /* Modified: head/sys/dev/pccbb/pccbb.c ============================================================================== --- head/sys/dev/pccbb/pccbb.c Wed Feb 12 03:19:35 2014 (r261789) +++ head/sys/dev/pccbb/pccbb.c Wed Feb 12 04:30:37 2014 (r261790) @@ -97,6 +97,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -1548,7 +1549,7 @@ cbb_read_ivar(device_t brdev, device_t c *result = sc->domain; return (0); case PCIB_IVAR_BUS: - *result = sc->secbus; + *result = sc->bus.sec; return (0); } return (ENOENT); @@ -1557,14 +1558,12 @@ cbb_read_ivar(device_t brdev, device_t c int cbb_write_ivar(device_t brdev, device_t child, int which, uintptr_t value) { - struct cbb_softc *sc = device_get_softc(brdev); switch (which) { case PCIB_IVAR_DOMAIN: return (EINVAL); case PCIB_IVAR_BUS: - sc->secbus = value; - return (0); + return (EINVAL); } return (ENOENT); } Modified: head/sys/dev/pccbb/pccbb_isa.c ============================================================================== --- head/sys/dev/pccbb/pccbb_isa.c Wed Feb 12 03:19:35 2014 (r261789) +++ head/sys/dev/pccbb/pccbb_isa.c Wed Feb 12 04:30:37 2014 (r261790) @@ -51,6 +51,9 @@ __FBSDID("$FreeBSD$"); #include +#include +#include + #include #include Modified: head/sys/dev/pccbb/pccbb_pci.c ============================================================================== --- head/sys/dev/pccbb/pccbb_pci.c Wed Feb 12 03:19:35 2014 (r261789) +++ head/sys/dev/pccbb/pccbb_pci.c Wed Feb 12 04:30:37 2014 (r261790) @@ -93,6 +93,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -303,13 +304,15 @@ cbb_print_config(device_t dev) static int cbb_pci_attach(device_t brdev) { +#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS)) static int curr_bus_number = 2; /* XXX EVILE BAD (see below) */ + uint32_t pribus; +#endif struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(brdev); struct sysctl_ctx_list *sctx; struct sysctl_oid *soid; int rid; device_t parent; - uint32_t pribus; parent = device_get_parent(brdev); mtx_init(&sc->mtx, device_get_nameunit(brdev), "cbb", MTX_DEF); @@ -318,9 +321,13 @@ cbb_pci_attach(device_t brdev) sc->cbdev = NULL; sc->exca[0].pccarddev = NULL; sc->domain = pci_get_domain(brdev); - sc->secbus = pci_read_config(brdev, PCIR_SECBUS_2, 1); - sc->subbus = pci_read_config(brdev, PCIR_SUBBUS_2, 1); + sc->bus.sec = pci_read_config(brdev, PCIR_SECBUS_2, 1); + sc->bus.sub = pci_read_config(brdev, PCIR_SUBBUS_2, 1); sc->pribus = pcib_get_bus(parent); +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + pci_write_config(brdev, PCIR_PRIBUS_2, sc->pribus, 1); + pcib_setup_secbus(brdev, &sc->bus, 1); +#endif SLIST_INIT(&sc->rl); cbb_powerstate_d0(brdev); @@ -352,9 +359,9 @@ cbb_pci_attach(device_t brdev) SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "pribus", CTLFLAG_RD, &sc->pribus, 0, "Primary bus number"); SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "secbus", - CTLFLAG_RD, &sc->secbus, 0, "Secondary bus number"); + CTLFLAG_RD, &sc->bus.sec, 0, "Secondary bus number"); SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "subbus", - CTLFLAG_RD, &sc->subbus, 0, "Subordinate bus number"); + CTLFLAG_RD, &sc->bus.sub, 0, "Subordinate bus number"); #if 0 SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "memory", CTLFLAG_RD, &sc->subbus, 0, "Memory window open"); @@ -366,15 +373,16 @@ cbb_pci_attach(device_t brdev) CTLFLAG_RD, &sc->subbus, 0, "io range 2 open"); #endif +#if !(defined(NEW_PCIB) && defined(PCI_RES_BUS)) /* * This is a gross hack. We should be scanning the entire pci * tree, assigning bus numbers in a way such that we (1) can * reserve 1 extra bus just in case and (2) all sub busses * are in an appropriate range. */ - DEVPRINTF((brdev, "Secondary bus is %d\n", sc->secbus)); + DEVPRINTF((brdev, "Secondary bus is %d\n", sc->bus.sec)); pribus = pci_read_config(brdev, PCIR_PRIBUS_2, 1); - if (sc->secbus == 0 || sc->pribus != pribus) { + if (sc->bus.sec == 0 || sc->pribus != pribus) { if (curr_bus_number <= sc->pribus) curr_bus_number = sc->pribus + 1; if (pribus != sc->pribus) { @@ -382,13 +390,14 @@ cbb_pci_attach(device_t brdev) sc->pribus)); pci_write_config(brdev, PCIR_PRIBUS_2, sc->pribus, 1); } - sc->secbus = curr_bus_number++; - sc->subbus = curr_bus_number++; + sc->bus.sec = curr_bus_number++; + sc->bus.sub = curr_bus_number++; DEVPRINTF((brdev, "Secondary bus set to %d subbus %d\n", - sc->secbus, sc->subbus)); - pci_write_config(brdev, PCIR_SECBUS_2, sc->secbus, 1); - pci_write_config(brdev, PCIR_SUBBUS_2, sc->subbus, 1); + sc->bus.sec, sc->bus.sub)); + pci_write_config(brdev, PCIR_SECBUS_2, sc->bus.sec, 1); + pci_write_config(brdev, PCIR_SUBBUS_2, sc->bus.sub, 1); } +#endif /* attach children */ sc->cbdev = device_add_child(brdev, "cardbus", -1); @@ -467,8 +476,8 @@ cbb_chipinit(struct cbb_softc *sc) /* Restore bus configuration */ pci_write_config(sc->dev, PCIR_PRIBUS_2, sc->pribus, 1); - pci_write_config(sc->dev, PCIR_SECBUS_2, sc->secbus, 1); - pci_write_config(sc->dev, PCIR_SUBBUS_2, sc->subbus, 1); + pci_write_config(sc->dev, PCIR_SECBUS_2, sc->bus.sec, 1); + pci_write_config(sc->dev, PCIR_SUBBUS_2, sc->bus.sub, 1); /* Enable memory access */ pci_enable_busmaster(sc->dev); @@ -783,6 +792,58 @@ cbb_pci_filt(void *arg) return retval; } +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +static struct resource * +cbb_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, + u_long start, u_long end, u_long count, u_int flags) +{ + struct cbb_softc *sc; + + sc = device_get_softc(bus); + if (type == PCI_RES_BUS) + return (pcib_alloc_subbus(&sc->bus, child, rid, start, end, + count, flags)); + return (cbb_alloc_resource(bus, child, type, rid, start, end, count, + flags)); +} + +static int +cbb_pci_adjust_resource(device_t bus, device_t child, int type, + struct resource *r, u_long start, u_long end) +{ + struct cbb_softc *sc; + + sc = device_get_softc(bus); + if (type == PCI_RES_BUS) { + if (!rman_is_region_manager(r, &sc->bus.rman)) + return (EINVAL); + return (rman_adjust_resource(r, start, end)); + } + return (bus_generic_adjust_resource(bus, child, type, r, start, end)); +} + +static int +cbb_pci_release_resource(device_t bus, device_t child, int type, int rid, + struct resource *r) +{ + struct cbb_softc *sc; + int error; + + sc = device_get_softc(bus); + if (type == PCI_RES_BUS) { + if (!rman_is_region_manager(r, &sc->bus.rman)) + return (EINVAL); + if (rman_get_flags(r) & RF_ACTIVE) { + error = bus_deactivate_resource(child, type, rid, r); + if (error) + return (error); + } + return (rman_release_resource(r)); + } + return (cbb_release_resource(bus, child, type, rid, r)); +} +#endif + /************************************************************************/ /* PCI compat methods */ /************************************************************************/ @@ -826,8 +887,14 @@ static device_method_t cbb_methods[] = { /* bus methods */ DEVMETHOD(bus_read_ivar, cbb_read_ivar), DEVMETHOD(bus_write_ivar, cbb_write_ivar), +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + DEVMETHOD(bus_alloc_resource, cbb_pci_alloc_resource), + DEVMETHOD(bus_adjust_resource, cbb_pci_adjust_resource), + DEVMETHOD(bus_release_resource, cbb_pci_release_resource), +#else DEVMETHOD(bus_alloc_resource, cbb_alloc_resource), DEVMETHOD(bus_release_resource, cbb_release_resource), +#endif DEVMETHOD(bus_activate_resource, cbb_activate_resource), DEVMETHOD(bus_deactivate_resource, cbb_deactivate_resource), DEVMETHOD(bus_driver_added, cbb_driver_added), Modified: head/sys/dev/pccbb/pccbbvar.h ============================================================================== --- head/sys/dev/pccbb/pccbbvar.h Wed Feb 12 03:19:35 2014 (r261789) +++ head/sys/dev/pccbb/pccbbvar.h Wed Feb 12 04:30:37 2014 (r261790) @@ -64,8 +64,7 @@ struct cbb_softc { bus_space_handle_t bsh; uint32_t domain; unsigned int pribus; - unsigned int secbus; - unsigned int subbus; + struct pcib_secbus bus; struct mtx mtx; int cardok; u_int32_t flags; Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Wed Feb 12 03:19:35 2014 (r261789) +++ head/sys/dev/pci/pci.c Wed Feb 12 04:30:37 2014 (r261790) @@ -92,6 +92,9 @@ static int pci_add_map(device_t bus, de struct resource_list *rl, int force, int prefetch); static int pci_probe(device_t dev); static int pci_attach(device_t dev); +#ifdef PCI_RES_BUS +static int pci_detach(device_t dev); +#endif static void pci_load_vendor_data(void); static int pci_describe_parse_line(char **ptr, int *vendor, int *device, char **desc); @@ -125,7 +128,11 @@ static device_method_t pci_methods[] = { /* Device interface */ DEVMETHOD(device_probe, pci_probe), DEVMETHOD(device_attach, pci_attach), +#ifdef PCI_RES_BUS + DEVMETHOD(device_detach, pci_detach), +#else DEVMETHOD(device_detach, bus_generic_detach), +#endif DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD(device_suspend, pci_suspend), DEVMETHOD(device_resume, pci_resume), @@ -337,6 +344,13 @@ TUNABLE_INT("hw.pci.clear_bars", &pci_cl SYSCTL_INT(_hw_pci, OID_AUTO, clear_bars, CTLFLAG_RDTUN, &pci_clear_bars, 0, "Ignore firmware-assigned resources for BARs."); +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +static int pci_clear_buses; +TUNABLE_INT("hw.pci.clear_buses", &pci_clear_buses); +SYSCTL_INT(_hw_pci, OID_AUTO, clear_buses, CTLFLAG_RDTUN, &pci_clear_buses, 0, + "Ignore firmware-assigned bus numbers."); +#endif + static int pci_has_quirk(uint32_t devid, int quirk) { @@ -3197,6 +3211,164 @@ xhci_early_takeover(device_t self) bus_release_resource(self, SYS_RES_MEMORY, rid, res); } +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) +static void +pci_reserve_secbus(device_t bus, device_t dev, pcicfgregs *cfg, + struct resource_list *rl) +{ + struct resource *res; + char *cp; + u_long start, end, count; + int rid, sec_bus, sec_reg, sub_bus, sub_reg, sup_bus; + + switch (cfg->hdrtype & PCIM_HDRTYPE) { + case PCIM_HDRTYPE_BRIDGE: + sec_reg = PCIR_SECBUS_1; + sub_reg = PCIR_SUBBUS_1; + break; + case PCIM_HDRTYPE_CARDBUS: + sec_reg = PCIR_SECBUS_2; + sub_reg = PCIR_SUBBUS_2; + break; + default: + return; + } + + /* + * If the existing bus range is valid, attempt to reserve it + * from our parent. If this fails for any reason, clear the + * secbus and subbus registers. + * + * XXX: Should we reset sub_bus to sec_bus if it is < sec_bus? + * This would at least preserve the existing sec_bus if it is + * valid. + */ + sec_bus = PCI_READ_CONFIG(bus, dev, sec_reg, 1); + sub_bus = PCI_READ_CONFIG(bus, dev, sub_reg, 1); + + /* Quirk handling. */ + switch (pci_get_devid(dev)) { + case 0x12258086: /* Intel 82454KX/GX (Orion) */ + sup_bus = pci_read_config(dev, 0x41, 1); + if (sup_bus != 0xff) { + sec_bus = sup_bus + 1; + sub_bus = sup_bus + 1; + PCI_WRITE_CONFIG(bus, dev, sec_reg, sec_bus, 1); + PCI_WRITE_CONFIG(bus, dev, sub_reg, sub_bus, 1); + } + break; + + case 0x00dd10de: + /* Compaq R3000 BIOS sets wrong subordinate bus number. */ + if ((cp = getenv("smbios.planar.maker")) == NULL) + break; + if (strncmp(cp, "Compal", 6) != 0) { + freeenv(cp); + break; + } + freeenv(cp); + if ((cp = getenv("smbios.planar.product")) == NULL) + break; + if (strncmp(cp, "08A0", 4) != 0) { + freeenv(cp); + break; + } + freeenv(cp); + if (sub_bus < 0xa) { + sub_bus = 0xa; + PCI_WRITE_CONFIG(bus, dev, sub_reg, sub_bus, 1); + } + break; + } + + if (bootverbose) + printf("\tsecbus=%d, subbus=%d\n", sec_bus, sub_bus); + if (sec_bus > 0 && sub_bus >= sec_bus) { + start = sec_bus; + end = sub_bus; + count = end - start + 1; + + resource_list_add(rl, PCI_RES_BUS, 0, 0ul, ~0ul, count); + + /* + * If requested, clear secondary bus registers in + * bridge devices to force a complete renumbering + * rather than reserving the existing range. However, + * preserve the existing size. + */ + if (pci_clear_buses) + goto clear; + + rid = 0; + res = resource_list_reserve(rl, bus, dev, PCI_RES_BUS, &rid, + start, end, count, 0); + if (res != NULL) + return; + + if (bootverbose) + device_printf(bus, + "pci%d:%d:%d:%d secbus failed to allocate\n", + pci_get_domain(dev), pci_get_bus(dev), + pci_get_slot(dev), pci_get_function(dev)); + } + +clear: + PCI_WRITE_CONFIG(bus, dev, sec_reg, 0, 1); + PCI_WRITE_CONFIG(bus, dev, sub_reg, 0, 1); +} + +static struct resource * +pci_alloc_secbus(device_t dev, device_t child, int *rid, u_long start, + u_long end, u_long count, u_int flags) +{ + struct pci_devinfo *dinfo; + pcicfgregs *cfg; + struct resource_list *rl; + struct resource *res; + int sec_reg, sub_reg; + + dinfo = device_get_ivars(child); + cfg = &dinfo->cfg; + rl = &dinfo->resources; + switch (cfg->hdrtype & PCIM_HDRTYPE) { + case PCIM_HDRTYPE_BRIDGE: + sec_reg = PCIR_SECBUS_1; + sub_reg = PCIR_SUBBUS_1; + break; + case PCIM_HDRTYPE_CARDBUS: + sec_reg = PCIR_SECBUS_2; + sub_reg = PCIR_SUBBUS_2; + break; + default: + return (NULL); + } + + if (*rid != 0) + return (NULL); + + if (resource_list_find(rl, PCI_RES_BUS, *rid) == NULL) + resource_list_add(rl, PCI_RES_BUS, *rid, start, end, count); + if (!resource_list_reserved(rl, PCI_RES_BUS, *rid)) { + res = resource_list_reserve(rl, dev, child, PCI_RES_BUS, rid, + start, end, count, flags & ~RF_ACTIVE); + if (res == NULL) { + resource_list_delete(rl, PCI_RES_BUS, *rid); + device_printf(child, "allocating %lu bus%s failed\n", + count, count == 1 ? "" : "es"); + return (NULL); + } + if (bootverbose) + device_printf(child, + "Lazy allocation of %lu bus%s at %lu\n", count, + count == 1 ? "" : "es", rman_get_start(res)); + PCI_WRITE_CONFIG(dev, child, sec_reg, rman_get_start(res), 1); + PCI_WRITE_CONFIG(dev, child, sub_reg, rman_get_end(res), 1); + } + return (resource_list_alloc(rl, dev, child, PCI_RES_BUS, rid, start, + end, count, flags)); +} +#endif + void pci_add_resources(device_t bus, device_t dev, int force, uint32_t prefetchmask) { @@ -3269,6 +3441,14 @@ pci_add_resources(device_t bus, device_t else if (pci_get_progif(dev) == PCIP_SERIALBUS_USB_UHCI) uhci_early_takeover(dev); } + +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + /* + * Reserve resources for secondary bus ranges behind bridge + * devices. + */ + pci_reserve_secbus(bus, dev, cfg, rl); +#endif } void @@ -3334,10 +3514,22 @@ pci_attach_common(device_t dev) #ifdef PCI_DMA_BOUNDARY int error, tag_valid; #endif +#ifdef PCI_RES_BUS + int rid; +#endif sc = device_get_softc(dev); domain = pcib_get_domain(dev); busno = pcib_get_bus(dev); +#ifdef PCI_RES_BUS + rid = 0; + sc->sc_bus = bus_alloc_resource(dev, PCI_RES_BUS, &rid, busno, busno, + 1, 0); + if (sc->sc_bus == NULL) { + device_printf(dev, "failed to allocate bus number\n"); + return (ENXIO); + } +#endif if (bootverbose) device_printf(dev, "domain=%d, physical bus=%d\n", domain, busno); @@ -3382,6 +3574,21 @@ pci_attach(device_t dev) return (bus_generic_attach(dev)); } +#ifdef PCI_RES_BUS +static int +pci_detach(device_t dev) +{ + struct pci_softc *sc; + int error; + + error = bus_generic_detach(dev); + if (error) + return (error); + sc = device_get_softc(dev); + return (bus_release_resource(dev, PCI_RES_BUS, 0, sc->sc_bus)); +} +#endif + static void pci_set_power_children(device_t dev, device_t *devlist, int numdevs, int state) @@ -3879,6 +4086,10 @@ pci_child_detached(device_t dev, device_ pci_printf(&dinfo->cfg, "Device leaked memory resources\n"); if (resource_list_release_active(rl, dev, child, SYS_RES_IOPORT) != 0) pci_printf(&dinfo->cfg, "Device leaked I/O resources\n"); +#ifdef PCI_RES_BUS + if (resource_list_release_active(rl, dev, child, PCI_RES_BUS) != 0) + pci_printf(&dinfo->cfg, "Device leaked PCI bus numbers\n"); +#endif pci_cfg_save(child, dinfo, 1); } @@ -4295,6 +4506,11 @@ pci_alloc_resource(device_t dev, device_ rl = &dinfo->resources; cfg = &dinfo->cfg; switch (type) { +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + case PCI_RES_BUS: + return (pci_alloc_secbus(dev, child, rid, start, end, count, + flags)); +#endif case SYS_RES_IRQ: /* * Can't alloc legacy interrupt once MSI messages have Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Wed Feb 12 03:19:35 2014 (r261789) +++ head/sys/dev/pci/pci_pci.c Wed Feb 12 04:30:37 2014 (r261790) @@ -119,6 +119,10 @@ pcib_is_resource_managed(struct pcib_sof { switch (type) { +#ifdef PCI_RES_BUS + case PCI_RES_BUS: + return (rman_is_region_manager(r, &sc->bus.rman)); +#endif case SYS_RES_IOPORT: return (rman_is_region_manager(r, &sc->io.rman)); case SYS_RES_MEMORY: @@ -523,6 +527,173 @@ pcib_probe_windows(struct pcib_softc *sc } } +#ifdef PCI_RES_BUS +/* + * Allocate a suitable secondary bus for this bridge if needed and + * initialize the resource manager for the secondary bus range. Note + * that the minimum count is a desired value and this may allocate a + * smaller range. + */ +void +pcib_setup_secbus(device_t dev, struct pcib_secbus *bus, int min_count) +{ + char buf[64]; + int error, rid; + + switch (pci_read_config(dev, PCIR_HDRTYPE, 1) & PCIM_HDRTYPE) { + case PCIM_HDRTYPE_BRIDGE: + bus->sub_reg = PCIR_SUBBUS_1; + break; + case PCIM_HDRTYPE_CARDBUS: + bus->sub_reg = PCIR_SUBBUS_2; + break; + default: + panic("not a PCI bridge"); + } + bus->dev = dev; + bus->rman.rm_start = 0; + bus->rman.rm_end = PCI_BUSMAX; + bus->rman.rm_type = RMAN_ARRAY; + snprintf(buf, sizeof(buf), "%s bus numbers", device_get_nameunit(dev)); + bus->rman.rm_descr = strdup(buf, M_DEVBUF); + error = rman_init(&bus->rman); + if (error) + panic("Failed to initialize %s bus number rman", + device_get_nameunit(dev)); + + /* + * Allocate a bus range. This will return an existing bus range + * if one exists, or a new bus range if one does not. + */ + rid = 0; + bus->res = bus_alloc_resource(dev, PCI_RES_BUS, &rid, 0ul, ~0ul, + min_count, 0); + if (bus->res == NULL) { + /* + * Fall back to just allocating a range of a single bus + * number. + */ + bus->res = bus_alloc_resource(dev, PCI_RES_BUS, &rid, 0ul, ~0ul, + 1, 0); + } else if (rman_get_size(bus->res) < min_count) + /* + * Attempt to grow the existing range to satisfy the + * minimum desired count. + */ + (void)bus_adjust_resource(dev, PCI_RES_BUS, bus->res, + rman_get_start(bus->res), rman_get_start(bus->res) + + min_count - 1); + + /* + * Add the initial resource to the rman. + */ + if (bus->res != NULL) { + error = rman_manage_region(&bus->rman, rman_get_start(bus->res), + rman_get_end(bus->res)); + if (error) + panic("Failed to add resource to rman"); + bus->sec = rman_get_start(bus->res); + bus->sub = rman_get_end(bus->res); + } +} + +static struct resource * +pcib_suballoc_bus(struct pcib_secbus *bus, device_t child, int *rid, + u_long start, u_long end, u_long count, u_int flags) +{ + struct resource *res; + + res = rman_reserve_resource(&bus->rman, start, end, count, flags, + child); + if (res == NULL) + return (NULL); + + if (bootverbose) + device_printf(bus->dev, + "allocated bus range (%lu-%lu) for rid %d of %s\n", + rman_get_start(res), rman_get_end(res), *rid, + pcib_child_name(child)); + rman_set_rid(res, *rid); + return (res); +} + +/* + * Attempt to grow the secondary bus range. This is much simpler than + * for I/O windows as the range can only be grown by increasing + * subbus. + */ +static int +pcib_grow_subbus(struct pcib_secbus *bus, u_long new_end) +{ + u_long old_end; + int error; + + old_end = rman_get_end(bus->res); + KASSERT(new_end > old_end, ("attempt to shrink subbus")); + error = bus_adjust_resource(bus->dev, PCI_RES_BUS, bus->res, + rman_get_start(bus->res), new_end); + if (error) + return (error); + if (bootverbose) + device_printf(bus->dev, "grew bus range to %lu-%lu\n", + rman_get_start(bus->res), rman_get_end(bus->res)); + error = rman_manage_region(&bus->rman, old_end + 1, + rman_get_end(bus->res)); + if (error) + panic("Failed to add resource to rman"); + bus->sub = rman_get_end(bus->res); + pci_write_config(bus->dev, bus->sub_reg, bus->sub, 1); + return (0); +} + +struct resource * +pcib_alloc_subbus(struct pcib_secbus *bus, device_t child, int *rid, + u_long start, u_long end, u_long count, u_int flags) +{ + struct resource *res; + u_long start_free, end_free, new_end; + + /* + * First, see if the request can be satisified by the existing + * bus range. + */ + res = pcib_suballoc_bus(bus, child, rid, start, end, count, flags); + if (res != NULL) + return (res); + + /* + * Figure out a range to grow the bus range. First, find the + * first bus number after the last allocated bus in the rman and + * enforce that as a minimum starting point for the range. + */ + if (rman_last_free_region(&bus->rman, &start_free, &end_free) != 0 || + end_free != bus->sub) + start_free = bus->sub + 1; + if (start_free < start) + start_free = start; + new_end = start_free + count - 1; + + /* + * See if this new range would satisfy the request if it + * succeeds. + */ + if (new_end > end) + return (NULL); + + /* Finally, attempt to grow the existing resource. */ + if (bootverbose) { + device_printf(bus->dev, + "attempting to grow bus range for %lu buses\n", count); + printf("\tback candidate range: %lu-%lu\n", start_free, + new_end); + } + if (pcib_grow_subbus(bus, new_end) == 0) + return (pcib_suballoc_bus(bus, child, rid, start, end, count, + flags)); + return (NULL); +} +#endif + #else /* @@ -669,8 +840,8 @@ pcib_cfg_save(struct pcib_softc *sc) sc->command = pci_read_config(dev, PCIR_COMMAND, 2); sc->pribus = pci_read_config(dev, PCIR_PRIBUS_1, 1); - sc->secbus = pci_read_config(dev, PCIR_SECBUS_1, 1); - sc->subbus = pci_read_config(dev, PCIR_SUBBUS_1, 1); + sc->bus.sec = pci_read_config(dev, PCIR_SECBUS_1, 1); + sc->bus.sub = pci_read_config(dev, PCIR_SUBBUS_1, 1); sc->bridgectl = pci_read_config(dev, PCIR_BRIDGECTL_1, 2); sc->seclat = pci_read_config(dev, PCIR_SECLAT_1, 1); #ifndef NEW_PCIB @@ -693,8 +864,8 @@ pcib_cfg_restore(struct pcib_softc *sc) pci_write_config(dev, PCIR_COMMAND, sc->command, 2); pci_write_config(dev, PCIR_PRIBUS_1, sc->pribus, 1); - pci_write_config(dev, PCIR_SECBUS_1, sc->secbus, 1); - pci_write_config(dev, PCIR_SUBBUS_1, sc->subbus, 1); + pci_write_config(dev, PCIR_SECBUS_1, sc->bus.sec, 1); + pci_write_config(dev, PCIR_SUBBUS_1, sc->bus.sub, 1); pci_write_config(dev, PCIR_BRIDGECTL_1, sc->bridgectl, 2); pci_write_config(dev, PCIR_SECLAT_1, sc->seclat, 1); #ifdef NEW_PCIB @@ -740,6 +911,13 @@ pcib_attach_common(device_t dev) pcib_cfg_save(sc); /* + * The primary bus register should always be the bus of the + * parent. + */ + sc->pribus = pci_get_bus(dev); + pci_write_config(dev, PCIR_PRIBUS_1, sc->pribus, 1); + + /* * Setup sysctl reporting nodes */ sctx = device_get_sysctl_ctx(dev); @@ -749,25 +927,27 @@ pcib_attach_common(device_t dev) SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "pribus", CTLFLAG_RD, &sc->pribus, 0, "Primary bus number"); SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "secbus", - CTLFLAG_RD, &sc->secbus, 0, "Secondary bus number"); + CTLFLAG_RD, &sc->bus.sec, 0, "Secondary bus number"); SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "subbus", - CTLFLAG_RD, &sc->subbus, 0, "Subordinate bus number"); + CTLFLAG_RD, &sc->bus.sub, 0, "Subordinate bus number"); /* * Quirk handling. */ switch (pci_get_devid(dev)) { +#if !defined(NEW_PCIB) && !defined(PCI_RES_BUS) case 0x12258086: /* Intel 82454KX/GX (Orion) */ { uint8_t supbus; supbus = pci_read_config(dev, 0x41, 1); if (supbus != 0xff) { - sc->secbus = supbus + 1; - sc->subbus = supbus + 1; + sc->bus.sec = supbus + 1; + sc->bus.sub = supbus + 1; } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 04:56:35 2014 Return-Path: Delivered-To: svn-src-all@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 71174FBA; Wed, 12 Feb 2014 04:56:35 +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 5CFCF1488; Wed, 12 Feb 2014 04:56:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1C4uZxL097505; Wed, 12 Feb 2014 04:56:35 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1C4uZhE097504; Wed, 12 Feb 2014 04:56:35 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201402120456.s1C4uZhE097504@svn.freebsd.org> From: Warner Losh Date: Wed, 12 Feb 2014 04:56:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261791 - head/sys/dev/fdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 04:56:35 -0000 Author: imp Date: Wed Feb 12 04:56:34 2014 New Revision: 261791 URL: http://svnweb.freebsd.org/changeset/base/261791 Log: Better nomatch messages: include compat string. Also, flag devices as disabled in the successful probe message, but leave what that means to the actual driver (no semantic changes). Modified: head/sys/dev/fdt/simplebus.c Modified: head/sys/dev/fdt/simplebus.c ============================================================================== --- head/sys/dev/fdt/simplebus.c Wed Feb 12 04:30:37 2014 (r261790) +++ head/sys/dev/fdt/simplebus.c Wed Feb 12 04:56:34 2014 (r261791) @@ -401,18 +401,24 @@ simplebus_print_res(struct simplebus_dev static void simplebus_probe_nomatch(device_t bus, device_t child) { - const char *name, *type; + const char *name, *type, *compat; if (!bootverbose) return; name = ofw_bus_get_name(child); type = ofw_bus_get_type(child); + compat = ofw_bus_get_compat(child); device_printf(bus, "<%s>", name != NULL ? name : "unknown"); simplebus_print_res(device_get_ivars(child)); - printf(" type %s (no driver attached)\n", - type != NULL ? type : "unknown"); + if (!ofw_bus_status_okay(child)) + printf(" disabled"); + if (type) + printf(" type %s", type); + if (compat) + printf(" compat %s", compat); + printf(" (no driver attached)\n"); } static int @@ -422,7 +428,8 @@ simplebus_print_child(device_t bus, devi rv = bus_print_child_header(bus, child); rv += simplebus_print_res(device_get_ivars(child)); + if (!ofw_bus_status_okay(child)) + rv += printf(" disabled"); rv += bus_print_child_footer(bus, child); return (rv); } - From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 07:18:02 2014 Return-Path: Delivered-To: svn-src-all@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 7926CB9D; Wed, 12 Feb 2014 07:18: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 49C271FC7; Wed, 12 Feb 2014 07:18:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1C7I2fd054212; Wed, 12 Feb 2014 07:18:02 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1C7I11L054210; Wed, 12 Feb 2014 07:18:01 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402120718.s1C7I11L054210@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 12 Feb 2014 07:18:01 +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: r261792 - stable/10/sys/dev/sound/pci/hda X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 07:18:02 -0000 Author: hselasky Date: Wed Feb 12 07:18:01 2014 New Revision: 261792 URL: http://svnweb.freebsd.org/changeset/base/261792 Log: MFC r261507: Add more quirks for making builtin audio speakers work with more MacBookPro's. Only tested with MacBookPro 9,2. Obtained from: Linux Modified: stable/10/sys/dev/sound/pci/hda/hdaa_patches.c stable/10/sys/dev/sound/pci/hda/hdac.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/pci/hda/hdaa_patches.c ============================================================================== --- stable/10/sys/dev/sound/pci/hda/hdaa_patches.c Wed Feb 12 04:56:34 2014 (r261791) +++ stable/10/sys/dev/sound/pci/hda/hdaa_patches.c Wed Feb 12 07:18:01 2014 (r261792) @@ -107,9 +107,18 @@ static const struct { { APPLE_INTEL_MAC, HDA_CODEC_STAC9221, HDA_MATCH_ALL, 0, 0, HDAA_GPIO_SET(0) | HDAA_GPIO_SET(1) }, + { APPLE_MACBOOKAIR31, HDA_CODEC_CS4206, HDA_MATCH_ALL, + 0, 0, + HDAA_GPIO_SET(1) | HDAA_GPIO_SET(3) }, { APPLE_MACBOOKPRO55, HDA_CODEC_CS4206, HDA_MATCH_ALL, 0, 0, HDAA_GPIO_SET(1) | HDAA_GPIO_SET(3) }, + { APPLE_MACBOOKPRO71, HDA_CODEC_CS4206, HDA_MATCH_ALL, + 0, 0, + HDAA_GPIO_SET(1) | HDAA_GPIO_SET(3) }, + { HDA_INTEL_MACBOOKPRO92, HDA_CODEC_CS4206, HDA_MATCH_ALL, + 0, 0, + HDAA_GPIO_SET(1) | HDAA_GPIO_SET(3) }, { DELL_D630_SUBVENDOR, HDA_CODEC_STAC9205X, HDA_MATCH_ALL, 0, 0, HDAA_GPIO_SET(0) }, Modified: stable/10/sys/dev/sound/pci/hda/hdac.h ============================================================================== --- stable/10/sys/dev/sound/pci/hda/hdac.h Wed Feb 12 04:56:34 2014 (r261791) +++ stable/10/sys/dev/sound/pci/hda/hdac.h Wed Feb 12 07:18:01 2014 (r261792) @@ -58,6 +58,7 @@ #define HDA_INTEL_82801JD HDA_MODEL_CONSTRUCT(INTEL, 0x3a6e) #define HDA_INTEL_PCH HDA_MODEL_CONSTRUCT(INTEL, 0x3b56) #define HDA_INTEL_PCH2 HDA_MODEL_CONSTRUCT(INTEL, 0x3b57) +#define HDA_INTEL_MACBOOKPRO92 HDA_MODEL_CONSTRUCT(INTEL, 0x7270) #define HDA_INTEL_SCH HDA_MODEL_CONSTRUCT(INTEL, 0x811b) #define HDA_INTEL_LPT1 HDA_MODEL_CONSTRUCT(INTEL, 0x8c20) #define HDA_INTEL_LPT2 HDA_MODEL_CONSTRUCT(INTEL, 0x8c21) @@ -266,7 +267,9 @@ * (see HDA_CODEC_STAC9221 below). */ #define APPLE_INTEL_MAC 0x76808384 +#define APPLE_MACBOOKAIR31 0x0d9410de #define APPLE_MACBOOKPRO55 0xcb7910de +#define APPLE_MACBOOKPRO71 0xcb8910de /* LG Electronics */ #define LG_VENDORID 0x1854 From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 07:24:38 2014 Return-Path: Delivered-To: svn-src-all@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 8B18EE59; Wed, 12 Feb 2014 07:24: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 5978110A5; Wed, 12 Feb 2014 07:24:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1C7OcfE057595; Wed, 12 Feb 2014 07:24:38 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1C7OcHs057593; Wed, 12 Feb 2014 07:24:38 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402120724.s1C7OcHs057593@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 12 Feb 2014 07:24:37 +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: r261793 - stable/9/sys/dev/sound/pci/hda X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 07:24:38 -0000 Author: hselasky Date: Wed Feb 12 07:24:37 2014 New Revision: 261793 URL: http://svnweb.freebsd.org/changeset/base/261793 Log: MFC r261507: Add more quirks for making builtin audio speakers work with more MacBookPro's. Only tested with MacBookPro 9,2. Obtained from: Linux Modified: stable/9/sys/dev/sound/pci/hda/hdaa_patches.c stable/9/sys/dev/sound/pci/hda/hdac.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/pci/hda/hdaa_patches.c ============================================================================== --- stable/9/sys/dev/sound/pci/hda/hdaa_patches.c Wed Feb 12 07:18:01 2014 (r261792) +++ stable/9/sys/dev/sound/pci/hda/hdaa_patches.c Wed Feb 12 07:24:37 2014 (r261793) @@ -106,9 +106,18 @@ static const struct { { APPLE_INTEL_MAC, HDA_CODEC_STAC9221, 0, 0, HDAA_GPIO_SET(0) | HDAA_GPIO_SET(1) }, + { APPLE_MACBOOKAIR31, HDA_CODEC_CS4206, + 0, 0, + HDAA_GPIO_SET(1) | HDAA_GPIO_SET(3) }, { APPLE_MACBOOKPRO55, HDA_CODEC_CS4206, 0, 0, HDAA_GPIO_SET(1) | HDAA_GPIO_SET(3) }, + { APPLE_MACBOOKPRO71, HDA_CODEC_CS4206, + 0, 0, + HDAA_GPIO_SET(1) | HDAA_GPIO_SET(3) }, + { HDA_INTEL_MACBOOKPRO92, HDA_CODEC_CS4206, + 0, 0, + HDAA_GPIO_SET(1) | HDAA_GPIO_SET(3) }, { DELL_D630_SUBVENDOR, HDA_CODEC_STAC9205X, 0, 0, HDAA_GPIO_SET(0) }, Modified: stable/9/sys/dev/sound/pci/hda/hdac.h ============================================================================== --- stable/9/sys/dev/sound/pci/hda/hdac.h Wed Feb 12 07:18:01 2014 (r261792) +++ stable/9/sys/dev/sound/pci/hda/hdac.h Wed Feb 12 07:24:37 2014 (r261793) @@ -53,6 +53,7 @@ #define HDA_INTEL_82801JD HDA_MODEL_CONSTRUCT(INTEL, 0x3a6e) #define HDA_INTEL_PCH HDA_MODEL_CONSTRUCT(INTEL, 0x3b56) #define HDA_INTEL_PCH2 HDA_MODEL_CONSTRUCT(INTEL, 0x3b57) +#define HDA_INTEL_MACBOOKPRO92 HDA_MODEL_CONSTRUCT(INTEL, 0x7270) #define HDA_INTEL_SCH HDA_MODEL_CONSTRUCT(INTEL, 0x811b) #define HDA_INTEL_LPT1 HDA_MODEL_CONSTRUCT(INTEL, 0x8c20) #define HDA_INTEL_LPT2 HDA_MODEL_CONSTRUCT(INTEL, 0x8c21) @@ -257,7 +258,9 @@ * (see HDA_CODEC_STAC9221 below). */ #define APPLE_INTEL_MAC 0x76808384 +#define APPLE_MACBOOKAIR31 0x0d9410de #define APPLE_MACBOOKPRO55 0xcb7910de +#define APPLE_MACBOOKPRO71 0xcb8910de /* LG Electronics */ #define LG_VENDORID 0x1854 From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 07:51:16 2014 Return-Path: Delivered-To: svn-src-all@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 0DC805DE; Wed, 12 Feb 2014 07:51:16 +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 CFE9D12A9; Wed, 12 Feb 2014 07:51:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1C7pF03068302; Wed, 12 Feb 2014 07:51:15 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1C7pFjN068301; Wed, 12 Feb 2014 07:51:15 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201402120751.s1C7pFjN068301@svn.freebsd.org> From: Dimitry Andric Date: Wed, 12 Feb 2014 07:51: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: r261794 - in stable: 10/contrib/llvm/tools/clang/lib/Sema 9/contrib/llvm/tools/clang/lib/Sema X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 07:51:16 -0000 Author: dim Date: Wed Feb 12 07:51:14 2014 New Revision: 261794 URL: http://svnweb.freebsd.org/changeset/base/261794 Log: MFC r261680: Pull in r200899 from upstream clang trunk: Allow transformation of VariableArray to ConstantArray. In the following code: struct A { static const int sz; }; template void f() { T arr[A::sz]; } the array 'arr' is represented as a variable size array in the template. If 'A::sz' gets value below in the translation unit, the array in instantiation can turn into constant size array. This change fixes PR18633. Differential Revision: http://llvm-reviews.chandlerc.com/D2688 This fixes "Assertion failed: (T::isKind(*this)), function castAs" errors, which can occur when building the security/quantis port. Reported by: ale Modified: stable/10/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Modified: stable/10/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h ============================================================================== --- stable/10/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h Wed Feb 12 07:24:37 2014 (r261793) +++ stable/10/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h Wed Feb 12 07:51:14 2014 (r261794) @@ -3837,7 +3837,9 @@ TreeTransform::TransformVariabl return QualType(); } - VariableArrayTypeLoc NewTL = TLB.push(Result); + // We might have constant size array now, but fortunately it has the same + // location layout. + ArrayTypeLoc NewTL = TLB.push(Result); NewTL.setLBracketLoc(TL.getLBracketLoc()); NewTL.setRBracketLoc(TL.getRBracketLoc()); NewTL.setSizeExpr(Size); From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 07:51:15 2014 Return-Path: Delivered-To: svn-src-all@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 AB8945DD; Wed, 12 Feb 2014 07:51: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 7BBFA12A8; Wed, 12 Feb 2014 07:51:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1C7pFwO068296; Wed, 12 Feb 2014 07:51:15 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1C7pFuf068295; Wed, 12 Feb 2014 07:51:15 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201402120751.s1C7pFuf068295@svn.freebsd.org> From: Dimitry Andric Date: Wed, 12 Feb 2014 07:51:15 +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: r261794 - in stable: 10/contrib/llvm/tools/clang/lib/Sema 9/contrib/llvm/tools/clang/lib/Sema X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 07:51:15 -0000 Author: dim Date: Wed Feb 12 07:51:14 2014 New Revision: 261794 URL: http://svnweb.freebsd.org/changeset/base/261794 Log: MFC r261680: Pull in r200899 from upstream clang trunk: Allow transformation of VariableArray to ConstantArray. In the following code: struct A { static const int sz; }; template void f() { T arr[A::sz]; } the array 'arr' is represented as a variable size array in the template. If 'A::sz' gets value below in the translation unit, the array in instantiation can turn into constant size array. This change fixes PR18633. Differential Revision: http://llvm-reviews.chandlerc.com/D2688 This fixes "Assertion failed: (T::isKind(*this)), function castAs" errors, which can occur when building the security/quantis port. Reported by: ale Modified: stable/9/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h Wed Feb 12 07:24:37 2014 (r261793) +++ stable/9/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h Wed Feb 12 07:51:14 2014 (r261794) @@ -3837,7 +3837,9 @@ TreeTransform::TransformVariabl return QualType(); } - VariableArrayTypeLoc NewTL = TLB.push(Result); + // We might have constant size array now, but fortunately it has the same + // location layout. + ArrayTypeLoc NewTL = TLB.push(Result); NewTL.setLBracketLoc(TL.getLBracketLoc()); NewTL.setRBracketLoc(TL.getRBracketLoc()); NewTL.setSizeExpr(Size); From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 08:04:39 2014 Return-Path: Delivered-To: svn-src-all@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 6D396A70; Wed, 12 Feb 2014 08:04:39 +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 489A4135F; Wed, 12 Feb 2014 08:04:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1C84dWe073124; Wed, 12 Feb 2014 08:04:39 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1C84d1Z073123; Wed, 12 Feb 2014 08:04:39 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402120804.s1C84d1Z073123@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 12 Feb 2014 08:04:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261795 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 08:04:39 -0000 Author: hselasky Date: Wed Feb 12 08:04:38 2014 New Revision: 261795 URL: http://svnweb.freebsd.org/changeset/base/261795 Log: Issue doorbell twice before finally freeing the DMA descriptors. This should fix DMA descriptor caching issues seen with the EHCI controller found in Google Chromebook C720 during removal and insertion of USB devices. MFC after: 1 week Reported by: Matthew Dillon at DragonFlyBSD Modified: head/sys/dev/usb/controller/ehci.c Modified: head/sys/dev/usb/controller/ehci.c ============================================================================== --- head/sys/dev/usb/controller/ehci.c Wed Feb 12 07:51:14 2014 (r261794) +++ head/sys/dev/usb/controller/ehci.c Wed Feb 12 08:04:38 2014 (r261795) @@ -2261,10 +2261,26 @@ ehci_device_bulk_enter(struct usb_xfer * } static void +ehci_doorbell_async(struct ehci_softc *sc) +{ + uint32_t temp; + + /* + * XXX Performance quirk: Some Host Controllers have a too low + * interrupt rate. Issue an IAAD to stimulate the Host + * Controller after queueing the BULK transfer. + * + * XXX Force the host controller to refresh any QH caches. + */ + temp = EOREAD4(sc, EHCI_USBCMD); + if (!(temp & EHCI_CMD_IAAD)) + EOWRITE4(sc, EHCI_USBCMD, temp | EHCI_CMD_IAAD); +} + +static void ehci_device_bulk_start(struct usb_xfer *xfer) { ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus); - uint32_t temp; /* setup TD's and QH */ ehci_setup_standard_chain(xfer, &sc->sc_async_p_last); @@ -2279,13 +2295,7 @@ ehci_device_bulk_start(struct usb_xfer * if (sc->sc_flags & EHCI_SCFLG_IAADBUG) return; - /* XXX Performance quirk: Some Host Controllers have a too low - * interrupt rate. Issue an IAAD to stimulate the Host - * Controller after queueing the BULK transfer. - */ - temp = EOREAD4(sc, EHCI_USBCMD); - if (!(temp & EHCI_CMD_IAAD)) - EOWRITE4(sc, EHCI_USBCMD, temp | EHCI_CMD_IAAD); + ehci_doorbell_async(sc); } static const struct usb_pipe_methods ehci_device_bulk_methods = @@ -3902,6 +3912,41 @@ ehci_set_hw_power(struct usb_bus *bus) return; } +static void +ehci_start_dma_delay_second(struct usb_xfer *xfer) +{ + struct ehci_softc *sc = EHCI_BUS2SC(xfer->xroot->bus); + + DPRINTF("\n"); + + /* trigger doorbell */ + ehci_doorbell_async(sc); + + /* give the doorbell 4ms */ + usbd_transfer_timeout_ms(xfer, + (void (*)(void *))&usb_dma_delay_done_cb, 4); +} + +/* + * Ring the doorbell twice before freeing any DMA descriptors. Some host + * controllers apparently cache the QH descriptors and need a message + * that the cache needs to be discarded. + */ +static void +ehci_start_dma_delay(struct usb_xfer *xfer) +{ + struct ehci_softc *sc = EHCI_BUS2SC(xfer->xroot->bus); + + DPRINTF("\n"); + + /* trigger doorbell */ + ehci_doorbell_async(sc); + + /* give the doorbell 4ms */ + usbd_transfer_timeout_ms(xfer, + (void (*)(void *))&ehci_start_dma_delay_second, 4); +} + static const struct usb_bus_methods ehci_bus_methods = { .endpoint_init = ehci_ep_init, @@ -3914,4 +3959,5 @@ static const struct usb_bus_methods ehci .set_hw_power_sleep = ehci_set_hw_power_sleep, .roothub_exec = ehci_roothub_exec, .xfer_poll = ehci_do_poll, + .start_dma_delay = ehci_start_dma_delay, }; From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 09:41:18 2014 Return-Path: Delivered-To: svn-src-all@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 5C156669; Wed, 12 Feb 2014 09:41: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 2CB051BF6; Wed, 12 Feb 2014 09:41:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1C9fI9I011745; Wed, 12 Feb 2014 09:41:18 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1C9fH5L011741; Wed, 12 Feb 2014 09:41:17 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201402120941.s1C9fH5L011741@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 12 Feb 2014 09:41:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261796 - head/lib/libkvm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 09:41:18 -0000 Author: glebius Date: Wed Feb 12 09:41:17 2014 New Revision: 261796 URL: http://svnweb.freebsd.org/changeset/base/261796 Log: While it isn't too late and kvm_read_zpcpu() function isn't yet used outside libkvm(3), change its order of arguments, so that it is the same as in kvm_read(). Sponsored by: Nginx, Inc. Modified: head/lib/libkvm/kvm.h head/lib/libkvm/kvm_getpcpu.3 head/lib/libkvm/kvm_pcpu.c Modified: head/lib/libkvm/kvm.h ============================================================================== --- head/lib/libkvm/kvm.h Wed Feb 12 08:04:38 2014 (r261795) +++ head/lib/libkvm/kvm.h Wed Feb 12 09:41:17 2014 (r261796) @@ -88,7 +88,7 @@ kvm_t *kvm_open kvm_t *kvm_openfiles (const char *, const char *, const char *, int, char *); ssize_t kvm_read(kvm_t *, unsigned long, void *, size_t); -ssize_t kvm_read_zpcpu(kvm_t *, void *, u_long, size_t, int); +ssize_t kvm_read_zpcpu(kvm_t *, unsigned long, void *, size_t, int); ssize_t kvm_write(kvm_t *, unsigned long, const void *, size_t); __END_DECLS Modified: head/lib/libkvm/kvm_getpcpu.3 ============================================================================== --- head/lib/libkvm/kvm_getpcpu.3 Wed Feb 12 08:04:38 2014 (r261795) +++ head/lib/libkvm/kvm_getpcpu.3 Wed Feb 12 09:41:17 2014 (r261796) @@ -50,7 +50,7 @@ .Ft void * .Fn kvm_getpcpu "kvm_t *kd" "int cpu" .Ft ssize_t -.Fn kvm_read_zpcpu "kvm_t *kd" "void *buf" "u_long base" "size_t size" "int cpu" +.Fn kvm_read_zpcpu "kvm_t *kd" "u_long base" "void *buf" "size_t size" "int cpu" .Ft uint64_t .Fn kvm_counter_u64_fetch "kvm_t *kd" "u_long base" .Sh DESCRIPTION Modified: head/lib/libkvm/kvm_pcpu.c ============================================================================== --- head/lib/libkvm/kvm_pcpu.c Wed Feb 12 08:04:38 2014 (r261795) +++ head/lib/libkvm/kvm_pcpu.c Wed Feb 12 09:41:17 2014 (r261796) @@ -306,7 +306,7 @@ kvm_dpcpu_setcpu(kvm_t *kd, u_int cpu) * Obtain a per-CPU copy for given cpu from UMA_ZONE_PCPU allocation. */ ssize_t -kvm_read_zpcpu(kvm_t *kd, void *buf, u_long base, size_t size, int cpu) +kvm_read_zpcpu(kvm_t *kd, u_long base, void *buf, size_t size, int cpu) { return (kvm_read(kd, (uintptr_t)(base + sizeof(struct pcpu) * cpu), @@ -327,7 +327,7 @@ kvm_counter_u64_fetch(kvm_t *kd, u_long r = 0; for (int i = 0; i < mp_ncpus; i++) { - if (kvm_read_zpcpu(kd, &c, base, sizeof(c), i) != sizeof(c)) + if (kvm_read_zpcpu(kd, base, &c, sizeof(c), i) != sizeof(c)) return (0); r += c; } From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 09:59:50 2014 Return-Path: Delivered-To: svn-src-all@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 55F4EE82; Wed, 12 Feb 2014 09:59: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 403BD1CF5; Wed, 12 Feb 2014 09:59:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1C9xo3J017290; Wed, 12 Feb 2014 09:59:50 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1C9xnYg017283; Wed, 12 Feb 2014 09:59:49 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201402120959.s1C9xnYg017283@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 12 Feb 2014 09:59:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261797 - in head: sbin/ipfw usr.bin/kdump usr.sbin/bsnmpd/modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 09:59:50 -0000 Author: glebius Date: Wed Feb 12 09:59:48 2014 New Revision: 261797 URL: http://svnweb.freebsd.org/changeset/base/261797 Log: Fix world build WITHOUT_PF. Sponsored by: Nginx, Inc. Modified: head/sbin/ipfw/Makefile head/sbin/ipfw/ipfw2.h head/usr.bin/kdump/Makefile head/usr.bin/kdump/mkioctls head/usr.sbin/bsnmpd/modules/Makefile Modified: head/sbin/ipfw/Makefile ============================================================================== --- head/sbin/ipfw/Makefile Wed Feb 12 09:41:17 2014 (r261796) +++ head/sbin/ipfw/Makefile Wed Feb 12 09:59:48 2014 (r261797) @@ -1,8 +1,16 @@ # $FreeBSD$ +.include + PROG= ipfw -SRCS= ipfw2.c dummynet.c ipv6.c main.c nat.c altq.c +SRCS= ipfw2.c dummynet.c ipv6.c main.c nat.c WARNS?= 2 + +.if ${MK_PF} != "no" +SRCS+= altq.c +CFLAGS+=-DPF +.endif + DPADD= ${LIBUTIL} LDADD= -lutil MAN= ipfw.8 Modified: head/sbin/ipfw/ipfw2.h ============================================================================== --- head/sbin/ipfw/ipfw2.h Wed Feb 12 09:41:17 2014 (r261796) +++ head/sbin/ipfw/ipfw2.h Wed Feb 12 09:59:48 2014 (r261797) @@ -268,11 +268,14 @@ void ipfw_flush(int force); void ipfw_zero(int ac, char *av[], int optname); void ipfw_list(int ac, char *av[], int show_counters); +#ifdef PF /* altq.c */ void altq_set_enabled(int enabled); u_int32_t altq_name_to_qid(const char *name); - void print_altq_cmd(struct _ipfw_insn_altq *altqptr); +#else +#define NO_ALTQ +#endif /* dummynet.c */ void dummynet_list(int ac, char *av[], int show_counters); Modified: head/usr.bin/kdump/Makefile ============================================================================== --- head/usr.bin/kdump/Makefile Wed Feb 12 09:41:17 2014 (r261796) +++ head/usr.bin/kdump/Makefile Wed Feb 12 09:59:48 2014 (r261797) @@ -20,6 +20,10 @@ LDADD+= -lcapsicum -lnv CFLAGS+=-DHAVE_LIBCAPSICUM .endif +.if ${MK_PF} != "no" +CFLAGS+=-DPF +.endif + .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" SRCS+= linux_syscalls.c .endif Modified: head/usr.bin/kdump/mkioctls ============================================================================== --- head/usr.bin/kdump/mkioctls Wed Feb 12 09:41:17 2014 (r261796) +++ head/usr.bin/kdump/mkioctls Wed Feb 12 09:59:48 2014 (r261797) @@ -21,7 +21,8 @@ LC_ALL=C; export LC_ALL # XXX should we use an ANSI cpp? ioctl_includes=$( cd $includedir - find -H -s * -name '*.h' | grep -v '.*disk.*\.h' | \ + find -H -s * -name '*.h' | \ + egrep -v '(.*disk.*|net/pfvar|net/if_pfsync)\.h' | \ xargs egrep -l \ '^#[ ]*define[ ]+[A-Za-z_][A-Za-z0-9_]*[ ]+_IO[^a-z0-9_]' | awk '{printf("#include <%s>\\n", $1)}' @@ -54,7 +55,10 @@ BEGIN { print "#include " print "#include " print "#include " + print "#ifdef PF" print "#include " + print "#include " + print "#endif" print "#include " print "#include " print "#include " Modified: head/usr.sbin/bsnmpd/modules/Makefile ============================================================================== --- head/usr.sbin/bsnmpd/modules/Makefile Wed Feb 12 09:41:17 2014 (r261796) +++ head/usr.sbin/bsnmpd/modules/Makefile Wed Feb 12 09:59:48 2014 (r261797) @@ -13,12 +13,15 @@ SUBDIR= ${_snmp_atm} \ snmp_hast \ snmp_hostres \ snmp_mibII \ - snmp_pf \ snmp_target \ snmp_usm \ snmp_vacm \ snmp_wlan +.if ${MK_PF} != "no" +SUBDIR+=snmp_pf +.endif + .if ${MK_NETGRAPH_SUPPORT} != "no" SUBDIR+=snmp_netgraph .endif From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 13:55:31 2014 Return-Path: Delivered-To: svn-src-all@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 12E8FA00; Wed, 12 Feb 2014 13:55:31 +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 F208C1510; Wed, 12 Feb 2014 13:55:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1CDtUit013688; Wed, 12 Feb 2014 13:55:30 GMT (envelope-from rmh@svn.freebsd.org) Received: (from rmh@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1CDtUBA013686; Wed, 12 Feb 2014 13:55:30 GMT (envelope-from rmh@svn.freebsd.org) Message-Id: <201402121355.s1CDtUBA013686@svn.freebsd.org> From: Robert Millan Date: Wed, 12 Feb 2014 13:55: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: r261798 - stable/10/sys/dev/drm2/radeon X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 13:55:31 -0000 Author: rmh Date: Wed Feb 12 13:55:30 2014 New Revision: 261798 URL: http://svnweb.freebsd.org/changeset/base/261798 Log: MFC r261497: Abort when firmware isn't present in R600+ models. More details at: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux/debian/patches/bugfix/all/radeon-firmware-is-required-for-drm-and-kms-on-r600-onward.patch?revision=20909&view=co Modified: stable/10/sys/dev/drm2/radeon/r600.c stable/10/sys/dev/drm2/radeon/rv770.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/drm2/radeon/r600.c ============================================================================== --- stable/10/sys/dev/drm2/radeon/r600.c Wed Feb 12 09:59:48 2014 (r261797) +++ stable/10/sys/dev/drm2/radeon/r600.c Wed Feb 12 13:55:30 2014 (r261798) @@ -3012,6 +3012,12 @@ int r600_init(struct radeon_device *rdev rdev->accel_working = false; } + /* Don't start up if the ucode is missing. */ + if (!rdev->me_fw || !rdev->pfp_fw || !rdev->rlc_fw) { + DRM_ERROR("radeon: ucode required for R600+.\n"); + return -EINVAL; + } + return 0; } Modified: stable/10/sys/dev/drm2/radeon/rv770.c ============================================================================== --- stable/10/sys/dev/drm2/radeon/rv770.c Wed Feb 12 09:59:48 2014 (r261797) +++ stable/10/sys/dev/drm2/radeon/rv770.c Wed Feb 12 13:55:30 2014 (r261798) @@ -1186,6 +1186,12 @@ int rv770_init(struct radeon_device *rde rdev->accel_working = false; } + /* Don't start up if the ucode is missing. */ + if (!rdev->me_fw || !rdev->pfp_fw || !rdev->rlc_fw) { + DRM_ERROR("radeon: ucode required for R600+.\n"); + return -EINVAL; + } + return 0; } From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 15:22:27 2014 Return-Path: Delivered-To: svn-src-all@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 7003124C; Wed, 12 Feb 2014 15:22:27 +0000 (UTC) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id F1C671D3C; Wed, 12 Feb 2014 15:22:26 +0000 (UTC) Received: from c122-106-144-87.carlnfd1.nsw.optusnet.com.au (c122-106-144-87.carlnfd1.nsw.optusnet.com.au [122.106.144.87]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 1BEAC1040659; Thu, 13 Feb 2014 01:52:11 +1100 (EST) Date: Thu, 13 Feb 2014 01:52:07 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Gleb Smirnoff Subject: Re: svn commit: r261796 - head/lib/libkvm In-Reply-To: <201402120941.s1C9fH5L011741@svn.freebsd.org> Message-ID: <20140213011518.H2280@besplex.bde.org> References: <201402120941.s1C9fH5L011741@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=bpB1Wiqi c=1 sm=1 tr=0 a=p/w0leo876FR0WNmYI1KeA==:117 a=PO7r1zJSAAAA:8 a=ImdYw06bgIgA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=RPTfz7_hRNcA:10 a=8WG7OBH0z4cZeSee9cAA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 15:22:27 -0000 On Wed, 12 Feb 2014, Gleb Smirnoff wrote: > Log: > While it isn't too late and kvm_read_zpcpu() function isn't yet used > outside libkvm(3), change its order of arguments, so that it is the > same as in kvm_read(). This also fixes some but not all namespace pollution. > Modified: head/lib/libkvm/kvm.h > ============================================================================== > --- head/lib/libkvm/kvm.h Wed Feb 12 08:04:38 2014 (r261795) > +++ head/lib/libkvm/kvm.h Wed Feb 12 09:41:17 2014 (r261796) > @@ -88,7 +88,7 @@ kvm_t *kvm_open > kvm_t *kvm_openfiles > (const char *, const char *, const char *, int, char *); > ssize_t kvm_read(kvm_t *, unsigned long, void *, size_t); > -ssize_t kvm_read_zpcpu(kvm_t *, void *, u_long, size_t, int); This shouldn't even have compiled, but someone broke kvm.h by changing its include of to . > +ssize_t kvm_read_zpcpu(kvm_t *, unsigned long, void *, size_t, int); This fixes one dependency on the namespace pollution. > ssize_t kvm_write(kvm_t *, unsigned long, const void *, size_t); > __END_DECLS > > Modified: head/lib/libkvm/kvm_getpcpu.3 > ============================================================================== > --- head/lib/libkvm/kvm_getpcpu.3 Wed Feb 12 08:04:38 2014 (r261795) > +++ head/lib/libkvm/kvm_getpcpu.3 Wed Feb 12 09:41:17 2014 (r261796) > @@ -50,7 +50,7 @@ > .Ft void * > .Fn kvm_getpcpu "kvm_t *kd" "int cpu" > .Ft ssize_t > -.Fn kvm_read_zpcpu "kvm_t *kd" "void *buf" "u_long base" "size_t size" "int cpu" > +.Fn kvm_read_zpcpu "kvm_t *kd" "u_long base" "void *buf" "size_t size" "int cpu" This doesn't fix the documentation saying to use the namespace pollution for the changed function... > .Ft uint64_t > .Fn kvm_counter_u64_fetch "kvm_t *kd" "u_long base" ...or for other functions. This bug was missing in both the header and the man page for all of the older functions that use unsigned long (kvm_read(), kvm_uread() and kvm_write()). kvm.h otherwise depends on the full pollution of only for the declaration uint64_t. It should declare this itself like it does for all the other non-underscored typedefed types that it uses. > .Sh DESCRIPTION > > Modified: head/lib/libkvm/kvm_pcpu.c > ============================================================================== > --- head/lib/libkvm/kvm_pcpu.c Wed Feb 12 08:04:38 2014 (r261795) > +++ head/lib/libkvm/kvm_pcpu.c Wed Feb 12 09:41:17 2014 (r261796) > @@ -306,7 +306,7 @@ kvm_dpcpu_setcpu(kvm_t *kd, u_int cpu) > * Obtain a per-CPU copy for given cpu from UMA_ZONE_PCPU allocation. > */ > ssize_t > -kvm_read_zpcpu(kvm_t *kd, void *buf, u_long base, size_t size, int cpu) > +kvm_read_zpcpu(kvm_t *kd, u_long base, void *buf, size_t size, int cpu) > { > > return (kvm_read(kd, (uintptr_t)(base + sizeof(struct pcpu) * cpu), > @@ -327,7 +327,7 @@ kvm_counter_u64_fetch(kvm_t *kd, u_long > > r = 0; > for (int i = 0; i < mp_ncpus; i++) { > - if (kvm_read_zpcpu(kd, &c, base, sizeof(c), i) != sizeof(c)) > + if (kvm_read_zpcpu(kd, base, &c, sizeof(c), i) != sizeof(c)) > return (0); > r += c; > } > The implementation can reasonably use u_long after including for itself. In fact, it is a style bug to not do so. In old versions, libkvm/*.c had 1 instance of the style bug 'unsigned foo' and 105 instances of u_foo. Now it is even cleaner -- it has 0 instances of the style bug and 196 instances of u_foo. It mostly includes by including . One newer file has the style bug of including both, and another newer file is sophisticated and includes only . kvm_getfiles(3) documents a prerequesite for bogusly. This should be under the _KERNEL ifdef. And the kernel ifdef shouldn't be in the synopsis since it is not needed for calling the function but only for interpretation of the data returned by the function. It also fails to document the data format (which is an unusable mixture of struct xfile and struct file). It also fails to document the complete brokenness of this function (the function now returns with an error without actually reading any data). This is harmless because the function is never used in /usr/src. Bruce From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 15:57:38 2014 Return-Path: Delivered-To: svn-src-all@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 ABC5AF95; Wed, 12 Feb 2014 15:57: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 948E61132; Wed, 12 Feb 2014 15:57:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1CFvcB7061256; Wed, 12 Feb 2014 15:57:38 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1CFvccH061255; Wed, 12 Feb 2014 15:57:38 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201402121557.s1CFvccH061255@svn.freebsd.org> From: Ed Maste Date: Wed, 12 Feb 2014 15:57:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261799 - head/lib/libkvm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 15:57:38 -0000 Author: emaste Date: Wed Feb 12 15:57:38 2014 New Revision: 261799 URL: http://svnweb.freebsd.org/changeset/base/261799 Log: Add bounds check for pteindex / pdeindex Modified: head/lib/libkvm/kvm_minidump_amd64.c Modified: head/lib/libkvm/kvm_minidump_amd64.c ============================================================================== --- head/lib/libkvm/kvm_minidump_amd64.c Wed Feb 12 13:55:30 2014 (r261798) +++ head/lib/libkvm/kvm_minidump_amd64.c Wed Feb 12 15:57:38 2014 (r261799) @@ -214,6 +214,8 @@ _kvm_minidump_vatop_v1(kvm_t *kd, u_long if (va >= vm->hdr.kernbase) { pteindex = (va - vm->hdr.kernbase) >> PAGE_SHIFT; + if (pteindex >= vm->hdr.pmapsize / sizeof(*vm->page_map)) + goto invalid; pte = vm->page_map[pteindex]; if (((u_long)pte & PG_V) == 0) { _kvm_err(kd, kd->program, "_kvm_vatop: pte not valid"); @@ -264,6 +266,8 @@ _kvm_minidump_vatop(kvm_t *kd, u_long va if (va >= vm->hdr.kernbase) { pdeindex = (va - vm->hdr.kernbase) >> PDRSHIFT; + if (pdeindex >= vm->hdr.pmapsize / sizeof(*vm->page_map)) + goto invalid; pde = vm->page_map[pdeindex]; if (((u_long)pde & PG_V) == 0) { _kvm_err(kd, kd->program, "_kvm_vatop: pde not valid"); From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 16:39:56 2014 Return-Path: Delivered-To: svn-src-all@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 A8EF2E1B; Wed, 12 Feb 2014 16:39:56 +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 948941539; Wed, 12 Feb 2014 16:39:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1CGduV4077690; Wed, 12 Feb 2014 16:39:56 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1CGduQ3077689; Wed, 12 Feb 2014 16:39:56 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201402121639.s1CGduQ3077689@svn.freebsd.org> From: Warren Block Date: Wed, 12 Feb 2014 16:39:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261800 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 16:39:56 -0000 Author: wblock (doc committer) Date: Wed Feb 12 16:39:56 2014 New Revision: 261800 URL: http://svnweb.freebsd.org/changeset/base/261800 Log: Remove obsolete vnode(9) man page references. PR: docs/186537 Submitted by: Miklos Magyari MFC after: 3 days Modified: head/share/man/man9/vnode.9 Modified: head/share/man/man9/vnode.9 ============================================================================== --- head/share/man/man9/vnode.9 Wed Feb 12 15:57:38 2014 (r261799) +++ head/share/man/man9/vnode.9 Wed Feb 12 16:39:56 2014 (r261800) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 13, 2010 +.Dd February 12, 2014 .Dt VNODE 9 .Os .Sh NAME @@ -69,11 +69,8 @@ and the .Va v_holdcnt of a vnode reaches zero then the vnode will be put on the freelist and may be reused for another file, possibly in another file system. -The transition to and from the freelist is handled by -.Xr getnewvnode 9 , -.Xr vfree 9 -and -.Xr vbusy 9 . +The transition from the freelist is handled by +.Xr getnewvnode 9 . The third is a count of the number of clients which are writing into the file. It is maintained by the @@ -82,9 +79,9 @@ and .Xr close 2 system calls. .Pp -Any call which returns a vnode (e.g.\& +Any call which returns a vnode (e.g.,\& .Xr vget 9 , -.Xr VOP_LOOKUP 9 +.Xr VOP_LOOKUP 9 , etc.) will increase the .Va v_usecount From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 17:02:35 2014 Return-Path: Delivered-To: svn-src-all@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 CF78C6F4; Wed, 12 Feb 2014 17:02:35 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (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 53EA6179F; Wed, 12 Feb 2014 17:02:34 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.8/8.14.8) with ESMTP id s1CH2WZD026752 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 12 Feb 2014 21:02:32 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.8/8.14.8/Submit) id s1CH2WlI026751; Wed, 12 Feb 2014 21:02:32 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 12 Feb 2014 21:02:32 +0400 From: Gleb Smirnoff To: Bruce Evans Subject: Re: svn commit: r261796 - head/lib/libkvm Message-ID: <20140212170232.GZ1532@FreeBSD.org> References: <201402120941.s1C9fH5L011741@svn.freebsd.org> <20140213011518.H2280@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140213011518.H2280@besplex.bde.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 17:02:35 -0000 Bruce, On Thu, Feb 13, 2014 at 01:52:07AM +1100, Bruce Evans wrote: B> > --- head/lib/libkvm/kvm_getpcpu.3 Wed Feb 12 08:04:38 2014 (r261795) B> > +++ head/lib/libkvm/kvm_getpcpu.3 Wed Feb 12 09:41:17 2014 (r261796) B> > @@ -50,7 +50,7 @@ B> > .Ft void * B> > .Fn kvm_getpcpu "kvm_t *kd" "int cpu" B> > .Ft ssize_t B> > -.Fn kvm_read_zpcpu "kvm_t *kd" "void *buf" "u_long base" "size_t size" "int cpu" B> > +.Fn kvm_read_zpcpu "kvm_t *kd" "u_long base" "void *buf" "size_t size" "int cpu" B> B> This doesn't fix the documentation saying to use the namespace pollution for B> the changed function... B> B> > .Ft uint64_t B> > .Fn kvm_counter_u64_fetch "kvm_t *kd" "u_long base" B> B> ...or for other functions. B> B> This bug was missing in both the header and the man page for all of the B> older functions that use unsigned long (kvm_read(), kvm_uread() and B> kvm_write()). B> B> kvm.h otherwise depends on the full pollution of only for the B> declaration uint64_t. It should declare this itself like it does for all B> the other non-underscored typedefed types that it uses. I'm sorry, Bruce, but my position is the same as before on this. I think that C99 types must be supported by compiler. While they are not, requiring a header that declares C99 types is okay. Typedefing a standard type manually looks for me more ugly than header requirement. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 18:14:50 2014 Return-Path: Delivered-To: svn-src-all@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 85084B97; Wed, 12 Feb 2014 18:14: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 703211DBF; Wed, 12 Feb 2014 18:14:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1CIEoeI016766; Wed, 12 Feb 2014 18:14:50 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1CIEo5A016765; Wed, 12 Feb 2014 18:14:50 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201402121814.s1CIEo5A016765@svn.freebsd.org> From: Dimitry Andric Date: Wed, 12 Feb 2014 18:14:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261801 - head/contrib/libc++/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 18:14:50 -0000 Author: dim Date: Wed Feb 12 18:14:49 2014 New Revision: 261801 URL: http://svnweb.freebsd.org/changeset/base/261801 Log: An ABI incompatibility crept into the libc++ 3.4 import in r261283. It was caused by upstream libc++ commit r194536, which aimed to make the headers more standards-compliant, by making std::pair's copy constructor trivial. Unfortunately, this could cause certain C++ applications using shared libraries built against the previous version of libc++ to crash. Fix the ABI incompatibility by making std::pair's copy constructor non-trivial again. Please note: Any C++ applications or shared libraries built with libc++ between r261283 and this revision should be recompiled. Reported by: stefanf MFC after: 3 weeks X-MFC-With: r261283 Modified: head/contrib/libc++/include/__config Modified: head/contrib/libc++/include/__config ============================================================================== --- head/contrib/libc++/include/__config Wed Feb 12 16:39:56 2014 (r261800) +++ head/contrib/libc++/include/__config Wed Feb 12 18:14:49 2014 (r261801) @@ -567,7 +567,7 @@ template struct __static_asse #define _LIBCPP_WCTYPE_IS_MASK #endif -#if defined(__APPLE__) +#if defined(__APPLE__) || defined(__FreeBSD__) #ifndef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR # define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 0 #endif From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 18:16:57 2014 Return-Path: Delivered-To: svn-src-all@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 23DDFD07; Wed, 12 Feb 2014 18:16: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 0DFD71DDA; Wed, 12 Feb 2014 18:16:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1CIGuux017066; Wed, 12 Feb 2014 18:16:56 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1CIGu32017065; Wed, 12 Feb 2014 18:16:56 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201402121816.s1CIGu32017065@svn.freebsd.org> From: Dimitry Andric Date: Wed, 12 Feb 2014 18:16:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261802 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 18:16:57 -0000 Author: dim Date: Wed Feb 12 18:16:56 2014 New Revision: 261802 URL: http://svnweb.freebsd.org/changeset/base/261802 Log: Add a note to UPDATING about the ABI compatibility fix done in r261801. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Wed Feb 12 18:14:49 2014 (r261801) +++ head/UPDATING Wed Feb 12 18:16:56 2014 (r261802) @@ -31,6 +31,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20140212: + An ABI incompatibility crept into the libc++ 3.4 import in r261283. + This could cause certain C++ applications using shared libraries built + against the previous version of libc++ to crash. The incompatibility + has now been fixed, but any C++ applications or shared libraries built + between r261283 and r261801 should be recompiled. + 20140128: The libelf and libdwarf libraries have been updated to newer versions from upstream. Shared library version numbers for From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 18:42:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by hub.freebsd.org (Postfix) with ESMTP id 5AD2B286; Wed, 12 Feb 2014 18:42:21 +0000 (UTC) Message-ID: <52FBC08C.30309@FreeBSD.org> Date: Wed, 12 Feb 2014 13:42:20 -0500 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Dimitry Andric , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r261801 - head/contrib/libc++/include References: <201402121814.s1CIEo5A016765@svn.freebsd.org> In-Reply-To: <201402121814.s1CIEo5A016765@svn.freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 18:42:21 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2014-02-12 13:14:50 -0500, Dimitry Andric wrote: > Author: dim Date: Wed Feb 12 18:14:49 2014 New Revision: 261801 > URL: http://svnweb.freebsd.org/changeset/base/261801 > > Log: An ABI incompatibility crept into the libc++ 3.4 import in > r261283. It was caused by upstream libc++ commit r194536, which > aimed to make the headers more standards-compliant, by making > std::pair's copy constructor trivial. Unfortunately, this could > cause certain C++ applications using shared libraries built against > the previous version of libc++ to crash. > > Fix the ABI incompatibility by making std::pair's copy constructor > non-trivial again. > > Please note: Any C++ applications or shared libraries built with > libc++ between r261283 and this revision should be recompiled. > > Reported by: stefanf MFC after: 3 weeks X-MFC-With: r261283 > > Modified: head/contrib/libc++/include/__config > > Modified: head/contrib/libc++/include/__config > ============================================================================== > > - --- head/contrib/libc++/include/__config Wed Feb 12 16:39:56 2014 (r261800) > +++ head/contrib/libc++/include/__config Wed Feb 12 18:14:49 2014 > (r261801) @@ -567,7 +567,7 @@ template struct > __static_asse #define _LIBCPP_WCTYPE_IS_MASK #endif > > -#if defined(__APPLE__) +#if defined(__APPLE__) || > defined(__FreeBSD__) #ifndef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR # > define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 0 #endif It seems Apple removed it later. http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131125/094181.html Do you know what they did? Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQEcBAEBAgAGBQJS+8CMAAoJEHyflib82/FGHckH/3knT4PPbIwJ8vgTqtENbp7o Z9nK2UVwdk9EpXwx0d8Uy2eX6hs/2c5xEKqHHuuGlFBjHmwDUBsaW6746y8lWVaD VtOtwRAN/wxyocA9kGscFBJv/dhmXpkvNUELjyQIOdgNWKdr5yYkOVF/blfpMTpn 49RIyFTj5IgxoedTp48lykpmYV95PF0TciqFFB8s78xCMVritHNzqk4au02z1olf LmKLdmVHKqoU4wSMbmxzF+dv6MyfqkTtBxqV8HFUtVluHg2zhMZghPA0atmyMho3 7jlIFEYvjNmSVdicvXFtlmw61rE2XoKGx7G9m2hs1xLfyFTeYPpLxh2TWZaAHq4= =o9xx -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 18:48:15 2014 Return-Path: Delivered-To: svn-src-all@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 5FD9351A; Wed, 12 Feb 2014 18:48:15 +0000 (UTC) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 25AB31183; Wed, 12 Feb 2014 18:48:14 +0000 (UTC) Received: from [192.168.0.7] (cpc28-cmbg15-2-0-cust64.5-4.cable.virginm.net [86.27.189.65]) (authenticated bits=0) by theravensnest.org (8.14.7/8.14.5) with ESMTP id s1CIm2Fl042705 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Wed, 12 Feb 2014 18:48:04 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: svn commit: r261801 - head/contrib/libc++/include From: David Chisnall In-Reply-To: <52FBC08C.30309@FreeBSD.org> Date: Wed, 12 Feb 2014 18:47:57 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201402121814.s1CIEo5A016765@svn.freebsd.org> <52FBC08C.30309@FreeBSD.org> To: Jung-uk Kim X-Mailer: Apple Mail (2.1827) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 18:48:15 -0000 On 12 Feb 2014, at 18:42, Jung-uk Kim wrote: > It seems Apple removed it later. >=20 > = http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131125/094181= .html >=20 > Do you know what they did? They decided to break ABI compatibility with the version of XCode that = ships with the bug. This is probably not an option for us, although we = might consider it for FreeBSD 11 with a library version bump (it would = still be a lot of pain, as you wouldn't be able to mix C++ libraries), = but probably not unless we see bug reports related to our slight = standards non-compliance (std::pair having an explicit constructor) = causing real problems. David From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 18:55:27 2014 Return-Path: Delivered-To: svn-src-all@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 4F9BF8E2; Wed, 12 Feb 2014 18:55: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 39BEB122B; Wed, 12 Feb 2014 18:55:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1CItR6O032411; Wed, 12 Feb 2014 18:55:27 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1CItRO7032410; Wed, 12 Feb 2014 18:55:27 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402121855.s1CItRO7032410@svn.freebsd.org> From: Ian Lepore Date: Wed, 12 Feb 2014 18:55:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261803 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 18:55:27 -0000 Author: ian Date: Wed Feb 12 18:55:26 2014 New Revision: 261803 URL: http://svnweb.freebsd.org/changeset/base/261803 Log: On armv6 and later, use the WriteNotRead bit of the fault status register to decide what protections are required by the faulting access. The old code disassembled the faulting instruction, and there are a lot of new instructions that aren't handled. The old code is still used for armv4/5 which doesn't have the WNR bit) Modified: head/sys/arm/arm/trap.c Modified: head/sys/arm/arm/trap.c ============================================================================== --- head/sys/arm/arm/trap.c Wed Feb 12 18:16:56 2014 (r261802) +++ head/sys/arm/arm/trap.c Wed Feb 12 18:55:26 2014 (r261803) @@ -386,17 +386,16 @@ data_abort_handler(struct trapframe *tf) } /* - * We need to know whether the page should be mapped - * as R or R/W. The MMU does not give us the info as - * to whether the fault was caused by a read or a write. - * - * However, we know that a permission fault can only be - * the result of a write to a read-only location, so - * we can deal with those quickly. - * - * Otherwise we need to disassemble the instruction - * responsible to determine if it was a write. + * We need to know whether the page should be mapped as R or R/W. On + * armv6 and later the fault status register indicates whether the + * access was a read or write. Prior to armv6, we know that a + * permission fault can only be the result of a write to a read-only + * location, so we can deal with those quickly. Otherwise we need to + * disassemble the faulting instruction to determine if it was a write. */ +#ifdef _ARM_ARCH_6 + ftype = (fsr & FAULT_WNR) ? VM_PROT_READ | VM_PROT_WRITE : VM_PROT_READ; +#else if (IS_PERMISSION_FAULT(fsr)) ftype = VM_PROT_WRITE; else { @@ -412,6 +411,7 @@ data_abort_handler(struct trapframe *tf) else ftype = VM_PROT_READ; } +#endif } /* From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 19:03:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by hub.freebsd.org (Postfix) with ESMTP id 8C82CC81; Wed, 12 Feb 2014 19:03:12 +0000 (UTC) Message-ID: <52FBC570.6080003@FreeBSD.org> Date: Wed, 12 Feb 2014 14:03:12 -0500 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: David Chisnall Subject: Re: svn commit: r261801 - head/contrib/libc++/include References: <201402121814.s1CIEo5A016765@svn.freebsd.org> <52FBC08C.30309@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 19:03:13 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2014-02-12 13:47:57 -0500, David Chisnall wrote: > On 12 Feb 2014, at 18:42, Jung-uk Kim wrote: > >> It seems Apple removed it later. >> >> http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131125/094181.html >> >> >> Do you know what they did? > > They decided to break ABI compatibility with the version of XCode > that ships with the bug. This is probably not an option for us, > although we might consider it for FreeBSD 11 with a library version > bump (it would still be a lot of pain, as you wouldn't be able to > mix C++ libraries), but probably not unless we see bug reports > related to our slight standards non-compliance (std::pair having an > explicit constructor) causing real problems. I see. I am not a big fan of library version bump but standard compliance is also very important for us, too. Hmm... :-( Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQEcBAEBAgAGBQJS+8VwAAoJEHyflib82/FG3XIIAJbKQU4vLxe0d0YiJfZELtU5 WyAVfjXN3rIivtddiOyEQkdPU5MwiNrmIbY4JaVaPc3uUa/7fsWCEn29s167Pe+v A45vE6TU7zegbbI/9JgZXmtv+j+2GJXUunk6pGWGpbII2Hys6MQFiNnoZb7opOrL XT2uIb7vAix7m+H/llpDRbryXXx5f2cZje0JjhuorxoMdm2awuLgoMQgr790Au6M E8BFzJjmprEV6BHX13TC5mj5SR59H3c6/ZX/4bBaxEIOQY9YrftVNejkXVoh+c8J C9ADVcb1uZoIWY7ICYpCKI+NCdp6oQ3Yrss75VYg0LYEPL8H+EXjNSUrUHc518o= =hQn+ -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 19:07:59 2014 Return-Path: Delivered-To: svn-src-all@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 E49B7F8D; Wed, 12 Feb 2014 19: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 CE7E6130D; Wed, 12 Feb 2014 19:07:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1CJ7xoK037108; Wed, 12 Feb 2014 19:07:59 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1CJ7x7Y037107; Wed, 12 Feb 2014 19:07:59 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201402121907.s1CJ7x7Y037107@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 12 Feb 2014 19:07:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261804 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 19:08:00 -0000 Author: np Date: Wed Feb 12 19:07:59 2014 New Revision: 261804 URL: http://svnweb.freebsd.org/changeset/base/261804 Log: Provide additional information in some panic strings. MFC after: 1 week Modified: head/sys/sys/mbuf.h Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Wed Feb 12 18:55:26 2014 (r261803) +++ head/sys/sys/mbuf.h Wed Feb 12 19:07:59 2014 (r261804) @@ -531,7 +531,7 @@ m_gettype(int size) type = EXT_JUMBO16; break; default: - panic("%s: invalid cluster size", __func__); + panic("%s: invalid cluster size %d", __func__, size); } return (type); @@ -580,7 +580,7 @@ m_getzone(int size) zone = zone_jumbo16; break; default: - panic("%s: invalid cluster size", __func__); + panic("%s: invalid cluster size %d", __func__, size); } return (zone); @@ -725,7 +725,7 @@ m_cljset(struct mbuf *m, void *cl, int t zone = zone_jumbo16; break; default: - panic("%s: unknown cluster type", __func__); + panic("%s: unknown cluster type %d", __func__, type); break; } From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 19:22:50 2014 Return-Path: Delivered-To: svn-src-all@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 0C4DC4A7; Wed, 12 Feb 2014 19:22: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 D16D81486; Wed, 12 Feb 2014 19:22:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1CJMnun045051; Wed, 12 Feb 2014 19:22:49 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1CJMnXS045036; Wed, 12 Feb 2014 19:22:49 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201402121922.s1CJMnXS045036@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 12 Feb 2014 19:22:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261805 - head/lib/libkvm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 19:22:50 -0000 Author: glebius Date: Wed Feb 12 19:22:48 2014 New Revision: 261805 URL: http://svnweb.freebsd.org/changeset/base/261805 Log: Add kvm_getncpus() to obtain mp_ncpus. Sponsored by: Nginx, Inc. Modified: head/lib/libkvm/kvm.h head/lib/libkvm/kvm_getpcpu.3 head/lib/libkvm/kvm_pcpu.c Modified: head/lib/libkvm/kvm.h ============================================================================== --- head/lib/libkvm/kvm.h Wed Feb 12 19:07:59 2014 (r261804) +++ head/lib/libkvm/kvm.h Wed Feb 12 19:22:48 2014 (r261805) @@ -77,6 +77,7 @@ char *kvm_geterr(kvm_t *); char *kvm_getfiles(kvm_t *, int, int, int *); int kvm_getloadavg(kvm_t *, double [], int); int kvm_getmaxcpu(kvm_t *); +int kvm_getncpus(kvm_t *); void *kvm_getpcpu(kvm_t *, int); uint64_t kvm_counter_u64_fetch(kvm_t *, u_long); struct kinfo_proc * Modified: head/lib/libkvm/kvm_getpcpu.3 ============================================================================== --- head/lib/libkvm/kvm_getpcpu.3 Wed Feb 12 19:07:59 2014 (r261804) +++ head/lib/libkvm/kvm_getpcpu.3 Wed Feb 12 19:22:48 2014 (r261805) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 11, 2013 +.Dd February 12, 2014 .Dt KVM_GETPCPU 3 .Os .Sh NAME @@ -47,6 +47,8 @@ .Fn kvm_dpcpu_setcpu "kvm_t *kd" "u_int cpu" .Ft int .Fn kvm_getmaxcpu "kvm_t *kd" +.Ft int +.Fn kvm_getncpus "kvm_t *kd" .Ft void * .Fn kvm_getpcpu "kvm_t *kd" "int cpu" .Ft ssize_t @@ -73,6 +75,10 @@ The function returns the maximum number of CPUs supported by the kernel. .Pp The +.Fn kvm_getncpus +function returns the current number of CPUs in the kernel. +.Pp +The .Fn kvm_getpcpu function returns a buffer holding the per-CPU data for a single CPU. This buffer is described by the Modified: head/lib/libkvm/kvm_pcpu.c ============================================================================== --- head/lib/libkvm/kvm_pcpu.c Wed Feb 12 19:07:59 2014 (r261804) +++ head/lib/libkvm/kvm_pcpu.c Wed Feb 12 19:22:48 2014 (r261805) @@ -173,6 +173,16 @@ kvm_getmaxcpu(kvm_t *kd) return (maxcpu); } +int +kvm_getncpus(kvm_t *kd) +{ + + if (mp_ncpus == 0) + if (_kvm_pcpu_init(kd) < 0) + return (-1); + return (mp_ncpus); +} + static int _kvm_dpcpu_setcpu(kvm_t *kd, u_int cpu, int report_error) { From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 19:26:09 2014 Return-Path: Delivered-To: svn-src-all@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 C36DD5AD; Wed, 12 Feb 2014 19:26: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 6E9BD14F8; Wed, 12 Feb 2014 19:26:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1CJQ9HT048900; Wed, 12 Feb 2014 19:26:09 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1CJQ9El048899; Wed, 12 Feb 2014 19:26:09 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201402121926.s1CJQ9El048899@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 12 Feb 2014 19:26:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r261806 - vendor-sys/acpica/dist/source/tools/acpiexec X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 19:26:10 -0000 Author: jkim Date: Wed Feb 12 19:26:08 2014 New Revision: 261806 URL: http://svnweb.freebsd.org/changeset/base/261806 Log: Restore the BSD license and update copyright date. Reported by: Sascha Widner (via devel@acpica.org) Modified: vendor-sys/acpica/dist/source/tools/acpiexec/aehandlers.c Modified: vendor-sys/acpica/dist/source/tools/acpiexec/aehandlers.c ============================================================================== --- vendor-sys/acpica/dist/source/tools/acpiexec/aehandlers.c Wed Feb 12 19:22:48 2014 (r261805) +++ vendor-sys/acpica/dist/source/tools/acpiexec/aehandlers.c Wed Feb 12 19:26:08 2014 (r261806) @@ -4,114 +4,42 @@ * *****************************************************************************/ -/****************************************************************************** - * - * 1. Copyright Notice - * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. +/* + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * - * 2. License - * - * 2.1. This is your license from Intel Corp. under its intellectual property - * rights. You may have additional license terms from the party that provided - * you this software, covering your right to use that party's intellectual - * property rights. - * - * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a - * copy of the source code appearing in this file ("Covered Code") an - * irrevocable, perpetual, worldwide license under Intel's copyrights in the - * base code distributed originally by Intel ("Original Intel Code") to copy, - * make derivatives, distribute, use and display any portion of the Covered - * Code in any form, with the right to sublicense such rights; and - * - * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent - * license (with the right to sublicense), under only those claims of Intel - * patents that are infringed by the Original Intel Code, to make, use, sell, - * offer to sell, and import the Covered Code and derivative works thereof - * solely to the minimum extent necessary to exercise the above copyright - * license, and in no event shall the patent license extend to any additions - * to or modifications of the Original Intel Code. No other license or right - * is granted directly or by implication, estoppel or otherwise; - * - * The above copyright and patent license is granted only if the following - * conditions are met: - * - * 3. Conditions - * - * 3.1. Redistribution of Source with Rights to Further Distribute Source. - * Redistribution of source code of any substantial portion of the Covered - * Code or modification with rights to further distribute source must include - * the above Copyright Notice, the above License, this list of Conditions, - * and the following Disclaimer and Export Compliance provision. In addition, - * Licensee must cause all Covered Code to which Licensee contributes to - * contain a file documenting the changes Licensee made to create that Covered - * Code and the date of any change. Licensee must include in that file the - * documentation of any changes made by any predecessor Licensee. Licensee - * must include a prominent statement that the modification is derived, - * directly or indirectly, from Original Intel Code. - * - * 3.2. Redistribution of Source with no Rights to Further Distribute Source. - * Redistribution of source code of any substantial portion of the Covered - * Code or modification without rights to further distribute source must - * include the following Disclaimer and Export Compliance provision in the - * documentation and/or other materials provided with distribution. In - * addition, Licensee may not authorize further sublicense of source of any - * portion of the Covered Code, and must include terms to the effect that the - * license from Licensee to its licensee is limited to the intellectual - * property embodied in the software Licensee provides to its licensee, and - * not to intellectual property embodied in modifications its licensee may - * make. - * - * 3.3. Redistribution of Executable. Redistribution in executable form of any - * substantial portion of the Covered Code or modification must reproduce the - * above Copyright Notice, and the following Disclaimer and Export Compliance - * provision in the documentation and/or other materials provided with the - * distribution. - * - * 3.4. Intel retains all right, title, and interest in and to the Original - * Intel Code. - * - * 3.5. Neither the name Intel nor any other trademark owned or controlled by - * Intel shall be used in advertising or otherwise to promote the sale, use or - * other dealings in products derived from or relating to the Covered Code - * without prior written authorization from Intel. - * - * 4. Disclaimer and Export Compliance - * - * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED - * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE - * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, - * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY - * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A - * PARTICULAR PURPOSE. - * - * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES - * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR - * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, - * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY - * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL - * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS - * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY - * LIMITED REMEDY. - * - * 4.3. Licensee shall not export, either directly or indirectly, any of this - * software or system incorporating such software without first obtaining any - * required license or other approval from the U. S. Department of Commerce or - * any other agency or department of the United States Government. In the - * event Licensee exports any such software from the United States or - * re-exports any such software from a foreign destination, Licensee shall - * ensure that the distribution and export/re-export of the software is in - * compliance with all laws, regulations, orders, or other restrictions of the - * U.S. Export Administration Regulations. Licensee agrees that neither it nor - * any of its subsidiaries will export/re-export any technical data, process, - * software, or service, directly or indirectly, to any country for which the - * United States government or any agency thereof requires an export license, - * other governmental approval, or letter of assurance, without first obtaining - * such license, approval or letter. - * - *****************************************************************************/ + * 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, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. + */ #include "aecommon.h" From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 19:59:31 2014 Return-Path: Delivered-To: svn-src-all@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 797A2CD0; Wed, 12 Feb 2014 19:59:31 +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 64FFC1782; Wed, 12 Feb 2014 19:59:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1CJxVxX061056; Wed, 12 Feb 2014 19:59:31 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1CJxV41061054; Wed, 12 Feb 2014 19:59:31 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402121959.s1CJxV41061054@svn.freebsd.org> From: Ian Lepore Date: Wed, 12 Feb 2014 19:59:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261808 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 19:59:31 -0000 Author: ian Date: Wed Feb 12 19:59:30 2014 New Revision: 261808 URL: http://svnweb.freebsd.org/changeset/base/261808 Log: Use the right symbols for determining arm architecture. Include the necessary header file which has the new FAULT_WNR symbol defined in it. Modified: head/sys/arm/arm/trap.c head/sys/arm/include/armreg.h Modified: head/sys/arm/arm/trap.c ============================================================================== --- head/sys/arm/arm/trap.c Wed Feb 12 19:51:12 2014 (r261807) +++ head/sys/arm/arm/trap.c Wed Feb 12 19:59:30 2014 (r261808) @@ -108,6 +108,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -393,7 +394,7 @@ data_abort_handler(struct trapframe *tf) * location, so we can deal with those quickly. Otherwise we need to * disassemble the faulting instruction to determine if it was a write. */ -#ifdef _ARM_ARCH_6 +#if ARM_ARCH_6 || ARM_ARCH_7A ftype = (fsr & FAULT_WNR) ? VM_PROT_READ | VM_PROT_WRITE : VM_PROT_READ; #else if (IS_PERMISSION_FAULT(fsr)) @@ -411,8 +412,8 @@ data_abort_handler(struct trapframe *tf) else ftype = VM_PROT_READ; } -#endif } +#endif /* * See if the fault is as a result of ref/mod emulation, Modified: head/sys/arm/include/armreg.h ============================================================================== --- head/sys/arm/include/armreg.h Wed Feb 12 19:51:12 2014 (r261807) +++ head/sys/arm/include/armreg.h Wed Feb 12 19:59:30 2014 (r261808) @@ -404,6 +404,8 @@ #define FAULT_PERM_P 0x0f /* Permission -- Page */ #define FAULT_IMPRECISE 0x400 /* Imprecise exception (XSCALE) */ +#define FAULT_EXTERNAL 0x400 /* External abort (armv6+) */ +#define FAULT_WNR 0x800 /* Write-not-Read access (armv6+) */ /* * Address of the vector page, low and high versions. From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 20:09:27 2014 Return-Path: Delivered-To: svn-src-all@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 9BD61FEB; Wed, 12 Feb 2014 20:09: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 86BCC1859; Wed, 12 Feb 2014 20:09:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1CK9Rva065269; Wed, 12 Feb 2014 20:09:27 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1CK9R6P065268; Wed, 12 Feb 2014 20:09:27 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402122009.s1CK9R6P065268@svn.freebsd.org> From: Ian Lepore Date: Wed, 12 Feb 2014 20:09:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261810 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 20:09:27 -0000 Author: ian Date: Wed Feb 12 20:09:27 2014 New Revision: 261810 URL: http://svnweb.freebsd.org/changeset/base/261810 Log: Use the same logic as the x86 platforms to avoid trying perform fault fixup while in a critical section or while holding a non-sleepable lock. Reviewed by: cognet Modified: head/sys/arm/arm/trap.c Modified: head/sys/arm/arm/trap.c ============================================================================== --- head/sys/arm/arm/trap.c Wed Feb 12 20:06:26 2014 (r261809) +++ head/sys/arm/arm/trap.c Wed Feb 12 20:09:27 2014 (r261810) @@ -422,6 +422,10 @@ data_abort_handler(struct trapframe *tf) #ifdef DEBUG last_fault_code = fsr; #endif + if (td->td_critnest != 0 || WITNESS_CHECK(WARN_SLEEPOK | WARN_GIANTOK, + NULL, "Kernel page fault") != 0) + goto fatal_pagefault; + if (pmap_fault_fixup(vmspace_pmap(td->td_proc->p_vmspace), va, ftype, user)) { goto out; @@ -444,6 +448,7 @@ data_abort_handler(struct trapframe *tf) } if (__predict_true(error == 0)) goto out; +fatal_pagefault: if (user == 0) { if (pcb->pcb_onfault) { tf->tf_r0 = error; From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 20:11:20 2014 Return-Path: Delivered-To: svn-src-all@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 E5AEF288; Wed, 12 Feb 2014 20:11:20 +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 D160718C0; Wed, 12 Feb 2014 20:11:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1CKBKc2068373; Wed, 12 Feb 2014 20:11:20 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1CKBK2E068372; Wed, 12 Feb 2014 20:11:20 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201402122011.s1CKBK2E068372@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 12 Feb 2014 20:11:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261811 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 20:11:21 -0000 Author: glebius Date: Wed Feb 12 20:11:20 2014 New Revision: 261811 URL: http://svnweb.freebsd.org/changeset/base/261811 Log: Fix function name in KASSERT(). Submitted by: hiren Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Wed Feb 12 20:09:27 2014 (r261810) +++ head/sys/vm/vm_object.c Wed Feb 12 20:11:20 2014 (r261811) @@ -676,8 +676,7 @@ vm_object_destroy(vm_object_t object) if (object->cred != NULL) { KASSERT(object->type == OBJT_DEFAULT || object->type == OBJT_SWAP, - ("vm_object_terminate: non-swap obj %p has cred", - object)); + ("%s: non-swap obj %p has cred", __func__, object)); swap_release_by_cred(object->charge, object->cred); object->charge = 0; crfree(object->cred); From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 21:10:42 2014 Return-Path: Delivered-To: svn-src-all@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 DD650499; Wed, 12 Feb 2014 21:10: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 C6E2F1DC7; Wed, 12 Feb 2014 21:10:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1CLAgvD089728; Wed, 12 Feb 2014 21:10:42 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1CLAebe089713; Wed, 12 Feb 2014 21:10:40 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201402122110.s1CLAebe089713@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 12 Feb 2014 21:10:40 +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: r261813 - in stable/9/lib/libc: gen locale nls yp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 21:10:42 -0000 Author: jilles Date: Wed Feb 12 21:10:40 2014 New Revision: 261813 URL: http://svnweb.freebsd.org/changeset/base/261813 Log: MFC r241046: libc: Use O_CLOEXEC for various internal file descriptors. This fixes a race condition where another thread may fork(), unintentionally passing the descriptor to the child process. This commit only adds O_CLOEXEC flags to open() or openat() calls where no fcntl(fd, F_SETFD, FD_CLOEXEC) follows. Modified: stable/9/lib/libc/gen/getcap.c stable/9/lib/libc/gen/getcwd.c stable/9/lib/libc/gen/nlist.c stable/9/lib/libc/gen/opendir.c stable/9/lib/libc/gen/pututxline.c stable/9/lib/libc/gen/readpassphrase.c stable/9/lib/libc/gen/sem_new.c stable/9/lib/libc/gen/syslog.c stable/9/lib/libc/locale/ldpart.c stable/9/lib/libc/nls/msgcat.c stable/9/lib/libc/yp/yplib.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/getcap.c ============================================================================== --- stable/9/lib/libc/gen/getcap.c Wed Feb 12 20:21:12 2014 (r261812) +++ stable/9/lib/libc/gen/getcap.c Wed Feb 12 21:10:40 2014 (r261813) @@ -264,7 +264,7 @@ getent(char **cap, u_int *len, char **db *cap = cbuf; return (retval); } else { - fd = _open(*db_p, O_RDONLY, 0); + fd = _open(*db_p, O_RDONLY | O_CLOEXEC, 0); if (fd < 0) continue; myfd = 1; Modified: stable/9/lib/libc/gen/getcwd.c ============================================================================== --- stable/9/lib/libc/gen/getcwd.c Wed Feb 12 20:21:12 2014 (r261812) +++ stable/9/lib/libc/gen/getcwd.c Wed Feb 12 21:10:40 2014 (r261813) @@ -140,7 +140,7 @@ getcwd(pt, size) /* Open and stat parent directory. */ fd = _openat(dir != NULL ? dirfd(dir) : AT_FDCWD, - "..", O_RDONLY); + "..", O_RDONLY | O_CLOEXEC); if (fd == -1) goto err; if (dir) Modified: stable/9/lib/libc/gen/nlist.c ============================================================================== --- stable/9/lib/libc/gen/nlist.c Wed Feb 12 20:21:12 2014 (r261812) +++ stable/9/lib/libc/gen/nlist.c Wed Feb 12 21:10:40 2014 (r261813) @@ -66,7 +66,7 @@ nlist(name, list) { int fd, n; - fd = _open(name, O_RDONLY, 0); + fd = _open(name, O_RDONLY | O_CLOEXEC, 0); if (fd < 0) return (-1); n = __fdnlist(fd, list); Modified: stable/9/lib/libc/gen/opendir.c ============================================================================== --- stable/9/lib/libc/gen/opendir.c Wed Feb 12 20:21:12 2014 (r261812) +++ stable/9/lib/libc/gen/opendir.c Wed Feb 12 21:10:40 2014 (r261813) @@ -190,7 +190,8 @@ __opendir_common(int fd, const char *nam */ if (flags & DTF_REWIND) { (void)_close(fd); - if ((fd = _open(name, O_RDONLY | O_DIRECTORY)) == -1) { + if ((fd = _open(name, O_RDONLY | O_DIRECTORY | + O_CLOEXEC)) == -1) { saved_errno = errno; free(buf); free(dirp); Modified: stable/9/lib/libc/gen/pututxline.c ============================================================================== --- stable/9/lib/libc/gen/pututxline.c Wed Feb 12 20:21:12 2014 (r261812) +++ stable/9/lib/libc/gen/pututxline.c Wed Feb 12 21:10:40 2014 (r261813) @@ -47,7 +47,7 @@ futx_open(const char *file) struct stat sb; int fd; - fd = _open(file, O_CREAT|O_RDWR|O_EXLOCK, 0644); + fd = _open(file, O_CREAT|O_RDWR|O_EXLOCK|O_CLOEXEC, 0644); if (fd < 0) return (NULL); @@ -219,7 +219,7 @@ utx_lastlogin_upgrade(void) struct stat sb; int fd; - fd = _open(_PATH_UTX_LASTLOGIN, O_RDWR, 0644); + fd = _open(_PATH_UTX_LASTLOGIN, O_RDWR|O_CLOEXEC, 0644); if (fd < 0) return; @@ -253,7 +253,7 @@ utx_log_add(const struct futx *fu) vec[1].iov_len = l; l = htobe16(l); - fd = _open(_PATH_UTX_LOG, O_CREAT|O_WRONLY|O_APPEND, 0644); + fd = _open(_PATH_UTX_LOG, O_CREAT|O_WRONLY|O_APPEND|O_CLOEXEC, 0644); if (fd < 0) return (-1); if (_writev(fd, vec, 2) == -1) Modified: stable/9/lib/libc/gen/readpassphrase.c ============================================================================== --- stable/9/lib/libc/gen/readpassphrase.c Wed Feb 12 20:21:12 2014 (r261812) +++ stable/9/lib/libc/gen/readpassphrase.c Wed Feb 12 21:10:40 2014 (r261813) @@ -68,7 +68,7 @@ restart: * stdin and write to stderr unless a tty is required. */ if ((flags & RPP_STDIN) || - (input = output = _open(_PATH_TTY, O_RDWR)) == -1) { + (input = output = _open(_PATH_TTY, O_RDWR | O_CLOEXEC)) == -1) { if (flags & RPP_REQUIRE_TTY) { errno = ENOTTY; return(NULL); Modified: stable/9/lib/libc/gen/sem_new.c ============================================================================== --- stable/9/lib/libc/gen/sem_new.c Wed Feb 12 20:21:12 2014 (r261812) +++ stable/9/lib/libc/gen/sem_new.c Wed Feb 12 21:10:40 2014 (r261813) @@ -198,7 +198,7 @@ _sem_open(const char *name, int flags, . goto error; } - fd = _open(path, flags|O_RDWR, mode); + fd = _open(path, flags|O_RDWR|O_CLOEXEC, mode); if (fd == -1) goto error; if (flock(fd, LOCK_EX) == -1) Modified: stable/9/lib/libc/gen/syslog.c ============================================================================== --- stable/9/lib/libc/gen/syslog.c Wed Feb 12 20:21:12 2014 (r261812) +++ stable/9/lib/libc/gen/syslog.c Wed Feb 12 21:10:40 2014 (r261813) @@ -300,7 +300,8 @@ vsyslog(int pri, const char *fmt, va_lis * Make sure the error reported is the one from the syslogd failure. */ if (LogStat & LOG_CONS && - (fd = _open(_PATH_CONSOLE, O_WRONLY|O_NONBLOCK, 0)) >= 0) { + (fd = _open(_PATH_CONSOLE, O_WRONLY|O_NONBLOCK|O_CLOEXEC, 0)) >= + 0) { struct iovec iov[2]; struct iovec *v = iov; Modified: stable/9/lib/libc/locale/ldpart.c ============================================================================== --- stable/9/lib/libc/locale/ldpart.c Wed Feb 12 20:21:12 2014 (r261812) +++ stable/9/lib/libc/locale/ldpart.c Wed Feb 12 21:10:40 2014 (r261813) @@ -87,7 +87,7 @@ __part_load_locale(const char *name, strcat(filename, name); strcat(filename, "/"); strcat(filename, category_filename); - if ((fd = _open(filename, O_RDONLY)) < 0) + if ((fd = _open(filename, O_RDONLY | O_CLOEXEC)) < 0) return (_LDP_ERROR); if (_fstat(fd, &st) != 0) goto bad_locale; Modified: stable/9/lib/libc/nls/msgcat.c ============================================================================== --- stable/9/lib/libc/nls/msgcat.c Wed Feb 12 20:21:12 2014 (r261812) +++ stable/9/lib/libc/nls/msgcat.c Wed Feb 12 21:10:40 2014 (r261813) @@ -384,7 +384,7 @@ load_msgcat(const char *path, const char } UNLOCK; - if ((fd = _open(path, O_RDONLY)) == -1) { + if ((fd = _open(path, O_RDONLY | O_CLOEXEC)) == -1) { SAVEFAIL(name, lang, errno); NLRETERR(errno); } Modified: stable/9/lib/libc/yp/yplib.c ============================================================================== --- stable/9/lib/libc/yp/yplib.c Wed Feb 12 20:21:12 2014 (r261812) +++ stable/9/lib/libc/yp/yplib.c Wed Feb 12 21:10:40 2014 (r261813) @@ -373,7 +373,7 @@ again: ysd->dom_socket = -1; } snprintf(path, sizeof(path), "%s/%s.%d", BINDINGDIR, dom, 2); - if ((fd = _open(path, O_RDONLY)) == -1) { + if ((fd = _open(path, O_RDONLY | O_CLOEXEC)) == -1) { /* no binding file, YP is dead. */ /* Try to bring it back to life. */ _close(fd); From owner-svn-src-all@FreeBSD.ORG Wed Feb 12 22:25:08 2014 Return-Path: Delivered-To: svn-src-all@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 AD431E22; Wed, 12 Feb 2014 22:25: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 9569615C7; Wed, 12 Feb 2014 22:25:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1CMP8BO020619; Wed, 12 Feb 2014 22:25:08 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1CMP8D2020618; Wed, 12 Feb 2014 22:25:08 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402122225.s1CMP8D2020618@svn.freebsd.org> From: Ian Lepore Date: Wed, 12 Feb 2014 22:25:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261814 - head/sys/dev/sdhci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 22:25:08 -0000 Author: ian Date: Wed Feb 12 22:25:08 2014 New Revision: 261814 URL: http://svnweb.freebsd.org/changeset/base/261814 Log: Fix the definition of the SDHCI_STATE_DAT and SDHCI_STATE_CMD fields, and add SDHCI_RETUNE_REQUEST. None of these are actually used in the code yet. Modified: head/sys/dev/sdhci/sdhci.h Modified: head/sys/dev/sdhci/sdhci.h ============================================================================== --- head/sys/dev/sdhci/sdhci.h Wed Feb 12 21:10:40 2014 (r261813) +++ head/sys/dev/sdhci/sdhci.h Wed Feb 12 22:25:08 2014 (r261814) @@ -104,6 +104,7 @@ #define SDHCI_CMD_INHIBIT 0x00000001 #define SDHCI_DAT_INHIBIT 0x00000002 #define SDHCI_DAT_ACTIVE 0x00000004 +#define SDHCI_RETUNE_REQUEST 0x00000008 #define SDHCI_DOING_WRITE 0x00000100 #define SDHCI_DOING_READ 0x00000200 #define SDHCI_SPACE_AVAILABLE 0x00000400 @@ -112,8 +113,8 @@ #define SDHCI_CARD_STABLE 0x00020000 #define SDHCI_CARD_PIN 0x00040000 #define SDHCI_WRITE_PROTECT 0x00080000 -#define SDHCI_STATE_DAT 0x00700000 -#define SDHCI_STATE_CMD 0x00800000 +#define SDHCI_STATE_DAT_MASK 0x00f00000 +#define SDHCI_STATE_CMD 0x01000000 #define SDHCI_HOST_CONTROL 0x28 #define SDHCI_CTRL_LED 0x01 From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 01:04:35 2014 Return-Path: Delivered-To: svn-src-all@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 D5093BC0; Thu, 13 Feb 2014 01:04:35 +0000 (UTC) Received: from mail-qa0-x233.google.com (mail-qa0-x233.google.com [IPv6:2607:f8b0:400d:c00::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 28ED211EA; Thu, 13 Feb 2014 01:04:35 +0000 (UTC) Received: by mail-qa0-f51.google.com with SMTP id f11so15373531qae.10 for ; Wed, 12 Feb 2014 17:04:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type; bh=ORExUezl0oUmtNHCdr9y2Bw3QIf/MFwRQXYAVI+btHw=; b=ugCR2Aa8Vdp5Lmvo4QTmRzECbGgi6fvyZw+rdZ+pGKbBwynve7nzDXseO4aI8mMmes FPojEaj/pWmJsNjiXSjv0hj8Mc+cND6NF31SszYCryEOiG4QsvToYw5XaoAy9X1AP1NP Qz5x/QWyIr0UlcN23wVfH7A45i/cXQq8yPNeyIW9hHsdBb5+HYbTT7aGm4UwhO06p8Gy o1wcrpVOuIaTiNelA/CxRiuvH46VvMYkBKmjNhHduO33gFLGIgllA1SS0nDxKRr0Gx/w /XiyPqiFIK60E+250TEGwUUXgW6CYwcm/AuOfCU54iT0U3/jRASiYyAO2FDHvHbCiYYM ydvw== X-Received: by 10.224.62.14 with SMTP id v14mr34397480qah.79.1392253474319; Wed, 12 Feb 2014 17:04:34 -0800 (PST) Received: from kan.dyndns.org (c-24-63-226-98.hsd1.ma.comcast.net. [24.63.226.98]) by mx.google.com with ESMTPSA id q10sm447618qaj.13.2014.02.12.17.04.31 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Wed, 12 Feb 2014 17:04:32 -0800 (PST) Date: Wed, 12 Feb 2014 20:04:13 -0500 From: Alexander Kabaev To: Jung-uk Kim Subject: Re: svn commit: r261801 - head/contrib/libc++/include Message-ID: <20140212200413.71c6db5b@kan.dyndns.org> In-Reply-To: <52FBC570.6080003@FreeBSD.org> References: <201402121814.s1CIEo5A016765@svn.freebsd.org> <52FBC08C.30309@FreeBSD.org> <52FBC570.6080003@FreeBSD.org> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.22; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/ry9Uh8QAFoP496vYODP7r/V"; protocol="application/pgp-signature" Cc: svn-src-head@freebsd.org, Dimitry Andric , svn-src-all@freebsd.org, src-committers@freebsd.org, David Chisnall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 01:04:36 -0000 --Sig_/ry9Uh8QAFoP496vYODP7r/V Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 12 Feb 2014 14:03:12 -0500 Jung-uk Kim wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > On 2014-02-12 13:47:57 -0500, David Chisnall wrote: > > On 12 Feb 2014, at 18:42, Jung-uk Kim wrote: > >=20 > >> It seems Apple removed it later. > >>=20 > >> http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131125/09= 4181.html > >> > >> > >>=20 > Do you know what they did? > >=20 > > They decided to break ABI compatibility with the version of XCode > > that ships with the bug. This is probably not an option for us, > > although we might consider it for FreeBSD 11 with a library version > > bump (it would still be a lot of pain, as you wouldn't be able to > > mix C++ libraries), but probably not unless we see bug reports > > related to our slight standards non-compliance (std::pair having an > > explicit constructor) causing real problems. >=20 > I see. I am not a big fan of library version bump but standard > compliance is also very important for us, too. Hmm... :-( >=20 The refusal to use tools that are there precisely to help to help with the binary compatibility in favor of mindless library bumps is just sad. --=20 Alexander Kabaev --Sig_/ry9Uh8QAFoP496vYODP7r/V Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iD8DBQFS/BoeQ6z1jMm+XZYRAqCMAJ0cNGlAJhRNMjQNu2HI2lUDqI7xWQCcCVY4 NgFv7JAAvA8JP9bpfN2UVnY= =iV0i -----END PGP SIGNATURE----- --Sig_/ry9Uh8QAFoP496vYODP7r/V-- From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 02:38:17 2014 Return-Path: Delivered-To: svn-src-all@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 11B5ECBE; Thu, 13 Feb 2014 02:38:17 +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 F05A318F0; Thu, 13 Feb 2014 02:38:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1D2cGdW019266; Thu, 13 Feb 2014 02:38:16 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1D2cG9K019265; Thu, 13 Feb 2014 02:38:16 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402130238.s1D2cG9K019265@svn.freebsd.org> From: Ian Lepore Date: Thu, 13 Feb 2014 02:38:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261815 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 02:38:17 -0000 Author: ian Date: Thu Feb 13 02:38:16 2014 New Revision: 261815 URL: http://svnweb.freebsd.org/changeset/base/261815 Log: Write translation code for the SDHCI_PRESENT_STATE register. Freescale moved some bits around in their version of the register, adjust things so that the sdhci code sees the standard layout. Modified: head/sys/arm/freescale/imx/imx_sdhci.c Modified: head/sys/arm/freescale/imx/imx_sdhci.c ============================================================================== --- head/sys/arm/freescale/imx/imx_sdhci.c Wed Feb 12 22:25:08 2014 (r261814) +++ head/sys/arm/freescale/imx/imx_sdhci.c Thu Feb 13 02:38:16 2014 (r261815) @@ -89,6 +89,27 @@ struct imx_sdhci_softc { #define SDHC_VEND_HCKEN (1 << 12) #define SDHC_VEND_PEREN (1 << 13) +#define SDHC_PRES_STATE 0x24 +#define SDHC_PRES_CIHB (1 << 0) +#define SDHC_PRES_CDIHB (1 << 1) +#define SDHC_PRES_DLA (1 << 2) +#define SDHC_PRES_SDSTB (1 << 3) +#define SDHC_PRES_IPGOFF (1 << 4) +#define SDHC_PRES_HCKOFF (1 << 5) +#define SDHC_PRES_PEROFF (1 << 6) +#define SDHC_PRES_SDOFF (1 << 7) +#define SDHC_PRES_WTA (1 << 8) +#define SDHC_PRES_RTA (1 << 9) +#define SDHC_PRES_BWEN (1 << 10) +#define SDHC_PRES_BREN (1 << 11) +#define SDHC_PRES_RTR (1 << 12) +#define SDHC_PRES_CINST (1 << 16) +#define SDHC_PRES_CDPL (1 << 18) +#define SDHC_PRES_WPSPL (1 << 19) +#define SDHC_PRES_CLSL (1 << 23) +#define SDHC_PRES_DLSL_SHIFT 24 +#define SDHC_PRES_DLSL_MASK (0xffU << SDHC_PRES_DLSL_SHIFT) + #define SDHC_PROT_CTRL 0x28 #define SDHC_PROT_LED (1 << 0) #define SDHC_PROT_WIDTH_1BIT (0 << 1) @@ -254,8 +275,8 @@ imx_sdhci_read_2(device_t dev, struct sd wrk32 = RD4(sc, SDHC_VEND_SPEC); if (wrk32 & SDHC_VEND_FRC_SDCLK_ON) val32 |= SDHCI_CLOCK_INT_EN | SDHCI_CLOCK_CARD_EN; - wrk32 = RD4(sc, SDHCI_PRESENT_STATE); - if (wrk32 & 0x08) + wrk32 = RD4(sc, SDHC_PRES_STATE); + if (wrk32 & SDHC_PRES_SDSTB) val32 |= SDHCI_CLOCK_INT_STABLE; val32 |= sc->sdclockreg_freq_bits; return (val32); @@ -268,7 +289,9 @@ static uint32_t imx_sdhci_read_4(device_t dev, struct sdhci_slot *slot, bus_size_t off) { struct imx_sdhci_softc *sc = device_get_softc(dev); - uint32_t val32; + uint32_t val32, wrk32; + + val32 = RD4(sc, off); /* * The hardware leaves the base clock frequency out of the capabilities @@ -280,7 +303,6 @@ imx_sdhci_read_4(device_t dev, struct sd * doesn't yet handle (1.8v, suspend/resume, etc). */ if (off == SDHCI_CAPABILITIES) { - val32 = RD4(sc, off); val32 &= ~SDHCI_CAN_VDD_180; val32 &= ~SDHCI_CAN_DO_SUSPEND; val32 |= SDHCI_CAN_DO_8BITBUS; @@ -288,14 +310,28 @@ imx_sdhci_read_4(device_t dev, struct sd return (val32); } - val32 = RD4(sc, off); + /* + * The hardware moves bits around in the present state register to make + * room for all 8 data line state bits. To translate, mask out all the + * bits which are not in the same position in both registers (this also + * masks out some freescale-specific bits in locations defined as + * reserved by sdhci), then shift the data line and retune request bits + * down to their standard locations. + */ + if (off == SDHCI_PRESENT_STATE) { + wrk32 = val32; + val32 &= 0x000F0F07; + val32 |= (wrk32 >> 4) & SDHCI_STATE_DAT_MASK; + val32 |= (wrk32 >> 9) & SDHCI_RETUNE_REQUEST; + return (val32); + } /* * imx_sdhci_intr() can synthesize a DATA_END interrupt following a * command with an R1B response, mix it into the hardware status. */ if (off == SDHCI_INT_STATUS) { - val32 |= sc->r1bfix_intmask; + return (val32 | sc->r1bfix_intmask); } return val32; @@ -522,7 +558,7 @@ imx_sdhci_intr(void *arg) count = 0; /* XXX use a callout or something instead of busy-waiting. */ while (count < 250000 && - (RD4(sc, SDHCI_PRESENT_STATE) & SDHCI_DAT_ACTIVE)) { + (RD4(sc, SDHC_PRES_STATE) & SDHC_PRES_DLA)) { ++count; DELAY(1); } From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 03:41:01 2014 Return-Path: Delivered-To: svn-src-all@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 69D62980; Thu, 13 Feb 2014 03:41:01 +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 54649123C; Thu, 13 Feb 2014 03:41:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1D3f1Ot045570; Thu, 13 Feb 2014 03:41:01 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1D3f1Gx045568; Thu, 13 Feb 2014 03:41:01 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402130341.s1D3f1Gx045568@svn.freebsd.org> From: Ian Lepore Date: Thu, 13 Feb 2014 03:41:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261816 - head/sys/boot/fdt/dts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 03:41:01 -0000 Author: ian Date: Thu Feb 13 03:41:00 2014 New Revision: 261816 URL: http://svnweb.freebsd.org/changeset/base/261816 Log: Add standard non-removable and cd-gpios properties to the usdhc devices. That generates references to gpio devices, so uncomment them even though there isn't a gpio driver to do anything with them yet. Modified: head/sys/boot/fdt/dts/imx6.dtsi Modified: head/sys/boot/fdt/dts/imx6.dtsi ============================================================================== --- head/sys/boot/fdt/dts/imx6.dtsi Thu Feb 13 02:38:16 2014 (r261815) +++ head/sys/boot/fdt/dts/imx6.dtsi Thu Feb 13 03:41:00 2014 (r261816) @@ -112,58 +112,75 @@ // status = "disabled"; // }; -// /* -// * GPIO modules moved up - to have it attached for -// * drivers which rely on GPIO -// */ -// gpio1: gpio@0209C000 { -// compatible = "fsl,imx51-gpio", "fsl,imx31-gpio"; -// reg = <0x0209C000 0x4000>; -// interrupt-parent = <&gic>; -// interrupts = <50 51 42 43 44 45 46 47 48 49>; -// /* TODO: use <> also */ -// gpio-controller; -// #gpio-cells = <2>; -// interrupt-controller; -// #interrupt-cells = <1>; -// status = "disabled"; -// }; -// -// gpio2: gpio@020A0000 { -// compatible = "fsl,imx51-gpio", "fsl,imx31-gpio"; -// reg = <0x020A0000 0x4000>; -// interrupt-parent = <&gic>; -// interrupts = <52 53>; -// gpio-controller; -// #gpio-cells = <2>; -// interrupt-controller; -// #interrupt-cells = <1>; -// status = "disabled"; -// }; -// -// gpio3: gpio@020A4000 { -// compatible = "fsl,imx51-gpio", "fsl,imx31-gpio"; -// reg = <0x020A4000 0x4000>; -// interrupt-parent = <&gic>; -// interrupts = <54 55>; -// gpio-controller; -// #gpio-cells = <2>; -// interrupt-controller; -// #interrupt-cells = <1>; -// status = "disabled"; -// }; -// -// gpio4: gpio@020A8000 { -// compatible = "fsl,imx51-gpio", "fsl,imx31-gpio"; -// reg = <0x020A8000 0x4000>; -// interrupt-parent = <&gic>; -// interrupts = <56 57>; -// gpio-controller; -// #gpio-cells = <2>; -// interrupt-controller; -// #interrupt-cells = <1>; -// status = "disabled"; -// }; + gpio1: gpio@0209c000 { + compatible = "fsl,imx6q-gpio", "fsl,imx35-gpio"; + reg = <0x0209c000 0x4000>; + interrupts = <0 66 0x04 0 67 0x04>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio2: gpio@020a0000 { + compatible = "fsl,imx6q-gpio", "fsl,imx35-gpio"; + reg = <0x020a0000 0x4000>; + interrupts = <0 68 0x04 0 69 0x04>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio3: gpio@020a4000 { + compatible = "fsl,imx6q-gpio", "fsl,imx35-gpio"; + reg = <0x020a4000 0x4000>; + interrupts = <0 70 0x04 0 71 0x04>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio4: gpio@020a8000 { + compatible = "fsl,imx6q-gpio", "fsl,imx35-gpio"; + reg = <0x020a8000 0x4000>; + interrupts = <0 72 0x04 0 73 0x04>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio5: gpio@020ac000 { + compatible = "fsl,imx6q-gpio", "fsl,imx35-gpio"; + reg = <0x020ac000 0x4000>; + interrupts = <0 74 0x04 0 75 0x04>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio6: gpio@020b0000 { + compatible = "fsl,imx6q-gpio", "fsl,imx35-gpio"; + reg = <0x020b0000 0x4000>; + interrupts = <0 76 0x04 0 77 0x04>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio7: gpio@020b4000 { + compatible = "fsl,imx6q-gpio", "fsl,imx35-gpio"; + reg = <0x020b4000 0x4000>; + interrupts = <0 78 0x04 0 79 0x04>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; uart1: serial@02020000 { compatible = "fsl,imx6q-uart"; @@ -287,6 +304,7 @@ reg = <0x02190000 0x4000>; interrupt-parent = <&gic>; interrupts = <54>; + cd-gpios = <&gpio1 2 0>; bus-width = <0x4>; status ="disabled"; }; @@ -296,6 +314,7 @@ reg = <0x02194000 0x4000>; interrupt-parent = <&gic>; interrupts = <55>; + non-removable; bus-width = <0x4>; status ="disabled"; }; @@ -305,6 +324,7 @@ reg = <0x02198000 0x4000>; interrupt-parent = <&gic>; interrupts = <56>; + cd-gpios = <&gpio3 9 0>; bus-width = <0x4>; status ="disabled"; }; From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 03:45:34 2014 Return-Path: Delivered-To: svn-src-all@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 775FFAF8; Thu, 13 Feb 2014 03:45: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 49143125E; Thu, 13 Feb 2014 03:45:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1D3jYQ1047094; Thu, 13 Feb 2014 03:45:34 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1D3jYic047093; Thu, 13 Feb 2014 03:45:34 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402130345.s1D3jYic047093@svn.freebsd.org> From: Ian Lepore Date: Thu, 13 Feb 2014 03:45:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261817 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 03:45:34 -0000 Author: ian Date: Thu Feb 13 03:45:33 2014 New Revision: 261817 URL: http://svnweb.freebsd.org/changeset/base/261817 Log: Add handling of standard "non-removable" property, and also some workaround code so that if card detect is wired to a gpio pin, for now we just treat it the same as non-removable (because there isn't a gpio driver yet). Modified: head/sys/arm/freescale/imx/imx_sdhci.c Modified: head/sys/arm/freescale/imx/imx_sdhci.c ============================================================================== --- head/sys/arm/freescale/imx/imx_sdhci.c Thu Feb 13 03:41:00 2014 (r261816) +++ head/sys/arm/freescale/imx/imx_sdhci.c Thu Feb 13 03:45:33 2014 (r261817) @@ -71,6 +71,7 @@ struct imx_sdhci_softc { uint32_t r1bfix_intmask; uint8_t r1bfix_type; uint8_t hwtype; + boolean_t force_card_present; }; #define R1BFIX_NONE 0 /* No fix needed at next interrupt. */ @@ -323,6 +324,8 @@ imx_sdhci_read_4(device_t dev, struct sd val32 &= 0x000F0F07; val32 |= (wrk32 >> 4) & SDHCI_STATE_DAT_MASK; val32 |= (wrk32 >> 9) & SDHCI_RETUNE_REQUEST; + if (sc->force_card_present) + val32 |= SDHCI_CARD_PRESENT; return (val32); } @@ -591,6 +594,7 @@ imx_sdhci_attach(device_t dev) { struct imx_sdhci_softc *sc = device_get_softc(dev); int rid, err; + phandle_t node; sc->dev = dev; @@ -657,6 +661,25 @@ imx_sdhci_attach(device_t dev) sdhci_init_slot(dev, &sc->slot, 0); + /* + * If the slot is flagged with the non-removable property, set our flag + * to always force the SDHCI_CARD_PRESENT bit on. + * + * XXX Workaround for gpio-based card detect... + * + * We don't have gpio support yet. If there's a cd-gpios property just + * force the SDHCI_CARD_PRESENT bit on for now. If there isn't really a + * card there it will fail to probe at the mmc layer and nothing bad + * happens except instantiating a /dev/mmcN device for an empty slot. + */ + node = ofw_bus_get_node(dev); + if (OF_hasprop(node, "non-removable")) + sc->force_card_present = true; + else if (OF_hasprop(node, "cd-gpios")) { + /* XXX put real gpio hookup here. */ + sc->force_card_present = true; + } + bus_generic_probe(dev); bus_generic_attach(dev); From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 04:10:28 2014 Return-Path: Delivered-To: svn-src-all@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 697E9FC9; Thu, 13 Feb 2014 04:10:28 +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 3B822146E; Thu, 13 Feb 2014 04:10:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1D4ASmL055714; Thu, 13 Feb 2014 04:10:28 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1D4ARo1055710; Thu, 13 Feb 2014 04:10:27 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402130410.s1D4ARo1055710@svn.freebsd.org> From: Ian Lepore Date: Thu, 13 Feb 2014 04:10:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261818 - head/sys/boot/fdt/dts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 04:10:28 -0000 Author: ian Date: Thu Feb 13 04:10:27 2014 New Revision: 261818 URL: http://svnweb.freebsd.org/changeset/base/261818 Log: Enable both sdcard slots, but not the sdio-based wifi that we don't yet have a driver for. Modified: head/sys/boot/fdt/dts/wandboard-dual.dts head/sys/boot/fdt/dts/wandboard-quad.dts head/sys/boot/fdt/dts/wandboard-solo.dts Modified: head/sys/boot/fdt/dts/wandboard-dual.dts ============================================================================== --- head/sys/boot/fdt/dts/wandboard-dual.dts Thu Feb 13 03:45:33 2014 (r261817) +++ head/sys/boot/fdt/dts/wandboard-dual.dts Thu Feb 13 04:10:27 2014 (r261818) @@ -67,8 +67,8 @@ usb@02184200 { status = "okay"; }; usb@02184400 { status = "disabled"; }; usb@02184600 { status = "disabled"; }; - usdhc@02190000 { status = "disabled"; }; - usdhc@02194000 { status = "okay"; }; + usdhc@02190000 { status = "okay"; }; + usdhc@02194000 { status = "disabled"; }; usdhc@02198000 { status = "okay"; }; usdhc@0219c000 { status = "disabled"; }; }; Modified: head/sys/boot/fdt/dts/wandboard-quad.dts ============================================================================== --- head/sys/boot/fdt/dts/wandboard-quad.dts Thu Feb 13 03:45:33 2014 (r261817) +++ head/sys/boot/fdt/dts/wandboard-quad.dts Thu Feb 13 04:10:27 2014 (r261818) @@ -67,8 +67,8 @@ usb@02184200 { status = "okay"; }; usb@02184400 { status = "disabled"; }; usb@02184600 { status = "disabled"; }; - usdhc@02190000 { status = "disabled"; }; - usdhc@02194000 { status = "okay"; }; + usdhc@02190000 { status = "okay"; }; + usdhc@02194000 { status = "disabled"; }; usdhc@02198000 { status = "okay"; }; usdhc@0219c000 { status = "disabled"; }; }; Modified: head/sys/boot/fdt/dts/wandboard-solo.dts ============================================================================== --- head/sys/boot/fdt/dts/wandboard-solo.dts Thu Feb 13 03:45:33 2014 (r261817) +++ head/sys/boot/fdt/dts/wandboard-solo.dts Thu Feb 13 04:10:27 2014 (r261818) @@ -67,8 +67,8 @@ usb@02184200 { status = "okay"; }; usb@02184400 { status = "disabled"; }; usb@02184600 { status = "disabled"; }; - usdhc@02190000 { status = "disabled"; }; - usdhc@02194000 { status = "okay"; }; + usdhc@02190000 { status = "okay"; }; + usdhc@02194000 { status = "disabled"; }; usdhc@02198000 { status = "okay"; }; usdhc@0219c000 { status = "disabled"; }; }; From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 04:13:50 2014 Return-Path: Delivered-To: svn-src-all@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 BB22B1B1; Thu, 13 Feb 2014 04:13: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 A7862148D; Thu, 13 Feb 2014 04:13:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1D4Dogb058531; Thu, 13 Feb 2014 04:13:50 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1D4DoJb058530; Thu, 13 Feb 2014 04:13:50 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402130413.s1D4DoJb058530@svn.freebsd.org> From: Ian Lepore Date: Thu, 13 Feb 2014 04:13:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261819 - head/sys/boot/fdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 04:13:50 -0000 Author: ian Date: Thu Feb 13 04:13:50 2014 New Revision: 261819 URL: http://svnweb.freebsd.org/changeset/base/261819 Log: Validate the header of a new dtb before using it. Remove the comment that says that should be done. Modified: head/sys/boot/fdt/fdt_loader_cmd.c Modified: head/sys/boot/fdt/fdt_loader_cmd.c ============================================================================== --- head/sys/boot/fdt/fdt_loader_cmd.c Thu Feb 13 04:10:27 2014 (r261818) +++ head/sys/boot/fdt/fdt_loader_cmd.c Thu Feb 13 04:13:50 2014 (r261819) @@ -227,10 +227,15 @@ fdt_load_dtb(vm_offset_t va) static int fdt_load_dtb_addr(struct fdt_header *header) { + int err; - // TODO: Verify that there really is an FDT at - // the specified location. fdtp_size = fdt_totalsize(header); + err = fdt_check_header(&header); + if (err < 0) { + sprintf(command_errbuf, "error validating blob: %s", + fdt_strerror(err)); + return (err); + } free(fdtp); if ((fdtp = malloc(fdtp_size)) == NULL) { command_errmsg = "can't allocate memory for device tree copy"; From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 04:54:47 2014 Return-Path: Delivered-To: svn-src-all@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 A3C956C9; Thu, 13 Feb 2014 04:54: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 8B23B173A; Thu, 13 Feb 2014 04:54:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1D4slvN073925; Thu, 13 Feb 2014 04:54:47 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1D4sl44073924; Thu, 13 Feb 2014 04:54:47 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201402130454.s1D4sl44073924@svn.freebsd.org> From: Mark Johnston Date: Thu, 13 Feb 2014 04:54: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: r261820 - stable/10/usr.sbin/newsyslog X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 04:54:47 -0000 Author: markj Date: Thu Feb 13 04:54:47 2014 New Revision: 261820 URL: http://svnweb.freebsd.org/changeset/base/261820 Log: MFC r257600: Initialize the struct tm before handing it to strptime(3). Modified: stable/10/usr.sbin/newsyslog/newsyslog.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- stable/10/usr.sbin/newsyslog/newsyslog.c Thu Feb 13 04:13:50 2014 (r261819) +++ stable/10/usr.sbin/newsyslog/newsyslog.c Thu Feb 13 04:54:47 2014 (r261820) @@ -1491,6 +1491,7 @@ validate_old_timelog(int fd, const struc &dp->d_name[logfname_len]); return (0); } + memset(tm, 0, sizeof(*tm)); if ((s = strptime(&dp->d_name[logfname_len + 1], timefnamefmt, tm)) == NULL) { /* From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 04:55:19 2014 Return-Path: Delivered-To: svn-src-all@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 7B97F7FB; Thu, 13 Feb 2014 04:55: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 676B81743; Thu, 13 Feb 2014 04:55:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1D4tJZI074095; Thu, 13 Feb 2014 04:55:19 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1D4tJeR074094; Thu, 13 Feb 2014 04:55:19 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201402130455.s1D4tJeR074094@svn.freebsd.org> From: Mark Johnston Date: Thu, 13 Feb 2014 04:55:19 +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: r261821 - stable/9/usr.sbin/newsyslog X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 04:55:19 -0000 Author: markj Date: Thu Feb 13 04:55:18 2014 New Revision: 261821 URL: http://svnweb.freebsd.org/changeset/base/261821 Log: MFC r257600: Initialize the struct tm before handing it to strptime(3). Modified: stable/9/usr.sbin/newsyslog/newsyslog.c Directory Properties: stable/9/usr.sbin/newsyslog/ (props changed) Modified: stable/9/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- stable/9/usr.sbin/newsyslog/newsyslog.c Thu Feb 13 04:54:47 2014 (r261820) +++ stable/9/usr.sbin/newsyslog/newsyslog.c Thu Feb 13 04:55:18 2014 (r261821) @@ -1489,6 +1489,7 @@ validate_old_timelog(int fd, const struc &dp->d_name[logfname_len]); return (0); } + memset(tm, 0, sizeof(*tm)); if ((s = strptime(&dp->d_name[logfname_len + 1], timefnamefmt, tm)) == NULL) { /* From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 04:55:46 2014 Return-Path: Delivered-To: svn-src-all@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 9CCEE93C; Thu, 13 Feb 2014 04:55: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 874741749; Thu, 13 Feb 2014 04:55:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1D4tk8f074169; Thu, 13 Feb 2014 04:55:46 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1D4tkiD074168; Thu, 13 Feb 2014 04:55:46 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201402130455.s1D4tkiD074168@svn.freebsd.org> From: Mark Johnston Date: Thu, 13 Feb 2014 04:55:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r261822 - stable/8/usr.sbin/newsyslog X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 04:55:46 -0000 Author: markj Date: Thu Feb 13 04:55:46 2014 New Revision: 261822 URL: http://svnweb.freebsd.org/changeset/base/261822 Log: MFC r257600: Initialize the struct tm before handing it to strptime(3). Modified: stable/8/usr.sbin/newsyslog/newsyslog.c Directory Properties: stable/8/usr.sbin/newsyslog/ (props changed) Modified: stable/8/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- stable/8/usr.sbin/newsyslog/newsyslog.c Thu Feb 13 04:55:18 2014 (r261821) +++ stable/8/usr.sbin/newsyslog/newsyslog.c Thu Feb 13 04:55:46 2014 (r261822) @@ -1486,6 +1486,7 @@ validate_old_timelog(int fd, const struc &dp->d_name[logfname_len]); return (0); } + memset(tm, 0, sizeof(*tm)); if ((s = strptime(&dp->d_name[logfname_len + 1], timefnamefmt, tm)) == NULL) { /* From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 04:59:19 2014 Return-Path: Delivered-To: svn-src-all@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 82993A95; Thu, 13 Feb 2014 04:59: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 6D3D8175B; Thu, 13 Feb 2014 04:59:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1D4xJXo074582; Thu, 13 Feb 2014 04:59:19 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1D4xJvQ074579; Thu, 13 Feb 2014 04:59:19 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201402130459.s1D4xJvQ074579@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 13 Feb 2014 04:59:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261823 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 04:59:19 -0000 Author: glebius Date: Thu Feb 13 04:59:18 2014 New Revision: 261823 URL: http://svnweb.freebsd.org/changeset/base/261823 Log: o Axe non-pcpu flowtable implementation. It wasn't enabled or used, and probably is a leftover from first prototyping by Kip. The non-pcpu implementation used mutexes, so it doubtfully worked better than simple routing lookup. o Use UMA_ZONE_PCPU zone for pointers instead of [MAXCPU] arrays, use zpcpu_get() to access data in there. o Substitute own single list implementation with SLIST(). This has two functional side effects: - new flows go into head of a list, before they went to tail. - a bug when incorrect flow was deleted in flow cleaner is fixed. o Due to cache line alignment, there is no reason to keep different zones for IPv4 and IPv6 flows. Both consume one cache line, real size of allocation is equal. o Rely on that f_hash, f_rt, f_lle are stable during fle lifetime, remove useless volatile quilifiers. o More INET/INET6 splitting. Reviewed by: adrian Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/net/flowtable.c head/sys/net/flowtable.h Modified: head/sys/net/flowtable.c ============================================================================== --- head/sys/net/flowtable.c Thu Feb 13 04:55:46 2014 (r261822) +++ head/sys/net/flowtable.c Thu Feb 13 04:59:18 2014 (r261823) @@ -47,13 +47,16 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include #include #include #include #include +#include #include #include @@ -76,6 +79,7 @@ __FBSDID("$FreeBSD$"); #include +#ifdef INET struct ipv4_tuple { uint16_t ip_sport; /* source port */ uint16_t ip_dport; /* destination port */ @@ -87,7 +91,9 @@ union ipv4_flow { struct ipv4_tuple ipf_ipt; uint32_t ipf_key[3]; }; +#endif +#ifdef INET6 struct ipv6_tuple { uint16_t ip_sport; /* source port */ uint16_t ip_dport; /* destination port */ @@ -99,28 +105,44 @@ union ipv6_flow { struct ipv6_tuple ipf_ipt; uint32_t ipf_key[9]; }; +#endif struct flentry { - volatile uint32_t f_fhash; /* hash flowing forward */ + uint32_t f_fhash; /* hash flowing forward */ uint16_t f_flags; /* flow flags */ uint8_t f_pad; uint8_t f_proto; /* protocol */ uint32_t f_fibnum; /* fib index */ uint32_t f_uptime; /* uptime at last access */ - struct flentry *f_next; /* pointer to collision entry */ - volatile struct rtentry *f_rt; /* rtentry for flow */ - volatile struct llentry *f_lle; /* llentry for flow */ + SLIST_ENTRY(flentry) f_next; /* pointer to collision entry */ + struct rtentry *f_rt; /* rtentry for flow */ + struct llentry *f_lle; /* llentry for flow */ + union { +#ifdef INET + union ipv4_flow v4; +#endif +#ifdef INET6 + union ipv6_flow v6; +#endif + } f_flow; +#define f_flow4 f_flow.v4 +#define f_flow6 f_flow.v6 }; +#define KEYLEN(flags) ((((flags) & FL_IPV6) ? 9 : 3) * 4) -struct flentry_v4 { - struct flentry fl_entry; - union ipv4_flow fl_flow; -}; +/* Make sure f_flow begins with key. */ +#ifdef INET +CTASSERT(offsetof(struct flentry, f_flow) == + offsetof(struct flentry, f_flow4.ipf_key)); +#endif +#ifdef INET6 +CTASSERT(offsetof(struct flentry, f_flow) == + offsetof(struct flentry, f_flow6.ipf_key)); +#endif -struct flentry_v6 { - struct flentry fl_entry; - union ipv6_flow fl_flow; -}; +SLIST_HEAD(flist, flentry); +/* Make sure we can use pcpu_zone_ptr for struct flist. */ +CTASSERT(sizeof(struct flist) == sizeof(void *)); #define SECS_PER_HOUR 3600 #define SECS_PER_DAY (24*SECS_PER_HOUR) @@ -130,37 +152,28 @@ struct flentry_v6 { #define FIN_WAIT_IDLE 600 #define TCP_IDLE SECS_PER_DAY - -typedef void fl_lock_t(struct flowtable *, uint32_t); - -union flentryp { - struct flentry **global; - struct flentry **pcpu[MAXCPU]; -}; - struct flowtable { counter_u64_t *ft_stat; - uma_zone_t ft_zone; int ft_size; - int ft_lock_count; uint32_t ft_flags; uint32_t ft_max_depth; - fl_lock_t *ft_lock; - fl_lock_t *ft_unlock; + /* - * XXX need to pad out + * ft_table is a malloc(9)ed array of pointers. Pointers point to + * memory from UMA_ZONE_PCPU zone. + * ft_masks is per-cpu pointer itself. Each instance points + * to a malloc(9)ed bitset, that is private to corresponding CPU. */ - struct mtx *ft_locks; - union flentryp ft_table; - bitstr_t *ft_masks[MAXCPU]; + struct flist **ft_table; + bitstr_t **ft_masks; bitstr_t *ft_tmpmask; - uint32_t ft_udp_idle __aligned(CACHE_LINE_SIZE); + uint32_t ft_udp_idle; uint32_t ft_fin_wait_idle; uint32_t ft_syn_idle; uint32_t ft_tcp_idle; boolean_t ft_full; -} __aligned(CACHE_LINE_SIZE); +}; #define FLOWSTAT_ADD(ft, name, v) \ counter_u64_add((ft)->ft_stat[offsetof(struct flowtable_stat, name) / sizeof(uint64_t)], (v)) @@ -190,15 +203,15 @@ static uint32_t flowclean_freq; */ #ifdef INET static VNET_DEFINE(struct flowtable, ip4_ft); -#define V_ip4_ft VNET(ip4_ft) -static uma_zone_t flow_ipv4_zone; +#define V_ip4_ft VNET(ip4_ft) #endif #ifdef INET6 static VNET_DEFINE(struct flowtable, ip6_ft); #define V_ip6_ft VNET(ip6_ft) -static uma_zone_t flow_ipv6_zone; #endif +static uma_zone_t flow_zone; + static VNET_DEFINE(int, flowtable_enable) = 1; static VNET_DEFINE(int, flowtable_syn_expire) = SYN_IDLE; static VNET_DEFINE(int, flowtable_udp_expire) = UDP_IDLE; @@ -215,6 +228,8 @@ static SYSCTL_NODE(_net, OID_AUTO, flowt "flowtable"); SYSCTL_VNET_INT(_net_flowtable, OID_AUTO, enable, CTLFLAG_RW, &VNET_NAME(flowtable_enable), 0, "enable flowtable caching."); +SYSCTL_UMA_MAX(_net_flowtable, OID_AUTO, maxflows, CTLFLAG_RW, + &flow_zone, "Maximum number of flows allowed"); /* * XXX This does not end up updating timeouts at runtime @@ -233,43 +248,10 @@ SYSCTL_VNET_INT(_net_flowtable, OID_AUTO &VNET_NAME(flowtable_tcp_expire), 0, "seconds after which to remove flow allocated to a TCP connection."); -static void -flowtable_global_lock(struct flowtable *table, uint32_t hash) -{ - int lock_index = (hash)&(table->ft_lock_count - 1); - - mtx_lock(&table->ft_locks[lock_index]); -} - -static void -flowtable_global_unlock(struct flowtable *table, uint32_t hash) -{ - int lock_index = (hash)&(table->ft_lock_count - 1); - - mtx_unlock(&table->ft_locks[lock_index]); -} - -static void -flowtable_pcpu_lock(struct flowtable *table, uint32_t hash) -{ - - critical_enter(); -} - -static void -flowtable_pcpu_unlock(struct flowtable *table, uint32_t hash) -{ - - critical_exit(); -} - -#define FL_ENTRY_INDEX(table, hash)((hash) % (table)->ft_size) -#define FL_ENTRY(table, hash) *flowtable_entry((table), (hash)) -#define FL_ENTRY_LOCK(table, hash) (table)->ft_lock((table), (hash)) -#define FL_ENTRY_UNLOCK(table, hash) (table)->ft_unlock((table), (hash)) - #define FL_STALE (1<<8) +static MALLOC_DEFINE(M_FTABLE, "flowtable", "flowtable hashes and bitstrings"); + static struct flentry *flowtable_lookup_common(struct flowtable *, struct sockaddr_storage *, struct sockaddr_storage *, struct mbuf *, int); @@ -320,27 +302,6 @@ flags_to_proto(int flags) } #ifdef INET -#ifdef FLOWTABLE_DEBUG -static void -ipv4_flow_print_tuple(int flags, int proto, struct sockaddr_in *ssin, - struct sockaddr_in *dsin) -{ - char saddr[4*sizeof "123"], daddr[4*sizeof "123"]; - - if (flags & FL_HASH_ALL) { - inet_ntoa_r(ssin->sin_addr, saddr); - inet_ntoa_r(dsin->sin_addr, daddr); - printf("proto=%d %s:%d->%s:%d\n", - proto, saddr, ntohs(ssin->sin_port), daddr, - ntohs(dsin->sin_port)); - } else { - inet_ntoa_r(*(struct in_addr *) &dsin->sin_addr, daddr); - printf("proto=%d %s\n", proto, daddr); - } - -} -#endif - static int ipv4_mbuf_demarshal(struct mbuf *m, struct sockaddr_in *ssin, struct sockaddr_in *dsin, uint16_t *flags) @@ -456,10 +417,10 @@ flow_to_route(struct flentry *fle, struc sin = (struct sockaddr_in *)&ro->ro_dst; sin->sin_family = AF_INET; sin->sin_len = sizeof(*sin); - hashkey = ((struct flentry_v4 *)fle)->fl_flow.ipf_key; + hashkey = fle->f_flow4.ipf_key; sin->sin_addr.s_addr = hashkey[2]; - ro->ro_rt = __DEVOLATILE(struct rtentry *, fle->f_rt); - ro->ro_lle = __DEVOLATILE(struct llentry *, fle->f_lle); + ro->ro_rt = fle->f_rt; + ro->ro_lle = fle->f_lle; ro->ro_flags |= RT_NORTREF; } #endif /* INET */ @@ -661,10 +622,10 @@ flow_to_route_in6(struct flentry *fle, s sin6->sin6_family = AF_INET6; sin6->sin6_len = sizeof(*sin6); - hashkey = ((struct flentry_v6 *)fle)->fl_flow.ipf_key; + hashkey = fle->f_flow6.ipf_key; memcpy(&sin6->sin6_addr, &hashkey[5], sizeof (struct in6_addr)); - ro->ro_rt = __DEVOLATILE(struct rtentry *, fle->f_rt); - ro->ro_lle = __DEVOLATILE(struct llentry *, fle->f_lle); + ro->ro_rt = fle->f_rt; + ro->ro_lle = fle->f_lle; ro->ro_flags |= RT_NORTREF; } #endif /* INET6 */ @@ -672,31 +633,24 @@ flow_to_route_in6(struct flentry *fle, s static bitstr_t * flowtable_mask(struct flowtable *ft) { - bitstr_t *mask; - if (ft->ft_flags & FL_PCPU) - mask = ft->ft_masks[curcpu]; - else - mask = ft->ft_masks[0]; + /* + * flowtable_free_stale() calls w/o critical section, but + * with sched_bind(). Since pointer is stable throughout + * ft lifetime, it is safe, otherwise... + * + * CRITICAL_ASSERT(curthread); + */ - return (mask); + return (*(bitstr_t **)zpcpu_get(ft->ft_masks)); } -static struct flentry ** -flowtable_entry(struct flowtable *ft, uint32_t hash) +static struct flist * +flowtable_list(struct flowtable *ft, uint32_t hash) { - struct flentry **fle; - int index = (hash % ft->ft_size); - if (ft->ft_flags & FL_PCPU) { - KASSERT(&ft->ft_table.pcpu[curcpu][0] != NULL, ("pcpu not set")); - fle = &ft->ft_table.pcpu[curcpu][index]; - } else { - KASSERT(&ft->ft_table.global[0] != NULL, ("global not set")); - fle = &ft->ft_table.global[index]; - } - - return (fle); + CRITICAL_ASSERT(curthread); + return (zpcpu_get(ft->ft_table[hash % ft->ft_size])); } static int @@ -730,24 +684,6 @@ flow_stale(struct flowtable *ft, struct return (0); } -static void -flowtable_set_hashkey(struct flentry *fle, uint32_t *key) -{ - uint32_t *hashkey; - int i, nwords; - - if (fle->f_flags & FL_IPV6) { - nwords = 9; - hashkey = ((struct flentry_v4 *)fle)->fl_flow.ipf_key; - } else { - nwords = 3; - hashkey = ((struct flentry_v6 *)fle)->fl_flow.ipf_key; - } - - for (i = 0; i < nwords; i++) - hashkey[i] = key[i]; -} - static int flow_full(struct flowtable *ft) { @@ -755,8 +691,8 @@ flow_full(struct flowtable *ft) int count, max; full = ft->ft_full; - count = uma_zone_get_cur(ft->ft_zone); - max = uma_zone_get_max(ft->ft_zone); + count = uma_zone_get_cur(flow_zone); + max = uma_zone_get_max(flow_zone); if (full && (count < (max - (max >> 3)))) ft->ft_full = FALSE; @@ -783,26 +719,31 @@ static int flowtable_insert(struct flowtable *ft, uint32_t hash, uint32_t *key, uint32_t fibnum, struct route *ro, uint16_t flags) { - struct flentry *fle, *fletail, *newfle, **flep; + struct flist *flist; + struct flentry *fle, *iter; int depth; bitstr_t *mask; - uint8_t proto; - newfle = uma_zalloc(ft->ft_zone, M_NOWAIT | M_ZERO); - if (newfle == NULL) + fle = uma_zalloc(flow_zone, M_NOWAIT | M_ZERO); + if (fle == NULL) return (ENOMEM); - newfle->f_flags |= (flags & FL_IPV6); - proto = flags_to_proto(flags); + bcopy(key, &fle->f_flow, KEYLEN(flags)); + fle->f_flags |= (flags & FL_IPV6); + fle->f_proto = flags_to_proto(flags); + fle->f_rt = ro->ro_rt; + fle->f_lle = ro->ro_lle; + fle->f_fhash = hash; + fle->f_fibnum = fibnum; + fle->f_uptime = time_uptime; - FL_ENTRY_LOCK(ft, hash); + critical_enter(); mask = flowtable_mask(ft); - flep = flowtable_entry(ft, hash); - fletail = fle = *flep; + flist = flowtable_list(ft, hash); - if (fle == NULL) { - bit_set(mask, FL_ENTRY_INDEX(ft, hash)); - *flep = fle = newfle; + if (SLIST_EMPTY(flist)) { + bit_set(mask, (hash % ft->ft_size)); + SLIST_INSERT_HEAD(flist, fle, f_next); goto skip; } @@ -812,65 +753,30 @@ flowtable_insert(struct flowtable *ft, u * find end of list and make sure that we were not * preempted by another thread handling this flow */ - while (fle != NULL) { - if (fle->f_fhash == hash && !flow_stale(ft, fle)) { + SLIST_FOREACH(iter, flist, f_next) { + if (iter->f_fhash == hash && !flow_stale(ft, iter)) { /* * there was either a hash collision * or we lost a race to insert */ - FL_ENTRY_UNLOCK(ft, hash); - uma_zfree(ft->ft_zone, newfle); + critical_exit(); + uma_zfree(flow_zone, fle); return (EEXIST); } - /* - * re-visit this double condition XXX - */ - if (fletail->f_next != NULL) - fletail = fle->f_next; - depth++; - fle = fle->f_next; } if (depth > ft->ft_max_depth) ft->ft_max_depth = depth; - fletail->f_next = newfle; - fle = newfle; + + SLIST_INSERT_HEAD(flist, fle, f_next); skip: - flowtable_set_hashkey(fle, key); + critical_exit(); - fle->f_proto = proto; - fle->f_rt = ro->ro_rt; - fle->f_lle = ro->ro_lle; - fle->f_fhash = hash; - fle->f_fibnum = fibnum; - fle->f_uptime = time_uptime; - FL_ENTRY_UNLOCK(ft, hash); return (0); } -static int -flowtable_key_equal(struct flentry *fle, uint32_t *key) -{ - uint32_t *hashkey; - int i, nwords; - - if (fle->f_flags & FL_IPV6) { - nwords = 9; - hashkey = ((struct flentry_v4 *)fle)->fl_flow.ipf_key; - } else { - nwords = 3; - hashkey = ((struct flentry_v6 *)fle)->fl_flow.ipf_key; - } - - for (i = 0; i < nwords; i++) - if (hashkey[i] != key[i]) - return (0); - - return (1); -} - struct flentry * flowtable_lookup(sa_family_t sa, struct mbuf *m) { @@ -895,6 +801,7 @@ flowtable_lookup_common(struct flowtable { struct route_in6 sro6; struct route sro, *ro; + struct flist *flist; struct flentry *fle; struct rtentry *rt; struct llentry *lle; @@ -974,34 +881,24 @@ flowtable_lookup_common(struct flowtable return (NULL); FLOWSTAT_INC(ft, ft_lookups); - FL_ENTRY_LOCK(ft, hash); - if ((fle = FL_ENTRY(ft, hash)) == NULL) { - FL_ENTRY_UNLOCK(ft, hash); - goto uncached; - } -keycheck: - rt = __DEVOLATILE(struct rtentry *, fle->f_rt); - lle = __DEVOLATILE(struct llentry *, fle->f_lle); - if ((rt != NULL) - && lle != NULL - && fle->f_fhash == hash - && flowtable_key_equal(fle, key) - && (proto == fle->f_proto) - && (fibnum == fle->f_fibnum) - && (rt->rt_flags & RTF_UP) - && (rt->rt_ifp != NULL) - && (lle->la_flags & LLE_VALID)) { - FLOWSTAT_INC(ft, ft_hits); - fle->f_uptime = time_uptime; - fle->f_flags |= flags; - FL_ENTRY_UNLOCK(ft, hash); - goto success; - } else if (fle->f_next != NULL) { - fle = fle->f_next; - goto keycheck; - } - FL_ENTRY_UNLOCK(ft, hash); -uncached: + + critical_enter(); + flist = flowtable_list(ft, hash); + SLIST_FOREACH(fle, flist, f_next) + if (fle->f_fhash == hash && bcmp(&fle->f_flow, key, + KEYLEN(fle->f_flags)) == 0 && + proto == fle->f_proto && fibnum == fle->f_fibnum && + (fle->f_rt->rt_flags & RTF_UP) && + fle->f_rt->rt_ifp != NULL && + (fle->f_lle->la_flags & LLE_VALID)) { + fle->f_uptime = time_uptime; + fle->f_flags |= flags; + critical_exit(); + FLOWSTAT_INC(ft, ft_hits); + goto success; + } + critical_exit(); + if (flags & FL_NOAUTO || flow_full(ft)) return (NULL); @@ -1088,38 +985,22 @@ success: /* * used by the bit_alloc macro */ -#define calloc(count, size) malloc((count)*(size), M_DEVBUF, M_WAITOK|M_ZERO) - +#define calloc(count, size) malloc((count)*(size), M_FTABLE, M_WAITOK | M_ZERO) static void flowtable_alloc(struct flowtable *ft) { - if (ft->ft_flags & FL_PCPU) { - ft->ft_lock = flowtable_pcpu_lock; - ft->ft_unlock = flowtable_pcpu_unlock; - - for (int i = 0; i <= mp_maxid; i++) { - ft->ft_table.pcpu[i] = - malloc(ft->ft_size * sizeof(struct flentry *), - M_RTABLE, M_WAITOK | M_ZERO); - ft->ft_masks[i] = bit_alloc(ft->ft_size); - } - } else { - ft->ft_lock_count = 2*(powerof2(mp_maxid + 1) ? (mp_maxid + 1): - (fls(mp_maxid + 1) << 1)); - - ft->ft_lock = flowtable_global_lock; - ft->ft_unlock = flowtable_global_unlock; - ft->ft_table.global = - malloc(ft->ft_size * sizeof(struct flentry *), - M_RTABLE, M_WAITOK | M_ZERO); - ft->ft_locks = malloc(ft->ft_lock_count*sizeof(struct mtx), - M_RTABLE, M_WAITOK | M_ZERO); - for (int i = 0; i < ft->ft_lock_count; i++) - mtx_init(&ft->ft_locks[i], "flow", NULL, - MTX_DEF | MTX_DUPOK); + ft->ft_table = malloc(ft->ft_size * sizeof(struct flist), + M_FTABLE, M_WAITOK); + for (int i = 0; i < ft->ft_size; i++) + ft->ft_table[i] = uma_zalloc(pcpu_zone_ptr, M_WAITOK | M_ZERO); + + ft->ft_masks = uma_zalloc(pcpu_zone_ptr, M_WAITOK); + for (int i = 0; i < mp_ncpus; i++) { + bitstr_t **b; - ft->ft_masks[0] = bit_alloc(ft->ft_size); + b = zpcpu_get_cpu(ft->ft_masks, i); + *b = bit_alloc(ft->ft_size); } ft->ft_tmpmask = bit_alloc(ft->ft_size); @@ -1139,41 +1020,22 @@ flowtable_alloc(struct flowtable *ft) } } - -/* - * The rest of the code is devoted to garbage collection of expired entries. - * It is a new additon made necessary by the switch to dynamically allocating - * flow tables. - * - */ -static void -fle_free(struct flentry *fle, struct flowtable *ft) -{ - struct rtentry *rt; - struct llentry *lle; - - rt = __DEVOLATILE(struct rtentry *, fle->f_rt); - lle = __DEVOLATILE(struct llentry *, fle->f_lle); - if (rt != NULL) - RTFREE(rt); - if (lle != NULL) - LLE_FREE(lle); - uma_zfree(ft->ft_zone, fle); -} +#undef calloc static void flowtable_free_stale(struct flowtable *ft, struct rtentry *rt) { - int curbit = 0, tmpsize; - struct flentry *fle, **flehead, *fleprev; - struct flentry *flefreehead, *flefreetail, *fletmp; + struct flist *flist, freelist; + struct flentry *fle, *fle1, *fleprev; bitstr_t *mask, *tmpmask; + int curbit, tmpsize; - flefreehead = flefreetail = NULL; + SLIST_INIT(&freelist); mask = flowtable_mask(ft); tmpmask = ft->ft_tmpmask; tmpsize = ft->ft_size; memcpy(tmpmask, mask, ft->ft_size/8); + curbit = 0; /* * XXX Note to self, bit_ffs operates at the byte level * and thus adds gratuitous overhead @@ -1187,69 +1049,72 @@ flowtable_free_stale(struct flowtable *f break; } - FL_ENTRY_LOCK(ft, curbit); - flehead = flowtable_entry(ft, curbit); - fle = fleprev = *flehead; - FLOWSTAT_INC(ft, ft_free_checks); + + critical_enter(); + flist = flowtable_list(ft, curbit); #ifdef DIAGNOSTIC - if (fle == NULL && curbit > 0) { + if (SLIST_EMPTY(flist) && curbit > 0) { log(LOG_ALERT, "warning bit=%d set, but no fle found\n", curbit); } #endif - while (fle != NULL) { - if (rt != NULL) { - if (__DEVOLATILE(struct rtentry *, fle->f_rt) != rt) { - fleprev = fle; - fle = fle->f_next; - continue; - } - } else if (!flow_stale(ft, fle)) { + SLIST_FOREACH_SAFE(fle, flist, f_next, fle1) { + if (rt != NULL && fle->f_rt != rt) { fleprev = fle; - fle = fle->f_next; continue; } - /* - * delete head of the list - */ - if (fleprev == *flehead) { - fletmp = fleprev; - if (fle == fleprev) { - fleprev = *flehead = fle->f_next; - } else - fleprev = *flehead = fle; - fle = fle->f_next; - } else { - /* - * don't advance fleprev - */ - fletmp = fle; - fleprev->f_next = fle->f_next; - fle = fleprev->f_next; + if (!flow_stale(ft, fle)) { + fleprev = fle; + continue; } - if (flefreehead == NULL) - flefreehead = flefreetail = fletmp; - else { - flefreetail->f_next = fletmp; - flefreetail = fletmp; - } - fletmp->f_next = NULL; + if (fle == SLIST_FIRST(flist)) + SLIST_REMOVE_HEAD(flist, f_next); + else + SLIST_REMOVE_AFTER(fleprev, f_next); + SLIST_INSERT_HEAD(&freelist, fle, f_next); } - if (*flehead == NULL) + if (SLIST_EMPTY(flist)) bit_clear(mask, curbit); - FL_ENTRY_UNLOCK(ft, curbit); + critical_exit(); + bit_clear(tmpmask, curbit); tmpmask += (curbit / 8); tmpsize -= (curbit / 8) * 8; bit_ffs(tmpmask, tmpsize, &curbit); } - while ((fle = flefreehead) != NULL) { - flefreehead = fle->f_next; + + SLIST_FOREACH_SAFE(fle, &freelist, f_next, fle1) { FLOWSTAT_INC(ft, ft_frees); - fle_free(fle, ft); + if (fle->f_rt != NULL) + RTFREE(fle->f_rt); + if (fle->f_lle != NULL) + LLE_FREE(fle->f_lle); + uma_zfree(flow_zone, fle); + } +} + +static void +flowtable_clean_vnet(struct flowtable *ft, struct rtentry *rt) +{ + int i; + + CPU_FOREACH(i) { + if (smp_started == 1) { + thread_lock(curthread); + sched_bind(curthread, i); + thread_unlock(curthread); + } + + flowtable_free_stale(ft, rt); + + if (smp_started == 1) { + thread_lock(curthread); + sched_unbind(curthread); + thread_unlock(curthread); + } } } @@ -1257,7 +1122,6 @@ void flowtable_route_flush(sa_family_t sa, struct rtentry *rt) { struct flowtable *ft; - int i; switch (sa) { #ifdef INET @@ -1274,51 +1138,7 @@ flowtable_route_flush(sa_family_t sa, st panic("%s: sa %d", __func__, sa); } - if (ft->ft_flags & FL_PCPU) { - CPU_FOREACH(i) { - if (smp_started == 1) { - thread_lock(curthread); - sched_bind(curthread, i); - thread_unlock(curthread); - } - - flowtable_free_stale(ft, rt); - - if (smp_started == 1) { - thread_lock(curthread); - sched_unbind(curthread); - thread_unlock(curthread); - } - } - } else { - flowtable_free_stale(ft, rt); - } -} - -static void -flowtable_clean_vnet(struct flowtable *ft) -{ - - if (ft->ft_flags & FL_PCPU) { - int i; - - CPU_FOREACH(i) { - if (smp_started == 1) { - thread_lock(curthread); - sched_bind(curthread, i); - thread_unlock(curthread); - } - - flowtable_free_stale(ft, NULL); - - if (smp_started == 1) { - thread_lock(curthread); - sched_unbind(curthread); - thread_unlock(curthread); - } - } - } else - flowtable_free_stale(ft, NULL); + flowtable_clean_vnet(ft, rt); } static void @@ -1335,10 +1155,10 @@ flowtable_cleaner(void) VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); #ifdef INET - flowtable_clean_vnet(&V_ip4_ft); + flowtable_clean_vnet(&V_ip4_ft, NULL); #endif #ifdef INET6 - flowtable_clean_vnet(&V_ip6_ft); + flowtable_clean_vnet(&V_ip6_ft, NULL); #endif CURVNET_RESTORE(); } @@ -1408,16 +1228,9 @@ flowtable_init(const void *unused __unus flow_hashjitter = arc4random(); -#ifdef INET - flow_ipv4_zone = uma_zcreate("ip4flow", sizeof(struct flentry_v4), + flow_zone = uma_zcreate("flows", sizeof(struct flentry), NULL, NULL, NULL, NULL, UMA_ALIGN_CACHE, UMA_ZONE_MAXBUCKET); - uma_zone_set_max(flow_ipv4_zone, 1024 + maxusers * 64 * mp_ncpus); -#endif -#ifdef INET6 - flow_ipv6_zone = uma_zcreate("ip6flow", sizeof(struct flentry_v6), - NULL, NULL, NULL, NULL, UMA_ALIGN_CACHE, UMA_ZONE_MAXBUCKET); - uma_zone_set_max(flow_ipv6_zone, 1024 + maxusers * 64 * mp_ncpus); -#endif + uma_zone_set_max(flow_zone, 1024 + maxusers * 64 * mp_ncpus); cv_init(&flowclean_c_cv, "c_flowcleanwait"); cv_init(&flowclean_f_cv, "f_flowcleanwait"); @@ -1432,8 +1245,6 @@ SYSINIT(flowtable_init, SI_SUB_PROTO_BEG #ifdef INET static SYSCTL_NODE(_net_flowtable, OID_AUTO, ip4, CTLFLAG_RD, NULL, "Flowtable for IPv4"); -SYSCTL_UMA_MAX(_net_flowtable_ip4, OID_AUTO, maxflows, CTLFLAG_RW, - &flow_ipv4_zone, "Maximum number of IPv4 flows allowed"); static VNET_PCPUSTAT_DEFINE(struct flowtable_stat, ip4_ftstat); VNET_PCPUSTAT_SYSINIT(ip4_ftstat); @@ -1446,9 +1257,7 @@ static void flowtable_init_vnet_v4(const void *unused __unused) { - V_ip4_ft.ft_zone = flow_ipv4_zone; V_ip4_ft.ft_size = flowtable_get_size("net.flowtable.ip4.size"); - V_ip4_ft.ft_flags = FL_PCPU; V_ip4_ft.ft_stat = VNET(ip4_ftstat); flowtable_alloc(&V_ip4_ft); } @@ -1459,8 +1268,6 @@ VNET_SYSINIT(ft_vnet_v4, SI_SUB_PROTO_IF #ifdef INET6 static SYSCTL_NODE(_net_flowtable, OID_AUTO, ip6, CTLFLAG_RD, NULL, "Flowtable for IPv6"); -SYSCTL_UMA_MAX(_net_flowtable_ip6, OID_AUTO, maxflows, CTLFLAG_RW, - &flow_ipv6_zone, "Maximum number of IPv6 flows allowed"); static VNET_PCPUSTAT_DEFINE(struct flowtable_stat, ip6_ftstat); VNET_PCPUSTAT_SYSINIT(ip6_ftstat); @@ -1473,9 +1280,7 @@ static void flowtable_init_vnet_v6(const void *unused __unused) { - V_ip6_ft.ft_zone = flow_ipv6_zone; V_ip6_ft.ft_size = flowtable_get_size("net.flowtable.ip6.size"); - V_ip6_ft.ft_flags = FL_PCPU; V_ip6_ft.ft_stat = VNET(ip6_ftstat); flowtable_alloc(&V_ip6_ft); } @@ -1484,45 +1289,18 @@ VNET_SYSINIT(flowtable_init_vnet_v6, SI_ #endif /* INET6 */ #ifdef DDB -static uint32_t * -flowtable_get_hashkey(struct flentry *fle) -{ - uint32_t *hashkey; - - if (fle->f_flags & FL_IPV6) - hashkey = ((struct flentry_v4 *)fle)->fl_flow.ipf_key; - else - hashkey = ((struct flentry_v6 *)fle)->fl_flow.ipf_key; - - return (hashkey); -} - static bitstr_t * flowtable_mask_pcpu(struct flowtable *ft, int cpuid) { - bitstr_t *mask; - if (ft->ft_flags & FL_PCPU) - mask = ft->ft_masks[cpuid]; - else - mask = ft->ft_masks[0]; - - return (mask); + return (zpcpu_get_cpu(*ft->ft_masks, cpuid)); } -static struct flentry ** -flowtable_entry_pcpu(struct flowtable *ft, uint32_t hash, int cpuid) +static struct flist * +flowtable_list_pcpu(struct flowtable *ft, uint32_t hash, int cpuid) { - struct flentry **fle; - int index = (hash % ft->ft_size); - - if (ft->ft_flags & FL_PCPU) { - fle = &ft->ft_table.pcpu[cpuid][index]; - } else { - fle = &ft->ft_table.global[index]; - } - return (fle); + return (zpcpu_get_cpu(&ft->ft_table[hash % ft->ft_size], cpuid)); } static void @@ -1542,7 +1320,7 @@ flow_show(struct flowtable *ft, struct f if (rt_valid) ifp = rt->rt_ifp; ifp_valid = ifp != NULL; - hashkey = flowtable_get_hashkey(fle); + hashkey = (uint32_t *)&fle->f_flow; if (fle->f_flags & FL_IPV6) goto skipaddr; @@ -1594,7 +1372,6 @@ static void flowtable_show(struct flowtable *ft, int cpuid) { int curbit = 0; - struct flentry *fle, **flehead; bitstr_t *mask, *tmpmask; if (cpuid != -1) @@ -1608,20 +1385,19 @@ flowtable_show(struct flowtable *ft, int */ bit_ffs(tmpmask, ft->ft_size, &curbit); while (curbit != -1) { + struct flist *flist; + struct flentry *fle; + if (curbit >= ft->ft_size || curbit < -1) { db_printf("warning: bad curbit value %d \n", curbit); break; } - flehead = flowtable_entry_pcpu(ft, curbit, cpuid); - fle = *flehead; + flist = flowtable_list_pcpu(ft, curbit, cpuid); - while (fle != NULL) { + SLIST_FOREACH(fle, flist, f_next) flow_show(ft, fle); - fle = fle->f_next; - continue; - } bit_clear(tmpmask, curbit); bit_ffs(tmpmask, ft->ft_size, &curbit); } @@ -1631,14 +1407,10 @@ static void flowtable_show_vnet(struct flowtable *ft) { - if (ft->ft_flags & FL_PCPU) { - int i; + int i; - CPU_FOREACH(i) { - flowtable_show(ft, i); - } - } else - flowtable_show(ft, -1); + CPU_FOREACH(i) + flowtable_show(ft, i); } DB_SHOW_COMMAND(flowtables, db_show_flowtables) Modified: head/sys/net/flowtable.h ============================================================================== --- head/sys/net/flowtable.h Thu Feb 13 04:55:46 2014 (r261822) +++ head/sys/net/flowtable.h Thu Feb 13 04:59:18 2014 (r261823) @@ -44,7 +44,6 @@ struct flowtable_stat { #ifdef _KERNEL #define FL_HASH_ALL (1<<0) /* hash 4-tuple + protocol */ -#define FL_PCPU (1<<1) /* pcpu cache */ #define FL_NOAUTO (1<<2) /* don't automatically add flentry on miss */ #define FL_IPV6 (1<<9) From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 05:13:23 2014 Return-Path: Delivered-To: svn-src-all@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 36D39D7D; Thu, 13 Feb 2014 05:13: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 227D41881; Thu, 13 Feb 2014 05:13:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1D5DNMu082094; Thu, 13 Feb 2014 05:13:23 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1D5DMtU082093; Thu, 13 Feb 2014 05:13:22 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201402130513.s1D5DMtU082093@svn.freebsd.org> From: Eitan Adler Date: Thu, 13 Feb 2014 05:13:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261824 - head/lib/libutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 05:13:23 -0000 Author: eadler Date: Thu Feb 13 05:13:22 2014 New Revision: 261824 URL: http://svnweb.freebsd.org/changeset/base/261824 Log: libutil/pw_util.3: Fix two prototypes. Reported by: marino Obtained from: DragonFlyBSD (e82b5d3dfa969bfcda5ffadceccc682b6bdcd077) MFC After: 3 days Modified: head/lib/libutil/pw_util.3 Modified: head/lib/libutil/pw_util.3 ============================================================================== --- head/lib/libutil/pw_util.3 Thu Feb 13 04:59:18 2014 (r261823) +++ head/lib/libutil/pw_util.3 Thu Feb 13 05:13:22 2014 (r261824) @@ -48,13 +48,13 @@ .In pwd.h .In libutil.h .Ft int -.Fn pw_copy "int ffd" "int tfd" "const struct passwd *pw" "const struct passwd *oldpw" +.Fn pw_copy "int ffd" "int tfd" "const struct passwd *pw" "struct passwd *oldpw" .Ft "struct passwd *" .Fn pw_dup "const struct passwd *pw" .Ft int .Fn pw_edit "int nosetuid" .Ft int -.Fn pw_equal "const struct passwd *pw1" "const struct passwd pw2" +.Fn pw_equal "const struct passwd *pw1" "const struct passwd *pw2" .Ft void .Fn pw_fini "void" .Ft int From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 05:19:10 2014 Return-Path: Delivered-To: svn-src-all@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 C7541E4; Thu, 13 Feb 2014 05:19: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 A841218AF; Thu, 13 Feb 2014 05:19:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1D5JAqE082745; Thu, 13 Feb 2014 05:19:10 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1D5JAmn082743; Thu, 13 Feb 2014 05:19:10 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201402130519.s1D5JAmn082743@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 13 Feb 2014 05:19:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261825 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 05:19:10 -0000 Author: glebius Date: Thu Feb 13 05:19:09 2014 New Revision: 261825 URL: http://svnweb.freebsd.org/changeset/base/261825 Log: Remove unused FL_NOAUTO. Modified: head/sys/net/flowtable.c head/sys/net/flowtable.h Modified: head/sys/net/flowtable.c ============================================================================== --- head/sys/net/flowtable.c Thu Feb 13 05:13:22 2014 (r261824) +++ head/sys/net/flowtable.c Thu Feb 13 05:19:09 2014 (r261825) @@ -899,7 +899,7 @@ flowtable_lookup_common(struct flowtable } critical_exit(); - if (flags & FL_NOAUTO || flow_full(ft)) + if (flow_full(ft)) return (NULL); FLOWSTAT_INC(ft, ft_misses); Modified: head/sys/net/flowtable.h ============================================================================== --- head/sys/net/flowtable.h Thu Feb 13 05:13:22 2014 (r261824) +++ head/sys/net/flowtable.h Thu Feb 13 05:19:09 2014 (r261825) @@ -44,7 +44,6 @@ struct flowtable_stat { #ifdef _KERNEL #define FL_HASH_ALL (1<<0) /* hash 4-tuple + protocol */ -#define FL_NOAUTO (1<<2) /* don't automatically add flentry on miss */ #define FL_IPV6 (1<<9) #define FL_TCP (1<<11) From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 06:38:02 2014 Return-Path: Delivered-To: svn-src-all@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 9294DE84; Thu, 13 Feb 2014 06:38: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 7253E1FBA; Thu, 13 Feb 2014 06:38:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1D6c23c013520; Thu, 13 Feb 2014 06:38:02 GMT (envelope-from br@svn.freebsd.org) Received: (from br@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1D6c2cI013518; Thu, 13 Feb 2014 06:38:02 GMT (envelope-from br@svn.freebsd.org) Message-Id: <201402130638.s1D6c2cI013518@svn.freebsd.org> From: Ruslan Bukin Date: Thu, 13 Feb 2014 06:38:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261826 - head/sys/arm/freescale/vybrid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 06:38:02 -0000 Author: br Date: Thu Feb 13 06:38:01 2014 New Revision: 261826 URL: http://svnweb.freebsd.org/changeset/base/261826 Log: Add function for configuring PLL4 (Audio) clock frequency output. Modified: head/sys/arm/freescale/vybrid/vf_anadig.c head/sys/arm/freescale/vybrid/vf_common.h Modified: head/sys/arm/freescale/vybrid/vf_anadig.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_anadig.c Thu Feb 13 05:19:09 2014 (r261825) +++ head/sys/arm/freescale/vybrid/vf_anadig.c Thu Feb 13 06:38:01 2014 (r261826) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ruslan Bukin + * Copyright (c) 2013-2014 Ruslan Bukin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -99,14 +99,19 @@ __FBSDID("$FreeBSD$"); #define CTRL_PLL_EN (1 << 13) #define EN_USB_CLKS (1 << 6) +#define PLL4_CTRL_DIV_SEL_S 0 +#define PLL4_CTRL_DIV_SEL_M 0x7f + struct anadig_softc { struct resource *res[1]; bus_space_tag_t bst; bus_space_handle_t bsh; }; +struct anadig_softc *anadig_sc; + static struct resource_spec anadig_spec[] = { - { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_MEMORY, 0, RF_ACTIVE }, { -1, 0 } }; @@ -148,6 +153,28 @@ enable_pll(struct anadig_softc *sc, int return (0); } +uint32_t +pll4_configure_output(uint32_t mfi, uint32_t mfn, uint32_t mfd) +{ + struct anadig_softc *sc; + int reg; + + sc = anadig_sc; + + /* + * PLLout = Fsys * (MFI+(MFN/MFD)) + */ + + reg = READ4(sc, ANADIG_PLL4_CTRL); + reg &= ~(PLL4_CTRL_DIV_SEL_M << PLL4_CTRL_DIV_SEL_S); + reg |= (mfi << PLL4_CTRL_DIV_SEL_S); + WRITE4(sc, ANADIG_PLL4_CTRL, reg); + WRITE4(sc, ANADIG_PLL4_NUM, mfn); + WRITE4(sc, ANADIG_PLL4_DENOM, mfd); + + return (0); +} + static int anadig_attach(device_t dev) { @@ -165,11 +192,13 @@ anadig_attach(device_t dev) sc->bst = rman_get_bustag(sc->res[0]); sc->bsh = rman_get_bushandle(sc->res[0]); + anadig_sc = sc; + /* Enable USB PLLs */ enable_pll(sc, ANADIG_PLL3_CTRL); enable_pll(sc, ANADIG_PLL7_CTRL); - /* Enable other */ + /* Enable other PLLs */ enable_pll(sc, ANADIG_PLL1_CTRL); enable_pll(sc, ANADIG_PLL2_CTRL); enable_pll(sc, ANADIG_PLL4_CTRL); Modified: head/sys/arm/freescale/vybrid/vf_common.h ============================================================================== --- head/sys/arm/freescale/vybrid/vf_common.h Thu Feb 13 05:19:09 2014 (r261825) +++ head/sys/arm/freescale/vybrid/vf_common.h Thu Feb 13 06:38:01 2014 (r261826) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ruslan Bukin + * Copyright (c) 2013-2014 Ruslan Bukin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,4 +39,5 @@ #define WRITE1(_sc, _reg, _val) \ bus_space_write_1(_sc->bst, _sc->bsh, _reg, _val) +uint32_t pll4_configure_output(uint32_t mfi, uint32_t mfn, uint32_t mfd); uint32_t tcon_bypass(void); From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 09:09:15 2014 Return-Path: Delivered-To: svn-src-all@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 8C0269E9; Thu, 13 Feb 2014 09:09: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 5CA121B0E; Thu, 13 Feb 2014 09:09:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1D99FBt071712; Thu, 13 Feb 2014 09:09:15 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1D99FxV071711; Thu, 13 Feb 2014 09:09:15 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402130909.s1D99FxV071711@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 13 Feb 2014 09:09:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261827 - head/sys/dev/usb/input X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 09:09:15 -0000 Author: hselasky Date: Thu Feb 13 09:09:14 2014 New Revision: 261827 URL: http://svnweb.freebsd.org/changeset/base/261827 Log: - Remove not needed definitions from driver. - Get USB input report length from HID descriptor. - Use 1 finger TAP for devices which has no integrated button. - Move data buffer to softc instead of allocating it. MFC after: 1 week Modified: head/sys/dev/usb/input/wsp.c Modified: head/sys/dev/usb/input/wsp.c ============================================================================== --- head/sys/dev/usb/input/wsp.c Thu Feb 13 06:38:01 2014 (r261826) +++ head/sys/dev/usb/input/wsp.c Thu Feb 13 09:09:14 2014 (r261827) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #define WSP_DRIVER_NAME "wsp" +#define WSP_BUFFER_MAX 1024 #define WSP_CLAMP(x,low,high) do { \ if ((x) < (low)) \ @@ -124,12 +125,12 @@ SYSCTL_INT(_hw_usb_wsp, OID_AUTO, scr_ho #define WSP_IFACE_INDEX 1 /* - * Some tables, structures, definitions and initialisation values for - * the touchpad protocol has been copied from Linux's + * Some tables, structures, definitions and constant values for the + * touchpad protocol has been copied from Linux's * "drivers/input/mouse/bcm5974.c" which has the following copyright * holders under GPLv2. All device specific code in this driver has * been written from scratch. The decoding algorithm is based on - * output from usbdump. + * output from FreeBSD's usbdump. * * Copyright (C) 2008 Henrik Rydberg (rydberg@euromail.se) * Copyright (C) 2008 Scott Shawcroft (scott.shawcroft@gmail.com) @@ -205,20 +206,10 @@ struct tp_finger { #define MAX_FINGERS 16 #define SIZEOF_FINGER sizeof(struct tp_finger) #define SIZEOF_ALL_FINGERS (MAX_FINGERS * SIZEOF_FINGER) -#define MAX_FINGER_ORIENTATION 16384 -/* logical signal quality */ -#define SN_PRESSURE 45 /* pressure signal-to-noise ratio */ -#define SN_WIDTH 25 /* width signal-to-noise ratio */ -#define SN_COORD 250 /* coordinate signal-to-noise ratio */ -#define SN_ORIENT 10 /* orientation signal-to-noise ratio */ - -/* device-specific parameters */ -struct wsp_param { - int snratio; /* signal-to-noise ratio */ - int min; /* device minimum reading */ - int max; /* device maximum reading */ -}; +#if (WSP_BUFFER_MAX < ((MAX_FINGERS * 14 * 2) + FINGER_TYPE3)) +#error "WSP_BUFFER_MAX is too small" +#endif enum { WSP_FLAG_WELLSPRING1, @@ -239,282 +230,70 @@ enum { /* device-specific configuration */ struct wsp_dev_params { uint8_t caps; /* device capability bitmask */ - uint16_t bt_datalen; /* data length of the button interface */ uint8_t tp_type; /* type of trackpad interface */ uint8_t tp_offset; /* offset to trackpad finger data */ - uint16_t tp_datalen; /* data length of the trackpad - * interface */ - struct wsp_param p; /* finger pressure limits */ - struct wsp_param w; /* finger width limits */ - struct wsp_param x; /* horizontal limits */ - struct wsp_param y; /* vertical limits */ - struct wsp_param o; /* orientation limits */ }; static const struct wsp_dev_params wsp_dev_params[WSP_FLAG_MAX] = { [WSP_FLAG_WELLSPRING1] = { .caps = 0, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE1, .tp_offset = FINGER_TYPE1, - .tp_datalen = FINGER_TYPE1 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 256 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4824, 5342 - }, - .y = { - SN_COORD, -172, 5820 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING2] = { .caps = 0, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE1, .tp_offset = FINGER_TYPE1, - .tp_datalen = FINGER_TYPE1 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 256 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4824, 4824 - }, - .y = { - SN_COORD, -172, 4290 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING3] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4460, 5166 - }, - .y = { - SN_COORD, -75, 6700 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING4] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4620, 5140 - }, - .y = { - SN_COORD, -150, 6600 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING4A] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4616, 5112 - }, - .y = { - SN_COORD, -142, 5234 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING5] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4415, 5050 - }, - .y = { - SN_COORD, -55, 6680 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING6] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4620, 5140 - }, - .y = { - SN_COORD, -150, 6600 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING5A] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4750, 5280 - }, - .y = { - SN_COORD, -150, 6730 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING6A] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4620, 5140 - }, - .y = { - SN_COORD, -150, 6600 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING7] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4750, 5280 - }, - .y = { - SN_COORD, -150, 6730 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING7A] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE2, .tp_offset = FINGER_TYPE2, - .tp_datalen = FINGER_TYPE2 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4750, 5280 - }, - .y = { - SN_COORD, -150, 6730 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, [WSP_FLAG_WELLSPRING8] = { .caps = HAS_INTEGRATED_BUTTON, - .bt_datalen = sizeof(struct bt_data), .tp_type = TYPE3, .tp_offset = FINGER_TYPE3, - .tp_datalen = FINGER_TYPE3 + SIZEOF_ALL_FINGERS, - .p = { - SN_PRESSURE, 0, 300 - }, - .w = { - SN_WIDTH, 0, 2048 - }, - .x = { - SN_COORD, -4620, 5140 - }, - .y = { - SN_COORD, -150, 6600 - }, - .o = { - SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION - }, }, }; @@ -606,8 +385,6 @@ struct wsp_softc { u_int sc_state; #define WSP_ENABLED 0x01 - struct bt_data *bt_data; /* button transferred data */ - uint8_t *tp_data; /* trackpad transferred data */ struct tp_finger *index[MAX_FINGERS]; /* finger index data */ int16_t pos_x[MAX_FINGERS]; /* position array */ int16_t pos_y[MAX_FINGERS]; /* position array */ @@ -624,7 +401,7 @@ struct wsp_softc { int dz_count; #define WSP_DZ_MAX_COUNT 32 int dt_sum; /* T-axis cumulative movement */ - + int tp_datalen; uint8_t o_ntouch; /* old touch finger status */ uint8_t finger; /* 0 or 1 *, check which finger moving */ uint16_t intr_count; @@ -638,6 +415,7 @@ struct wsp_softc { #define WSP_SCR_NONE 0 #define WSP_SCR_VER 1 #define WSP_SCR_HOR 2 + uint8_t tp_data[WSP_BUFFER_MAX] __aligned(4); /* trackpad transferred data */ }; typedef enum interface_mode { @@ -677,7 +455,7 @@ static device_attach_t wsp_attach; static device_detach_t wsp_detach; static usb_callback_t wsp_intr_callback; -static struct usb_config wsp_config[WSP_N_TRANSFER] = { +static const struct usb_config wsp_config[WSP_N_TRANSFER] = { [WSP_INTR_DT] = { .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, @@ -686,7 +464,7 @@ static struct usb_config wsp_config[WSP_ .pipe_bof = 0, .short_xfer_ok = 1, }, - .bufsize = 0, /* use wMaxPacketSize */ + .bufsize = WSP_BUFFER_MAX, .callback = &wsp_intr_callback, }, }; @@ -724,19 +502,6 @@ wsp_set_device_mode(struct wsp_softc *sc static int wsp_enable(struct wsp_softc *sc) { - const struct wsp_dev_params *params = sc->sc_params; - - if (params == NULL || params->tp_datalen == 0) { - DPRINTF("params uninitialized!\n"); - return (ENXIO); - } - /* Allocate the dynamic buffers */ - sc->tp_data = malloc(params->tp_datalen, M_USB, M_WAITOK | M_ZERO); - if (sc->tp_data == NULL) { - DPRINTF("Cannot allocate memory\n"); - return (ENXIO); - } - /* reset status */ memset(&sc->sc_status, 0, sizeof(sc->sc_status)); sc->sc_state |= WSP_ENABLED; @@ -748,9 +513,6 @@ wsp_enable(struct wsp_softc *sc) static void wsp_disable(struct wsp_softc *sc) { - free(sc->tp_data, M_USB); - sc->tp_data = NULL; - sc->sc_state &= ~WSP_ENABLED; DPRINTFN(WSP_LLEVEL_INFO, "disabled wsp\n"); } @@ -779,9 +541,29 @@ wsp_attach(device_t dev) struct wsp_softc *sc = device_get_softc(dev); struct usb_attach_arg *uaa = device_get_ivars(dev); usb_error_t err; + void *d_ptr = NULL; + uint16_t d_len; DPRINTFN(WSP_LLEVEL_INFO, "sc=%p\n", sc); + /* Get HID descriptor */ + err = usbd_req_get_hid_desc(uaa->device, NULL, &d_ptr, + &d_len, M_TEMP, uaa->info.bIfaceIndex); + + if (err == USB_ERR_NORMAL_COMPLETION) { + /* Get HID report descriptor length */ + sc->tp_datalen = hid_report_size(d_ptr, d_len, hid_input, NULL); + free(d_ptr, M_TEMP); + + if (sc->tp_datalen <= 0 || sc->tp_datalen > WSP_BUFFER_MAX) { + DPRINTF("Invalid datalength or too big " + "datalength: %d\n", sc->tp_datalen); + return (ENXIO); + } + } else { + return (ENXIO); + } + sc->sc_usb_device = uaa->device; /* @@ -816,13 +598,9 @@ wsp_attach(device_t dev) /* get device specific configuration */ sc->sc_params = wsp_dev_params + USB_GET_DRIVER_INFO(uaa); - /* set to 0 to use wMaxPacketSize is not enough */ - wsp_config[0].bufsize = sc->sc_params->tp_datalen; - err = usbd_transfer_setup(uaa->device, &uaa->info.bIfaceIndex, sc->sc_xfer, wsp_config, WSP_N_TRANSFER, sc, &sc->sc_mutex); - if (err) { DPRINTF("error=%s\n", usbd_errstr(err)); goto detach; @@ -903,19 +681,16 @@ wsp_intr_callback(struct usb_xfer *xfer, switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - if (len > (int)params->tp_datalen) { - DPRINTFN(WSP_LLEVEL_ERROR, - "truncating large packet from %u to %u bytes\n", - len, params->tp_datalen); - len = params->tp_datalen; - } else { - /* make sure we don't process old data */ - memset(sc->tp_data + len, 0, params->tp_datalen - len); - } + /* copy out received data */ pc = usbd_xfer_get_frame(xfer, 0); usbd_copy_out(pc, 0, sc->tp_data, len); + if (len < sc->tp_datalen) { + /* make sure we don't process old data */ + memset(sc->tp_data + len, 0, sc->tp_datalen - len); + } + h = (struct tp_header *)(sc->tp_data); if (params->tp_type == TYPE2) { @@ -956,7 +731,7 @@ wsp_intr_callback(struct usb_xfer *xfer, f[i].touch_major, f[i].touch_minor, f[i].multi); sc->pos_x[i] = f[i].abs_x; - sc->pos_y[i] = params->y.min + params->y.max - f[i].abs_y; + sc->pos_y[i] = -f[i].abs_y; sc->index[i] = &f[i]; } @@ -1009,12 +784,12 @@ wsp_intr_callback(struct usb_xfer *xfer, * button-up). */ switch (sc->ntaps) { -#if 0 case 1: - wsp_add_to_queue(sc, 0, 0, 0, MOUSE_BUTTON1DOWN); - DPRINTFN(WSP_LLEVEL_INFO, "LEFT CLICK!\n"); + if (!(params->caps & HAS_INTEGRATED_BUTTON)) { + wsp_add_to_queue(sc, 0, 0, 0, MOUSE_BUTTON1DOWN); + DPRINTFN(WSP_LLEVEL_INFO, "LEFT CLICK!\n"); + } break; -#endif case 2: if (sc->distance < MAX_DISTANCE) wsp_add_to_queue(sc, 0, 0, 0, MOUSE_BUTTON3DOWN); @@ -1180,7 +955,7 @@ tr_setup: if (usb_fifo_put_bytes_max( sc->sc_fifo.fp[USB_FIFO_RX]) != 0) { usbd_xfer_set_frame_len(xfer, 0, - sc->sc_params->tp_datalen); + sc->tp_datalen); usbd_transfer_submit(xfer); } break; @@ -1193,8 +968,6 @@ tr_setup: } break; } - - return; } static void From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 09:24:48 2014 Return-Path: Delivered-To: svn-src-all@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 7B48D215; Thu, 13 Feb 2014 09:24: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 DB8FB1CBD; Thu, 13 Feb 2014 09:24:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1D9OlFw079065; Thu, 13 Feb 2014 09:24:47 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1D9Olqf079060; Thu, 13 Feb 2014 09:24:47 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402130924.s1D9Olqf079060@svn.freebsd.org> From: Christian Brueffer Date: Thu, 13 Feb 2014 09:24: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: r261828 - in stable/10: sbin/dhclient tools/regression/security/cap_test X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 09:24:48 -0000 Author: brueffer Date: Thu Feb 13 09:24:46 2014 New Revision: 261828 URL: http://svnweb.freebsd.org/changeset/base/261828 Log: MFC: r261566 Use CAP_EVENT instead of the deprecated CAP_POLL_EVENT. PR: 185382 (based on) Submitted by: Loganaden Velvindron Reviewed by: pjd Modified: stable/10/sbin/dhclient/bpf.c stable/10/sbin/dhclient/dhclient.c stable/10/tools/regression/security/cap_test/cap_test_capabilities.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/dhclient/bpf.c ============================================================================== --- stable/10/sbin/dhclient/bpf.c Thu Feb 13 09:09:14 2014 (r261827) +++ stable/10/sbin/dhclient/bpf.c Thu Feb 13 09:24:46 2014 (r261828) @@ -269,7 +269,7 @@ if_register_receive(struct interface_inf if (ioctl(info->rfdesc, BIOCLOCK, NULL) < 0) error("Cannot lock bpf"); - cap_rights_init(&rights, CAP_IOCTL, CAP_POLL_EVENT, CAP_READ); + cap_rights_init(&rights, CAP_IOCTL, CAP_EVENT, CAP_READ); if (cap_rights_limit(info->rfdesc, &rights) < 0 && errno != ENOSYS) error("Can't limit bpf descriptor: %m"); if (cap_ioctls_limit(info->rfdesc, cmds, 2) < 0 && errno != ENOSYS) Modified: stable/10/sbin/dhclient/dhclient.c ============================================================================== --- stable/10/sbin/dhclient/dhclient.c Thu Feb 13 09:09:14 2014 (r261827) +++ stable/10/sbin/dhclient/dhclient.c Thu Feb 13 09:24:46 2014 (r261828) @@ -494,7 +494,7 @@ main(int argc, char *argv[]) add_protocol("AF_ROUTE", routefd, routehandler, ifi); if (shutdown(routefd, SHUT_WR) < 0) error("can't shutdown route socket: %m"); - cap_rights_init(&rights, CAP_POLL_EVENT, CAP_READ); + cap_rights_init(&rights, CAP_EVENT, CAP_READ); if (cap_rights_limit(routefd, &rights) < 0 && errno != ENOSYS) error("can't limit route socket: %m"); Modified: stable/10/tools/regression/security/cap_test/cap_test_capabilities.c ============================================================================== --- stable/10/tools/regression/security/cap_test/cap_test_capabilities.c Thu Feb 13 09:09:14 2014 (r261827) +++ stable/10/tools/regression/security/cap_test/cap_test_capabilities.c Thu Feb 13 09:24:46 2014 (r261828) @@ -396,7 +396,7 @@ try_file_ops(int filefd, int dirfd, cap_ pollfd.revents = 0; ret = poll(&pollfd, 1, 0); - if (rights & CAP_POLL_EVENT) + if (rights & CAP_EVENT) CHECK((pollfd.revents & POLLNVAL) == 0); else CHECK((pollfd.revents & POLLNVAL) != 0); @@ -546,7 +546,7 @@ test_capabilities(void) TRY(CAP_SEM_POST); TRY(CAP_SEM_WAIT); TRY(CAP_POST_EVENT); - TRY(CAP_POLL_EVENT); + TRY(CAP_EVENT); TRY(CAP_IOCTL); TRY(CAP_TTYHOOK); TRY(CAP_PDGETPID); From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 10:11:37 2014 Return-Path: Delivered-To: svn-src-all@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 C33E010C; Thu, 13 Feb 2014 10:11:37 +0000 (UTC) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8AC4D1214; Thu, 13 Feb 2014 10:11:37 +0000 (UTC) Received: from [192.168.0.7] (cpc28-cmbg15-2-0-cust64.5-4.cable.virginm.net [86.27.189.65]) (authenticated bits=0) by theravensnest.org (8.14.7/8.14.5) with ESMTP id s1DABVfm055515 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Thu, 13 Feb 2014 10:11:33 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: svn commit: r261801 - head/contrib/libc++/include From: David Chisnall In-Reply-To: <20140212200413.71c6db5b@kan.dyndns.org> Date: Thu, 13 Feb 2014 10:11:27 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <75044DC7-D682-44A0-A384-E7B0C4D942DC@FreeBSD.org> References: <201402121814.s1CIEo5A016765@svn.freebsd.org> <52FBC08C.30309@FreeBSD.org> <52FBC570.6080003@FreeBSD.org> <20140212200413.71c6db5b@kan.dyndns.org> To: Alexander Kabaev X-Mailer: Apple Mail (2.1827) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric , Jung-uk Kim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 10:11:37 -0000 On 13 Feb 2014, at 01:04, Alexander Kabaev wrote: > The refusal to use tools that are there precisely to help to help with > the binary compatibility in favor of mindless library bumps is just = sad. Perhaps you could share with the class. What is the correct way of = solving this problem? =20 For those just joining the discussion, the issue is that std::pair was = originally declared with an explicit constructor and should have an = implicit constructor, which has a different calling convention. This = means that we can't share the two std::pair implementations across = libraries, because they will try to call the constructor with the wrong = arguments. Because of templates and C++ name mangling, this ends up = being propagated into most libraries that link against libc++, and = calling from one with the old definition to one with the new definition = end up causing segfaults (if we're lucky - I think the symptom that = we're seeing is actually dereferencing a junk value in a register, so it = may cause random memory writes, but I'd have to check the ABI). =20 Given that neither redeclaring the new std::pair in a new namespace, nor = exporting both constructor symbols using symbol versioning (the two = approaches that we've already discussed) will work, what are the tools = that apparently we're refusing to use that will work? David From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 10:22:51 2014 Return-Path: Delivered-To: svn-src-all@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 CB5FC56E; Thu, 13 Feb 2014 10:22:51 +0000 (UTC) Received: from fep12.mx.upcmail.net (fep12.mx.upcmail.net [62.179.121.32]) by mx1.freebsd.org (Postfix) with ESMTP id 782F612F7; Thu, 13 Feb 2014 10:22:50 +0000 (UTC) Received: from edge03.upcmail.net ([192.168.13.238]) by viefep12-int.chello.at (InterMail vM.8.01.05.13 201-2260-151-135-20130320) with ESMTP id <20140213102242.LTFY58822.viefep12-int.chello.at@edge03.upcmail.net>; Thu, 13 Feb 2014 11:22:42 +0100 Received: from mole.fafoe.narf.at ([80.109.55.137]) by edge03.upcmail.net with edge id RmMz1n01n2xdvHc03mN0zg; Thu, 13 Feb 2014 11:22:01 +0100 X-SourceIP: 80.109.55.137 Received: by mole.fafoe.narf.at (Postfix, from userid 1001) id 2A7C06D44C; Thu, 13 Feb 2014 11:21:59 +0100 (CET) Date: Thu, 13 Feb 2014 11:21:58 +0100 From: Stefan Farfeleder To: Dimitry Andric Subject: Re: svn commit: r261801 - head/contrib/libc++/include Message-ID: <20140213102158.GB1533@mole.fafoe.narf.at> References: <201402121814.s1CIEo5A016765@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201402121814.s1CIEo5A016765@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 10:22:51 -0000 On Wed, Feb 12, 2014 at 06:14:50PM +0000, Dimitry Andric wrote: > Author: dim > Date: Wed Feb 12 18:14:49 2014 > New Revision: 261801 > URL: http://svnweb.freebsd.org/changeset/base/261801 > > Log: > An ABI incompatibility crept into the libc++ 3.4 import in r261283. It > was caused by upstream libc++ commit r194536, which aimed to make the > headers more standards-compliant, by making std::pair's copy constructor > trivial. Unfortunately, this could cause certain C++ applications using > shared libraries built against the previous version of libc++ to crash. > > Fix the ABI incompatibility by making std::pair's copy constructor > non-trivial again. > > Please note: Any C++ applications or shared libraries built with libc++ > between r261283 and this revision should be recompiled. Thanks! From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 12:52:27 2014 Return-Path: Delivered-To: svn-src-all@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 B28203F9; Thu, 13 Feb 2014 12:52: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 9DCDB10A3; Thu, 13 Feb 2014 12:52:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1DCqRBt063255; Thu, 13 Feb 2014 12:52:27 GMT (envelope-from zeising@svn.freebsd.org) Received: (from zeising@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1DCqRPW063252; Thu, 13 Feb 2014 12:52:27 GMT (envelope-from zeising@svn.freebsd.org) Message-Id: <201402131252.s1DCqRPW063252@svn.freebsd.org> From: Niclas Zeising Date: Thu, 13 Feb 2014 12:52:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261832 - in head: share/man/man5 usr.sbin/jail X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 12:52:27 -0000 Author: zeising (doc,ports committer) Date: Thu Feb 13 12:52:26 2014 New Revision: 261832 URL: http://svnweb.freebsd.org/changeset/base/261832 Log: Add cross references between rc.conf(5) and jail.conf(5). MFC after: 2 weeks Modified: head/share/man/man5/rc.conf.5 head/usr.sbin/jail/jail.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Thu Feb 13 10:11:14 2014 (r261831) +++ head/share/man/man5/rc.conf.5 Thu Feb 13 12:52:26 2014 (r261832) @@ -4462,6 +4462,7 @@ The default is 30. .Xr fstab 5 , .Xr ipf 5 , .Xr ipnat 5 , +.Xr jail.conf 5 , .Xr motd 5 , .Xr newsyslog.conf 5 , .Xr pf.conf 5 , Modified: head/usr.sbin/jail/jail.conf.5 ============================================================================== --- head/usr.sbin/jail/jail.conf.5 Thu Feb 13 10:11:14 2014 (r261831) +++ head/usr.sbin/jail/jail.conf.5 Thu Feb 13 12:52:26 2014 (r261832) @@ -207,6 +207,7 @@ bar { .Ed .Sh SEE ALSO .Xr jail_set 2 +.Xr rc.conf 5 .Xr jail 8 .Xr jls 8 .Sh HISTORY From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 12:53:57 2014 Return-Path: Delivered-To: svn-src-all@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 ECFF2561; Thu, 13 Feb 2014 12:53: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 D7D2C10AF; Thu, 13 Feb 2014 12:53:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1DCrvVn063435; Thu, 13 Feb 2014 12:53:57 GMT (envelope-from zeising@svn.freebsd.org) Received: (from zeising@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1DCrveM063434; Thu, 13 Feb 2014 12:53:57 GMT (envelope-from zeising@svn.freebsd.org) Message-Id: <201402131253.s1DCrveM063434@svn.freebsd.org> From: Niclas Zeising Date: Thu, 13 Feb 2014 12:53:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261833 - head/usr.sbin/jail X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 12:53:58 -0000 Author: zeising (doc,ports committer) Date: Thu Feb 13 12:53:57 2014 New Revision: 261833 URL: http://svnweb.freebsd.org/changeset/base/261833 Log: Add commas (,) to the list in the SEE ALSO section, to match most other manuals. MFC after: 2 weeks Modified: head/usr.sbin/jail/jail.conf.5 Modified: head/usr.sbin/jail/jail.conf.5 ============================================================================== --- head/usr.sbin/jail/jail.conf.5 Thu Feb 13 12:52:26 2014 (r261832) +++ head/usr.sbin/jail/jail.conf.5 Thu Feb 13 12:53:57 2014 (r261833) @@ -206,9 +206,9 @@ bar { } .Ed .Sh SEE ALSO -.Xr jail_set 2 -.Xr rc.conf 5 -.Xr jail 8 +.Xr jail_set 2 , +.Xr rc.conf 5 , +.Xr jail 8 , .Xr jls 8 .Sh HISTORY The From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 13:11:35 2014 Return-Path: Delivered-To: svn-src-all@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 3974ADCA; Thu, 13 Feb 2014 13:11:35 +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 2422A124E; Thu, 13 Feb 2014 13:11:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1DDBZQk071593; Thu, 13 Feb 2014 13:11:35 GMT (envelope-from zeising@svn.freebsd.org) Received: (from zeising@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1DDBY4a071588; Thu, 13 Feb 2014 13:11:34 GMT (envelope-from zeising@svn.freebsd.org) Message-Id: <201402131311.s1DDBY4a071588@svn.freebsd.org> From: Niclas Zeising Date: Thu, 13 Feb 2014 13:11:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261834 - in head: share/man/man5 usr.sbin/jail X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 13:11:35 -0000 Author: zeising (doc,ports committer) Date: Thu Feb 13 13:11:34 2014 New Revision: 261834 URL: http://svnweb.freebsd.org/changeset/base/261834 Log: Bump .Dd forgotten in r261832. MFC after: 2 weeks Modified: head/share/man/man5/rc.conf.5 head/usr.sbin/jail/jail.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Thu Feb 13 12:53:57 2014 (r261833) +++ head/share/man/man5/rc.conf.5 Thu Feb 13 13:11:34 2014 (r261834) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 25, 2013 +.Dd February 13, 2014 .Dt RC.CONF 5 .Os .Sh NAME Modified: head/usr.sbin/jail/jail.conf.5 ============================================================================== --- head/usr.sbin/jail/jail.conf.5 Thu Feb 13 12:53:57 2014 (r261833) +++ head/usr.sbin/jail/jail.conf.5 Thu Feb 13 13:11:34 2014 (r261834) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 23, 2012 +.Dd February 13, 2014 .Dt JAIL.CONF 5 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 14:10:45 2014 Return-Path: Delivered-To: svn-src-all@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 03A55A44; Thu, 13 Feb 2014 14:10: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 E202B177C; Thu, 13 Feb 2014 14:10:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1DEAipG094555; Thu, 13 Feb 2014 14:10:44 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1DEAij7094554; Thu, 13 Feb 2014 14:10:44 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201402131410.s1DEAij7094554@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 13 Feb 2014 14:10:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261835 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 14:10:45 -0000 Author: ae Date: Thu Feb 13 14:10:44 2014 New Revision: 261835 URL: http://svnweb.freebsd.org/changeset/base/261835 Log: Drop packets to multicast address whose scop field contains the reserved value 0. MFC after: 1 week Sponsored by: Yandex LLC Modified: head/sys/netinet6/ip6_input.c Modified: head/sys/netinet6/ip6_input.c ============================================================================== --- head/sys/netinet6/ip6_input.c Thu Feb 13 13:11:34 2014 (r261834) +++ head/sys/netinet6/ip6_input.c Thu Feb 13 14:10:44 2014 (r261835) @@ -547,7 +547,18 @@ ip6_input(struct mbuf *m) in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_addrerr); goto bad; } - + if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) && + IPV6_ADDR_MC_SCOPE(&ip6->ip6_dst) == 0) { + /* + * RFC4291 2.7: + * Nodes must not originate a packet to a multicast address + * whose scop field contains the reserved value 0; if such + * a packet is received, it must be silently dropped. + */ + IP6STAT_INC(ip6s_badscope); + in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_addrerr); + goto bad; + } #ifdef ALTQ if (altq_input != NULL && (*altq_input)(m, AF_INET6) == 0) { /* packet is dropped by traffic conditioner */ From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 15:29:31 2014 Return-Path: Delivered-To: svn-src-all@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 CF482555; Thu, 13 Feb 2014 15:29:31 +0000 (UTC) Received: from mail-qa0-x22d.google.com (mail-qa0-x22d.google.com [IPv6:2607:f8b0:400d:c00::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 246F21FE0; Thu, 13 Feb 2014 15:29:31 +0000 (UTC) Received: by mail-qa0-f45.google.com with SMTP id m5so2986361qaj.4 for ; Thu, 13 Feb 2014 07:29:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type; bh=t6eytiBDv2hymf7hjZYnttRf2lXdgcC3zCObu/j1v48=; b=1IIhQ5ontxpsv656mxYPk+9joi9AewKGVav+45CT4u2tA6/aOInqbbnftVYlGmfVNo LRNpsI+tMZJHifkjxYR0R7gNLga17wUln7yhD5GZZoI3iiYJKXIsIUCRQKDeGaGq+guo DqMfrOhmqQ2n3U/NjAg3qvogGsW2OvK1ShprzlSlmccXoZROIAaO3E1gVgpZmArzAg3t T9R32t/r43MhQrqFffSsij5tODyGucOZW7RWVSL4cL4inineui73BCsKIa4TSKehou7S JMfx/ujzjhQvsKTWdiLohj/9gUZoD02AZuKk7dVwffSUYV7WN8Rntg1Fl7Q3OHemj8gp Ihsw== X-Received: by 10.140.47.101 with SMTP id l92mr3338635qga.9.1392305370168; Thu, 13 Feb 2014 07:29:30 -0800 (PST) Received: from kan.dyndns.org (c-24-63-226-98.hsd1.ma.comcast.net. [24.63.226.98]) by mx.google.com with ESMTPSA id i38sm3024020qge.1.2014.02.13.07.29.28 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Thu, 13 Feb 2014 07:29:29 -0800 (PST) Date: Thu, 13 Feb 2014 10:29:22 -0500 From: Alexander Kabaev To: David Chisnall Subject: Re: svn commit: r261801 - head/contrib/libc++/include Message-ID: <20140213102922.240cbcb0@kan.dyndns.org> In-Reply-To: <75044DC7-D682-44A0-A384-E7B0C4D942DC@FreeBSD.org> References: <201402121814.s1CIEo5A016765@svn.freebsd.org> <52FBC08C.30309@FreeBSD.org> <52FBC570.6080003@FreeBSD.org> <20140212200413.71c6db5b@kan.dyndns.org> <75044DC7-D682-44A0-A384-E7B0C4D942DC@FreeBSD.org> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.22; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/kYQpGtjrlkV5=ty9S6UDFvW"; protocol="application/pgp-signature" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric , Jung-uk Kim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 15:29:31 -0000 --Sig_/kYQpGtjrlkV5=ty9S6UDFvW Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 13 Feb 2014 10:11:27 +0000 David Chisnall wrote: > On 13 Feb 2014, at 01:04, Alexander Kabaev wrote: >=20 > > The refusal to use tools that are there precisely to help to help > > with the binary compatibility in favor of mindless library bumps is > > just sad. >=20 > Perhaps you could share with the class. What is the correct way of > solving this problem? =20 >=20 > For those just joining the discussion, the issue is that std::pair > was originally declared with an explicit constructor and should have > an implicit constructor, which has a different calling convention. > This means that we can't share the two std::pair implementations > across libraries, because they will try to call the constructor with > the wrong arguments. Because of templates and C++ name mangling, > this ends up being propagated into most libraries that link against > libc++, and calling from one with the old definition to one with the > new definition end up causing segfaults (if we're lucky - I think the > symptom that we're seeing is actually dereferencing a junk value in a > register, so it may cause random memory writes, but I'd have to check > the ABI). =20 >=20 > Given that neither redeclaring the new std::pair in a new namespace, > nor exporting both constructor symbols using symbol versioning (the > two approaches that we've already discussed) will work, what are the > tools that apparently we're refusing to use that will work? >=20 > David OK, I think the confusion has started because reported to this as an ABI incompatibility within libc++ itself, which is not the case here. When calling convention of a public symbol changes, one can put the old definition under the compatibility version that is only available for runtime binding, this allowing old binaries to work and that is what I was referring to. Unfortunately, that won't work in this case because libc++ proper does NOT export any symbols with 'pair' in them, so it is not affected by the ABI breakage itself. What libc++ developers did is they exported ABI breakage into every binary that was compiled with different revisions on libc++ _header_ files, not linked with the library proper. Using the library major version as a circumstantial evidence indicating header versions binary was compiled with might work then, though is not 100% reliable. Theoretically one can compile the binary that uses std::pair template but does not record libc++ as the runtime dependency. Still, that is better than nothing. ABI stability and C++ apparently should be mentioned in the same sentence, unless there's also a 'pipe dream' in it. And you do deserve an apology for my remark.=20 --=20 Alexander Kabaev --Sig_/kYQpGtjrlkV5=ty9S6UDFvW Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iD8DBQFS/OTXQ6z1jMm+XZYRAoW2AKDc/lS0wcFkKHoW3MP3KSX+0u0EUQCglpN9 t8+VXjZKKlsirllH/I24JkY= =T+Om -----END PGP SIGNATURE----- --Sig_/kYQpGtjrlkV5=ty9S6UDFvW-- From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 15:46:09 2014 Return-Path: Delivered-To: svn-src-all@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 6D704B5A; Thu, 13 Feb 2014 15:46: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 3CE7D11FB; Thu, 13 Feb 2014 15:46:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1DFk98D032344; Thu, 13 Feb 2014 15:46:09 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1DFk9i9032343; Thu, 13 Feb 2014 15:46:09 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201402131546.s1DFk9i9032343@svn.freebsd.org> From: Warner Losh Date: Thu, 13 Feb 2014 15:46:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261836 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 15:46:09 -0000 Author: imp Date: Thu Feb 13 15:46:08 2014 New Revision: 261836 URL: http://svnweb.freebsd.org/changeset/base/261836 Log: Fix board name. Modified: head/sys/arm/at91/board_eb9200.c Modified: head/sys/arm/at91/board_eb9200.c ============================================================================== --- head/sys/arm/at91/board_eb9200.c Thu Feb 13 14:10:44 2014 (r261835) +++ head/sys/arm/at91/board_eb9200.c Thu Feb 13 15:46:08 2014 (r261836) @@ -65,4 +65,4 @@ board_init(void) return (at91_ramsize()); } -ARM_BOARD(KB9200, "Kwikbyte KB920x") +ARM_BOARD(KB9200, "Embest ATEB9200") From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 15:47:42 2014 Return-Path: Delivered-To: svn-src-all@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 79D73D46; Thu, 13 Feb 2014 15:47: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 49BD11212; Thu, 13 Feb 2014 15:47:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1DFlgdk032589; Thu, 13 Feb 2014 15:47:42 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1DFlgt6032588; Thu, 13 Feb 2014 15:47:42 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201402131547.s1DFlgt6032588@svn.freebsd.org> From: Warner Losh Date: Thu, 13 Feb 2014 15:47:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261837 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 15:47:42 -0000 Author: imp Date: Thu Feb 13 15:47:41 2014 New Revision: 261837 URL: http://svnweb.freebsd.org/changeset/base/261837 Log: Fix board ID too... Modified: head/sys/arm/at91/board_eb9200.c Modified: head/sys/arm/at91/board_eb9200.c ============================================================================== --- head/sys/arm/at91/board_eb9200.c Thu Feb 13 15:46:08 2014 (r261836) +++ head/sys/arm/at91/board_eb9200.c Thu Feb 13 15:47:41 2014 (r261837) @@ -65,4 +65,4 @@ board_init(void) return (at91_ramsize()); } -ARM_BOARD(KB9200, "Embest ATEB9200") +ARM_BOARD(ATEB9200, "Embest ATEB9200") From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 16:13:32 2014 Return-Path: Delivered-To: svn-src-all@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 5EDF4581; Thu, 13 Feb 2014 16:13:32 +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 4A4801594; Thu, 13 Feb 2014 16:13:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1DGDW9I043006; Thu, 13 Feb 2014 16:13:32 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1DGDWVo043005; Thu, 13 Feb 2014 16:13:32 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402131613.s1DGDWVo043005@svn.freebsd.org> From: Christian Brueffer Date: Thu, 13 Feb 2014 16:13:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261838 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 16:13:32 -0000 Author: brueffer Date: Thu Feb 13 16:13:31 2014 New Revision: 261838 URL: http://svnweb.freebsd.org/changeset/base/261838 Log: Add a deprecation notice to nve.4 and Xref nfe.4. MFC after: 3 days Modified: head/share/man/man4/nve.4 Modified: head/share/man/man4/nve.4 ============================================================================== --- head/share/man/man4/nve.4 Thu Feb 13 15:47:41 2014 (r261837) +++ head/share/man/man4/nve.4 Thu Feb 13 16:13:31 2014 (r261838) @@ -26,13 +26,21 @@ .\" .\" $FreeBSD$ .\" -.Dd January 16, 2011 +.Dd February 13, 2014 .Dt NVE 4 .Os .Sh NAME .Nm nve .Nd "NVIDIA nForce MCP Networking Adapter device driver" .Sh SYNOPSIS +.Sy Warning: +This driver is deprecated and will not be available in +.Fx 11.0 +and later. +Please consider using the +.Xr nfe 4 +driver instead. +.Pp To compile this driver into the kernel, place the following lines in your kernel configuration file: @@ -119,6 +127,7 @@ the network connection (cable). .Xr arp 4 , .Xr miibus 4 , .Xr netintro 4 , +.Xr nfe 4 , .Xr ng_ether 4 , .Xr rgephy 4 , .Xr ifconfig 8 From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 16:50:09 2014 Return-Path: Delivered-To: svn-src-all@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 2A82631E; Thu, 13 Feb 2014 16:50: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 15FC5185C; Thu, 13 Feb 2014 16:50:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1DGo8nX055765; Thu, 13 Feb 2014 16:50:08 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1DGo8xg055763; Thu, 13 Feb 2014 16:50:08 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201402131650.s1DGo8xg055763@svn.freebsd.org> From: Warner Losh Date: Thu, 13 Feb 2014 16:50:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261841 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 16:50:09 -0000 Author: imp Date: Thu Feb 13 16:50:08 2014 New Revision: 261841 URL: http://svnweb.freebsd.org/changeset/base/261841 Log: Honor the disabled status by only grabbing resources and returning when running under FDT. Modified: head/sys/arm/at91/at91_spi.c head/sys/arm/at91/at91_twi.c Modified: head/sys/arm/at91/at91_spi.c ============================================================================== --- head/sys/arm/at91/at91_spi.c Thu Feb 13 16:38:00 2014 (r261840) +++ head/sys/arm/at91/at91_spi.c Thu Feb 13 16:50:08 2014 (r261841) @@ -131,6 +131,15 @@ at91_spi_attach(device_t dev) if (err) goto out; +#ifdef FDT + /* + * Disable devices need to hold their resources, so return now and not attach + * the spibus, setup interrupt handlers, etc. + */ + if (!ofw_bus_status_okay(dev)) + return 0; +#endif + /* * Set up the hardware. */ Modified: head/sys/arm/at91/at91_twi.c ============================================================================== --- head/sys/arm/at91/at91_twi.c Thu Feb 13 16:38:00 2014 (r261840) +++ head/sys/arm/at91/at91_twi.c Thu Feb 13 16:50:08 2014 (r261841) @@ -134,6 +134,15 @@ at91_twi_attach(device_t dev) AT91_TWI_LOCK_INIT(sc); +#ifdef FDT + /* + * Disable devices need to hold their resources, so return now and not attach + * the iicbus, setup interrupt handlers, etc. + */ + if (!ofw_bus_status_okay(dev)) + return 0; +#endif + /* * Activate the interrupt */ From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 17:08:31 2014 Return-Path: Delivered-To: svn-src-all@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 0308A757; Thu, 13 Feb 2014 17:08:31 +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 D4E4919D9; Thu, 13 Feb 2014 17:08:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1DH8UE8063302; Thu, 13 Feb 2014 17:08:30 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1DH8UJ7063297; Thu, 13 Feb 2014 17:08:30 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201402131708.s1DH8UJ7063297@svn.freebsd.org> From: Luiz Otavio O Souza Date: Thu, 13 Feb 2014 17:08:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261842 - in head/sys: conf dev/gpio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 17:08:31 -0000 Author: loos Date: Thu Feb 13 17:08:29 2014 New Revision: 261842 URL: http://svnweb.freebsd.org/changeset/base/261842 Log: Add an OFW GPIO compatible bus. This allows the use of the DTS files to describe GPIO bindings in the system. Move the GPIOBUS lock macros to gpiobusvar.h as they are now shared between the OFW and the non OFW versions of GPIO bus. Export gpiobus_print_pins() so it can also be used on the OFW GPIO bus. Approved by: adrian (mentor, implicit) Added: head/sys/dev/gpio/ofw_gpiobus.c (contents, props changed) Modified: head/sys/conf/files head/sys/dev/gpio/gpiobus.c head/sys/dev/gpio/gpiobusvar.h Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Feb 13 16:50:08 2014 (r261841) +++ head/sys/conf/files Thu Feb 13 17:08:29 2014 (r261842) @@ -1400,6 +1400,7 @@ dev/gpio/gpioiic.c optional gpioiic dev/gpio/gpioled.c optional gpioled dev/gpio/gpio_if.m optional gpio dev/gpio/gpiobus_if.m optional gpio +dev/gpio/ofw_gpiobus.c optional fdt gpio dev/hatm/if_hatm.c optional hatm pci dev/hatm/if_hatm_intr.c optional hatm pci dev/hatm/if_hatm_ioctl.c optional hatm pci Modified: head/sys/dev/gpio/gpiobus.c ============================================================================== --- head/sys/dev/gpio/gpiobus.c Thu Feb 13 16:50:08 2014 (r261841) +++ head/sys/dev/gpio/gpiobus.c Thu Feb 13 17:08:29 2014 (r261842) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include "gpio_if.h" #include "gpiobus_if.h" -static void gpiobus_print_pins(struct gpiobus_ivar *); static int gpiobus_parse_pins(struct gpiobus_softc *, device_t, int); static int gpiobus_probe(device_t); static int gpiobus_attach(device_t); @@ -73,17 +72,7 @@ static int gpiobus_pin_set(device_t, dev static int gpiobus_pin_get(device_t, device_t, uint32_t, unsigned int*); static int gpiobus_pin_toggle(device_t, device_t, uint32_t); -#define GPIOBUS_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) -#define GPIOBUS_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) -#define GPIOBUS_LOCK_INIT(_sc) \ - mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->sc_dev), \ - "gpiobus", MTX_DEF) -#define GPIOBUS_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx); -#define GPIOBUS_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED); -#define GPIOBUS_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED); - - -static void +void gpiobus_print_pins(struct gpiobus_ivar *devi) { int range_start, range_stop, need_coma; Modified: head/sys/dev/gpio/gpiobusvar.h ============================================================================== --- head/sys/dev/gpio/gpiobusvar.h Thu Feb 13 16:50:08 2014 (r261841) +++ head/sys/dev/gpio/gpiobusvar.h Thu Feb 13 17:08:29 2014 (r261842) @@ -30,12 +30,25 @@ #ifndef __GPIOBUS_H__ #define __GPIOBUS_H__ +#include "opt_platform.h" + #include #include #include -#define GPIOBUS_IVAR(d) (struct gpiobus_ivar *) device_get_ivars(d) -#define GPIOBUS_SOFTC(d) (struct gpiobus_softc *) device_get_softc(d) +#ifdef FDT +#include +#endif + +#define GPIOBUS_IVAR(d) (struct gpiobus_ivar *) device_get_ivars(d) +#define GPIOBUS_SOFTC(d) (struct gpiobus_softc *) device_get_softc(d) +#define GPIOBUS_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) +#define GPIOBUS_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) +#define GPIOBUS_LOCK_INIT(_sc) mtx_init(&_sc->sc_mtx, \ + device_get_nameunit(_sc->sc_dev), "gpiobus", MTX_DEF) +#define GPIOBUS_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx) +#define GPIOBUS_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED) +#define GPIOBUS_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED) struct gpiobus_softc { @@ -54,4 +67,11 @@ struct gpiobus_ivar uint32_t *pins; /* pins map */ }; +void gpiobus_print_pins(struct gpiobus_ivar *); +#ifdef FDT +device_t ofw_gpiobus_add_fdt_child(device_t, phandle_t); +#endif + +extern driver_t gpiobus_driver; + #endif /* __GPIOBUS_H__ */ Added: head/sys/dev/gpio/ofw_gpiobus.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/gpio/ofw_gpiobus.c Thu Feb 13 17:08:29 2014 (r261842) @@ -0,0 +1,338 @@ +/*- + * Copyright (c) 2009, Nathan Whitehorn + * Copyright (c) 2013, Luiz Otavio O Souza + * Copyright (c) 2013 The FreeBSD Foundation + * 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 unmodified, 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 ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#include "gpio_if.h" +#include "gpiobus_if.h" + +struct ofw_gpiobus_devinfo { + struct gpiobus_ivar opd_dinfo; + struct ofw_bus_devinfo opd_obdinfo; +}; + +static int ofw_gpiobus_parse_gpios(struct gpiobus_softc *, + struct gpiobus_ivar *, phandle_t); +static struct ofw_gpiobus_devinfo *ofw_gpiobus_setup_devinfo(device_t, + phandle_t); +static void ofw_gpiobus_destroy_devinfo(struct ofw_gpiobus_devinfo *); + +device_t +ofw_gpiobus_add_fdt_child(device_t bus, phandle_t child) +{ + struct ofw_gpiobus_devinfo *dinfo; + device_t childdev; + + /* + * Set up the GPIO child and OFW bus layer devinfo and add it to bus. + */ + dinfo = ofw_gpiobus_setup_devinfo(bus, child); + if (dinfo == NULL) + return (NULL); + childdev = device_add_child(bus, NULL, -1); + if (childdev == NULL) { + device_printf(bus, "could not add child: %s\n", + dinfo->opd_obdinfo.obd_name); + ofw_gpiobus_destroy_devinfo(dinfo); + return (NULL); + } + device_set_ivars(childdev, dinfo); + + return (childdev); +} + +static int +ofw_gpiobus_parse_gpios(struct gpiobus_softc *sc, struct gpiobus_ivar *dinfo, + phandle_t child) +{ + int i, len; + pcell_t *gpios; + phandle_t gpio; + + /* Retrieve the gpios property. */ + if ((len = OF_getproplen(child, "gpios")) < 0) + return (EINVAL); + gpios = malloc(len, M_DEVBUF, M_NOWAIT | M_ZERO); + if (gpios == NULL) + return (ENOMEM); + if (OF_getencprop(child, "gpios", gpios, len) < 0) { + free(gpios, M_DEVBUF); + return (EINVAL); + } + + /* + * Each 'gpios' entry must contain 4 pcells. + * The first one is the GPIO controller phandler. + * Then the last three are the GPIO pin, the GPIO pin direction and + * the GPIO pin flags. + */ + if ((len / sizeof(pcell_t)) % 4) { + free(gpios, M_DEVBUF); + return (EINVAL); + } + dinfo->npins = len / (sizeof(pcell_t) * 4); + dinfo->pins = malloc(sizeof(uint32_t) * dinfo->npins, M_DEVBUF, + M_NOWAIT | M_ZERO); + if (dinfo->pins == NULL) { + free(gpios, M_DEVBUF); + return (ENOMEM); + } + + for (i = 0; i < dinfo->npins; i++) { + + /* Verify if we're attaching to the correct gpio controller. */ + gpio = OF_xref_phandle(gpios[i * 4 + 0]); + if (!OF_hasprop(gpio, "gpio-controller") || + gpio != ofw_bus_get_node(sc->sc_dev)) { + free(dinfo->pins, M_DEVBUF); + free(gpios, M_DEVBUF); + return (EINVAL); + } + + /* Get the GPIO pin number. */ + dinfo->pins[i] = gpios[i * 4 + 1]; + /* gpios[i * 4 + 2] - GPIO pin direction */ + /* gpios[i * 4 + 3] - GPIO pin flags */ + + if (dinfo->pins[i] > sc->sc_npins) { + device_printf(sc->sc_busdev, + "invalid pin %d, max: %d\n", + dinfo->pins[i], sc->sc_npins - 1); + free(dinfo->pins, M_DEVBUF); + free(gpios, M_DEVBUF); + return (EINVAL); + } + + /* + * Mark pin as mapped and give warning if it's already mapped. + */ + if (sc->sc_pins_mapped[dinfo->pins[i]]) { + device_printf(sc->sc_busdev, + "warning: pin %d is already mapped\n", + dinfo->pins[i]); + free(dinfo->pins, M_DEVBUF); + free(gpios, M_DEVBUF); + return (EINVAL); + } + sc->sc_pins_mapped[dinfo->pins[i]] = 1; + } + + free(gpios, M_DEVBUF); + + return (0); +} + +static struct ofw_gpiobus_devinfo * +ofw_gpiobus_setup_devinfo(device_t dev, phandle_t node) +{ + struct gpiobus_softc *sc; + struct ofw_gpiobus_devinfo *dinfo; + + sc = device_get_softc(dev); + dinfo = malloc(sizeof(*dinfo), M_DEVBUF, M_NOWAIT | M_ZERO); + if (dinfo == NULL) + return (NULL); + if (ofw_bus_gen_setup_devinfo(&dinfo->opd_obdinfo, node) != 0) { + free(dinfo, M_DEVBUF); + return (NULL); + } + + /* Parse the gpios property for the child. */ + if (ofw_gpiobus_parse_gpios(sc, &dinfo->opd_dinfo, node) != 0) { + ofw_bus_gen_destroy_devinfo(&dinfo->opd_obdinfo); + free(dinfo, M_DEVBUF); + return (NULL); + } + + return (dinfo); +} + +static void +ofw_gpiobus_destroy_devinfo(struct ofw_gpiobus_devinfo *dinfo) +{ + + ofw_bus_gen_destroy_devinfo(&dinfo->opd_obdinfo); + free(dinfo, M_DEVBUF); +} + +static int +ofw_gpiobus_probe(device_t dev) +{ + + if (ofw_bus_get_node(dev) == -1) + return (ENXIO); + device_set_desc(dev, "OFW GPIO bus"); + + return (0); +} + +static int +ofw_gpiobus_attach(device_t dev) +{ + struct gpiobus_softc *sc; + phandle_t child; + + sc = GPIOBUS_SOFTC(dev); + sc->sc_busdev = dev; + sc->sc_dev = device_get_parent(dev); + + /* Read the pin max. value */ + if (GPIO_PIN_MAX(sc->sc_dev, &sc->sc_npins) != 0) + return (ENXIO); + + KASSERT(sc->sc_npins != 0, ("GPIO device with no pins")); + + /* + * Increase to get number of pins. + */ + sc->sc_npins++; + + sc->sc_pins_mapped = malloc(sizeof(int) * sc->sc_npins, M_DEVBUF, + M_NOWAIT | M_ZERO); + + if (!sc->sc_pins_mapped) + return (ENOMEM); + + /* Init the bus lock. */ + GPIOBUS_LOCK_INIT(sc); + + bus_generic_probe(dev); + bus_enumerate_hinted_children(dev); + + /* + * Attach the children represented in the device tree. + */ + for (child = OF_child(ofw_bus_get_node(dev)); child != 0; + child = OF_peer(child)) + if (ofw_gpiobus_add_fdt_child(dev, child) == NULL) + continue; + + return (bus_generic_attach(dev)); +} + +static device_t +ofw_gpiobus_add_child(device_t dev, u_int order, const char *name, int unit) +{ + device_t child; + struct ofw_gpiobus_devinfo *devi; + + child = device_add_child_ordered(dev, order, name, unit); + if (child == NULL) + return (child); + devi = malloc(sizeof(struct ofw_gpiobus_devinfo), M_DEVBUF, + M_NOWAIT | M_ZERO); + if (devi == NULL) { + device_delete_child(dev, child); + return (0); + } + + /* + * NULL all the OFW-related parts of the ivars for non-OFW + * children. + */ + devi->opd_obdinfo.obd_node = -1; + devi->opd_obdinfo.obd_name = NULL; + devi->opd_obdinfo.obd_compat = NULL; + devi->opd_obdinfo.obd_type = NULL; + devi->opd_obdinfo.obd_model = NULL; + + device_set_ivars(child, devi); + + return (child); +} + +static int +ofw_gpiobus_print_child(device_t dev, device_t child) +{ + struct ofw_gpiobus_devinfo *devi; + int retval = 0; + + devi = device_get_ivars(child); + retval += bus_print_child_header(dev, child); + retval += printf(" at pin(s) "); + gpiobus_print_pins(&devi->opd_dinfo); + retval += bus_print_child_footer(dev, child); + + return (retval); +} + +static const struct ofw_bus_devinfo * +ofw_gpiobus_get_devinfo(device_t bus, device_t dev) +{ + struct ofw_gpiobus_devinfo *dinfo; + + dinfo = device_get_ivars(dev); + + return (&dinfo->opd_obdinfo); +} + +static device_method_t ofw_gpiobus_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, ofw_gpiobus_probe), + DEVMETHOD(device_attach, ofw_gpiobus_attach), + + /* Bus interface */ + DEVMETHOD(bus_child_pnpinfo_str, ofw_bus_gen_child_pnpinfo_str), + DEVMETHOD(bus_print_child, ofw_gpiobus_print_child), + DEVMETHOD(bus_add_child, ofw_gpiobus_add_child), + + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_devinfo, ofw_gpiobus_get_devinfo), + DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), + DEVMETHOD(ofw_bus_get_model, ofw_bus_gen_get_model), + DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), + DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), + DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), + + DEVMETHOD_END +}; + +static devclass_t ofwgpiobus_devclass; + +DEFINE_CLASS_1(gpiobus, ofw_gpiobus_driver, ofw_gpiobus_methods, + sizeof(struct gpiobus_softc), gpiobus_driver); +DRIVER_MODULE(ofw_gpiobus, gpio, ofw_gpiobus_driver, ofwgpiobus_devclass, 0, 0); +MODULE_VERSION(ofw_gpiobus, 1); +MODULE_DEPEND(ofw_gpiobus, gpiobus, 1, 1, 1); From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 17:58:53 2014 Return-Path: Delivered-To: svn-src-all@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 79396ABA; Thu, 13 Feb 2014 17:58: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 56D981F75; Thu, 13 Feb 2014 17:58:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1DHwr7s084067; Thu, 13 Feb 2014 17:58:53 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1DHwqFA084060; Thu, 13 Feb 2014 17:58:52 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201402131758.s1DHwqFA084060@svn.freebsd.org> From: Luiz Otavio O Souza Date: Thu, 13 Feb 2014 17:58:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261843 - in head: share/man/man4 sys/dev/gpio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 17:58:53 -0000 Author: loos Date: Thu Feb 13 17:58:52 2014 New Revision: 261843 URL: http://svnweb.freebsd.org/changeset/base/261843 Log: Add OFW support to the in tree gpio compatible devices: gpioiic(4) and gpioled(4). Tested on RPi and BBB (using the hardware I2C controller and gpioiic(4) for the I2C tests). It was also verified for regressions on RSPRO (MIPS/ar71xx) used as reference for a non OFW-based system. Update the gpioled(4) and gpioiic(4) man pages with some details and examples about the FDT/OFW support. Some compatibility details pointed out by imp@ will follow in subsequent commits. Approved by: adrian (mentor, implicit) Modified: head/share/man/man4/gpioiic.4 head/share/man/man4/gpioled.4 head/sys/dev/gpio/gpioiic.c head/sys/dev/gpio/gpioled.c Modified: head/share/man/man4/gpioiic.4 ============================================================================== --- head/share/man/man4/gpioiic.4 Thu Feb 13 17:08:29 2014 (r261842) +++ head/share/man/man4/gpioiic.4 Thu Feb 13 17:58:52 2014 (r261843) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 5, 2013 +.Dd February 13, 2014 .Dt GPIOIIC 4 .Os .Sh NAME @@ -65,7 +65,7 @@ This is a bitmask of the pins on the that are to be used for SCLOCK and SDATA from the GPIO IIC bit-banging bus. To configure pin 0 and 7, use the bitmask of -10000001 and convert it to a hexadecimal value of 0x0081. +0b10000001 and convert it to a hexadecimal value of 0x0081. Please note that this mask should only ever have two bits set (any others bits - i.e., pins - will be ignored). .It Va hint.gpioiic.%d.scl @@ -73,13 +73,77 @@ Indicates which bit in the .Va hint.gpioiic.%d.pins should be used as the SCLOCK source. +Optional, defaults to 0. .It Va hint.gpioiic.%d.sda Indicates which bit in the .Va hint.gpioiic.%d.pins should be used as the SDATA source. +Optional, defaults to 1. +.El +.Pp +On a +.Xr FDT 4 +based system, like +.Li ARM , the dts part for a +.Nm gpioiic +device usually looks like: +.Bd -literal +gpio: gpio { + + gpio-controller; + ... + + gpioiic0 { + compatible = "gpioiic"; + /* + * Attach to GPIO pins 21 and 22. Set them + * initially as inputs. + */ + gpios = <&gpio 21 1 0 + &gpio 22 1 0>; + scl = <0>; /* GPIO pin 21 - optional */ + sda = <1>; /* GPIO pin 22 - optional */ + + /* This is an example of a gpioiic child. */ + gpioiic-child0 { + compatible = "lm75"; + i2c-address = <0x4f>; + }; + }; +}; +.Ed +.Pp +Where: +.Bl -tag -width ".Va compatible" +.It Va compatible +Should always be set to "gpioiic". +.It Va gpios +The +.Va gpios +property indicates which GPIO pins should be used for SCLOCK and SDATA +on the GPIO IIC bit-banging bus. +For more details about the +.Va gpios +property, please consult +.Pa /usr/src/sys/boot/fdt/dts/bindings-gpio.txt . +.It Va scl +The +.Va scl +option indicates which bit in the +.Va gpios +should be used as the SCLOCK source. +Optional, defaults to 0. +.It Va sda +The +.Va sda +option indicates which bit in the +.Va gpios +should be used as the SDATA source. +Optional, defaults to 1. .El .Sh SEE ALSO +.Xr fdt 4 , .Xr gpio 4 , .Xr gpioled 4 , .Xr iic 4 , Modified: head/share/man/man4/gpioled.4 ============================================================================== --- head/share/man/man4/gpioled.4 Thu Feb 13 17:08:29 2014 (r261842) +++ head/share/man/man4/gpioled.4 Thu Feb 13 17:58:52 2014 (r261843) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 5, 2013 +.Dd February 13, 2014 .Dt GPIOLED 4 .Os .Sh NAME @@ -68,7 +68,75 @@ Which pin on the GPIO interface to map t Please note that this mask should only ever have one bit set (any others bits - i.e., pins - will be ignored). .El +.Pp +On a +.Xr FDT 4 +based system, like +.Li ARM , the dts part for a +.Nm gpioled +device usually looks like: +.Bd -literal +gpio: gpio { + + gpio-controller; + ... + + led0 { + compatible = "gpioled"; + gpios = <&gpio 16 2 0>; /* GPIO pin 16. */ + name = "ok"; + }; + + led1 { + compatible = "gpioled"; + gpios = <&gpio 17 2 0>; /* GPIO pin 17. */ + name = "user-led1"; + }; +}; +.Ed +.Pp +And optionally, you can choose combine all the leds under a single +.Dq gpio-leds +compatible node: +.Bd -literal +simplebus0 { + + ... + + leds { + compatible = "gpio-leds"; + + led0 { + gpios = <&gpio 16 2 0>; + name = "ok" + }; + + led1 { + gpios = <&gpio 17 2 0>; + name = "user-led1" + }; + }; +}; +.Ed +.Pp +Both methods are equally supported and it is possible to have the leds +defined with any sort of mix between the methods. +The only restriction is that a GPIO pin cannot be mapped by two different +(gpio)leds. +.Pp +For more details about the +.Va gpios +property, please consult +.Pa /usr/src/sys/boot/fdt/dts/bindings-gpio.txt . +.Pp +The property +.Va name +is the arbitrary name of device in +.Pa /dev/led/ +to create for +.Xr led 4 . .Sh SEE ALSO +.Xr fdt 4 , .Xr gpio 4 , .Xr led 4 , .Xr gpioiic 4 Modified: head/sys/dev/gpio/gpioiic.c ============================================================================== --- head/sys/dev/gpio/gpioiic.c Thu Feb 13 17:08:29 2014 (r261842) +++ head/sys/dev/gpio/gpioiic.c Thu Feb 13 17:58:52 2014 (r261843) @@ -28,6 +28,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_platform.h" + #include #include #include @@ -38,6 +40,12 @@ __FBSDID("$FreeBSD$"); #include #include "gpiobus_if.h" +#ifdef FDT +#include +#include +#include +#endif + #include #include @@ -71,6 +79,10 @@ static int gpioiic_probe(device_t dev) { +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "gpioiic")) + return (ENXIO); +#endif device_set_desc(dev, "GPIO I2C bit-banging driver"); return (0); @@ -81,6 +93,10 @@ gpioiic_attach(device_t dev) { struct gpioiic_softc *sc = device_get_softc(dev); device_t bitbang; +#ifdef FDT + phandle_t node; + pcell_t pin; +#endif sc->sc_dev = dev; sc->sc_busdev = device_get_parent(dev); @@ -91,6 +107,15 @@ gpioiic_attach(device_t dev) device_get_unit(dev), "sda", &sc->sda_pin)) sc->sda_pin = SDA_PIN_DEFAULT; +#ifdef FDT + if ((node = ofw_bus_get_node(dev)) == -1) + return (ENXIO); + if (OF_getencprop(node, "scl", &pin, sizeof(pin)) > 0) + sc->scl_pin = (int)pin; + if (OF_getencprop(node, "sda", &pin, sizeof(pin)) > 0) + sc->sda_pin = (int)pin; +#endif + /* add generic bit-banging code */ bitbang = device_add_child(dev, "iicbb", -1); device_probe_and_attach(bitbang); @@ -209,6 +234,16 @@ gpioiic_reset(device_t dev, u_char speed return (IIC_ENOADDR); } +#ifdef FDT +static phandle_t +gpioiic_get_node(device_t bus, device_t dev) +{ + + /* We only have one child, the iicbb, which needs our own node. */ + return (ofw_bus_get_node(bus)); +} +#endif + static devclass_t gpioiic_devclass; static device_method_t gpioiic_methods[] = { @@ -225,6 +260,11 @@ static device_method_t gpioiic_methods[] DEVMETHOD(iicbb_getscl, gpioiic_getscl), DEVMETHOD(iicbb_reset, gpioiic_reset), +#ifdef FDT + /* OFW bus interface */ + DEVMETHOD(ofw_bus_get_node, gpioiic_get_node), +#endif + { 0, 0 } }; Modified: head/sys/dev/gpio/gpioled.c ============================================================================== --- head/sys/dev/gpio/gpioled.c Thu Feb 13 17:08:29 2014 (r261842) +++ head/sys/dev/gpio/gpioled.c Thu Feb 13 17:58:52 2014 (r261843) @@ -27,6 +27,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_platform.h" + #include #include #include @@ -39,6 +41,12 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#include +#include +#endif + #include #include #include "gpiobus_if.h" @@ -84,10 +92,65 @@ gpioled_control(void *priv, int onoff) GPIOLED_UNLOCK(sc); } +#ifdef FDT +static void +gpioled_identify(driver_t *driver, device_t bus) +{ + phandle_t child, leds, root; + + root = OF_finddevice("/"); + if (root == 0) + return; + leds = fdt_find_compatible(root, "gpio-leds", 1); + if (leds == 0) + return; + + /* Traverse the 'gpio-leds' node and add its children. */ + for (child = OF_child(leds); child != 0; child = OF_peer(child)) + if (ofw_gpiobus_add_fdt_child(bus, child) == NULL) + continue; +} +#endif + static int gpioled_probe(device_t dev) { +#ifdef FDT + int match; + phandle_t node; + char *compat; + + /* + * We can match against our own node compatible string and also against + * our parent node compatible string. The first is normally used to + * describe leds on a gpiobus and the later when there is a common node + * compatible with 'gpio-leds' which is used to concentrate all the + * leds nodes on the dts. + */ + match = 0; + if (ofw_bus_is_compatible(dev, "gpioled")) + match = 1; + + if (match == 0) { + if ((node = ofw_bus_get_node(dev)) == -1) + return (ENXIO); + if ((node = OF_parent(node)) == -1) + return (ENXIO); + if (OF_getprop_alloc(node, "compatible", 1, + (void **)&compat) == -1) + return (ENXIO); + + if (strcasecmp(compat, "gpio-leds") == 0) + match = 1; + + free(compat, M_OFWPROP); + } + + if (match == 0) + return (ENXIO); +#endif device_set_desc(dev, "GPIO led"); + return (0); } @@ -95,18 +158,35 @@ static int gpioled_attach(device_t dev) { struct gpioled_softc *sc; +#ifdef FDT + phandle_t node; + char *name; +#else const char *name; +#endif sc = device_get_softc(dev); sc->sc_dev = dev; sc->sc_busdev = device_get_parent(dev); GPIOLED_LOCK_INIT(sc); +#ifdef FDT + name = NULL; + if ((node = ofw_bus_get_node(dev)) == -1) + return (ENXIO); + if (OF_getprop_alloc(node, "label", 1, (void **)&name) == -1) + OF_getprop_alloc(node, "name", 1, (void **)&name); +#else if (resource_string_value(device_get_name(dev), device_get_unit(dev), "name", &name)) name = NULL; +#endif sc->sc_leddev = led_create(gpioled_control, sc, name ? name : device_get_nameunit(dev)); +#ifdef FDT + if (name != NULL) + free(name, M_OFWPROP); +#endif return (0); } @@ -129,6 +209,9 @@ static devclass_t gpioled_devclass; static device_method_t gpioled_methods[] = { /* Device interface */ +#ifdef FDT + DEVMETHOD(device_identify, gpioled_identify), +#endif DEVMETHOD(device_probe, gpioled_probe), DEVMETHOD(device_attach, gpioled_attach), DEVMETHOD(device_detach, gpioled_detach), From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 18:22:51 2014 Return-Path: Delivered-To: svn-src-all@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 D74C86E4; Thu, 13 Feb 2014 18:22: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 AF4981229; Thu, 13 Feb 2014 18:22:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1DIMpch095733; Thu, 13 Feb 2014 18:22:51 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1DIMpjN095731; Thu, 13 Feb 2014 18:22:51 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201402131822.s1DIMpjN095731@svn.freebsd.org> From: Luiz Otavio O Souza Date: Thu, 13 Feb 2014 18:22:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261844 - in head/sys/dev: iicbus ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 18:22:52 -0000 Author: loos Date: Thu Feb 13 18:22:49 2014 New Revision: 261844 URL: http://svnweb.freebsd.org/changeset/base/261844 Log: Allow the use of OFW I2C bus together with iicbb(4) on OFW-based systems. This change makes ofw_iicbus attach to iicbb(4) controllers in addition to the already supported i2c host bridges (iichb). On iicbb(4) allow the direct access of the OFW parent node by its children, so they can be directly attached to iicbb(4) node on the DTS without the need of describing the i2c bus. Approved by: adrian (mentor, implicit) Modified: head/sys/dev/iicbus/iicbb.c head/sys/dev/ofw/ofw_iicbus.c Modified: head/sys/dev/iicbus/iicbb.c ============================================================================== --- head/sys/dev/iicbus/iicbb.c Thu Feb 13 17:58:52 2014 (r261843) +++ head/sys/dev/iicbus/iicbb.c Thu Feb 13 18:22:49 2014 (r261844) @@ -43,6 +43,8 @@ __FBSDID("$FreeBSD$"); * */ +#include "opt_platform.h" + #include #include #include @@ -50,6 +52,11 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT +#include +#include +#include +#endif #include #include @@ -77,6 +84,9 @@ static int iicbb_write(device_t, const c static int iicbb_read(device_t, char *, int, int *, int, int); static int iicbb_reset(device_t, u_char, u_char, u_char *); static int iicbb_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs); +#ifdef FDT +static phandle_t iicbb_get_node(device_t, device_t); +#endif static device_method_t iicbb_methods[] = { /* device interface */ @@ -98,6 +108,11 @@ static device_method_t iicbb_methods[] = DEVMETHOD(iicbus_reset, iicbb_reset), DEVMETHOD(iicbus_transfer, iicbb_transfer), +#ifdef FDT + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_node, iicbb_get_node), +#endif + { 0, 0 } }; @@ -154,6 +169,16 @@ iicbb_detach(device_t dev) return (0); } +#ifdef FDT +static phandle_t +iicbb_get_node(device_t bus, device_t dev) +{ + + /* We only have one child, the I2C bus, which needs our own node. */ + return (ofw_bus_get_node(bus)); +} +#endif + static void iicbb_child_detached( device_t dev, device_t child ) { Modified: head/sys/dev/ofw/ofw_iicbus.c ============================================================================== --- head/sys/dev/ofw/ofw_iicbus.c Thu Feb 13 17:58:52 2014 (r261843) +++ head/sys/dev/ofw/ofw_iicbus.c Thu Feb 13 18:22:49 2014 (r261844) @@ -80,6 +80,7 @@ static devclass_t ofwiicbus_devclass; DEFINE_CLASS_1(iicbus, ofw_iicbus_driver, ofw_iicbus_methods, sizeof(struct iicbus_softc), iicbus_driver); +DRIVER_MODULE(ofw_iicbus, iicbb, ofw_iicbus_driver, ofwiicbus_devclass, 0, 0); DRIVER_MODULE(ofw_iicbus, iichb, ofw_iicbus_driver, ofwiicbus_devclass, 0, 0); MODULE_VERSION(ofw_iicbus, 1); MODULE_DEPEND(ofw_iicbus, iicbus, 1, 1, 1); From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 18:42:24 2014 Return-Path: Delivered-To: svn-src-all@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 349B426D; Thu, 13 Feb 2014 18:42: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 0252914CF; Thu, 13 Feb 2014 18:42:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1DIgNCY003444; Thu, 13 Feb 2014 18:42:23 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1DIgNjn003441; Thu, 13 Feb 2014 18:42:23 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201402131842.s1DIgNjn003441@svn.freebsd.org> From: Luiz Otavio O Souza Date: Thu, 13 Feb 2014 18:42:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261845 - in head/sys/arm: broadcom/bcm2835 ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 18:42:24 -0000 Author: loos Date: Thu Feb 13 18:42:23 2014 New Revision: 261845 URL: http://svnweb.freebsd.org/changeset/base/261845 Log: Allow the use of the OFW GPIO bus for ti_gpio and bcm2835_gpio. With this change the gpio children can be described as directly connected to the GPIO controller without the need of describing the OFW GPIO bus itself on the DTS file. With this commit the OFW GPIO bus is fully functional on BBB and RPi. GPIO controllers which want to use the OFW GPIO bus will need similar changes. Approved by: adrian (mentor, implicit) Modified: head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c head/sys/arm/ti/ti_gpio.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Thu Feb 13 18:22:49 2014 (r261844) +++ head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Thu Feb 13 18:42:23 2014 (r261845) @@ -766,6 +766,14 @@ bcm_gpio_detach(device_t dev) return (EBUSY); } +static phandle_t +bcm_gpio_get_node(device_t bus, device_t dev) +{ + + /* We only have one child, the GPIO bus, which needs our own node. */ + return (ofw_bus_get_node(bus)); +} + static device_method_t bcm_gpio_methods[] = { /* Device interface */ DEVMETHOD(device_probe, bcm_gpio_probe), @@ -782,6 +790,9 @@ static device_method_t bcm_gpio_methods[ DEVMETHOD(gpio_pin_set, bcm_gpio_pin_set), DEVMETHOD(gpio_pin_toggle, bcm_gpio_pin_toggle), + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_node, bcm_gpio_get_node), + DEVMETHOD_END }; Modified: head/sys/arm/ti/ti_gpio.c ============================================================================== --- head/sys/arm/ti/ti_gpio.c Thu Feb 13 18:22:49 2014 (r261844) +++ head/sys/arm/ti/ti_gpio.c Thu Feb 13 18:42:23 2014 (r261845) @@ -792,6 +792,14 @@ ti_gpio_detach(device_t dev) return(0); } +static phandle_t +ti_gpio_get_node(device_t bus, device_t dev) +{ + + /* We only have one child, the GPIO bus, which needs our own node. */ + return (ofw_bus_get_node(bus)); +} + static device_method_t ti_gpio_methods[] = { DEVMETHOD(device_probe, ti_gpio_probe), DEVMETHOD(device_attach, ti_gpio_attach), @@ -806,6 +814,10 @@ static device_method_t ti_gpio_methods[] DEVMETHOD(gpio_pin_get, ti_gpio_pin_get), DEVMETHOD(gpio_pin_set, ti_gpio_pin_set), DEVMETHOD(gpio_pin_toggle, ti_gpio_pin_toggle), + + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_node, ti_gpio_get_node), + {0, 0}, }; From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 18:51:38 2014 Return-Path: Delivered-To: svn-src-all@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 3EAFE568; Thu, 13 Feb 2014 18:51: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 1EE9C15A7; Thu, 13 Feb 2014 18:51:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1DIpbf7007132; Thu, 13 Feb 2014 18:51:37 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1DIpb49007128; Thu, 13 Feb 2014 18:51:37 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201402131851.s1DIpb49007128@svn.freebsd.org> From: Luiz Otavio O Souza Date: Thu, 13 Feb 2014 18:51:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261846 - in head/sys: arm/conf boot/fdt/dts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 18:51:38 -0000 Author: loos Date: Thu Feb 13 18:51:37 2014 New Revision: 261846 URL: http://svnweb.freebsd.org/changeset/base/261846 Log: Make the gpioled(4) work out of the box on BBB. Add gpioled(4) to BEAGLEBONE kernel and add the description of the four on-board leds of beaglebone-black to its DTS file. Approved by: adrian (mentor, implicit) Modified: head/sys/arm/conf/BEAGLEBONE head/sys/boot/fdt/dts/beaglebone-black.dts Modified: head/sys/arm/conf/BEAGLEBONE ============================================================================== --- head/sys/arm/conf/BEAGLEBONE Thu Feb 13 18:42:23 2014 (r261845) +++ head/sys/arm/conf/BEAGLEBONE Thu Feb 13 18:51:37 2014 (r261846) @@ -101,6 +101,7 @@ device am335x_pmic # AM335x Power Mana # GPIO device gpio +device gpioled # USB support device usb Modified: head/sys/boot/fdt/dts/beaglebone-black.dts ============================================================================== --- head/sys/boot/fdt/dts/beaglebone-black.dts Thu Feb 13 18:42:23 2014 (r261845) +++ head/sys/boot/fdt/dts/beaglebone-black.dts Thu Feb 13 18:51:37 2014 (r261846) @@ -147,6 +147,30 @@ } }; + leds { + compatible = "gpio-leds"; + + led1 { + gpios = <&GPIO 53 2 0>; + name = "led1"; + }; + + led2 { + gpios = <&GPIO 54 2 0>; + name = "led2"; + }; + + led3 { + gpios = <&GPIO 55 2 0>; + name = "led3"; + }; + + led4 { + gpios = <&GPIO 56 2 0>; + name = "led4"; + }; + }; + chosen { stdin = "uart0"; stdout = "uart0"; From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 19:09:04 2014 Return-Path: Delivered-To: svn-src-all@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 D6321A9F; Thu, 13 Feb 2014 19:09: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 B346916D3; Thu, 13 Feb 2014 19:09:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1DJ943b012149; Thu, 13 Feb 2014 19:09:04 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1DJ947Y012148; Thu, 13 Feb 2014 19:09:04 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201402131909.s1DJ947Y012148@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Thu, 13 Feb 2014 19:09:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261847 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 19:09:04 -0000 Author: melifaro Date: Thu Feb 13 19:09:04 2014 New Revision: 261847 URL: http://svnweb.freebsd.org/changeset/base/261847 Log: Further simplify nd6_output_lle. Currently we have 3 usage patterns: 1) nd6_output (most traffic flow, no lle supplied, lle RLOCK sufficient) 2) corner cases for output (no lle, STALE lle, so on). lle WLOCK needed. 3) nd* iunternal machinery (WLOCK'ed lle provided, perform packet queing). We separate case 1 and implement it inside its only customer - nd6_output. This leads to some code duplication (especialy SEND stuff, which should be hooked to output in a different way), but simplifies locking and control flow logic fir nd6_output_lle. Reviewed by: ae MFC after: 3 weeks Sponsored by: Yandex LLC Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Thu Feb 13 18:51:37 2014 (r261846) +++ head/sys/netinet6/nd6.c Thu Feb 13 19:09:04 2014 (r261847) @@ -1832,34 +1832,114 @@ nd6_slowtimo(void *arg) CURVNET_RESTORE(); } +/* + * IPv6 packet output - light version. + * Checks if destination LLE exists and is in proper state + * (e.g no modification required). If not true, fall back to + * "heavy" version. + */ int -nd6_output(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m0, +nd6_output(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m, struct sockaddr_in6 *dst, struct rtentry *rt0) { + struct llentry *ln = NULL; + int error = 0; + + /* discard the packet if IPv6 operation is disabled on the interface */ + if ((ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED)) { + m_freem(m); + return (ENETDOWN); /* better error? */ + } + + if (IN6_IS_ADDR_MULTICAST(&dst->sin6_addr)) + goto sendpkt; + + if (nd6_need_cache(ifp) == 0) + goto sendpkt; + + IF_AFDATA_RLOCK(ifp); + ln = nd6_lookup(&dst->sin6_addr, 0, ifp); + IF_AFDATA_RUNLOCK(ifp); + + /* + * Perform fast path for the following cases: + * 1) lle state is REACHABLE + * 2) lle state is DELAY (NS message sentNS message sent) + * + * Every other case involves lle modification, so we handle + * them separately. + */ + if (ln == NULL || (ln->ln_state != ND6_LLINFO_REACHABLE && + ln->ln_state != ND6_LLINFO_DELAY)) { + /* Fall back to slow processing path */ + if (ln != NULL) + LLE_RUNLOCK(ln); + return (nd6_output_lle(ifp, origifp, m, dst, rt0, NULL, NULL)); + } + +sendpkt: + if (ln != NULL) + LLE_RUNLOCK(ln); + +#ifdef MAC + mac_netinet6_nd6_send(ifp, m); +#endif + + /* + * If called from nd6_ns_output() (NS), nd6_na_output() (NA), + * icmp6_redirect_output() (REDIRECT) or from rip6_output() (RS, RA + * as handled by rtsol and rtadvd), mbufs will be tagged for SeND + * to be diverted to user space. When re-injected into the kernel, + * send_output() will directly dispatch them to the outgoing interface. + */ + if (send_sendso_input_hook != NULL) { + struct m_tag *mtag; + struct ip6_hdr *ip6; + int ip6len; + mtag = m_tag_find(m, PACKET_TAG_ND_OUTGOING, NULL); + if (mtag != NULL) { + ip6 = mtod(m, struct ip6_hdr *); + ip6len = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen); + /* Use the SEND socket */ + error = send_sendso_input_hook(m, ifp, SND_OUT, + ip6len); + /* -1 == no app on SEND socket */ + if (error == 0 || error != -1) + return (error); + } + } + + m_clrprotoflags(m); /* Avoid confusing lower layers. */ + IP_PROBE(send, NULL, NULL, mtod(m, struct ip6_hdr *), ifp, NULL, + mtod(m, struct ip6_hdr *)); - return (nd6_output_lle(ifp, origifp, m0, dst, rt0, NULL, NULL)); + if ((ifp->if_flags & IFF_LOOPBACK) == 0) + origifp = ifp; + + error = (*ifp->if_output)(origifp, m, (struct sockaddr *)dst, NULL); + return (error); } /* - * Note that I'm not enforcing any global serialization - * lle state or asked changes here as the logic is too - * complicated to avoid having to always acquire an exclusive - * lock - * KMM + * Output IPv6 packet - heavy version. + * Function assume that either + * 1) destination LLE does not exist, is invalid or stale, so + * ND6_EXCLUSIVE lock needs to be acquired + * 2) destination lle is provided (with ND6_EXCLUSIVE lock), + * in that case packets are queued in &chain. * */ int -nd6_output_lle(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m0, +nd6_output_lle(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m, struct sockaddr_in6 *dst, struct rtentry *rt0, struct llentry *lle, struct mbuf **chain) { - struct mbuf *m = m0; struct m_tag *mtag; - struct llentry *ln = lle; struct ip6_hdr *ip6; int error = 0; int flags = 0; + int has_lle = 0; int ip6len; #ifdef INVARIANTS @@ -1877,6 +1957,9 @@ nd6_output_lle(struct ifnet *ifp, struct return (ENETDOWN); /* better error? */ } + if (lle != NULL) + has_lle = 1; + if (IN6_IS_ADDR_MULTICAST(&dst->sin6_addr)) goto sendpkt; @@ -1884,23 +1967,16 @@ nd6_output_lle(struct ifnet *ifp, struct goto sendpkt; /* - * next hop determination. This routine is derived from ether_output. - */ - - /* * Address resolution or Neighbor Unreachability Detection * for the next hop. * At this point, the destination of the packet must be a unicast * or an anycast address(i.e. not a multicast). */ - - flags = (lle != NULL) ? LLE_EXCLUSIVE : 0; - if (ln == NULL) { - retry: + if (lle == NULL) { IF_AFDATA_RLOCK(ifp); - ln = lla_lookup(LLTABLE6(ifp), flags, (struct sockaddr *)dst); + lle = nd6_lookup(&dst->sin6_addr, ND6_EXCLUSIVE, ifp); IF_AFDATA_RUNLOCK(ifp); - if ((ln == NULL) && nd6_is_addr_neighbor(dst, ifp)) { + if ((lle == NULL) && nd6_is_addr_neighbor(dst, ifp)) { /* * Since nd6_is_addr_neighbor() internally calls nd6_lookup(), * the condition below is not very efficient. But we believe @@ -1908,34 +1984,31 @@ nd6_output_lle(struct ifnet *ifp, struct */ flags = ND6_CREATE | ND6_EXCLUSIVE; IF_AFDATA_LOCK(ifp); - ln = nd6_lookup(&dst->sin6_addr, flags, ifp); + lle = nd6_lookup(&dst->sin6_addr, flags, ifp); IF_AFDATA_UNLOCK(ifp); } } - if (ln == NULL) { + if (lle == NULL) { if ((ifp->if_flags & IFF_POINTOPOINT) == 0 && !(ND_IFINFO(ifp)->flags & ND6_IFF_PERFORMNUD)) { char ip6buf[INET6_ADDRSTRLEN]; log(LOG_DEBUG, "nd6_output: can't allocate llinfo for %s " "(ln=%p)\n", - ip6_sprintf(ip6buf, &dst->sin6_addr), ln); + ip6_sprintf(ip6buf, &dst->sin6_addr), lle); m_freem(m); return (ENOBUFS); } goto sendpkt; /* send anyway */ } + LLE_WLOCK_ASSERT(lle); + /* We don't have to do link-layer address resolution on a p2p link. */ if ((ifp->if_flags & IFF_POINTOPOINT) != 0 && - ln->ln_state < ND6_LLINFO_REACHABLE) { - if ((flags & LLE_EXCLUSIVE) == 0) { - flags |= LLE_EXCLUSIVE; - LLE_RUNLOCK(ln); - goto retry; - } - ln->ln_state = ND6_LLINFO_STALE; - nd6_llinfo_settimer_locked(ln, (long)V_nd6_gctimer * hz); + lle->ln_state < ND6_LLINFO_REACHABLE) { + lle->ln_state = ND6_LLINFO_STALE; + nd6_llinfo_settimer_locked(lle, (long)V_nd6_gctimer * hz); } /* @@ -1945,15 +2018,10 @@ nd6_output_lle(struct ifnet *ifp, struct * neighbor unreachability detection on expiration. * (RFC 2461 7.3.3) */ - if (ln->ln_state == ND6_LLINFO_STALE) { - if ((flags & LLE_EXCLUSIVE) == 0) { - flags |= LLE_EXCLUSIVE; - LLE_RUNLOCK(ln); - goto retry; - } - ln->la_asked = 0; - ln->ln_state = ND6_LLINFO_DELAY; - nd6_llinfo_settimer_locked(ln, (long)V_nd6_delay * hz); + if (lle->ln_state == ND6_LLINFO_STALE) { + lle->la_asked = 0; + lle->ln_state = ND6_LLINFO_DELAY; + nd6_llinfo_settimer_locked(lle, (long)V_nd6_delay * hz); } /* @@ -1961,7 +2029,7 @@ nd6_output_lle(struct ifnet *ifp, struct * (i.e. its link-layer address is already resolved), just * send the packet. */ - if (ln->ln_state > ND6_LLINFO_INCOMPLETE) + if (lle->ln_state > ND6_LLINFO_INCOMPLETE) goto sendpkt; /* @@ -1971,23 +2039,15 @@ nd6_output_lle(struct ifnet *ifp, struct * does not exceed nd6_maxqueuelen. When it exceeds nd6_maxqueuelen, * the oldest packet in the queue will be removed. */ - if (ln->ln_state == ND6_LLINFO_NOSTATE) - ln->ln_state = ND6_LLINFO_INCOMPLETE; + if (lle->ln_state == ND6_LLINFO_NOSTATE) + lle->ln_state = ND6_LLINFO_INCOMPLETE; - if ((flags & LLE_EXCLUSIVE) == 0) { - flags |= LLE_EXCLUSIVE; - LLE_RUNLOCK(ln); - goto retry; - } - - LLE_WLOCK_ASSERT(ln); - - if (ln->la_hold) { + if (lle->la_hold != NULL) { struct mbuf *m_hold; int i; i = 0; - for (m_hold = ln->la_hold; m_hold; m_hold = m_hold->m_nextpkt) { + for (m_hold = lle->la_hold; m_hold; m_hold = m_hold->m_nextpkt){ i++; if (m_hold->m_nextpkt == NULL) { m_hold->m_nextpkt = m; @@ -1995,35 +2055,34 @@ nd6_output_lle(struct ifnet *ifp, struct } } while (i >= V_nd6_maxqueuelen) { - m_hold = ln->la_hold; - ln->la_hold = ln->la_hold->m_nextpkt; + m_hold = lle->la_hold; + lle->la_hold = lle->la_hold->m_nextpkt; m_freem(m_hold); i--; } } else { - ln->la_hold = m; + lle->la_hold = m; } /* * If there has been no NS for the neighbor after entering the * INCOMPLETE state, send the first solicitation. */ - if (!ND6_LLINFO_PERMANENT(ln) && ln->la_asked == 0) { - ln->la_asked++; + if (!ND6_LLINFO_PERMANENT(lle) && lle->la_asked == 0) { + lle->la_asked++; - nd6_llinfo_settimer_locked(ln, + nd6_llinfo_settimer_locked(lle, (long)ND_IFINFO(ifp)->retrans * hz / 1000); - LLE_WUNLOCK(ln); - nd6_ns_output(ifp, NULL, &dst->sin6_addr, ln, 0); - if (lle != NULL && ln == lle) + LLE_WUNLOCK(lle); + nd6_ns_output(ifp, NULL, &dst->sin6_addr, lle, 0); + if (has_lle != 0) LLE_WLOCK(lle); - - } else if (lle == NULL || ln != lle) { + } else if (has_lle == 0) { /* * We did the lookup (no lle arg) so we * need to do the unlock here. */ - LLE_WUNLOCK(ln); + LLE_WUNLOCK(lle); } return (0); @@ -2033,12 +2092,8 @@ nd6_output_lle(struct ifnet *ifp, struct * ln is valid and the caller did not pass in * an llentry */ - if ((ln != NULL) && (lle == NULL)) { - if (flags & LLE_EXCLUSIVE) - LLE_WUNLOCK(ln); - else - LLE_RUNLOCK(ln); - } + if (lle != NULL && has_lle == 0) + LLE_WUNLOCK(lle); #ifdef MAC mac_netinet6_nd6_send(ifp, m); @@ -2072,7 +2127,7 @@ nd6_output_lle(struct ifnet *ifp, struct * a list of mbufs to send and transmit them in the caller * after the lock is dropped */ - if (lle != NULL) { + if (has_lle != 0) { if (*chain == NULL) *chain = m; else { From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 19:14:24 2014 Return-Path: Delivered-To: svn-src-all@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 2C38DE57; Thu, 13 Feb 2014 19:14: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 180EA176E; Thu, 13 Feb 2014 19:14:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1DJENAG015614; Thu, 13 Feb 2014 19:14:23 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1DJENsW015613; Thu, 13 Feb 2014 19:14:23 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402131914.s1DJENsW015613@svn.freebsd.org> From: Ian Lepore Date: Thu, 13 Feb 2014 19:14:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261848 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 19:14:24 -0000 Author: ian Date: Thu Feb 13 19:14:23 2014 New Revision: 261848 URL: http://svnweb.freebsd.org/changeset/base/261848 Log: Remove a couple obsolete function declarations. Modified: head/sys/arm/freescale/imx/imx_machdep.h Modified: head/sys/arm/freescale/imx/imx_machdep.h ============================================================================== --- head/sys/arm/freescale/imx/imx_machdep.h Thu Feb 13 19:09:04 2014 (r261847) +++ head/sys/arm/freescale/imx/imx_machdep.h Thu Feb 13 19:14:23 2014 (r261848) @@ -33,7 +33,6 @@ /* Common functions, implemented in imx_machdep.c. */ -void imx_devmap_addentry(vm_paddr_t _pa, vm_size_t _sz); void imx_wdog_cpu_reset(vm_offset_t _wdcr_phys) __attribute__((__noreturn__)); /* From here down, routines are implemented in imxNN_machdep.c. */ @@ -57,8 +56,6 @@ void imx_wdog_cpu_reset(vm_offset_t _wdc u_int imx_soc_type(void); u_int imx_soc_family(void); -void imx_devmap_init(void); - /* * We need a clock management system that works across unrelated SoCs and * devices. For now, to keep imx development moving, define some barebones From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 19:46:49 2014 Return-Path: Delivered-To: svn-src-all@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 12374C26; Thu, 13 Feb 2014 19:46: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 E29361A8A; Thu, 13 Feb 2014 19:46:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1DJkmn8027205; Thu, 13 Feb 2014 19:46:48 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1DJkm6S027204; Thu, 13 Feb 2014 19:46:48 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201402131946.s1DJkm6S027204@svn.freebsd.org> From: Alan Somers Date: Thu, 13 Feb 2014 19:46: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: r261849 - 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-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 19:46:49 -0000 Author: asomers Date: Thu Feb 13 19:46:48 2014 New Revision: 261849 URL: http://svnweb.freebsd.org/changeset/base/261849 Log: MFC r261132 Fix the build so -DNO_TESTS is passed in various phases that don't require tests in order to build or install. Crucially, don't try to install tests during the lib32 install phase. This commit supersedes r261081, which fixed the lib32 install phase problem, but didn't fix other phases. Submitted by: Garrett Cooper Reviewed by: sjg Modified: stable/10/Makefile.inc1 Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Thu Feb 13 19:14:23 2014 (r261848) +++ stable/10/Makefile.inc1 Thu Feb 13 19:46:48 2014 (r261849) @@ -246,7 +246,7 @@ BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ SSP_CFLAGS= \ -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \ -DNO_PIC -DNO_PROFILE -DNO_SHARED \ - -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD + -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD -DNO_TESTS # build-tools stage TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ @@ -256,12 +256,12 @@ TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ BOOTSTRAPPING=${OSRELDATE} \ SSP_CFLAGS= \ -DNO_LINT \ - -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD + -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD -DNO_TESTS # cross-tools stage XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - -DWITHOUT_GDB + -DWITHOUT_GDB -DNO_TESTS # world stage WMAKEENV= ${CROSSENV} \ @@ -399,7 +399,8 @@ LIB32WMAKEFLAGS+= \ -DLIBRARIES_ONLY \ -DNO_CPU_CFLAGS \ -DNO_CTF \ - -DNO_LINT + -DNO_LINT \ + -DNO_TESTS LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} ${LIB32WMAKEFLAGS} \ -DWITHOUT_MAN -DWITHOUT_INFO -DWITHOUT_HTML @@ -553,7 +554,7 @@ _libraries: @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; \ ${WMAKE} -DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \ - -DWITHOUT_MAN -DNO_PROFILE libraries + -DWITHOUT_MAN -DNO_PROFILE -DNO_TESTS libraries _depend: @echo @echo "--------------------------------------------------------------" @@ -1494,7 +1495,12 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 ${_secure_lib_libcrypto} ${_lib_libldns} \ ${_secure_lib_libssh} ${_secure_lib_libssl} -.if ${MK_TESTS} != "no" +.if defined(WITH_ATF) || ${MK_TESTS} != "no" +.if !defined(WITH_ATF) +# Ensure that the ATF libraries will be built during make libraries, even +# though they will have -DNO_TESTS +MAKE+= -DWITH_ATF +.endif _lib_atf= lib/atf .endif @@ -1863,7 +1869,7 @@ XDEV_CPUTYPE?=${TARGET_CPUTYPE} NOFUN=-DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \ -DWITHOUT_MAN -DWITHOUT_NLS -DNO_PROFILE \ - -DWITHOUT_KERBEROS -DWITHOUT_RESCUE -DNO_WARNS \ + -DWITHOUT_KERBEROS -DWITHOUT_RESCUE -DNO_TESTS -DNO_WARNS \ TARGET=${XDEV} TARGET_ARCH=${XDEV_ARCH} \ CPUTYPE=${XDEV_CPUTYPE} From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 21:01:35 2014 Return-Path: Delivered-To: svn-src-all@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 B246934A; Thu, 13 Feb 2014 21:01:35 +0000 (UTC) Received: from i3mail.icecube.wisc.edu (i3mail.icecube.wisc.edu [128.104.255.23]) by mx1.freebsd.org (Postfix) with ESMTP id 825FD13A8; Thu, 13 Feb 2014 21:01:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by i3mail.icecube.wisc.edu (Postfix) with ESMTP id 6FDC738067; Thu, 13 Feb 2014 15:01:34 -0600 (CST) X-Virus-Scanned: amavisd-new at icecube.wisc.edu Received: from i3mail.icecube.wisc.edu ([127.0.0.1]) by localhost (i3mail.icecube.wisc.edu [127.0.0.1]) (amavisd-new, port 10030) with ESMTP id fug5vjVjZITZ; Thu, 13 Feb 2014 15:01:34 -0600 (CST) Received: from terminus.icecube.wisc.edu (terminus.icecube.wisc.edu [172.16.223.97]) by i3mail.icecube.wisc.edu (Postfix) with ESMTPSA id 5E6E238066; Thu, 13 Feb 2014 15:01:34 -0600 (CST) Message-ID: <52FD32AE.7030006@freebsd.org> Date: Thu, 13 Feb 2014 15:01:34 -0600 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Luiz Otavio O Souza , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r261843 - in head: share/man/man4 sys/dev/gpio References: <201402131758.s1DHwqFA084060@svn.freebsd.org> In-Reply-To: <201402131758.s1DHwqFA084060@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 21:01:35 -0000 On 02/13/14 11:58, Luiz Otavio O Souza wrote: > Author: loos > Date: Thu Feb 13 17:58:52 2014 > New Revision: 261843 > URL: http://svnweb.freebsd.org/changeset/base/261843 > > Log: > Add OFW support to the in tree gpio compatible devices: gpioiic(4) and > gpioled(4). > > Tested on RPi and BBB (using the hardware I2C controller and gpioiic(4) for > the I2C tests). It was also verified for regressions on RSPRO (MIPS/ar71xx) > used as reference for a non OFW-based system. > > Update the gpioled(4) and gpioiic(4) man pages with some details and > examples about the FDT/OFW support. > > Some compatibility details pointed out by imp@ will follow in subsequent > commits. > > Approved by: adrian (mentor, implicit) > Is there a reason gpioled has an identify() method? Usually enumerable buses like OF buses wouldn't have something like that. -Nathan From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 21:06:50 2014 Return-Path: Delivered-To: svn-src-all@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 CD5D5934; Thu, 13 Feb 2014 21:06:50 +0000 (UTC) Received: from i3mail.icecube.wisc.edu (i3mail.icecube.wisc.edu [128.104.255.23]) by mx1.freebsd.org (Postfix) with ESMTP id 84BBD1423; Thu, 13 Feb 2014 21:06:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by i3mail.icecube.wisc.edu (Postfix) with ESMTP id 43F4D38065; Thu, 13 Feb 2014 14:59:09 -0600 (CST) X-Virus-Scanned: amavisd-new at icecube.wisc.edu Received: from i3mail.icecube.wisc.edu ([127.0.0.1]) by localhost (i3mail.icecube.wisc.edu [127.0.0.1]) (amavisd-new, port 10030) with ESMTP id exM5hl64LBjO; Thu, 13 Feb 2014 14:59:09 -0600 (CST) Received: from terminus.icecube.wisc.edu (terminus.icecube.wisc.edu [172.16.223.97]) by i3mail.icecube.wisc.edu (Postfix) with ESMTPSA id 3381F38040; Thu, 13 Feb 2014 14:59:09 -0600 (CST) Message-ID: <52FD321D.7010105@freebsd.org> Date: Thu, 13 Feb 2014 14:59:09 -0600 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Luiz Otavio O Souza , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r261842 - in head/sys: conf dev/gpio References: <201402131708.s1DH8UJ7063297@svn.freebsd.org> In-Reply-To: <201402131708.s1DH8UJ7063297@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 21:06:51 -0000 On 02/13/14 11:08, Luiz Otavio O Souza wrote: > Author: loos > Date: Thu Feb 13 17:08:29 2014 > New Revision: 261842 > URL: http://svnweb.freebsd.org/changeset/base/261842 > > Log: > Add an OFW GPIO compatible bus. This allows the use of the DTS files to > describe GPIO bindings in the system. > > Move the GPIOBUS lock macros to gpiobusvar.h as they are now shared between > the OFW and the non OFW versions of GPIO bus. > > Export gpiobus_print_pins() so it can also be used on the OFW GPIO bus. > > Approved by: adrian (mentor, implicit) > > Added: > head/sys/dev/gpio/ofw_gpiobus.c (contents, props changed) > Modified: > head/sys/conf/files > head/sys/dev/gpio/gpiobus.c > head/sys/dev/gpio/gpiobusvar.h > > > > Added: head/sys/dev/gpio/ofw_gpiobus.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/dev/gpio/ofw_gpiobus.c Thu Feb 13 17:08:29 2014 (r261842) > @@ -0,0 +1,338 @@ > +/*- > + * Copyright (c) 2009, Nathan Whitehorn > + * Copyright (c) 2013, Luiz Otavio O Souza > + * Copyright (c) 2013 The FreeBSD Foundation > + * 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 unmodified, 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 ``AS IS'' AND ANY EXPRESS OR > + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES > + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. > + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, > + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT > + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, > + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY > + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF > + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include > + > is there a reason you include fdt_common.h here? Nothing here seems to be FDT specific, rather than for Open Firmware generally. -Nathan From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 21:30:55 2014 Return-Path: Delivered-To: svn-src-all@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 5F5CA113; Thu, 13 Feb 2014 21:30:55 +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 3DF0D168F; Thu, 13 Feb 2014 21:30:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1DLUt4Q069745; Thu, 13 Feb 2014 21:30:55 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1DLUtde069744; Thu, 13 Feb 2014 21:30:55 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201402132130.s1DLUtde069744@svn.freebsd.org> From: Andrew Turner Date: Thu, 13 Feb 2014 21:30:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261855 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 21:30:55 -0000 Author: andrew Date: Thu Feb 13 21:30:54 2014 New Revision: 261855 URL: http://svnweb.freebsd.org/changeset/base/261855 Log: Allow the kernel to be loaded at any 1MiB address. This requirement is because we use the 1MiB section maps as they only need a single pagetable. To allow this we only use pc relative loads to ensure we only load from physical addresses until we are running from a known virtual address. As a side effect any data from before or 64MiB after the kernel needs to be mapped in to be used. This should not be an issue for kernels loaded with ubldr as it places this data just after the kernel. It will be a problem when loading directly from anything using the Linux ABI that places the ATAG data outside this range, for example U-Boot. Modified: head/sys/arm/arm/locore.S Modified: head/sys/arm/arm/locore.S ============================================================================== --- head/sys/arm/arm/locore.S Thu Feb 13 20:41:25 2014 (r261854) +++ head/sys/arm/arm/locore.S Thu Feb 13 21:30:54 2014 (r261855) @@ -148,15 +148,31 @@ Lunmapped: * Build page table from scratch. */ - /* Load the page tables physical address */ - ldr r1, Lstartup_pagetable - ldr r2, =(KERNVIRTADDR - KERNPHYSADDR) + /* Find the delta between VA and PA */ + adr r0, Lpagetable + ldr r1, [r0] + sub r2, r1, r0 + /* At this point: r2 = VA - PA */ + + /* + * Find the physical address of the table. After these two + * instructions: + * r1 = va(pagetable) + * + * r0 = va(pagetable) - (VA - PA) + * = va(pagetable) - VA + PA + * = pa(pagetable) + */ + ldr r1, [r0, #4] sub r0, r1, r2 /* * Map PA == VA */ - ldr r5, =(PHYSADDR) + /* Find the start kernels load address */ + adr r5, _start + ldr r2, =(L1_S_OFFSET) + bic r5, r2 mov r1, r5 mov r2, r5 /* Map 64MiB, preserved over calls to build_pagetables */ @@ -165,7 +181,7 @@ Lunmapped: /* Create the kernel map to jump to */ mov r1, r5 - ldr r2, =(KERNBASE) + ldr r2, =(KERNVIRTADDR) bl build_pagetables #if defined(SOCDEV_PA) && defined(SOCDEV_VA) @@ -223,16 +239,16 @@ mmu_done: virt_done: mov r1, #28 /* loader info size is 28 bytes also second arg */ subs sp, sp, r1 /* allocate arm_boot_params struct on stack */ - bic sp, sp, #7 /* align stack to 8 bytes */ mov r0, sp /* loader info pointer is first arg */ + bic sp, sp, #7 /* align stack to 8 bytes */ str r1, [r0] /* Store length of loader info */ str r9, [r0, #4] /* Store r0 from boot loader */ str r8, [r0, #8] /* Store r1 from boot loader */ str ip, [r0, #12] /* store r2 from boot loader */ str fp, [r0, #16] /* store r3 from boot loader */ - ldr r5, =KERNPHYSADDR /* load KERNPHYSADDR as the physical address */ str r5, [r0, #20] /* store the physical address */ - ldr r5, Lstartup_pagetable + adr r4, Lpagetable /* load the pagetable address */ + ldr r5, [r4, #4] str r5, [r0, #24] /* store the pagetable address */ mov fp, #0 /* trace back starts here */ bl _C_LABEL(initarm) /* Off we go */ @@ -279,16 +295,19 @@ build_pagetables: RET +Lpagetable: + .word . + .word pagetable + Lvirtaddr: .word KERNVIRTADDR Lphysaddr: .word KERNPHYSADDR Lreal_start: .word _start -Lend: +Lend: .word _edata -Lstartup_pagetable: - .word pagetable + #ifdef SMP Lstartup_pagetable_secondary: .word temp_pagetable From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 22:19:26 2014 Return-Path: Delivered-To: svn-src-all@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 F2F53286; Thu, 13 Feb 2014 22:19: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 A7BEA1A38; Thu, 13 Feb 2014 22:19:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1DMJPHF087119; Thu, 13 Feb 2014 22:19:25 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1DMJPH8087115; Thu, 13 Feb 2014 22:19:25 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201402132219.s1DMJPH8087115@svn.freebsd.org> From: Alan Somers Date: Thu, 13 Feb 2014 22:19:25 +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: r261857 - in stable/10: etc/mtree tests tests/sys tools/regression/sockets/unix_seqpacket tools/regression/sockets/unix_seqpacket_exercise X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 22:19:26 -0000 Author: asomers Date: Thu Feb 13 22:19:24 2014 New Revision: 261857 URL: http://svnweb.freebsd.org/changeset/base/261857 Log: MFC r261081, r261133, and r261615 r261081 Replace the old unix_seqpacket and unix_seqpacket_exercise tests, which were a little broken and not automatable, with unix_seqpacket_test. It's coverage is a superset of the old tests and it uses ATF. It includes test cases for bugs kern/185813 and kern/185812. r261133 Fix the Makefiles so that the tests I submitted in r261081 will actually get built. r261615 tests/sys/Makefile use TESTS_SUBDIRS for kern instead of SUBDIRS. I don't think it makes a difference in this case, but TESTS_SUBDIRS is generally correct for subdirectories that contain tests. Added: stable/10/tests/sys/ - copied from r261081, head/tests/sys/ Deleted: stable/10/tools/regression/sockets/unix_seqpacket/ stable/10/tools/regression/sockets/unix_seqpacket_exercise/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/tests/Makefile stable/10/tests/sys/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Thu Feb 13 22:18:27 2014 (r261856) +++ stable/10/etc/mtree/BSD.tests.dist Thu Feb 13 22:19:24 2014 (r261857) @@ -48,6 +48,10 @@ .. .. .. + sys + kern + .. + .. usr.bin atf atf-sh Modified: stable/10/tests/Makefile ============================================================================== --- stable/10/tests/Makefile Thu Feb 13 22:18:27 2014 (r261856) +++ stable/10/tests/Makefile Thu Feb 13 22:19:24 2014 (r261857) @@ -2,7 +2,7 @@ .include -SUBDIR= # still empty +SUBDIR= sys TESTSDIR= ${TESTSBASE} KYUAFILE= yes Modified: stable/10/tests/sys/Makefile ============================================================================== --- head/tests/sys/Makefile Thu Jan 23 17:26:28 2014 (r261081) +++ stable/10/tests/sys/Makefile Thu Feb 13 22:19:24 2014 (r261857) @@ -2,12 +2,11 @@ .include +.PATH: ${.CURDIR}/.. + +TESTS_SUBDIRS+= kern TESTSDIR= ${TESTSBASE}/sys KYUAFILE= yes -CLEANFILES+= Kyuafile -Kyuafile: ${.CURDIR}/../Kyuafile - cp -f ${.CURDIR}/../Kyuafile . - .include From owner-svn-src-all@FreeBSD.ORG Thu Feb 13 22:24:37 2014 Return-Path: Delivered-To: svn-src-all@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 7EF62528; Thu, 13 Feb 2014 22:24:37 +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 680D81AC6; Thu, 13 Feb 2014 22:24:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1DMObTc090372; Thu, 13 Feb 2014 22:24:37 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1DMObK7090371; Thu, 13 Feb 2014 22:24:37 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402132224.s1DMObK7090371@svn.freebsd.org> From: Christian Brueffer Date: Thu, 13 Feb 2014 22:24:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261858 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 22:24:37 -0000 Author: brueffer Date: Thu Feb 13 22:24:36 2014 New Revision: 261858 URL: http://svnweb.freebsd.org/changeset/base/261858 Log: Fix a bug in be_uuid_dec(); it called le16dec() instead of be16dec(), probably due to copy+pasting le_uuid_dec(). PR: 146588 Submitted by: Erwin Rol Reviewed by: marcel MFC after: 1 week Modified: head/sys/kern/kern_uuid.c Modified: head/sys/kern/kern_uuid.c ============================================================================== --- head/sys/kern/kern_uuid.c Thu Feb 13 22:19:24 2014 (r261857) +++ head/sys/kern/kern_uuid.c Thu Feb 13 22:24:36 2014 (r261858) @@ -371,7 +371,7 @@ be_uuid_dec(void const *buf, struct uuid p = buf; uuid->time_low = be32dec(p); - uuid->time_mid = le16dec(p + 4); + uuid->time_mid = be16dec(p + 4); uuid->time_hi_and_version = be16dec(p + 6); uuid->clock_seq_hi_and_reserved = p[8]; uuid->clock_seq_low = p[9]; From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 00:05:10 2014 Return-Path: Delivered-To: svn-src-all@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 4CABA6E9; Fri, 14 Feb 2014 00:05: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 1CEF9145D; Fri, 14 Feb 2014 00:05:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1E059F6030527; Fri, 14 Feb 2014 00:05:09 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1E059Gh030523; Fri, 14 Feb 2014 00:05:09 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201402140005.s1E059Gh030523@svn.freebsd.org> From: Adrian Chadd Date: Fri, 14 Feb 2014 00:05:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261859 - in head: sys/net usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 00:05:10 -0000 Author: adrian Date: Fri Feb 14 00:05:09 2014 New Revision: 261859 URL: http://svnweb.freebsd.org/changeset/base/261859 Log: Don't insert a flowtable entry if the lle isn't yet valid. Some of the collisions that are occuring are due to flowtable lookups that succeed but have an invalid lle - typically because the L2 adjacency lookup hasn't completed. This would lead to a follow-up insert which would then fail (ie, collision) and the code would fall through to doing a slow-path L2/L3 lookup in the netinet/netinet6 code. This patch simply aborts storing a new flowtable entry if the lle isn't yet valid. Whilst I'm here, add a new pcpu counter for the item so the number of failures can be tracked separately from generic "collisions." Reviewed by: glebius MFC after: 10 days Sponsored by: Netflix, Inc. Modified: head/sys/net/flowtable.c head/sys/net/flowtable.h head/usr.bin/netstat/flowtable.c Modified: head/sys/net/flowtable.c ============================================================================== --- head/sys/net/flowtable.c Thu Feb 13 22:24:36 2014 (r261858) +++ head/sys/net/flowtable.c Fri Feb 14 00:05:09 2014 (r261859) @@ -966,6 +966,15 @@ flowtable_lookup_common(struct flowtable RTFREE(rt); return (NULL); } + + /* Don't insert the entry if the ARP hasn't yet finished resolving */ + if ((lle->la_flags & LLE_VALID) == 0) { + RTFREE(rt); + LLE_FREE(lle); + FLOWSTAT_INC(ft, ft_fail_lle_invalid); + return (NULL); + } + ro->ro_lle = lle; if (flowtable_insert(ft, hash, key, fibnum, ro, flags) != 0) { Modified: head/sys/net/flowtable.h ============================================================================== --- head/sys/net/flowtable.h Thu Feb 13 22:24:36 2014 (r261858) +++ head/sys/net/flowtable.h Fri Feb 14 00:05:09 2014 (r261859) @@ -39,6 +39,7 @@ struct flowtable_stat { uint64_t ft_frees; uint64_t ft_hits; uint64_t ft_lookups; + uint64_t ft_fail_lle_invalid; }; #ifdef _KERNEL Modified: head/usr.bin/netstat/flowtable.c ============================================================================== --- head/usr.bin/netstat/flowtable.c Thu Feb 13 22:24:36 2014 (r261858) +++ head/usr.bin/netstat/flowtable.c Fri Feb 14 00:05:09 2014 (r261859) @@ -55,6 +55,7 @@ print_stats(struct flowtable_stat *stat) p(ft_collisions, "\t%ju collision%s\n"); p(ft_free_checks, "\t%ju free check%s\n"); p(ft_frees, "\t%ju free%s\n"); + p(ft_fail_lle_invalid, "\t%ju lookups w/ no resolved ARP%s\n"); #undef p2 #undef p From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 00:26:31 2014 Return-Path: Delivered-To: svn-src-all@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 F3C03BAC; Fri, 14 Feb 2014 00:26: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 D8C1115FE; Fri, 14 Feb 2014 00:26:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1E0QUfk038638; Fri, 14 Feb 2014 00:26:30 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1E0QUOw038637; Fri, 14 Feb 2014 00:26:30 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201402140026.s1E0QUOw038637@svn.freebsd.org> From: "George V. Neville-Neil" Date: Fri, 14 Feb 2014 00:26: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: r261860 - 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-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 00:26:31 -0000 Author: gnn Date: Fri Feb 14 00:26:30 2014 New Revision: 261860 URL: http://svnweb.freebsd.org/changeset/base/261860 Log: MFC 260207 Convert #defines to enums so that the values are visible in the debugger. Requested by: gibbs Modified: stable/10/sys/net/sff8472.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/sff8472.h ============================================================================== --- stable/10/sys/net/sff8472.h Fri Feb 14 00:05:09 2014 (r261859) +++ stable/10/sys/net/sff8472.h Fri Feb 14 00:26:30 2014 (r261860) @@ -62,104 +62,107 @@ /* Table 3.1 Two-wire interface ID: Data Fields */ -#define SFF_8472_BASE 0xa0 /* Base address for all our queries. */ -#define SFF_8472_ID 0 /* Transceiver Type (Table 3.2) */ -#define SFF_8472_EXT_ID 1 /* Extended transceiver type (Table 3.3) */ -#define SFF_8472_CONNECTOR 2 /* Connector type (Table 3.4) */ -#define SFF_8472_TRANS_START 3 /* Elec or Optical Compatibility +enum { + SFF_8472_BASE = 0xa0, /* Base address for all our queries. */ + SFF_8472_ID = 0, /* Transceiver Type (Table 3.2) */ + SFF_8472_EXT_ID = 1, /* Extended transceiver type (Table 3.3) */ + SFF_8472_CONNECTOR = 2, /* Connector type (Table 3.4) */ + SFF_8472_TRANS_START = 3, /* Elec or Optical Compatibility * (Table 3.5) */ -#define SFF_8472_TRANS_END 10 -#define SFF_8472_ENCODING 11 /* Encoding Code for high speed - * serial encoding algorithm (see - * Table 3.6) */ -#define SFF_8472_BITRATE 12 /* Nominal signaling rate, units - * of 100MBd. (see details for - * rates > 25.0Gb/s) */ -#define SFF_8472_RATEID 13 /* Type of rate select - * functionality (see Table - * 3.6a) */ -#define SFF_8472_LEN_SMF_KM 14 /* Link length supported for single + SFF_8472_TRANS_END = 10, + SFF_8472_ENCODING = 11, /* Encoding Code for high speed + * serial encoding algorithm (see + * Table 3.6) */ + SFF_8472_BITRATE = 12, /* Nominal signaling rate, units + * of 100MBd. (see details for + * rates > 25.0Gb/s) */ + SFF_8472_RATEID = 13, /* Type of rate select + * functionality (see Table + * 3.6a) */ + SFF_8472_LEN_SMF_KM = 14, /* Link length supported for single * mode fiber, units of km */ -#define SFF_8472_LEN_SMF 15 /* Link length supported for single + SFF_8472_LEN_SMF = 15, /* Link length supported for single * mode fiber, units of 100 m */ -#define SFF_8472_LEN_50UM 16 /* Link length supported for 50 um + SFF_8472_LEN_50UM = 16, /* Link length supported for 50 um * OM2 fiber, units of 10 m */ -#define SFF_8472_LEN_625UM 17 /* Link length supported for 62.5 + SFF_8472_LEN_625UM = 17, /* Link length supported for 62.5 * um OM1 fiber, units of 10 m */ -#define SFF_8472_LEN_OM4 18 /* Link length supported for 50um + SFF_8472_LEN_OM4 = 18, /* Link length supported for 50um * OM4 fiber, units of 10m. * Alternatively copper or direct * attach cable, units of m */ -#define SFF_8472_LEN_OM3 19 /* Link length supported for 50 um OM3 fiber, units of 10 m */ -#define SFF_8472_VENDOR_START 20 /* Vendor name [Address A0h, Bytes + SFF_8472_LEN_OM3 = 19, /* Link length supported for 50 um OM3 fiber, units of 10 m */ + SFF_8472_VENDOR_START = 20, /* Vendor name [Address A0h, Bytes * 20-35] */ -#define SFF_8472_VENDOR_END 35 -#define SFF_8472_TRANS 36 /* Transceiver Code for electronic + SFF_8472_VENDOR_END = 35, + SFF_8472_TRANS = 36, /* Transceiver Code for electronic * or optical compatibility (see * Table 3.5) */ -#define SFF_8472_VENDOR_OUI_START 37 /* Vendor OUI SFP vendor IEEE + SFF_8472_VENDOR_OUI_START = 37, /* Vendor OUI SFP vendor IEEE * company ID */ -#define SFF_8472_VENDOR_OUI_END 39 -#define SFF_8472_PN_START 40 /* Vendor PN */ -#define SFF_8472_PN_END 55 -#define SFF_8472_REV_START 56 /* Vendor Revision */ -#define SFF_8472_REV_END 59 -#define SFF_8472_WAVELEN_START 60 /* Wavelength Laser wavelength + SFF_8472_VENDOR_OUI_END = 39, + SFF_8472_PN_START = 40, /* Vendor PN */ + SFF_8472_PN_END = 55, + SFF_8472_REV_START = 56, /* Vendor Revision */ + SFF_8472_REV_END = 59, + SFF_8472_WAVELEN_START = 60, /* Wavelength Laser wavelength * (Passive/Active Cable * Specification Compliance) */ -#define SFF_8472_WAVELEN_END 61 -#define SFF_8472_CC_BASE 63 /* CC_BASE Check code for Base ID + SFF_8472_WAVELEN_END = 61, + SFF_8472_CC_BASE = 63, /* CC_BASE Check code for Base ID * Fields (addresses 0 to 62) */ /* * Extension Fields (optional) check the options before reading other * addresses. */ -#define SFF_8472_OPTIONS_MSB 64 /* Options Indicates which optional + SFF_8472_OPTIONS_MSB = 64, /* Options Indicates which optional * transceiver signals are * implemented */ -#define SFF_8472_OPTIONS_LSB 65 /* (see Table 3.7) */ -#define SFF_8472_BR_MAX 66 /* BR max Upper bit rate margin, + SFF_8472_OPTIONS_LSB = 65, /* (see Table 3.7) */ + SFF_8472_BR_MAX = 66, /* BR max Upper bit rate margin, * units of % (see details for * rates > 25.0Gb/s) */ -#define SFF_8472_BR_MIN 67 /* Lower bit rate margin, units of + SFF_8472_BR_MIN = 67, /* Lower bit rate margin, units of * % (see details for rates > * 25.0Gb/s) */ -#define SFF_8472_SN_START 68 /* Vendor SN [Address A0h, Bytes 68-83] */ -#define SFF_8472_SN_END 83 -#define SFF_8472_DATE_START 84 /* Date code Vendor’s manufacturing + SFF_8472_SN_START = 68, /* Vendor SN [Address A0h, Bytes 68-83] */ + SFF_8472_SN_END = 83, + SFF_8472_DATE_START = 84, /* Date code Vendor’s manufacturing * date code (see Table 3.8) */ -#define SFF_8472_DATE_END 91 -#define SFF_8472_DIAG_TYPE 92 /* Diagnostic Monitoring Type + SFF_8472_DATE_END = 91, + SFF_8472_DIAG_TYPE = 92, /* Diagnostic Monitoring Type * Indicates which type of * diagnostic monitoring is * implemented (if any) in the * transceiver (see Table 3.9) */ -#define SFF_8472_DIAG_IMPL (1 << 6) /* Required to be 1 */ -#define SFF_8472_DIAG_INTERNAL (1 << 5) /* Internal measurements. */ -#define SFF_8472_DIAG_EXTERNAL (1 << 4) /* External measurements. */ -#define SFF_8472_DIAG_POWER (1 << 3) /* Power measurement type */ -#define SFF_8472_DIAG_ADDR_CHG (1 << 2) /* Address change required. - * See SFF-8472 doc. */ -#define SFF_8472_ENHANCED 93 /* Enhanced Options Indicates which + SFF_8472_ENHANCED = 93, /* Enhanced Options Indicates which * optional enhanced features are * implemented (if any) in the * transceiver (see Table 3.10) */ -#define SFF_8472_COMPLIANCE 94 /* SFF-8472 Compliance Indicates + SFF_8472_COMPLIANCE = 94, /* SFF-8472 Compliance Indicates * which revision of SFF-8472 the * transceiver complies with. (see * Table 3.12)*/ -#define SFF_8472_CC_EXT 95 /* Check code for the Extended ID + SFF_8472_CC_EXT = 95, /* Check code for the Extended ID * Fields (addresses 64 to 94) */ -#define SFF_8472_VENDOR_RSRVD_START 96 -#define SFF_8472_VENDOR_RSRVD_END 127 + SFF_8472_VENDOR_RSRVD_START = 96, + SFF_8472_VENDOR_RSRVD_END = 127, -#define SFF_8472_RESERVED_START 128 -#define SFF_8472_RESERVED_END 255 + SFF_8472_RESERVED_START = 128, + SFF_8472_RESERVED_END = 255 +}; + +#define SFF_8472_DIAG_IMPL (1 << 6) /* Required to be 1 */ +#define SFF_8472_DIAG_INTERNAL (1 << 5) /* Internal measurements. */ +#define SFF_8472_DIAG_EXTERNAL (1 << 4) /* External measurements. */ +#define SFF_8472_DIAG_POWER (1 << 3) /* Power measurement type */ +#define SFF_8472_DIAG_ADDR_CHG (1 << 2) /* Address change required. + * See SFF-8472 doc. */ /* * Diagnostics are available at the two wire address 0xa2. All @@ -167,77 +170,78 @@ * see which, if any are supported. */ -#define SFF_8472_DIAG 0xa2 /* Base address for diagnostics. */ +enum {SFF_8472_DIAG = 0xa2}; /* Base address for diagnostics. */ /* * Table 3.15 Alarm and Warning Thresholds All values are 2 bytes * and MUST be read in a single read operation starting at the MSB */ -#define SFF_8472_TEMP_HIGH_ALM 0 /* Temp High Alarm */ -#define SFF_8472_TEMP_LOW_ALM 2 /* Temp Low Alarm */ -#define SFF_8472_TEMP_HIGH_WARN 4 /* Temp High Warning */ -#define SFF_8472_TEMP_LOW_WARN 6 /* Temp Low Warning */ -#define SFF_8472_VOLTAGE_HIGH_ALM 8 /* Voltage High Alarm */ -#define SFF_8472_VOLTAGE_LOW_ALM 10 /* Voltage Low Alarm */ -#define SFF_8472_VOLTAGE_HIGH_WARN 12 /* Voltage High Warning */ -#define SFF_8472_VOLTAGE_LOW_WARN 14 /* Voltage Low Warning */ -#define SFF_8472_BIAS_HIGH_ALM 16 /* Bias High Alarm */ -#define SFF_8472_BIAS_LOW_ALM 18 /* Bias Low Alarm */ -#define SFF_8472_BIAS_HIGH_WARN 20 /* Bias High Warning */ -#define SFF_8472_BIAS_LOW_WARN 22 /* Bias Low Warning */ -#define SFF_8472_TX_POWER_HIGH_ALM 24 /* TX Power High Alarm */ -#define SFF_8472_TX_POWER_LOW_ALM 26 /* TX Power Low Alarm */ -#define SFF_8472_TX_POWER_HIGH_WARN 28 /* TX Power High Warning */ -#define SFF_8472_TX_POWER_LOW_WARN 30 /* TX Power Low Warning */ -#define SFF_8472_RX_POWER_HIGH_ALM 32 /* RX Power High Alarm */ -#define SFF_8472_RX_POWER_LOW_ALM 34 /* RX Power Low Alarm */ -#define SFF_8472_RX_POWER_HIGH_WARN 36 /* RX Power High Warning */ -#define SFF_8472_RX_POWER_LOW_WARN 38 /* RX Power Low Warning */ +enum { + SFF_8472_TEMP_HIGH_ALM = 0, /* Temp High Alarm */ + SFF_8472_TEMP_LOW_ALM = 2, /* Temp Low Alarm */ + SFF_8472_TEMP_HIGH_WARN = 4, /* Temp High Warning */ + SFF_8472_TEMP_LOW_WARN = 6, /* Temp Low Warning */ + SFF_8472_VOLTAGE_HIGH_ALM = 8, /* Voltage High Alarm */ + SFF_8472_VOLTAGE_LOW_ALM = 10, /* Voltage Low Alarm */ + SFF_8472_VOLTAGE_HIGH_WARN = 12, /* Voltage High Warning */ + SFF_8472_VOLTAGE_LOW_WARN = 14, /* Voltage Low Warning */ + SFF_8472_BIAS_HIGH_ALM = 16, /* Bias High Alarm */ + SFF_8472_BIAS_LOW_ALM = 18, /* Bias Low Alarm */ + SFF_8472_BIAS_HIGH_WARN = 20, /* Bias High Warning */ + SFF_8472_BIAS_LOW_WARN = 22, /* Bias Low Warning */ + SFF_8472_TX_POWER_HIGH_ALM = 24, /* TX Power High Alarm */ + SFF_8472_TX_POWER_LOW_ALM = 26, /* TX Power Low Alarm */ + SFF_8472_TX_POWER_HIGH_WARN = 28, /* TX Power High Warning */ + SFF_8472_TX_POWER_LOW_WARN = 30, /* TX Power Low Warning */ + SFF_8472_RX_POWER_HIGH_ALM = 32, /* RX Power High Alarm */ + SFF_8472_RX_POWER_LOW_ALM = 34, /* RX Power Low Alarm */ + SFF_8472_RX_POWER_HIGH_WARN = 36, /* RX Power High Warning */ + SFF_8472_RX_POWER_LOW_WARN = 38, /* RX Power Low Warning */ -#define SFF_8472_RX_POWER4 56 /* Rx_PWR(4) Single precision + SFF_8472_RX_POWER4 = 56, /* Rx_PWR(4) Single precision * floating point calibration data * - Rx optical power. Bit 7 of * byte 56 is MSB. Bit 0 of byte * 59 is LSB. Rx_PWR(4) should be * set to zero for “internally * calibrated” devices. */ -#define SFF_8472_RX_POWER3 60 /* Rx_PWR(3) Single precision + SFF_8472_RX_POWER3 = 60, /* Rx_PWR(3) Single precision * floating point calibration data * - Rx optical power. Bit 7 of * byte 60 is MSB. Bit 0 of byte 63 * is LSB. Rx_PWR(3) should be set * to zero for “internally * calibrated” devices.*/ -#define SFF_8472_RX_POWER2 64 /* Rx_PWR(2) Single precision + SFF_8472_RX_POWER2 = 64, /* Rx_PWR(2) Single precision * floating point calibration data, * Rx optical power. Bit 7 of byte * 64 is MSB, bit 0 of byte 67 is * LSB. Rx_PWR(2) should be set to * zero for “internally calibrated” * devices. */ -#define SFF_8472_RX_POWER1 68 /* Rx_PWR(1) Single precision + SFF_8472_RX_POWER1 = 68, /* Rx_PWR(1) Single precision * floating point calibration data, * Rx optical power. Bit 7 of byte * 68 is MSB, bit 0 of byte 71 is * LSB. Rx_PWR(1) should be set to * 1 for “internally calibrated” * devices. */ -#define SFF_8472_RX_POWER0 72 /* Rx_PWR(0) Single precision + SFF_8472_RX_POWER0 = 72, /* Rx_PWR(0) Single precision * floating point calibration data, * Rx optical power. Bit 7 of byte * 72 is MSB, bit 0 of byte 75 is * LSB. Rx_PWR(0) should be set to * zero for “internally calibrated” * devices. */ -#define SFF_8472_TX_I_SLOPE 76 /* Tx_I(Slope) Fixed decimal + SFF_8472_TX_I_SLOPE = 76, /* Tx_I(Slope) Fixed decimal * (unsigned) calibration data, * laser bias current. Bit 7 of * byte 76 is MSB, bit 0 of byte 77 * is LSB. Tx_I(Slope) should be * set to 1 for “internally * calibrated” devices. */ -#define SFF_8472_TX_I_OFFSET 78 /* Tx_I(Offset) Fixed decimal + SFF_8472_TX_I_OFFSET = 78, /* Tx_I(Offset) Fixed decimal * (signed two’s complement) * calibration data, laser bias * current. Bit 7 of byte 78 is @@ -245,7 +249,7 @@ * LSB. Tx_I(Offset) should be set * to zero for “internally * calibrated” devices. */ -#define SFF_8472_TX_POWER_SLOPE 80 /* Tx_PWR(Slope) Fixed decimal + SFF_8472_TX_POWER_SLOPE = 80, /* Tx_PWR(Slope) Fixed decimal * (unsigned) calibration data, * transmitter coupled output * power. Bit 7 of byte 80 is MSB, @@ -253,22 +257,22 @@ * Tx_PWR(Slope) should be set to 1 * for “internally calibrated” * devices. */ -#define SFF_8472_TX_POWER_OFFSET 82 /* Tx_PWR(Offset) Fixed decimal - * (signed two’s complement) - * calibration data, transmitter - * coupled output power. Bit 7 of - * byte 82 is MSB, bit 0 of byte 83 - * is LSB. Tx_PWR(Offset) should be - * set to zero for “internally - * calibrated” devices. */ -#define SFF_8472_T_SLOPE 84 /* T (Slope) Fixed decimal + SFF_8472_TX_POWER_OFFSET = 82, /* Tx_PWR(Offset) Fixed decimal + * (signed two’s complement) + * calibration data, transmitter + * coupled output power. Bit 7 of + * byte 82 is MSB, bit 0 of byte 83 + * is LSB. Tx_PWR(Offset) should be + * set to zero for “internally + * calibrated” devices. */ + SFF_8472_T_SLOPE = 84, /* T (Slope) Fixed decimal * (unsigned) calibration data, * internal module temperature. Bit * 7 of byte 84 is MSB, bit 0 of * byte 85 is LSB. T(Slope) should * be set to 1 for “internally * calibrated” devices. */ -#define SFF_8472_T_OFFSET 86 /* T (Offset) Fixed decimal (signed + SFF_8472_T_OFFSET = 86, /* T (Offset) Fixed decimal (signed * two’s complement) calibration * data, internal module * temperature. Bit 7 of byte 86 is @@ -276,7 +280,7 @@ * T(Offset) should be set to zero * for “internally calibrated” * devices. */ -#define SFF_8472_V_SLOPE 88 /* V (Slope) Fixed decimal + SFF_8472_V_SLOPE = 88, /* V (Slope) Fixed decimal * (unsigned) calibration data, * internal module supply * voltage. Bit 7 of byte 88 is @@ -284,7 +288,7 @@ * LSB. V(Slope) should be set to 1 * for “internally calibrated” * devices. */ -#define SFF_8472_V_OFFSET 90 /* V (Offset) Fixed decimal (signed + SFF_8472_V_OFFSET = 90, /* V (Offset) Fixed decimal (signed * two’s complement) calibration * data, internal module supply * voltage. Bit 7 of byte 90 is @@ -292,21 +296,21 @@ * LSB. V(Offset) should be set to * zero for “internally calibrated” * devices. */ -#define SFF_8472_CHECKSUM 95 /* Checksum Byte 95 contains the + SFF_8472_CHECKSUM = 95, /* Checksum Byte 95 contains the * low order 8 bits of the sum of * bytes 0 – 94. */ - /* Internal measurements. */ + /* Internal measurements. */ -#define SFF_8472_TEMP 96 /* Internally measured module temperature. */ -#define SFF_8472_VCC 98 /* Internally measured supply + SFF_8472_TEMP = 96, /* Internally measured module temperature. */ + SFF_8472_VCC = 98, /* Internally measured supply * voltage in transceiver. */ -#define SFF_8472_TX_BIAS 100 /* Internally measured TX Bias Current. */ -#define SFF_8472_TX_POWER 102 /* Measured TX output power. */ -#define SFF_8472_RX_POWER 104 /* Measured RX input power. */ - -#define SFF_8472_STATUS 110 /* See below */ + SFF_8472_TX_BIAS = 100, /* Internally measured TX Bias Current. */ + SFF_8472_TX_POWER = 102, /* Measured TX output power. */ + SFF_8472_RX_POWER = 104, /* Measured RX input power. */ + SFF_8472_STATUS = 110 /* See below */ +}; /* Status Bits Described */ /* @@ -372,20 +376,22 @@ #define SFF_8472_STATUS_DATA_READY (1 << 0) /* Table 3.2 Identifier values */ -#define SFF_8472_ID_UNKNOWN 0x0 /* Unknown or unspecified */ -#define SFF_8472_ID_GBIC 0x1 /* GBIC */ -#define SFF_8472_ID_SFF 0x2 /* Module soldered to motherboard (ex: SFF)*/ -#define SFF_8472_ID_SFP 0x3 /* SFP or SFP “Plus” */ -#define SFF_8472_ID_XBI 0x4 /* Reserved for “300 pin XBI” devices */ -#define SFF_8472_ID_XENPAK 0x5 /* Reserved for “Xenpak” devices */ -#define SFF_8472_ID_XFP 0x6 /* Reserved for “XFP” devices */ -#define SFF_8472_ID_XFF 0x7 /* Reserved for “XFF” devices */ -#define SFF_8472_ID_XFPE 0x8 /* Reserved for “XFP-E” devices */ -#define SFF_8472_ID_XPAK 0x9 /* Reserved for “XPak” devices */ -#define SFF_8472_ID_X2 0xA /* Reserved for “X2” devices */ -#define SFF_8472_ID_DWDM_SFP 0xB /* Reserved for “DWDM-SFP” devices */ -#define SFF_8472_ID_QSFP 0xC /* Reserved for “QSFP” devices */ -#define SFF_8472_ID_LAST SFF_8472_ID_QSFP +enum { + SFF_8472_ID_UNKNOWN = 0x0, /* Unknown or unspecified */ + SFF_8472_ID_GBIC = 0x1, /* GBIC */ + SFF_8472_ID_SFF = 0x2, /* Module soldered to motherboard (ex: SFF)*/ + SFF_8472_ID_SFP = 0x3, /* SFP or SFP “Plus” */ + SFF_8472_ID_XBI = 0x4, /* Reserved for “300 pin XBI” devices */ + SFF_8472_ID_XENPAK = 0x5, /* Reserved for “Xenpak” devices */ + SFF_8472_ID_XFP = 0x6, /* Reserved for “XFP” devices */ + SFF_8472_ID_XFF = 0x7, /* Reserved for “XFF” devices */ + SFF_8472_ID_XFPE = 0x8, /* Reserved for “XFP-E” devices */ + SFF_8472_ID_XPAK = 0x9, /* Reserved for “XPak” devices */ + SFF_8472_ID_X2 = 0xA, /* Reserved for “X2” devices */ + SFF_8472_ID_DWDM_SFP = 0xB, /* Reserved for “DWDM-SFP” devices */ + SFF_8472_ID_QSFP = 0xC, /* Reserved for “QSFP” devices */ + SFF_8472_ID_LAST = SFF_8472_ID_QSFP + }; static char *sff_8472_id[SFF_8472_ID_LAST + 1] = {"Unknown", "GBIC", From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 01:02:07 2014 Return-Path: Delivered-To: svn-src-all@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 C102A2A6; Fri, 14 Feb 2014 01:02: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 A9B4F188D; Fri, 14 Feb 2014 01:02:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1E127CN053332; Fri, 14 Feb 2014 01:02:07 GMT (envelope-from davidcs@svn.freebsd.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1E127Zn053330; Fri, 14 Feb 2014 01:02:07 GMT (envelope-from davidcs@svn.freebsd.org) Message-Id: <201402140102.s1E127Zn053330@svn.freebsd.org> From: David C Somayajulu Date: Fri, 14 Feb 2014 01:02:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261861 - head/sys/dev/qlxgb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 01:02:07 -0000 Author: davidcs Date: Fri Feb 14 01:02:06 2014 New Revision: 261861 URL: http://svnweb.freebsd.org/changeset/base/261861 Log: check for defrag only when bus_dmamap_load_mbuf_sg() returns EFBIG. Comment in qla_hw_send is moot. Modified: head/sys/dev/qlxgb/qla_hw.c head/sys/dev/qlxgb/qla_os.c Modified: head/sys/dev/qlxgb/qla_hw.c ============================================================================== --- head/sys/dev/qlxgb/qla_hw.c Fri Feb 14 00:26:30 2014 (r261860) +++ head/sys/dev/qlxgb/qla_hw.c Fri Feb 14 01:02:06 2014 (r261861) @@ -998,7 +998,6 @@ qla_hw_send(qla_host_t *ha, bus_dma_segm if (hdr_len == 0) { if ((nsegs > Q8_TX_MAX_SEGMENTS) || (mp->m_pkthdr.len > ha->max_frame_size)){ - /* TBD: copy into private buffer and send it */ device_printf(dev, "%s: (nsegs[%d, %d, 0x%b] > Q8_TX_MAX_SEGMENTS)\n", __func__, nsegs, mp->m_pkthdr.len, Modified: head/sys/dev/qlxgb/qla_os.c ============================================================================== --- head/sys/dev/qlxgb/qla_os.c Fri Feb 14 00:26:30 2014 (r261860) +++ head/sys/dev/qlxgb/qla_os.c Fri Feb 14 01:02:06 2014 (r261861) @@ -1063,10 +1063,7 @@ qla_send(qla_host_t *ha, struct mbuf **m ret = bus_dmamap_load_mbuf_sg(ha->tx_tag, map, m_head, segs, &nsegs, BUS_DMA_NOWAIT); - if ((ret == EFBIG) || - ((nsegs > Q8_TX_MAX_SEGMENTS) && - (((m_head->m_pkthdr.csum_flags & CSUM_TSO) == 0) || - (m_head->m_pkthdr.len <= ha->max_frame_size)))) { + if (ret == EFBIG) { struct mbuf *m; From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 01:27:16 2014 Return-Path: Delivered-To: svn-src-all@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 97E6B793 for ; Fri, 14 Feb 2014 01:27:16 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 7516A1A0E for ; Fri, 14 Feb 2014 01:27:16 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s1E1RGBu059069 for ; Fri, 14 Feb 2014 01:27:16 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s1E1RGIP059067 for svn-src-all@freebsd.org; Fri, 14 Feb 2014 01:27:16 GMT (envelope-from bdrewery) Received: (qmail 80477 invoked from network); 13 Feb 2014 19:27:11 -0600 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 13 Feb 2014 19:27:11 -0600 Message-ID: <52FD70E4.7080906@FreeBSD.org> Date: Thu, 13 Feb 2014 19:27:00 -0600 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Dimitry Andric , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r261801 - head/contrib/libc++/include References: <201402121814.s1CIEo5A016765@svn.freebsd.org> In-Reply-To: <201402121814.s1CIEo5A016765@svn.freebsd.org> X-Enigmail-Version: 1.6 OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="U4xxIFlmWjId6nfxQHfJ689IpP8mlR1vv" Cc: FreeBSD Ports Management Team X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 01:27:16 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --U4xxIFlmWjId6nfxQHfJ689IpP8mlR1vv Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2/12/2014 12:14 PM, Dimitry Andric wrote: > Author: dim > Date: Wed Feb 12 18:14:49 2014 > New Revision: 261801 > URL: http://svnweb.freebsd.org/changeset/base/261801 >=20 > Log: > An ABI incompatibility crept into the libc++ 3.4 import in r261283. = It > was caused by upstream libc++ commit r194536, which aimed to make the= > headers more standards-compliant, by making std::pair's copy construc= tor > trivial. Unfortunately, this could cause certain C++ applications us= ing > shared libraries built against the previous version of libc++ to cras= h. > =20 > Fix the ABI incompatibility by making std::pair's copy constructor > non-trivial again. > =20 > Please note: Any C++ applications or shared libraries built with libc= ++ > between r261283 and this revision should be recompiled. *Please* bump __FreeBSD_version__ for ABI changes and notify portmgr@ of such cases that clearly affect package building. > =20 > Reported by: stefanf > MFC after: 3 weeks > X-MFC-With: r261283 >=20 > Modified: > head/contrib/libc++/include/__config >=20 > Modified: head/contrib/libc++/include/__config > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/contrib/libc++/include/__config Wed Feb 12 16:39:56 2014 (r261= 800) > +++ head/contrib/libc++/include/__config Wed Feb 12 18:14:49 2014 (r261= 801) > @@ -567,7 +567,7 @@ template struct __static_asse > #define _LIBCPP_WCTYPE_IS_MASK > #endif > =20 > -#if defined(__APPLE__) > +#if defined(__APPLE__) || defined(__FreeBSD__) > #ifndef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR > # define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 0 > #endif >=20 --=20 Regards, Bryan Drewery --U4xxIFlmWjId6nfxQHfJ689IpP8mlR1vv Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJS/XDkAAoJEDXXcbtuRpfPGVUH/2LJ9QettBvQJr2n0heMeJLm YM+MMdyIiU0bkOb/ORLyq7RHXn0lbSoPGe9/X5whsSuj7T+d7J8bd30iAiOF5As9 xLcZ0L3Sc6xOvlzjaQGEn+NIqbuP008UfhMpFRjUB15FHFVVYv+yKlfUI+dRmIWh FY826/J8V3SiuJlCrqZbnD6h7sKfM/ym5Oz6sCSP2DZ7IAJya9Ks/IJEtsyBx4Hz H43LZYbiEuuPdy91vSQDKGU5Q0yx5WVtqjHy3/MrAUZaHFHZ8cIcGV9uyES6Rs4A 1ThQZEo7cZkxCPvYnfv+eP+si6g/BbOPGEB/ndNigeD9G7tLeJ3bWe2TnJdhXzQ= =YEFk -----END PGP SIGNATURE----- --U4xxIFlmWjId6nfxQHfJ689IpP8mlR1vv-- From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 01:46:34 2014 Return-Path: Delivered-To: svn-src-all@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 6416BDA3; Fri, 14 Feb 2014 01:46: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 4D9191B7F; Fri, 14 Feb 2014 01:46:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1E1kYaL069213; Fri, 14 Feb 2014 01:46:34 GMT (envelope-from davidcs@svn.freebsd.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1E1kXBk069210; Fri, 14 Feb 2014 01:46:33 GMT (envelope-from davidcs@svn.freebsd.org) Message-Id: <201402140146.s1E1kXBk069210@svn.freebsd.org> From: David C Somayajulu Date: Fri, 14 Feb 2014 01:46: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: r261862 - stable/9/sys/dev/qlxgb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 01:46:34 -0000 Author: davidcs Date: Fri Feb 14 01:46:33 2014 New Revision: 261862 URL: http://svnweb.freebsd.org/changeset/base/261862 Log: MFC r261861 check for defrag only when bus_dmamap_load_mbuf_sg() returns EFBIG. Comment in qla_hw_send is moot. Modified: stable/9/sys/dev/qlxgb/qla_hw.c stable/9/sys/dev/qlxgb/qla_os.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/qlxgb/qla_hw.c ============================================================================== --- stable/9/sys/dev/qlxgb/qla_hw.c Fri Feb 14 01:02:06 2014 (r261861) +++ stable/9/sys/dev/qlxgb/qla_hw.c Fri Feb 14 01:46:33 2014 (r261862) @@ -941,7 +941,6 @@ qla_hw_send(qla_host_t *ha, bus_dma_segm if (hdr_len == 0) { if ((nsegs > Q8_TX_MAX_SEGMENTS) || (mp->m_pkthdr.len > ha->max_frame_size)){ - /* TBD: copy into private buffer and send it */ device_printf(dev, "%s: (nsegs[%d, %d, 0x%x] > Q8_TX_MAX_SEGMENTS)\n", __func__, nsegs, mp->m_pkthdr.len, Modified: stable/9/sys/dev/qlxgb/qla_os.c ============================================================================== --- stable/9/sys/dev/qlxgb/qla_os.c Fri Feb 14 01:02:06 2014 (r261861) +++ stable/9/sys/dev/qlxgb/qla_os.c Fri Feb 14 01:46:33 2014 (r261862) @@ -1054,10 +1054,7 @@ qla_send(qla_host_t *ha, struct mbuf **m ret = bus_dmamap_load_mbuf_sg(ha->tx_tag, map, m_head, segs, &nsegs, BUS_DMA_NOWAIT); - if ((ret == EFBIG) || - ((nsegs > Q8_TX_MAX_SEGMENTS) && - (((m_head->m_pkthdr.csum_flags & CSUM_TSO) == 0) || - (m_head->m_pkthdr.len <= ha->max_frame_size)))) { + if (ret == EFBIG) { struct mbuf *m; From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 01:47:12 2014 Return-Path: Delivered-To: svn-src-all@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 E24D3EE0; Fri, 14 Feb 2014 01:47:12 +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 B41491B8F; Fri, 14 Feb 2014 01:47:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1E1lC2b069411; Fri, 14 Feb 2014 01:47:12 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1E1lCLD069410; Fri, 14 Feb 2014 01:47:12 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201402140147.s1E1lCLD069410@svn.freebsd.org> From: Rui Paulo Date: Fri, 14 Feb 2014 01:47:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261863 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 01:47:13 -0000 Author: rpaulo Date: Fri Feb 14 01:47:12 2014 New Revision: 261863 URL: http://svnweb.freebsd.org/changeset/base/261863 Log: Add urtwn_start_locked() to avoid unlocking during TX. Modified: head/sys/dev/usb/wlan/if_urtwn.c Modified: head/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c Fri Feb 14 01:46:33 2014 (r261862) +++ head/sys/dev/usb/wlan/if_urtwn.c Fri Feb 14 01:47:12 2014 (r261863) @@ -211,6 +211,8 @@ static int urtwn_tx_start(struct urtwn_ struct ieee80211_node *, struct mbuf *, struct urtwn_data *); static void urtwn_start(struct ifnet *); +static void urtwn_start_locked(struct ifnet *, + struct urtwn_softc *); static int urtwn_ioctl(struct ifnet *, u_long, caddr_t); static int urtwn_power_on(struct urtwn_softc *); static int urtwn_llt_init(struct urtwn_softc *); @@ -868,13 +870,9 @@ tr_setup: } STAILQ_REMOVE_HEAD(&sc->sc_tx_pending, next); STAILQ_INSERT_TAIL(&sc->sc_tx_active, data, next); - usbd_xfer_set_frame_data(xfer, 0, data->buf, data->buflen); usbd_transfer_submit(xfer); - - URTWN_UNLOCK(sc); - urtwn_start(ifp); - URTWN_LOCK(sc); + urtwn_start_locked(ifp, sc); break; default: data = STAILQ_FIRST(&sc->sc_tx_active); @@ -1717,14 +1715,22 @@ static void urtwn_start(struct ifnet *ifp) { struct urtwn_softc *sc = ifp->if_softc; - struct ieee80211_node *ni; - struct mbuf *m; - struct urtwn_data *bf; if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return; - URTWN_LOCK(sc); + urtwn_start_locked(ifp, sc); + URTWN_UNLOCK(sc); +} + +static void +urtwn_start_locked(struct ifnet *ifp, struct urtwn_softc *sc) +{ + struct ieee80211_node *ni; + struct mbuf *m; + struct urtwn_data *bf; + + URTWN_ASSERT_LOCKED(sc); for (;;) { IFQ_DRV_DEQUEUE(&ifp->if_snd, m); if (m == NULL) @@ -1747,7 +1753,6 @@ urtwn_start(struct ifnet *ifp) sc->sc_txtimer = 5; callout_reset(&sc->sc_watchdog_ch, hz, urtwn_watchdog, sc); } - URTWN_UNLOCK(sc); } static int From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 02:48:14 2014 Return-Path: Delivered-To: svn-src-all@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 E14B7C24; Fri, 14 Feb 2014 02:48:14 +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 CC3F110D2; Fri, 14 Feb 2014 02:48:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1E2mEgM093298; Fri, 14 Feb 2014 02:48:14 GMT (envelope-from davidcs@svn.freebsd.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1E2mE1V093295; Fri, 14 Feb 2014 02:48:14 GMT (envelope-from davidcs@svn.freebsd.org) Message-Id: <201402140248.s1E2mE1V093295@svn.freebsd.org> From: David C Somayajulu Date: Fri, 14 Feb 2014 02:48:14 +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: r261864 - stable/10/sys/dev/qlxgb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 02:48:15 -0000 Author: davidcs Date: Fri Feb 14 02:48:14 2014 New Revision: 261864 URL: http://svnweb.freebsd.org/changeset/base/261864 Log: MFC 261861 check for defrag only when bus_dmamap_load_mbuf_sg() returns EFBIG. Comment in qla_hw_send is moot. Modified: stable/10/sys/dev/qlxgb/qla_hw.c stable/10/sys/dev/qlxgb/qla_os.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/qlxgb/qla_hw.c ============================================================================== --- stable/10/sys/dev/qlxgb/qla_hw.c Fri Feb 14 01:47:12 2014 (r261863) +++ stable/10/sys/dev/qlxgb/qla_hw.c Fri Feb 14 02:48:14 2014 (r261864) @@ -998,7 +998,6 @@ qla_hw_send(qla_host_t *ha, bus_dma_segm if (hdr_len == 0) { if ((nsegs > Q8_TX_MAX_SEGMENTS) || (mp->m_pkthdr.len > ha->max_frame_size)){ - /* TBD: copy into private buffer and send it */ device_printf(dev, "%s: (nsegs[%d, %d, 0x%b] > Q8_TX_MAX_SEGMENTS)\n", __func__, nsegs, mp->m_pkthdr.len, Modified: stable/10/sys/dev/qlxgb/qla_os.c ============================================================================== --- stable/10/sys/dev/qlxgb/qla_os.c Fri Feb 14 01:47:12 2014 (r261863) +++ stable/10/sys/dev/qlxgb/qla_os.c Fri Feb 14 02:48:14 2014 (r261864) @@ -1063,10 +1063,7 @@ qla_send(qla_host_t *ha, struct mbuf **m ret = bus_dmamap_load_mbuf_sg(ha->tx_tag, map, m_head, segs, &nsegs, BUS_DMA_NOWAIT); - if ((ret == EFBIG) || - ((nsegs > Q8_TX_MAX_SEGMENTS) && - (((m_head->m_pkthdr.csum_flags & CSUM_TSO) == 0) || - (m_head->m_pkthdr.len <= ha->max_frame_size)))) { + if (ret == EFBIG) { struct mbuf *m; From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 02:53:11 2014 Return-Path: Delivered-To: svn-src-all@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 31D3DD67; Fri, 14 Feb 2014 02:53:11 +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 1AED9113B; Fri, 14 Feb 2014 02:53:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1E2rBIn096563; Fri, 14 Feb 2014 02:53:11 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1E2rAFN096556; Fri, 14 Feb 2014 02:53:10 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201402140253.s1E2rAFN096556@svn.freebsd.org> From: Kevin Lo Date: Fri, 14 Feb 2014 02:53:10 +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: r261865 - in stable/9: share/man/man4 sys/dev/usb sys/dev/usb/wlan X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 02:53:11 -0000 Author: kevlo Date: Fri Feb 14 02:53:10 2014 New Revision: 261865 URL: http://svnweb.freebsd.org/changeset/base/261865 Log: MFC r259544, r259545, r259546, r259547, r259812, r259939, r260219, r260542, r261118, r261124, r261330: - Add support for the MediaTek/Ralink RT3593 chipset. - Various minor USB WLAN fixes and improvements. Modified: stable/9/share/man/man4/run.4 (contents, props changed) stable/9/sys/dev/usb/usbdevs stable/9/sys/dev/usb/wlan/if_run.c stable/9/sys/dev/usb/wlan/if_runreg.h (contents, props changed) stable/9/sys/dev/usb/wlan/if_runvar.h Directory Properties: stable/9/ (props changed) 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/dev/ (props changed) Modified: stable/9/share/man/man4/run.4 ============================================================================== --- stable/9/share/man/man4/run.4 Fri Feb 14 02:48:14 2014 (r261864) +++ stable/9/share/man/man4/run.4 Fri Feb 14 02:53:10 2014 (r261865) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 7, 2012 +.Dd January 3, 2014 .Dt RUN 4 .Os .Sh NAME @@ -52,7 +52,7 @@ runfw_load="YES" The .Nm driver supports USB 2.0 wireless adapters based on the Ralink RT2700U, -RT2800U and RT3000U chipsets. +RT2800U, RT3000U and RT3900E chipsets. .Pp The RT2700U chipset consists of two integrated chips, an RT2770 MAC/BBP and an RT2720 (1T2R) or RT2750 (dual-band 1T2R) radio transceiver. @@ -64,6 +64,18 @@ The RT3000U is a single-chip solution ba an RT3020 (1T1R), RT3021 (1T2R) or RT3022 (2T2R) single-band radio transceiver. .Pp +The RT3900E is a single-chip USB 2.0 802.11n solution. +The MAC/Baseband Processor can be an RT3593, RT5390, RT5392 or an RT5592. +The radio can be an RT3053, RT5370, RT5372 or an RT5572. +The RT3053 chip operates in the 2GHz and 5GHz spectra and supports up to +3 transmit paths and 3 receiver paths (3T3R). +The RT5370 chip operates in the 2GHz spectrum and supports 1 transmit path +and 1 receiver path (1T1R). +The RT5372 chip operates in the 2GHz spectrum and supports up to 2 transmit +paths and 2 receiver paths (2T2R). +The RT5572 chip operates in the 2GHz and 5GHz spectra and supports up to +2 transmit paths and 2 receiver paths (2T2R). +.Pp These are the modes the .Nm driver can operate in: @@ -113,26 +125,33 @@ driver supports the following wireless a .It Airlink101 AWLL6090 .It ASUS USB-N11 .It ASUS USB-N13 ver. A1 +.It ASUS USB-N66 .It ASUS WL-160N .It Belkin F5D8051 ver 3000 .It Belkin F5D8053 .It Belkin F5D8055 .It Belkin F6D4050 ver 1 +.It Belkin F9L1103 .It Buffalo WLI-UC-AG300N .It Buffalo WLI-UC-G300N .It Buffalo WLI-UC-G301N .It Buffalo WLI-UC-GN +.It Buffalo WLI-UC-GNM +.It Buffalo WLI-UC-GNM2 .It Corega CG-WLUSB2GNL .It Corega CG-WLUSB2GNR .It Corega CG-WLUSB300AGN .It Corega CG-WLUSB300GNM .It D-Link DWA-130 rev B1 -.It D-Link DWA-140 +.It D-Link DWA-140 rev B1, B2, B3, D1 +.It D-Link DWA-160 rev B2 +.It D-Link DWA-162 .It DrayTek Vigor N61 .It Edimax EW-7711UAn .It Edimax EW-7711UTn .It Edimax EW-7717Un .It Edimax EW-7718Un +.It Edimax EW-7733UnD .It Gigabyte GN-WB30N .It Gigabyte GN-WB31N .It Gigabyte GN-WB32L @@ -142,6 +161,7 @@ driver supports the following wireless a .It Hercules HWNU-300 .It Linksys WUSB54GC v3 .It Linksys WUSB600N +.It Logitec LAN-W150N/U2 .It Mvix Nubbin MS-811N .It Planex GW-USMicroN .It Planex GW-US300MiniS @@ -153,8 +173,11 @@ driver supports the following wireless a .It SMC SMCWUSBS-N2 .It Sweex LW303 .It Sweex LW313 +.It TP-LINK TL-WDN3200 +.It TP-LINK TL-WN727N v3 .It Unex DNUR-81 .It Unex DNUR-82 +.It ZyXEL NWD2705 .It ZyXEL NWD210N .It ZyXEL NWD270N .El @@ -226,4 +249,4 @@ driver was written by The .Nm driver does not support any of the 802.11n capabilities offered by the -RT2800 and RT3000 chipsets. +RT2800, RT3000 and RT3900 chipsets. Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Fri Feb 14 02:48:14 2014 (r261864) +++ stable/9/sys/dev/usb/usbdevs Fri Feb 14 02:53:10 2014 (r261865) @@ -1187,6 +1187,7 @@ product ASUS USBN13 0x1784 USB-N13 product ASUS RT3070_1 0x1790 RT3070 product ASUS USBN10 0x1786 USB-N10 product ASUS RTL8192CU 0x17ab RTL8192CU +product ASUS USBN66 0x17ad USB-N66 product ASUS RTL8192SU 0x1791 RTL8192SU product ASUS A730W 0x4202 ASUS MyPal A730W product ASUS P535 0x420f ASUS P535 PDA @@ -1289,6 +1290,7 @@ product BELKIN F5U409 0x0409 F5U409 Ser product BELKIN F6C550AVR 0x0551 F6C550-AVR UPS product BELKIN F5U120 0x1203 F5U120-PC Hub product BELKIN RTL8188CU 0x1102 RTL8188CU Wireless Adapter +product BELKIN F9L1103 0x1103 F9L1103 Wireless Adapter product BELKIN RTL8192CU 0x2102 RTL8192CU Wireless Adapter product BELKIN F7D2102 0x2103 F7D2102 Wireless Adapter product BELKIN ZD1211B 0x4050 ZD1211B @@ -1602,6 +1604,8 @@ product DLINK RT3072 0x3c0a RT3072 product DLINK DWA140B3 0x3c15 DWA-140 rev B3 product DLINK DWA160B2 0x3c1a DWA-160 rev B2 product DLINK DWA127 0x3c1b DWA-127 Wireless Adapter +product DLINK DWA162 0x3c1f DWA-162 Wireless Adapter +product DLINK DWA140D1 0x3c20 DWA-140 rev D1 product DLINK DSB650C 0x4000 10Mbps Ethernet product DLINK DSB650TX1 0x4001 10/100 Ethernet product DLINK DSB650TX 0x4002 10/100 Ethernet @@ -1662,6 +1666,7 @@ product EDIMAX RTL8192SU_3 0x7622 RTL819 product EDIMAX RT2870_1 0x7711 RT2870 product EDIMAX EW7717 0x7717 EW-7717 product EDIMAX EW7718 0x7718 EW-7718 +product EDIMAX EW7733UND 0x7733 EW-7733UnD product EDIMAX EW7811UN 0x7811 EW-7811Un product EDIMAX RTL8192CU 0x7822 RTL8192CU @@ -3646,11 +3651,13 @@ product RALINK RT2573 0x2573 RT2501USB product RALINK RT2671 0x2671 RT2601USB Wireless Adapter product RALINK RT2770 0x2770 RT2770 product RALINK RT2870 0x2870 RT2870 +product RALINK RT_STOR 0x2878 USB Storage product RALINK RT3070 0x3070 RT3070 product RALINK RT3071 0x3071 RT3071 product RALINK RT3072 0x3072 RT3072 product RALINK RT3370 0x3370 RT3370 product RALINK RT3572 0x3572 RT3572 +product RALINK RT3573 0x3573 RT3573 product RALINK RT5370 0x5370 RT5370 product RALINK RT5572 0x5572 RT5572 product RALINK RT8070 0x8070 RT8070 @@ -3672,10 +3679,11 @@ product REALTEK RTL8171 0x8171 RTL8171 product REALTEK RTL8172 0x8172 RTL8172 product REALTEK RTL8173 0x8173 RTL8173 product REALTEK RTL8174 0x8174 RTL8174 -product REALTEK RTL8188CE_1 0x817e RTL8188CE -product REALTEK RTL8188CU_0 0x8176 RTL8188CU -product REALTEK RTL8188CU_1 0x817a RTL8188CU -product REALTEK RTL8188CU_2 0x817b RTL8188CU +product REALTEK RTL8188CU_0 0x8176 RTL8188CU +product REALTEK RTL8188EU 0x8179 RTL8188EU +product REALTEK RTL8188CE_1 0x817e RTL8188CE +product REALTEK RTL8188CU_1 0x817a RTL8188CU +product REALTEK RTL8188CU_2 0x817b RTL8188CU product REALTEK RTL8187 0x8187 RTL8187 Wireless Adapter product REALTEK RTL8187B_0 0x8189 RTL8187B Wireless Adapter product REALTEK RTL8187B_1 0x8197 RTL8187B Wireless Adapter @@ -4524,3 +4532,4 @@ product ZYXEL G202 0x3410 G-202 product ZYXEL RT2870_1 0x3416 RT2870 product ZYXEL RT2870_2 0x341a RT2870 product ZYXEL RTL8192CU 0x341f RTL8192CU +product ZYXEL NWD2705 0x3421 NWD2705 Modified: stable/9/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_run.c Fri Feb 14 02:48:14 2014 (r261864) +++ stable/9/sys/dev/usb/wlan/if_run.c Fri Feb 14 02:53:10 2014 (r261865) @@ -2,7 +2,7 @@ * Copyright (c) 2008,2010 Damien Bergamini * ported to FreeBSD by Akinori Furukoshi * USB Consulting, Hans Petter Selasky - * Copyright (c) 2013 Kevin Lo + * Copyright (c) 2013-2014 Kevin Lo * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -69,14 +69,15 @@ __FBSDID("$FreeBSD$"); #include #include "usbdevs.h" -#define USB_DEBUG_VAR run_debug +#define USB_DEBUG_VAR run_debug #include +#include #include #include #ifdef USB_DEBUG -#define RUN_DEBUG +#define RUN_DEBUG #endif #ifdef RUN_DEBUG @@ -86,17 +87,19 @@ SYSCTL_INT(_hw_usb_run, OID_AUTO, debug, "run debug level"); #endif -#define IEEE80211_HAS_ADDR4(wh) \ +#define IEEE80211_HAS_ADDR4(wh) \ (((wh)->i_fc[1] & IEEE80211_FC1_DIR_MASK) == IEEE80211_FC1_DIR_DSTODS) /* * Because of LOR in run_key_delete(), use atomic instead. * '& RUN_CMDQ_MASQ' is to loop cmdq[]. */ -#define RUN_CMDQ_GET(c) (atomic_fetchadd_32((c), 1) & RUN_CMDQ_MASQ) +#define RUN_CMDQ_GET(c) (atomic_fetchadd_32((c), 1) & RUN_CMDQ_MASQ) static const STRUCT_USB_HOST_ID run_devs[] = { -#define RUN_DEV(v,p) { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) } +#define RUN_DEV(v,p) { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) } +#define RUN_DEV_EJECT(v,p) \ + { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, 0) } RUN_DEV(ABOCOM, RT2770), RUN_DEV(ABOCOM, RT2870), RUN_DEV(ABOCOM, RT3070), @@ -135,6 +138,7 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(ASUS, RT2870_5), RUN_DEV(ASUS, USBN13), RUN_DEV(ASUS, RT3070_1), + RUN_DEV(ASUS, USBN66), RUN_DEV(ASUS, USB_N53), RUN_DEV(ASUS2, USBN11), RUN_DEV(AZUREWAVE, RT2870_1), @@ -142,6 +146,7 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(AZUREWAVE, RT3070_1), RUN_DEV(AZUREWAVE, RT3070_2), RUN_DEV(AZUREWAVE, RT3070_3), + RUN_DEV(BELKIN, F9L1103), RUN_DEV(BELKIN, F5D8053V3), RUN_DEV(BELKIN, F5D8055), RUN_DEV(BELKIN, F5D8055V2), @@ -173,6 +178,7 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(DLINK, RT3072), RUN_DEV(DLINK, DWA140B3), RUN_DEV(DLINK, DWA160B2), + RUN_DEV(DLINK, DWA162), RUN_DEV(DLINK2, DWA130), RUN_DEV(DLINK2, RT2870_1), RUN_DEV(DLINK2, RT2870_2), @@ -185,6 +191,7 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(DLINK2, RT3072_1), RUN_DEV(EDIMAX, EW7717), RUN_DEV(EDIMAX, EW7718), + RUN_DEV(EDIMAX, EW7733UND), RUN_DEV(EDIMAX, RT2870_1), RUN_DEV(ENCORE, RT3070_1), RUN_DEV(ENCORE, RT3070_2), @@ -256,6 +263,7 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(RALINK, RT3072), RUN_DEV(RALINK, RT3370), RUN_DEV(RALINK, RT3572), + RUN_DEV(RALINK, RT3573), RUN_DEV(RALINK, RT5370), RUN_DEV(RALINK, RT5572), RUN_DEV(RALINK, RT8070), @@ -305,6 +313,9 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(ZINWELL, RT3072_2), RUN_DEV(ZYXEL, RT2870_1), RUN_DEV(ZYXEL, RT2870_2), + RUN_DEV(ZYXEL, NWD2705), + RUN_DEV_EJECT(RALINK, RT_STOR), +#undef RUN_DEV_EJECT #undef RUN_DEV }; @@ -320,6 +331,9 @@ static usb_callback_t run_bulk_tx_callba static usb_callback_t run_bulk_tx_callback4; static usb_callback_t run_bulk_tx_callback5; +static void run_autoinst(void *, struct usb_device *, + struct usb_attach_arg *); +static int run_driver_loaded(struct module *, int, void *); static void run_bulk_tx_callbackN(struct usb_xfer *xfer, usb_error_t error, u_int index); static struct ieee80211vap *run_vap_create(struct ieee80211com *, @@ -343,6 +357,7 @@ static int run_write(struct run_softc *, static int run_write_region_1(struct run_softc *, uint16_t, const uint8_t *, int); static int run_set_region_4(struct run_softc *, uint16_t, uint32_t, int); +static int run_efuse_read(struct run_softc *, uint16_t, uint16_t *, int); static int run_efuse_read_2(struct run_softc *, uint16_t, uint16_t *); static int run_eeprom_read_2(struct run_softc *, uint16_t, uint16_t *); static int run_rt2870_rf_write(struct run_softc *, uint32_t); @@ -352,6 +367,8 @@ static int run_bbp_read(struct run_softc static int run_bbp_write(struct run_softc *, uint8_t, uint8_t); static int run_mcu_cmd(struct run_softc *, uint8_t, uint16_t); static const char *run_get_rf(uint16_t); +static void run_rt3593_get_txpower(struct run_softc *); +static void run_get_txpower(struct run_softc *); static int run_read_eeprom(struct run_softc *); static struct ieee80211_node *run_node_alloc(struct ieee80211vap *, const uint8_t mac[IEEE80211_ADDR_LEN]); @@ -389,12 +406,14 @@ static int run_raw_xmit(struct ieee80211 const struct ieee80211_bpf_params *); static void run_start(struct ifnet *); static int run_ioctl(struct ifnet *, u_long, caddr_t); +static void run_iq_calib(struct run_softc *, u_int); static void run_set_agc(struct run_softc *, uint8_t); static void run_select_chan_group(struct run_softc *, int); static void run_set_rx_antenna(struct run_softc *, int); static void run_rt2870_set_chan(struct run_softc *, u_int); static void run_rt3070_set_chan(struct run_softc *, u_int); static void run_rt3572_set_chan(struct run_softc *, u_int); +static void run_rt3593_set_chan(struct run_softc *, u_int); static void run_rt5390_set_chan(struct run_softc *, u_int); static void run_rt5592_set_chan(struct run_softc *, u_int); static int run_set_chan(struct run_softc *, struct ieee80211_channel *); @@ -423,10 +442,13 @@ static void run_update_promisc(struct if static void run_rt5390_bbp_init(struct run_softc *); static int run_bbp_init(struct run_softc *); static int run_rt3070_rf_init(struct run_softc *); +static void run_rt3593_rf_init(struct run_softc *); static void run_rt5390_rf_init(struct run_softc *); static int run_rt3070_filter_calib(struct run_softc *, uint8_t, uint8_t, uint8_t *); static void run_rt3070_rf_setup(struct run_softc *); +static void run_rt3593_rf_setup(struct run_softc *); +static void run_rt5390_rf_setup(struct run_softc *); static int run_txrx_enable(struct run_softc *); static void run_adjust_freq_offset(struct run_softc *); static void run_init(void *); @@ -434,6 +456,30 @@ static void run_init_locked(struct run_s static void run_stop(void *); static void run_delay(struct run_softc *, u_int); +static eventhandler_tag run_etag; + +static const struct rt2860_rate { + uint8_t rate; + uint8_t mcs; + enum ieee80211_phytype phy; + uint8_t ctl_ridx; + uint16_t sp_ack_dur; + uint16_t lp_ack_dur; +} rt2860_rates[] = { + { 2, 0, IEEE80211_T_DS, 0, 314, 314 }, + { 4, 1, IEEE80211_T_DS, 1, 258, 162 }, + { 11, 2, IEEE80211_T_DS, 2, 223, 127 }, + { 22, 3, IEEE80211_T_DS, 3, 213, 117 }, + { 12, 0, IEEE80211_T_OFDM, 4, 60, 60 }, + { 18, 1, IEEE80211_T_OFDM, 4, 52, 52 }, + { 24, 2, IEEE80211_T_OFDM, 6, 48, 48 }, + { 36, 3, IEEE80211_T_OFDM, 6, 44, 44 }, + { 48, 4, IEEE80211_T_OFDM, 8, 44, 44 }, + { 72, 5, IEEE80211_T_OFDM, 8, 40, 40 }, + { 96, 6, IEEE80211_T_OFDM, 8, 40, 40 }, + { 108, 7, IEEE80211_T_OFDM, 8, 40, 40 } +}; + static const struct { uint16_t reg; uint32_t val; @@ -496,6 +542,8 @@ static const struct { RT3070_DEF_RF },rt3572_def_rf[] = { RT3572_DEF_RF +},rt3593_def_rf[] = { + RT3593_DEF_RF },rt5390_def_rf[] = { RT5390_DEF_RF },rt5392_def_rf[] = { @@ -588,6 +636,46 @@ static const struct usb_config run_confi } }; +static void +run_autoinst(void *arg, struct usb_device *udev, + struct usb_attach_arg *uaa) +{ + struct usb_interface *iface; + struct usb_interface_descriptor *id; + + if (uaa->dev_state != UAA_DEV_READY) + return; + + iface = usbd_get_iface(udev, 0); + if (iface == NULL) + return; + id = iface->idesc; + if (id == NULL || id->bInterfaceClass != UICLASS_MASS) + return; + if (usbd_lookup_id_by_uaa(run_devs, sizeof(run_devs), uaa)) + return; + + if (usb_msc_eject(udev, 0, MSC_EJECT_STOPUNIT) == 0) + uaa->dev_state = UAA_DEV_EJECTING; +} + +static int +run_driver_loaded(struct module *mod, int what, void *arg) +{ + switch (what) { + case MOD_LOAD: + run_etag = EVENTHANDLER_REGISTER(usb_dev_configured, + run_autoinst, NULL, EVENTHANDLER_PRI_ANY); + break; + case MOD_UNLOAD: + EVENTHANDLER_DEREGISTER(usb_dev_configured, run_etag); + break; + default: + return (EOPNOTSUPP); + } + return (0); +} + static int run_match(device_t self) { @@ -709,7 +797,8 @@ run_attach(device_t self) setbit(&bands, IEEE80211_MODE_11B); setbit(&bands, IEEE80211_MODE_11G); if (sc->rf_rev == RT2860_RF_2750 || sc->rf_rev == RT2860_RF_2850 || - sc->rf_rev == RT3070_RF_3052 || sc->rf_rev == RT5592_RF_5592) + sc->rf_rev == RT3070_RF_3052 || sc->rf_rev == RT3593_RF_3053 || + sc->rf_rev == RT5592_RF_5592) setbit(&bands, IEEE80211_MODE_11A); ieee80211_init_channels(ic, NULL, &bands); @@ -1060,9 +1149,11 @@ run_load_microcode(struct run_softc *sc) } /* write microcode image */ - run_write_region_1(sc, RT2870_FW_BASE, base, 4096); - run_write(sc, RT2860_H2M_MAILBOX_CID, 0xffffffff); - run_write(sc, RT2860_H2M_MAILBOX_STATUS, 0xffffffff); + if (sc->mac_ver != 0x3593) { + run_write_region_1(sc, RT2870_FW_BASE, base, 4096); + run_write(sc, RT2860_H2M_MAILBOX_CID, 0xffffffff); + run_write(sc, RT2860_H2M_MAILBOX_STATUS, 0xffffffff); + } req.bmRequestType = UT_WRITE_VENDOR_DEVICE; req.bRequest = RT2870_RESET; @@ -1077,15 +1168,16 @@ run_load_microcode(struct run_softc *sc) run_delay(sc, 10); + run_write(sc, RT2860_H2M_BBPAGENT, 0); run_write(sc, RT2860_H2M_MAILBOX, 0); + run_write(sc, RT2860_H2M_INTSRC, 0); if ((error = run_mcu_cmd(sc, RT2860_MCU_CMD_RFRESET, 0)) != 0) goto fail; /* wait until microcontroller is ready */ for (ntries = 0; ntries < 1000; ntries++) { - if ((error = run_read(sc, RT2860_SYS_CTRL, &tmp)) != 0) { + if ((error = run_read(sc, RT2860_SYS_CTRL, &tmp)) != 0) goto fail; - } if (tmp & RT2860_MCU_READY) break; run_delay(sc, 10); @@ -1247,9 +1339,8 @@ run_set_region_4(struct run_softc *sc, u return (error); } -/* Read 16-bit from eFUSE ROM (RT3070 only.) */ static int -run_efuse_read_2(struct run_softc *sc, uint16_t addr, uint16_t *val) +run_efuse_read(struct run_softc *sc, uint16_t addr, uint16_t *val, int count) { uint32_t tmp; uint16_t reg; @@ -1258,7 +1349,8 @@ run_efuse_read_2(struct run_softc *sc, u if ((error = run_read(sc, RT3070_EFUSE_CTRL, &tmp)) != 0) return (error); - addr *= 2; + if (count == 2) + addr *= 2; /*- * Read one 16-byte block into registers EFUSE_DATA[0-3]: * DATA0: F E D C @@ -1288,10 +1380,19 @@ run_efuse_read_2(struct run_softc *sc, u if ((error = run_read(sc, reg, &tmp)) != 0) return (error); - *val = (addr & 2) ? tmp >> 16 : tmp & 0xffff; + tmp >>= (8 * (addr & 0x3)); + *val = (addr & 1) ? tmp >> 16 : tmp & 0xffff; + return (0); } +/* Read 16-bit from eFUSE ROM for RT3xxx. */ +static int +run_efuse_read_2(struct run_softc *sc, uint16_t addr, uint16_t *val) +{ + return (run_efuse_read(sc, addr, val, 2)); +} + static int run_eeprom_read_2(struct run_softc *sc, uint16_t addr, uint16_t *val) { @@ -1304,7 +1405,7 @@ run_eeprom_read_2(struct run_softc *sc, req.bRequest = RT2870_EEPROM_READ; USETW(req.wValue, 0); USETW(req.wIndex, addr); - USETW(req.wLength, sizeof tmp); + USETW(req.wLength, sizeof(tmp)); error = usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, &tmp); if (error == 0) @@ -1499,6 +1600,7 @@ run_get_rf(uint16_t rev) case RT3070_RF_3021: return "RT3021"; case RT3070_RF_3022: return "RT3022"; case RT3070_RF_3052: return "RT3052"; + case RT3593_RF_3053: return "RT3053"; case RT5592_RF_5592: return "RT5592"; case RT5390_RF_5370: return "RT5370"; case RT5390_RF_5372: return "RT5372"; @@ -1506,6 +1608,125 @@ run_get_rf(uint16_t rev) return ("unknown"); } +static void +run_rt3593_get_txpower(struct run_softc *sc) +{ + uint16_t addr, val; + int i; + + /* Read power settings for 2GHz channels. */ + for (i = 0; i < 14; i += 2) { + addr = (sc->ntxchains == 3) ? RT3593_EEPROM_PWR2GHZ_BASE1 : + RT2860_EEPROM_PWR2GHZ_BASE1; + run_srom_read(sc, addr + i / 2, &val); + sc->txpow1[i + 0] = (int8_t)(val & 0xff); + sc->txpow1[i + 1] = (int8_t)(val >> 8); + + addr = (sc->ntxchains == 3) ? RT3593_EEPROM_PWR2GHZ_BASE2 : + RT2860_EEPROM_PWR2GHZ_BASE2; + run_srom_read(sc, addr + i / 2, &val); + sc->txpow2[i + 0] = (int8_t)(val & 0xff); + sc->txpow2[i + 1] = (int8_t)(val >> 8); + + if (sc->ntxchains == 3) { + run_srom_read(sc, RT3593_EEPROM_PWR2GHZ_BASE3 + i / 2, + &val); + sc->txpow3[i + 0] = (int8_t)(val & 0xff); + sc->txpow3[i + 1] = (int8_t)(val >> 8); + } + } + /* Fix broken Tx power entries. */ + for (i = 0; i < 14; i++) { + if (sc->txpow1[i] > 31) + sc->txpow1[i] = 5; + if (sc->txpow2[i] > 31) + sc->txpow2[i] = 5; + if (sc->ntxchains == 3) { + if (sc->txpow3[i] > 31) + sc->txpow3[i] = 5; + } + } + /* Read power settings for 5GHz channels. */ + for (i = 0; i < 40; i += 2) { + run_srom_read(sc, RT3593_EEPROM_PWR5GHZ_BASE1 + i / 2, &val); + sc->txpow1[i + 14] = (int8_t)(val & 0xff); + sc->txpow1[i + 15] = (int8_t)(val >> 8); + + run_srom_read(sc, RT3593_EEPROM_PWR5GHZ_BASE2 + i / 2, &val); + sc->txpow2[i + 14] = (int8_t)(val & 0xff); + sc->txpow2[i + 15] = (int8_t)(val >> 8); + + if (sc->ntxchains == 3) { + run_srom_read(sc, RT3593_EEPROM_PWR5GHZ_BASE3 + i / 2, + &val); + sc->txpow3[i + 14] = (int8_t)(val & 0xff); + sc->txpow3[i + 15] = (int8_t)(val >> 8); + } + } +} + +static void +run_get_txpower(struct run_softc *sc) +{ + uint16_t val; + int i; + + /* Read power settings for 2GHz channels. */ + for (i = 0; i < 14; i += 2) { + run_srom_read(sc, RT2860_EEPROM_PWR2GHZ_BASE1 + i / 2, &val); + sc->txpow1[i + 0] = (int8_t)(val & 0xff); + sc->txpow1[i + 1] = (int8_t)(val >> 8); + + if (sc->mac_ver != 0x5390) { + run_srom_read(sc, + RT2860_EEPROM_PWR2GHZ_BASE2 + i / 2, &val); + sc->txpow2[i + 0] = (int8_t)(val & 0xff); + sc->txpow2[i + 1] = (int8_t)(val >> 8); + } + } + /* Fix broken Tx power entries. */ + for (i = 0; i < 14; i++) { + if (sc->mac_ver >= 0x5390) { + if (sc->txpow1[i] < 0 || sc->txpow1[i] > 27) + sc->txpow1[i] = 5; + } else { + if (sc->txpow1[i] < 0 || sc->txpow1[i] > 31) + sc->txpow1[i] = 5; + } + if (sc->mac_ver > 0x5390) { + if (sc->txpow2[i] < 0 || sc->txpow2[i] > 27) + sc->txpow2[i] = 5; + } else if (sc->mac_ver < 0x5390) { + if (sc->txpow2[i] < 0 || sc->txpow2[i] > 31) + sc->txpow2[i] = 5; + } + DPRINTF("chan %d: power1=%d, power2=%d\n", + rt2860_rf2850[i].chan, sc->txpow1[i], sc->txpow2[i]); + } + /* Read power settings for 5GHz channels. */ + for (i = 0; i < 40; i += 2) { + run_srom_read(sc, RT2860_EEPROM_PWR5GHZ_BASE1 + i / 2, &val); + sc->txpow1[i + 14] = (int8_t)(val & 0xff); + sc->txpow1[i + 15] = (int8_t)(val >> 8); + + run_srom_read(sc, RT2860_EEPROM_PWR5GHZ_BASE2 + i / 2, &val); + sc->txpow2[i + 14] = (int8_t)(val & 0xff); + sc->txpow2[i + 15] = (int8_t)(val >> 8); + } + /* Fix broken Tx power entries. */ + for (i = 0; i < 40; i++ ) { + if (sc->mac_ver != 0x5592) { + if (sc->txpow1[14 + i] < -7 || sc->txpow1[14 + i] > 15) + sc->txpow1[14 + i] = 5; + if (sc->txpow2[14 + i] < -7 || sc->txpow2[14 + i] > 15) + sc->txpow2[14 + i] = 5; + } + DPRINTF("chan %d: power1=%d, power2=%d\n", + rt2860_rf2850[14 + i].chan, sc->txpow1[14 + i], + sc->txpow2[14 + i]); + } +} + static int run_read_eeprom(struct run_softc *sc) { @@ -1519,7 +1740,7 @@ run_read_eeprom(struct run_softc *sc) if (sc->mac_ver >= 0x3070) { run_read(sc, RT3070_EFUSE_CTRL, &tmp); DPRINTF("EFUSE_CTRL=0x%08x\n", tmp); - if (tmp & RT3070_SEL_EFUSE) + if ((tmp & RT3070_SEL_EFUSE) || sc->mac_ver == 0x3593) sc->sc_srom_read = run_efuse_read_2; } @@ -1538,7 +1759,7 @@ run_read_eeprom(struct run_softc *sc) sc->sc_bssid[4] = val & 0xff; sc->sc_bssid[5] = val >> 8; - if (sc->mac_ver < 0x5390) { + if (sc->mac_ver < 0x3593) { /* read vender BBP settings */ for (i = 0; i < 10; i++) { run_srom_read(sc, RT2860_EEPROM_BBP_BASE + i, &val); @@ -1561,16 +1782,22 @@ run_read_eeprom(struct run_softc *sc) } /* read RF frequency offset from EEPROM */ - run_srom_read(sc, RT2860_EEPROM_FREQ_LEDS, &val); + run_srom_read(sc, (sc->mac_ver != 0x3593) ? RT2860_EEPROM_FREQ_LEDS : + RT3593_EEPROM_FREQ, &val); sc->freq = ((val & 0xff) != 0xff) ? val & 0xff : 0; DPRINTF("EEPROM freq offset %d\n", sc->freq & 0xff); + run_srom_read(sc, (sc->mac_ver != 0x3593) ? RT2860_EEPROM_FREQ_LEDS : + RT3593_EEPROM_FREQ_LEDS, &val); if (val >> 8 != 0xff) { /* read LEDs operating mode */ sc->leds = val >> 8; - run_srom_read(sc, RT2860_EEPROM_LED1, &sc->led[0]); - run_srom_read(sc, RT2860_EEPROM_LED2, &sc->led[1]); - run_srom_read(sc, RT2860_EEPROM_LED3, &sc->led[2]); + run_srom_read(sc, (sc->mac_ver != 0x3593) ? RT2860_EEPROM_LED1 : + RT3593_EEPROM_LED1, &sc->led[0]); + run_srom_read(sc, (sc->mac_ver != 0x3593) ? RT2860_EEPROM_LED2 : + RT3593_EEPROM_LED2, &sc->led[1]); + run_srom_read(sc, (sc->mac_ver != 0x3593) ? RT2860_EEPROM_LED3 : + RT3593_EEPROM_LED3, &sc->led[2]); } else { /* broken EEPROM, use default settings */ sc->leds = 0x01; @@ -1588,6 +1815,8 @@ run_read_eeprom(struct run_softc *sc) run_srom_read(sc, RT2860_EEPROM_ANTENNA, &val); if (val == 0xffff) { + device_printf(sc->sc_dev, + "invalid EEPROM antenna info, using default\n"); DPRINTF("invalid EEPROM antenna info, using default\n"); if (sc->mac_ver == 0x3572) { /* default to RF3052 2T2R */ @@ -1632,60 +1861,11 @@ run_read_eeprom(struct run_softc *sc) sc->rfswitch = val & 1; } - /* read power settings for 2GHz channels */ - for (i = 0; i < 14; i += 2) { - run_srom_read(sc, RT2860_EEPROM_PWR2GHZ_BASE1 + i / 2, &val); - sc->txpow1[i + 0] = (int8_t)(val & 0xff); - sc->txpow1[i + 1] = (int8_t)(val >> 8); - - if (sc->mac_ver != 0x5390) { - run_srom_read(sc, - RT2860_EEPROM_PWR2GHZ_BASE2 + i / 2, &val); - sc->txpow2[i + 0] = (int8_t)(val & 0xff); - sc->txpow2[i + 1] = (int8_t)(val >> 8); - } - } - /* fix broken Tx power entries */ - for (i = 0; i < 14; i++) { - if (sc->mac_ver >= 0x5390) { - if (sc->txpow1[i] < 0 || sc->txpow1[i] > 27) - sc->txpow1[i] = 5; - } else { - if (sc->txpow1[i] < 0 || sc->txpow1[i] > 31) - sc->txpow1[i] = 5; - } - if (sc->mac_ver > 0x5390) { - if (sc->txpow2[i] < 0 || sc->txpow2[i] > 27) - sc->txpow2[i] = 5; - } else if (sc->mac_ver < 0x5390) { - if (sc->txpow2[i] < 0 || sc->txpow2[i] > 31) - sc->txpow2[i] = 5; - } - DPRINTF("chan %d: power1=%d, power2=%d\n", - rt2860_rf2850[i].chan, sc->txpow1[i], sc->txpow2[i]); - } - /* read power settings for 5GHz channels */ - for (i = 0; i < 40; i += 2) { - run_srom_read(sc, RT2860_EEPROM_PWR5GHZ_BASE1 + i / 2, &val); - sc->txpow1[i + 14] = (int8_t)(val & 0xff); - sc->txpow1[i + 15] = (int8_t)(val >> 8); - - run_srom_read(sc, RT2860_EEPROM_PWR5GHZ_BASE2 + i / 2, &val); - sc->txpow2[i + 14] = (int8_t)(val & 0xff); - sc->txpow2[i + 15] = (int8_t)(val >> 8); - } - /* fix broken Tx power entries */ - for (i = 0; i < 40; i++ ) { - if (sc->mac_ver != 0x5592) { - if (sc->txpow1[14 + i] < -7 || sc->txpow1[14 + i] > 15) - sc->txpow1[14 + i] = 5; - if (sc->txpow2[14 + i] < -7 || sc->txpow2[14 + i] > 15) - sc->txpow2[14 + i] = 5; - } - DPRINTF("chan %d: power1=%d, power2=%d\n", - rt2860_rf2850[14 + i].chan, sc->txpow1[14 + i], - sc->txpow2[14 + i]); - } + /* Read Tx power settings. */ + if (sc->mac_ver == 0x3593) + run_rt3593_get_txpower(sc); + else + run_get_txpower(sc); /* read Tx power compensation for each Tx rate */ run_srom_read(sc, RT2860_EEPROM_DELTAPWR, &val); @@ -1721,27 +1901,38 @@ run_read_eeprom(struct run_softc *sc) sc->txpow40mhz_2ghz[ridx], sc->txpow40mhz_5ghz[ridx]); } - /* read RSSI offsets and LNA gains from EEPROM */ - run_srom_read(sc, RT2860_EEPROM_RSSI1_2GHZ, &val); + /* Read RSSI offsets and LNA gains from EEPROM. */ + run_srom_read(sc, (sc->mac_ver != 0x3593) ? RT2860_EEPROM_RSSI1_2GHZ : + RT3593_EEPROM_RSSI1_2GHZ, &val); sc->rssi_2ghz[0] = val & 0xff; /* Ant A */ sc->rssi_2ghz[1] = val >> 8; /* Ant B */ - run_srom_read(sc, RT2860_EEPROM_RSSI2_2GHZ, &val); + run_srom_read(sc, (sc->mac_ver != 0x3593) ? RT2860_EEPROM_RSSI2_2GHZ : + RT3593_EEPROM_RSSI2_2GHZ, &val); if (sc->mac_ver >= 0x3070) { - /* - * On RT3070 chips (limited to 2 Rx chains), this ROM - * field contains the Tx mixer gain for the 2GHz band. - */ - if ((val & 0xff) != 0xff) - sc->txmixgain_2ghz = val & 0x7; + if (sc->mac_ver == 0x3593) { + sc->txmixgain_2ghz = 0; + sc->rssi_2ghz[2] = val & 0xff; /* Ant C */ + } else { + /* + * On RT3070 chips (limited to 2 Rx chains), this ROM + * field contains the Tx mixer gain for the 2GHz band. + */ + if ((val & 0xff) != 0xff) + sc->txmixgain_2ghz = val & 0x7; + } DPRINTF("tx mixer gain=%u (2GHz)\n", sc->txmixgain_2ghz); } else sc->rssi_2ghz[2] = val & 0xff; /* Ant C */ + if (sc->mac_ver == 0x3593) + run_srom_read(sc, RT3593_EEPROM_LNA_5GHZ, &val); sc->lna[2] = val >> 8; /* channel group 2 */ - run_srom_read(sc, RT2860_EEPROM_RSSI1_5GHZ, &val); + run_srom_read(sc, (sc->mac_ver != 0x3593) ? RT2860_EEPROM_RSSI1_5GHZ : + RT3593_EEPROM_RSSI1_5GHZ, &val); sc->rssi_5ghz[0] = val & 0xff; /* Ant A */ sc->rssi_5ghz[1] = val >> 8; /* Ant B */ - run_srom_read(sc, RT2860_EEPROM_RSSI2_5GHZ, &val); + run_srom_read(sc, (sc->mac_ver != 0x3593) ? RT2860_EEPROM_RSSI2_5GHZ : + RT3593_EEPROM_RSSI2_5GHZ, &val); if (sc->mac_ver == 0x3572) { /* * On RT3572 chips (limited to 2 Rx chains), this ROM @@ -1752,9 +1943,14 @@ run_read_eeprom(struct run_softc *sc) DPRINTF("tx mixer gain=%u (5GHz)\n", sc->txmixgain_5ghz); } else sc->rssi_5ghz[2] = val & 0xff; /* Ant C */ + if (sc->mac_ver == 0x3593) { + sc->txmixgain_5ghz = 0; + run_srom_read(sc, RT3593_EEPROM_LNA_5GHZ, &val); + } sc->lna[3] = val >> 8; /* channel group 3 */ - run_srom_read(sc, RT2860_EEPROM_LNA, &val); + run_srom_read(sc, (sc->mac_ver != 0x3593) ? RT2860_EEPROM_LNA : + RT3593_EEPROM_LNA, &val); sc->lna[0] = val & 0xff; /* channel group 0 */ sc->lna[1] = val >> 8; /* channel group 1 */ @@ -2569,9 +2765,11 @@ run_rx_frame(struct run_softc *sc, struc rxwi = mtod(m, struct rt2860_rxwi *); len = le16toh(rxwi->len) & 0xfff; - rxwisize = (sc->mac_ver == 0x5592) ? - sizeof(struct rt2860_rxwi) + sizeof(uint64_t) : - sizeof(struct rt2860_rxwi); + rxwisize = sizeof(struct rt2860_rxwi); + if (sc->mac_ver == 0x5592) + rxwisize += sizeof(uint64_t); + else if (sc->mac_ver == 0x3593) + rxwisize += sizeof(uint32_t); if (__predict_false(len > dmalen)) { m_freem(m); ifp->if_ierrors++; @@ -2682,9 +2880,11 @@ run_bulk_rx_callback(struct usb_xfer *xf uint16_t rxwisize; int xferlen; - rxwisize = (sc->mac_ver == 0x5592) ? - sizeof(struct rt2860_rxwi) + sizeof(uint64_t) : - sizeof(struct rt2860_rxwi); + rxwisize = sizeof(struct rt2860_rxwi); + if (sc->mac_ver == 0x5592) + rxwisize += sizeof(uint64_t); + else if (sc->mac_ver == 0x3593) + rxwisize += sizeof(uint32_t); usbd_xfer_status(xfer, &xferlen, NULL, NULL, NULL); @@ -2868,10 +3068,10 @@ tr_setup: STAILQ_REMOVE_HEAD(&pq->tx_qh, next); m = data->m; - size = (sc->mac_ver == 0x5592) ? - RUN_MAX_TXSZ + sizeof(uint32_t) : RUN_MAX_TXSZ; + size = (sc->mac_ver == 0x5592) ? + sizeof(data->desc) + sizeof(uint32_t) : sizeof(data->desc); if ((m->m_pkthdr.len + - sizeof(data->desc) + 3 + 8) > size) { + size + 3 + 8) > RUN_MAX_TXSZ) { DPRINTF("data overflow, %u bytes\n", m->m_pkthdr.len); @@ -2883,8 +3083,6 @@ tr_setup: } pc = usbd_xfer_get_frame(xfer, 0); - size = (sc->mac_ver == 0x5592) ? - sizeof(data->desc) + sizeof(uint32_t) : sizeof(data->desc); usbd_copy_in(pc, 0, &data->desc, size); usbd_m_copy_in(pc, size, m, 0, m->m_pkthdr.len); size += m->m_pkthdr.len; @@ -3598,6 +3796,107 @@ run_ioctl(struct ifnet *ifp, u_long cmd, } static void +run_iq_calib(struct run_softc *sc, u_int chan) +{ + uint16_t val; + + /* Tx0 IQ gain. */ + run_bbp_write(sc, 158, 0x2c); + if (chan <= 14) + run_efuse_read(sc, RT5390_EEPROM_IQ_GAIN_CAL_TX0_2GHZ, &val, 1); + else if (chan <= 64) { + run_efuse_read(sc, + RT5390_EEPROM_IQ_GAIN_CAL_TX0_CH36_TO_CH64_5GHZ, + &val, 1); + } else if (chan <= 138) { + run_efuse_read(sc, + RT5390_EEPROM_IQ_GAIN_CAL_TX0_CH100_TO_CH138_5GHZ, + &val, 1); + } else if (chan <= 165) { + run_efuse_read(sc, + RT5390_EEPROM_IQ_GAIN_CAL_TX0_CH140_TO_CH165_5GHZ, + &val, 1); + } else + val = 0; + run_bbp_write(sc, 159, val); + + /* Tx0 IQ phase. */ + run_bbp_write(sc, 158, 0x2d); + if (chan <= 14) { + run_efuse_read(sc, RT5390_EEPROM_IQ_PHASE_CAL_TX0_2GHZ, + &val, 1); + } else if (chan <= 64) { + run_efuse_read(sc, + RT5390_EEPROM_IQ_PHASE_CAL_TX0_CH36_TO_CH64_5GHZ, + &val, 1); + } else if (chan <= 138) { + run_efuse_read(sc, + RT5390_EEPROM_IQ_PHASE_CAL_TX0_CH100_TO_CH138_5GHZ, + &val, 1); + } else if (chan <= 165) { + run_efuse_read(sc, + RT5390_EEPROM_IQ_PHASE_CAL_TX0_CH140_TO_CH165_5GHZ, + &val, 1); + } else + val = 0; + run_bbp_write(sc, 159, val); + + /* Tx1 IQ gain. */ + run_bbp_write(sc, 158, 0x4a); + if (chan <= 14) { + run_efuse_read(sc, RT5390_EEPROM_IQ_GAIN_CAL_TX1_2GHZ, + &val, 1); + } else if (chan <= 64) { + run_efuse_read(sc, + RT5390_EEPROM_IQ_GAIN_CAL_TX1_CH36_TO_CH64_5GHZ, + &val, 1); + } else if (chan <= 138) { + run_efuse_read(sc, + RT5390_EEPROM_IQ_GAIN_CAL_TX1_CH100_TO_CH138_5GHZ, + &val, 1); + } else if (chan <= 165) { + run_efuse_read(sc, + RT5390_EEPROM_IQ_GAIN_CAL_TX1_CH140_TO_CH165_5GHZ, + &val, 1); + } else + val = 0; + run_bbp_write(sc, 159, val); + + /* Tx1 IQ phase. */ + run_bbp_write(sc, 158, 0x4b); + if (chan <= 14) { + run_efuse_read(sc, RT5390_EEPROM_IQ_PHASE_CAL_TX1_2GHZ, + &val, 1); + } else if (chan <= 64) { + run_efuse_read(sc, + RT5390_EEPROM_IQ_PHASE_CAL_TX1_CH36_TO_CH64_5GHZ, + &val, 1); + } else if (chan <= 138) { + run_efuse_read(sc, + RT5390_EEPROM_IQ_PHASE_CAL_TX1_CH100_TO_CH138_5GHZ, + &val, 1); + } else if (chan <= 165) { + run_efuse_read(sc, + RT5390_EEPROM_IQ_PHASE_CAL_TX1_CH140_TO_CH165_5GHZ, + &val, 1); + } else + val = 0; + run_bbp_write(sc, 159, val); + + /* RF IQ compensation control. */ + run_bbp_write(sc, 158, 0x04); + run_efuse_read(sc, RT5390_EEPROM_RF_IQ_COMPENSATION_CTL, + &val, 1); + run_bbp_write(sc, 159, val); + + /* RF IQ imbalance compensation control. */ + run_bbp_write(sc, 158, 0x03); + run_efuse_read(sc, + RT5390_EEPROM_RF_IQ_IMBALANCE_COMPENSATION_CTL, &val, 1); + run_bbp_write(sc, 159, val); +} + +static void run_set_agc(struct run_softc *sc, uint8_t agc) { uint8_t bbp; @@ -3625,6 +3924,11 @@ run_select_chan_group(struct run_softc * if (sc->mac_ver < 0x3572) run_bbp_write(sc, 86, 0x00); + if (sc->mac_ver == 0x3593) { + run_bbp_write(sc, 77, 0x98); + run_bbp_write(sc, 83, (group == 0) ? 0x8a : 0x9a); + } + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 03:30:56 2014 Return-Path: Delivered-To: svn-src-all@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 79BF7BB4; Fri, 14 Feb 2014 03:30:56 +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 65D7E179A; Fri, 14 Feb 2014 03:30:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1E3Uu1i012879; Fri, 14 Feb 2014 03:30:56 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1E3UuUd012822; Fri, 14 Feb 2014 03:30:56 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201402140330.s1E3UuUd012822@svn.freebsd.org> From: Kevin Lo Date: Fri, 14 Feb 2014 03:30:56 +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: r261866 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 03:30:56 -0000 Author: kevlo Date: Fri Feb 14 03:30:55 2014 New Revision: 261866 URL: http://svnweb.freebsd.org/changeset/base/261866 Log: MFC r257957: Mention the RT5370/RT5372 chipset. Modified: stable/9/share/man/man4/runfw.4 (contents, props changed) Modified: stable/9/share/man/man4/runfw.4 ============================================================================== --- stable/9/share/man/man4/runfw.4 Fri Feb 14 02:53:10 2014 (r261865) +++ stable/9/share/man/man4/runfw.4 Fri Feb 14 03:30:55 2014 (r261866) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 12, 2011 +.Dd November 11, 2013 .Dt RUNFW 4 .Os .Sh NAME @@ -32,7 +32,7 @@ kernel configuration file: .Ed .Pp This will include two firmware images, RT2870 and RT3071, inside the kernel. -.Xr run 4 +.Xr run 4 will load the appropriate image into the chip. .Pp Alternatively, to load the firmware images as a module at boot time, place @@ -43,7 +43,7 @@ runfw_load="YES" .Ed .Sh DESCRIPTION This module provides firmware sets for the Ralink RT2700U, -RT2800U and RT3000U chip based USB WiFi adapters. +RT2800U, RT3000U and RT3900E chip based USB WiFi adapters. Please read Ralink's license, src/sys/contrib/dev/run/LICENSE. .Sh SEE ALSO .Xr run 4 , From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 03:34:13 2014 Return-Path: Delivered-To: svn-src-all@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 50795D1F; Fri, 14 Feb 2014 03:34: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 3D4C0182A; Fri, 14 Feb 2014 03:34:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1E3YDJE013605; Fri, 14 Feb 2014 03:34:13 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1E3YDsp013604; Fri, 14 Feb 2014 03:34:13 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201402140334.s1E3YDsp013604@svn.freebsd.org> From: Attilio Rao Date: Fri, 14 Feb 2014 03:34:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261867 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 03:34:13 -0000 Author: attilio Date: Fri Feb 14 03:34:12 2014 New Revision: 261867 URL: http://svnweb.freebsd.org/changeset/base/261867 Log: Fix-up r254141: in the process of making a failing vm_page_rename() a call of pager_swap_freespace() was moved around, now leading to freeing the incorrect page because of the pindex changes after vm_page_rename(). Get back to use the correct pindex when destroying the swap space. Sponsored by: EMC / Isilon storage division Reported by: avg Tested by: pho MFC after: 7 days Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Fri Feb 14 03:30:55 2014 (r261866) +++ head/sys/vm/vm_object.c Fri Feb 14 03:34:12 2014 (r261867) @@ -1627,9 +1627,11 @@ vm_object_backing_scan(vm_object_t objec p = TAILQ_FIRST(&backing_object->memq); continue; } + + /* Use the old pindex to free the right page. */ if (backing_object->type == OBJT_SWAP) - swap_pager_freespace(backing_object, p->pindex, - 1); + swap_pager_freespace(backing_object, + new_pindex + backing_offset_index, 1); #if VM_NRESERVLEVEL > 0 /* From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 03:45:50 2014 Return-Path: Delivered-To: svn-src-all@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 1F157EC3; Fri, 14 Feb 2014 03:45: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 08A0418BF; Fri, 14 Feb 2014 03:45:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1E3jo0Z017512; Fri, 14 Feb 2014 03:45:50 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1E3jn2c017508; Fri, 14 Feb 2014 03:45:49 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201402140345.s1E3jn2c017508@svn.freebsd.org> From: Kevin Lo Date: Fri, 14 Feb 2014 03:45:49 +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: r261868 - in stable/10: share/man/man4 sys/dev/usb sys/dev/usb/wlan X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 03:45:50 -0000 Author: kevlo Date: Fri Feb 14 03:45:49 2014 New Revision: 261868 URL: http://svnweb.freebsd.org/changeset/base/261868 Log: MFC r259544, r259545, r259546, r259547, r259812, r259939, r260219, r260542, r261118, r261124, r261330: - Add support for the MediaTek/Ralink RT3593 chipset. - Various minor USB WLAN fixes and improvements. Modified: stable/10/share/man/man4/run.4 stable/10/sys/dev/usb/usbdevs stable/10/sys/dev/usb/wlan/if_run.c stable/10/sys/dev/usb/wlan/if_runreg.h stable/10/sys/dev/usb/wlan/if_runvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/run.4 ============================================================================== --- stable/10/share/man/man4/run.4 Fri Feb 14 03:34:12 2014 (r261867) +++ stable/10/share/man/man4/run.4 Fri Feb 14 03:45:49 2014 (r261868) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 11, 2013 +.Dd January 3, 2014 .Dt RUN 4 .Os .Sh NAME @@ -64,8 +64,17 @@ The RT3000U is a single-chip solution ba an RT3020 (1T1R), RT3021 (1T2R) or RT3022 (2T2R) single-band radio transceiver. .Pp -The RT3900E is a single-chip solution based on an RT5390 MAC/BBP and -an RT5370 (1T1R) or RT5372 (2T2R) single-band radio transceiver. +The RT3900E is a single-chip USB 2.0 802.11n solution. +The MAC/Baseband Processor can be an RT3593, RT5390, RT5392 or an RT5592. +The radio can be an RT3053, RT5370, RT5372 or an RT5572. +The RT3053 chip operates in the 2GHz and 5GHz spectra and supports up to +3 transmit paths and 3 receiver paths (3T3R). +The RT5370 chip operates in the 2GHz spectrum and supports 1 transmit path +and 1 receiver path (1T1R). +The RT5372 chip operates in the 2GHz spectrum and supports up to 2 transmit +paths and 2 receiver paths (2T2R). +The RT5572 chip operates in the 2GHz and 5GHz spectra and supports up to +2 transmit paths and 2 receiver paths (2T2R). .Pp These are the modes the .Nm @@ -116,11 +125,13 @@ driver supports the following wireless a .It Airlink101 AWLL6090 .It ASUS USB-N11 .It ASUS USB-N13 ver. A1 +.It ASUS USB-N66 .It ASUS WL-160N .It Belkin F5D8051 ver 3000 .It Belkin F5D8053 .It Belkin F5D8055 .It Belkin F6D4050 ver 1 +.It Belkin F9L1103 .It Buffalo WLI-UC-AG300N .It Buffalo WLI-UC-G300N .It Buffalo WLI-UC-G301N @@ -132,13 +143,15 @@ driver supports the following wireless a .It Corega CG-WLUSB300AGN .It Corega CG-WLUSB300GNM .It D-Link DWA-130 rev B1 -.It D-Link DWA-140 rev B1, B2, B3 +.It D-Link DWA-140 rev B1, B2, B3, D1 .It D-Link DWA-160 rev B2 +.It D-Link DWA-162 .It DrayTek Vigor N61 .It Edimax EW-7711UAn .It Edimax EW-7711UTn .It Edimax EW-7717Un .It Edimax EW-7718Un +.It Edimax EW-7733UnD .It Gigabyte GN-WB30N .It Gigabyte GN-WB31N .It Gigabyte GN-WB32L @@ -164,6 +177,7 @@ driver supports the following wireless a .It TP-LINK TL-WN727N v3 .It Unex DNUR-81 .It Unex DNUR-82 +.It ZyXEL NWD2705 .It ZyXEL NWD210N .It ZyXEL NWD270N .El @@ -235,4 +249,4 @@ driver was written by The .Nm driver does not support any of the 802.11n capabilities offered by the -RT2800 and RT3000 chipsets. +RT2800, RT3000 and RT3900 chipsets. Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Fri Feb 14 03:34:12 2014 (r261867) +++ stable/10/sys/dev/usb/usbdevs Fri Feb 14 03:45:49 2014 (r261868) @@ -1183,6 +1183,7 @@ product ASUS USBN13 0x1784 USB-N13 product ASUS RT3070_1 0x1790 RT3070 product ASUS USBN10 0x1786 USB-N10 product ASUS RTL8192CU 0x17ab RTL8192CU +product ASUS USBN66 0x17ad USB-N66 product ASUS RTL8192SU 0x1791 RTL8192SU product ASUS A730W 0x4202 ASUS MyPal A730W product ASUS P535 0x420f ASUS P535 PDA @@ -1285,6 +1286,7 @@ product BELKIN F5U409 0x0409 F5U409 Ser product BELKIN F6C550AVR 0x0551 F6C550-AVR UPS product BELKIN F5U120 0x1203 F5U120-PC Hub product BELKIN RTL8188CU 0x1102 RTL8188CU Wireless Adapter +product BELKIN F9L1103 0x1103 F9L1103 Wireless Adapter product BELKIN RTL8192CU 0x2102 RTL8192CU Wireless Adapter product BELKIN F7D2102 0x2103 F7D2102 Wireless Adapter product BELKIN ZD1211B 0x4050 ZD1211B @@ -1598,6 +1600,8 @@ product DLINK RT3072 0x3c0a RT3072 product DLINK DWA140B3 0x3c15 DWA-140 rev B3 product DLINK DWA160B2 0x3c1a DWA-160 rev B2 product DLINK DWA127 0x3c1b DWA-127 Wireless Adapter +product DLINK DWA162 0x3c1f DWA-162 Wireless Adapter +product DLINK DWA140D1 0x3c20 DWA-140 rev D1 product DLINK DSB650C 0x4000 10Mbps Ethernet product DLINK DSB650TX1 0x4001 10/100 Ethernet product DLINK DSB650TX 0x4002 10/100 Ethernet @@ -1658,6 +1662,7 @@ product EDIMAX RTL8192SU_3 0x7622 RTL819 product EDIMAX RT2870_1 0x7711 RT2870 product EDIMAX EW7717 0x7717 EW-7717 product EDIMAX EW7718 0x7718 EW-7718 +product EDIMAX EW7733UND 0x7733 EW-7733UnD product EDIMAX EW7811UN 0x7811 EW-7811Un product EDIMAX RTL8192CU 0x7822 RTL8192CU @@ -3617,11 +3622,13 @@ product RALINK RT2573 0x2573 RT2501USB product RALINK RT2671 0x2671 RT2601USB Wireless Adapter product RALINK RT2770 0x2770 RT2770 product RALINK RT2870 0x2870 RT2870 +product RALINK RT_STOR 0x2878 USB Storage product RALINK RT3070 0x3070 RT3070 product RALINK RT3071 0x3071 RT3071 product RALINK RT3072 0x3072 RT3072 product RALINK RT3370 0x3370 RT3370 product RALINK RT3572 0x3572 RT3572 +product RALINK RT3573 0x3573 RT3573 product RALINK RT5370 0x5370 RT5370 product RALINK RT5572 0x5572 RT5572 product RALINK RT8070 0x8070 RT8070 @@ -3643,10 +3650,11 @@ product REALTEK RTL8171 0x8171 RTL8171 product REALTEK RTL8172 0x8172 RTL8172 product REALTEK RTL8173 0x8173 RTL8173 product REALTEK RTL8174 0x8174 RTL8174 -product REALTEK RTL8188CE_1 0x817e RTL8188CE -product REALTEK RTL8188CU_0 0x8176 RTL8188CU -product REALTEK RTL8188CU_1 0x817a RTL8188CU -product REALTEK RTL8188CU_2 0x817b RTL8188CU +product REALTEK RTL8188CU_0 0x8176 RTL8188CU +product REALTEK RTL8188EU 0x8179 RTL8188EU +product REALTEK RTL8188CE_1 0x817e RTL8188CE +product REALTEK RTL8188CU_1 0x817a RTL8188CU +product REALTEK RTL8188CU_2 0x817b RTL8188CU product REALTEK RTL8187 0x8187 RTL8187 Wireless Adapter product REALTEK RTL8187B_0 0x8189 RTL8187B Wireless Adapter product REALTEK RTL8187B_1 0x8197 RTL8187B Wireless Adapter @@ -4486,3 +4494,4 @@ product ZYXEL G202 0x3410 G-202 product ZYXEL RT2870_1 0x3416 RT2870 product ZYXEL RT2870_2 0x341a RT2870 product ZYXEL RTL8192CU 0x341f RTL8192CU +product ZYXEL NWD2705 0x3421 NWD2705 Modified: stable/10/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_run.c Fri Feb 14 03:34:12 2014 (r261867) +++ stable/10/sys/dev/usb/wlan/if_run.c Fri Feb 14 03:45:49 2014 (r261868) @@ -2,7 +2,7 @@ * Copyright (c) 2008,2010 Damien Bergamini * ported to FreeBSD by Akinori Furukoshi * USB Consulting, Hans Petter Selasky - * Copyright (c) 2013 Kevin Lo + * Copyright (c) 2013-2014 Kevin Lo * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -69,14 +69,15 @@ __FBSDID("$FreeBSD$"); #include #include "usbdevs.h" -#define USB_DEBUG_VAR run_debug +#define USB_DEBUG_VAR run_debug #include +#include #include #include #ifdef USB_DEBUG -#define RUN_DEBUG +#define RUN_DEBUG #endif #ifdef RUN_DEBUG @@ -86,17 +87,19 @@ SYSCTL_INT(_hw_usb_run, OID_AUTO, debug, "run debug level"); #endif -#define IEEE80211_HAS_ADDR4(wh) \ +#define IEEE80211_HAS_ADDR4(wh) \ (((wh)->i_fc[1] & IEEE80211_FC1_DIR_MASK) == IEEE80211_FC1_DIR_DSTODS) /* * Because of LOR in run_key_delete(), use atomic instead. * '& RUN_CMDQ_MASQ' is to loop cmdq[]. */ -#define RUN_CMDQ_GET(c) (atomic_fetchadd_32((c), 1) & RUN_CMDQ_MASQ) +#define RUN_CMDQ_GET(c) (atomic_fetchadd_32((c), 1) & RUN_CMDQ_MASQ) static const STRUCT_USB_HOST_ID run_devs[] = { -#define RUN_DEV(v,p) { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) } +#define RUN_DEV(v,p) { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) } +#define RUN_DEV_EJECT(v,p) \ + { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, 0) } RUN_DEV(ABOCOM, RT2770), RUN_DEV(ABOCOM, RT2870), RUN_DEV(ABOCOM, RT3070), @@ -135,6 +138,7 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(ASUS, RT2870_5), RUN_DEV(ASUS, USBN13), RUN_DEV(ASUS, RT3070_1), + RUN_DEV(ASUS, USBN66), RUN_DEV(ASUS, USB_N53), RUN_DEV(ASUS2, USBN11), RUN_DEV(AZUREWAVE, RT2870_1), @@ -142,6 +146,7 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(AZUREWAVE, RT3070_1), RUN_DEV(AZUREWAVE, RT3070_2), RUN_DEV(AZUREWAVE, RT3070_3), + RUN_DEV(BELKIN, F9L1103), RUN_DEV(BELKIN, F5D8053V3), RUN_DEV(BELKIN, F5D8055), RUN_DEV(BELKIN, F5D8055V2), @@ -174,6 +179,7 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(DLINK, DWA127), RUN_DEV(DLINK, DWA140B3), RUN_DEV(DLINK, DWA160B2), + RUN_DEV(DLINK, DWA162), RUN_DEV(DLINK2, DWA130), RUN_DEV(DLINK2, RT2870_1), RUN_DEV(DLINK2, RT2870_2), @@ -186,6 +192,7 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(DLINK2, RT3072_1), RUN_DEV(EDIMAX, EW7717), RUN_DEV(EDIMAX, EW7718), + RUN_DEV(EDIMAX, EW7733UND), RUN_DEV(EDIMAX, RT2870_1), RUN_DEV(ENCORE, RT3070_1), RUN_DEV(ENCORE, RT3070_2), @@ -257,6 +264,7 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(RALINK, RT3072), RUN_DEV(RALINK, RT3370), RUN_DEV(RALINK, RT3572), + RUN_DEV(RALINK, RT3573), RUN_DEV(RALINK, RT5370), RUN_DEV(RALINK, RT5572), RUN_DEV(RALINK, RT8070), @@ -306,6 +314,9 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(ZINWELL, RT3072_2), RUN_DEV(ZYXEL, RT2870_1), RUN_DEV(ZYXEL, RT2870_2), + RUN_DEV(ZYXEL, NWD2705), + RUN_DEV_EJECT(RALINK, RT_STOR), +#undef RUN_DEV_EJECT #undef RUN_DEV }; @@ -321,6 +332,9 @@ static usb_callback_t run_bulk_tx_callba static usb_callback_t run_bulk_tx_callback4; static usb_callback_t run_bulk_tx_callback5; +static void run_autoinst(void *, struct usb_device *, + struct usb_attach_arg *); +static int run_driver_loaded(struct module *, int, void *); static void run_bulk_tx_callbackN(struct usb_xfer *xfer, usb_error_t error, u_int index); static struct ieee80211vap *run_vap_create(struct ieee80211com *, @@ -344,6 +358,7 @@ static int run_write(struct run_softc *, static int run_write_region_1(struct run_softc *, uint16_t, const uint8_t *, int); static int run_set_region_4(struct run_softc *, uint16_t, uint32_t, int); +static int run_efuse_read(struct run_softc *, uint16_t, uint16_t *, int); static int run_efuse_read_2(struct run_softc *, uint16_t, uint16_t *); static int run_eeprom_read_2(struct run_softc *, uint16_t, uint16_t *); static int run_rt2870_rf_write(struct run_softc *, uint32_t); @@ -353,6 +368,8 @@ static int run_bbp_read(struct run_softc static int run_bbp_write(struct run_softc *, uint8_t, uint8_t); static int run_mcu_cmd(struct run_softc *, uint8_t, uint16_t); static const char *run_get_rf(uint16_t); +static void run_rt3593_get_txpower(struct run_softc *); +static void run_get_txpower(struct run_softc *); static int run_read_eeprom(struct run_softc *); static struct ieee80211_node *run_node_alloc(struct ieee80211vap *, const uint8_t mac[IEEE80211_ADDR_LEN]); @@ -390,12 +407,14 @@ static int run_raw_xmit(struct ieee80211 const struct ieee80211_bpf_params *); static void run_start(struct ifnet *); static int run_ioctl(struct ifnet *, u_long, caddr_t); +static void run_iq_calib(struct run_softc *, u_int); static void run_set_agc(struct run_softc *, uint8_t); static void run_select_chan_group(struct run_softc *, int); static void run_set_rx_antenna(struct run_softc *, int); static void run_rt2870_set_chan(struct run_softc *, u_int); static void run_rt3070_set_chan(struct run_softc *, u_int); static void run_rt3572_set_chan(struct run_softc *, u_int); +static void run_rt3593_set_chan(struct run_softc *, u_int); static void run_rt5390_set_chan(struct run_softc *, u_int); static void run_rt5592_set_chan(struct run_softc *, u_int); static int run_set_chan(struct run_softc *, struct ieee80211_channel *); @@ -424,10 +443,13 @@ static void run_update_promisc(struct if static void run_rt5390_bbp_init(struct run_softc *); static int run_bbp_init(struct run_softc *); static int run_rt3070_rf_init(struct run_softc *); +static void run_rt3593_rf_init(struct run_softc *); static void run_rt5390_rf_init(struct run_softc *); static int run_rt3070_filter_calib(struct run_softc *, uint8_t, uint8_t, uint8_t *); static void run_rt3070_rf_setup(struct run_softc *); +static void run_rt3593_rf_setup(struct run_softc *); +static void run_rt5390_rf_setup(struct run_softc *); static int run_txrx_enable(struct run_softc *); static void run_adjust_freq_offset(struct run_softc *); static void run_init(void *); @@ -435,6 +457,30 @@ static void run_init_locked(struct run_s static void run_stop(void *); static void run_delay(struct run_softc *, u_int); +static eventhandler_tag run_etag; + +static const struct rt2860_rate { + uint8_t rate; + uint8_t mcs; + enum ieee80211_phytype phy; + uint8_t ctl_ridx; + uint16_t sp_ack_dur; + uint16_t lp_ack_dur; +} rt2860_rates[] = { + { 2, 0, IEEE80211_T_DS, 0, 314, 314 }, + { 4, 1, IEEE80211_T_DS, 1, 258, 162 }, + { 11, 2, IEEE80211_T_DS, 2, 223, 127 }, + { 22, 3, IEEE80211_T_DS, 3, 213, 117 }, + { 12, 0, IEEE80211_T_OFDM, 4, 60, 60 }, + { 18, 1, IEEE80211_T_OFDM, 4, 52, 52 }, + { 24, 2, IEEE80211_T_OFDM, 6, 48, 48 }, + { 36, 3, IEEE80211_T_OFDM, 6, 44, 44 }, + { 48, 4, IEEE80211_T_OFDM, 8, 44, 44 }, + { 72, 5, IEEE80211_T_OFDM, 8, 40, 40 }, + { 96, 6, IEEE80211_T_OFDM, 8, 40, 40 }, + { 108, 7, IEEE80211_T_OFDM, 8, 40, 40 } +}; + static const struct { uint16_t reg; uint32_t val; @@ -497,6 +543,8 @@ static const struct { RT3070_DEF_RF },rt3572_def_rf[] = { RT3572_DEF_RF +},rt3593_def_rf[] = { + RT3593_DEF_RF },rt5390_def_rf[] = { RT5390_DEF_RF },rt5392_def_rf[] = { @@ -589,6 +637,46 @@ static const struct usb_config run_confi } }; +static void +run_autoinst(void *arg, struct usb_device *udev, + struct usb_attach_arg *uaa) +{ + struct usb_interface *iface; + struct usb_interface_descriptor *id; + + if (uaa->dev_state != UAA_DEV_READY) + return; + + iface = usbd_get_iface(udev, 0); + if (iface == NULL) + return; + id = iface->idesc; + if (id == NULL || id->bInterfaceClass != UICLASS_MASS) + return; + if (usbd_lookup_id_by_uaa(run_devs, sizeof(run_devs), uaa)) + return; + + if (usb_msc_eject(udev, 0, MSC_EJECT_STOPUNIT) == 0) + uaa->dev_state = UAA_DEV_EJECTING; +} + +static int +run_driver_loaded(struct module *mod, int what, void *arg) +{ + switch (what) { + case MOD_LOAD: + run_etag = EVENTHANDLER_REGISTER(usb_dev_configured, + run_autoinst, NULL, EVENTHANDLER_PRI_ANY); + break; + case MOD_UNLOAD: + EVENTHANDLER_DEREGISTER(usb_dev_configured, run_etag); + break; + default: + return (EOPNOTSUPP); + } + return (0); +} + static int run_match(device_t self) { @@ -710,7 +798,8 @@ run_attach(device_t self) setbit(&bands, IEEE80211_MODE_11B); setbit(&bands, IEEE80211_MODE_11G); if (sc->rf_rev == RT2860_RF_2750 || sc->rf_rev == RT2860_RF_2850 || - sc->rf_rev == RT3070_RF_3052 || sc->rf_rev == RT5592_RF_5592) + sc->rf_rev == RT3070_RF_3052 || sc->rf_rev == RT3593_RF_3053 || + sc->rf_rev == RT5592_RF_5592) setbit(&bands, IEEE80211_MODE_11A); ieee80211_init_channels(ic, NULL, &bands); @@ -1061,9 +1150,11 @@ run_load_microcode(struct run_softc *sc) } /* write microcode image */ - run_write_region_1(sc, RT2870_FW_BASE, base, 4096); - run_write(sc, RT2860_H2M_MAILBOX_CID, 0xffffffff); - run_write(sc, RT2860_H2M_MAILBOX_STATUS, 0xffffffff); + if (sc->mac_ver != 0x3593) { + run_write_region_1(sc, RT2870_FW_BASE, base, 4096); + run_write(sc, RT2860_H2M_MAILBOX_CID, 0xffffffff); + run_write(sc, RT2860_H2M_MAILBOX_STATUS, 0xffffffff); + } req.bmRequestType = UT_WRITE_VENDOR_DEVICE; req.bRequest = RT2870_RESET; @@ -1078,15 +1169,16 @@ run_load_microcode(struct run_softc *sc) run_delay(sc, 10); + run_write(sc, RT2860_H2M_BBPAGENT, 0); run_write(sc, RT2860_H2M_MAILBOX, 0); + run_write(sc, RT2860_H2M_INTSRC, 0); if ((error = run_mcu_cmd(sc, RT2860_MCU_CMD_RFRESET, 0)) != 0) goto fail; /* wait until microcontroller is ready */ for (ntries = 0; ntries < 1000; ntries++) { - if ((error = run_read(sc, RT2860_SYS_CTRL, &tmp)) != 0) { + if ((error = run_read(sc, RT2860_SYS_CTRL, &tmp)) != 0) goto fail; - } if (tmp & RT2860_MCU_READY) break; run_delay(sc, 10); @@ -1248,9 +1340,8 @@ run_set_region_4(struct run_softc *sc, u return (error); } -/* Read 16-bit from eFUSE ROM (RT3070 only.) */ static int -run_efuse_read_2(struct run_softc *sc, uint16_t addr, uint16_t *val) +run_efuse_read(struct run_softc *sc, uint16_t addr, uint16_t *val, int count) { uint32_t tmp; uint16_t reg; @@ -1259,7 +1350,8 @@ run_efuse_read_2(struct run_softc *sc, u if ((error = run_read(sc, RT3070_EFUSE_CTRL, &tmp)) != 0) return (error); - addr *= 2; + if (count == 2) + addr *= 2; /*- * Read one 16-byte block into registers EFUSE_DATA[0-3]: * DATA0: F E D C @@ -1289,10 +1381,19 @@ run_efuse_read_2(struct run_softc *sc, u if ((error = run_read(sc, reg, &tmp)) != 0) return (error); - *val = (addr & 2) ? tmp >> 16 : tmp & 0xffff; + tmp >>= (8 * (addr & 0x3)); + *val = (addr & 1) ? tmp >> 16 : tmp & 0xffff; + return (0); } +/* Read 16-bit from eFUSE ROM for RT3xxx. */ +static int +run_efuse_read_2(struct run_softc *sc, uint16_t addr, uint16_t *val) +{ + return (run_efuse_read(sc, addr, val, 2)); +} + static int run_eeprom_read_2(struct run_softc *sc, uint16_t addr, uint16_t *val) { @@ -1305,7 +1406,7 @@ run_eeprom_read_2(struct run_softc *sc, req.bRequest = RT2870_EEPROM_READ; USETW(req.wValue, 0); USETW(req.wIndex, addr); - USETW(req.wLength, sizeof tmp); + USETW(req.wLength, sizeof(tmp)); error = usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, &tmp); if (error == 0) @@ -1500,6 +1601,7 @@ run_get_rf(uint16_t rev) case RT3070_RF_3021: return "RT3021"; case RT3070_RF_3022: return "RT3022"; case RT3070_RF_3052: return "RT3052"; + case RT3593_RF_3053: return "RT3053"; case RT5592_RF_5592: return "RT5592"; case RT5390_RF_5370: return "RT5370"; case RT5390_RF_5372: return "RT5372"; @@ -1507,6 +1609,125 @@ run_get_rf(uint16_t rev) return ("unknown"); } +static void +run_rt3593_get_txpower(struct run_softc *sc) +{ + uint16_t addr, val; + int i; + + /* Read power settings for 2GHz channels. */ + for (i = 0; i < 14; i += 2) { + addr = (sc->ntxchains == 3) ? RT3593_EEPROM_PWR2GHZ_BASE1 : + RT2860_EEPROM_PWR2GHZ_BASE1; + run_srom_read(sc, addr + i / 2, &val); + sc->txpow1[i + 0] = (int8_t)(val & 0xff); + sc->txpow1[i + 1] = (int8_t)(val >> 8); + + addr = (sc->ntxchains == 3) ? RT3593_EEPROM_PWR2GHZ_BASE2 : + RT2860_EEPROM_PWR2GHZ_BASE2; + run_srom_read(sc, addr + i / 2, &val); + sc->txpow2[i + 0] = (int8_t)(val & 0xff); + sc->txpow2[i + 1] = (int8_t)(val >> 8); + + if (sc->ntxchains == 3) { + run_srom_read(sc, RT3593_EEPROM_PWR2GHZ_BASE3 + i / 2, + &val); + sc->txpow3[i + 0] = (int8_t)(val & 0xff); + sc->txpow3[i + 1] = (int8_t)(val >> 8); + } + } + /* Fix broken Tx power entries. */ + for (i = 0; i < 14; i++) { + if (sc->txpow1[i] > 31) + sc->txpow1[i] = 5; + if (sc->txpow2[i] > 31) + sc->txpow2[i] = 5; + if (sc->ntxchains == 3) { + if (sc->txpow3[i] > 31) + sc->txpow3[i] = 5; + } + } + /* Read power settings for 5GHz channels. */ + for (i = 0; i < 40; i += 2) { + run_srom_read(sc, RT3593_EEPROM_PWR5GHZ_BASE1 + i / 2, &val); + sc->txpow1[i + 14] = (int8_t)(val & 0xff); + sc->txpow1[i + 15] = (int8_t)(val >> 8); + + run_srom_read(sc, RT3593_EEPROM_PWR5GHZ_BASE2 + i / 2, &val); + sc->txpow2[i + 14] = (int8_t)(val & 0xff); + sc->txpow2[i + 15] = (int8_t)(val >> 8); + + if (sc->ntxchains == 3) { + run_srom_read(sc, RT3593_EEPROM_PWR5GHZ_BASE3 + i / 2, + &val); + sc->txpow3[i + 14] = (int8_t)(val & 0xff); + sc->txpow3[i + 15] = (int8_t)(val >> 8); + } + } +} + +static void +run_get_txpower(struct run_softc *sc) +{ + uint16_t val; + int i; + + /* Read power settings for 2GHz channels. */ + for (i = 0; i < 14; i += 2) { + run_srom_read(sc, RT2860_EEPROM_PWR2GHZ_BASE1 + i / 2, &val); + sc->txpow1[i + 0] = (int8_t)(val & 0xff); + sc->txpow1[i + 1] = (int8_t)(val >> 8); + + if (sc->mac_ver != 0x5390) { + run_srom_read(sc, + RT2860_EEPROM_PWR2GHZ_BASE2 + i / 2, &val); + sc->txpow2[i + 0] = (int8_t)(val & 0xff); + sc->txpow2[i + 1] = (int8_t)(val >> 8); + } + } + /* Fix broken Tx power entries. */ + for (i = 0; i < 14; i++) { + if (sc->mac_ver >= 0x5390) { + if (sc->txpow1[i] < 0 || sc->txpow1[i] > 27) + sc->txpow1[i] = 5; + } else { + if (sc->txpow1[i] < 0 || sc->txpow1[i] > 31) + sc->txpow1[i] = 5; + } + if (sc->mac_ver > 0x5390) { + if (sc->txpow2[i] < 0 || sc->txpow2[i] > 27) + sc->txpow2[i] = 5; + } else if (sc->mac_ver < 0x5390) { + if (sc->txpow2[i] < 0 || sc->txpow2[i] > 31) + sc->txpow2[i] = 5; + } + DPRINTF("chan %d: power1=%d, power2=%d\n", + rt2860_rf2850[i].chan, sc->txpow1[i], sc->txpow2[i]); + } + /* Read power settings for 5GHz channels. */ + for (i = 0; i < 40; i += 2) { + run_srom_read(sc, RT2860_EEPROM_PWR5GHZ_BASE1 + i / 2, &val); + sc->txpow1[i + 14] = (int8_t)(val & 0xff); + sc->txpow1[i + 15] = (int8_t)(val >> 8); + + run_srom_read(sc, RT2860_EEPROM_PWR5GHZ_BASE2 + i / 2, &val); + sc->txpow2[i + 14] = (int8_t)(val & 0xff); + sc->txpow2[i + 15] = (int8_t)(val >> 8); + } + /* Fix broken Tx power entries. */ + for (i = 0; i < 40; i++ ) { + if (sc->mac_ver != 0x5592) { + if (sc->txpow1[14 + i] < -7 || sc->txpow1[14 + i] > 15) + sc->txpow1[14 + i] = 5; + if (sc->txpow2[14 + i] < -7 || sc->txpow2[14 + i] > 15) + sc->txpow2[14 + i] = 5; + } + DPRINTF("chan %d: power1=%d, power2=%d\n", + rt2860_rf2850[14 + i].chan, sc->txpow1[14 + i], + sc->txpow2[14 + i]); + } +} + static int run_read_eeprom(struct run_softc *sc) { @@ -1520,7 +1741,7 @@ run_read_eeprom(struct run_softc *sc) if (sc->mac_ver >= 0x3070) { run_read(sc, RT3070_EFUSE_CTRL, &tmp); DPRINTF("EFUSE_CTRL=0x%08x\n", tmp); - if (tmp & RT3070_SEL_EFUSE) + if ((tmp & RT3070_SEL_EFUSE) || sc->mac_ver == 0x3593) sc->sc_srom_read = run_efuse_read_2; } @@ -1539,7 +1760,7 @@ run_read_eeprom(struct run_softc *sc) sc->sc_bssid[4] = val & 0xff; sc->sc_bssid[5] = val >> 8; - if (sc->mac_ver < 0x5390) { + if (sc->mac_ver < 0x3593) { /* read vender BBP settings */ for (i = 0; i < 10; i++) { run_srom_read(sc, RT2860_EEPROM_BBP_BASE + i, &val); @@ -1562,16 +1783,22 @@ run_read_eeprom(struct run_softc *sc) } /* read RF frequency offset from EEPROM */ - run_srom_read(sc, RT2860_EEPROM_FREQ_LEDS, &val); + run_srom_read(sc, (sc->mac_ver != 0x3593) ? RT2860_EEPROM_FREQ_LEDS : + RT3593_EEPROM_FREQ, &val); sc->freq = ((val & 0xff) != 0xff) ? val & 0xff : 0; DPRINTF("EEPROM freq offset %d\n", sc->freq & 0xff); + run_srom_read(sc, (sc->mac_ver != 0x3593) ? RT2860_EEPROM_FREQ_LEDS : + RT3593_EEPROM_FREQ_LEDS, &val); if (val >> 8 != 0xff) { /* read LEDs operating mode */ sc->leds = val >> 8; - run_srom_read(sc, RT2860_EEPROM_LED1, &sc->led[0]); - run_srom_read(sc, RT2860_EEPROM_LED2, &sc->led[1]); - run_srom_read(sc, RT2860_EEPROM_LED3, &sc->led[2]); + run_srom_read(sc, (sc->mac_ver != 0x3593) ? RT2860_EEPROM_LED1 : + RT3593_EEPROM_LED1, &sc->led[0]); + run_srom_read(sc, (sc->mac_ver != 0x3593) ? RT2860_EEPROM_LED2 : + RT3593_EEPROM_LED2, &sc->led[1]); + run_srom_read(sc, (sc->mac_ver != 0x3593) ? RT2860_EEPROM_LED3 : + RT3593_EEPROM_LED3, &sc->led[2]); } else { /* broken EEPROM, use default settings */ sc->leds = 0x01; @@ -1589,6 +1816,8 @@ run_read_eeprom(struct run_softc *sc) run_srom_read(sc, RT2860_EEPROM_ANTENNA, &val); if (val == 0xffff) { + device_printf(sc->sc_dev, + "invalid EEPROM antenna info, using default\n"); DPRINTF("invalid EEPROM antenna info, using default\n"); if (sc->mac_ver == 0x3572) { /* default to RF3052 2T2R */ @@ -1633,60 +1862,11 @@ run_read_eeprom(struct run_softc *sc) sc->rfswitch = val & 1; } - /* read power settings for 2GHz channels */ - for (i = 0; i < 14; i += 2) { - run_srom_read(sc, RT2860_EEPROM_PWR2GHZ_BASE1 + i / 2, &val); - sc->txpow1[i + 0] = (int8_t)(val & 0xff); - sc->txpow1[i + 1] = (int8_t)(val >> 8); - - if (sc->mac_ver != 0x5390) { - run_srom_read(sc, - RT2860_EEPROM_PWR2GHZ_BASE2 + i / 2, &val); - sc->txpow2[i + 0] = (int8_t)(val & 0xff); - sc->txpow2[i + 1] = (int8_t)(val >> 8); - } - } - /* fix broken Tx power entries */ - for (i = 0; i < 14; i++) { - if (sc->mac_ver >= 0x5390) { - if (sc->txpow1[i] < 0 || sc->txpow1[i] > 27) - sc->txpow1[i] = 5; - } else { - if (sc->txpow1[i] < 0 || sc->txpow1[i] > 31) - sc->txpow1[i] = 5; - } - if (sc->mac_ver > 0x5390) { - if (sc->txpow2[i] < 0 || sc->txpow2[i] > 27) - sc->txpow2[i] = 5; - } else if (sc->mac_ver < 0x5390) { - if (sc->txpow2[i] < 0 || sc->txpow2[i] > 31) - sc->txpow2[i] = 5; - } - DPRINTF("chan %d: power1=%d, power2=%d\n", - rt2860_rf2850[i].chan, sc->txpow1[i], sc->txpow2[i]); - } - /* read power settings for 5GHz channels */ - for (i = 0; i < 40; i += 2) { - run_srom_read(sc, RT2860_EEPROM_PWR5GHZ_BASE1 + i / 2, &val); - sc->txpow1[i + 14] = (int8_t)(val & 0xff); - sc->txpow1[i + 15] = (int8_t)(val >> 8); - - run_srom_read(sc, RT2860_EEPROM_PWR5GHZ_BASE2 + i / 2, &val); - sc->txpow2[i + 14] = (int8_t)(val & 0xff); - sc->txpow2[i + 15] = (int8_t)(val >> 8); - } - /* fix broken Tx power entries */ - for (i = 0; i < 40; i++ ) { - if (sc->mac_ver != 0x5592) { - if (sc->txpow1[14 + i] < -7 || sc->txpow1[14 + i] > 15) - sc->txpow1[14 + i] = 5; - if (sc->txpow2[14 + i] < -7 || sc->txpow2[14 + i] > 15) - sc->txpow2[14 + i] = 5; - } - DPRINTF("chan %d: power1=%d, power2=%d\n", - rt2860_rf2850[14 + i].chan, sc->txpow1[14 + i], - sc->txpow2[14 + i]); - } + /* Read Tx power settings. */ + if (sc->mac_ver == 0x3593) + run_rt3593_get_txpower(sc); + else + run_get_txpower(sc); /* read Tx power compensation for each Tx rate */ run_srom_read(sc, RT2860_EEPROM_DELTAPWR, &val); @@ -1722,27 +1902,38 @@ run_read_eeprom(struct run_softc *sc) sc->txpow40mhz_2ghz[ridx], sc->txpow40mhz_5ghz[ridx]); } - /* read RSSI offsets and LNA gains from EEPROM */ - run_srom_read(sc, RT2860_EEPROM_RSSI1_2GHZ, &val); + /* Read RSSI offsets and LNA gains from EEPROM. */ + run_srom_read(sc, (sc->mac_ver != 0x3593) ? RT2860_EEPROM_RSSI1_2GHZ : + RT3593_EEPROM_RSSI1_2GHZ, &val); sc->rssi_2ghz[0] = val & 0xff; /* Ant A */ sc->rssi_2ghz[1] = val >> 8; /* Ant B */ - run_srom_read(sc, RT2860_EEPROM_RSSI2_2GHZ, &val); + run_srom_read(sc, (sc->mac_ver != 0x3593) ? RT2860_EEPROM_RSSI2_2GHZ : + RT3593_EEPROM_RSSI2_2GHZ, &val); if (sc->mac_ver >= 0x3070) { - /* - * On RT3070 chips (limited to 2 Rx chains), this ROM - * field contains the Tx mixer gain for the 2GHz band. - */ - if ((val & 0xff) != 0xff) - sc->txmixgain_2ghz = val & 0x7; + if (sc->mac_ver == 0x3593) { + sc->txmixgain_2ghz = 0; + sc->rssi_2ghz[2] = val & 0xff; /* Ant C */ + } else { + /* + * On RT3070 chips (limited to 2 Rx chains), this ROM + * field contains the Tx mixer gain for the 2GHz band. + */ + if ((val & 0xff) != 0xff) + sc->txmixgain_2ghz = val & 0x7; + } DPRINTF("tx mixer gain=%u (2GHz)\n", sc->txmixgain_2ghz); } else sc->rssi_2ghz[2] = val & 0xff; /* Ant C */ + if (sc->mac_ver == 0x3593) + run_srom_read(sc, RT3593_EEPROM_LNA_5GHZ, &val); sc->lna[2] = val >> 8; /* channel group 2 */ - run_srom_read(sc, RT2860_EEPROM_RSSI1_5GHZ, &val); + run_srom_read(sc, (sc->mac_ver != 0x3593) ? RT2860_EEPROM_RSSI1_5GHZ : + RT3593_EEPROM_RSSI1_5GHZ, &val); sc->rssi_5ghz[0] = val & 0xff; /* Ant A */ sc->rssi_5ghz[1] = val >> 8; /* Ant B */ - run_srom_read(sc, RT2860_EEPROM_RSSI2_5GHZ, &val); + run_srom_read(sc, (sc->mac_ver != 0x3593) ? RT2860_EEPROM_RSSI2_5GHZ : + RT3593_EEPROM_RSSI2_5GHZ, &val); if (sc->mac_ver == 0x3572) { /* * On RT3572 chips (limited to 2 Rx chains), this ROM @@ -1753,9 +1944,14 @@ run_read_eeprom(struct run_softc *sc) DPRINTF("tx mixer gain=%u (5GHz)\n", sc->txmixgain_5ghz); } else sc->rssi_5ghz[2] = val & 0xff; /* Ant C */ + if (sc->mac_ver == 0x3593) { + sc->txmixgain_5ghz = 0; + run_srom_read(sc, RT3593_EEPROM_LNA_5GHZ, &val); + } sc->lna[3] = val >> 8; /* channel group 3 */ - run_srom_read(sc, RT2860_EEPROM_LNA, &val); + run_srom_read(sc, (sc->mac_ver != 0x3593) ? RT2860_EEPROM_LNA : + RT3593_EEPROM_LNA, &val); sc->lna[0] = val & 0xff; /* channel group 0 */ sc->lna[1] = val >> 8; /* channel group 1 */ @@ -2570,9 +2766,11 @@ run_rx_frame(struct run_softc *sc, struc rxwi = mtod(m, struct rt2860_rxwi *); len = le16toh(rxwi->len) & 0xfff; - rxwisize = (sc->mac_ver == 0x5592) ? - sizeof(struct rt2860_rxwi) + sizeof(uint64_t) : - sizeof(struct rt2860_rxwi); + rxwisize = sizeof(struct rt2860_rxwi); + if (sc->mac_ver == 0x5592) + rxwisize += sizeof(uint64_t); + else if (sc->mac_ver == 0x3593) + rxwisize += sizeof(uint32_t); if (__predict_false(len > dmalen)) { m_freem(m); ifp->if_ierrors++; @@ -2683,9 +2881,11 @@ run_bulk_rx_callback(struct usb_xfer *xf uint16_t rxwisize; int xferlen; - rxwisize = (sc->mac_ver == 0x5592) ? - sizeof(struct rt2860_rxwi) + sizeof(uint64_t) : - sizeof(struct rt2860_rxwi); + rxwisize = sizeof(struct rt2860_rxwi); + if (sc->mac_ver == 0x5592) + rxwisize += sizeof(uint64_t); + else if (sc->mac_ver == 0x3593) + rxwisize += sizeof(uint32_t); usbd_xfer_status(xfer, &xferlen, NULL, NULL, NULL); @@ -2869,10 +3069,10 @@ tr_setup: STAILQ_REMOVE_HEAD(&pq->tx_qh, next); m = data->m; - size = (sc->mac_ver == 0x5592) ? - RUN_MAX_TXSZ + sizeof(uint32_t) : RUN_MAX_TXSZ; + size = (sc->mac_ver == 0x5592) ? + sizeof(data->desc) + sizeof(uint32_t) : sizeof(data->desc); if ((m->m_pkthdr.len + - sizeof(data->desc) + 3 + 8) > size) { + size + 3 + 8) > RUN_MAX_TXSZ) { DPRINTF("data overflow, %u bytes\n", m->m_pkthdr.len); @@ -2884,8 +3084,6 @@ tr_setup: } pc = usbd_xfer_get_frame(xfer, 0); - size = (sc->mac_ver == 0x5592) ? - sizeof(data->desc) + sizeof(uint32_t) : sizeof(data->desc); usbd_copy_in(pc, 0, &data->desc, size); usbd_m_copy_in(pc, size, m, 0, m->m_pkthdr.len); size += m->m_pkthdr.len; @@ -3599,6 +3797,107 @@ run_ioctl(struct ifnet *ifp, u_long cmd, } static void +run_iq_calib(struct run_softc *sc, u_int chan) +{ + uint16_t val; + + /* Tx0 IQ gain. */ + run_bbp_write(sc, 158, 0x2c); + if (chan <= 14) + run_efuse_read(sc, RT5390_EEPROM_IQ_GAIN_CAL_TX0_2GHZ, &val, 1); + else if (chan <= 64) { + run_efuse_read(sc, + RT5390_EEPROM_IQ_GAIN_CAL_TX0_CH36_TO_CH64_5GHZ, + &val, 1); + } else if (chan <= 138) { + run_efuse_read(sc, + RT5390_EEPROM_IQ_GAIN_CAL_TX0_CH100_TO_CH138_5GHZ, + &val, 1); + } else if (chan <= 165) { + run_efuse_read(sc, + RT5390_EEPROM_IQ_GAIN_CAL_TX0_CH140_TO_CH165_5GHZ, + &val, 1); + } else + val = 0; + run_bbp_write(sc, 159, val); + + /* Tx0 IQ phase. */ + run_bbp_write(sc, 158, 0x2d); + if (chan <= 14) { + run_efuse_read(sc, RT5390_EEPROM_IQ_PHASE_CAL_TX0_2GHZ, + &val, 1); + } else if (chan <= 64) { + run_efuse_read(sc, + RT5390_EEPROM_IQ_PHASE_CAL_TX0_CH36_TO_CH64_5GHZ, + &val, 1); + } else if (chan <= 138) { + run_efuse_read(sc, + RT5390_EEPROM_IQ_PHASE_CAL_TX0_CH100_TO_CH138_5GHZ, + &val, 1); + } else if (chan <= 165) { + run_efuse_read(sc, + RT5390_EEPROM_IQ_PHASE_CAL_TX0_CH140_TO_CH165_5GHZ, + &val, 1); + } else + val = 0; + run_bbp_write(sc, 159, val); + + /* Tx1 IQ gain. */ + run_bbp_write(sc, 158, 0x4a); + if (chan <= 14) { + run_efuse_read(sc, RT5390_EEPROM_IQ_GAIN_CAL_TX1_2GHZ, + &val, 1); + } else if (chan <= 64) { + run_efuse_read(sc, + RT5390_EEPROM_IQ_GAIN_CAL_TX1_CH36_TO_CH64_5GHZ, + &val, 1); + } else if (chan <= 138) { + run_efuse_read(sc, + RT5390_EEPROM_IQ_GAIN_CAL_TX1_CH100_TO_CH138_5GHZ, + &val, 1); + } else if (chan <= 165) { + run_efuse_read(sc, + RT5390_EEPROM_IQ_GAIN_CAL_TX1_CH140_TO_CH165_5GHZ, + &val, 1); + } else + val = 0; + run_bbp_write(sc, 159, val); + + /* Tx1 IQ phase. */ + run_bbp_write(sc, 158, 0x4b); + if (chan <= 14) { + run_efuse_read(sc, RT5390_EEPROM_IQ_PHASE_CAL_TX1_2GHZ, + &val, 1); + } else if (chan <= 64) { + run_efuse_read(sc, + RT5390_EEPROM_IQ_PHASE_CAL_TX1_CH36_TO_CH64_5GHZ, + &val, 1); + } else if (chan <= 138) { + run_efuse_read(sc, + RT5390_EEPROM_IQ_PHASE_CAL_TX1_CH100_TO_CH138_5GHZ, + &val, 1); + } else if (chan <= 165) { + run_efuse_read(sc, + RT5390_EEPROM_IQ_PHASE_CAL_TX1_CH140_TO_CH165_5GHZ, + &val, 1); + } else + val = 0; + run_bbp_write(sc, 159, val); + + /* RF IQ compensation control. */ + run_bbp_write(sc, 158, 0x04); + run_efuse_read(sc, RT5390_EEPROM_RF_IQ_COMPENSATION_CTL, + &val, 1); + run_bbp_write(sc, 159, val); + + /* RF IQ imbalance compensation control. */ + run_bbp_write(sc, 158, 0x03); + run_efuse_read(sc, + RT5390_EEPROM_RF_IQ_IMBALANCE_COMPENSATION_CTL, &val, 1); + run_bbp_write(sc, 159, val); +} + +static void run_set_agc(struct run_softc *sc, uint8_t agc) { uint8_t bbp; @@ -3626,6 +3925,11 @@ run_select_chan_group(struct run_softc * if (sc->mac_ver < 0x3572) run_bbp_write(sc, 86, 0x00); + if (sc->mac_ver == 0x3593) { + run_bbp_write(sc, 77, 0x98); + run_bbp_write(sc, 83, (group == 0) ? 0x8a : 0x9a); + } + if (group == 0) { if (sc->ext_2ghz_lna) { if (sc->mac_ver >= 0x5390) @@ -3656,7 +3960,8 @@ run_select_chan_group(struct run_softc * } else if (sc->mac_ver >= 0x5390) run_bbp_write(sc, 75, 0x50); else { - run_bbp_write(sc, 82, 0x84); + run_bbp_write(sc, 82, + (sc->mac_ver == 0x3593) ? 0x62 : 0x84); run_bbp_write(sc, 75, 0x50); } } @@ -3682,7 +3987,8 @@ run_select_chan_group(struct run_softc * } else if (sc->mac_ver == 0x3572) run_bbp_write(sc, 82, 0x94); else - run_bbp_write(sc, 82, 0xf2); + run_bbp_write(sc, 82, + (sc->mac_ver == 0x3593) ? 0x82 : 0xf2); if (sc->ext_5ghz_lna) run_bbp_write(sc, 75, 0x46); else @@ -3696,12 +4002,18 @@ run_select_chan_group(struct run_softc * *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 04:03:18 2014 Return-Path: Delivered-To: svn-src-all@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 124AA30A; Fri, 14 Feb 2014 04:03: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 F2BCC19F4; Fri, 14 Feb 2014 04:03:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1E43HFX024870; Fri, 14 Feb 2014 04:03:17 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1E43Hea024869; Fri, 14 Feb 2014 04:03:17 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201402140403.s1E43Hea024869@svn.freebsd.org> From: Adrian Chadd Date: Fri, 14 Feb 2014 04:03:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261869 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 04:03:18 -0000 Author: adrian Date: Fri Feb 14 04:03:17 2014 New Revision: 261869 URL: http://svnweb.freebsd.org/changeset/base/261869 Log: Add the ath0 EEPROM hints required to detect the on-chip wifi. This allows the on-chip wifi to work; however it's not yet fully tested. ath0: Vendor=0x168c, Device=0x0031 ath0: Vendor=0x168c, Device=0x0031 ath0: at mem 0x18100000-0x1811ffff irq 0 on nexus0 ... ath0: [HT] enabling HT modes ath0: [HT] enabling short-GI in 20MHz mode ath0: [HT] 1 stream STBC receive enabled ath0: [HT] 1 stream STBC transmit enabled ath0: [HT] 2 RX streams; 2 TX streams Tested: * DB120 development board Modified: head/sys/mips/conf/DB120.hints Modified: head/sys/mips/conf/DB120.hints ============================================================================== --- head/sys/mips/conf/DB120.hints Fri Feb 14 03:45:49 2014 (r261868) +++ head/sys/mips/conf/DB120.hints Fri Feb 14 04:03:17 2014 (r261869) @@ -50,6 +50,16 @@ hint.arge.1.media=1000 hint.arge.1.fduplex=1 hint.arge.1.miimode=1 # GMII +# ath0: Where the ART is - last 64k in the flash +hint.ath.0.eepromaddr=0x1fff0000 +hint.ath.0.eepromsize=16384 + +# ath1: it's different; it's a PCIe attached device, so +# we instead need to teach the PCIe bridge code about it +# (ie, the 'early pci fixup' stuff that programs the PCIe +# host registers on the NIC) and then we teach ath where +# to find it. + # flash layout: # # bootargs=console=ttyS0,115200 root=31:02 rootfstype=jffs2 init=/sbin/init mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),6336k(rootfs),1408k(uImage),64k(mib0),64k(ART) From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 05:22:28 2014 Return-Path: Delivered-To: svn-src-all@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 EF4E7BC6; Fri, 14 Feb 2014 05:22:28 +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 DC4071FB7; Fri, 14 Feb 2014 05:22:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1E5MSbV055819; Fri, 14 Feb 2014 05:22:28 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1E5MSnM055818; Fri, 14 Feb 2014 05:22:28 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201402140522.s1E5MSnM055818@svn.freebsd.org> From: Adrian Chadd Date: Fri, 14 Feb 2014 05:22:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261870 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 05:22:29 -0000 Author: adrian Date: Fri Feb 14 05:22:28 2014 New Revision: 261870 URL: http://svnweb.freebsd.org/changeset/base/261870 Log: Disable this check for now; it fails on the AR9344 PCI fixup code. I'll make it conditional later. Tested: * DB120 Modified: head/sys/mips/atheros/ar724x_pci.c Modified: head/sys/mips/atheros/ar724x_pci.c ============================================================================== --- head/sys/mips/atheros/ar724x_pci.c Fri Feb 14 04:03:17 2014 (r261869) +++ head/sys/mips/atheros/ar724x_pci.c Fri Feb 14 05:22:28 2014 (r261870) @@ -261,11 +261,13 @@ ar724x_pci_fixup(device_t dev, long flas uint32_t bar0, reg, val; uint16_t *cal_data = (uint16_t *) MIPS_PHYS_TO_KSEG1(flash_addr); +#if 0 if (cal_data[0] != AR5416_EEPROM_MAGIC) { device_printf(dev, "%s: Invalid calibration data from 0x%x\n", __func__, (uintptr_t) flash_addr); return; } +#endif /* Save bar(0) address - just to flush bar(0) (SoC WAR) ? */ bar0 = ar724x_pci_read_config(dev, 0, 0, 0, PCIR_BAR(0), 4); From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 05:25:16 2014 Return-Path: Delivered-To: svn-src-all@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 ADA80DB1; Fri, 14 Feb 2014 05:25:16 +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 8E7051FD1; Fri, 14 Feb 2014 05:25:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1E5PGV1056159; Fri, 14 Feb 2014 05:25:16 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1E5PFSq056154; Fri, 14 Feb 2014 05:25:15 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201402140525.s1E5PFSq056154@svn.freebsd.org> From: Adrian Chadd Date: Fri, 14 Feb 2014 05:25:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261871 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 05:25:16 -0000 Author: adrian Date: Fri Feb 14 05:25:15 2014 New Revision: 261871 URL: http://svnweb.freebsd.org/changeset/base/261871 Log: Enable use of the PCIe connected wifi on the DB120 (AR9344) board. The on-board NIC is an 3x3 AR9380 with 5GHz only. * enable pci code in AR9344_BASE * enable ath_pci and the firmware loading bits in DB120 * add in the relevant hints in DB120.hints to inform the probe/attach code where the PCIe fixup data is for the onboard chip. This is only relevant for a default development board. I also have a DB120 with the on-board PCIe wifi NIC disabled and it's exposed as a real PCIe slot (to put normal PCIe NICs in); the fixup code will need to be disabled to make this work correctly. Tested: * DB120 Modified: head/sys/mips/conf/AR934X_BASE head/sys/mips/conf/AR934X_BASE.hints head/sys/mips/conf/DB120 head/sys/mips/conf/DB120.hints Modified: head/sys/mips/conf/AR934X_BASE ============================================================================== --- head/sys/mips/conf/AR934X_BASE Fri Feb 14 05:22:28 2014 (r261870) +++ head/sys/mips/conf/AR934X_BASE Fri Feb 14 05:25:15 2014 (r261871) @@ -102,6 +102,9 @@ options USB_DEBUG options USB_HOST_ALIGN=32 # AR71XX (MIPS in general?) requires this device ehci +device pci +device ar724x_pci + device scbus device umass device da Modified: head/sys/mips/conf/AR934X_BASE.hints ============================================================================== --- head/sys/mips/conf/AR934X_BASE.hints Fri Feb 14 05:22:28 2014 (r261870) +++ head/sys/mips/conf/AR934X_BASE.hints Fri Feb 14 05:25:15 2014 (r261871) @@ -22,6 +22,10 @@ hint.ehci.0.maddr=0x1b000100 hint.ehci.0.msize=0x00001000 hint.ehci.0.irq=1 +# pci +hint.pcib.0.at="nexus0" +hint.pcib.0.irq=0 + hint.arge.0.at="nexus0" hint.arge.0.maddr=0x19000000 hint.arge.0.msize=0x1000 Modified: head/sys/mips/conf/DB120 ============================================================================== --- head/sys/mips/conf/DB120 Fri Feb 14 05:22:28 2014 (r261870) +++ head/sys/mips/conf/DB120 Fri Feb 14 05:25:15 2014 (r261871) @@ -42,5 +42,11 @@ options GEOM_UNCOMPRESS # Used for the static uboot partition map device geom_map +# yes, this board has a PCI connected atheros device +device ath_pci +options AR71XX_ATH_EEPROM +device firmware # Used by the above +options ATH_EEPROM_FIRMWARE + # Boot off of the rootfs, as defined in the geom_map setup. options ROOTDEVNAME=\"ufs:map/rootfs.uncompress\" Modified: head/sys/mips/conf/DB120.hints ============================================================================== --- head/sys/mips/conf/DB120.hints Fri Feb 14 05:22:28 2014 (r261870) +++ head/sys/mips/conf/DB120.hints Fri Feb 14 05:25:15 2014 (r261871) @@ -60,6 +60,13 @@ hint.ath.0.eepromsize=16384 # host registers on the NIC) and then we teach ath where # to find it. +# ath1 hint - pcie slot 0 +hint.pcib.0.bus.0.0.0.ath_fixup_addr=0x1fff4000 +hint.pcib.0.bus.0.0.0.ath_fixup_size=16384 + +# ath0 - eeprom comes from here +hint.ath.1.eeprom_firmware="pcib.0.bus.0.0.0.eeprom_firmware" + # flash layout: # # bootargs=console=ttyS0,115200 root=31:02 rootfstype=jffs2 init=/sbin/init mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),6336k(rootfs),1408k(uImage),64k(mib0),64k(ART) From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 06:21:07 2014 Return-Path: Delivered-To: svn-src-all@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 3CE52565; Fri, 14 Feb 2014 06:21:07 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (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 B6DA11326; Fri, 14 Feb 2014 06:21:06 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.8/8.14.8) with ESMTP id s1E6L4s1037656 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 14 Feb 2014 10:21:04 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.8/8.14.8/Submit) id s1E6L4Kh037655; Fri, 14 Feb 2014 10:21:04 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 14 Feb 2014 10:21:04 +0400 From: Gleb Smirnoff To: Adrian Chadd Subject: Re: svn commit: r261859 - in head: sys/net usr.bin/netstat Message-ID: <20140214062104.GA26785@FreeBSD.org> References: <201402140005.s1E059Gh030523@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201402140005.s1E059Gh030523@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 06:21:07 -0000 On Fri, Feb 14, 2014 at 12:05:09AM +0000, Adrian Chadd wrote: A> Modified: head/usr.bin/netstat/flowtable.c A> ============================================================================== A> --- head/usr.bin/netstat/flowtable.c Thu Feb 13 22:24:36 2014 (r261858) A> +++ head/usr.bin/netstat/flowtable.c Fri Feb 14 00:05:09 2014 (r261859) A> @@ -55,6 +55,7 @@ print_stats(struct flowtable_stat *stat) A> p(ft_collisions, "\t%ju collision%s\n"); A> p(ft_free_checks, "\t%ju free check%s\n"); A> p(ft_frees, "\t%ju free%s\n"); A> + p(ft_fail_lle_invalid, "\t%ju lookups w/ no resolved ARP%s\n"); Should be: "\t%ju lookups%s w/ no resolved ARP\n" Or even better: "\t%ju lookups%s with not resolved Layer 2\n" Sorry for late re-review. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 06:22:18 2014 Return-Path: Delivered-To: svn-src-all@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 3914877D; Fri, 14 Feb 2014 06:22:18 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (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 A5547138B; Fri, 14 Feb 2014 06:22:16 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.8/8.14.8) with ESMTP id s1E6MF7e037714 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 14 Feb 2014 10:22:15 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.8/8.14.8/Submit) id s1E6MF8l037713; Fri, 14 Feb 2014 10:22:15 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 14 Feb 2014 10:22:15 +0400 From: Gleb Smirnoff To: Adrian Chadd Subject: Re: svn commit: r261859 - in head: sys/net usr.bin/netstat Message-ID: <20140214062215.GB26785@FreeBSD.org> References: <201402140005.s1E059Gh030523@svn.freebsd.org> <20140214062104.GA26785@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140214062104.GA26785@FreeBSD.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 06:22:18 -0000 On Fri, Feb 14, 2014 at 10:21:04AM +0400, Gleb Smirnoff wrote: T> On Fri, Feb 14, 2014 at 12:05:09AM +0000, Adrian Chadd wrote: T> A> Modified: head/usr.bin/netstat/flowtable.c T> A> ============================================================================== T> A> --- head/usr.bin/netstat/flowtable.c Thu Feb 13 22:24:36 2014 (r261858) T> A> +++ head/usr.bin/netstat/flowtable.c Fri Feb 14 00:05:09 2014 (r261859) T> A> @@ -55,6 +55,7 @@ print_stats(struct flowtable_stat *stat) T> A> p(ft_collisions, "\t%ju collision%s\n"); T> A> p(ft_free_checks, "\t%ju free check%s\n"); T> A> p(ft_frees, "\t%ju free%s\n"); T> A> + p(ft_fail_lle_invalid, "\t%ju lookups w/ no resolved ARP%s\n"); T> T> Should be: "\t%ju lookups%s w/ no resolved ARP\n" T> Or even better: "\t%ju lookups%s with not resolved Layer 2\n" Argh, of course 's' is extra: "\t%ju lookup%s with not resolved Layer 2\n" -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 07:17:37 2014 Return-Path: Delivered-To: svn-src-all@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 6E86DD53; Fri, 14 Feb 2014 07:17:37 +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 5A7771732; Fri, 14 Feb 2014 07:17:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1E7HbFG098671; Fri, 14 Feb 2014 07:17:37 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1E7Hbv2098669; Fri, 14 Feb 2014 07:17:37 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402140717.s1E7Hbv2098669@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 14 Feb 2014 07:17:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261872 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 07:17:37 -0000 Author: hselasky Date: Fri Feb 14 07:17:36 2014 New Revision: 261872 URL: http://svnweb.freebsd.org/changeset/base/261872 Log: Fix minor logical error in the XHCI driver. Set correct SETUP packet direction value. MFC after: 2 days Reported by: Horse Ma Modified: head/sys/dev/usb/controller/xhci.c head/sys/dev/usb/controller/xhci.h Modified: head/sys/dev/usb/controller/xhci.c ============================================================================== --- head/sys/dev/usb/controller/xhci.c Fri Feb 14 05:25:15 2014 (r261871) +++ head/sys/dev/usb/controller/xhci.c Fri Feb 14 07:17:36 2014 (r261872) @@ -1759,7 +1759,8 @@ restart: /* check wLength */ if (td->td_trb[0].qwTrb0 & htole64(XHCI_TRB_0_WLENGTH_MASK)) { - if (td->td_trb[0].qwTrb0 & htole64(1)) + if (td->td_trb[0].qwTrb0 & + htole64(XHCI_TRB_0_DIR_IN_MASK)) dword |= XHCI_TRB_3_TRT_IN; else dword |= XHCI_TRB_3_TRT_OUT; Modified: head/sys/dev/usb/controller/xhci.h ============================================================================== --- head/sys/dev/usb/controller/xhci.h Fri Feb 14 05:25:15 2014 (r261871) +++ head/sys/dev/usb/controller/xhci.h Fri Feb 14 07:17:36 2014 (r261872) @@ -192,6 +192,7 @@ struct xhci_stream_ctx { struct xhci_trb { volatile uint64_t qwTrb0; +#define XHCI_TRB_0_DIR_IN_MASK (0x80ULL << 0) #define XHCI_TRB_0_WLENGTH_MASK (0xFFFFULL << 48) volatile uint32_t dwTrb2; #define XHCI_TRB_2_ERROR_GET(x) (((x) >> 24) & 0xFF) From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 07:28:29 2014 Return-Path: Delivered-To: svn-src-all@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 C3BB3F92; Fri, 14 Feb 2014 07:28:29 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 8572B17E0; Fri, 14 Feb 2014 07:28:28 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id JAA08960; Fri, 14 Feb 2014 09:28:20 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1WEDC7-000NM8-SB; Fri, 14 Feb 2014 09:28:19 +0200 Message-ID: <52FDC542.1080703@FreeBSD.org> Date: Fri, 14 Feb 2014 09:26:58 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Attilio Rao , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r261867 - head/sys/vm References: <201402140334.s1E3YDsp013604@svn.freebsd.org> In-Reply-To: <201402140334.s1E3YDsp013604@svn.freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 07:28:29 -0000 on 14/02/2014 05:34 Attilio Rao said the following: > Author: attilio > Date: Fri Feb 14 03:34:12 2014 > New Revision: 261867 > URL: http://svnweb.freebsd.org/changeset/base/261867 > > Log: > Fix-up r254141: in the process of making a failing vm_page_rename() > a call of pager_swap_freespace() was moved around, now leading to freeing > the incorrect page because of the pindex changes after vm_page_rename(). > > Get back to use the correct pindex when destroying the swap space. > > Sponsored by: EMC / Isilon storage division > Reported by: avg > Tested by: pho > MFC after: 7 days Thank you! I also have not seen any of my previous problems since I started using the patch. > Modified: > head/sys/vm/vm_object.c > > Modified: head/sys/vm/vm_object.c > ============================================================================== > --- head/sys/vm/vm_object.c Fri Feb 14 03:30:55 2014 (r261866) > +++ head/sys/vm/vm_object.c Fri Feb 14 03:34:12 2014 (r261867) > @@ -1627,9 +1627,11 @@ vm_object_backing_scan(vm_object_t objec > p = TAILQ_FIRST(&backing_object->memq); > continue; > } > + > + /* Use the old pindex to free the right page. */ > if (backing_object->type == OBJT_SWAP) > - swap_pager_freespace(backing_object, p->pindex, > - 1); > + swap_pager_freespace(backing_object, > + new_pindex + backing_offset_index, 1); > > #if VM_NRESERVLEVEL > 0 > /* > -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 07:31:00 2014 Return-Path: Delivered-To: svn-src-all@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 EFBA616F; Fri, 14 Feb 2014 07:31: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 DA787185D; Fri, 14 Feb 2014 07:31:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1E7V0Jh005278; Fri, 14 Feb 2014 07:31:00 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1E7V0Et005273; Fri, 14 Feb 2014 07:31:00 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402140731.s1E7V0Et005273@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 14 Feb 2014 07:31:00 +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: r261873 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 07:31:01 -0000 Author: hselasky Date: Fri Feb 14 07:30:59 2014 New Revision: 261873 URL: http://svnweb.freebsd.org/changeset/base/261873 Log: MFC r261597, r261598 and r261599: Apple touchpad manual page fixes: - Add manual page for wsp driver - Update atp driver manual page - Install atp manual page for all platforms Added: stable/10/share/man/man4/wsp.4 - copied unchanged from r261597, head/share/man/man4/wsp.4 Modified: stable/10/share/man/man4/Makefile stable/10/share/man/man4/atp.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Fri Feb 14 07:17:36 2014 (r261872) +++ stable/10/share/man/man4/Makefile Fri Feb 14 07:30:59 2014 (r261873) @@ -59,7 +59,7 @@ MAN= aac.4 \ ath_pci.4 \ atkbd.4 \ atkbdc.4 \ - ${_atp.4} \ + atp.4 \ ${_atf_test_case.4} \ ${_atrtc.4} \ ${_attimer.4} \ @@ -561,6 +561,7 @@ MAN= aac.4 \ wlan_wep.4 \ wlan_xauth.4 \ ${_wpi.4} \ + wsp.4 \ xe.4 \ ${_xen.4} \ xhci.4 \ @@ -748,7 +749,6 @@ _amdsbwd.4= amdsbwd.4 _amdsmb.4= amdsmb.4 _amdtemp.4= amdtemp.4 _asmc.4= asmc.4 -_atp.4= atp.4 _bxe.4= bxe.4 _coretemp.4= coretemp.4 _cpuctl.4= cpuctl.4 @@ -820,9 +820,6 @@ MLINKS+=qlxgbe.4 if_qlxgbe.4 MLINKS+=sfxge.4 if_sfxge.4 .endif -.if ${MACHINE_CPUARCH} == "powerpc" -_atp.4= atp.4 -.endif .if ${MACHINE_CPUARCH} == "mips" _nvram2env.4= nvram2env.4 .endif Modified: stable/10/share/man/man4/atp.4 ============================================================================== --- stable/10/share/man/man4/atp.4 Fri Feb 14 07:17:36 2014 (r261872) +++ stable/10/share/man/man4/atp.4 Fri Feb 14 07:30:59 2014 (r261873) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 12, 2009 +.Dd February 7, 2014 .Dt ATP 4 .Os .Sh NAME @@ -114,57 +114,6 @@ type device\-\-see .Xr moused 8 for an explanation of these mouse types. -.Xr moused 8 -can be configured to read touchpad data from -.Pa /dev/atp0 -and pass it along to the -.Xr sysmouse 4 -driver so that any process wanting to utilize mouse operation (such as -an X server) may fetch it from -.Pa /dev/sysmouse ; -alternatively, -.Pa /dev/atp0 -may be manipulated via -.Xr read 2 -and -.Xr ioctl 2 -calls to get mouse data directly. -.Sh EXAMPLES -To use a compatible Apple Trackpad as your console mouse: -.Pp -.Dl moused -p /dev/atp0 -t auto -.Pp -To launch -.Xr moused 8 -automatically upon boot, add the following to -.Pa /etc/rc.conf : -.Pp -.Dl moused_enable="YES" -.Dl moused_type="auto" -.Dl moused_port="/dev/atp0" -.Pp -If you want -.Xr moused 8 -to also probe for external USB mice or other devices, then add the -following to -.Pa /etc/rc.conf : -.Pp -.Dl moused_nondefault_enable="YES" -.Dl moused_ums0_enable="YES" -.Dl moused_ums1_enable="YES" -.Pp -To be able to use the trackpad under X, change the "Pointer" section in -.Nm xorg.conf -to the following: -.Pp -.Dl Device "/dev/atp0" -.Dl Protocol "Auto" -.Pp -Better still, if you want to be able to use the mouse in both virtual -consoles as well as in X change it to: -.Pp -.Dl Device "/dev/sysmouse" -.Dl Protocol "Auto" .Sh SEE ALSO .Xr sysmouse 4 , .Xr usb 4 , Copied: stable/10/share/man/man4/wsp.4 (from r261597, head/share/man/man4/wsp.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man4/wsp.4 Fri Feb 14 07:30:59 2014 (r261873, copy of r261597, head/share/man/man4/wsp.4) @@ -0,0 +1,96 @@ +.\" Copyright (c) 2014 Hans Petter Selasky . +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. Neither the name of the author nor the names of any co-contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" 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 February 7, 2014 +.Dt WSP 4 +.Os +.Sh NAME +.Nm wsp +.Nd Wellspring touchpad driver +.Sh SYNOPSIS +To compile this driver into the kernel, place the following lines into +your kernel configuration file: +.Bd -ragged -offset indent +.Cd "device wsp" +.Cd "device usb" +.Ed +.Pp +Alternativly, to load the driver as a module at boot time, +place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +wsp_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for the Apple Internal Trackpad +device found in many Apple laptops. +.Pp +The driver simulates a three\-button mouse using multi\-finger tap +detection. +. +A single\-finger press generates a left button click. +A two\-finger tap maps to the right button; whereas a three\-finger tap +gets treated as a middle button click. +. +.Pp +.Nm +supports dynamic reconfiguration using +.Xr sysctl 8 ; +through nodes under +.Nm hw.usb.wsp . +Pointer sensitivity can be controlled using the sysctl tunable +.Nm hw.usb.wsp.scale_factor . +. +.Sh FILES +.Nm +creates a blocking pseudo\-device file, +.Pa /dev/wsp0 , +which presents the mouse as a +.Ar sysmouse +or +.Ar mousesystems +type device\-\-see +.Xr moused 8 +for an explanation of these mouse +types. +.Sh SEE ALSO +.Xr sysmouse 4 , +.Xr usb 4 , +.Xr loader.conf 5 , +.Xr xorg.conf 5 Pq Pa ports/x11/xorg , +.Xr moused 8 , +.Xr sysctl 8 +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Huang Wen Hui Aq huanghwh@gmail.com From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 07:36:05 2014 Return-Path: Delivered-To: svn-src-all@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 AAFE02FB; Fri, 14 Feb 2014 07:36: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 9550A188F; Fri, 14 Feb 2014 07:36:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1E7a5Jp006193; Fri, 14 Feb 2014 07:36:05 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1E7a580006188; Fri, 14 Feb 2014 07:36:05 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201402140736.s1E7a580006188@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 14 Feb 2014 07:36:05 +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: r261874 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 07:36:05 -0000 Author: hselasky Date: Fri Feb 14 07:36:04 2014 New Revision: 261874 URL: http://svnweb.freebsd.org/changeset/base/261874 Log: MFC r261597, r261598 and r261599: Apple touchpad manual page fixes: - Add manual page for wsp driver - Update atp driver manual page - Install atp manual page for all platforms Added: stable/9/share/man/man4/wsp.4 - copied unchanged from r261597, head/share/man/man4/wsp.4 Modified: stable/9/share/man/man4/Makefile stable/9/share/man/man4/atp.4 Directory Properties: stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Fri Feb 14 07:30:59 2014 (r261873) +++ stable/9/share/man/man4/Makefile Fri Feb 14 07:36:04 2014 (r261874) @@ -55,7 +55,7 @@ MAN= aac.4 \ ath_pci.4 \ atkbd.4 \ atkbdc.4 \ - ${_atp.4} \ + atp.4 \ ${_atrtc.4} \ ${_attimer.4} \ audit.4 \ @@ -539,6 +539,7 @@ MAN= aac.4 \ wlan_wep.4 \ wlan_xauth.4 \ ${_wpi.4} \ + wsp.4 \ xe.4 \ ${_xen.4} \ xhci.4 \ @@ -720,7 +721,6 @@ _amdsbwd.4= amdsbwd.4 _amdsmb.4= amdsmb.4 _amdtemp.4= amdtemp.4 _asmc.4= asmc.4 -_atp.4= atp.4 _bxe.4= bxe.4 _coretemp.4= coretemp.4 _cpuctl.4= cpuctl.4 @@ -785,9 +785,6 @@ MLINKS+=qlxgbe.4 if_qlxgbe.4 MLINKS+=sfxge.4 if_sfxge.4 .endif -.if ${MACHINE_CPUARCH} == "powerpc" -_atp.4= atp.4 -.endif .if ${MACHINE_CPUARCH} == "mips" _nvram2env.4= nvram2env.4 .endif Modified: stable/9/share/man/man4/atp.4 ============================================================================== --- stable/9/share/man/man4/atp.4 Fri Feb 14 07:30:59 2014 (r261873) +++ stable/9/share/man/man4/atp.4 Fri Feb 14 07:36:04 2014 (r261874) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 12, 2009 +.Dd February 7, 2014 .Dt ATP 4 .Os .Sh NAME @@ -98,7 +98,7 @@ Core2 Duo MacBook3,1 (IDs: 0x0229, 0x022 .El .Pp To discover the product\-id of a touchpad, search for 'Trackpad' in the -output of +output of .Xr lshal 1 and look up the property .Nm usb_device.product_id . @@ -108,63 +108,12 @@ creates a blocking pseudo\-device file, .Pa /dev/atp0 , which presents the mouse as a .Ar sysmouse -or +or .Ar mousesystems type device\-\-see .Xr moused 8 for an explanation of these mouse types. -.Xr moused 8 -can be configured to read touchpad data from -.Pa /dev/atp0 -and pass it along to the -.Xr sysmouse 4 -driver so that any process wanting to utilize mouse operation (such as -an X server) may fetch it from -.Pa /dev/sysmouse ; -alternatively, -.Pa /dev/atp0 -may be manipulated via -.Xr read 2 -and -.Xr ioctl 2 -calls to get mouse data directly. -.Sh EXAMPLES -To use a compatible Apple Trackpad as your console mouse: -.Pp -.Dl moused -p /dev/atp0 -t auto -.Pp -To launch -.Xr moused 8 -automatically upon boot, add the following to -.Pa /etc/rc.conf : -.Pp -.Dl moused_enable="YES" -.Dl moused_type="auto" -.Dl moused_port="/dev/atp0" -.Pp -If you want -.Xr moused 8 -to also probe for external USB mice or other devices, then add the -following to -.Pa /etc/rc.conf : -.Pp -.Dl moused_nondefault_enable="YES" -.Dl moused_ums0_enable="YES" -.Dl moused_ums1_enable="YES" -.Pp -To be able to use the trackpad under X, change the "Pointer" section in -.Nm xorg.conf -to the following: -.Pp -.Dl Device "/dev/atp0" -.Dl Protocol "Auto" -.Pp -Better still, if you want to be able to use the mouse in both virtual -consoles as well as in X change it to: -.Pp -.Dl Device "/dev/sysmouse" -.Dl Protocol "Auto" .Sh SEE ALSO .Xr sysmouse 4 , .Xr usb 4 , Copied: stable/9/share/man/man4/wsp.4 (from r261597, head/share/man/man4/wsp.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/share/man/man4/wsp.4 Fri Feb 14 07:36:04 2014 (r261874, copy of r261597, head/share/man/man4/wsp.4) @@ -0,0 +1,96 @@ +.\" Copyright (c) 2014 Hans Petter Selasky . +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. Neither the name of the author nor the names of any co-contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" 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 February 7, 2014 +.Dt WSP 4 +.Os +.Sh NAME +.Nm wsp +.Nd Wellspring touchpad driver +.Sh SYNOPSIS +To compile this driver into the kernel, place the following lines into +your kernel configuration file: +.Bd -ragged -offset indent +.Cd "device wsp" +.Cd "device usb" +.Ed +.Pp +Alternativly, to load the driver as a module at boot time, +place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +wsp_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for the Apple Internal Trackpad +device found in many Apple laptops. +.Pp +The driver simulates a three\-button mouse using multi\-finger tap +detection. +. +A single\-finger press generates a left button click. +A two\-finger tap maps to the right button; whereas a three\-finger tap +gets treated as a middle button click. +. +.Pp +.Nm +supports dynamic reconfiguration using +.Xr sysctl 8 ; +through nodes under +.Nm hw.usb.wsp . +Pointer sensitivity can be controlled using the sysctl tunable +.Nm hw.usb.wsp.scale_factor . +. +.Sh FILES +.Nm +creates a blocking pseudo\-device file, +.Pa /dev/wsp0 , +which presents the mouse as a +.Ar sysmouse +or +.Ar mousesystems +type device\-\-see +.Xr moused 8 +for an explanation of these mouse +types. +.Sh SEE ALSO +.Xr sysmouse 4 , +.Xr usb 4 , +.Xr loader.conf 5 , +.Xr xorg.conf 5 Pq Pa ports/x11/xorg , +.Xr moused 8 , +.Xr sysctl 8 +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Huang Wen Hui Aq huanghwh@gmail.com From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 07:43:40 2014 Return-Path: Delivered-To: svn-src-all@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 865C757A; Fri, 14 Feb 2014 07:43:40 +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 720DB191A; Fri, 14 Feb 2014 07:43:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1E7heYn010233; Fri, 14 Feb 2014 07:43:40 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1E7he4O010232; Fri, 14 Feb 2014 07:43:40 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201402140743.s1E7he4O010232@svn.freebsd.org> From: Adrian Chadd Date: Fri, 14 Feb 2014 07:43:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261875 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 07:43:40 -0000 Author: adrian Date: Fri Feb 14 07:43:39 2014 New Revision: 261875 URL: http://svnweb.freebsd.org/changeset/base/261875 Log: Reword. Suggestion: glebius Modified: head/usr.bin/netstat/flowtable.c Modified: head/usr.bin/netstat/flowtable.c ============================================================================== --- head/usr.bin/netstat/flowtable.c Fri Feb 14 07:36:04 2014 (r261874) +++ head/usr.bin/netstat/flowtable.c Fri Feb 14 07:43:39 2014 (r261875) @@ -55,7 +55,7 @@ print_stats(struct flowtable_stat *stat) p(ft_collisions, "\t%ju collision%s\n"); p(ft_free_checks, "\t%ju free check%s\n"); p(ft_frees, "\t%ju free%s\n"); - p(ft_fail_lle_invalid, "\t%ju lookups w/ no resolved ARP%s\n"); + p(ft_fail_lle_invalid, "\t%ju lookups w/ no resolved Layer 2 address%s\n"); #undef p2 #undef p From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 07:51:08 2014 Return-Path: Delivered-To: svn-src-all@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 770BC7EE; Fri, 14 Feb 2014 07:51:08 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (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 F00E6196D; Fri, 14 Feb 2014 07:51:07 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.8/8.14.8) with ESMTP id s1E7p0Pi038185 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 14 Feb 2014 11:51:00 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.8/8.14.8/Submit) id s1E7p0F8038184; Fri, 14 Feb 2014 11:51:00 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 14 Feb 2014 11:51:00 +0400 From: Gleb Smirnoff To: Adrian Chadd Subject: Re: svn commit: r261875 - head/usr.bin/netstat Message-ID: <20140214075100.GD26785@FreeBSD.org> References: <201402140743.s1E7he4O010232@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201402140743.s1E7he4O010232@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 07:51:08 -0000 On Fri, Feb 14, 2014 at 07:43:40AM +0000, Adrian Chadd wrote: A> Author: adrian A> Date: Fri Feb 14 07:43:39 2014 A> New Revision: 261875 A> URL: http://svnweb.freebsd.org/changeset/base/261875 A> A> Log: A> Reword. A> A> Suggestion: glebius A> A> Modified: A> head/usr.bin/netstat/flowtable.c A> A> Modified: head/usr.bin/netstat/flowtable.c A> ============================================================================== A> --- head/usr.bin/netstat/flowtable.c Fri Feb 14 07:36:04 2014 (r261874) A> +++ head/usr.bin/netstat/flowtable.c Fri Feb 14 07:43:39 2014 (r261875) A> @@ -55,7 +55,7 @@ print_stats(struct flowtable_stat *stat) A> p(ft_collisions, "\t%ju collision%s\n"); A> p(ft_free_checks, "\t%ju free check%s\n"); A> p(ft_frees, "\t%ju free%s\n"); A> - p(ft_fail_lle_invalid, "\t%ju lookups w/ no resolved ARP%s\n"); A> + p(ft_fail_lle_invalid, "\t%ju lookups w/ no resolved Layer 2 address%s\n"); A> A> #undef p2 A> #undef p Oh, sorry this is not correct. We need the plural() output after "lookup", not after "address". We need: 1 lookup w/ no resolved Layer 2 address 2 lookups w/ no resolved Layer 2 address We don't want: 1 lookups w/ no resolved Layer 2 address 2 lookups w/ no resolved Layer 2 addresss -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 08:20:33 2014 Return-Path: Delivered-To: svn-src-all@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 07961EAB; Fri, 14 Feb 2014 08:20: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 E75451C22; Fri, 14 Feb 2014 08:20:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1E8KWgH025104; Fri, 14 Feb 2014 08:20:32 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1E8KW4u025103; Fri, 14 Feb 2014 08:20:32 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402140820.s1E8KW4u025103@svn.freebsd.org> From: Christian Brueffer Date: Fri, 14 Feb 2014 08:20:32 +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: r261876 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 08:20:33 -0000 Author: brueffer Date: Fri Feb 14 08:20:32 2014 New Revision: 261876 URL: http://svnweb.freebsd.org/changeset/base/261876 Log: MFC: r261584 In IPv6 code examples, use the correct v6 socket. Modified: stable/10/share/man/man4/multicast.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/multicast.4 ============================================================================== --- stable/10/share/man/man4/multicast.4 Fri Feb 14 07:43:39 2014 (r261875) +++ stable/10/share/man/man4/multicast.4 Fri Feb 14 08:20:32 2014 (r261876) @@ -326,7 +326,7 @@ mc.mf6cc_parent = iif_index; for (i = 0; i < maxvifs; i++) if (oifs_ttl[i] > 0) IF_SET(i, &mc.mf6cc_ifset); -setsockopt(mrouter_s4, IPPROTO_IPV6, MRT6_ADD_MFC, +setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_ADD_MFC, (void *)&mc, sizeof(mc)); .Ed .Pp @@ -365,7 +365,7 @@ struct mf6cctl mc; memset(&mc, 0, sizeof(mc)); memcpy(&mc.mf6cc_origin, &source_addr, sizeof(mc.mf6cc_origin)); memcpy(&mc.mf6cc_mcastgrp, &group_addr, sizeof(mf6cc_mcastgrp)); -setsockopt(mrouter_s4, IPPROTO_IPV6, MRT6_DEL_MFC, +setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_DEL_MFC, (void *)&mc, sizeof(mc)); .Ed .Pp From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 08:22:58 2014 Return-Path: Delivered-To: svn-src-all@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 41E1B9D; Fri, 14 Feb 2014 08:22:58 +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 2AF081C36; Fri, 14 Feb 2014 08:22:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1E8MwX4026129; Fri, 14 Feb 2014 08:22:58 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1E8MwnE026128; Fri, 14 Feb 2014 08:22:58 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402140822.s1E8MwnE026128@svn.freebsd.org> From: Christian Brueffer Date: Fri, 14 Feb 2014 08:22:58 +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: r261877 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 08:22:58 -0000 Author: brueffer Date: Fri Feb 14 08:22:57 2014 New Revision: 261877 URL: http://svnweb.freebsd.org/changeset/base/261877 Log: MFC: r261584 In IPv6 code examples, use the correct v6 socket. Modified: stable/9/share/man/man4/multicast.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/multicast.4 ============================================================================== --- stable/9/share/man/man4/multicast.4 Fri Feb 14 08:20:32 2014 (r261876) +++ stable/9/share/man/man4/multicast.4 Fri Feb 14 08:22:57 2014 (r261877) @@ -326,7 +326,7 @@ mc.mf6cc_parent = iif_index; for (i = 0; i < maxvifs; i++) if (oifs_ttl[i] > 0) IF_SET(i, &mc.mf6cc_ifset); -setsockopt(mrouter_s4, IPPROTO_IPV6, MRT6_ADD_MFC, +setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_ADD_MFC, (void *)&mc, sizeof(mc)); .Ed .Pp @@ -365,7 +365,7 @@ struct mf6cctl mc; memset(&mc, 0, sizeof(mc)); memcpy(&mc.mf6cc_origin, &source_addr, sizeof(mc.mf6cc_origin)); memcpy(&mc.mf6cc_mcastgrp, &group_addr, sizeof(mf6cc_mcastgrp)); -setsockopt(mrouter_s4, IPPROTO_IPV6, MRT6_DEL_MFC, +setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_DEL_MFC, (void *)&mc, sizeof(mc)); .Ed .Pp From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 08:26:06 2014 Return-Path: Delivered-To: svn-src-all@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 8D90D233; Fri, 14 Feb 2014 08:26: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 7685B1C48; Fri, 14 Feb 2014 08:26:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1E8Q6Ux026528; Fri, 14 Feb 2014 08:26:06 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1E8Q62D026527; Fri, 14 Feb 2014 08:26:06 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402140826.s1E8Q62D026527@svn.freebsd.org> From: Christian Brueffer Date: Fri, 14 Feb 2014 08:26:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r261878 - stable/8/share/man/man4 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 08:26:06 -0000 Author: brueffer Date: Fri Feb 14 08:26:05 2014 New Revision: 261878 URL: http://svnweb.freebsd.org/changeset/base/261878 Log: MFC: r261584 In IPv6 code examples, use the correct v6 socket. Modified: stable/8/share/man/man4/multicast.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/multicast.4 ============================================================================== --- stable/8/share/man/man4/multicast.4 Fri Feb 14 08:22:57 2014 (r261877) +++ stable/8/share/man/man4/multicast.4 Fri Feb 14 08:26:05 2014 (r261878) @@ -326,7 +326,7 @@ mc.mf6cc_parent = iif_index; for (i = 0; i < maxvifs; i++) if (oifs_ttl[i] > 0) IF_SET(i, &mc.mf6cc_ifset); -setsockopt(mrouter_s4, IPPROTO_IPV6, MRT6_ADD_MFC, +setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_ADD_MFC, (void *)&mc, sizeof(mc)); .Ed .Pp @@ -365,7 +365,7 @@ struct mf6cctl mc; memset(&mc, 0, sizeof(mc)); memcpy(&mc.mf6cc_origin, &source_addr, sizeof(mc.mf6cc_origin)); memcpy(&mc.mf6cc_mcastgrp, &group_addr, sizeof(mf6cc_mcastgrp)); -setsockopt(mrouter_s4, IPPROTO_IPV6, MRT6_DEL_MFC, +setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_DEL_MFC, (void *)&mc, sizeof(mc)); .Ed .Pp From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 08:29:01 2014 Return-Path: Delivered-To: svn-src-all@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 1C7EB459; Fri, 14 Feb 2014 08:29:01 +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 076B31C62; Fri, 14 Feb 2014 08:29:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1E8T09P026938; Fri, 14 Feb 2014 08:29:00 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1E8T0ch026937; Fri, 14 Feb 2014 08:29:00 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402140829.s1E8T0ch026937@svn.freebsd.org> From: Christian Brueffer Date: Fri, 14 Feb 2014 08:29:00 +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: r261879 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 08:29:01 -0000 Author: brueffer Date: Fri Feb 14 08:29:00 2014 New Revision: 261879 URL: http://svnweb.freebsd.org/changeset/base/261879 Log: MFC: r261611 Add some context for the "kldload sem" command; minor other improvements. PR: 183650 Submitted by: Bjorn Heidotting Modified: stable/10/share/man/man4/sem.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/sem.4 ============================================================================== --- stable/10/share/man/man4/sem.4 Fri Feb 14 08:26:05 2014 (r261878) +++ stable/10/share/man/man4/sem.4 Fri Feb 14 08:29:00 2014 (r261879) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 3, 2011 +.Dd February 7, 2014 .Dt SEM 4 .Os .Sh NAME @@ -32,7 +32,7 @@ .Nd POSIX semaphores .Sh SYNOPSIS To compile this driver into the kernel, -place the following lines in your +place the following line in your kernel configuration file: .Bd -ragged -offset indent .Cd "options P1003_1B_SEMAPHORES" @@ -45,7 +45,11 @@ module at boot time, place the following sem_load="YES" .Ed .Pp -.Dl "kldload sem" +To load the driver as a module at run-time, run the following +command as root: +.Bd -ragged -offset indent +kldload sem +.Ed .Sh DESCRIPTION The .Nm From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 08:31:17 2014 Return-Path: Delivered-To: svn-src-all@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 048F8610; Fri, 14 Feb 2014 08:31:17 +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 E456E1C94; Fri, 14 Feb 2014 08:31:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1E8VGXa028298; Fri, 14 Feb 2014 08:31:16 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1E8VGJf028297; Fri, 14 Feb 2014 08:31:16 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402140831.s1E8VGJf028297@svn.freebsd.org> From: Christian Brueffer Date: Fri, 14 Feb 2014 08:31:16 +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: r261880 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 08:31:17 -0000 Author: brueffer Date: Fri Feb 14 08:31:16 2014 New Revision: 261880 URL: http://svnweb.freebsd.org/changeset/base/261880 Log: MFC: r261611 Add some context for the "kldload sem" command; minor other improvements. PR: 183650 Submitted by: Bjorn Heidotting Modified: stable/9/share/man/man4/sem.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/sem.4 ============================================================================== --- stable/9/share/man/man4/sem.4 Fri Feb 14 08:29:00 2014 (r261879) +++ stable/9/share/man/man4/sem.4 Fri Feb 14 08:31:16 2014 (r261880) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 3, 2011 +.Dd February 7, 2014 .Dt SEM 4 .Os .Sh NAME @@ -32,7 +32,7 @@ .Nd POSIX semaphores .Sh SYNOPSIS To compile this driver into the kernel, -place the following lines in your +place the following line in your kernel configuration file: .Bd -ragged -offset indent .Cd "options P1003_1B_SEMAPHORES" @@ -45,7 +45,11 @@ module at boot time, place the following sem_load="YES" .Ed .Pp -.Dl "kldload sem" +To load the driver as a module at run-time, run the following +command as root: +.Bd -ragged -offset indent +kldload sem +.Ed .Sh DESCRIPTION The .Nm From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 08:42:39 2014 Return-Path: Delivered-To: svn-src-all@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 C5BEE819; Fri, 14 Feb 2014 08:42:39 +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 B08151D9A; Fri, 14 Feb 2014 08:42:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1E8gdDX033991; Fri, 14 Feb 2014 08:42:39 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1E8gdPY033990; Fri, 14 Feb 2014 08:42:39 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201402140842.s1E8gdPY033990@svn.freebsd.org> From: Dimitry Andric Date: Fri, 14 Feb 2014 08:42:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261881 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 08:42:39 -0000 Author: dim Date: Fri Feb 14 08:42:39 2014 New Revision: 261881 URL: http://svnweb.freebsd.org/changeset/base/261881 Log: Bump __FreeBSD_version after the libc++ 3.4 ABI compatibility fix in r261801. Requested by: portmgr Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Fri Feb 14 08:31:16 2014 (r261880) +++ head/sys/sys/param.h Fri Feb 14 08:42:39 2014 (r261881) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100007 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100008 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 09:23:49 2014 Return-Path: Delivered-To: svn-src-all@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 B06D86EF; Fri, 14 Feb 2014 09:23:49 +0000 (UTC) Received: from mail-ve0-x231.google.com (mail-ve0-x231.google.com [IPv6:2607:f8b0:400c:c01::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 33E601233; Fri, 14 Feb 2014 09:23:49 +0000 (UTC) Received: by mail-ve0-f177.google.com with SMTP id jz11so9257922veb.8 for ; Fri, 14 Feb 2014 01:23:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=+fp1O43JfJIBnV9l+QqrtUFzQ56WYku8sasnOaDjHk8=; b=i/HLF/7lKhq/m/fAbtKP3Av0HW1PTMJ8Qqn0M7/0Ycmw4yMaSniknMgxROnKbVz6xR rhcUkb18IApHe2ZcVtz2LreSTAg907T208wWmnhbNTVcfHWD+E9RlXBNMUTOZuYq3Sw6 YSoibgzXgTffKTJ3UXgW8HIojx3o4wNwj8jaxhICMGddIebiStzwlHWe9xFo3guz0vL1 NSELB8HS/iFZdIAwR9mkhwOQ0O8lDX+TBLwoo4TUyg/XJzE9ReIH/fYhkaNGuJmNU0cn JEXUjFZCC0wQAguFvZp22IVT2PkEWf19KjNuI2013gQ+QHZ3Vn5jifGGIbtUOxa4/lGQ EWUg== MIME-Version: 1.0 X-Received: by 10.220.53.66 with SMTP id l2mr393795vcg.33.1392369828260; Fri, 14 Feb 2014 01:23:48 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.220.113.199 with HTTP; Fri, 14 Feb 2014 01:23:48 -0800 (PST) In-Reply-To: <20140214075100.GD26785@FreeBSD.org> References: <201402140743.s1E7he4O010232@svn.freebsd.org> <20140214075100.GD26785@FreeBSD.org> Date: Fri, 14 Feb 2014 01:23:48 -0800 X-Google-Sender-Auth: GJD4dKrfSmo6jrkJK_lOm11_pqs Message-ID: Subject: Re: svn commit: r261875 - head/usr.bin/netstat From: Adrian Chadd To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 09:23:49 -0000 ew, ok. Sorry. We don't have a generic way of doing that. I'll fix it in the am. -a On 13 February 2014 23:51, Gleb Smirnoff wrote: > On Fri, Feb 14, 2014 at 07:43:40AM +0000, Adrian Chadd wrote: > A> Author: adrian > A> Date: Fri Feb 14 07:43:39 2014 > A> New Revision: 261875 > A> URL: http://svnweb.freebsd.org/changeset/base/261875 > A> > A> Log: > A> Reword. > A> > A> Suggestion: glebius > A> > A> Modified: > A> head/usr.bin/netstat/flowtable.c > A> > A> Modified: head/usr.bin/netstat/flowtable.c > A> ============================================================================== > A> --- head/usr.bin/netstat/flowtable.c Fri Feb 14 07:36:04 2014 (r261874) > A> +++ head/usr.bin/netstat/flowtable.c Fri Feb 14 07:43:39 2014 (r261875) > A> @@ -55,7 +55,7 @@ print_stats(struct flowtable_stat *stat) > A> p(ft_collisions, "\t%ju collision%s\n"); > A> p(ft_free_checks, "\t%ju free check%s\n"); > A> p(ft_frees, "\t%ju free%s\n"); > A> - p(ft_fail_lle_invalid, "\t%ju lookups w/ no resolved ARP%s\n"); > A> + p(ft_fail_lle_invalid, "\t%ju lookups w/ no resolved Layer 2 address%s\n"); > A> > A> #undef p2 > A> #undef p > > Oh, sorry this is not correct. We need the plural() output after "lookup", > not after "address". > > We need: > > 1 lookup w/ no resolved Layer 2 address > 2 lookups w/ no resolved Layer 2 address > > We don't want: > > 1 lookups w/ no resolved Layer 2 address > 2 lookups w/ no resolved Layer 2 addresss > > -- > Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 10:05:23 2014 Return-Path: Delivered-To: svn-src-all@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 357743CD; Fri, 14 Feb 2014 10:05: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 1D08315C0; Fri, 14 Feb 2014 10:05:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1EA5Mfh066539; Fri, 14 Feb 2014 10:05:22 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1EA5MUS066533; Fri, 14 Feb 2014 10:05:22 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201402141005.s1EA5MUS066533@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 14 Feb 2014 10:05:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261882 - in head: sbin/pfctl sys/net sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 10:05:23 -0000 Author: glebius Date: Fri Feb 14 10:05:21 2014 New Revision: 261882 URL: http://svnweb.freebsd.org/changeset/base/261882 Log: Once pf became not covered by a single mutex, many counters in it became race prone. Some just gather statistics, but some are later used in different calculations. A real problem was the race provoked underflow of the states_cur counter on a rule. Once it goes below zero, it wraps to UINT32_MAX. Later this value is used in pf_state_expires() and any state created by this rule is immediately expired. Thus, make fields states_cur, states_tot and src_nodes of struct pf_rule be counter(9)s. Thanks to Dennis for providing me shell access to problematic box and his help with reproducing, debugging and investigating the problem. Thanks to: Dennis Yusupoff Also reported by: dumbbell, pgj, Rambler Sponsored by: Nginx, Inc. Modified: head/sbin/pfctl/pfctl.c head/sys/net/pfvar.h head/sys/netpfil/pf/if_pfsync.c head/sys/netpfil/pf/pf.c head/sys/netpfil/pf/pf_ioctl.c Modified: head/sbin/pfctl/pfctl.c ============================================================================== --- head/sbin/pfctl/pfctl.c Fri Feb 14 08:42:39 2014 (r261881) +++ head/sbin/pfctl/pfctl.c Fri Feb 14 10:05:21 2014 (r261882) @@ -791,17 +791,17 @@ pfctl_print_rule_counters(struct pf_rule } if (opts & PF_OPT_VERBOSE) { printf(" [ Evaluations: %-8llu Packets: %-8llu " - "Bytes: %-10llu States: %-6u]\n", + "Bytes: %-10llu States: %-6lu]\n", (unsigned long long)rule->evaluations, (unsigned long long)(rule->packets[0] + rule->packets[1]), (unsigned long long)(rule->bytes[0] + - rule->bytes[1]), rule->states_cur); + rule->bytes[1]), (uint64_t)rule->states_cur); if (!(opts & PF_OPT_DEBUG)) printf(" [ Inserted: uid %u pid %u " - "State Creations: %-6u]\n", + "State Creations: %-6lu]\n", (unsigned)rule->cuid, (unsigned)rule->cpid, - rule->states_tot); + (uint64_t)rule->states_tot); } } Modified: head/sys/net/pfvar.h ============================================================================== --- head/sys/net/pfvar.h Fri Feb 14 08:42:39 2014 (r261881) +++ head/sys/net/pfvar.h Fri Feb 14 10:05:21 2014 (r261882) @@ -35,6 +35,7 @@ #include #include +#include #include #include @@ -512,13 +513,9 @@ struct pf_rule { int rtableid; u_int32_t timeout[PFTM_MAX]; - u_int32_t states_cur; - u_int32_t states_tot; u_int32_t max_states; - u_int32_t src_nodes; u_int32_t max_src_nodes; u_int32_t max_src_states; - u_int32_t spare1; /* netgraph */ u_int32_t max_src_conn; struct { u_int32_t limit; @@ -532,6 +529,10 @@ struct pf_rule { uid_t cuid; pid_t cpid; + counter_u64_t states_cur; + counter_u64_t states_tot; + counter_u64_t src_nodes; + u_int16_t return_icmp; u_int16_t return_icmp6; u_int16_t max_mss; Modified: head/sys/netpfil/pf/if_pfsync.c ============================================================================== --- head/sys/netpfil/pf/if_pfsync.c Fri Feb 14 08:42:39 2014 (r261881) +++ head/sys/netpfil/pf/if_pfsync.c Fri Feb 14 10:05:21 2014 (r261882) @@ -438,7 +438,8 @@ pfsync_state_import(struct pfsync_state else r = &V_pf_default_rule; - if ((r->max_states && r->states_cur >= r->max_states)) + if ((r->max_states && + counter_u64_fetch(r->states_cur) >= r->max_states)) goto cleanup; /* @@ -516,18 +517,15 @@ pfsync_state_import(struct pfsync_state st->pfsync_time = time_uptime; st->sync_state = PFSYNC_S_NONE; - /* XXX when we have nat_rule/anchors, use STATE_INC_COUNTERS */ - r->states_cur++; - r->states_tot++; - if (!(flags & PFSYNC_SI_IOCTL)) st->state_flags |= PFSTATE_NOSYNC; - if ((error = pf_state_insert(kif, skw, sks, st)) != 0) { - /* XXX when we have nat_rule/anchors, use STATE_DEC_COUNTERS */ - r->states_cur--; + if ((error = pf_state_insert(kif, skw, sks, st)) != 0) goto cleanup_state; - } + + /* XXX when we have nat_rule/anchors, use STATE_INC_COUNTERS */ + counter_u64_add(r->states_cur, 1); + counter_u64_add(r->states_tot, 1); if (!(flags & PFSYNC_SI_IOCTL)) { st->state_flags &= ~PFSTATE_NOSYNC; Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Fri Feb 14 08:42:39 2014 (r261881) +++ head/sys/netpfil/pf/pf.c Fri Feb 14 10:05:21 2014 (r261882) @@ -335,27 +335,27 @@ enum { PF_ICMP_MULTI_NONE, PF_ICMP_MULTI #define BOUND_IFACE(r, k) \ ((r)->rule_flag & PFRULE_IFBOUND) ? (k) : V_pfi_all -#define STATE_INC_COUNTERS(s) \ - do { \ - s->rule.ptr->states_cur++; \ - s->rule.ptr->states_tot++; \ - if (s->anchor.ptr != NULL) { \ - s->anchor.ptr->states_cur++; \ - s->anchor.ptr->states_tot++; \ - } \ - if (s->nat_rule.ptr != NULL) { \ - s->nat_rule.ptr->states_cur++; \ - s->nat_rule.ptr->states_tot++; \ - } \ +#define STATE_INC_COUNTERS(s) \ + do { \ + counter_u64_add(s->rule.ptr->states_cur, 1); \ + counter_u64_add(s->rule.ptr->states_tot, 1); \ + if (s->anchor.ptr != NULL) { \ + counter_u64_add(s->anchor.ptr->states_cur, 1); \ + counter_u64_add(s->anchor.ptr->states_tot, 1); \ + } \ + if (s->nat_rule.ptr != NULL) { \ + counter_u64_add(s->nat_rule.ptr->states_cur, 1);\ + counter_u64_add(s->nat_rule.ptr->states_tot, 1);\ + } \ } while (0) -#define STATE_DEC_COUNTERS(s) \ - do { \ - if (s->nat_rule.ptr != NULL) \ - s->nat_rule.ptr->states_cur--; \ - if (s->anchor.ptr != NULL) \ - s->anchor.ptr->states_cur--; \ - s->rule.ptr->states_cur--; \ +#define STATE_DEC_COUNTERS(s) \ + do { \ + if (s->nat_rule.ptr != NULL) \ + counter_u64_add(s->nat_rule.ptr->states_cur, -1);\ + if (s->anchor.ptr != NULL) \ + counter_u64_add(s->anchor.ptr->states_cur, -1); \ + counter_u64_add(s->rule.ptr->states_cur, -1); \ } while (0) static MALLOC_DEFINE(M_PFHASH, "pf_hash", "pf(4) hash header structures"); @@ -647,7 +647,7 @@ pf_insert_src_node(struct pf_src_node ** PF_HASHROW_ASSERT(sh); if (!rule->max_src_nodes || - rule->src_nodes < rule->max_src_nodes) + counter_u64_fetch(rule->src_nodes) < rule->max_src_nodes) (*sn) = uma_zalloc(V_pf_sources_z, M_NOWAIT | M_ZERO); else V_pf_status.lcounters[LCNT_SRCNODES]++; @@ -667,7 +667,7 @@ pf_insert_src_node(struct pf_src_node ** (*sn)->creation = time_uptime; (*sn)->ruletype = rule->action; if ((*sn)->rule.ptr != NULL) - (*sn)->rule.ptr->src_nodes++; + counter_u64_add((*sn)->rule.ptr->src_nodes, 1); PF_HASHROW_UNLOCK(sh); V_pf_status.scounters[SCNT_SRC_NODE_INSERT]++; V_pf_status.src_nodes++; @@ -692,7 +692,7 @@ pf_unlink_src_node_locked(struct pf_src_ #endif LIST_REMOVE(src, entry); if (src->rule.ptr) - src->rule.ptr->src_nodes--; + counter_u64_add(src->rule.ptr->src_nodes, -1); V_pf_status.scounters[SCNT_SRC_NODE_REMOVALS]++; V_pf_status.src_nodes--; } @@ -1478,7 +1478,7 @@ pf_state_expires(const struct pf_state * start = state->rule.ptr->timeout[PFTM_ADAPTIVE_START]; if (start) { end = state->rule.ptr->timeout[PFTM_ADAPTIVE_END]; - states = state->rule.ptr->states_cur; /* XXXGL */ + states = counter_u64_fetch(state->rule.ptr->states_cur); } else { start = V_pf_default_rule.timeout[PFTM_ADAPTIVE_START]; end = V_pf_default_rule.timeout[PFTM_ADAPTIVE_END]; @@ -1587,11 +1587,7 @@ pf_unlink_state(struct pf_state *s, u_in if (pfsync_delete_state_ptr != NULL) pfsync_delete_state_ptr(s); - --s->rule.ptr->states_cur; - if (s->nat_rule.ptr != NULL) - --s->nat_rule.ptr->states_cur; - if (s->anchor.ptr != NULL) - --s->anchor.ptr->states_cur; + STATE_DEC_COUNTERS(s); s->timeout = PFTM_UNLINKED; @@ -3606,7 +3602,8 @@ pf_create_state(struct pf_rule *r, struc u_short reason; /* check maximums */ - if (r->max_states && (r->states_cur >= r->max_states)) { + if (r->max_states && + (counter_u64_fetch(r->states_cur) >= r->max_states)) { V_pf_status.lcounters[LCNT_STATES]++; REASON_SET(&reason, PFRES_MAXSTATES); return (PF_DROP); Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Fri Feb 14 08:42:39 2014 (r261881) +++ head/sys/netpfil/pf/pf_ioctl.c Fri Feb 14 10:05:21 2014 (r261882) @@ -229,6 +229,10 @@ pfattach(void) V_pf_default_rule.nr = -1; V_pf_default_rule.rtableid = -1; + V_pf_default_rule.states_cur = counter_u64_alloc(M_WAITOK); + V_pf_default_rule.states_tot = counter_u64_alloc(M_WAITOK); + V_pf_default_rule.src_nodes = counter_u64_alloc(M_WAITOK); + /* initialize default timeouts */ my_timeout[PFTM_TCP_FIRST_PACKET] = PFTM_TCP_FIRST_PACKET_VAL; my_timeout[PFTM_TCP_OPENING] = PFTM_TCP_OPENING_VAL; @@ -398,6 +402,9 @@ pf_free_rule(struct pf_rule *rule) pfi_kif_unref(rule->kif); pf_anchor_remove(rule); pf_empty_pool(&rule->rpool.list); + counter_u64_free(rule->states_cur); + counter_u64_free(rule->states_tot); + counter_u64_free(rule->src_nodes); free(rule, M_PFRULE); } @@ -1149,6 +1156,9 @@ pfioctl(struct cdev *dev, u_long cmd, ca bcopy(&pr->rule, rule, sizeof(struct pf_rule)); if (rule->ifname[0]) kif = malloc(sizeof(*kif), PFI_MTYPE, M_WAITOK); + rule->states_cur = counter_u64_alloc(M_WAITOK); + rule->states_tot = counter_u64_alloc(M_WAITOK); + rule->src_nodes = counter_u64_alloc(M_WAITOK); rule->cuid = td->td_ucred->cr_ruid; rule->cpid = td->td_proc ? td->td_proc->p_pid : 0; TAILQ_INIT(&rule->rpool.list); @@ -1265,6 +1275,9 @@ pfioctl(struct cdev *dev, u_long cmd, ca #undef ERROUT DIOCADDRULE_error: PF_RULES_WUNLOCK(); + counter_u64_free(rule->states_cur); + counter_u64_free(rule->states_tot); + counter_u64_free(rule->src_nodes); free(rule, M_PFRULE); if (kif) free(kif, PFI_MTYPE); @@ -1336,6 +1349,16 @@ DIOCADDRULE_error: break; } bcopy(rule, &pr->rule, sizeof(struct pf_rule)); + /* + * XXXGL: this is what happens when internal kernel + * structures are used as ioctl API structures. + */ + pr->rule.states_cur = + (counter_u64_t )counter_u64_fetch(rule->states_cur); + pr->rule.states_tot = + (counter_u64_t )counter_u64_fetch(rule->states_tot); + pr->rule.src_nodes = + (counter_u64_t )counter_u64_fetch(rule->src_nodes); if (pf_anchor_copyout(ruleset, rule, pr)) { PF_RULES_WUNLOCK(); error = EBUSY; @@ -1354,7 +1377,7 @@ DIOCADDRULE_error: rule->evaluations = 0; rule->packets[0] = rule->packets[1] = 0; rule->bytes[0] = rule->bytes[1] = 0; - rule->states_tot = 0; + counter_u64_zero(rule->states_tot); } PF_RULES_WUNLOCK(); break; @@ -1394,15 +1417,14 @@ DIOCADDRULE_error: #endif /* INET6 */ newrule = malloc(sizeof(*newrule), M_PFRULE, M_WAITOK); bcopy(&pcr->rule, newrule, sizeof(struct pf_rule)); + if (newrule->ifname[0]) + kif = malloc(sizeof(*kif), PFI_MTYPE, M_WAITOK); + newrule->states_cur = counter_u64_alloc(M_WAITOK); + newrule->states_tot = counter_u64_alloc(M_WAITOK); + newrule->src_nodes = counter_u64_alloc(M_WAITOK); newrule->cuid = td->td_ucred->cr_ruid; newrule->cpid = td->td_proc ? td->td_proc->p_pid : 0; TAILQ_INIT(&newrule->rpool.list); - /* Initialize refcounting. */ - newrule->states_cur = 0; - newrule->entries.tqe_prev = NULL; - - if (newrule->ifname[0]) - kif = malloc(sizeof(*kif), PFI_MTYPE, M_WAITOK); } #define ERROUT(x) { error = (x); goto DIOCCHANGERULE_error; } @@ -1570,8 +1592,12 @@ DIOCADDRULE_error: #undef ERROUT DIOCCHANGERULE_error: PF_RULES_WUNLOCK(); - if (newrule != NULL) + if (newrule != NULL) { + counter_u64_free(newrule->states_cur); + counter_u64_free(newrule->states_tot); + counter_u64_free(newrule->src_nodes); free(newrule, M_PFRULE); + } if (kif != NULL) free(kif, PFI_MTYPE); break; @@ -3427,6 +3453,11 @@ shutdown_pf(void) char nn = '\0'; V_pf_status.running = 0; + + counter_u64_free(V_pf_default_rule.states_cur); + counter_u64_free(V_pf_default_rule.states_tot); + counter_u64_free(V_pf_default_rule.src_nodes); + do { if ((error = pf_begin_rules(&t[0], PF_RULESET_SCRUB, &nn)) != 0) { From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 10:56:27 2014 Return-Path: Delivered-To: svn-src-all@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 9BC684A6; Fri, 14 Feb 2014 10:56: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 7A87B1A41; Fri, 14 Feb 2014 10:56:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1EAuRba086750; Fri, 14 Feb 2014 10:56:27 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1EAuQHK086747; Fri, 14 Feb 2014 10:56:26 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201402141056.s1EAuQHK086747@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 14 Feb 2014 10:56:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261883 - in head: sys/net usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 10:56:27 -0000 Author: glebius Date: Fri Feb 14 10:56:26 2014 New Revision: 261883 URL: http://svnweb.freebsd.org/changeset/base/261883 Log: Whenever flowtable lookup fails, we do route lookup and then try to insert flow entry. During the route lookup the critical section is exited. It may happen, that after route lookup we will be executed on an other CPU that already has such flowentry. Before this change we simply freed the flowentry and returned to ip_output() with failure. Actually there is nothing wrong with using previously allocated flow entry, updating it properly. Thus, make flowentry_insert() return the new either old fle, and make use of it. Count reuses as "collisions" and real inserts as "inserts". Reviewed by: adrian Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/net/flowtable.c head/sys/net/flowtable.h head/usr.bin/netstat/flowtable.c Modified: head/sys/net/flowtable.c ============================================================================== --- head/sys/net/flowtable.c Fri Feb 14 10:05:21 2014 (r261882) +++ head/sys/net/flowtable.c Fri Feb 14 10:56:26 2014 (r261883) @@ -716,21 +716,39 @@ flow_full(struct flowtable *ft) } static int +flow_matches(struct flentry *fle, uint32_t hash, uint32_t *key, uint8_t + proto, uint32_t fibnum) +{ + + if (fle->f_fhash == hash && + bcmp(&fle->f_flow, key, KEYLEN(fle->f_flags)) == 0 && + proto == fle->f_proto && fibnum == fle->f_fibnum && + (fle->f_rt->rt_flags & RTF_UP) && + fle->f_rt->rt_ifp != NULL && + (fle->f_lle->la_flags & LLE_VALID)) + return (1); + + return (0); +} + +static struct flentry * flowtable_insert(struct flowtable *ft, uint32_t hash, uint32_t *key, uint32_t fibnum, struct route *ro, uint16_t flags) { struct flist *flist; struct flentry *fle, *iter; - int depth; bitstr_t *mask; + int depth; + uint8_t proto; fle = uma_zalloc(flow_zone, M_NOWAIT | M_ZERO); if (fle == NULL) - return (ENOMEM); + return (NULL); + proto = flags_to_proto(flags); bcopy(key, &fle->f_flow, KEYLEN(flags)); fle->f_flags |= (flags & FL_IPV6); - fle->f_proto = flags_to_proto(flags); + fle->f_proto = proto; fle->f_rt = ro->ro_rt; fle->f_lle = ro->ro_lle; fle->f_fhash = hash; @@ -748,21 +766,24 @@ flowtable_insert(struct flowtable *ft, u } depth = 0; - FLOWSTAT_INC(ft, ft_collisions); /* * find end of list and make sure that we were not * preempted by another thread handling this flow */ SLIST_FOREACH(iter, flist, f_next) { - if (iter->f_fhash == hash && !flow_stale(ft, iter)) { + if (flow_matches(iter, hash, key, proto, fibnum)) { /* - * there was either a hash collision - * or we lost a race to insert + * We probably migrated to an other CPU after + * lookup in flowtable_lookup_common() failed. + * It appeared that this CPU already has flow + * entry. */ + iter->f_uptime = time_uptime; + iter->f_flags |= flags; critical_exit(); + FLOWSTAT_INC(ft, ft_collisions); uma_zfree(flow_zone, fle); - - return (EEXIST); + return (iter); } depth++; } @@ -773,8 +794,9 @@ flowtable_insert(struct flowtable *ft, u SLIST_INSERT_HEAD(flist, fle, f_next); skip: critical_exit(); + FLOWSTAT_INC(ft, ft_inserts); - return (0); + return (fle); } struct flentry * @@ -885,12 +907,7 @@ flowtable_lookup_common(struct flowtable critical_enter(); flist = flowtable_list(ft, hash); SLIST_FOREACH(fle, flist, f_next) - if (fle->f_fhash == hash && bcmp(&fle->f_flow, key, - KEYLEN(fle->f_flags)) == 0 && - proto == fle->f_proto && fibnum == fle->f_fibnum && - (fle->f_rt->rt_flags & RTF_UP) && - fle->f_rt->rt_ifp != NULL && - (fle->f_lle->la_flags & LLE_VALID)) { + if (flow_matches(fle, hash, key, proto, fibnum)) { fle->f_uptime = time_uptime; fle->f_flags |= flags; critical_exit(); @@ -977,17 +994,19 @@ flowtable_lookup_common(struct flowtable ro->ro_lle = lle; - if (flowtable_insert(ft, hash, key, fibnum, ro, flags) != 0) { + fle = flowtable_insert(ft, hash, key, fibnum, ro, flags); + if (fle == NULL) { RTFREE(rt); LLE_FREE(lle); return (NULL); } success: - if (fle != NULL && (m->m_flags & M_FLOWID) == 0) { + if (m->m_flags & M_FLOWID) { m->m_flags |= M_FLOWID; m->m_pkthdr.flowid = fle->f_fhash; } + return (fle); } Modified: head/sys/net/flowtable.h ============================================================================== --- head/sys/net/flowtable.h Fri Feb 14 10:05:21 2014 (r261882) +++ head/sys/net/flowtable.h Fri Feb 14 10:56:26 2014 (r261883) @@ -40,6 +40,7 @@ struct flowtable_stat { uint64_t ft_hits; uint64_t ft_lookups; uint64_t ft_fail_lle_invalid; + uint64_t ft_inserts; }; #ifdef _KERNEL Modified: head/usr.bin/netstat/flowtable.c ============================================================================== --- head/usr.bin/netstat/flowtable.c Fri Feb 14 10:05:21 2014 (r261882) +++ head/usr.bin/netstat/flowtable.c Fri Feb 14 10:56:26 2014 (r261883) @@ -52,10 +52,12 @@ print_stats(struct flowtable_stat *stat) p(ft_lookups, "\t%ju lookup%s\n"); p(ft_hits, "\t%ju hit%s\n"); p2(ft_misses, "\t%ju miss%s\n"); + p(ft_inserts, "\t%ju insert%s\n"); p(ft_collisions, "\t%ju collision%s\n"); p(ft_free_checks, "\t%ju free check%s\n"); p(ft_frees, "\t%ju free%s\n"); - p(ft_fail_lle_invalid, "\t%ju lookups w/ no resolved Layer 2 address%s\n"); + p(ft_fail_lle_invalid, + "\t%ju lookup%s with not resolved Layer 2 address\n"); #undef p2 #undef p From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 11:18:16 2014 Return-Path: Delivered-To: svn-src-all@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 254ECB0A; Fri, 14 Feb 2014 11:18:16 +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 E85DB1BD2; Fri, 14 Feb 2014 11:18:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1EBIFaf095455; Fri, 14 Feb 2014 11:18:15 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1EBIFb6095452; Fri, 14 Feb 2014 11:18:15 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402141118.s1EBIFb6095452@svn.freebsd.org> From: Christian Brueffer Date: Fri, 14 Feb 2014 11:18:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261884 - in head/sys: arm/broadcom/bcm2835 dev/nand powerpc/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 11:18:16 -0000 Author: brueffer Date: Fri Feb 14 11:18:15 2014 New Revision: 261884 URL: http://svnweb.freebsd.org/changeset/base/261884 Log: Correct the order of arguments to mtx_init(). PR: 186701 Submitted by: Takanori Sawada MFC after: 2 weeks Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c head/sys/dev/nand/nandbus.c head/sys/powerpc/ofw/ofw_real.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Fri Feb 14 10:56:26 2014 (r261883) +++ head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Fri Feb 14 11:18:15 2014 (r261884) @@ -170,7 +170,7 @@ bcm_mbox_attach(device_t dev) return (ENXIO); } - mtx_init(&sc->lock, "vcio mbox", MTX_DEF, 0); + mtx_init(&sc->lock, "vcio mbox", NULL, MTX_DEF); for (i = 0; i < BCM2835_MBOX_CHANS; i++) { sc->valid[0] = 0; sc->msg[0] = 0; Modified: head/sys/dev/nand/nandbus.c ============================================================================== --- head/sys/dev/nand/nandbus.c Fri Feb 14 10:56:26 2014 (r261883) +++ head/sys/dev/nand/nandbus.c Fri Feb 14 11:18:15 2014 (r261884) @@ -174,7 +174,7 @@ nandbus_attach(device_t dev) nfc = device_get_parent(dev); nfc_sc = device_get_softc(nfc); - mtx_init(&sc->nandbus_mtx, "nandbus lock", MTX_DEF, 0); + mtx_init(&sc->nandbus_mtx, "nandbus lock", NULL, MTX_DEF); cv_init(&sc->nandbus_cv, "nandbus cv"); /* Check each possible CS for existing nand devices */ Modified: head/sys/powerpc/ofw/ofw_real.c ============================================================================== --- head/sys/powerpc/ofw/ofw_real.c Fri Feb 14 10:56:26 2014 (r261883) +++ head/sys/powerpc/ofw/ofw_real.c Fri Feb 14 11:18:15 2014 (r261884) @@ -300,7 +300,7 @@ ofw_real_init(ofw_t ofw, void *openfirm) { openfirmware = (int (*)(void *))openfirm; - mtx_init(&of_bounce_mtx, "OF Bounce Page", MTX_DEF, 0); + mtx_init(&of_bounce_mtx, "OF Bounce Page", NULL, MTX_DEF); of_bounce_virt = NULL; return (0); } From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 12:01:52 2014 Return-Path: Delivered-To: svn-src-all@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 A92C87A0; Fri, 14 Feb 2014 12:01: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 94565102B; Fri, 14 Feb 2014 12:01:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1EC1q3Z014032; Fri, 14 Feb 2014 12:01:52 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1EC1qGk014031; Fri, 14 Feb 2014 12:01:52 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402141201.s1EC1qGk014031@svn.freebsd.org> From: Christian Brueffer Date: Fri, 14 Feb 2014 12:01:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261885 - head/libexec/ftpd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 12:01:52 -0000 Author: brueffer Date: Fri Feb 14 12:01:52 2014 New Revision: 261885 URL: http://svnweb.freebsd.org/changeset/base/261885 Log: In sgetpwnam(), save and free pw_class like all other char members of struct passwd. This fixes spurious "login_getclass: unknown class" errors. PR: 186439 Submitted by: UEMURA Tetsuya MFC after: 1 week Modified: head/libexec/ftpd/ftpd.c Modified: head/libexec/ftpd/ftpd.c ============================================================================== --- head/libexec/ftpd/ftpd.c Fri Feb 14 11:18:15 2014 (r261884) +++ head/libexec/ftpd/ftpd.c Fri Feb 14 12:01:52 2014 (r261885) @@ -965,6 +965,7 @@ sgetpwnam(char *name) if (save.pw_name) { free(save.pw_name); free(save.pw_passwd); + free(save.pw_class); free(save.pw_gecos); free(save.pw_dir); free(save.pw_shell); @@ -972,6 +973,7 @@ sgetpwnam(char *name) save = *p; save.pw_name = sgetsave(p->pw_name); save.pw_passwd = sgetsave(p->pw_passwd); + save.pw_class = sgetsave(p->pw_class); save.pw_gecos = sgetsave(p->pw_gecos); save.pw_dir = sgetsave(p->pw_dir); save.pw_shell = sgetsave(p->pw_shell); From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 14:41:27 2014 Return-Path: Delivered-To: svn-src-all@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 42FA230A; Fri, 14 Feb 2014 14:41: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 291761E26; Fri, 14 Feb 2014 14:41:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1EEfRtC076603; Fri, 14 Feb 2014 14:41:27 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1EEfQhZ076598; Fri, 14 Feb 2014 14:41:26 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201402141441.s1EEfQhZ076598@svn.freebsd.org> From: Julio Merino Date: Fri, 14 Feb 2014 14:41:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r261886 - in vendor/atf/dist: . admin atf-c atf-c++ atf-c++/detail atf-c/detail atf-config atf-report atf-run atf-run/sample atf-run/share atf-sh atf-version bootstrap doc m4 tools tool... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 14:41:27 -0000 Author: jmmv Date: Fri Feb 14 14:41:25 2014 New Revision: 261886 URL: http://svnweb.freebsd.org/changeset/base/261886 Log: Import atf-0.19: Experimental version released on February 7th, 2014. This is the last release to bundle the code for the deprecated tools. The next release will drop their code and will stop worrying about backwards compatibility between the ATF libraries and what the old tools may or may not support. If you still require the old tools for some reason, grab a copy of the 'tools' directory now. The code in this directory is standalone and does not depend on any internal details of atf-c++ any longer. * Various fixes and improvements to support running as part of the FreeBSD test suite. * Project hosting moved from Google Code (as a subproject of Kyua) to GitHub (as a first-class project). The main reason for the change is the suppression of binary downloads in Google Code on Jan 15th, 2014. See https://github.com/jmmv/atf/ * Removed builtin help from atf-sh(1) and atf-check(1) for simplicity reasons. In other words, their -h option is gone. * Moved the code of the deprecated tools into a 'tools' directory and completely decoupled their code from the internals of atf-c++. The reason for this is to painlessly allow a third-party to maintain a copy of these tools after we delete them because upcoming changes to atf-c++ would break the stale tools. Added: vendor/atf/dist/admin/ar-lib (contents, props changed) vendor/atf/dist/atf-c++/detail/version_helper.cpp (contents, props changed) vendor/atf/dist/atf-c/detail/version_helper.c (contents, props changed) vendor/atf/dist/tools/ vendor/atf/dist/tools/Atffile vendor/atf/dist/tools/Kyuafile (contents, props changed) vendor/atf/dist/tools/Makefile.am.inc (contents, props changed) vendor/atf/dist/tools/application.cpp (contents, props changed) vendor/atf/dist/tools/application.hpp vendor/atf/dist/tools/application_test.cpp (contents, props changed) vendor/atf/dist/tools/atf-config.1 (contents, props changed) vendor/atf/dist/tools/atf-config.cpp (contents, props changed) vendor/atf/dist/tools/atf-config_test.sh (contents, props changed) vendor/atf/dist/tools/atf-formats.5 (contents, props changed) vendor/atf/dist/tools/atf-report.1 (contents, props changed) vendor/atf/dist/tools/atf-report.cpp (contents, props changed) vendor/atf/dist/tools/atf-report_test.sh (contents, props changed) vendor/atf/dist/tools/atf-run.1 (contents, props changed) vendor/atf/dist/tools/atf-run.cpp (contents, props changed) vendor/atf/dist/tools/atf-run_test.sh (contents, props changed) vendor/atf/dist/tools/atf-version.1 (contents, props changed) vendor/atf/dist/tools/atf-version.cpp (contents, props changed) vendor/atf/dist/tools/atf.7.in (contents, props changed) vendor/atf/dist/tools/atffile.cpp (contents, props changed) vendor/atf/dist/tools/atffile.hpp vendor/atf/dist/tools/atffile_test.cpp (contents, props changed) vendor/atf/dist/tools/auto_array.hpp vendor/atf/dist/tools/auto_array_test.cpp (contents, props changed) vendor/atf/dist/tools/bad_metadata_helper.c (contents, props changed) vendor/atf/dist/tools/config.cpp (contents, props changed) vendor/atf/dist/tools/config.hpp vendor/atf/dist/tools/config_file.cpp (contents, props changed) vendor/atf/dist/tools/config_file.hpp vendor/atf/dist/tools/config_file_test.cpp (contents, props changed) vendor/atf/dist/tools/config_test.cpp (contents, props changed) vendor/atf/dist/tools/defs.hpp.in (contents, props changed) vendor/atf/dist/tools/env.cpp (contents, props changed) vendor/atf/dist/tools/env.hpp vendor/atf/dist/tools/env_test.cpp (contents, props changed) vendor/atf/dist/tools/exceptions.cpp (contents, props changed) vendor/atf/dist/tools/exceptions.hpp vendor/atf/dist/tools/expand.cpp (contents, props changed) vendor/atf/dist/tools/expand.hpp vendor/atf/dist/tools/expand_test.cpp (contents, props changed) vendor/atf/dist/tools/expect_helpers.c (contents, props changed) vendor/atf/dist/tools/fail_helper.cpp (contents, props changed) vendor/atf/dist/tools/fs.cpp (contents, props changed) vendor/atf/dist/tools/fs.hpp vendor/atf/dist/tools/fs_test.cpp (contents, props changed) vendor/atf/dist/tools/generate-revision.sh (contents, props changed) vendor/atf/dist/tools/io.cpp (contents, props changed) vendor/atf/dist/tools/io.hpp vendor/atf/dist/tools/io_test.cpp (contents, props changed) vendor/atf/dist/tools/misc_helpers.cpp (contents, props changed) vendor/atf/dist/tools/parser.cpp (contents, props changed) vendor/atf/dist/tools/parser.hpp vendor/atf/dist/tools/parser_test.cpp (contents, props changed) vendor/atf/dist/tools/pass_helper.cpp (contents, props changed) vendor/atf/dist/tools/process.cpp (contents, props changed) vendor/atf/dist/tools/process.hpp vendor/atf/dist/tools/process_helpers.c (contents, props changed) vendor/atf/dist/tools/process_test.cpp (contents, props changed) vendor/atf/dist/tools/reader.cpp (contents, props changed) vendor/atf/dist/tools/reader.hpp vendor/atf/dist/tools/reader_test.cpp (contents, props changed) vendor/atf/dist/tools/requirements.cpp (contents, props changed) vendor/atf/dist/tools/requirements.hpp vendor/atf/dist/tools/requirements_test.cpp (contents, props changed) vendor/atf/dist/tools/sample/ vendor/atf/dist/tools/sample/atf-run.hooks vendor/atf/dist/tools/sample/common.conf (contents, props changed) vendor/atf/dist/tools/several_tcs_helper.c (contents, props changed) vendor/atf/dist/tools/share/ vendor/atf/dist/tools/share/atf-run.hooks vendor/atf/dist/tools/signals.cpp (contents, props changed) vendor/atf/dist/tools/signals.hpp vendor/atf/dist/tools/signals_test.cpp (contents, props changed) vendor/atf/dist/tools/test-program.cpp (contents, props changed) vendor/atf/dist/tools/test-program.hpp vendor/atf/dist/tools/test_helpers.hpp vendor/atf/dist/tools/test_program_test.cpp (contents, props changed) vendor/atf/dist/tools/tests-results.css (contents, props changed) vendor/atf/dist/tools/tests-results.dtd vendor/atf/dist/tools/tests-results.xsl (contents, props changed) vendor/atf/dist/tools/text.cpp (contents, props changed) vendor/atf/dist/tools/text.hpp vendor/atf/dist/tools/text_test.cpp (contents, props changed) vendor/atf/dist/tools/timers.cpp (contents, props changed) vendor/atf/dist/tools/timers.hpp vendor/atf/dist/tools/ui.cpp (contents, props changed) vendor/atf/dist/tools/ui.hpp vendor/atf/dist/tools/ui_test.cpp (contents, props changed) vendor/atf/dist/tools/user.cpp (contents, props changed) vendor/atf/dist/tools/user.hpp vendor/atf/dist/tools/user_test.cpp (contents, props changed) vendor/atf/dist/tools/zero_tcs_helper.c (contents, props changed) Deleted: vendor/atf/dist/atf-c++/detail/expand.cpp vendor/atf/dist/atf-c++/detail/expand.hpp vendor/atf/dist/atf-c++/detail/expand_test.cpp vendor/atf/dist/atf-c++/detail/parser.cpp vendor/atf/dist/atf-c++/detail/parser.hpp vendor/atf/dist/atf-c++/detail/parser_test.cpp vendor/atf/dist/atf-c++/detail/ui.cpp vendor/atf/dist/atf-c++/detail/ui.hpp vendor/atf/dist/atf-c++/detail/ui_test.cpp vendor/atf/dist/atf-c++/noncopyable.hpp vendor/atf/dist/atf-config/Atffile vendor/atf/dist/atf-config/Kyuafile vendor/atf/dist/atf-config/Makefile.am.inc vendor/atf/dist/atf-config/atf-config.1 vendor/atf/dist/atf-config/atf-config.cpp vendor/atf/dist/atf-config/integration_test.sh vendor/atf/dist/atf-report/Atffile vendor/atf/dist/atf-report/Kyuafile vendor/atf/dist/atf-report/Makefile.am.inc vendor/atf/dist/atf-report/atf-report.1 vendor/atf/dist/atf-report/atf-report.cpp vendor/atf/dist/atf-report/fail_helper.cpp vendor/atf/dist/atf-report/integration_test.sh vendor/atf/dist/atf-report/misc_helpers.cpp vendor/atf/dist/atf-report/pass_helper.cpp vendor/atf/dist/atf-report/reader.cpp vendor/atf/dist/atf-report/reader.hpp vendor/atf/dist/atf-report/reader_test.cpp vendor/atf/dist/atf-report/tests-results.css vendor/atf/dist/atf-report/tests-results.dtd vendor/atf/dist/atf-report/tests-results.xsl vendor/atf/dist/atf-run/Atffile vendor/atf/dist/atf-run/Kyuafile vendor/atf/dist/atf-run/Makefile.am.inc vendor/atf/dist/atf-run/atf-run.1 vendor/atf/dist/atf-run/atf-run.cpp vendor/atf/dist/atf-run/atffile.cpp vendor/atf/dist/atf-run/atffile.hpp vendor/atf/dist/atf-run/atffile_test.cpp vendor/atf/dist/atf-run/bad_metadata_helper.c vendor/atf/dist/atf-run/config.cpp vendor/atf/dist/atf-run/config.hpp vendor/atf/dist/atf-run/config_test.cpp vendor/atf/dist/atf-run/expect_helpers.c vendor/atf/dist/atf-run/fs.cpp vendor/atf/dist/atf-run/fs.hpp vendor/atf/dist/atf-run/fs_test.cpp vendor/atf/dist/atf-run/integration_test.sh vendor/atf/dist/atf-run/io.cpp vendor/atf/dist/atf-run/io.hpp vendor/atf/dist/atf-run/io_test.cpp vendor/atf/dist/atf-run/misc_helpers.cpp vendor/atf/dist/atf-run/pass_helper.cpp vendor/atf/dist/atf-run/requirements.cpp vendor/atf/dist/atf-run/requirements.hpp vendor/atf/dist/atf-run/requirements_test.cpp vendor/atf/dist/atf-run/sample/atf-run.hooks vendor/atf/dist/atf-run/sample/common.conf vendor/atf/dist/atf-run/several_tcs_helper.c vendor/atf/dist/atf-run/share/atf-run.hooks vendor/atf/dist/atf-run/signals.cpp vendor/atf/dist/atf-run/signals.hpp vendor/atf/dist/atf-run/signals_test.cpp vendor/atf/dist/atf-run/test-program.cpp vendor/atf/dist/atf-run/test-program.hpp vendor/atf/dist/atf-run/test_program_test.cpp vendor/atf/dist/atf-run/timer.cpp vendor/atf/dist/atf-run/timer.hpp vendor/atf/dist/atf-run/user.cpp vendor/atf/dist/atf-run/user.hpp vendor/atf/dist/atf-run/user_test.cpp vendor/atf/dist/atf-run/zero_tcs_helper.c vendor/atf/dist/atf-version/Makefile.am.inc vendor/atf/dist/atf-version/atf-version.1 vendor/atf/dist/atf-version/atf-version.cpp vendor/atf/dist/atf-version/generate-revision.sh vendor/atf/dist/doc/atf-formats.5 vendor/atf/dist/doc/atf.7.in vendor/atf/dist/m4/module-sanity.m4 Modified: vendor/atf/dist/Atffile vendor/atf/dist/Kyuafile vendor/atf/dist/Makefile.am vendor/atf/dist/Makefile.in vendor/atf/dist/NEWS vendor/atf/dist/aclocal.m4 vendor/atf/dist/admin/check-style.sh vendor/atf/dist/atf-c++/Makefile.am.inc vendor/atf/dist/atf-c++/check.hpp vendor/atf/dist/atf-c++/check_test.cpp vendor/atf/dist/atf-c++/config.cpp vendor/atf/dist/atf-c++/config_test.cpp vendor/atf/dist/atf-c++/detail/Atffile vendor/atf/dist/atf-c++/detail/Kyuafile vendor/atf/dist/atf-c++/detail/Makefile.am.inc vendor/atf/dist/atf-c++/detail/application.cpp vendor/atf/dist/atf-c++/detail/application.hpp vendor/atf/dist/atf-c++/detail/application_test.cpp vendor/atf/dist/atf-c++/detail/exceptions.hpp vendor/atf/dist/atf-c++/detail/process_test.cpp vendor/atf/dist/atf-c++/detail/test_helpers.cpp vendor/atf/dist/atf-c++/detail/test_helpers.hpp vendor/atf/dist/atf-c++/macros_test.cpp vendor/atf/dist/atf-c++/pkg_config_test.sh vendor/atf/dist/atf-c++/tests.cpp vendor/atf/dist/atf-c++/tests.hpp vendor/atf/dist/atf-c++/tests_test.cpp vendor/atf/dist/atf-c/Makefile.am.inc vendor/atf/dist/atf-c/config.c vendor/atf/dist/atf-c/config_test.c vendor/atf/dist/atf-c/detail/Makefile.am.inc vendor/atf/dist/atf-c/detail/test_helpers.c vendor/atf/dist/atf-c/detail/test_helpers.h vendor/atf/dist/atf-c/macros_test.c vendor/atf/dist/atf-c/pkg_config_test.sh vendor/atf/dist/atf-sh/atf-check.cpp vendor/atf/dist/atf-sh/atf-sh.cpp vendor/atf/dist/atf-sh/integration_test.sh vendor/atf/dist/bconfig.h.in vendor/atf/dist/bootstrap/Makefile.am.inc vendor/atf/dist/bootstrap/h_app_empty.cpp vendor/atf/dist/bootstrap/h_app_opts_args.cpp vendor/atf/dist/bootstrap/package.m4 vendor/atf/dist/bootstrap/testsuite vendor/atf/dist/bootstrap/testsuite.at vendor/atf/dist/configure vendor/atf/dist/configure.ac vendor/atf/dist/doc/Makefile.am.inc vendor/atf/dist/doc/atf-test-case.4 vendor/atf/dist/m4/cxx-std-funcs.m4 vendor/atf/dist/m4/module-env.m4 vendor/atf/dist/m4/module-fs.m4 Modified: vendor/atf/dist/Atffile ============================================================================== --- vendor/atf/dist/Atffile Fri Feb 14 12:01:52 2014 (r261885) +++ vendor/atf/dist/Atffile Fri Feb 14 14:41:25 2014 (r261886) @@ -7,6 +7,4 @@ tp: atf-c++ tp: atf-sh tp: test-programs -tp-glob: atf-config* -tp-glob: atf-report* -tp-glob: atf-run* +tp-glob: tools* Modified: vendor/atf/dist/Kyuafile ============================================================================== --- vendor/atf/dist/Kyuafile Fri Feb 14 12:01:52 2014 (r261885) +++ vendor/atf/dist/Kyuafile Fri Feb 14 14:41:25 2014 (r261886) @@ -7,12 +7,6 @@ include("atf-c++/Kyuafile") include("atf-sh/Kyuafile") include("test-programs/Kyuafile") -if fs.exists("atf-config/Kyuafile") then - include("atf-config/Kyuafile") -end -if fs.exists("atf-report/Kyuafile") then - include("atf-report/Kyuafile") -end -if fs.exists("atf-run/Kyuafile") then - include("atf-run/Kyuafile") +if fs.exists("tools/Kyuafile") then + include("tools/Kyuafile") end Modified: vendor/atf/dist/Makefile.am ============================================================================== --- vendor/atf/dist/Makefile.am Fri Feb 14 12:01:52 2014 (r261885) +++ vendor/atf/dist/Makefile.am Fri Feb 14 14:41:25 2014 (r261886) @@ -30,6 +30,7 @@ atf_aclocal_DATA = BUILT_SOURCES = CLEANFILES = +DIST_HOOKS = EXTRA_DIST = bin_PROGRAMS = dist_man_MANS = @@ -54,10 +55,7 @@ include doc/Makefile.am.inc include test-programs/Makefile.am.inc if ENABLE_TOOLS -include atf-report/Makefile.am.inc -include atf-config/Makefile.am.inc -include atf-run/Makefile.am.inc -include atf-version/Makefile.am.inc +include tools/Makefile.am.inc endif # @@ -126,7 +124,7 @@ BUILD_SH_TP = \ # Custom targets. # -dist-hook: forbid-dist +DIST_HOOKS += forbid-dist if ENABLE_TOOLS forbid-dist: @true @@ -151,4 +149,6 @@ release-test: .PHONY: $(PHONY_TARGETS) +dist-hook: $(DIST_HOOKS) + # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 Modified: vendor/atf/dist/Makefile.in ============================================================================== --- vendor/atf/dist/Makefile.in Fri Feb 14 12:01:52 2014 (r261885) +++ vendor/atf/dist/Makefile.in Fri Feb 14 14:41:25 2014 (r261886) @@ -333,92 +333,6 @@ # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007 The NetBSD Foundation, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. -# - -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007 The NetBSD Foundation, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. -# - -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007 The NetBSD Foundation, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. -# @@ -500,17 +414,15 @@ DIST_COMMON = $(srcdir)/admin/Makefile.a $(srcdir)/bootstrap/Makefile.am.inc \ $(srcdir)/doc/Makefile.am.inc \ $(srcdir)/test-programs/Makefile.am.inc \ - $(srcdir)/atf-report/Makefile.am.inc \ - $(srcdir)/atf-config/Makefile.am.inc \ - $(srcdir)/atf-run/Makefile.am.inc \ - $(srcdir)/atf-version/Makefile.am.inc $(srcdir)/Makefile.in \ + $(srcdir)/tools/Makefile.am.inc $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(srcdir)/bconfig.h.in \ - $(top_srcdir)/atf-c/defs.h.in $(top_srcdir)/admin/depcomp \ - $(dist_man_MANS) $(atf_c_HEADERS) $(atf_c___HEADERS) \ - $(include_HEADERS) AUTHORS COPYING INSTALL NEWS README \ - admin/compile admin/config.guess admin/config.sub \ - admin/depcomp admin/install-sh admin/missing admin/ltmain.sh \ + $(top_srcdir)/atf-c/defs.h.in $(top_srcdir)/tools/defs.hpp.in \ + $(top_srcdir)/admin/depcomp $(dist_man_MANS) $(atf_c_HEADERS) \ + $(atf_c___HEADERS) $(include_HEADERS) AUTHORS COPYING INSTALL \ + NEWS README admin/ar-lib admin/compile admin/config.guess \ + admin/config.sub admin/depcomp admin/install-sh admin/missing \ + admin/ltmain.sh $(top_srcdir)/admin/ar-lib \ $(top_srcdir)/admin/compile $(top_srcdir)/admin/config.guess \ $(top_srcdir)/admin/config.sub $(top_srcdir)/admin/install-sh \ $(top_srcdir)/admin/ltmain.sh $(top_srcdir)/admin/missing @@ -526,7 +438,8 @@ tests_atf_c_detail_PROGRAMS = atf-c/deta atf-c/detail/process_test$(EXEEXT) \ atf-c/detail/sanity_test$(EXEEXT) \ atf-c/detail/text_test$(EXEEXT) \ - atf-c/detail/user_test$(EXEEXT) + atf-c/detail/user_test$(EXEEXT) \ + atf-c/detail/version_helper$(EXEEXT) tests_atf_c___PROGRAMS = atf-c++/atf_c++_test$(EXEEXT) \ atf-c++/build_test$(EXEEXT) atf-c++/check_test$(EXEEXT) \ atf-c++/config_test$(EXEEXT) atf-c++/macros_test$(EXEEXT) \ @@ -536,69 +449,72 @@ tests_atf_c___detail_PROGRAMS = \ atf-c++/detail/auto_array_test$(EXEEXT) \ atf-c++/detail/env_test$(EXEEXT) \ atf-c++/detail/exceptions_test$(EXEEXT) \ - atf-c++/detail/expand_test$(EXEEXT) \ atf-c++/detail/fs_test$(EXEEXT) \ - atf-c++/detail/parser_test$(EXEEXT) \ atf-c++/detail/process_test$(EXEEXT) \ atf-c++/detail/sanity_test$(EXEEXT) \ atf-c++/detail/text_test$(EXEEXT) \ - atf-c++/detail/ui_test$(EXEEXT) + atf-c++/detail/version_helper$(EXEEXT) check_PROGRAMS = bootstrap/h_app_empty$(EXEEXT) \ bootstrap/h_app_opts_args$(EXEEXT) \ bootstrap/h_tp_basic_c$(EXEEXT) \ bootstrap/h_tp_basic_cpp$(EXEEXT) -@ENABLE_TOOLS_TRUE@am__append_1 = doc/atf.7 -@ENABLE_TOOLS_TRUE@am__append_2 = doc/atf.7 -@ENABLE_TOOLS_TRUE@am__append_3 = doc/atf.7.in -@ENABLE_TOOLS_TRUE@am__append_4 = doc/atf-formats.5 \ -@ENABLE_TOOLS_TRUE@ atf-report/atf-report.1 \ -@ENABLE_TOOLS_TRUE@ atf-config/atf-config.1 atf-run/atf-run.1 \ -@ENABLE_TOOLS_TRUE@ atf-version/atf-version.1 tests_test_programs_PROGRAMS = test-programs/c_helpers$(EXEEXT) \ test-programs/cpp_helpers$(EXEEXT) -@ENABLE_TOOLS_TRUE@am__append_5 = atf-report/atf-report \ -@ENABLE_TOOLS_TRUE@ atf-config/atf-config atf-run/atf-run \ -@ENABLE_TOOLS_TRUE@ atf-version/atf-version -@ENABLE_TOOLS_TRUE@am__append_6 = $(css_DATA) $(dtd_DATA) $(xsl_DATA) \ -@ENABLE_TOOLS_TRUE@ $(tests_atf_report_DATA) \ -@ENABLE_TOOLS_TRUE@ atf-report/integration_test.sh \ -@ENABLE_TOOLS_TRUE@ $(tests_atf_config_DATA) \ -@ENABLE_TOOLS_TRUE@ atf-config/integration_test.sh \ -@ENABLE_TOOLS_TRUE@ $(tests_atf_run_DATA) \ -@ENABLE_TOOLS_TRUE@ atf-run/integration_test.sh $(hooks_DATA) \ -@ENABLE_TOOLS_TRUE@ $(eg_DATA) atf-version/generate-revision.sh -@ENABLE_TOOLS_TRUE@tests_atf_report_PROGRAMS = \ -@ENABLE_TOOLS_TRUE@ atf-report/fail_helper$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-report/misc_helpers$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-report/pass_helper$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-report/reader_test$(EXEEXT) -@ENABLE_TOOLS_TRUE@am__append_7 = atf-report/integration_test \ -@ENABLE_TOOLS_TRUE@ atf-config/integration_test \ -@ENABLE_TOOLS_TRUE@ atf-run/integration_test \ -@ENABLE_TOOLS_TRUE@ atf-version/revision.h \ -@ENABLE_TOOLS_TRUE@ atf-version/revision.h.stamp \ -@ENABLE_TOOLS_TRUE@ installcheck.fifo installcheck.log -@ENABLE_TOOLS_TRUE@tests_atf_run_PROGRAMS = \ -@ENABLE_TOOLS_TRUE@ atf-run/atffile_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/bad_metadata_helper$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/config_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/expect_helpers$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/fs_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/io_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/misc_helpers$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/pass_helper$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/several_tcs_helper$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/requirements_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/signals_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/test_program_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/user_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/zero_tcs_helper$(EXEEXT) -@ENABLE_TOOLS_TRUE@am__append_8 = atf-version/revision.h -@ENABLE_TOOLS_TRUE@am__append_9 = atf-version/revision.h.stamp \ + +# XXX For some reason, the nodist line above does not work as expected. +# Work this problem around. +@ENABLE_TOOLS_TRUE@am__append_1 = kill-defs-hpp +@ENABLE_TOOLS_TRUE@am__append_2 = tools/atf-config tools/atf-report \ +@ENABLE_TOOLS_TRUE@ tools/atf-run tools/atf-version +@ENABLE_TOOLS_TRUE@am__append_3 = tools/atf-config.1 \ +@ENABLE_TOOLS_TRUE@ tools/atf-report.1 tools/atf-run.1 \ +@ENABLE_TOOLS_TRUE@ tools/atf-version.1 tools/atf-formats.5 +@ENABLE_TOOLS_TRUE@am__append_4 = tools/generate-revision.sh \ +@ENABLE_TOOLS_TRUE@ tools/atf.7.in $(css_DATA) $(dtd_DATA) \ +@ENABLE_TOOLS_TRUE@ $(eg_DATA) $(hooks_DATA) $(xsl_DATA) \ +@ENABLE_TOOLS_TRUE@ $(tests_tools_DATA) \ +@ENABLE_TOOLS_TRUE@ tools/atf-config_test.sh \ +@ENABLE_TOOLS_TRUE@ tools/atf-report_test.sh \ +@ENABLE_TOOLS_TRUE@ tools/atf-run_test.sh +@ENABLE_TOOLS_TRUE@am__append_5 = tools/revision.h +@ENABLE_TOOLS_TRUE@am__append_6 = tools/revision.h \ +@ENABLE_TOOLS_TRUE@ tools/revision.h.stamp tools/atf.7 \ +@ENABLE_TOOLS_TRUE@ tools/atf-config_test tools/atf-report_test \ +@ENABLE_TOOLS_TRUE@ tools/atf-run_test installcheck.fifo \ +@ENABLE_TOOLS_TRUE@ installcheck.log +@ENABLE_TOOLS_TRUE@am__append_7 = tools/revision.h.stamp \ @ENABLE_TOOLS_TRUE@ installcheck-atf -@ENABLE_TOOLS_TRUE@am__append_10 = installcheck-atf -@ENABLE_TOOLS_FALSE@@HAVE_KYUA_TRUE@am__append_11 = installcheck-kyua -@ENABLE_TOOLS_TRUE@am__append_12 = Atffile +@ENABLE_TOOLS_TRUE@am__append_8 = tools/atf.7 +@ENABLE_TOOLS_TRUE@tests_tools_PROGRAMS = \ +@ENABLE_TOOLS_TRUE@ tools/application_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/atffile_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/auto_array_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/bad_metadata_helper$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/config_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/config_file_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/env_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/expand_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/expect_helpers$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/fail_helper$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/fs_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/io_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/misc_helpers$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/parser_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/process_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/pass_helper$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/process_helpers$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/reader_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/requirements_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/several_tcs_helper$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/signals_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/test_program_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/text_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/ui_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/user_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/zero_tcs_helper$(EXEEXT) +@ENABLE_TOOLS_TRUE@am__append_9 = installcheck-atf +@ENABLE_TOOLS_FALSE@@HAVE_KYUA_TRUE@am__append_10 = installcheck-kyua +@ENABLE_TOOLS_TRUE@am__append_11 = Atffile subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/compiler-flags.m4 \ @@ -609,7 +525,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/c $(top_srcdir)/m4/module-application.m4 \ $(top_srcdir)/m4/module-defs.m4 $(top_srcdir)/m4/module-env.m4 \ $(top_srcdir)/m4/module-fs.m4 \ - $(top_srcdir)/m4/module-sanity.m4 \ $(top_srcdir)/m4/module-signals.m4 \ $(top_srcdir)/m4/runtime-tool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -618,8 +533,52 @@ am__CONFIG_DISTCLEAN_FILES = config.stat configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = bconfig.h -CONFIG_CLEAN_FILES = atf-c/defs.h +CONFIG_CLEAN_FILES = atf-c/defs.h tools/defs.hpp CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +tools_libtools_a_AR = $(AR) $(ARFLAGS) +tools_libtools_a_LIBADD = +am__tools_libtools_a_SOURCES_DIST = tools/application.cpp \ + tools/application.hpp tools/atffile.cpp tools/atffile.hpp \ + tools/auto_array.hpp tools/config.cpp tools/config.hpp \ + tools/config_file.cpp tools/config_file.hpp tools/env.cpp \ + tools/env.hpp tools/exceptions.cpp tools/exceptions.hpp \ + tools/expand.cpp tools/expand.hpp tools/fs.cpp tools/fs.hpp \ + tools/io.cpp tools/io.hpp tools/parser.cpp tools/parser.hpp \ + tools/process.cpp tools/process.hpp tools/reader.cpp \ + tools/reader.hpp tools/requirements.cpp tools/requirements.hpp \ + tools/signals.cpp tools/signals.hpp tools/test-program.cpp \ + tools/test-program.hpp tools/test_helpers.hpp tools/text.cpp \ + tools/text.hpp tools/timers.cpp tools/timers.hpp tools/ui.cpp \ + tools/ui.hpp tools/user.cpp tools/user.hpp +am__dirstamp = $(am__leading_dot)dirstamp +@ENABLE_TOOLS_TRUE@am_tools_libtools_a_OBJECTS = tools/tools_libtools_a-application.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-atffile.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-config.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-config_file.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-env.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-exceptions.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-expand.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-fs.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-io.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-parser.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-process.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-reader.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-requirements.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-signals.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-test-program.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-text.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-timers.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-ui.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-user.$(OBJEXT) +nodist_tools_libtools_a_OBJECTS = +tools_libtools_a_OBJECTS = $(am_tools_libtools_a_OBJECTS) \ + $(nodist_tools_libtools_a_OBJECTS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -652,14 +611,11 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(tests_atf_c__dir)" \ "$(DESTDIR)$(tests_atf_c___detaildir)" \ "$(DESTDIR)$(tests_atf_c_detaildir)" \ - "$(DESTDIR)$(tests_atf_reportdir)" \ - "$(DESTDIR)$(tests_atf_rundir)" \ "$(DESTDIR)$(tests_test_programsdir)" \ - "$(DESTDIR)$(tests_atf_cdir)" "$(DESTDIR)$(tests_atf_c__dir)" \ - "$(DESTDIR)$(tests_atf_configdir)" \ - "$(DESTDIR)$(tests_atf_reportdir)" \ - "$(DESTDIR)$(tests_atf_rundir)" "$(DESTDIR)$(tests_atf_shdir)" \ - "$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(man1dir)" \ + "$(DESTDIR)$(tests_toolsdir)" "$(DESTDIR)$(tests_atf_cdir)" \ + "$(DESTDIR)$(tests_atf_c__dir)" "$(DESTDIR)$(tests_atf_shdir)" \ + "$(DESTDIR)$(tests_test_programsdir)" \ + "$(DESTDIR)$(tests_toolsdir)" "$(DESTDIR)$(man1dir)" \ "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man4dir)" \ "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man7dir)" \ "$(DESTDIR)$(atf_aclocaldir)" \ @@ -672,15 +628,13 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(tests_atf_c__dir)" \ "$(DESTDIR)$(tests_atf_c___detaildir)" \ "$(DESTDIR)$(tests_atf_c_detaildir)" \ - "$(DESTDIR)$(tests_atf_configdir)" \ - "$(DESTDIR)$(tests_atf_reportdir)" \ - "$(DESTDIR)$(tests_atf_rundir)" "$(DESTDIR)$(tests_atf_shdir)" \ - "$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(xsldir)" \ + "$(DESTDIR)$(tests_atf_shdir)" \ + "$(DESTDIR)$(tests_test_programsdir)" \ + "$(DESTDIR)$(tests_toolsdir)" "$(DESTDIR)$(xsldir)" \ "$(DESTDIR)$(atf_cdir)" "$(DESTDIR)$(atf_c__dir)" \ "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) atf_c___detail_libtest_helpers_la_LIBADD = -am__dirstamp = $(am__leading_dot)dirstamp am_atf_c___detail_libtest_helpers_la_OBJECTS = \ atf-c++/detail/test_helpers.lo atf_c___detail_libtest_helpers_la_OBJECTS = \ @@ -698,10 +652,8 @@ libatf_c___la_DEPENDENCIES = libatf-c.la am_libatf_c___la_OBJECTS = atf-c++/build.lo atf-c++/check.lo \ atf-c++/config.lo atf-c++/tests.lo atf-c++/utils.lo \ atf-c++/detail/application.lo atf-c++/detail/env.lo \ - atf-c++/detail/exceptions.lo atf-c++/detail/expand.lo \ - atf-c++/detail/fs.lo atf-c++/detail/parser.lo \ - atf-c++/detail/process.lo atf-c++/detail/text.lo \ - atf-c++/detail/ui.lo + atf-c++/detail/exceptions.lo atf-c++/detail/fs.lo \ + atf-c++/detail/process.lo atf-c++/detail/text.lo libatf_c___la_OBJECTS = $(am_libatf_c___la_OBJECTS) libatf_c___la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ @@ -727,14 +679,14 @@ libatf_c_la_OBJECTS = $(am_libatf_c_la_O libatf_c_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libatf_c_la_LDFLAGS) $(LDFLAGS) -o $@ -@ENABLE_TOOLS_TRUE@am__EXEEXT_1 = atf-report/atf-report$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-config/atf-config$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf-run$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-version/atf-version$(EXEEXT) +@ENABLE_TOOLS_TRUE@am__EXEEXT_1 = tools/atf-config$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/atf-report$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/atf-run$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/atf-version$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) $(tests_atf_c_PROGRAMS) \ $(tests_atf_c___PROGRAMS) $(tests_atf_c___detail_PROGRAMS) \ - $(tests_atf_c_detail_PROGRAMS) $(tests_atf_report_PROGRAMS) \ - $(tests_atf_run_PROGRAMS) $(tests_test_programs_PROGRAMS) + $(tests_atf_c_detail_PROGRAMS) $(tests_test_programs_PROGRAMS) \ + $(tests_tools_PROGRAMS) am_atf_c___atf_c___test_OBJECTS = atf-c++/atf_c++_test.$(OBJEXT) atf_c___atf_c___test_OBJECTS = $(am_atf_c___atf_c___test_OBJECTS) atf_c___atf_c___test_DEPENDENCIES = atf-c++/detail/libtest_helpers.la \ @@ -775,22 +727,10 @@ atf_c___detail_exceptions_test_OBJECTS = $(am_atf_c___detail_exceptions_test_OBJECTS) atf_c___detail_exceptions_test_DEPENDENCIES = \ atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) -am_atf_c___detail_expand_test_OBJECTS = \ - atf-c++/detail/expand_test.$(OBJEXT) -atf_c___detail_expand_test_OBJECTS = \ - $(am_atf_c___detail_expand_test_OBJECTS) -atf_c___detail_expand_test_DEPENDENCIES = \ - atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) am_atf_c___detail_fs_test_OBJECTS = atf-c++/detail/fs_test.$(OBJEXT) atf_c___detail_fs_test_OBJECTS = $(am_atf_c___detail_fs_test_OBJECTS) atf_c___detail_fs_test_DEPENDENCIES = \ atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) -am_atf_c___detail_parser_test_OBJECTS = \ - atf-c++/detail/parser_test.$(OBJEXT) -atf_c___detail_parser_test_OBJECTS = \ - $(am_atf_c___detail_parser_test_OBJECTS) -atf_c___detail_parser_test_DEPENDENCIES = \ - atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) am_atf_c___detail_process_test_OBJECTS = \ atf-c++/detail/process_test.$(OBJEXT) atf_c___detail_process_test_OBJECTS = \ @@ -809,10 +749,11 @@ atf_c___detail_text_test_OBJECTS = \ $(am_atf_c___detail_text_test_OBJECTS) atf_c___detail_text_test_DEPENDENCIES = \ atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) -am_atf_c___detail_ui_test_OBJECTS = atf-c++/detail/ui_test.$(OBJEXT) -atf_c___detail_ui_test_OBJECTS = $(am_atf_c___detail_ui_test_OBJECTS) -atf_c___detail_ui_test_DEPENDENCIES = \ - atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) +am_atf_c___detail_version_helper_OBJECTS = \ + atf-c++/detail/version_helper.$(OBJEXT) +atf_c___detail_version_helper_OBJECTS = \ + $(am_atf_c___detail_version_helper_OBJECTS) +atf_c___detail_version_helper_LDADD = $(LDADD) am_atf_c___macros_test_OBJECTS = atf-c++/macros_test.$(OBJEXT) atf_c___macros_test_OBJECTS = $(am_atf_c___macros_test_OBJECTS) atf_c___macros_test_DEPENDENCIES = atf-c++/detail/libtest_helpers.la \ @@ -888,6 +829,11 @@ am_atf_c_detail_user_test_OBJECTS = atf- atf_c_detail_user_test_OBJECTS = $(am_atf_c_detail_user_test_OBJECTS) atf_c_detail_user_test_DEPENDENCIES = atf-c/detail/libtest_helpers.la \ libatf-c.la +am_atf_c_detail_version_helper_OBJECTS = \ + atf-c/detail/version_helper.$(OBJEXT) +atf_c_detail_version_helper_OBJECTS = \ + $(am_atf_c_detail_version_helper_OBJECTS) +atf_c_detail_version_helper_LDADD = $(LDADD) am_atf_c_error_test_OBJECTS = atf-c/error_test.$(OBJEXT) atf_c_error_test_OBJECTS = $(am_atf_c_error_test_OBJECTS) atf_c_error_test_DEPENDENCIES = atf-c/detail/libtest_helpers.la \ @@ -908,206 +854,21 @@ am_atf_c_utils_test_OBJECTS = atf-c/util atf_c_utils_test_OBJECTS = $(am_atf_c_utils_test_OBJECTS) atf_c_utils_test_DEPENDENCIES = atf-c/detail/libtest_helpers.la \ libatf-c.la -am__atf_config_atf_config_SOURCES_DIST = atf-config/atf-config.cpp -@ENABLE_TOOLS_TRUE@am_atf_config_atf_config_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-config/atf-config.$(OBJEXT) -atf_config_atf_config_OBJECTS = $(am_atf_config_atf_config_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_config_atf_config_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__atf_report_atf_report_SOURCES_DIST = atf-report/atf-report.cpp \ - atf-report/reader.cpp atf-report/reader.hpp -@ENABLE_TOOLS_TRUE@am_atf_report_atf_report_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-report/atf-report.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-report/reader.$(OBJEXT) -atf_report_atf_report_OBJECTS = $(am_atf_report_atf_report_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_report_atf_report_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__atf_report_fail_helper_SOURCES_DIST = atf-report/fail_helper.cpp -@ENABLE_TOOLS_TRUE@am_atf_report_fail_helper_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-report/fail_helper.$(OBJEXT) -atf_report_fail_helper_OBJECTS = $(am_atf_report_fail_helper_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_report_fail_helper_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__atf_report_misc_helpers_SOURCES_DIST = \ - atf-report/misc_helpers.cpp -@ENABLE_TOOLS_TRUE@am_atf_report_misc_helpers_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-report/misc_helpers.$(OBJEXT) -atf_report_misc_helpers_OBJECTS = \ - $(am_atf_report_misc_helpers_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_report_misc_helpers_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__atf_report_pass_helper_SOURCES_DIST = atf-report/pass_helper.cpp -@ENABLE_TOOLS_TRUE@am_atf_report_pass_helper_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-report/pass_helper.$(OBJEXT) -atf_report_pass_helper_OBJECTS = $(am_atf_report_pass_helper_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_report_pass_helper_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__atf_report_reader_test_SOURCES_DIST = atf-report/reader_test.cpp \ - atf-report/reader.cpp -@ENABLE_TOOLS_TRUE@am_atf_report_reader_test_OBJECTS = atf-report/atf_report_reader_test-reader_test.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-report/atf_report_reader_test-reader.$(OBJEXT) -atf_report_reader_test_OBJECTS = $(am_atf_report_reader_test_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_report_reader_test_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ atf-c++/detail/libtest_helpers.la \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__atf_run_atf_run_SOURCES_DIST = atf-run/atf-run.cpp \ - atf-run/atffile.cpp atf-run/atffile.hpp atf-run/config.cpp \ - atf-run/config.hpp atf-run/fs.cpp atf-run/fs.hpp \ - atf-run/io.cpp atf-run/io.hpp atf-run/requirements.cpp \ - atf-run/requirements.hpp atf-run/signals.cpp \ - atf-run/signals.hpp atf-run/test-program.cpp \ - atf-run/test-program.hpp atf-run/timer.cpp atf-run/timer.hpp \ - atf-run/user.cpp atf-run/user.hpp -@ENABLE_TOOLS_TRUE@am_atf_run_atf_run_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_atf_run-atf-run.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_atf_run-atffile.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_atf_run-config.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_atf_run-fs.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_atf_run-io.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_atf_run-requirements.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_atf_run-signals.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_atf_run-test-program.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_atf_run-timer.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_atf_run-user.$(OBJEXT) -atf_run_atf_run_OBJECTS = $(am_atf_run_atf_run_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_atf_run_DEPENDENCIES = $(ATF_CXX_LIBS) -am__atf_run_atffile_test_SOURCES_DIST = atf-run/atffile_test.cpp \ - atf-run/atffile.cpp -@ENABLE_TOOLS_TRUE@am_atf_run_atffile_test_OBJECTS = atf-run/atf_run_atffile_test-atffile_test.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_atffile_test-atffile.$(OBJEXT) -atf_run_atffile_test_OBJECTS = $(am_atf_run_atffile_test_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_atffile_test_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ atf-c++/detail/libtest_helpers.la \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__atf_run_bad_metadata_helper_SOURCES_DIST = \ - atf-run/bad_metadata_helper.c -@ENABLE_TOOLS_TRUE@am_atf_run_bad_metadata_helper_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-run/bad_metadata_helper.$(OBJEXT) -atf_run_bad_metadata_helper_OBJECTS = \ - $(am_atf_run_bad_metadata_helper_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_bad_metadata_helper_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ libatf-c.la -am__atf_run_config_test_SOURCES_DIST = atf-run/config_test.cpp \ - atf-run/config.cpp -@ENABLE_TOOLS_TRUE@am_atf_run_config_test_OBJECTS = atf-run/atf_run_config_test-config_test.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_config_test-config.$(OBJEXT) -atf_run_config_test_OBJECTS = $(am_atf_run_config_test_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_config_test_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ atf-c++/detail/libtest_helpers.la \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__atf_run_expect_helpers_SOURCES_DIST = atf-run/expect_helpers.c -@ENABLE_TOOLS_TRUE@am_atf_run_expect_helpers_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-run/expect_helpers.$(OBJEXT) -atf_run_expect_helpers_OBJECTS = $(am_atf_run_expect_helpers_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_expect_helpers_DEPENDENCIES = libatf-c.la -am__atf_run_fs_test_SOURCES_DIST = atf-run/fs_test.cpp atf-run/fs.cpp \ - atf-run/user.cpp -@ENABLE_TOOLS_TRUE@am_atf_run_fs_test_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-run/fs_test.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/fs.$(OBJEXT) atf-run/user.$(OBJEXT) -atf_run_fs_test_OBJECTS = $(am_atf_run_fs_test_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_fs_test_DEPENDENCIES = $(ATF_CXX_LIBS) -am__atf_run_io_test_SOURCES_DIST = atf-run/io_test.cpp atf-run/io.cpp \ - atf-run/signals.cpp -@ENABLE_TOOLS_TRUE@am_atf_run_io_test_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-run/io_test.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/io.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/signals.$(OBJEXT) -atf_run_io_test_OBJECTS = $(am_atf_run_io_test_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_io_test_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ atf-c++/detail/libtest_helpers.la \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__atf_run_misc_helpers_SOURCES_DIST = atf-run/misc_helpers.cpp -@ENABLE_TOOLS_TRUE@am_atf_run_misc_helpers_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-run/misc_helpers.$(OBJEXT) -atf_run_misc_helpers_OBJECTS = $(am_atf_run_misc_helpers_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_misc_helpers_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__atf_run_pass_helper_SOURCES_DIST = atf-run/pass_helper.cpp -@ENABLE_TOOLS_TRUE@am_atf_run_pass_helper_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-run/pass_helper.$(OBJEXT) -atf_run_pass_helper_OBJECTS = $(am_atf_run_pass_helper_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_pass_helper_DEPENDENCIES = $(ATF_CXX_LIBS) -am__atf_run_requirements_test_SOURCES_DIST = \ - atf-run/requirements_test.cpp atf-run/requirements.cpp \ - atf-run/user.cpp -@ENABLE_TOOLS_TRUE@am_atf_run_requirements_test_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-run/requirements_test.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/requirements.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/user.$(OBJEXT) -atf_run_requirements_test_OBJECTS = \ - $(am_atf_run_requirements_test_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_requirements_test_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__atf_run_several_tcs_helper_SOURCES_DIST = \ - atf-run/several_tcs_helper.c -@ENABLE_TOOLS_TRUE@am_atf_run_several_tcs_helper_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-run/several_tcs_helper.$(OBJEXT) -atf_run_several_tcs_helper_OBJECTS = \ - $(am_atf_run_several_tcs_helper_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_several_tcs_helper_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ libatf-c.la -am__atf_run_signals_test_SOURCES_DIST = atf-run/signals_test.cpp \ - atf-run/signals.cpp -@ENABLE_TOOLS_TRUE@am_atf_run_signals_test_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-run/signals_test.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/signals.$(OBJEXT) -atf_run_signals_test_OBJECTS = $(am_atf_run_signals_test_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_signals_test_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__atf_run_test_program_test_SOURCES_DIST = \ - atf-run/test_program_test.cpp atf-run/fs.cpp atf-run/io.cpp \ - atf-run/requirements.cpp atf-run/signals.cpp \ - atf-run/test-program.cpp atf-run/timer.cpp atf-run/user.cpp -@ENABLE_TOOLS_TRUE@am_atf_run_test_program_test_OBJECTS = atf-run/atf_run_test_program_test-test_program_test.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_test_program_test-fs.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_test_program_test-io.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_test_program_test-requirements.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_test_program_test-signals.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_test_program_test-test-program.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_test_program_test-timer.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_test_program_test-user.$(OBJEXT) -atf_run_test_program_test_OBJECTS = \ - $(am_atf_run_test_program_test_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_test_program_test_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ atf-c++/detail/libtest_helpers.la \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__atf_run_user_test_SOURCES_DIST = atf-run/user_test.cpp \ - atf-run/user.cpp -@ENABLE_TOOLS_TRUE@am_atf_run_user_test_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-run/user_test.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/user.$(OBJEXT) -atf_run_user_test_OBJECTS = $(am_atf_run_user_test_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_user_test_DEPENDENCIES = $(ATF_CXX_LIBS) -am__atf_run_zero_tcs_helper_SOURCES_DIST = atf-run/zero_tcs_helper.c -@ENABLE_TOOLS_TRUE@am_atf_run_zero_tcs_helper_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-run/zero_tcs_helper.$(OBJEXT) -atf_run_zero_tcs_helper_OBJECTS = \ - $(am_atf_run_zero_tcs_helper_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_zero_tcs_helper_DEPENDENCIES = libatf-c.la am_atf_sh_atf_check_OBJECTS = atf-sh/atf-check.$(OBJEXT) atf_sh_atf_check_OBJECTS = $(am_atf_sh_atf_check_OBJECTS) atf_sh_atf_check_DEPENDENCIES = $(ATF_CXX_LIBS) am_atf_sh_atf_sh_OBJECTS = atf-sh/atf-sh.$(OBJEXT) atf_sh_atf_sh_OBJECTS = $(am_atf_sh_atf_sh_OBJECTS) atf_sh_atf_sh_DEPENDENCIES = $(ATF_CXX_LIBS) -am__atf_version_atf_version_SOURCES_DIST = \ - atf-version/atf-version.cpp -@ENABLE_TOOLS_TRUE@am_atf_version_atf_version_OBJECTS = atf-version/atf_version_atf_version-atf-version.$(OBJEXT) -nodist_atf_version_atf_version_OBJECTS = -atf_version_atf_version_OBJECTS = \ - $(am_atf_version_atf_version_OBJECTS) \ - $(nodist_atf_version_atf_version_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_version_atf_version_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) am_bootstrap_h_app_empty_OBJECTS = bootstrap/h_app_empty.$(OBJEXT) bootstrap_h_app_empty_OBJECTS = $(am_bootstrap_h_app_empty_OBJECTS) -bootstrap_h_app_empty_DEPENDENCIES = $(ATF_CXX_LIBS) +bootstrap_h_app_empty_DEPENDENCIES = tools/libtools.a $(ATF_CXX_LIBS) am_bootstrap_h_app_opts_args_OBJECTS = \ bootstrap/h_app_opts_args.$(OBJEXT) bootstrap_h_app_opts_args_OBJECTS = \ $(am_bootstrap_h_app_opts_args_OBJECTS) -bootstrap_h_app_opts_args_DEPENDENCIES = $(ATF_CXX_LIBS) +bootstrap_h_app_opts_args_DEPENDENCIES = tools/libtools.a \ + $(ATF_CXX_LIBS) am_bootstrap_h_tp_basic_c_OBJECTS = bootstrap/h_tp_basic_c.$(OBJEXT) bootstrap_h_tp_basic_c_OBJECTS = $(am_bootstrap_h_tp_basic_c_OBJECTS) bootstrap_h_tp_basic_c_DEPENDENCIES = libatf-c.la @@ -1126,10 +887,179 @@ am_test_programs_cpp_helpers_OBJECTS = test_programs_cpp_helpers_OBJECTS = \ $(am_test_programs_cpp_helpers_OBJECTS) test_programs_cpp_helpers_DEPENDENCIES = $(ATF_CXX_LIBS) +am__tools_application_test_SOURCES_DIST = tools/application_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_application_test_OBJECTS = tools/tools_application_test-application_test.$(OBJEXT) +tools_application_test_OBJECTS = $(am_tools_application_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_application_test_DEPENDENCIES = \ +@ENABLE_TOOLS_TRUE@ $(TOOLS_LDADD) $(ATF_CXX_LIBS) +am__tools_atf_config_SOURCES_DIST = tools/atf-config.cpp +@ENABLE_TOOLS_TRUE@am_tools_atf_config_OBJECTS = tools/tools_atf_config-atf-config.$(OBJEXT) +tools_atf_config_OBJECTS = $(am_tools_atf_config_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_atf_config_DEPENDENCIES = $(TOOLS_LDADD) +am__tools_atf_report_SOURCES_DIST = tools/atf-report.cpp +@ENABLE_TOOLS_TRUE@am_tools_atf_report_OBJECTS = tools/tools_atf_report-atf-report.$(OBJEXT) +tools_atf_report_OBJECTS = $(am_tools_atf_report_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_atf_report_DEPENDENCIES = $(TOOLS_LDADD) +am__tools_atf_run_SOURCES_DIST = tools/atf-run.cpp +@ENABLE_TOOLS_TRUE@am_tools_atf_run_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/tools_atf_run-atf-run.$(OBJEXT) +tools_atf_run_OBJECTS = $(am_tools_atf_run_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_atf_run_DEPENDENCIES = $(TOOLS_LDADD) +am__tools_atf_version_SOURCES_DIST = tools/atf-version.cpp +@ENABLE_TOOLS_TRUE@am_tools_atf_version_OBJECTS = tools/tools_atf_version-atf-version.$(OBJEXT) +nodist_tools_atf_version_OBJECTS = +tools_atf_version_OBJECTS = $(am_tools_atf_version_OBJECTS) \ + $(nodist_tools_atf_version_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_atf_version_DEPENDENCIES = $(TOOLS_LDADD) +am__tools_atffile_test_SOURCES_DIST = tools/atffile_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_atffile_test_OBJECTS = tools/tools_atffile_test-atffile_test.$(OBJEXT) +tools_atffile_test_OBJECTS = $(am_tools_atffile_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_atffile_test_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_auto_array_test_SOURCES_DIST = tools/auto_array_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_auto_array_test_OBJECTS = tools/tools_auto_array_test-auto_array_test.$(OBJEXT) +tools_auto_array_test_OBJECTS = $(am_tools_auto_array_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_auto_array_test_DEPENDENCIES = \ +@ENABLE_TOOLS_TRUE@ $(TOOLS_LDADD) $(ATF_CXX_LIBS) +am__tools_bad_metadata_helper_SOURCES_DIST = \ + tools/bad_metadata_helper.c +@ENABLE_TOOLS_TRUE@am_tools_bad_metadata_helper_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/bad_metadata_helper.$(OBJEXT) +tools_bad_metadata_helper_OBJECTS = \ + $(am_tools_bad_metadata_helper_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_bad_metadata_helper_DEPENDENCIES = \ +@ENABLE_TOOLS_TRUE@ libatf-c.la +am__tools_config_file_test_SOURCES_DIST = tools/config_file_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_config_file_test_OBJECTS = tools/tools_config_file_test-config_file_test.$(OBJEXT) +tools_config_file_test_OBJECTS = $(am_tools_config_file_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_config_file_test_DEPENDENCIES = \ +@ENABLE_TOOLS_TRUE@ $(TOOLS_LDADD) $(ATF_CXX_LIBS) +am__tools_config_test_SOURCES_DIST = tools/config_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_config_test_OBJECTS = tools/tools_config_test-config_test.$(OBJEXT) +tools_config_test_OBJECTS = $(am_tools_config_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_config_test_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_env_test_SOURCES_DIST = tools/env_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_env_test_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/tools_env_test-env_test.$(OBJEXT) +tools_env_test_OBJECTS = $(am_tools_env_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_env_test_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_expand_test_SOURCES_DIST = tools/expand_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_expand_test_OBJECTS = tools/tools_expand_test-expand_test.$(OBJEXT) +tools_expand_test_OBJECTS = $(am_tools_expand_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_expand_test_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_expect_helpers_SOURCES_DIST = tools/expect_helpers.c +@ENABLE_TOOLS_TRUE@am_tools_expect_helpers_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/expect_helpers.$(OBJEXT) +tools_expect_helpers_OBJECTS = $(am_tools_expect_helpers_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_expect_helpers_DEPENDENCIES = libatf-c.la +am__tools_fail_helper_SOURCES_DIST = tools/fail_helper.cpp +@ENABLE_TOOLS_TRUE@am_tools_fail_helper_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/fail_helper.$(OBJEXT) +tools_fail_helper_OBJECTS = $(am_tools_fail_helper_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_fail_helper_DEPENDENCIES = $(ATF_CXX_LIBS) +am__tools_fs_test_SOURCES_DIST = tools/fs_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_fs_test_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/tools_fs_test-fs_test.$(OBJEXT) +tools_fs_test_OBJECTS = $(am_tools_fs_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_fs_test_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_io_test_SOURCES_DIST = tools/io_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_io_test_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/tools_io_test-io_test.$(OBJEXT) +tools_io_test_OBJECTS = $(am_tools_io_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_io_test_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_misc_helpers_SOURCES_DIST = tools/misc_helpers.cpp +@ENABLE_TOOLS_TRUE@am_tools_misc_helpers_OBJECTS = tools/tools_misc_helpers-misc_helpers.$(OBJEXT) +tools_misc_helpers_OBJECTS = $(am_tools_misc_helpers_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_misc_helpers_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_parser_test_SOURCES_DIST = tools/parser_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_parser_test_OBJECTS = tools/tools_parser_test-parser_test.$(OBJEXT) +tools_parser_test_OBJECTS = $(am_tools_parser_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_parser_test_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_pass_helper_SOURCES_DIST = tools/pass_helper.cpp +@ENABLE_TOOLS_TRUE@am_tools_pass_helper_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/pass_helper.$(OBJEXT) +tools_pass_helper_OBJECTS = $(am_tools_pass_helper_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_pass_helper_DEPENDENCIES = $(ATF_CXX_LIBS) +am__tools_process_helpers_SOURCES_DIST = tools/process_helpers.c +@ENABLE_TOOLS_TRUE@am_tools_process_helpers_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/process_helpers.$(OBJEXT) +tools_process_helpers_OBJECTS = $(am_tools_process_helpers_OBJECTS) +tools_process_helpers_LDADD = $(LDADD) +am__tools_process_test_SOURCES_DIST = tools/process_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_process_test_OBJECTS = tools/tools_process_test-process_test.$(OBJEXT) +tools_process_test_OBJECTS = $(am_tools_process_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_process_test_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_reader_test_SOURCES_DIST = tools/reader_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_reader_test_OBJECTS = tools/tools_reader_test-reader_test.$(OBJEXT) +tools_reader_test_OBJECTS = $(am_tools_reader_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_reader_test_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_requirements_test_SOURCES_DIST = \ + tools/requirements_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_requirements_test_OBJECTS = tools/tools_requirements_test-requirements_test.$(OBJEXT) +tools_requirements_test_OBJECTS = \ + $(am_tools_requirements_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_requirements_test_DEPENDENCIES = \ +@ENABLE_TOOLS_TRUE@ $(TOOLS_LDADD) $(ATF_CXX_LIBS) +am__tools_several_tcs_helper_SOURCES_DIST = \ + tools/several_tcs_helper.c +@ENABLE_TOOLS_TRUE@am_tools_several_tcs_helper_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/several_tcs_helper.$(OBJEXT) +tools_several_tcs_helper_OBJECTS = \ + $(am_tools_several_tcs_helper_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_several_tcs_helper_DEPENDENCIES = \ +@ENABLE_TOOLS_TRUE@ libatf-c.la +am__tools_signals_test_SOURCES_DIST = tools/signals_test.cpp \ + tools/signals.cpp +@ENABLE_TOOLS_TRUE@am_tools_signals_test_OBJECTS = tools/tools_signals_test-signals_test.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_signals_test-signals.$(OBJEXT) +tools_signals_test_OBJECTS = $(am_tools_signals_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_signals_test_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_test_program_test_SOURCES_DIST = \ + tools/test_program_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_test_program_test_OBJECTS = tools/tools_test_program_test-test_program_test.$(OBJEXT) +tools_test_program_test_OBJECTS = \ + $(am_tools_test_program_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_test_program_test_DEPENDENCIES = \ +@ENABLE_TOOLS_TRUE@ $(TOOLS_LDADD) $(ATF_CXX_LIBS) +am__tools_text_test_SOURCES_DIST = tools/text_test.cpp tools/text.cpp +@ENABLE_TOOLS_TRUE@am_tools_text_test_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/tools_text_test-text_test.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_text_test-text.$(OBJEXT) +tools_text_test_OBJECTS = $(am_tools_text_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_text_test_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_ui_test_SOURCES_DIST = tools/ui_test.cpp tools/ui.cpp +@ENABLE_TOOLS_TRUE@am_tools_ui_test_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/tools_ui_test-ui_test.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_ui_test-ui.$(OBJEXT) +tools_ui_test_OBJECTS = $(am_tools_ui_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_ui_test_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_user_test_SOURCES_DIST = tools/user_test.cpp tools/user.cpp +@ENABLE_TOOLS_TRUE@am_tools_user_test_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/tools_user_test-user_test.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_user_test-user.$(OBJEXT) +tools_user_test_OBJECTS = $(am_tools_user_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_user_test_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_zero_tcs_helper_SOURCES_DIST = tools/zero_tcs_helper.c +@ENABLE_TOOLS_TRUE@am_tools_zero_tcs_helper_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/zero_tcs_helper.$(OBJEXT) +tools_zero_tcs_helper_OBJECTS = $(am_tools_zero_tcs_helper_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_zero_tcs_helper_DEPENDENCIES = libatf-c.la SCRIPTS = $(tests_atf_c_SCRIPTS) $(tests_atf_c___SCRIPTS) \ - $(tests_atf_config_SCRIPTS) $(tests_atf_report_SCRIPTS) \ - $(tests_atf_run_SCRIPTS) $(tests_atf_sh_SCRIPTS) \ - $(tests_test_programs_SCRIPTS) + $(tests_atf_sh_SCRIPTS) $(tests_test_programs_SCRIPTS) \ + $(tests_tools_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -1182,7 +1112,9 @@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = -SOURCES = $(atf_c___detail_libtest_helpers_la_SOURCES) \ +SOURCES = $(tools_libtools_a_SOURCES) \ + $(nodist_tools_libtools_a_SOURCES) \ + $(atf_c___detail_libtest_helpers_la_SOURCES) \ $(atf_c_detail_libtest_helpers_la_SOURCES) \ $(libatf_c___la_SOURCES) $(libatf_c_la_SOURCES) \ $(nodist_libatf_c_la_SOURCES) $(atf_c___atf_c___test_SOURCES) \ @@ -1192,13 +1124,11 @@ SOURCES = $(atf_c___detail_libtest_helpe $(atf_c___detail_auto_array_test_SOURCES) \ $(atf_c___detail_env_test_SOURCES) \ $(atf_c___detail_exceptions_test_SOURCES) \ - $(atf_c___detail_expand_test_SOURCES) \ $(atf_c___detail_fs_test_SOURCES) \ - $(atf_c___detail_parser_test_SOURCES) \ $(atf_c___detail_process_test_SOURCES) \ $(atf_c___detail_sanity_test_SOURCES) \ $(atf_c___detail_text_test_SOURCES) \ - $(atf_c___detail_ui_test_SOURCES) \ + $(atf_c___detail_version_helper_SOURCES) \ $(atf_c___macros_test_SOURCES) $(atf_c___tests_test_SOURCES) \ $(atf_c___utils_test_SOURCES) $(atf_c_atf_c_test_SOURCES) \ $(atf_c_build_test_SOURCES) $(atf_c_check_test_SOURCES) \ @@ -1212,36 +1142,38 @@ SOURCES = $(atf_c___detail_libtest_helpe $(atf_c_detail_process_test_SOURCES) \ $(atf_c_detail_sanity_test_SOURCES) \ $(atf_c_detail_text_test_SOURCES) \ - $(atf_c_detail_user_test_SOURCES) $(atf_c_error_test_SOURCES) \ - $(atf_c_macros_test_SOURCES) $(atf_c_tc_test_SOURCES) \ - $(atf_c_tp_test_SOURCES) $(atf_c_utils_test_SOURCES) \ - $(atf_config_atf_config_SOURCES) \ - $(atf_report_atf_report_SOURCES) \ - $(atf_report_fail_helper_SOURCES) \ - $(atf_report_misc_helpers_SOURCES) \ - $(atf_report_pass_helper_SOURCES) \ - $(atf_report_reader_test_SOURCES) $(atf_run_atf_run_SOURCES) \ - $(atf_run_atffile_test_SOURCES) \ - $(atf_run_bad_metadata_helper_SOURCES) \ - $(atf_run_config_test_SOURCES) \ - $(atf_run_expect_helpers_SOURCES) $(atf_run_fs_test_SOURCES) \ - $(atf_run_io_test_SOURCES) $(atf_run_misc_helpers_SOURCES) \ - $(atf_run_pass_helper_SOURCES) \ - $(atf_run_requirements_test_SOURCES) \ - $(atf_run_several_tcs_helper_SOURCES) \ - $(atf_run_signals_test_SOURCES) \ - $(atf_run_test_program_test_SOURCES) \ - $(atf_run_user_test_SOURCES) \ - $(atf_run_zero_tcs_helper_SOURCES) $(atf_sh_atf_check_SOURCES) \ - $(atf_sh_atf_sh_SOURCES) $(atf_version_atf_version_SOURCES) \ - $(nodist_atf_version_atf_version_SOURCES) \ - $(bootstrap_h_app_empty_SOURCES) \ + $(atf_c_detail_user_test_SOURCES) \ + $(atf_c_detail_version_helper_SOURCES) \ + $(atf_c_error_test_SOURCES) $(atf_c_macros_test_SOURCES) \ + $(atf_c_tc_test_SOURCES) $(atf_c_tp_test_SOURCES) \ + $(atf_c_utils_test_SOURCES) $(atf_sh_atf_check_SOURCES) \ + $(atf_sh_atf_sh_SOURCES) $(bootstrap_h_app_empty_SOURCES) \ $(bootstrap_h_app_opts_args_SOURCES) \ $(bootstrap_h_tp_basic_c_SOURCES) \ $(bootstrap_h_tp_basic_cpp_SOURCES) \ $(test_programs_c_helpers_SOURCES) \ - $(test_programs_cpp_helpers_SOURCES) -DIST_SOURCES = $(atf_c___detail_libtest_helpers_la_SOURCES) \ + $(test_programs_cpp_helpers_SOURCES) \ + $(tools_application_test_SOURCES) $(tools_atf_config_SOURCES) \ + $(tools_atf_report_SOURCES) $(tools_atf_run_SOURCES) \ + $(tools_atf_version_SOURCES) \ + $(nodist_tools_atf_version_SOURCES) \ + $(tools_atffile_test_SOURCES) $(tools_auto_array_test_SOURCES) \ + $(tools_bad_metadata_helper_SOURCES) \ + $(tools_config_file_test_SOURCES) $(tools_config_test_SOURCES) \ + $(tools_env_test_SOURCES) $(tools_expand_test_SOURCES) \ + $(tools_expect_helpers_SOURCES) $(tools_fail_helper_SOURCES) \ + $(tools_fs_test_SOURCES) $(tools_io_test_SOURCES) \ + $(tools_misc_helpers_SOURCES) $(tools_parser_test_SOURCES) \ + $(tools_pass_helper_SOURCES) $(tools_process_helpers_SOURCES) \ + $(tools_process_test_SOURCES) $(tools_reader_test_SOURCES) \ + $(tools_requirements_test_SOURCES) \ + $(tools_several_tcs_helper_SOURCES) \ + $(tools_signals_test_SOURCES) \ + $(tools_test_program_test_SOURCES) $(tools_text_test_SOURCES) \ + $(tools_ui_test_SOURCES) $(tools_user_test_SOURCES) \ + $(tools_zero_tcs_helper_SOURCES) +DIST_SOURCES = $(am__tools_libtools_a_SOURCES_DIST) \ + $(atf_c___detail_libtest_helpers_la_SOURCES) \ $(atf_c_detail_libtest_helpers_la_SOURCES) \ $(libatf_c___la_SOURCES) $(libatf_c_la_SOURCES) \ $(atf_c___atf_c___test_SOURCES) $(atf_c___build_test_SOURCES) \ @@ -1250,13 +1182,11 @@ DIST_SOURCES = $(atf_c___detail_libtest_ $(atf_c___detail_auto_array_test_SOURCES) \ $(atf_c___detail_env_test_SOURCES) \ $(atf_c___detail_exceptions_test_SOURCES) \ - $(atf_c___detail_expand_test_SOURCES) \ $(atf_c___detail_fs_test_SOURCES) \ - $(atf_c___detail_parser_test_SOURCES) \ $(atf_c___detail_process_test_SOURCES) \ $(atf_c___detail_sanity_test_SOURCES) \ $(atf_c___detail_text_test_SOURCES) \ - $(atf_c___detail_ui_test_SOURCES) \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 14:42:09 2014 Return-Path: Delivered-To: svn-src-all@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 01932450; Fri, 14 Feb 2014 14:42: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 C51791E31; Fri, 14 Feb 2014 14:42:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1EEg8XV077118; Fri, 14 Feb 2014 14:42:08 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1EEg8qf077117; Fri, 14 Feb 2014 14:42:08 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201402141442.s1EEg8qf077117@svn.freebsd.org> From: Julio Merino Date: Fri, 14 Feb 2014 14:42:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r261887 - vendor/atf/atf-0.19 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 14:42:09 -0000 Author: jmmv Date: Fri Feb 14 14:42:08 2014 New Revision: 261887 URL: http://svnweb.freebsd.org/changeset/base/261887 Log: Tag import of atf-0.19. Added: vendor/atf/atf-0.19/ - copied from r261886, vendor/atf/dist/ From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 14:44:05 2014 Return-Path: Delivered-To: svn-src-all@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 293D07A5; Fri, 14 Feb 2014 14:44: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 11CBC1F55; Fri, 14 Feb 2014 14:44:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1EEi4wG077490; Fri, 14 Feb 2014 14:44:04 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1EEi4wL077482; Fri, 14 Feb 2014 14:44:04 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201402141444.s1EEi4wL077482@svn.freebsd.org> From: Julio Merino Date: Fri, 14 Feb 2014 14:44:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r261888 - in vendor/atf/dist: . admin atf-c atf-c++ atf-c++/detail atf-c/detail atf-sh bootstrap m4 test-programs tools tools/sample tools/share X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 14:44:05 -0000 Author: jmmv Date: Fri Feb 14 14:44:03 2014 New Revision: 261888 URL: http://svnweb.freebsd.org/changeset/base/261888 Log: Import atf-0.20: Experimental version released on February 7th, 2014. This is the first release without the code for the deprecated tools. If you require such code, please fetch a copy of the 0.19 release and extract the 'tools' directory for your own consumption. * Removed the deprecated tools. This includes atf-config, atf-report, atf-run and atf-version. Deleted: vendor/atf/dist/Atffile vendor/atf/dist/atf-c++/Atffile vendor/atf/dist/atf-c++/detail/Atffile vendor/atf/dist/atf-c/Atffile vendor/atf/dist/atf-c/detail/Atffile vendor/atf/dist/atf-sh/Atffile vendor/atf/dist/bootstrap/h_app_empty.cpp vendor/atf/dist/bootstrap/h_app_opts_args.cpp vendor/atf/dist/bootstrap/t_application_help.at vendor/atf/dist/bootstrap/t_application_opts_args.at vendor/atf/dist/bootstrap/t_atf_config.at vendor/atf/dist/bootstrap/t_atf_run.at vendor/atf/dist/m4/module-signals.m4 vendor/atf/dist/test-programs/Atffile vendor/atf/dist/tools/Atffile vendor/atf/dist/tools/Kyuafile vendor/atf/dist/tools/Makefile.am.inc vendor/atf/dist/tools/application.cpp vendor/atf/dist/tools/application.hpp vendor/atf/dist/tools/application_test.cpp vendor/atf/dist/tools/atf-config.1 vendor/atf/dist/tools/atf-config.cpp vendor/atf/dist/tools/atf-config_test.sh vendor/atf/dist/tools/atf-formats.5 vendor/atf/dist/tools/atf-report.1 vendor/atf/dist/tools/atf-report.cpp vendor/atf/dist/tools/atf-report_test.sh vendor/atf/dist/tools/atf-run.1 vendor/atf/dist/tools/atf-run.cpp vendor/atf/dist/tools/atf-run_test.sh vendor/atf/dist/tools/atf-version.1 vendor/atf/dist/tools/atf-version.cpp vendor/atf/dist/tools/atf.7.in vendor/atf/dist/tools/atffile.cpp vendor/atf/dist/tools/atffile.hpp vendor/atf/dist/tools/atffile_test.cpp vendor/atf/dist/tools/auto_array.hpp vendor/atf/dist/tools/auto_array_test.cpp vendor/atf/dist/tools/bad_metadata_helper.c vendor/atf/dist/tools/config.cpp vendor/atf/dist/tools/config.hpp vendor/atf/dist/tools/config_file.cpp vendor/atf/dist/tools/config_file.hpp vendor/atf/dist/tools/config_file_test.cpp vendor/atf/dist/tools/config_test.cpp vendor/atf/dist/tools/defs.hpp.in vendor/atf/dist/tools/env.cpp vendor/atf/dist/tools/env.hpp vendor/atf/dist/tools/env_test.cpp vendor/atf/dist/tools/exceptions.cpp vendor/atf/dist/tools/exceptions.hpp vendor/atf/dist/tools/expand.cpp vendor/atf/dist/tools/expand.hpp vendor/atf/dist/tools/expand_test.cpp vendor/atf/dist/tools/expect_helpers.c vendor/atf/dist/tools/fail_helper.cpp vendor/atf/dist/tools/fs.cpp vendor/atf/dist/tools/fs.hpp vendor/atf/dist/tools/fs_test.cpp vendor/atf/dist/tools/generate-revision.sh vendor/atf/dist/tools/io.cpp vendor/atf/dist/tools/io.hpp vendor/atf/dist/tools/io_test.cpp vendor/atf/dist/tools/misc_helpers.cpp vendor/atf/dist/tools/parser.cpp vendor/atf/dist/tools/parser.hpp vendor/atf/dist/tools/parser_test.cpp vendor/atf/dist/tools/pass_helper.cpp vendor/atf/dist/tools/process.cpp vendor/atf/dist/tools/process.hpp vendor/atf/dist/tools/process_helpers.c vendor/atf/dist/tools/process_test.cpp vendor/atf/dist/tools/reader.cpp vendor/atf/dist/tools/reader.hpp vendor/atf/dist/tools/reader_test.cpp vendor/atf/dist/tools/requirements.cpp vendor/atf/dist/tools/requirements.hpp vendor/atf/dist/tools/requirements_test.cpp vendor/atf/dist/tools/sample/atf-run.hooks vendor/atf/dist/tools/sample/common.conf vendor/atf/dist/tools/several_tcs_helper.c vendor/atf/dist/tools/share/atf-run.hooks vendor/atf/dist/tools/signals.cpp vendor/atf/dist/tools/signals.hpp vendor/atf/dist/tools/signals_test.cpp vendor/atf/dist/tools/test-program.cpp vendor/atf/dist/tools/test-program.hpp vendor/atf/dist/tools/test_helpers.hpp vendor/atf/dist/tools/test_program_test.cpp vendor/atf/dist/tools/tests-results.css vendor/atf/dist/tools/tests-results.dtd vendor/atf/dist/tools/tests-results.xsl vendor/atf/dist/tools/text.cpp vendor/atf/dist/tools/text.hpp vendor/atf/dist/tools/text_test.cpp vendor/atf/dist/tools/timers.cpp vendor/atf/dist/tools/timers.hpp vendor/atf/dist/tools/ui.cpp vendor/atf/dist/tools/ui.hpp vendor/atf/dist/tools/ui_test.cpp vendor/atf/dist/tools/user.cpp vendor/atf/dist/tools/user.hpp vendor/atf/dist/tools/user_test.cpp vendor/atf/dist/tools/zero_tcs_helper.c Modified: vendor/atf/dist/INSTALL vendor/atf/dist/Kyuafile vendor/atf/dist/Makefile.am vendor/atf/dist/Makefile.in vendor/atf/dist/NEWS vendor/atf/dist/README vendor/atf/dist/aclocal.m4 vendor/atf/dist/admin/check-style.sh vendor/atf/dist/atf-c++/Makefile.am.inc vendor/atf/dist/atf-c++/detail/Makefile.am.inc vendor/atf/dist/atf-c/Makefile.am.inc vendor/atf/dist/atf-c/detail/Makefile.am.inc vendor/atf/dist/atf-sh/Makefile.am.inc vendor/atf/dist/bconfig.h.in vendor/atf/dist/bootstrap/Makefile.am.inc vendor/atf/dist/bootstrap/package.m4 vendor/atf/dist/bootstrap/testsuite vendor/atf/dist/bootstrap/testsuite.at vendor/atf/dist/configure vendor/atf/dist/configure.ac vendor/atf/dist/test-programs/Makefile.am.inc Modified: vendor/atf/dist/INSTALL ============================================================================== --- vendor/atf/dist/INSTALL Fri Feb 14 14:42:08 2014 (r261887) +++ vendor/atf/dist/INSTALL Fri Feb 14 14:44:03 2014 (r261888) @@ -94,14 +94,6 @@ The most common, standard flags given to Specifies where the program (binaries and all associated files) will be installed. -* --sysconfdir=directory - Possible values: Any path - Default: /usr/local/etc - - Specifies where the installed programs will look for configuration files. - '/atf' will be appended to the given path unless ATF_CONFSUBDIR is - redefined as explained later on. - * --help Shows information about all available flags and exits immediately, without running any configuration tasks. @@ -152,14 +144,6 @@ script: Specifies the C++ compiler flags that ATF will use at run time whenever the build-time-specific checks are used. -* ATF_CONFSUBDIR - Possible values: empty, a relative path. - Default: atf. - - Specifies the subdirectory of the configuration directory (given by the - --sysconfdir argument) under which ATF will search for its configuration - files. - * ATF_SHELL Possible values: empty, absolute path to a POSIX shell interpreter. Default: empty. @@ -177,14 +161,6 @@ script: and work directories for test cases. This is just a default and can be overriden at run time. -* GDB - Possible values: empty, absolute path to GNU GDB. - Default: empty. - - Specifies the path to the GNU GDB binary that atf-run will use to gather - a stack trace of a crashing test program. If empty, the configure script - will try to find a suitable binary for you. - The following flags are specific to ATF's 'configure' script: * --enable-developer @@ -199,25 +175,6 @@ The following flags are specific to ATF' detection features regardless of the value of this flag. However, such warnings are only fatal when --enable-developer is 'yes'. -* --enable-tools - Possible values: yes, no - Default: no. - - Enables the build of the deprecated atf-config, atf-report, atf-run - and atf-version tools. atf-report and atf-run have been superseded by - Kyua, and atf-config and atf-version are unnecessary. - - -Post-installation steps -*********************** - -After installing ATF, you have to register the DTDs it provides into the -system-wide XML catalog. See the comments at the top of the files in -${datadir}/share/xml/atf to see the correct public identifiers. This -directory will typically be /usr/local/share/xml/atf or /usr/share/xml/atf. -Failure to do so will lead to further errors when processing the XML files -generated by atf-report. - =========================================================================== vim: filetype=text:textwidth=75:expandtab:shiftwidth=2:softtabstop=2 Modified: vendor/atf/dist/Kyuafile ============================================================================== --- vendor/atf/dist/Kyuafile Fri Feb 14 14:42:08 2014 (r261887) +++ vendor/atf/dist/Kyuafile Fri Feb 14 14:44:03 2014 (r261888) @@ -6,7 +6,3 @@ include("atf-c/Kyuafile") include("atf-c++/Kyuafile") include("atf-sh/Kyuafile") include("test-programs/Kyuafile") - -if fs.exists("tools/Kyuafile") then - include("tools/Kyuafile") -end Modified: vendor/atf/dist/Makefile.am ============================================================================== --- vendor/atf/dist/Makefile.am Fri Feb 14 14:42:08 2014 (r261887) +++ vendor/atf/dist/Makefile.am Fri Feb 14 14:44:03 2014 (r261888) @@ -30,7 +30,6 @@ atf_aclocal_DATA = BUILT_SOURCES = CLEANFILES = -DIST_HOOKS = EXTRA_DIST = bin_PROGRAMS = dist_man_MANS = @@ -54,10 +53,6 @@ include bootstrap/Makefile.am.inc include doc/Makefile.am.inc include test-programs/Makefile.am.inc -if ENABLE_TOOLS -include tools/Makefile.am.inc -endif - # # Top-level distfile documents. # @@ -76,32 +71,9 @@ TESTS_ENVIRONMENT = PATH=$(prefix)/bin:$ testsdir = $(exec_prefix)/tests pkgtestsdir = $(testsdir)/$(PACKAGE) -if ENABLE_TOOLS -INSTALLCHECK_TARGETS += installcheck-atf -PHONY_TARGETS += installcheck-atf -installcheck-atf: - logfile=$$(pwd)/installcheck.log; \ - fifofile=$$(pwd)/installcheck.fifo; \ - cd $(pkgtestsdir); \ - rm -f $${fifofile}; \ - mkfifo $${fifofile}; \ - cat $${fifofile} | tee $${logfile} | $(TESTS_ENVIRONMENT) atf-report & \ - $(TESTS_ENVIRONMENT) atf-run >>$${fifofile}; \ - res=$${?}; \ - wait; \ - rm $${fifofile}; \ - echo; \ - echo "The verbatim output of atf-run has been saved to" \ - "installcheck.log; exit was $${res}"; \ - test $${res} -eq 0 -CLEANFILES += installcheck.fifo installcheck.log -endif - PHONY_TARGETS += installcheck-kyua if HAVE_KYUA -if !ENABLE_TOOLS INSTALLCHECK_TARGETS += installcheck-kyua -endif installcheck-kyua: cd $(pkgtestsdir) && $(TESTS_ENVIRONMENT) $(KYUA) test endif @@ -109,9 +81,6 @@ endif installcheck-local: $(INSTALLCHECK_TARGETS) pkgtests_DATA = Kyuafile -if ENABLE_TOOLS -pkgtests_DATA += Atffile -endif EXTRA_DIST += $(pkgtests_DATA) BUILD_SH_TP = \ @@ -124,17 +93,6 @@ BUILD_SH_TP = \ # Custom targets. # -DIST_HOOKS += forbid-dist -if ENABLE_TOOLS -forbid-dist: - @true -else -forbid-dist: - @echo "Sorry; cannot make dist without the tools enabled." - @echo "Please reconfigure with --enable-tools." - @false -endif - PHONY_TARGETS += clean-all clean-all: GIT="$(GIT)" $(SH) $(srcdir)/admin/clean-all.sh @@ -149,6 +107,4 @@ release-test: .PHONY: $(PHONY_TARGETS) -dist-hook: $(DIST_HOOKS) - # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 Modified: vendor/atf/dist/Makefile.in ============================================================================== --- vendor/atf/dist/Makefile.in Fri Feb 14 14:42:08 2014 (r261887) +++ vendor/atf/dist/Makefile.in Fri Feb 14 14:44:03 2014 (r261888) @@ -304,36 +304,6 @@ # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007 The NetBSD Foundation, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. -# - - @@ -403,7 +373,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -bin_PROGRAMS = atf-sh/atf-sh$(EXEEXT) $(am__EXEEXT_1) +bin_PROGRAMS = atf-sh/atf-sh$(EXEEXT) libexec_PROGRAMS = atf-sh/atf-check$(EXEEXT) DIST_COMMON = $(srcdir)/admin/Makefile.am.inc \ $(srcdir)/atf-c/Makefile.am.inc \ @@ -413,17 +383,16 @@ DIST_COMMON = $(srcdir)/admin/Makefile.a $(srcdir)/atf-sh/Makefile.am.inc \ $(srcdir)/bootstrap/Makefile.am.inc \ $(srcdir)/doc/Makefile.am.inc \ - $(srcdir)/test-programs/Makefile.am.inc \ - $(srcdir)/tools/Makefile.am.inc $(srcdir)/Makefile.in \ + $(srcdir)/test-programs/Makefile.am.inc $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(srcdir)/bconfig.h.in \ - $(top_srcdir)/atf-c/defs.h.in $(top_srcdir)/tools/defs.hpp.in \ - $(top_srcdir)/admin/depcomp $(dist_man_MANS) $(atf_c_HEADERS) \ - $(atf_c___HEADERS) $(include_HEADERS) AUTHORS COPYING INSTALL \ - NEWS README admin/ar-lib admin/compile admin/config.guess \ - admin/config.sub admin/depcomp admin/install-sh admin/missing \ - admin/ltmain.sh $(top_srcdir)/admin/ar-lib \ - $(top_srcdir)/admin/compile $(top_srcdir)/admin/config.guess \ + $(top_srcdir)/atf-c/defs.h.in $(top_srcdir)/admin/depcomp \ + $(dist_man_MANS) $(atf_c_HEADERS) $(atf_c___HEADERS) \ + $(include_HEADERS) AUTHORS COPYING INSTALL NEWS README \ + admin/ar-lib admin/compile admin/config.guess admin/config.sub \ + admin/depcomp admin/install-sh admin/missing admin/ltmain.sh \ + $(top_srcdir)/admin/ar-lib $(top_srcdir)/admin/compile \ + $(top_srcdir)/admin/config.guess \ $(top_srcdir)/admin/config.sub $(top_srcdir)/admin/install-sh \ $(top_srcdir)/admin/ltmain.sh $(top_srcdir)/admin/missing tests_atf_c_PROGRAMS = atf-c/atf_c_test$(EXEEXT) \ @@ -454,67 +423,11 @@ tests_atf_c___detail_PROGRAMS = \ atf-c++/detail/sanity_test$(EXEEXT) \ atf-c++/detail/text_test$(EXEEXT) \ atf-c++/detail/version_helper$(EXEEXT) -check_PROGRAMS = bootstrap/h_app_empty$(EXEEXT) \ - bootstrap/h_app_opts_args$(EXEEXT) \ - bootstrap/h_tp_basic_c$(EXEEXT) \ +check_PROGRAMS = bootstrap/h_tp_basic_c$(EXEEXT) \ bootstrap/h_tp_basic_cpp$(EXEEXT) tests_test_programs_PROGRAMS = test-programs/c_helpers$(EXEEXT) \ test-programs/cpp_helpers$(EXEEXT) - -# XXX For some reason, the nodist line above does not work as expected. -# Work this problem around. -@ENABLE_TOOLS_TRUE@am__append_1 = kill-defs-hpp -@ENABLE_TOOLS_TRUE@am__append_2 = tools/atf-config tools/atf-report \ -@ENABLE_TOOLS_TRUE@ tools/atf-run tools/atf-version -@ENABLE_TOOLS_TRUE@am__append_3 = tools/atf-config.1 \ -@ENABLE_TOOLS_TRUE@ tools/atf-report.1 tools/atf-run.1 \ -@ENABLE_TOOLS_TRUE@ tools/atf-version.1 tools/atf-formats.5 -@ENABLE_TOOLS_TRUE@am__append_4 = tools/generate-revision.sh \ -@ENABLE_TOOLS_TRUE@ tools/atf.7.in $(css_DATA) $(dtd_DATA) \ -@ENABLE_TOOLS_TRUE@ $(eg_DATA) $(hooks_DATA) $(xsl_DATA) \ -@ENABLE_TOOLS_TRUE@ $(tests_tools_DATA) \ -@ENABLE_TOOLS_TRUE@ tools/atf-config_test.sh \ -@ENABLE_TOOLS_TRUE@ tools/atf-report_test.sh \ -@ENABLE_TOOLS_TRUE@ tools/atf-run_test.sh -@ENABLE_TOOLS_TRUE@am__append_5 = tools/revision.h -@ENABLE_TOOLS_TRUE@am__append_6 = tools/revision.h \ -@ENABLE_TOOLS_TRUE@ tools/revision.h.stamp tools/atf.7 \ -@ENABLE_TOOLS_TRUE@ tools/atf-config_test tools/atf-report_test \ -@ENABLE_TOOLS_TRUE@ tools/atf-run_test installcheck.fifo \ -@ENABLE_TOOLS_TRUE@ installcheck.log -@ENABLE_TOOLS_TRUE@am__append_7 = tools/revision.h.stamp \ -@ENABLE_TOOLS_TRUE@ installcheck-atf -@ENABLE_TOOLS_TRUE@am__append_8 = tools/atf.7 -@ENABLE_TOOLS_TRUE@tests_tools_PROGRAMS = \ -@ENABLE_TOOLS_TRUE@ tools/application_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/atffile_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/auto_array_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/bad_metadata_helper$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/config_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/config_file_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/env_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/expand_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/expect_helpers$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/fail_helper$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/fs_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/io_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/misc_helpers$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/parser_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/process_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/pass_helper$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/process_helpers$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/reader_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/requirements_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/several_tcs_helper$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/signals_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/test_program_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/text_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/ui_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/user_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/zero_tcs_helper$(EXEEXT) -@ENABLE_TOOLS_TRUE@am__append_9 = installcheck-atf -@ENABLE_TOOLS_FALSE@@HAVE_KYUA_TRUE@am__append_10 = installcheck-kyua -@ENABLE_TOOLS_TRUE@am__append_11 = Atffile +@HAVE_KYUA_TRUE@am__append_1 = installcheck-kyua subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/compiler-flags.m4 \ @@ -524,61 +437,16 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/c $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/module-application.m4 \ $(top_srcdir)/m4/module-defs.m4 $(top_srcdir)/m4/module-env.m4 \ - $(top_srcdir)/m4/module-fs.m4 \ - $(top_srcdir)/m4/module-signals.m4 \ - $(top_srcdir)/m4/runtime-tool.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/module-fs.m4 $(top_srcdir)/m4/runtime-tool.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = bconfig.h -CONFIG_CLEAN_FILES = atf-c/defs.h tools/defs.hpp +CONFIG_CLEAN_FILES = atf-c/defs.h CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -AM_V_AR = $(am__v_AR_@AM_V@) -am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) -am__v_AR_0 = @echo " AR " $@; -am__v_AR_1 = -tools_libtools_a_AR = $(AR) $(ARFLAGS) -tools_libtools_a_LIBADD = -am__tools_libtools_a_SOURCES_DIST = tools/application.cpp \ - tools/application.hpp tools/atffile.cpp tools/atffile.hpp \ - tools/auto_array.hpp tools/config.cpp tools/config.hpp \ - tools/config_file.cpp tools/config_file.hpp tools/env.cpp \ - tools/env.hpp tools/exceptions.cpp tools/exceptions.hpp \ - tools/expand.cpp tools/expand.hpp tools/fs.cpp tools/fs.hpp \ - tools/io.cpp tools/io.hpp tools/parser.cpp tools/parser.hpp \ - tools/process.cpp tools/process.hpp tools/reader.cpp \ - tools/reader.hpp tools/requirements.cpp tools/requirements.hpp \ - tools/signals.cpp tools/signals.hpp tools/test-program.cpp \ - tools/test-program.hpp tools/test_helpers.hpp tools/text.cpp \ - tools/text.hpp tools/timers.cpp tools/timers.hpp tools/ui.cpp \ - tools/ui.hpp tools/user.cpp tools/user.hpp -am__dirstamp = $(am__leading_dot)dirstamp -@ENABLE_TOOLS_TRUE@am_tools_libtools_a_OBJECTS = tools/tools_libtools_a-application.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-atffile.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-config.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-config_file.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-env.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-exceptions.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-expand.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-fs.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-io.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-parser.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-process.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-reader.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-requirements.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-signals.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-test-program.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-text.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-timers.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-ui.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-user.$(OBJEXT) -nodist_tools_libtools_a_OBJECTS = -tools_libtools_a_OBJECTS = $(am_tools_libtools_a_OBJECTS) \ - $(nodist_tools_libtools_a_OBJECTS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -612,29 +480,24 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(tests_atf_c___detaildir)" \ "$(DESTDIR)$(tests_atf_c_detaildir)" \ "$(DESTDIR)$(tests_test_programsdir)" \ - "$(DESTDIR)$(tests_toolsdir)" "$(DESTDIR)$(tests_atf_cdir)" \ - "$(DESTDIR)$(tests_atf_c__dir)" "$(DESTDIR)$(tests_atf_shdir)" \ - "$(DESTDIR)$(tests_test_programsdir)" \ - "$(DESTDIR)$(tests_toolsdir)" "$(DESTDIR)$(man1dir)" \ + "$(DESTDIR)$(tests_atf_cdir)" "$(DESTDIR)$(tests_atf_c__dir)" \ + "$(DESTDIR)$(tests_atf_shdir)" \ + "$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(man1dir)" \ "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man4dir)" \ - "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man7dir)" \ "$(DESTDIR)$(atf_aclocaldir)" \ "$(DESTDIR)$(atf_c__dirpkgconfigdir)" \ "$(DESTDIR)$(atf_cpkgconfigdir)" "$(DESTDIR)$(atf_shdir)" \ - "$(DESTDIR)$(atf_shpkgconfigdir)" "$(DESTDIR)$(cssdir)" \ - "$(DESTDIR)$(docdir)" "$(DESTDIR)$(dtddir)" \ - "$(DESTDIR)$(egdir)" "$(DESTDIR)$(hooksdir)" \ + "$(DESTDIR)$(atf_shpkgconfigdir)" "$(DESTDIR)$(docdir)" \ "$(DESTDIR)$(pkgtestsdir)" "$(DESTDIR)$(tests_atf_cdir)" \ "$(DESTDIR)$(tests_atf_c__dir)" \ "$(DESTDIR)$(tests_atf_c___detaildir)" \ "$(DESTDIR)$(tests_atf_c_detaildir)" \ "$(DESTDIR)$(tests_atf_shdir)" \ - "$(DESTDIR)$(tests_test_programsdir)" \ - "$(DESTDIR)$(tests_toolsdir)" "$(DESTDIR)$(xsldir)" \ - "$(DESTDIR)$(atf_cdir)" "$(DESTDIR)$(atf_c__dir)" \ - "$(DESTDIR)$(includedir)" + "$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(atf_cdir)" \ + "$(DESTDIR)$(atf_c__dir)" "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) atf_c___detail_libtest_helpers_la_LIBADD = +am__dirstamp = $(am__leading_dot)dirstamp am_atf_c___detail_libtest_helpers_la_OBJECTS = \ atf-c++/detail/test_helpers.lo atf_c___detail_libtest_helpers_la_OBJECTS = \ @@ -679,14 +542,9 @@ libatf_c_la_OBJECTS = $(am_libatf_c_la_O libatf_c_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libatf_c_la_LDFLAGS) $(LDFLAGS) -o $@ -@ENABLE_TOOLS_TRUE@am__EXEEXT_1 = tools/atf-config$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/atf-report$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/atf-run$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ tools/atf-version$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) $(tests_atf_c_PROGRAMS) \ $(tests_atf_c___PROGRAMS) $(tests_atf_c___detail_PROGRAMS) \ - $(tests_atf_c_detail_PROGRAMS) $(tests_test_programs_PROGRAMS) \ - $(tests_tools_PROGRAMS) + $(tests_atf_c_detail_PROGRAMS) $(tests_test_programs_PROGRAMS) am_atf_c___atf_c___test_OBJECTS = atf-c++/atf_c++_test.$(OBJEXT) atf_c___atf_c___test_OBJECTS = $(am_atf_c___atf_c___test_OBJECTS) atf_c___atf_c___test_DEPENDENCIES = atf-c++/detail/libtest_helpers.la \ @@ -860,15 +718,6 @@ atf_sh_atf_check_DEPENDENCIES = $(ATF_CX am_atf_sh_atf_sh_OBJECTS = atf-sh/atf-sh.$(OBJEXT) atf_sh_atf_sh_OBJECTS = $(am_atf_sh_atf_sh_OBJECTS) atf_sh_atf_sh_DEPENDENCIES = $(ATF_CXX_LIBS) -am_bootstrap_h_app_empty_OBJECTS = bootstrap/h_app_empty.$(OBJEXT) -bootstrap_h_app_empty_OBJECTS = $(am_bootstrap_h_app_empty_OBJECTS) -bootstrap_h_app_empty_DEPENDENCIES = tools/libtools.a $(ATF_CXX_LIBS) -am_bootstrap_h_app_opts_args_OBJECTS = \ - bootstrap/h_app_opts_args.$(OBJEXT) -bootstrap_h_app_opts_args_OBJECTS = \ - $(am_bootstrap_h_app_opts_args_OBJECTS) -bootstrap_h_app_opts_args_DEPENDENCIES = tools/libtools.a \ - $(ATF_CXX_LIBS) am_bootstrap_h_tp_basic_c_OBJECTS = bootstrap/h_tp_basic_c.$(OBJEXT) bootstrap_h_tp_basic_c_OBJECTS = $(am_bootstrap_h_tp_basic_c_OBJECTS) bootstrap_h_tp_basic_c_DEPENDENCIES = libatf-c.la @@ -887,179 +736,8 @@ am_test_programs_cpp_helpers_OBJECTS = test_programs_cpp_helpers_OBJECTS = \ $(am_test_programs_cpp_helpers_OBJECTS) test_programs_cpp_helpers_DEPENDENCIES = $(ATF_CXX_LIBS) -am__tools_application_test_SOURCES_DIST = tools/application_test.cpp -@ENABLE_TOOLS_TRUE@am_tools_application_test_OBJECTS = tools/tools_application_test-application_test.$(OBJEXT) -tools_application_test_OBJECTS = $(am_tools_application_test_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_application_test_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ $(TOOLS_LDADD) $(ATF_CXX_LIBS) -am__tools_atf_config_SOURCES_DIST = tools/atf-config.cpp -@ENABLE_TOOLS_TRUE@am_tools_atf_config_OBJECTS = tools/tools_atf_config-atf-config.$(OBJEXT) -tools_atf_config_OBJECTS = $(am_tools_atf_config_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_atf_config_DEPENDENCIES = $(TOOLS_LDADD) -am__tools_atf_report_SOURCES_DIST = tools/atf-report.cpp -@ENABLE_TOOLS_TRUE@am_tools_atf_report_OBJECTS = tools/tools_atf_report-atf-report.$(OBJEXT) -tools_atf_report_OBJECTS = $(am_tools_atf_report_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_atf_report_DEPENDENCIES = $(TOOLS_LDADD) -am__tools_atf_run_SOURCES_DIST = tools/atf-run.cpp -@ENABLE_TOOLS_TRUE@am_tools_atf_run_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ tools/tools_atf_run-atf-run.$(OBJEXT) -tools_atf_run_OBJECTS = $(am_tools_atf_run_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_atf_run_DEPENDENCIES = $(TOOLS_LDADD) -am__tools_atf_version_SOURCES_DIST = tools/atf-version.cpp -@ENABLE_TOOLS_TRUE@am_tools_atf_version_OBJECTS = tools/tools_atf_version-atf-version.$(OBJEXT) -nodist_tools_atf_version_OBJECTS = -tools_atf_version_OBJECTS = $(am_tools_atf_version_OBJECTS) \ - $(nodist_tools_atf_version_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_atf_version_DEPENDENCIES = $(TOOLS_LDADD) -am__tools_atffile_test_SOURCES_DIST = tools/atffile_test.cpp -@ENABLE_TOOLS_TRUE@am_tools_atffile_test_OBJECTS = tools/tools_atffile_test-atffile_test.$(OBJEXT) -tools_atffile_test_OBJECTS = $(am_tools_atffile_test_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_atffile_test_DEPENDENCIES = $(TOOLS_LDADD) \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__tools_auto_array_test_SOURCES_DIST = tools/auto_array_test.cpp -@ENABLE_TOOLS_TRUE@am_tools_auto_array_test_OBJECTS = tools/tools_auto_array_test-auto_array_test.$(OBJEXT) -tools_auto_array_test_OBJECTS = $(am_tools_auto_array_test_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_auto_array_test_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ $(TOOLS_LDADD) $(ATF_CXX_LIBS) -am__tools_bad_metadata_helper_SOURCES_DIST = \ - tools/bad_metadata_helper.c -@ENABLE_TOOLS_TRUE@am_tools_bad_metadata_helper_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ tools/bad_metadata_helper.$(OBJEXT) -tools_bad_metadata_helper_OBJECTS = \ - $(am_tools_bad_metadata_helper_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_bad_metadata_helper_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ libatf-c.la -am__tools_config_file_test_SOURCES_DIST = tools/config_file_test.cpp -@ENABLE_TOOLS_TRUE@am_tools_config_file_test_OBJECTS = tools/tools_config_file_test-config_file_test.$(OBJEXT) -tools_config_file_test_OBJECTS = $(am_tools_config_file_test_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_config_file_test_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ $(TOOLS_LDADD) $(ATF_CXX_LIBS) -am__tools_config_test_SOURCES_DIST = tools/config_test.cpp -@ENABLE_TOOLS_TRUE@am_tools_config_test_OBJECTS = tools/tools_config_test-config_test.$(OBJEXT) -tools_config_test_OBJECTS = $(am_tools_config_test_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_config_test_DEPENDENCIES = $(TOOLS_LDADD) \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__tools_env_test_SOURCES_DIST = tools/env_test.cpp -@ENABLE_TOOLS_TRUE@am_tools_env_test_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ tools/tools_env_test-env_test.$(OBJEXT) -tools_env_test_OBJECTS = $(am_tools_env_test_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_env_test_DEPENDENCIES = $(TOOLS_LDADD) \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__tools_expand_test_SOURCES_DIST = tools/expand_test.cpp -@ENABLE_TOOLS_TRUE@am_tools_expand_test_OBJECTS = tools/tools_expand_test-expand_test.$(OBJEXT) -tools_expand_test_OBJECTS = $(am_tools_expand_test_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_expand_test_DEPENDENCIES = $(TOOLS_LDADD) \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__tools_expect_helpers_SOURCES_DIST = tools/expect_helpers.c -@ENABLE_TOOLS_TRUE@am_tools_expect_helpers_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ tools/expect_helpers.$(OBJEXT) -tools_expect_helpers_OBJECTS = $(am_tools_expect_helpers_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_expect_helpers_DEPENDENCIES = libatf-c.la -am__tools_fail_helper_SOURCES_DIST = tools/fail_helper.cpp -@ENABLE_TOOLS_TRUE@am_tools_fail_helper_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ tools/fail_helper.$(OBJEXT) -tools_fail_helper_OBJECTS = $(am_tools_fail_helper_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_fail_helper_DEPENDENCIES = $(ATF_CXX_LIBS) -am__tools_fs_test_SOURCES_DIST = tools/fs_test.cpp -@ENABLE_TOOLS_TRUE@am_tools_fs_test_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ tools/tools_fs_test-fs_test.$(OBJEXT) -tools_fs_test_OBJECTS = $(am_tools_fs_test_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_fs_test_DEPENDENCIES = $(TOOLS_LDADD) \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__tools_io_test_SOURCES_DIST = tools/io_test.cpp -@ENABLE_TOOLS_TRUE@am_tools_io_test_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ tools/tools_io_test-io_test.$(OBJEXT) -tools_io_test_OBJECTS = $(am_tools_io_test_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_io_test_DEPENDENCIES = $(TOOLS_LDADD) \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__tools_misc_helpers_SOURCES_DIST = tools/misc_helpers.cpp -@ENABLE_TOOLS_TRUE@am_tools_misc_helpers_OBJECTS = tools/tools_misc_helpers-misc_helpers.$(OBJEXT) -tools_misc_helpers_OBJECTS = $(am_tools_misc_helpers_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_misc_helpers_DEPENDENCIES = $(TOOLS_LDADD) \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__tools_parser_test_SOURCES_DIST = tools/parser_test.cpp -@ENABLE_TOOLS_TRUE@am_tools_parser_test_OBJECTS = tools/tools_parser_test-parser_test.$(OBJEXT) -tools_parser_test_OBJECTS = $(am_tools_parser_test_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_parser_test_DEPENDENCIES = $(TOOLS_LDADD) \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__tools_pass_helper_SOURCES_DIST = tools/pass_helper.cpp -@ENABLE_TOOLS_TRUE@am_tools_pass_helper_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ tools/pass_helper.$(OBJEXT) -tools_pass_helper_OBJECTS = $(am_tools_pass_helper_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_pass_helper_DEPENDENCIES = $(ATF_CXX_LIBS) -am__tools_process_helpers_SOURCES_DIST = tools/process_helpers.c -@ENABLE_TOOLS_TRUE@am_tools_process_helpers_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ tools/process_helpers.$(OBJEXT) -tools_process_helpers_OBJECTS = $(am_tools_process_helpers_OBJECTS) -tools_process_helpers_LDADD = $(LDADD) -am__tools_process_test_SOURCES_DIST = tools/process_test.cpp -@ENABLE_TOOLS_TRUE@am_tools_process_test_OBJECTS = tools/tools_process_test-process_test.$(OBJEXT) -tools_process_test_OBJECTS = $(am_tools_process_test_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_process_test_DEPENDENCIES = $(TOOLS_LDADD) \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__tools_reader_test_SOURCES_DIST = tools/reader_test.cpp -@ENABLE_TOOLS_TRUE@am_tools_reader_test_OBJECTS = tools/tools_reader_test-reader_test.$(OBJEXT) -tools_reader_test_OBJECTS = $(am_tools_reader_test_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_reader_test_DEPENDENCIES = $(TOOLS_LDADD) \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__tools_requirements_test_SOURCES_DIST = \ - tools/requirements_test.cpp -@ENABLE_TOOLS_TRUE@am_tools_requirements_test_OBJECTS = tools/tools_requirements_test-requirements_test.$(OBJEXT) -tools_requirements_test_OBJECTS = \ - $(am_tools_requirements_test_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_requirements_test_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ $(TOOLS_LDADD) $(ATF_CXX_LIBS) -am__tools_several_tcs_helper_SOURCES_DIST = \ - tools/several_tcs_helper.c -@ENABLE_TOOLS_TRUE@am_tools_several_tcs_helper_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ tools/several_tcs_helper.$(OBJEXT) -tools_several_tcs_helper_OBJECTS = \ - $(am_tools_several_tcs_helper_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_several_tcs_helper_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ libatf-c.la -am__tools_signals_test_SOURCES_DIST = tools/signals_test.cpp \ - tools/signals.cpp -@ENABLE_TOOLS_TRUE@am_tools_signals_test_OBJECTS = tools/tools_signals_test-signals_test.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ tools/tools_signals_test-signals.$(OBJEXT) -tools_signals_test_OBJECTS = $(am_tools_signals_test_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_signals_test_DEPENDENCIES = $(TOOLS_LDADD) \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__tools_test_program_test_SOURCES_DIST = \ - tools/test_program_test.cpp -@ENABLE_TOOLS_TRUE@am_tools_test_program_test_OBJECTS = tools/tools_test_program_test-test_program_test.$(OBJEXT) -tools_test_program_test_OBJECTS = \ - $(am_tools_test_program_test_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_test_program_test_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ $(TOOLS_LDADD) $(ATF_CXX_LIBS) -am__tools_text_test_SOURCES_DIST = tools/text_test.cpp tools/text.cpp -@ENABLE_TOOLS_TRUE@am_tools_text_test_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ tools/tools_text_test-text_test.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ tools/tools_text_test-text.$(OBJEXT) -tools_text_test_OBJECTS = $(am_tools_text_test_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_text_test_DEPENDENCIES = $(TOOLS_LDADD) \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__tools_ui_test_SOURCES_DIST = tools/ui_test.cpp tools/ui.cpp -@ENABLE_TOOLS_TRUE@am_tools_ui_test_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ tools/tools_ui_test-ui_test.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ tools/tools_ui_test-ui.$(OBJEXT) -tools_ui_test_OBJECTS = $(am_tools_ui_test_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_ui_test_DEPENDENCIES = $(TOOLS_LDADD) \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__tools_user_test_SOURCES_DIST = tools/user_test.cpp tools/user.cpp -@ENABLE_TOOLS_TRUE@am_tools_user_test_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ tools/tools_user_test-user_test.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ tools/tools_user_test-user.$(OBJEXT) -tools_user_test_OBJECTS = $(am_tools_user_test_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_user_test_DEPENDENCIES = $(TOOLS_LDADD) \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__tools_zero_tcs_helper_SOURCES_DIST = tools/zero_tcs_helper.c -@ENABLE_TOOLS_TRUE@am_tools_zero_tcs_helper_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ tools/zero_tcs_helper.$(OBJEXT) -tools_zero_tcs_helper_OBJECTS = $(am_tools_zero_tcs_helper_OBJECTS) -@ENABLE_TOOLS_TRUE@tools_zero_tcs_helper_DEPENDENCIES = libatf-c.la SCRIPTS = $(tests_atf_c_SCRIPTS) $(tests_atf_c___SCRIPTS) \ - $(tests_atf_sh_SCRIPTS) $(tests_test_programs_SCRIPTS) \ - $(tests_tools_SCRIPTS) + $(tests_atf_sh_SCRIPTS) $(tests_test_programs_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -1112,9 +790,7 @@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = -SOURCES = $(tools_libtools_a_SOURCES) \ - $(nodist_tools_libtools_a_SOURCES) \ - $(atf_c___detail_libtest_helpers_la_SOURCES) \ +SOURCES = $(atf_c___detail_libtest_helpers_la_SOURCES) \ $(atf_c_detail_libtest_helpers_la_SOURCES) \ $(libatf_c___la_SOURCES) $(libatf_c_la_SOURCES) \ $(nodist_libatf_c_la_SOURCES) $(atf_c___atf_c___test_SOURCES) \ @@ -1147,33 +823,11 @@ SOURCES = $(tools_libtools_a_SOURCES) \ $(atf_c_error_test_SOURCES) $(atf_c_macros_test_SOURCES) \ $(atf_c_tc_test_SOURCES) $(atf_c_tp_test_SOURCES) \ $(atf_c_utils_test_SOURCES) $(atf_sh_atf_check_SOURCES) \ - $(atf_sh_atf_sh_SOURCES) $(bootstrap_h_app_empty_SOURCES) \ - $(bootstrap_h_app_opts_args_SOURCES) \ - $(bootstrap_h_tp_basic_c_SOURCES) \ + $(atf_sh_atf_sh_SOURCES) $(bootstrap_h_tp_basic_c_SOURCES) \ $(bootstrap_h_tp_basic_cpp_SOURCES) \ $(test_programs_c_helpers_SOURCES) \ - $(test_programs_cpp_helpers_SOURCES) \ - $(tools_application_test_SOURCES) $(tools_atf_config_SOURCES) \ - $(tools_atf_report_SOURCES) $(tools_atf_run_SOURCES) \ - $(tools_atf_version_SOURCES) \ - $(nodist_tools_atf_version_SOURCES) \ - $(tools_atffile_test_SOURCES) $(tools_auto_array_test_SOURCES) \ - $(tools_bad_metadata_helper_SOURCES) \ - $(tools_config_file_test_SOURCES) $(tools_config_test_SOURCES) \ - $(tools_env_test_SOURCES) $(tools_expand_test_SOURCES) \ - $(tools_expect_helpers_SOURCES) $(tools_fail_helper_SOURCES) \ - $(tools_fs_test_SOURCES) $(tools_io_test_SOURCES) \ - $(tools_misc_helpers_SOURCES) $(tools_parser_test_SOURCES) \ - $(tools_pass_helper_SOURCES) $(tools_process_helpers_SOURCES) \ - $(tools_process_test_SOURCES) $(tools_reader_test_SOURCES) \ - $(tools_requirements_test_SOURCES) \ - $(tools_several_tcs_helper_SOURCES) \ - $(tools_signals_test_SOURCES) \ - $(tools_test_program_test_SOURCES) $(tools_text_test_SOURCES) \ - $(tools_ui_test_SOURCES) $(tools_user_test_SOURCES) \ - $(tools_zero_tcs_helper_SOURCES) -DIST_SOURCES = $(am__tools_libtools_a_SOURCES_DIST) \ - $(atf_c___detail_libtest_helpers_la_SOURCES) \ + $(test_programs_cpp_helpers_SOURCES) +DIST_SOURCES = $(atf_c___detail_libtest_helpers_la_SOURCES) \ $(atf_c_detail_libtest_helpers_la_SOURCES) \ $(libatf_c___la_SOURCES) $(libatf_c_la_SOURCES) \ $(atf_c___atf_c___test_SOURCES) $(atf_c___build_test_SOURCES) \ @@ -1205,42 +859,10 @@ DIST_SOURCES = $(am__tools_libtools_a_SO $(atf_c_error_test_SOURCES) $(atf_c_macros_test_SOURCES) \ $(atf_c_tc_test_SOURCES) $(atf_c_tp_test_SOURCES) \ $(atf_c_utils_test_SOURCES) $(atf_sh_atf_check_SOURCES) \ - $(atf_sh_atf_sh_SOURCES) $(bootstrap_h_app_empty_SOURCES) \ - $(bootstrap_h_app_opts_args_SOURCES) \ - $(bootstrap_h_tp_basic_c_SOURCES) \ + $(atf_sh_atf_sh_SOURCES) $(bootstrap_h_tp_basic_c_SOURCES) \ $(bootstrap_h_tp_basic_cpp_SOURCES) \ $(test_programs_c_helpers_SOURCES) \ - $(test_programs_cpp_helpers_SOURCES) \ - $(am__tools_application_test_SOURCES_DIST) \ - $(am__tools_atf_config_SOURCES_DIST) \ - $(am__tools_atf_report_SOURCES_DIST) \ - $(am__tools_atf_run_SOURCES_DIST) \ - $(am__tools_atf_version_SOURCES_DIST) \ - $(am__tools_atffile_test_SOURCES_DIST) \ - $(am__tools_auto_array_test_SOURCES_DIST) \ - $(am__tools_bad_metadata_helper_SOURCES_DIST) \ - $(am__tools_config_file_test_SOURCES_DIST) \ - $(am__tools_config_test_SOURCES_DIST) \ - $(am__tools_env_test_SOURCES_DIST) \ - $(am__tools_expand_test_SOURCES_DIST) \ - $(am__tools_expect_helpers_SOURCES_DIST) \ - $(am__tools_fail_helper_SOURCES_DIST) \ - $(am__tools_fs_test_SOURCES_DIST) \ - $(am__tools_io_test_SOURCES_DIST) \ - $(am__tools_misc_helpers_SOURCES_DIST) \ - $(am__tools_parser_test_SOURCES_DIST) \ - $(am__tools_pass_helper_SOURCES_DIST) \ - $(am__tools_process_helpers_SOURCES_DIST) \ - $(am__tools_process_test_SOURCES_DIST) \ - $(am__tools_reader_test_SOURCES_DIST) \ - $(am__tools_requirements_test_SOURCES_DIST) \ - $(am__tools_several_tcs_helper_SOURCES_DIST) \ - $(am__tools_signals_test_SOURCES_DIST) \ - $(am__tools_test_program_test_SOURCES_DIST) \ - $(am__tools_text_test_SOURCES_DIST) \ - $(am__tools_ui_test_SOURCES_DIST) \ - $(am__tools_user_test_SOURCES_DIST) \ - $(am__tools_zero_tcs_helper_SOURCES_DIST) + $(test_programs_cpp_helpers_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -1249,17 +871,14 @@ am__can_run_installinfo = \ man1dir = $(mandir)/man1 man3dir = $(mandir)/man3 man4dir = $(mandir)/man4 -man5dir = $(mandir)/man5 -man7dir = $(mandir)/man7 NROFF = nroff MANS = $(dist_man_MANS) $(man_MANS) DATA = $(atf_aclocal_DATA) $(atf_c__dirpkgconfig_DATA) \ $(atf_cpkgconfig_DATA) $(atf_sh_DATA) $(atf_shpkgconfig_DATA) \ - $(css_DATA) $(doc_DATA) $(dtd_DATA) $(eg_DATA) $(hooks_DATA) \ - $(noinst_DATA) $(pkgtests_DATA) $(tests_atf_c_DATA) \ - $(tests_atf_c___DATA) $(tests_atf_c___detail_DATA) \ - $(tests_atf_c_detail_DATA) $(tests_atf_sh_DATA) \ - $(tests_test_programs_DATA) $(tests_tools_DATA) $(xsl_DATA) + $(doc_DATA) $(noinst_DATA) $(pkgtests_DATA) \ + $(tests_atf_c_DATA) $(tests_atf_c___DATA) \ + $(tests_atf_c___detail_DATA) $(tests_atf_c_detail_DATA) \ + $(tests_atf_sh_DATA) $(tests_test_programs_DATA) HEADERS = $(atf_c_HEADERS) $(atf_c___HEADERS) $(include_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)bconfig.h.in @@ -1310,7 +929,6 @@ ATF_BUILD_CPP = @ATF_BUILD_CPP@ ATF_BUILD_CPPFLAGS = @ATF_BUILD_CPPFLAGS@ ATF_BUILD_CXX = @ATF_BUILD_CXX@ ATF_BUILD_CXXFLAGS = @ATF_BUILD_CXXFLAGS@ -ATF_CONFSUBDIR = @ATF_CONFSUBDIR@ ATF_SHELL = @ATF_SHELL@ ATF_WORKDIR = @ATF_WORKDIR@ ATTRIBUTE_FORMAT_PRINTF = @ATTRIBUTE_FORMAT_PRINTF@ @@ -1339,10 +957,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ENABLE_TOOLS = @ENABLE_TOOLS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GDB = @GDB@ GIT = @GIT@ GREP = @GREP@ INSTALL = @INSTALL@ @@ -1396,14 +1012,7 @@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ atf_aclocaldir = @atf_aclocaldir@ -atf_arch = @atf_arch@ -atf_confdir = @atf_confdir@ -atf_cssdir = @atf_cssdir@ -atf_dtddir = @atf_dtddir@ -atf_egdir = @atf_egdir@ -atf_machine = @atf_machine@ atf_pkgconfigdir = @atf_pkgconfigdir@ -atf_xsldir = @atf_xsldir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -1451,7 +1060,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ atf_aclocal_DATA = atf-c/atf-common.m4 atf-c/atf-c.m4 \ atf-c++/atf-c++.m4 atf-sh/atf-sh.m4 -BUILT_SOURCES = $(am__append_5) +BUILT_SOURCES = CLEANFILES = atf-c/atf-c.pc atf-c/pkg_config_test atf-c++/atf-c++.pc \ atf-c++/pkg_config_test atf-sh/atf-sh.pc atf-sh/misc_helpers \ atf-sh/atf_check_test atf-sh/atf-check_test atf-sh/config_test \ @@ -1461,15 +1070,7 @@ CLEANFILES = atf-c/atf-c.pc atf-c/pkg_co bootstrap/h_tp_pass test-programs/sh_helpers \ test-programs/config_test test-programs/expect_test \ test-programs/meta_data_test test-programs/result_test \ - test-programs/srcdir_test $(am__append_6) - -# XXX For some reason, the nodist line above does not work as expected. -# Work this problem around. - -# -# Custom targets. -# -DIST_HOOKS = kill-defs-h $(am__append_1) forbid-dist + test-programs/srcdir_test EXTRA_DIST = admin/check-style-common.awk admin/check-style-c.awk \ admin/check-style-cpp.awk admin/check-style-man.awk \ admin/check-style-shell.awk admin/check-style.sh \ @@ -1491,20 +1092,23 @@ EXTRA_DIST = admin/check-style-common.aw test-programs/sh_helpers.sh test-programs/config_test.sh \ test-programs/expect_test.sh test-programs/meta_data_test.sh \ test-programs/result_test.sh test-programs/srcdir_test.sh \ - $(am__append_4) $(doc_DATA) INSTALL README $(pkgtests_DATA) + $(doc_DATA) INSTALL README $(pkgtests_DATA) dist_man_MANS = atf-c/atf-c-api.3 atf-c++/atf-c++-api.3 \ atf-sh/atf-check.1 atf-sh/atf-sh.1 atf-sh/atf-sh-api.3 \ - doc/atf-test-case.4 doc/atf-test-program.1 $(am__append_3) + doc/atf-test-case.4 doc/atf-test-program.1 include_HEADERS = atf-c.h atf-c++.hpp lib_LTLIBRARIES = libatf-c.la libatf-c++.la -man_MANS = $(am__append_8) +man_MANS = noinst_DATA = INSTALL README noinst_LTLIBRARIES = atf-c/detail/libtest_helpers.la \ atf-c++/detail/libtest_helpers.la -INSTALLCHECK_TARGETS = installcheck-bootstrap $(am__append_9) \ - $(am__append_10) -PHONY_TARGETS = check-style installcheck-bootstrap $(am__append_7) \ - installcheck-kyua clean-all release release-test +INSTALLCHECK_TARGETS = installcheck-bootstrap $(am__append_1) + +# +# Custom targets. +# +PHONY_TARGETS = check-style installcheck-bootstrap installcheck-kyua \ + clean-all release release-test ACLOCAL_AMFLAGS = -I m4 AM_DISTCHECK_CONFIGURE_FLAGS = --enable-tools libatf_c_la_SOURCES = atf-c/build.c atf-c/build.h atf-c/check.c \ @@ -1546,8 +1150,7 @@ atf_c_HEADERS = atf-c/build.h \ atf_cdir = $(includedir)/atf-c atf_cpkgconfigdir = $(atf_pkgconfigdir) atf_cpkgconfig_DATA = atf-c/atf-c.pc -tests_atf_c_DATA = atf-c/Atffile \ - atf-c/Kyuafile \ +tests_atf_c_DATA = atf-c/Kyuafile \ atf-c/macros_h_test.c \ atf-c/unused_test.c @@ -1571,9 +1174,7 @@ atf_c_tp_test_SOURCES = atf-c/tp_test.c atf_c_tp_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la atf_c_utils_test_SOURCES = atf-c/utils_test.c atf-c/h_build.h atf_c_utils_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la -tests_atf_c_detail_DATA = atf-c/detail/Atffile \ - atf-c/detail/Kyuafile - +tests_atf_c_detail_DATA = atf-c/detail/Kyuafile tests_atf_c_detaildir = $(pkgtestsdir)/atf-c/detail atf_c_detail_libtest_helpers_la_SOURCES = atf-c/detail/test_helpers.c \ atf-c/detail/test_helpers.h @@ -1623,8 +1224,7 @@ atf_c___HEADERS = atf-c++/build.hpp \ atf_c__dir = $(includedir)/atf-c++ atf_c__dirpkgconfigdir = $(atf_pkgconfigdir) atf_c__dirpkgconfig_DATA = atf-c++/atf-c++.pc -tests_atf_c___DATA = atf-c++/Atffile \ - atf-c++/Kyuafile \ +tests_atf_c___DATA = atf-c++/Kyuafile \ atf-c++/macros_hpp_test.cpp \ atf-c++/unused_test.cpp @@ -1644,9 +1244,7 @@ atf_c___tests_test_SOURCES = atf-c++/tes atf_c___tests_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) atf_c___utils_test_SOURCES = atf-c++/utils_test.cpp atf_c___utils_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) -tests_atf_c___detail_DATA = atf-c++/detail/Atffile \ - atf-c++/detail/Kyuafile - +tests_atf_c___detail_DATA = atf-c++/detail/Kyuafile tests_atf_c___detaildir = $(pkgtestsdir)/atf-c++/detail atf_c___detail_libtest_helpers_la_SOURCES = atf-c++/detail/test_helpers.cpp \ atf-c++/detail/test_helpers.hpp @@ -1676,18 +1274,12 @@ atf_sh_DATA = atf-sh/libatf-sh.subr atf_shdir = $(pkgdatadir) atf_shpkgconfigdir = $(atf_pkgconfigdir) atf_shpkgconfig_DATA = atf-sh/atf-sh.pc -tests_atf_sh_DATA = atf-sh/Atffile \ - atf-sh/Kyuafile - +tests_atf_sh_DATA = atf-sh/Kyuafile tests_atf_shdir = $(pkgtestsdir)/atf-sh tests_atf_sh_SCRIPTS = atf-sh/misc_helpers atf-sh/atf_check_test \ atf-sh/atf-check_test atf-sh/config_test \ atf-sh/integration_test atf-sh/normalize_test atf-sh/tc_test \ atf-sh/tp_test -bootstrap_h_app_empty_SOURCES = bootstrap/h_app_empty.cpp -bootstrap_h_app_empty_LDADD = tools/libtools.a $(ATF_CXX_LIBS) -bootstrap_h_app_opts_args_SOURCES = bootstrap/h_app_opts_args.cpp -bootstrap_h_app_opts_args_LDADD = tools/libtools.a $(ATF_CXX_LIBS) bootstrap_h_tp_basic_c_SOURCES = bootstrap/h_tp_basic_c.c bootstrap_h_tp_basic_c_LDADD = libatf-c.la bootstrap_h_tp_basic_cpp_SOURCES = bootstrap/h_tp_basic_cpp.cpp @@ -1699,19 +1291,13 @@ DISTCLEANFILES = \ testsuite.lineno \ testsuite.log -testsuite_incs = $(srcdir)/bootstrap/t_application_help.at \ - $(srcdir)/bootstrap/t_application_opts_args.at \ - $(srcdir)/bootstrap/t_atf_config.at \ - $(srcdir)/bootstrap/t_atf_run.at \ - $(srcdir)/bootstrap/t_subr_atf_check.at \ +testsuite_incs = $(srcdir)/bootstrap/t_subr_atf_check.at \ $(srcdir)/bootstrap/t_test_program_compare.at \ $(srcdir)/bootstrap/t_test_program_filter.at \ $(srcdir)/bootstrap/t_test_program_list.at \ $(srcdir)/bootstrap/t_test_program_run.at -tests_test_programs_DATA = test-programs/Atffile \ - test-programs/Kyuafile - +tests_test_programs_DATA = test-programs/Kyuafile tests_test_programsdir = $(pkgtestsdir)/test-programs test_programs_c_helpers_SOURCES = test-programs/c_helpers.c test_programs_c_helpers_LDADD = libatf-c.la @@ -1722,166 +1308,6 @@ tests_test_programs_SCRIPTS = test-progr test-programs/config_test test-programs/expect_test \ test-programs/meta_data_test test-programs/result_test \ test-programs/srcdir_test -@ENABLE_TOOLS_TRUE@TOOLS_CPPFLAGS = -I$(top_srcdir)/tools -I$(top_builddir)/tools -@ENABLE_TOOLS_TRUE@TOOLS_LDADD = tools/libtools.a -@ENABLE_TOOLS_TRUE@noinst_LIBRARIES = tools/libtools.a -@ENABLE_TOOLS_TRUE@tools_libtools_a_SOURCES = tools/application.cpp \ -@ENABLE_TOOLS_TRUE@ tools/application.hpp \ -@ENABLE_TOOLS_TRUE@ tools/atffile.cpp \ -@ENABLE_TOOLS_TRUE@ tools/atffile.hpp \ -@ENABLE_TOOLS_TRUE@ tools/auto_array.hpp \ -@ENABLE_TOOLS_TRUE@ tools/config.cpp \ -@ENABLE_TOOLS_TRUE@ tools/config.hpp \ -@ENABLE_TOOLS_TRUE@ tools/config_file.cpp \ -@ENABLE_TOOLS_TRUE@ tools/config_file.hpp \ -@ENABLE_TOOLS_TRUE@ tools/env.cpp \ -@ENABLE_TOOLS_TRUE@ tools/env.hpp \ -@ENABLE_TOOLS_TRUE@ tools/exceptions.cpp \ -@ENABLE_TOOLS_TRUE@ tools/exceptions.hpp \ -@ENABLE_TOOLS_TRUE@ tools/expand.cpp \ -@ENABLE_TOOLS_TRUE@ tools/expand.hpp \ -@ENABLE_TOOLS_TRUE@ tools/fs.cpp \ -@ENABLE_TOOLS_TRUE@ tools/fs.hpp \ -@ENABLE_TOOLS_TRUE@ tools/io.cpp \ -@ENABLE_TOOLS_TRUE@ tools/io.hpp \ -@ENABLE_TOOLS_TRUE@ tools/parser.cpp \ -@ENABLE_TOOLS_TRUE@ tools/parser.hpp \ -@ENABLE_TOOLS_TRUE@ tools/process.cpp \ -@ENABLE_TOOLS_TRUE@ tools/process.hpp \ -@ENABLE_TOOLS_TRUE@ tools/reader.cpp \ -@ENABLE_TOOLS_TRUE@ tools/reader.hpp \ -@ENABLE_TOOLS_TRUE@ tools/requirements.cpp \ -@ENABLE_TOOLS_TRUE@ tools/requirements.hpp \ -@ENABLE_TOOLS_TRUE@ tools/signals.cpp \ -@ENABLE_TOOLS_TRUE@ tools/signals.hpp \ -@ENABLE_TOOLS_TRUE@ tools/test-program.cpp \ -@ENABLE_TOOLS_TRUE@ tools/test-program.hpp \ -@ENABLE_TOOLS_TRUE@ tools/test_helpers.hpp \ -@ENABLE_TOOLS_TRUE@ tools/text.cpp \ -@ENABLE_TOOLS_TRUE@ tools/text.hpp \ -@ENABLE_TOOLS_TRUE@ tools/timers.cpp \ -@ENABLE_TOOLS_TRUE@ tools/timers.hpp \ -@ENABLE_TOOLS_TRUE@ tools/ui.cpp \ -@ENABLE_TOOLS_TRUE@ tools/ui.hpp \ -@ENABLE_TOOLS_TRUE@ tools/user.cpp \ -@ENABLE_TOOLS_TRUE@ tools/user.hpp - -@ENABLE_TOOLS_TRUE@nodist_tools_libtools_a_SOURCES = tools/defs.hpp -@ENABLE_TOOLS_TRUE@tools_libtools_a_CPPFLAGS = "-DATF_ARCH=\"$(atf_arch)\"" \ -@ENABLE_TOOLS_TRUE@ "-DATF_BUILD_CC=\"$(ATF_BUILD_CC)\"" \ -@ENABLE_TOOLS_TRUE@ "-DATF_BUILD_CFLAGS=\"$(ATF_BUILD_CFLAGS)\"" \ -@ENABLE_TOOLS_TRUE@ "-DATF_BUILD_CPP=\"$(ATF_BUILD_CPP)\"" \ -@ENABLE_TOOLS_TRUE@ "-DATF_BUILD_CPPFLAGS=\"$(ATF_BUILD_CPPFLAGS)\"" \ -@ENABLE_TOOLS_TRUE@ "-DATF_BUILD_CXX=\"$(ATF_BUILD_CXX)\"" \ -@ENABLE_TOOLS_TRUE@ "-DATF_BUILD_CXXFLAGS=\"$(ATF_BUILD_CXXFLAGS)\"" \ -@ENABLE_TOOLS_TRUE@ "-DATF_CONFDIR=\"$(atf_confdir)\"" \ -@ENABLE_TOOLS_TRUE@ "-DATF_INCLUDEDIR=\"$(includedir)\"" \ -@ENABLE_TOOLS_TRUE@ "-DATF_LIBDIR=\"$(libdir)\"" \ -@ENABLE_TOOLS_TRUE@ "-DATF_LIBEXECDIR=\"$(libexecdir)\"" \ -@ENABLE_TOOLS_TRUE@ "-DATF_MACHINE=\"$(atf_machine)\"" \ -@ENABLE_TOOLS_TRUE@ "-DATF_PKGDATADIR=\"$(pkgdatadir)\"" \ -@ENABLE_TOOLS_TRUE@ "-DATF_SHELL=\"$(ATF_SHELL)\"" \ -@ENABLE_TOOLS_TRUE@ "-DATF_WORKDIR=\"$(ATF_WORKDIR)\"" \ -@ENABLE_TOOLS_TRUE@ $(TOOLS_CPPFLAGS) - -@ENABLE_TOOLS_TRUE@tools_atf_config_SOURCES = tools/atf-config.cpp -@ENABLE_TOOLS_TRUE@tools_atf_config_CPPFLAGS = $(TOOLS_CPPFLAGS) -@ENABLE_TOOLS_TRUE@tools_atf_config_LDADD = $(TOOLS_LDADD) -@ENABLE_TOOLS_TRUE@tools_atf_report_SOURCES = tools/atf-report.cpp -@ENABLE_TOOLS_TRUE@tools_atf_report_CPPFLAGS = $(TOOLS_CPPFLAGS) -@ENABLE_TOOLS_TRUE@tools_atf_report_LDADD = $(TOOLS_LDADD) -@ENABLE_TOOLS_TRUE@tools_atf_run_CPPFLAGS = $(TOOLS_CPPFLAGS) "-DGDB=\"$(GDB)\"" -@ENABLE_TOOLS_TRUE@tools_atf_run_SOURCES = tools/atf-run.cpp -@ENABLE_TOOLS_TRUE@tools_atf_run_LDADD = $(TOOLS_LDADD) -@ENABLE_TOOLS_TRUE@tools_atf_version_SOURCES = tools/atf-version.cpp -@ENABLE_TOOLS_TRUE@nodist_tools_atf_version_SOURCES = tools/revision.h -@ENABLE_TOOLS_TRUE@tools_atf_version_CPPFLAGS = $(TOOLS_CPPFLAGS) -@ENABLE_TOOLS_TRUE@tools_atf_version_LDADD = $(TOOLS_LDADD) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 14:44:34 2014 Return-Path: Delivered-To: svn-src-all@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 E44E2985; Fri, 14 Feb 2014 14:44: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 B56FB1F6B; Fri, 14 Feb 2014 14:44:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1EEiY3R077574; Fri, 14 Feb 2014 14:44:34 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1EEiYdt077573; Fri, 14 Feb 2014 14:44:34 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201402141444.s1EEiYdt077573@svn.freebsd.org> From: Julio Merino Date: Fri, 14 Feb 2014 14:44:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r261889 - vendor/atf/atf-0.20 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 14:44:35 -0000 Author: jmmv Date: Fri Feb 14 14:44:34 2014 New Revision: 261889 URL: http://svnweb.freebsd.org/changeset/base/261889 Log: Tag import of atf-0.20. Added: vendor/atf/atf-0.20/ - copied from r261888, vendor/atf/dist/ From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 15:03:56 2014 Return-Path: Delivered-To: svn-src-all@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 544A08B5; Fri, 14 Feb 2014 15:03:56 +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 40C4411DA; Fri, 14 Feb 2014 15:03:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1EF3u3D087578; Fri, 14 Feb 2014 15:03:56 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1EF3tWr087576; Fri, 14 Feb 2014 15:03:55 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201402141503.s1EF3tWr087576@svn.freebsd.org> From: Andriy Gapon Date: Fri, 14 Feb 2014 15:03:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261890 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 15:03:56 -0000 Author: avg Date: Fri Feb 14 15:03:55 2014 New Revision: 261890 URL: http://svnweb.freebsd.org/changeset/base/261890 Log: update taskqueue(9) manual page Many thanks to bjk, gjb and pluknet for improvements and suggestions. MFC after: 5 days Sponsored by: HybridCluster Modified: head/share/man/man9/Makefile head/share/man/man9/taskqueue.9 Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Fri Feb 14 14:44:34 2014 (r261889) +++ head/share/man/man9/Makefile Fri Feb 14 15:03:55 2014 (r261890) @@ -1350,6 +1350,7 @@ MLINKS+=sysctl_ctx_init.9 sysctl_ctx_ent MLINKS+=SYSINIT.9 SYSUNINIT.9 MLINKS+=taskqueue.9 TASK_INIT.9 \ taskqueue.9 TASK_INITIALIZER.9 \ + taskqueue.9 taskqueue_block.9 \ taskqueue.9 taskqueue_cancel.9 \ taskqueue.9 taskqueue_create.9 \ taskqueue.9 taskqueue_create_fast.9 \ @@ -1357,13 +1358,15 @@ MLINKS+=taskqueue.9 TASK_INIT.9 \ taskqueue.9 TASKQUEUE_DEFINE.9 \ taskqueue.9 TASKQUEUE_DEFINE_THREAD.9 \ taskqueue.9 taskqueue_drain.9 \ + taskqueue.9 taskqueue_drain_all.9 \ taskqueue.9 taskqueue_enqueue.9 \ taskqueue.9 taskqueue_enqueue_fast.9 \ taskqueue.9 TASKQUEUE_FAST_DEFINE.9 \ taskqueue.9 TASKQUEUE_FAST_DEFINE_THREAD.9 \ taskqueue.9 taskqueue_free.9 \ taskqueue.9 taskqueue_member.9 \ - taskqueue.9 taskqueue_run.9 + taskqueue.9 taskqueue_run.9 \ + taskqueue.9 taskqueue_unblock.9 MLINKS+=time.9 boottime.9 \ time.9 time_second.9 \ time.9 time_uptime.9 Modified: head/share/man/man9/taskqueue.9 ============================================================================== --- head/share/man/man9/taskqueue.9 Fri Feb 14 14:44:34 2014 (r261889) +++ head/share/man/man9/taskqueue.9 Fri Feb 14 15:03:55 2014 (r261890) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 4, 2012 +.Dd January 24, 2014 .Dt TASKQUEUE 9 .Os .Sh NAME @@ -86,6 +86,12 @@ struct timeout_task; .Fn taskqueue_drain "struct taskqueue *queue" "struct task *task" .Ft void .Fn taskqueue_drain_timeout "struct taskqueue *queue" "struct timeout_task *timeout_task" +.Ft void +.Fn taskqueue_drain_all "struct taskqueue *queue" +.Ft void +.Fn taskqueue_block "struct taskqueue *queue" +.Ft void +.Fn taskqueue_unblock "struct taskqueue *queue" .Ft int .Fn taskqueue_member "struct taskqueue *queue" "struct thread *td" .Ft void @@ -255,6 +261,73 @@ function is used to wait for the schedul There is no guarantee that the task will not be enqueued after call to .Fn taskqueue_drain . +If the caller wants to put the task into a known state, +then before calling +.Fn taskqueue_drain +the caller should use out-of-band means to ensure that the task +would not be enqueued. +For example, if the task is enqueued by an interrupt filter, then +the interrupt could be disabled. +.Pp +The +.Fn taskqueue_drain_all +function is used to wait for all pending and running tasks that +are enqueued on the taskqueue to finish. +The caller must arrange that the tasks are not re-enqueued. +Note that +.Fn taskqueue_drain_all +currently does not handle tasks with delayed enqueueing. +.Pp +The +.Fn taskqueue_block +function blocks the taskqueue. +It prevents any enqueued but not running tasks from being executed. +Future calls to +.Fn taskqueue_enqueue +will enqueue tasks, but the tasks will not be run until +.Fn taskqueue_unblock +is called. +Please note that +.Fn taskqueue_block +does not wait for any currently running tasks to finish. +Thus, the +.Fn taskqueue_block +does not provide a guarantee that +.Fn taskqueue_run +is not running after +.Fn taskqueue_block +returns, but it does provide a guarantee that +.Fn taskqueue_run +will not be called again +until +.Fn taskqueue_unblock +is called. +If the caller requires a guarantee that +.Fn taskqueue_run +is not running, then this must be arranged by the caller. +Note that if +.Fn taskqueue_drain +is called on a task that is enqueued on a taskqueue that is blocked by +.Fn taskqueue_block , +then +.Fn taskqueue_drain +can not return until the taskqueue is unblocked. +This can result in a deadlock if the thread blocked in +.Fn taskqueue_drain +is the thread that is supposed to call +.Fn taskqueue_unblock . +Thus, use of +.Fn taskqueue_drain +after +.Fn taskqueue_block +is discouraged, because the state of the task can not be known in advance. +The same caveat applies to +.Fn taskqueue_drain_all . +.Pp +The +.Fn taskqueue_unblock +function unblocks the previously blocked taskqueue. +All enqueued tasks can be run after this call. .Pp The .Fn taskqueue_member From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 15:18:40 2014 Return-Path: Delivered-To: svn-src-all@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 00EB74F9; Fri, 14 Feb 2014 15:18:39 +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 DEFF9132D; Fri, 14 Feb 2014 15:18:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1EFId2p092642; Fri, 14 Feb 2014 15:18:39 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1EFIb85092631; Fri, 14 Feb 2014 15:18:37 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201402141518.s1EFIb85092631@svn.freebsd.org> From: Andriy Gapon Date: Fri, 14 Feb 2014 15:18:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261891 - in head/sys: amd64/include conf i386/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 15:18:40 -0000 Author: avg Date: Fri Feb 14 15:18:37 2014 New Revision: 261891 URL: http://svnweb.freebsd.org/changeset/base/261891 Log: provide fast versions of ffsl and flsl for i386; ffsll and flsll for amd64 Reviewed by: jhb MFC after: 10 days X-MFC note: consider thirdparty modules depending on these symbols Sponsored by: HybridCluster Modified: head/sys/amd64/include/cpufunc.h head/sys/conf/files head/sys/conf/files.arm head/sys/conf/files.i386 head/sys/conf/files.ia64 head/sys/conf/files.mips head/sys/conf/files.pc98 head/sys/conf/files.powerpc head/sys/conf/files.sparc64 head/sys/i386/include/cpufunc.h Modified: head/sys/amd64/include/cpufunc.h ============================================================================== --- head/sys/amd64/include/cpufunc.h Fri Feb 14 15:03:55 2014 (r261890) +++ head/sys/amd64/include/cpufunc.h Fri Feb 14 15:18:37 2014 (r261891) @@ -154,6 +154,14 @@ ffsl(long mask) return (mask == 0 ? mask : (int)bsfq((u_long)mask) + 1); } +#define HAVE_INLINE_FFSLL + +static __inline int +ffsll(long long mask) +{ + return (ffsl((long)mask)); +} + #define HAVE_INLINE_FLS static __inline int @@ -170,6 +178,14 @@ flsl(long mask) return (mask == 0 ? mask : (int)bsrq((u_long)mask) + 1); } +#define HAVE_INLINE_FLSLL + +static __inline int +flsll(long long mask) +{ + return (flsl((long)mask)); +} + #endif /* _KERNEL */ static __inline void Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Feb 14 15:03:55 2014 (r261890) +++ head/sys/conf/files Fri Feb 14 15:18:37 2014 (r261891) @@ -3025,7 +3025,6 @@ libkern/arc4random.c standard libkern/bcd.c standard libkern/bsearch.c standard libkern/crc32.c standard -libkern/flsll.c standard libkern/fnmatch.c standard libkern/iconv.c optional libiconv libkern/iconv_converter_if.m optional libiconv Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Fri Feb 14 15:03:55 2014 (r261890) +++ head/sys/conf/files.arm Fri Feb 14 15:18:37 2014 (r261891) @@ -89,6 +89,7 @@ libkern/divdi3.c standard libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard +libkern/flsll.c standard libkern/lshrdi3.c standard libkern/moddi3.c standard libkern/qdivrem.c standard Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Fri Feb 14 15:03:55 2014 (r261890) +++ head/sys/conf/files.i386 Fri Feb 14 15:18:37 2014 (r261891) @@ -536,8 +536,7 @@ kern/kern_clocksource.c standard kern/imgact_aout.c optional compat_aout kern/imgact_gzip.c optional gzip libkern/divdi3.c standard -libkern/ffsl.c standard -libkern/flsl.c standard +libkern/flsll.c standard libkern/memmove.c standard libkern/memset.c standard libkern/moddi3.c standard Modified: head/sys/conf/files.ia64 ============================================================================== --- head/sys/conf/files.ia64 Fri Feb 14 15:03:55 2014 (r261890) +++ head/sys/conf/files.ia64 Fri Feb 14 15:18:37 2014 (r261891) @@ -120,6 +120,7 @@ libkern/bcmp.c standard libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard +libkern/flsll.c standard libkern/ia64/__divdi3.S standard libkern/ia64/__divsi3.S standard libkern/ia64/__moddi3.S standard Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Fri Feb 14 15:03:55 2014 (r261890) +++ head/sys/conf/files.mips Fri Feb 14 15:18:37 2014 (r261891) @@ -56,6 +56,7 @@ kern/subr_dummy_vdso_tc.c standard libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard +libkern/flsll.c standard libkern/memmove.c standard libkern/cmpdi2.c optional mips | mipsel libkern/ucmpdi2.c optional mips | mipsel Modified: head/sys/conf/files.pc98 ============================================================================== --- head/sys/conf/files.pc98 Fri Feb 14 15:03:55 2014 (r261890) +++ head/sys/conf/files.pc98 Fri Feb 14 15:18:37 2014 (r261891) @@ -208,8 +208,7 @@ kern/kern_clocksource.c standard kern/imgact_aout.c optional compat_aout kern/imgact_gzip.c optional gzip libkern/divdi3.c standard -libkern/ffsl.c standard -libkern/flsl.c standard +libkern/flsll.c standard libkern/memmove.c standard libkern/memset.c standard libkern/moddi3.c standard Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Fri Feb 14 15:03:55 2014 (r261890) +++ head/sys/conf/files.powerpc Fri Feb 14 15:18:37 2014 (r261891) @@ -80,6 +80,7 @@ libkern/ffs.c standard libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard +libkern/flsll.c standard libkern/lshrdi3.c optional powerpc libkern/memmove.c standard libkern/memset.c standard Modified: head/sys/conf/files.sparc64 ============================================================================== --- head/sys/conf/files.sparc64 Fri Feb 14 15:03:55 2014 (r261890) +++ head/sys/conf/files.sparc64 Fri Feb 14 15:18:37 2014 (r261891) @@ -68,6 +68,7 @@ libkern/ffs.c standard libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard +libkern/flsll.c standard libkern/memmove.c standard sparc64/central/central.c optional central sparc64/ebus/ebus.c optional ebus Modified: head/sys/i386/include/cpufunc.h ============================================================================== --- head/sys/i386/include/cpufunc.h Fri Feb 14 15:03:55 2014 (r261890) +++ head/sys/i386/include/cpufunc.h Fri Feb 14 15:18:37 2014 (r261891) @@ -184,6 +184,14 @@ ffs(int mask) return (mask == 0 ? mask : (int)bsfl((u_int)mask) + 1); } +#define HAVE_INLINE_FFSL + +static __inline int +ffsl(long mask) +{ + return (ffs((int)mask)); +} + #define HAVE_INLINE_FLS static __inline int @@ -192,6 +200,14 @@ fls(int mask) return (mask == 0 ? mask : (int)bsrl((u_int)mask) + 1); } +#define HAVE_INLINE_FLSL + +static __inline int +flsl(long mask) +{ + return (fls((int)mask)); +} + #endif /* _KERNEL */ static __inline void From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 15:20:50 2014 Return-Path: Delivered-To: svn-src-all@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 2B2966C3; Fri, 14 Feb 2014 15:20: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 1555F1352; Fri, 14 Feb 2014 15:20:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1EFKnhu094583; Fri, 14 Feb 2014 15:20:49 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1EFKn0s094582; Fri, 14 Feb 2014 15:20:49 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201402141520.s1EFKn0s094582@svn.freebsd.org> From: Andriy Gapon Date: Fri, 14 Feb 2014 15:20:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261892 - head/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 15:20:50 -0000 Author: avg Date: Fri Feb 14 15:20:49 2014 New Revision: 261892 URL: http://svnweb.freebsd.org/changeset/base/261892 Log: zpool.8: fix typo in option description of labelclear command MFC after: 5 days Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Fri Feb 14 15:18:37 2014 (r261891) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Fri Feb 14 15:20:49 2014 (r261892) @@ -1322,7 +1322,7 @@ The .Ar device must not be part of an active pool configuration. .Bl -tag -width indent -.It Fl v +.It Fl f Treat exported or foreign devices as inactive. .El .It Xo From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 15:21:22 2014 Return-Path: Delivered-To: svn-src-all@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 521C7819; Fri, 14 Feb 2014 15:21: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 3E72D13B2; Fri, 14 Feb 2014 15:21:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1EFLM6k095372; Fri, 14 Feb 2014 15:21:22 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1EFLMRZ095371; Fri, 14 Feb 2014 15:21:22 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201402141521.s1EFLMRZ095371@svn.freebsd.org> From: Andriy Gapon Date: Fri, 14 Feb 2014 15:21:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261893 - head/cddl/contrib/opensolaris/cmd/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 15:21:22 -0000 Author: avg Date: Fri Feb 14 15:21:21 2014 New Revision: 261893 URL: http://svnweb.freebsd.org/changeset/base/261893 Log: zfs.8: fix garbled options in a sample zfs send -R command line MFC after: 5 days Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Fri Feb 14 15:20:49 2014 (r261892) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Fri Feb 14 15:21:21 2014 (r261893) @@ -2556,7 +2556,7 @@ option to verify the name the receive op Force a rollback of the file system to the most recent snapshot before performing the receive operation. If receiving an incremental replication stream (for example, one generated by -.Qq Nm Cm send Fl R Fi iI ) , +.Qq Nm Cm send Fl R Bro Fl i | Fl I Brc ) , destroy snapshots and file systems that do not exist on the sending side. .El .It Xo From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 15:31:49 2014 Return-Path: Delivered-To: svn-src-all@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 97026FE3; Fri, 14 Feb 2014 15:31: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 82E82150A; Fri, 14 Feb 2014 15:31:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1EFVnfD099869; Fri, 14 Feb 2014 15:31:49 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1EFVmow099866; Fri, 14 Feb 2014 15:31:48 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201402141531.s1EFVmow099866@svn.freebsd.org> From: Andriy Gapon Date: Fri, 14 Feb 2014 15:31:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261894 - in head/etc: . devd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 15:31:49 -0000 Author: avg Date: Fri Feb 14 15:31:48 2014 New Revision: 261894 URL: http://svnweb.freebsd.org/changeset/base/261894 Log: move devd rules for zfs events into a separate file and fix stale event types Also, extend with some new events. Additionally, tag syslog messages with 'ZFS' instead of using explicit "ZFS: " prefix in the messages themselves. Tested by: Daniel O'Connor MFC after: 8 days Sponsored by: HybridCluster Added: head/etc/devd/zfs.conf (contents, props changed) Modified: head/etc/devd.conf head/etc/devd/Makefile Modified: head/etc/devd.conf ============================================================================== --- head/etc/devd.conf Fri Feb 14 15:21:21 2014 (r261893) +++ head/etc/devd.conf Fri Feb 14 15:31:48 2014 (r261894) @@ -246,37 +246,6 @@ notify 10 { action "logger -p kern.emerg 'WARNING: system temperature too high, shutting down soon!'"; }; -# Sample ZFS problem reports handling. -notify 10 { - match "system" "ZFS"; - match "type" "zpool"; - action "logger -p kern.err 'ZFS: failed to load zpool $pool'"; -}; - -notify 10 { - match "system" "ZFS"; - match "type" "vdev"; - action "logger -p kern.err 'ZFS: vdev failure, zpool=$pool type=$type'"; -}; - -notify 10 { - match "system" "ZFS"; - match "type" "data"; - action "logger -p kern.warn 'ZFS: zpool I/O failure, zpool=$pool error=$zio_err'"; -}; - -notify 10 { - match "system" "ZFS"; - match "type" "io"; - action "logger -p kern.warn 'ZFS: vdev I/O failure, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size error=$zio_err'"; -}; - -notify 10 { - match "system" "ZFS"; - match "type" "checksum"; - action "logger -p kern.warn 'ZFS: checksum mismatch, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size'"; -}; - # User requested suspend, so perform preparation steps and then execute # the actual suspend process. notify 10 { Modified: head/etc/devd/Makefile ============================================================================== --- head/etc/devd/Makefile Fri Feb 14 15:21:21 2014 (r261893) +++ head/etc/devd/Makefile Fri Feb 14 15:31:48 2014 (r261894) @@ -1,6 +1,6 @@ # $FreeBSD$ -FILES= uath.conf usb.conf +FILES= uath.conf usb.conf zfs.conf .if ${MACHINE} == "powerpc" FILES+= apple.conf Added: head/etc/devd/zfs.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/devd/zfs.conf Fri Feb 14 15:31:48 2014 (r261894) @@ -0,0 +1,77 @@ +# $FreeBSD$ +# +# Sample ZFS problem reports handling. + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.checksum"; + action "logger -p kern.warn -t ZFS 'checksum mismatch, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.io"; + action "logger -p kern.warn -t ZFS 'vdev I/O failure, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size error=$zio_err'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.data"; + action "logger -p kern.warn -t ZFS 'pool I/O failure, zpool=$pool error=$zio_err'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.zpool"; + action "logger -p kern.err -t ZFS 'failed to load zpool $pool'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.vdev\..*"; + action "logger -p kern.err -t ZFS 'vdev problem, zpool=$pool path=$vdev_path type=$type'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.io_failure"; + action "logger -p kern.alert -t ZFS 'catastrophic pool I/O failure, zpool=$pool'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.probe_failure"; + action "logger -p kern.err -t ZFS 'vdev probe failure, zpool=$pool path=$vdev_path'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.log_replay"; + action "logger -p kern.err -t ZFS 'pool log replay failure, zpool=$pool'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.config_cache_write"; + action "logger -p kern.warn -t ZFS 'failed to write zpool.cache, zpool=$pool'"; +}; + + +notify 10 { + match "system" "ZFS"; + match "type" "resource.fs.zfs.removed"; + action "logger -p kern.notice -t ZFS 'vdev is removed, pool_guid=$pool_guid vdev_guid=$vdev_guid'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "resource.fs.zfs.autoreplace"; + action "logger -p kern.info -t ZFS 'autoreplace is configured for vdev, pool_guid=$pool_guid vdev_guid=$vdev_guid'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "resource.fs.zfs.statechange"; + action "logger -p kern.notice -t ZFS 'vdev state changed, pool_guid=$pool_guid vdev_guid=$vdev_guid'"; +}; + From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 15:46:07 2014 Return-Path: Delivered-To: svn-src-all@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 8E8D24AB; Fri, 14 Feb 2014 15:46: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 5E781167B; Fri, 14 Feb 2014 15:46:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1EFk7fe005718; Fri, 14 Feb 2014 15:46:07 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1EFk7iR005717; Fri, 14 Feb 2014 15:46:07 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201402141546.s1EFk7iR005717@svn.freebsd.org> From: Warren Block Date: Fri, 14 Feb 2014 15:46:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261895 - head/usr.bin/passwd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 15:46:07 -0000 Author: wblock (doc committer) Date: Fri Feb 14 15:46:06 2014 New Revision: 261895 URL: http://svnweb.freebsd.org/changeset/base/261895 Log: Remove mention of minimum password length and upper/lower case checking, patch supplied by Allan Jude . Add xref to pam_passwdqc(8), where that testing is now done. PR: docs/184482 Submitted by: Ryan Gerstenkorn Reviewed by: jilles, eadler MFC after: 3 days Modified: head/usr.bin/passwd/passwd.1 Modified: head/usr.bin/passwd/passwd.1 ============================================================================== --- head/usr.bin/passwd/passwd.1 Fri Feb 14 15:31:48 2014 (r261894) +++ head/usr.bin/passwd/passwd.1 Fri Feb 14 15:46:06 2014 (r261895) @@ -28,7 +28,7 @@ .\" @(#)passwd.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 6, 1993 +.Dd February 14, 2014 .Dt PASSWD 1 .Os .Sh NAME @@ -59,27 +59,10 @@ The .Nm utility prompts for the new password twice in order to detect typing errors. .Pp -The new password should be at least six characters long (which -may be overridden using the -.Xr login.conf 5 -.Dq minpasswordlen -setting for a user's login class) and not purely alphabetic. -Its total length must be less than +The total length of the password must be less than .Dv _PASSWORD_LEN (currently 128 characters). .Pp -The new password should contain a mixture of upper and lower case -characters (which may be overridden using the -.Xr login.conf 5 -.Dq mixpasswordcase -setting for a user's login class). -Allowing lower case passwords may -be useful where the password file will be used in situations where only -lower case passwords are permissible, such as when using Samba to -authenticate Windows clients. -In all other situations, numbers, upper -case letters and meta characters are encouraged. -.Pp Once the password has been verified, .Nm communicates the new password information to @@ -230,6 +213,7 @@ login class capabilities database .Xr passwd 5 , .Xr kerberos 8 , .Xr kpasswdd 8 , +.Xr pam_passwdqc 8 , .Xr pw 8 , .Xr pwd_mkdb 8 , .Xr vipw 8 From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 17:47:19 2014 Return-Path: Delivered-To: svn-src-all@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 12F59EE8; Fri, 14 Feb 2014 17:47: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 F13691384; Fri, 14 Feb 2014 17:47:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1EHlIcJ054812; Fri, 14 Feb 2014 17:47:18 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1EHlIHO054811; Fri, 14 Feb 2014 17:47:18 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201402141747.s1EHlIHO054811@svn.freebsd.org> From: Dimitry Andric Date: Fri, 14 Feb 2014 17:47:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261896 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 17:47:19 -0000 Author: dim Date: Fri Feb 14 17:47:18 2014 New Revision: 261896 URL: http://svnweb.freebsd.org/changeset/base/261896 Log: After r251709, avoid a clang 3.4 warning about an unused static const variable (uma_max_ipers), when asserts are disabled. Reviewed by: glebius MFC after: 3 days Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Fri Feb 14 15:46:06 2014 (r261895) +++ head/sys/vm/uma_core.c Fri Feb 14 17:47:18 2014 (r261896) @@ -150,9 +150,6 @@ static int booted = 0; #define UMA_STARTUP 1 #define UMA_STARTUP2 2 -/* Maximum number of allowed items-per-slab if the slab header is OFFPAGE */ -static const u_int uma_max_ipers = SLAB_SETSIZE; - /* * Only mbuf clusters use ref zones. Just provide enough references * to support the one user. New code should not use the ref facility. @@ -1389,7 +1386,7 @@ keg_cachespread_init(uma_keg_t keg) keg->uk_slabsize = UMA_SLAB_SIZE; keg->uk_ipers = ((pages * PAGE_SIZE) + trailer) / rsize; keg->uk_flags |= UMA_ZONE_OFFPAGE | UMA_ZONE_VTOSLAB; - KASSERT(keg->uk_ipers <= uma_max_ipers, + KASSERT(keg->uk_ipers <= SLAB_SETSIZE, ("%s: keg->uk_ipers too high(%d) increase max_ipers", __func__, keg->uk_ipers)); } From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 18:22:57 2014 Return-Path: Delivered-To: svn-src-all@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 88B7114F; Fri, 14 Feb 2014 18:22:57 +0000 (UTC) Received: from mail-yk0-x22d.google.com (mail-yk0-x22d.google.com [IPv6:2607:f8b0:4002:c07::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 058661781; Fri, 14 Feb 2014 18:22:56 +0000 (UTC) Received: by mail-yk0-f173.google.com with SMTP id 10so24160226ykt.4 for ; Fri, 14 Feb 2014 10:22:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=EZmhYs/zOiuAOlAu45JfpjSZVzen/t5qJa78vLmJP1I=; b=GwXDglRwUIAj03MQsYOjQT8Gcne7DuID7w+8x7WvJPYyAbQ2j0FNVlC6sCBX6esCUc 5Cu8jxrW8oz/JWWXWoq+lQxSPKrQwc+qvujsR81KMVn1GCSz5fypoCjnksVckZD+HykJ jVYe/8YpeIGAgG8JRoAiBUfxGc5p2HBFk2CM1EiNVMDyQhIUJPvTsMUC/oGQ5dKZras4 MFie28wlgHKtPLW5+AHC87LZ0NdhEQa7nSGE3xgqnqVk89s9OdgRmcd8q5gXMXGE9kXo YYMB2zp24ftlX8KFZqrrD08aLlDlV935Pvp3ilP106DLEh3tKzJc3NZtxbCfkA/4lMmF 8Dfg== X-Received: by 10.236.28.162 with SMTP id g22mr4201518yha.52.1392402176309; Fri, 14 Feb 2014 10:22:56 -0800 (PST) Received: from [192.168.1.13] ([187.120.137.162]) by mx.google.com with ESMTPSA id k76sm19354266yho.18.2014.02.14.10.22.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Feb 2014 10:22:55 -0800 (PST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: svn commit: r261843 - in head: share/man/man4 sys/dev/gpio From: Luiz Otavio O Souza In-Reply-To: <52FD32AE.7030006@freebsd.org> Date: Fri, 14 Feb 2014 16:22:42 -0200 Content-Transfer-Encoding: quoted-printable Message-Id: <6B90FC61-EA18-4FDE-B96F-37676C8FCD72@gmail.com> References: <201402131758.s1DHwqFA084060@svn.freebsd.org> <52FD32AE.7030006@freebsd.org> To: Nathan Whitehorn X-Mailer: Apple Mail (2.1827) Cc: Luiz Otavio O Souza , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 18:22:57 -0000 On Feb 13, 2014, at 7:01 PM, Nathan Whitehorn wrote: > On 02/13/14 11:58, Luiz Otavio O Souza wrote: >> Author: loos >> Date: Thu Feb 13 17:58:52 2014 >> New Revision: 261843 >> URL: http://svnweb.freebsd.org/changeset/base/261843 >>=20 >> Log: >> Add OFW support to the in tree gpio compatible devices: gpioiic(4) = and >> gpioled(4). >> Tested on RPi and BBB (using the hardware I2C controller and = gpioiic(4) for >> the I2C tests). It was also verified for regressions on RSPRO = (MIPS/ar71xx) >> used as reference for a non OFW-based system. >> Update the gpioled(4) and gpioiic(4) man pages with some details = and >> examples about the FDT/OFW support. >> Some compatibility details pointed out by imp@ will follow in = subsequent >> commits. >> Approved by: adrian (mentor, implicit) >>=20 >=20 > Is there a reason gpioled has an identify() method? Usually enumerable = buses like OF buses wouldn't have something like that. > -Nathan Yes, it is used to give a chance to gpioled to traverse the FDT data and = check for the gpio-leds node which isn=92t a direct child of gpiobus. The gpio-leds should be under the root node and can describe leds = attached under any of the available gpio controllers on the system. The usual probe()/attach() methods are also supported and they can = coexist in the system as long as the DTS data don=92t try to reuse the = same gpio pins (which, in any case, will just produce a warning). Luiz= From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 18:40:04 2014 Return-Path: Delivered-To: svn-src-all@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 BE3AA708; Fri, 14 Feb 2014 18:40:04 +0000 (UTC) Received: from mail-yk0-x22e.google.com (mail-yk0-x22e.google.com [IPv6:2607:f8b0:4002:c07::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3D0DA18A7; Fri, 14 Feb 2014 18:40:04 +0000 (UTC) Received: by mail-yk0-f174.google.com with SMTP id 20so24253889yks.5 for ; Fri, 14 Feb 2014 10:40:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=QEp/zjDAu1pIYBksu3K5o0Hl5t6RPofpsWwPGs3fgwI=; b=j6Rl8RD+91UQHDIibe1ZTVGSBQoPJbGFEbqqcNFDKIBaZAFlDIsvKJvHH98SUaWlR+ trHogFT0IcB+eXHkT+lwAH9BDIhV8lxqdTMc6kotqHmWBhsGcHsO3WGKbLxhTDqRiuT0 jAZK0Ea3Nk5W3Zr9pa4uRwfnw5avGdOLCXLxlNGRVNdmMfwAGCh6XbOdz4mgoW9X9+aK iPB8I95O2jbDuz6PfvTkZ2zXIgUZO88KN+tsqAnh+f3Ki9VEkimhbeli60BDYQc4nsiy pDjKaAsHmVmWBiqcYXPd7QhCQHWRhbigThhoOtDLX98AYX0YodlKsve4vCQyyXRCpJJE nPNw== X-Received: by 10.236.91.201 with SMTP id h49mr2548094yhf.96.1392403203427; Fri, 14 Feb 2014 10:40:03 -0800 (PST) Received: from [192.168.1.13] ([187.120.137.162]) by mx.google.com with ESMTPSA id h66sm19547391yhb.7.2014.02.14.10.39.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Feb 2014 10:40:02 -0800 (PST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: svn commit: r261842 - in head/sys: conf dev/gpio From: Luiz Otavio O Souza In-Reply-To: <52FD321D.7010105@freebsd.org> Date: Fri, 14 Feb 2014 16:39:53 -0200 Content-Transfer-Encoding: quoted-printable Message-Id: <88E87461-9039-471F-9BE2-02742FB98282@gmail.com> References: <201402131708.s1DH8UJ7063297@svn.freebsd.org> <52FD321D.7010105@freebsd.org> To: Nathan Whitehorn X-Mailer: Apple Mail (2.1827) Cc: Luiz Otavio O Souza , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 18:40:04 -0000 On Feb 13, 2014, at 6:59 PM, Nathan Whitehorn = wrote: > On 02/13/14 11:08, Luiz Otavio O Souza wrote: >> Author: loos >> Date: Thu Feb 13 17:08:29 2014 >> New Revision: 261842 >> URL: http://svnweb.freebsd.org/changeset/base/261842 >>=20 >> Log: >> Add an OFW GPIO compatible bus. This allows the use of the DTS = files to >> describe GPIO bindings in the system. >> Move the GPIOBUS lock macros to gpiobusvar.h as they are now = shared between >> the OFW and the non OFW versions of GPIO bus. >> Export gpiobus_print_pins() so it can also be used on the OFW = GPIO bus. >> Approved by: adrian (mentor, implicit) >>=20 >> Added: >> head/sys/dev/gpio/ofw_gpiobus.c (contents, props changed) >> Modified: >> head/sys/conf/files >> head/sys/dev/gpio/gpiobus.c >> head/sys/dev/gpio/gpiobusvar.h >>=20 >>=20 >>=20 >> Added: head/sys/dev/gpio/ofw_gpiobus.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- /dev/null 00:00:00 1970 (empty, because file is newly = added) >> +++ head/sys/dev/gpio/ofw_gpiobus.c Thu Feb 13 17:08:29 2014 = (r261842) >> @@ -0,0 +1,338 @@ >> +/*- >> + * Copyright (c) 2009, Nathan Whitehorn >> + * Copyright (c) 2013, Luiz Otavio O Souza >> + * Copyright (c) 2013 The FreeBSD Foundation >> + * 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 unmodified, 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 ``AS IS'' AND ANY EXPRESS = OR >> + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED = WARRANTIES >> + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE = DISCLAIMED. >> + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, >> + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES = (INCLUDING, BUT >> + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS = OF USE, >> + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON = ANY >> + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR = TORT >> + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE = USE OF >> + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >> + */ >> + >> +#include >> +__FBSDID("$FreeBSD$"); >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +#include >> +#include >> +#include >> +#include >> + >>=20 >=20 > is there a reason you include fdt_common.h here? Nothing here seems to = be FDT specific, rather than for Open Firmware generally. > -Nathan oops. It was used with fdt_is_enabled() to verify if the child device = was enabled, but it was removed in the last update of the code. This is = a leftover from this update. I=92ll check if it is okay to remove it and commit the fix. Thanks for point that out. Luiz= From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 19:33:22 2014 Return-Path: Delivered-To: svn-src-all@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 C38DDFD6; Fri, 14 Feb 2014 19:33: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 AAA181D9E; Fri, 14 Feb 2014 19:33:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1EJXMgV097398; Fri, 14 Feb 2014 19:33:22 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1EJXHVu097363; Fri, 14 Feb 2014 19:33:17 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201402141933.s1EJXHVu097363@svn.freebsd.org> From: Julio Merino Date: Fri, 14 Feb 2014 19:33:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261897 - in head: contrib/atf contrib/atf/atf-c contrib/atf/atf-c++ contrib/atf/atf-c++/detail contrib/atf/atf-c/detail contrib/atf/atf-sh contrib/atf/doc lib/atf/libatf-c++ lib/atf/li... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 19:33:22 -0000 Author: jmmv Date: Fri Feb 14 19:33:16 2014 New Revision: 261897 URL: http://svnweb.freebsd.org/changeset/base/261897 Log: MFV: Import atf-0.20. Added: head/contrib/atf/atf-c++/detail/version_helper.cpp - copied unchanged from r261889, vendor/atf/dist/atf-c++/detail/version_helper.cpp head/contrib/atf/atf-c/detail/version_helper.c - copied unchanged from r261889, vendor/atf/dist/atf-c/detail/version_helper.c Deleted: head/contrib/atf/atf-c++/detail/expand.cpp head/contrib/atf/atf-c++/detail/expand.hpp head/contrib/atf/atf-c++/detail/expand_test.cpp head/contrib/atf/atf-c++/detail/parser.cpp head/contrib/atf/atf-c++/detail/parser.hpp head/contrib/atf/atf-c++/detail/parser_test.cpp head/contrib/atf/atf-c++/detail/ui.cpp head/contrib/atf/atf-c++/detail/ui.hpp head/contrib/atf/atf-c++/detail/ui_test.cpp head/contrib/atf/atf-c++/noncopyable.hpp Modified: head/contrib/atf/FREEBSD-Xlist head/contrib/atf/Kyuafile head/contrib/atf/NEWS head/contrib/atf/README head/contrib/atf/atf-c++/check.hpp head/contrib/atf/atf-c++/config.cpp head/contrib/atf/atf-c++/config_test.cpp head/contrib/atf/atf-c++/detail/Kyuafile head/contrib/atf/atf-c++/detail/application.cpp head/contrib/atf/atf-c++/detail/application.hpp head/contrib/atf/atf-c++/detail/application_test.cpp head/contrib/atf/atf-c++/detail/exceptions.hpp head/contrib/atf/atf-c++/detail/test_helpers.cpp head/contrib/atf/atf-c++/detail/test_helpers.hpp head/contrib/atf/atf-c++/macros_test.cpp head/contrib/atf/atf-c++/pkg_config_test.sh head/contrib/atf/atf-c++/tests.cpp head/contrib/atf/atf-c++/tests.hpp head/contrib/atf/atf-c++/tests_test.cpp head/contrib/atf/atf-c/config.c head/contrib/atf/atf-c/config_test.c head/contrib/atf/atf-c/detail/test_helpers.c head/contrib/atf/atf-c/detail/test_helpers.h head/contrib/atf/atf-c/macros_test.c head/contrib/atf/atf-c/pkg_config_test.sh head/contrib/atf/atf-sh/atf-check.cpp head/contrib/atf/atf-sh/atf-sh.cpp head/contrib/atf/atf-sh/atf_check_test.sh head/contrib/atf/atf-sh/integration_test.sh head/contrib/atf/bconfig.h head/contrib/atf/doc/atf-test-case.4 head/lib/atf/libatf-c++/Makefile head/lib/atf/libatf-c++/tests/detail/Makefile head/lib/atf/libatf-c/tests/detail/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: head/contrib/atf/ (props changed) Modified: head/contrib/atf/FREEBSD-Xlist ============================================================================== --- head/contrib/atf/FREEBSD-Xlist Fri Feb 14 17:47:18 2014 (r261896) +++ head/contrib/atf/FREEBSD-Xlist Fri Feb 14 19:33:16 2014 (r261897) @@ -18,3 +18,4 @@ configure* doc/atf-formats.5 doc/atf.7.in m4/ +tools/ Modified: head/contrib/atf/Kyuafile ============================================================================== --- head/contrib/atf/Kyuafile Fri Feb 14 17:47:18 2014 (r261896) +++ head/contrib/atf/Kyuafile Fri Feb 14 19:33:16 2014 (r261897) @@ -6,13 +6,3 @@ include("atf-c/Kyuafile") include("atf-c++/Kyuafile") include("atf-sh/Kyuafile") include("test-programs/Kyuafile") - -if fs.exists("atf-config/Kyuafile") then - include("atf-config/Kyuafile") -end -if fs.exists("atf-report/Kyuafile") then - include("atf-report/Kyuafile") -end -if fs.exists("atf-run/Kyuafile") then - include("atf-run/Kyuafile") -end Modified: head/contrib/atf/NEWS ============================================================================== --- head/contrib/atf/NEWS Fri Feb 14 17:47:18 2014 (r261896) +++ head/contrib/atf/NEWS Fri Feb 14 19:33:16 2014 (r261897) @@ -2,6 +2,51 @@ Major changes between releases =========================================================================== +Changes in version 0.20 +*********************** + +Experimental version released on February 7th, 2014. + +This is the first release without the code for the deprecated tools. If +you require such code, please fetch a copy of the 0.19 release and extract +the 'tools' directory for your own consumption. + +* Removed the deprecated tools. This includes atf-config, atf-report, + atf-run and atf-version. + + +Changes in version 0.19 +*********************** + +Experimental version released on February 7th, 2014. + +This is the last release to bundle the code for the deprecated tools. +The next release will drop their code and will stop worrying about +backwards compatibility between the ATF libraries and what the old tools +may or may not support. + +If you still require the old tools for some reason, grab a copy of the +'tools' directory now. The code in this directory is standalone and +does not depend on any internal details of atf-c++ any longer. + +* Various fixes and improvements to support running as part of the FreeBSD + test suite. + +* Project hosting moved from Google Code (as a subproject of Kyua) to + GitHub (as a first-class project). The main reason for the change is + the suppression of binary downloads in Google Code on Jan 15th, 2014. + See https://github.com/jmmv/atf/ + +* Removed builtin help from atf-sh(1) and atf-check(1) for simplicity + reasons. In other words, their -h option is gone. + +* Moved the code of the deprecated tools into a 'tools' directory and + completely decoupled their code from the internals of atf-c++. The + reason for this is to painlessly allow a third-party to maintain a + copy of these tools after we delete them because upcoming changes to + atf-c++ would break the stale tools. + + Changes in version 0.18 *********************** Modified: head/contrib/atf/README ============================================================================== --- head/contrib/atf/README Fri Feb 14 17:47:18 2014 (r261896) +++ head/contrib/atf/README Fri Feb 14 19:33:16 2014 (r261897) @@ -5,21 +5,18 @@ Introductory information Introduction ************ -The Automated Testing Framework (ATF) is a collection of libraries and -utilities designed to ease unattended application testing in the hands of -developers and end users of a specific piece of software. - -As regards developers, ATF provides the necessary means to easily create -test suites composed of multiple test programs, which in turn are a -collection of test cases. It also attempts to simplify the debugging of -problems when these test cases detect an error by providing as much -information as possible about the failure. - -As regards users, it simplifies the process of running the test suites and, -in special, encourages end users to run them often: they do not need to -have source trees around nor any other development tools installed to be -able to certify that a given piece of software works on their machine as -advertised. +The Automated Testing Framework (ATF) is a collection of libraries to +implement test programs in a variety of languages. At the moment, ATF +offers C, C++ and POSIX shell bindings with which to implement tests. +These bindings all offer a similar set of functionality and any test +program written with them exposes a consistent user interface. + +ATF-based test programs rely on a separate runtime engine to execute them. +The runtime engine is in charge of isolating the test programs from the +rest of the system to ensure that their results are deterministic and that +they cannot affect the running system. The runtime engine is also +responsible for gathering the results of all tests and composing reports. +The current runtime of choice is Kyua. Other documents Modified: head/contrib/atf/atf-c++/check.hpp ============================================================================== --- head/contrib/atf/atf-c++/check.hpp Fri Feb 14 17:47:18 2014 (r261896) +++ head/contrib/atf/atf-c++/check.hpp Fri Feb 14 19:33:16 2014 (r261897) @@ -39,8 +39,6 @@ extern "C" { #include #include -#include - namespace atf { namespace process { @@ -60,7 +58,11 @@ namespace check { //! of executing arbitrary command and manages files containing //! its output. //! -class check_result : noncopyable { +class check_result { + // Non-copyable. + check_result(const check_result&); + check_result& operator=(const check_result&); + //! //! \brief Internal representation of a result. //! Modified: head/contrib/atf/atf-c++/config.cpp ============================================================================== --- head/contrib/atf/atf-c++/config.cpp Fri Feb 14 17:47:18 2014 (r261896) +++ head/contrib/atf/atf-c++/config.cpp Fri Feb 14 19:33:16 2014 (r261897) @@ -52,18 +52,14 @@ init_variables(void) { PRE(m_variables.empty()); - m_variables["atf_arch"] = atf_config_get("atf_arch"); m_variables["atf_build_cc"] = atf_config_get("atf_build_cc"); m_variables["atf_build_cflags"] = atf_config_get("atf_build_cflags"); m_variables["atf_build_cpp"] = atf_config_get("atf_build_cpp"); m_variables["atf_build_cppflags"] = atf_config_get("atf_build_cppflags"); m_variables["atf_build_cxx"] = atf_config_get("atf_build_cxx"); m_variables["atf_build_cxxflags"] = atf_config_get("atf_build_cxxflags"); - m_variables["atf_confdir"] = atf_config_get("atf_confdir"); m_variables["atf_includedir"] = atf_config_get("atf_includedir"); - m_variables["atf_libdir"] = atf_config_get("atf_libdir"); m_variables["atf_libexecdir"] = atf_config_get("atf_libexecdir"); - m_variables["atf_machine"] = atf_config_get("atf_machine"); m_variables["atf_pkgdatadir"] = atf_config_get("atf_pkgdatadir"); m_variables["atf_shell"] = atf_config_get("atf_shell"); m_variables["atf_workdir"] = atf_config_get("atf_workdir"); Modified: head/contrib/atf/atf-c++/config_test.cpp ============================================================================== --- head/contrib/atf/atf-c++/config_test.cpp Fri Feb 14 17:47:18 2014 (r261896) +++ head/contrib/atf/atf-c++/config_test.cpp Fri Feb 14 19:33:16 2014 (r261897) @@ -44,18 +44,14 @@ static struct varnames { const char *uc; bool can_be_empty; } all_vars[] = { - { "atf_arch", "ATF_ARCH", false }, { "atf_build_cc", "ATF_BUILD_CC", false }, { "atf_build_cflags", "ATF_BUILD_CFLAGS", true }, { "atf_build_cpp", "ATF_BUILD_CPP", false }, { "atf_build_cppflags", "ATF_BUILD_CPPFLAGS", true }, { "atf_build_cxx", "ATF_BUILD_CXX", false }, { "atf_build_cxxflags", "ATF_BUILD_CXXFLAGS", true }, - { "atf_confdir", "ATF_CONFDIR", false }, { "atf_includedir", "ATF_INCLUDEDIR", false }, - { "atf_libdir", "ATF_LIBDIR", false }, { "atf_libexecdir", "ATF_LIBEXECDIR", false }, - { "atf_machine", "ATF_MACHINE", false }, { "atf_pkgdatadir", "ATF_PKGDATADIR", false }, { "atf_shell", "ATF_SHELL", false }, { "atf_workdir", "ATF_WORKDIR", false }, Modified: head/contrib/atf/atf-c++/detail/Kyuafile ============================================================================== --- head/contrib/atf/atf-c++/detail/Kyuafile Fri Feb 14 17:47:18 2014 (r261896) +++ head/contrib/atf/atf-c++/detail/Kyuafile Fri Feb 14 19:33:16 2014 (r261897) @@ -6,9 +6,7 @@ atf_test_program{name="application_test" atf_test_program{name="auto_array_test"} atf_test_program{name="env_test"} atf_test_program{name="exceptions_test"} -atf_test_program{name="expand_test"} atf_test_program{name="fs_test"} -atf_test_program{name="parser_test"} +atf_test_program{name="process_test"} atf_test_program{name="sanity_test"} atf_test_program{name="text_test"} -atf_test_program{name="ui_test"} Modified: head/contrib/atf/atf-c++/detail/application.cpp ============================================================================== --- head/contrib/atf/atf-c++/detail/application.cpp Fri Feb 14 17:47:18 2014 (r261896) +++ head/contrib/atf/atf-c++/detail/application.cpp Fri Feb 14 19:33:16 2014 (r261897) @@ -47,7 +47,6 @@ extern "C" { #include "application.hpp" #include "sanity.hpp" -#include "ui.hpp" #if !defined(HAVE_VSNPRINTF_IN_STD) namespace std { @@ -106,17 +105,12 @@ impl::option::operator<(const impl::opti } impl::app::app(const std::string& description, - const std::string& manpage, - const std::string& global_manpage, - const bool use_ui) : - m_hflag(false), + const std::string& manpage) : m_argc(-1), m_argv(NULL), m_prog_name(NULL), m_description(description), - m_manpage(manpage), - m_global_manpage(global_manpage), - m_use_ui(use_ui) + m_manpage(manpage) { } @@ -133,11 +127,7 @@ impl::app::inited(void) impl::app::options_set impl::app::options(void) { - options_set opts = specific_options(); - if (m_use_ui) { - opts.insert(option('h', "", "Shows this help message")); - } - return opts; + return specific_options(); } std::string @@ -187,11 +177,6 @@ impl::app::process_options(void) ::opterr = 0; while ((ch = ::getopt(m_argc, m_argv, optstr.c_str())) != -1) { switch (ch) { - case 'h': - INV(m_use_ui); - m_hflag = true; - break; - case ':': throw usage_error("Option -%c requires an argument.", ::optopt); @@ -214,51 +199,6 @@ impl::app::process_options(void) #endif } -void -impl::app::usage(std::ostream& os) -{ - PRE(inited()); - - std::string args = specific_args(); - if (!args.empty()) - args = " " + args; - os << ui::format_text_with_tag(std::string(m_prog_name) + " [options]" + - args, "Usage: ", false) << "\n\n" - << ui::format_text(m_description) << "\n\n"; - - options_set opts = options(); - INV(!opts.empty()); - os << "Available options:\n"; - size_t coldesc = 0; - for (options_set::const_iterator iter = opts.begin(); - iter != opts.end(); iter++) { - const option& opt = (*iter); - - if (opt.m_argument.length() + 1 > coldesc) - coldesc = opt.m_argument.length() + 1; - } - for (options_set::const_iterator iter = opts.begin(); - iter != opts.end(); iter++) { - const option& opt = (*iter); - - std::string tag = std::string(" -") + opt.m_character; - if (opt.m_argument.empty()) - tag += " "; - else - tag += " " + opt.m_argument + " "; - os << ui::format_text_with_tag(opt.m_description, tag, false, - coldesc + 10) << "\n"; - } - os << "\n"; - - std::string gmp; - if (!m_global_manpage.empty()) - gmp = " and " + m_global_manpage; - os << ui::format_text("For more details please see " + m_manpage + - gmp + ".") - << "\n"; -} - int impl::app::run(int argc, char* const* argv) { @@ -290,55 +230,22 @@ impl::app::run(int argc, char* const* ar int errcode; try { - int oldargc = m_argc; - process_options(); - - if (m_hflag) { - INV(m_use_ui); - if (oldargc != 2) - throw usage_error("-h must be given alone."); - - usage(std::cout); - errcode = EXIT_SUCCESS; - } else - errcode = main(); + errcode = main(); } catch (const usage_error& e) { - if (m_use_ui) { - std::cerr << ui::format_error(m_prog_name, e.what()) << "\n" - << ui::format_info(m_prog_name, std::string("Type `") + - m_prog_name + " -h' for more details.") - << "\n"; - } else { - std::cerr << m_prog_name << ": ERROR: " << e.what() << "\n"; - std::cerr << m_prog_name << ": See " << m_manpage << " for usage " - "details.\n"; - } + std::cerr << m_prog_name << ": ERROR: " << e.what() << "\n"; + std::cerr << m_prog_name << ": See " << m_manpage << " for usage " + "details.\n"; errcode = EXIT_FAILURE; } catch (const std::runtime_error& e) { - if (m_use_ui) { - std::cerr << ui::format_error(m_prog_name, std::string(e.what())) - << "\n"; - } else { - std::cerr << m_prog_name << ": ERROR: " << e.what() << "\n"; - } + std::cerr << m_prog_name << ": ERROR: " << e.what() << "\n"; errcode = EXIT_FAILURE; } catch (const std::exception& e) { - if (m_use_ui) { - std::cerr << ui::format_error(m_prog_name, std::string("Caught " - "unexpected error: ") + e.what() + "\n" + bug) << "\n"; - } else { - std::cerr << m_prog_name << ": ERROR: Caught unexpected error: " - << e.what() << "\n"; - } + std::cerr << m_prog_name << ": ERROR: Caught unexpected error: " + << e.what() << "\n"; errcode = EXIT_FAILURE; } catch (...) { - if (m_use_ui) { - std::cerr << ui::format_error(m_prog_name, std::string("Caught " - "unknown error\n") + bug) << "\n"; - } else { - std::cerr << m_prog_name << ": ERROR: Caught unknown error\n"; - } + std::cerr << m_prog_name << ": ERROR: Caught unknown error\n"; errcode = EXIT_FAILURE; } return errcode; Modified: head/contrib/atf/atf-c++/detail/application.hpp ============================================================================== --- head/contrib/atf/atf-c++/detail/application.hpp Fri Feb 14 17:47:18 2014 (r261896) +++ head/contrib/atf/atf-c++/detail/application.hpp Fri Feb 14 19:33:16 2014 (r261897) @@ -74,8 +74,6 @@ public: // ------------------------------------------------------------------------ class app { - bool m_hflag; - void process_options(void); void usage(std::ostream&); @@ -90,8 +88,7 @@ protected: const char* m_argv0; const char* m_prog_name; std::string m_description; - std::string m_manpage, m_global_manpage; - const bool m_use_ui; + std::string m_manpage; options_set options(void); @@ -102,8 +99,7 @@ protected: virtual int main(void) = 0; public: - app(const std::string&, const std::string&, const std::string&, - bool = true); + app(const std::string&, const std::string&); virtual ~app(void); int run(int, char* const*); Modified: head/contrib/atf/atf-c++/detail/application_test.cpp ============================================================================== --- head/contrib/atf/atf-c++/detail/application_test.cpp Fri Feb 14 17:47:18 2014 (r261896) +++ head/contrib/atf/atf-c++/detail/application_test.cpp Fri Feb 14 19:33:16 2014 (r261897) @@ -37,7 +37,7 @@ extern "C" { class getopt_app : public atf::application::app { public: - getopt_app(void) : app("description", "manpage", "other") {} + getopt_app(void) : app("description", "manpage") {} int main(void) { Modified: head/contrib/atf/atf-c++/detail/exceptions.hpp ============================================================================== --- head/contrib/atf/atf-c++/detail/exceptions.hpp Fri Feb 14 17:47:18 2014 (r261896) +++ head/contrib/atf/atf-c++/detail/exceptions.hpp Fri Feb 14 19:33:16 2014 (r261897) @@ -39,47 +39,6 @@ struct atf_error; namespace atf { -template< class T > -class not_found_error : - public std::runtime_error -{ - T m_value; - -public: - not_found_error(const std::string& message, const T& value) throw(); - - virtual ~not_found_error(void) throw(); - - const T& get_value(void) const throw(); -}; - -template< class T > -inline -not_found_error< T >::not_found_error(const std::string& message, - const T& value) - throw() : - std::runtime_error(message), - m_value(value) -{ -} - -template< class T > -inline -not_found_error< T >::~not_found_error(void) - throw() -{ -} - -template< class T > -inline -const T& -not_found_error< T >::get_value(void) - const - throw() -{ - return m_value; -} - class system_error : public std::runtime_error { int m_sys_err; mutable std::string m_message; Modified: head/contrib/atf/atf-c++/detail/test_helpers.cpp ============================================================================== --- head/contrib/atf/atf-c++/detail/test_helpers.cpp Fri Feb 14 17:47:18 2014 (r261896) +++ head/contrib/atf/atf-c++/detail/test_helpers.cpp Fri Feb 14 19:33:16 2014 (r261897) @@ -52,28 +52,24 @@ static const char* atf_c_tests_base = NU #endif #undef ATF_C_TESTS_BASE -void -build_check_cxx_o_aux(const atf::fs::path& sfile, const char* failmsg, - const bool expect_pass) +bool +build_check_cxx_o(const char* sfile) { std::vector< std::string > optargs; optargs.push_back("-I" + atf::config::get("atf_includedir")); optargs.push_back("-Wall"); optargs.push_back("-Werror"); - const bool result = atf::check::build_cxx_o( - sfile.str(), "test.o", atf::process::argv_array(optargs)); - if ((expect_pass && !result) || (!expect_pass && result)) - ATF_FAIL(failmsg); + return atf::check::build_cxx_o(sfile, "test.o", + atf::process::argv_array(optargs)); } -void -build_check_cxx_o(const atf::tests::tc& tc, const char* sfile, - const char* failmsg, const bool expect_pass) +bool +build_check_cxx_o_srcdir(const atf::tests::tc& tc, const char* sfile) { const atf::fs::path sfilepath = atf::fs::path(tc.get_config_var("srcdir")) / sfile; - build_check_cxx_o_aux(sfilepath, failmsg, expect_pass); + return build_check_cxx_o(sfilepath.c_str()); } void @@ -86,7 +82,8 @@ header_check(const char *hdrname) const std::string failmsg = std::string("Header check failed; ") + hdrname + " is not self-contained"; - build_check_cxx_o_aux(atf::fs::path("test.cpp"), failmsg.c_str(), true); + if (!build_check_cxx_o("test.cpp")) + ATF_FAIL(failmsg); } atf::fs::path @@ -104,37 +101,3 @@ get_process_helpers_path(const atf::test return atf::fs::path(atf_c_tests_base) / helper; } } - -void -test_helpers_detail::check_equal(const char* expected[], - const string_vector& actual) -{ - const char** expected_iter = expected; - string_vector::const_iterator actual_iter = actual.begin(); - - bool equals = true; - while (equals && *expected_iter != NULL && actual_iter != actual.end()) { - if (*expected_iter != *actual_iter) { - equals = false; - } else { - expected_iter++; - actual_iter++; - } - } - if (equals && ((*expected_iter == NULL && actual_iter != actual.end()) || - (*expected_iter != NULL && actual_iter == actual.end()))) - equals = false; - - if (!equals) { - std::cerr << "EXPECTED:\n"; - for (expected_iter = expected; *expected_iter != NULL; expected_iter++) - std::cerr << *expected_iter << "\n"; - - std::cerr << "ACTUAL:\n"; - for (actual_iter = actual.begin(); actual_iter != actual.end(); - actual_iter++) - std::cerr << *actual_iter << "\n"; - - ATF_FAIL("Expected results differ to actual values"); - } -} Modified: head/contrib/atf/atf-c++/detail/test_helpers.hpp ============================================================================== --- head/contrib/atf/atf-c++/detail/test_helpers.hpp Fri Feb 14 17:47:18 2014 (r261896) +++ head/contrib/atf/atf-c++/detail/test_helpers.hpp Fri Feb 14 19:33:16 2014 (r261897) @@ -40,9 +40,7 @@ #include "../macros.hpp" #include "../tests.hpp" -#include "parser.hpp" #include "process.hpp" -#include "text.hpp" #define HEADER_TC(name, hdrname) \ ATF_TEST_CASE(name); \ @@ -64,18 +62,8 @@ } \ ATF_TEST_CASE_BODY(name) \ { \ - build_check_cxx_o(*this, sfile, failmsg, true); \ - } - -#define BUILD_TC_FAIL(name, sfile, descr, failmsg) \ - ATF_TEST_CASE(name); \ - ATF_TEST_CASE_HEAD(name) \ - { \ - set_md_var("descr", descr); \ - } \ - ATF_TEST_CASE_BODY(name) \ - { \ - build_check_cxx_o(*this, sfile, failmsg, false); \ + if (!build_check_cxx_o_srcdir(*this, sfile)) \ + ATF_FAIL(failmsg); \ } namespace atf { @@ -85,7 +73,8 @@ class tc; } void header_check(const char*); -void build_check_cxx_o(const atf::tests::tc&, const char*, const char*, bool); +bool build_check_cxx_o(const char*); +bool build_check_cxx_o_srcdir(const atf::tests::tc&, const char*); atf::fs::path get_process_helpers_path(const atf::tests::tc&, bool); struct run_h_tc_data { @@ -120,45 +109,3 @@ run_h_tc(atf::tests::vars_map config = a const atf::process::status s = c.wait(); ATF_REQUIRE(s.exited()); } - -namespace test_helpers_detail { - -typedef std::vector< std::string > string_vector; - -template< class Reader > -std::pair< string_vector, string_vector > -do_read(const char* input) -{ - string_vector errors; - - std::istringstream is(input); - Reader reader(is); - try { - reader.read(); - } catch (const atf::parser::parse_errors& pes) { - for (std::vector< atf::parser::parse_error >::const_iterator iter = - pes.begin(); iter != pes.end(); iter++) - errors.push_back(*iter); - } catch (const atf::parser::parse_error& pe) { - ATF_FAIL("Raised a lonely parse error: " + - atf::text::to_string(pe.first) + ": " + pe.second); - } - - return std::make_pair(reader.m_calls, errors); -} - -void check_equal(const char*[], const string_vector&); - -} // namespace test_helpers_detail - -template< class Reader > -void -do_parser_test(const char* input, const char* exp_calls[], - const char* exp_errors[]) -{ - const std::pair< test_helpers_detail::string_vector, - test_helpers_detail::string_vector > - actual = test_helpers_detail::do_read< Reader >(input); - test_helpers_detail::check_equal(exp_calls, actual.first); - test_helpers_detail::check_equal(exp_errors, actual.second); -} Copied: head/contrib/atf/atf-c++/detail/version_helper.cpp (from r261889, vendor/atf/dist/atf-c++/detail/version_helper.cpp) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/atf/atf-c++/detail/version_helper.cpp Fri Feb 14 19:33:16 2014 (r261897, copy of r261889, vendor/atf/dist/atf-c++/detail/version_helper.cpp) @@ -0,0 +1,41 @@ +// Copyright 2014 Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * 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. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#if defined(HAVE_CONFIG_H) +#include "bconfig.h" +#endif + +#include +#include + +int +main(void) +{ + std::cout << PACKAGE_VERSION << "\n"; + return EXIT_SUCCESS; +} Modified: head/contrib/atf/atf-c++/macros_test.cpp ============================================================================== --- head/contrib/atf/atf-c++/macros_test.cpp Fri Feb 14 17:47:18 2014 (r261896) +++ head/contrib/atf/atf-c++/macros_test.cpp Fri Feb 14 19:33:16 2014 (r261897) @@ -763,11 +763,30 @@ BUILD_TC(use, "macros_hpp_test.cpp", "do not cause syntax errors when used", "Build of macros_hpp_test.cpp failed; some macros in " "atf-c++/macros.hpp are broken"); -BUILD_TC_FAIL(detect_unused_tests, "unused_test.cpp", - "Tests that defining an unused test case raises a warning (and thus " - "an error)", - "Build of unused_test.cpp passed; unused test cases are not properly " - "detected"); + +ATF_TEST_CASE(detect_unused_tests); +ATF_TEST_CASE_HEAD(detect_unused_tests) +{ + set_md_var("descr", + "Tests that defining an unused test case raises a warning (and " + "thus an error)"); +} +ATF_TEST_CASE_BODY(detect_unused_tests) +{ + const char* validate_compiler = + "class test_class { public: int dummy; };\n" + "#define define_unused static test_class unused\n" + "define_unused;\n"; + + atf::utils::create_file("compiler_test.cpp", validate_compiler); + if (build_check_cxx_o("compiler_test.cpp")) + expect_fail("Compiler does not raise a warning on an unused " + "static global variable declared by a macro"); + + if (build_check_cxx_o_srcdir(*this, "unused_test.cpp")) + ATF_FAIL("Build of unused_test.cpp passed; unused test cases are " + "not properly detected"); +} // ------------------------------------------------------------------------ // Main. Modified: head/contrib/atf/atf-c++/pkg_config_test.sh ============================================================================== --- head/contrib/atf/atf-c++/pkg_config_test.sh Fri Feb 14 17:47:18 2014 (r261896) +++ head/contrib/atf/atf-c++/pkg_config_test.sh Fri Feb 14 19:33:16 2014 (r261897) @@ -43,10 +43,8 @@ require_pc() check_version() { - atf_check -s eq:0 -o save:stdout -e empty -x \ - "atf-version | head -n 1 | cut -d ' ' -f 4" - ver1=$(cat stdout) - echo "Version reported by atf-version: ${ver1}" + ver1=$($(atf_get_srcdir)/detail/version_helper) + echo "Version reported by builtin PACKAGE_VERSION: ${ver1}" atf_check -s eq:0 -o save:stdout -e empty pkg-config --modversion "${1}" ver2=$(cat stdout) @@ -59,7 +57,7 @@ atf_test_case version version_head() { atf_set "descr" "Checks that the version in atf-c++ is correct" - atf_set "require.progs" "atf-version pkg-config" + atf_set "require.progs" "pkg-config" } version_body() { Modified: head/contrib/atf/atf-c++/tests.cpp ============================================================================== --- head/contrib/atf/atf-c++/tests.cpp Fri Feb 14 17:47:18 2014 (r261896) +++ head/contrib/atf/atf-c++/tests.cpp Fri Feb 14 19:33:16 2014 (r261897) @@ -55,7 +55,6 @@ extern "C" { #include "atf-c/utils.h" } -#include "noncopyable.hpp" #include "tests.hpp" #include "detail/application.hpp" @@ -63,7 +62,6 @@ extern "C" { #include "detail/env.hpp" #include "detail/exceptions.hpp" #include "detail/fs.hpp" -#include "detail/parser.hpp" #include "detail/sanity.hpp" #include "detail/text.hpp" @@ -79,12 +77,7 @@ detail::atf_tp_writer::atf_tp_writer(std m_os(os), m_is_first(true) { - atf::parser::headers_map hm; - atf::parser::attrs_map ct_attrs; - ct_attrs["version"] = "1"; - hm["Content-Type"] = atf::parser::header_entry("Content-Type", - "application/X-atf-tp", ct_attrs); - atf::parser::write_headers(hm, m_os); + m_os << "Content-Type: application/X-atf-tp; version=\"1\"\n\n"; } void @@ -129,7 +122,13 @@ detail::match(const std::string& regexp, static std::map< atf_tc_t*, impl::tc* > wraps; static std::map< const atf_tc_t*, const impl::tc* > cwraps; -struct impl::tc_impl : atf::noncopyable { +struct impl::tc_impl { +private: + // Non-copyable. + tc_impl(const tc_impl&); + tc_impl& operator=(const tc_impl&); + +public: std::string m_ident; atf_tc_t m_tc; bool m_has_cleanup; @@ -435,7 +434,7 @@ const char* tp::m_description = "This is an independent atf test program."; tp::tp(void (*add_tcs)(tc_vector&)) : - app(m_description, "atf-test-program(1)", "atf(7)", false), + app(m_description, "atf-test-program(1)"), m_lflag(false), m_resfile("/dev/stdout"), m_srcdir("."), Modified: head/contrib/atf/atf-c++/tests.hpp ============================================================================== --- head/contrib/atf/atf-c++/tests.hpp Fri Feb 14 17:47:18 2014 (r261896) +++ head/contrib/atf/atf-c++/tests.hpp Fri Feb 14 19:33:16 2014 (r261897) @@ -38,8 +38,6 @@ extern "C" { #include } -#include - namespace atf { namespace tests { @@ -74,7 +72,11 @@ typedef std::map< std::string, std::stri struct tc_impl; -class tc : noncopyable { +class tc { + // Non-copyable. + tc(const tc&); + tc& operator=(const tc&); + std::auto_ptr< tc_impl > pimpl; protected: Modified: head/contrib/atf/atf-c++/tests_test.cpp ============================================================================== --- head/contrib/atf/atf-c++/tests_test.cpp Fri Feb 14 17:47:18 2014 (r261896) +++ head/contrib/atf/atf-c++/tests_test.cpp Fri Feb 14 19:33:16 2014 (r261897) @@ -40,8 +40,8 @@ extern "C" { #include "macros.hpp" -#include "detail/parser.hpp" #include "detail/test_helpers.hpp" +#include "detail/text.hpp" // ------------------------------------------------------------------------ // Tests for the "atf_tp_writer" class. Modified: head/contrib/atf/atf-c/config.c ============================================================================== --- head/contrib/atf/atf-c/config.c Fri Feb 14 17:47:18 2014 (r261896) +++ head/contrib/atf/atf-c/config.c Fri Feb 14 19:33:16 2014 (r261897) @@ -45,18 +45,14 @@ static struct var { const char *value; bool can_be_empty; } vars[] = { - { "atf_arch", ATF_ARCH, NULL, false, }, { "atf_build_cc", ATF_BUILD_CC, NULL, false, }, { "atf_build_cflags", ATF_BUILD_CFLAGS, NULL, true, }, { "atf_build_cpp", ATF_BUILD_CPP, NULL, false, }, { "atf_build_cppflags", ATF_BUILD_CPPFLAGS, NULL, true, }, { "atf_build_cxx", ATF_BUILD_CXX, NULL, false, }, { "atf_build_cxxflags", ATF_BUILD_CXXFLAGS, NULL, true, }, - { "atf_confdir", ATF_CONFDIR, NULL, false, }, { "atf_includedir", ATF_INCLUDEDIR, NULL, false, }, - { "atf_libdir", ATF_LIBDIR, NULL, false, }, { "atf_libexecdir", ATF_LIBEXECDIR, NULL, false, }, - { "atf_machine", ATF_MACHINE, NULL, false, }, { "atf_pkgdatadir", ATF_PKGDATADIR, NULL, false, }, { "atf_shell", ATF_SHELL, NULL, false, }, { "atf_workdir", ATF_WORKDIR, NULL, false, }, Modified: head/contrib/atf/atf-c/config_test.c ============================================================================== --- head/contrib/atf/atf-c/config_test.c Fri Feb 14 17:47:18 2014 (r261896) +++ head/contrib/atf/atf-c/config_test.c Fri Feb 14 19:33:16 2014 (r261897) @@ -44,18 +44,14 @@ static struct varnames { const char *uc; bool can_be_empty; } all_vars[] = { - { "atf_arch", "ATF_ARCH", false }, { "atf_build_cc", "ATF_BUILD_CC", false }, { "atf_build_cflags", "ATF_BUILD_CFLAGS", true }, { "atf_build_cpp", "ATF_BUILD_CPP", false }, { "atf_build_cppflags", "ATF_BUILD_CPPFLAGS", true }, { "atf_build_cxx", "ATF_BUILD_CXX", false }, { "atf_build_cxxflags", "ATF_BUILD_CXXFLAGS", true }, - { "atf_confdir", "ATF_CONFDIR", false }, { "atf_includedir", "ATF_INCLUDEDIR", false }, - { "atf_libdir", "ATF_LIBDIR", false }, { "atf_libexecdir", "ATF_LIBEXECDIR", false }, - { "atf_machine", "ATF_MACHINE", false }, { "atf_pkgdatadir", "ATF_PKGDATADIR", false }, { "atf_shell", "ATF_SHELL", false }, { "atf_workdir", "ATF_WORKDIR", false }, Modified: head/contrib/atf/atf-c/detail/test_helpers.c ============================================================================== --- head/contrib/atf/atf-c/detail/test_helpers.c Fri Feb 14 17:47:18 2014 (r261896) +++ head/contrib/atf/atf-c/detail/test_helpers.c Fri Feb 14 19:33:16 2014 (r261897) @@ -43,10 +43,8 @@ #include "process.h" #include "test_helpers.h" -static -void -build_check_c_o_aux(const char *path, const char *failmsg, - const bool expect_pass) +bool +build_check_c_o(const char *path) { bool success; atf_dynstr_t iflag; @@ -63,20 +61,19 @@ build_check_c_o_aux(const char *path, co atf_dynstr_fini(&iflag); - if ((expect_pass && !success) || (!expect_pass && success)) - atf_tc_fail("%s", failmsg); + return success; } -void -build_check_c_o(const atf_tc_t *tc, const char *sfile, const char *failmsg, - const bool expect_pass) +bool +build_check_c_o_srcdir(const atf_tc_t *tc, const char *sfile) { atf_fs_path_t path; RE(atf_fs_path_init_fmt(&path, "%s/%s", atf_tc_get_config_var(tc, "srcdir"), sfile)); - build_check_c_o_aux(atf_fs_path_cstring(&path), failmsg, expect_pass); + const bool result = build_check_c_o(atf_fs_path_cstring(&path)); atf_fs_path_fini(&path); + return result; } void @@ -93,7 +90,8 @@ header_check(const char *hdrname) snprintf(failmsg, sizeof(failmsg), "Header check failed; %s is not self-contained", hdrname); - build_check_c_o_aux("test.c", failmsg, true); + if (!build_check_c_o("test.c")) + atf_tc_fail("%s", failmsg); } void Modified: head/contrib/atf/atf-c/detail/test_helpers.h ============================================================================== --- head/contrib/atf/atf-c/detail/test_helpers.h Fri Feb 14 17:47:18 2014 (r261896) +++ head/contrib/atf/atf-c/detail/test_helpers.h Fri Feb 14 19:33:16 2014 (r261897) @@ -63,21 +63,12 @@ struct atf_fs_path; } \ ATF_TC_BODY(name, tc) \ { \ - build_check_c_o(tc, sfile, failmsg, true); \ + if (!build_check_c_o_srcdir(tc, sfile)) \ + atf_tc_fail("%s", failmsg); \ } -#define BUILD_TC_FAIL(name, sfile, descr, failmsg) \ - ATF_TC(name); \ - ATF_TC_HEAD(name, tc) \ - { \ - atf_tc_set_md_var(tc, "descr", descr); \ - } \ - ATF_TC_BODY(name, tc) \ - { \ - build_check_c_o(tc, sfile, failmsg, false); \ - } - -void build_check_c_o(const atf_tc_t *, const char *, const char *, const bool); +bool build_check_c_o(const char *); +bool build_check_c_o_srcdir(const atf_tc_t *, const char *); void header_check(const char *); void get_process_helpers_path(const atf_tc_t *, const bool, struct atf_fs_path *); Copied: head/contrib/atf/atf-c/detail/version_helper.c (from r261889, vendor/atf/dist/atf-c/detail/version_helper.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/atf/atf-c/detail/version_helper.c Fri Feb 14 19:33:16 2014 (r261897, copy of r261889, vendor/atf/dist/atf-c/detail/version_helper.c) @@ -0,0 +1,43 @@ +/* + * Copyright 2014 Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of Google Inc. nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#if defined(HAVE_CONFIG_H) +#include "bconfig.h" +#endif + +#include +#include + +int +main(void) +{ + printf("%s\n", PACKAGE_VERSION); + return EXIT_SUCCESS; +} Modified: head/contrib/atf/atf-c/macros_test.c ============================================================================== --- head/contrib/atf/atf-c/macros_test.c Fri Feb 14 17:47:18 2014 (r261896) +++ head/contrib/atf/atf-c/macros_test.c Fri Feb 14 19:33:16 2014 (r261897) @@ -843,11 +843,30 @@ BUILD_TC(use, "macros_h_test.c", "do not cause syntax errors when used", "Build of macros_h_test.c failed; some macros in atf-c/macros.h " *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 19:43:00 2014 Return-Path: Delivered-To: svn-src-all@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 D7CBB7BF; Fri, 14 Feb 2014 19:43: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 C1DF61E56; Fri, 14 Feb 2014 19:43:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1EJh04j001679; Fri, 14 Feb 2014 19:43:00 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1EJh0h0001678; Fri, 14 Feb 2014 19:43:00 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201402141943.s1EJh0h0001678@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 14 Feb 2014 19:43:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261898 - head/sbin/pfctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 19:43:00 -0000 Author: glebius Date: Fri Feb 14 19:43:00 2014 New Revision: 261898 URL: http://svnweb.freebsd.org/changeset/base/261898 Log: Fix build on 32bit arches broken by me in r261882. Modified: head/sbin/pfctl/pfctl.c Modified: head/sbin/pfctl/pfctl.c ============================================================================== --- head/sbin/pfctl/pfctl.c Fri Feb 14 19:33:16 2014 (r261897) +++ head/sbin/pfctl/pfctl.c Fri Feb 14 19:43:00 2014 (r261898) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -791,17 +792,17 @@ pfctl_print_rule_counters(struct pf_rule } if (opts & PF_OPT_VERBOSE) { printf(" [ Evaluations: %-8llu Packets: %-8llu " - "Bytes: %-10llu States: %-6lu]\n", + "Bytes: %-10llu States: %-6ju]\n", (unsigned long long)rule->evaluations, (unsigned long long)(rule->packets[0] + rule->packets[1]), (unsigned long long)(rule->bytes[0] + - rule->bytes[1]), (uint64_t)rule->states_cur); + rule->bytes[1]), (uintmax_t)rule->states_cur); if (!(opts & PF_OPT_DEBUG)) printf(" [ Inserted: uid %u pid %u " - "State Creations: %-6lu]\n", + "State Creations: %-6ju]\n", (unsigned)rule->cuid, (unsigned)rule->cpid, - (uint64_t)rule->states_tot); + (uintmax_t)rule->states_tot); } } From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 20:11:07 2014 Return-Path: Delivered-To: svn-src-all@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 5F47F49D; Fri, 14 Feb 2014 20:11: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 2EF231201; Fri, 14 Feb 2014 20:11:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1EKB62X011935; Fri, 14 Feb 2014 20:11:06 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1EKB6ST011933; Fri, 14 Feb 2014 20:11:06 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201402142011.s1EKB6ST011933@svn.freebsd.org> From: Dimitry Andric Date: Fri, 14 Feb 2014 20:11:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261899 - in head/sys: conf modules/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 20:11:07 -0000 Author: dim Date: Fri Feb 14 20:11:06 2014 New Revision: 261899 URL: http://svnweb.freebsd.org/changeset/base/261899 Log: Similar to r260026, disable warning about unused functions for ieee80211_adhoc.c, ieee80211_hostap.c and ieee80211_sta.c. MFC after: 3 days Modified: head/sys/conf/files head/sys/modules/wlan/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Feb 14 19:43:00 2014 (r261898) +++ head/sys/conf/files Fri Feb 14 20:11:06 2014 (r261899) @@ -3124,7 +3124,8 @@ net80211/ieee80211.c optional wlan net80211/ieee80211_acl.c optional wlan wlan_acl net80211/ieee80211_action.c optional wlan net80211/ieee80211_ageq.c optional wlan -net80211/ieee80211_adhoc.c optional wlan +net80211/ieee80211_adhoc.c optional wlan \ + compile-with "${NORMAL_C} -Wno-unused-function" net80211/ieee80211_ageq.c optional wlan net80211/ieee80211_amrr.c optional wlan | wlan_amrr net80211/ieee80211_crypto.c optional wlan \ @@ -3136,7 +3137,8 @@ net80211/ieee80211_crypto_wep.c optional net80211/ieee80211_ddb.c optional wlan ddb net80211/ieee80211_dfs.c optional wlan net80211/ieee80211_freebsd.c optional wlan -net80211/ieee80211_hostap.c optional wlan +net80211/ieee80211_hostap.c optional wlan \ + compile-with "${NORMAL_C} -Wno-unused-function" net80211/ieee80211_ht.c optional wlan net80211/ieee80211_hwmp.c optional wlan ieee80211_support_mesh net80211/ieee80211_input.c optional wlan @@ -3156,7 +3158,8 @@ net80211/ieee80211_regdomain.c optional net80211/ieee80211_rssadapt.c optional wlan wlan_rssadapt net80211/ieee80211_scan.c optional wlan net80211/ieee80211_scan_sta.c optional wlan -net80211/ieee80211_sta.c optional wlan +net80211/ieee80211_sta.c optional wlan \ + compile-with "${NORMAL_C} -Wno-unused-function" net80211/ieee80211_superg.c optional wlan ieee80211_support_superg net80211/ieee80211_tdma.c optional wlan ieee80211_support_tdma net80211/ieee80211_wds.c optional wlan Modified: head/sys/modules/wlan/Makefile ============================================================================== --- head/sys/modules/wlan/Makefile Fri Feb 14 19:43:00 2014 (r261898) +++ head/sys/modules/wlan/Makefile Fri Feb 14 20:11:06 2014 (r261899) @@ -32,6 +32,9 @@ opt_ddb.h: .include +CWARNFLAGS.ieee80211_adhoc.c= -Wno-unused-function CWARNFLAGS.ieee80211_crypto.c= -Wno-unused-function +CWARNFLAGS.ieee80211_hostap.c= -Wno-unused-function CWARNFLAGS.ieee80211_mesh.c= -Wno-unused-function +CWARNFLAGS.ieee80211_sta.c= -Wno-unused-function CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 20:34:25 2014 Return-Path: Delivered-To: svn-src-all@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 0D6A7D7B; Fri, 14 Feb 2014 20:34: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 EB83413E4; Fri, 14 Feb 2014 20:34:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1EKYO9Y022424; Fri, 14 Feb 2014 20:34:24 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1EKYOob022423; Fri, 14 Feb 2014 20:34:24 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402142034.s1EKYOob022423@svn.freebsd.org> From: Christian Brueffer Date: Fri, 14 Feb 2014 20:34:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261900 - head/usr.sbin/ppp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 20:34:25 -0000 Author: brueffer Date: Fri Feb 14 20:34:24 2014 New Revision: 261900 URL: http://svnweb.freebsd.org/changeset/base/261900 Log: In chat_UpdateSet(), initialize the input buffer to prevent stale data from previous timed out commands. PR: 186530 Submitted by: Alexander Zagrebin Reviewed by: brian MFC after: 1 week Modified: head/usr.sbin/ppp/chat.c Modified: head/usr.sbin/ppp/chat.c ============================================================================== --- head/usr.sbin/ppp/chat.c Fri Feb 14 20:11:06 2014 (r261899) +++ head/usr.sbin/ppp/chat.c Fri Feb 14 20:34:24 2014 (r261900) @@ -154,6 +154,11 @@ chat_UpdateSet(struct fdescriptor *d, fd else { /* c->state = CHAT_EXPECT; */ c->argptr = &arg_term; + /* + We have to clear the input buffer, because it contains output + from the previous (timed out) command. + */ + c->bufstart = c->bufend; } c->TimedOut = 0; } From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 20:54:04 2014 Return-Path: Delivered-To: svn-src-all@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 252BB87F; Fri, 14 Feb 2014 20:54: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 1066A1655; Fri, 14 Feb 2014 20:54:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1EKs3im030132; Fri, 14 Feb 2014 20:54:03 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1EKs3ss030131; Fri, 14 Feb 2014 20:54:03 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201402142054.s1EKs3ss030131@svn.freebsd.org> From: Sergey Kandaurov Date: Fri, 14 Feb 2014 20:54:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261901 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 20:54:04 -0000 Author: pluknet Date: Fri Feb 14 20:54:03 2014 New Revision: 261901 URL: http://svnweb.freebsd.org/changeset/base/261901 Log: Preserve one character space for a trailing '\0'. Found by: Ivan Klymenko via cppcheck Discussed with: ae MFC after: 1 week Modified: head/sys/kern/subr_hints.c Modified: head/sys/kern/subr_hints.c ============================================================================== --- head/sys/kern/subr_hints.c Fri Feb 14 20:34:24 2014 (r261900) +++ head/sys/kern/subr_hints.c Fri Feb 14 20:54:03 2014 (r261901) @@ -210,7 +210,7 @@ res_find(int *line, int *startln, if (strncmp(cp, "hint.", 5) != 0) hit = 0; else - n = sscanf(cp, "hint.%32[^.].%d.%32[^=]=%128s", + n = sscanf(cp, "hint.%32[^.].%d.%32[^=]=%127s", r_name, &r_unit, r_resname, r_value); if (hit && n != 4) { printf("CONFIG: invalid hint '%s'\n", cp); From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 21:06:13 2014 Return-Path: Delivered-To: svn-src-all@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 03A3ED40; Fri, 14 Feb 2014 21: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 DE0E5172B; Fri, 14 Feb 2014 21:06:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1EL6C4u034672; Fri, 14 Feb 2014 21:06:12 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1EL6CoO034671; Fri, 14 Feb 2014 21:06:12 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201402142106.s1EL6CoO034671@svn.freebsd.org> From: Dimitry Andric Date: Fri, 14 Feb 2014 21:06:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261902 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 21:06:13 -0000 Author: dim Date: Fri Feb 14 21:06:12 2014 New Revision: 261902 URL: http://svnweb.freebsd.org/changeset/base/261902 Log: In r260111, in sys/conf/files, I disabled warning about unused functions for the wrong mcg.c, the one in ofed/drivers/infiniband/hw/mlx4. Disable the warning for ofed/drivers/net/mlx4/mcg.c instead. MFC after: 3 days Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Feb 14 20:54:03 2014 (r261901) +++ head/sys/conf/files Fri Feb 14 21:06:12 2014 (r261902) @@ -3567,7 +3567,7 @@ ofed/drivers/infiniband/hw/mlx4/alias_GU compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" ofed/drivers/infiniband/hw/mlx4/mcg.c optional mlx4ib \ no-depend obj-prefix "mlx4ib_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/ -Wno-unused" + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" ofed/drivers/infiniband/hw/mlx4/sysfs.c optional mlx4ib \ no-depend obj-prefix "mlx4ib_" \ compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/" @@ -3631,7 +3631,7 @@ ofed/drivers/net/mlx4/main.c optional compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" ofed/drivers/net/mlx4/mcg.c optional mlx4ib | mlxen \ no-depend obj-prefix "mlx4_" \ - compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" + compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/ -Wno-unused" ofed/drivers/net/mlx4/mr.c optional mlx4ib | mlxen \ no-depend obj-prefix "mlx4_" \ compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 21:20:16 2014 Return-Path: Delivered-To: svn-src-all@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 CE2D1FD2; Fri, 14 Feb 2014 21:20:16 +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 B6C561804; Fri, 14 Feb 2014 21:20:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1ELKGef040913; Fri, 14 Feb 2014 21:20:16 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1ELKGWI040912; Fri, 14 Feb 2014 21:20:16 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201402142120.s1ELKGWI040912@svn.freebsd.org> From: Dimitry Andric Date: Fri, 14 Feb 2014 21:20:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261903 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 21:20:16 -0000 Author: dim Date: Fri Feb 14 21:20:16 2014 New Revision: 261903 URL: http://svnweb.freebsd.org/changeset/base/261903 Log: Disable warning about unused static const variables for sys/pci/ncr.c. MFC after: 3 days Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Feb 14 21:06:12 2014 (r261902) +++ head/sys/conf/files Fri Feb 14 21:20:16 2014 (r261903) @@ -3741,7 +3741,8 @@ pci/amdpm.c optional amdpm pci | nfpm pci/amdsmb.c optional amdsmb pci pci/if_rl.c optional rl pci pci/intpm.c optional intpm pci -pci/ncr.c optional ncr pci +pci/ncr.c optional ncr pci \ + compile-with "${NORMAL_C} -Wno-unused" pci/nfsmb.c optional nfsmb pci pci/viapm.c optional viapm pci rpc/auth_none.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 21:34:09 2014 Return-Path: Delivered-To: svn-src-all@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 57DFE43E; Fri, 14 Feb 2014 21:34: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 4188F1961; Fri, 14 Feb 2014 21:34:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1ELY9pp046199; Fri, 14 Feb 2014 21:34:09 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1ELY8fe046194; Fri, 14 Feb 2014 21:34:08 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201402142134.s1ELY8fe046194@svn.freebsd.org> From: Neel Natu Date: Fri, 14 Feb 2014 21:34:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261904 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 21:34:09 -0000 Author: neel Date: Fri Feb 14 21:34:08 2014 New Revision: 261904 URL: http://svnweb.freebsd.org/changeset/base/261904 Log: Allow PCI devices to be configured on all valid bus numbers from 0 to 255. This is done by representing each bus as root PCI device in ACPI. The device implements the _BBN method to return the PCI bus number to the guest OS. Each PCI bus keeps track of the resources that is decodes for devices configured on the bus: i/o, mmio (32-bit) and mmio (64-bit). These windows are advertised to the guest via the _CRS object of the root device. Bus 0 is treated specially since it consumes the I/O ports to access the PCI config space [0xcf8-0xcff]. It also decodes the legacy I/O ports that are consumed by devices on the LPC bus. For this reason the LPC bridge can be configured only on bus 0. The bus number can be specified using the following command line option to bhyve(8): "-s ::,[,]" Discussed with: grehan@ Reviewed by: jhb@ Modified: head/usr.sbin/bhyve/acpi.c head/usr.sbin/bhyve/mptbl.c head/usr.sbin/bhyve/pci_emul.c head/usr.sbin/bhyve/pci_emul.h head/usr.sbin/bhyve/pci_lpc.c Modified: head/usr.sbin/bhyve/acpi.c ============================================================================== --- head/usr.sbin/bhyve/acpi.c Fri Feb 14 21:20:16 2014 (r261903) +++ head/usr.sbin/bhyve/acpi.c Fri Feb 14 21:34:08 2014 (r261904) @@ -713,7 +713,7 @@ basl_fwrite_dsdt(FILE *fp) pci_write_dsdt(); dsdt_line(""); - dsdt_line(" Scope (_SB.PCI0)"); + dsdt_line(" Scope (_SB.PC00)"); dsdt_line(" {"); dsdt_line(" Device (HPET)"); dsdt_line(" {"); Modified: head/usr.sbin/bhyve/mptbl.c ============================================================================== --- head/usr.sbin/bhyve/mptbl.c Fri Feb 14 21:20:16 2014 (r261903) +++ head/usr.sbin/bhyve/mptbl.c Fri Feb 14 21:34:08 2014 (r261904) @@ -196,16 +196,21 @@ mpt_build_ioapic_entries(io_apic_entry_p static int mpt_count_ioint_entries(void) { + int bus, count; + + count = 0; + for (bus = 0; bus <= PCI_BUSMAX; bus++) + count += pci_count_lintr(bus); /* * Always include entries for the first 16 pins along with a entry * for each active PCI INTx pin. */ - return (16 + pci_count_lintr()); + return (16 + count); } static void -mpt_generate_pci_int(int slot, int pin, int ioapic_irq, void *arg) +mpt_generate_pci_int(int bus, int slot, int pin, int ioapic_irq, void *arg) { int_entry_ptr *mpiep, mpie; @@ -219,7 +224,7 @@ mpt_generate_pci_int(int slot, int pin, */ mpie->type = MPCT_ENTRY_INT; mpie->int_type = INTENTRY_TYPE_INT; - mpie->src_bus_id = 0; + mpie->src_bus_id = bus; mpie->src_bus_irq = slot << 2 | (pin - 1); mpie->dst_apic_id = mpie[-1].dst_apic_id; mpie->dst_apic_int = ioapic_irq; @@ -230,7 +235,7 @@ mpt_generate_pci_int(int slot, int pin, static void mpt_build_ioint_entries(int_entry_ptr mpie, int id) { - int pin; + int pin, bus; /* * The following config is taken from kernel mptable.c @@ -277,7 +282,8 @@ mpt_build_ioint_entries(int_entry_ptr mp } /* Next, generate entries for any PCI INTx interrupts. */ - pci_walk_lintr(mpt_generate_pci_int, &mpie); + for (bus = 0; bus <= PCI_BUSMAX; bus++) + pci_walk_lintr(bus, mpt_generate_pci_int, &mpie); } void Modified: head/usr.sbin/bhyve/pci_emul.c ============================================================================== --- head/usr.sbin/bhyve/pci_emul.c Fri Feb 14 21:20:16 2014 (r261903) +++ head/usr.sbin/bhyve/pci_emul.c Fri Feb 14 21:34:08 2014 (r261904) @@ -69,6 +69,7 @@ do { \ } \ } while (0) +#define MAXBUSES (PCI_BUSMAX + 1) #define MAXSLOTS (PCI_SLOTMAX + 1) #define MAXFUNCS (PCI_FUNCMAX + 1) @@ -86,7 +87,16 @@ struct intxinfo { struct slotinfo { struct intxinfo si_intpins[4]; struct funcinfo si_funcs[MAXFUNCS]; -} pci_slotinfo[MAXSLOTS]; +}; + +struct businfo { + uint16_t iobase, iolimit; /* I/O window */ + uint32_t membase32, memlimit32; /* mmio window below 4GB */ + uint64_t membase64, memlimit64; /* mmio window above 4GB */ + struct slotinfo slotinfo[MAXSLOTS]; +}; + +static struct businfo *pci_businfo[MAXBUSES]; SET_DECLARE(pci_devemu_set, struct pci_devemu); @@ -97,7 +107,7 @@ static uint64_t pci_emul_membase64; #define PCI_EMUL_IOBASE 0x2000 #define PCI_EMUL_IOLIMIT 0x10000 -#define PCI_EMUL_MEMLIMIT32 0xE0000000 /* 3.5GB */ +#define PCI_EMUL_MEMLIMIT32 0xE0000000 /* 3.5GB */ #define PCI_EMUL_MEMBASE64 0xD000000000UL #define PCI_EMUL_MEMLIMIT64 0xFD00000000UL @@ -105,7 +115,6 @@ static uint64_t pci_emul_membase64; static struct pci_devemu *pci_emul_finddev(char *name); static void pci_lintr_update(struct pci_devinst *pi); -static int pci_emul_devices; static struct mem_range pci_mem_hole; /* @@ -115,6 +124,7 @@ static struct mem_range pci_mem_hole; /* * Slot options are in the form: * + * ::,[,] * [:],[,] * * slot is 0..31 @@ -136,37 +146,53 @@ pci_parse_slot_usage(char *aopt) int pci_parse_slot(char *opt) { - char *slot, *func, *emul, *config; - char *str, *cpy; - int error, snum, fnum; + struct businfo *bi; + struct slotinfo *si; + char *emul, *config, *str, *cp; + int error, bnum, snum, fnum; error = -1; - str = cpy = strdup(opt); + str = strdup(opt); - slot = strsep(&str, ","); - func = NULL; - if (strchr(slot, ':') != NULL) { - func = cpy; - (void) strsep(&func, ":"); - } - - emul = strsep(&str, ","); - config = str; - - if (emul == NULL) { + emul = config = NULL; + if ((cp = strchr(str, ',')) != NULL) { + *cp = '\0'; + emul = cp + 1; + if ((cp = strchr(emul, ',')) != NULL) { + *cp = '\0'; + config = cp + 1; + } + } else { pci_parse_slot_usage(opt); goto done; } - snum = atoi(slot); - fnum = func ? atoi(func) : 0; + /* :: */ + if (sscanf(str, "%d:%d:%d", &bnum, &snum, &fnum) != 3) { + bnum = 0; + /* : */ + if (sscanf(str, "%d:%d", &snum, &fnum) != 2) { + fnum = 0; + /* */ + if (sscanf(str, "%d", &snum) != 1) { + snum = -1; + } + } + } - if (snum < 0 || snum >= MAXSLOTS || fnum < 0 || fnum >= MAXFUNCS) { + if (bnum < 0 || bnum >= MAXBUSES || snum < 0 || snum >= MAXSLOTS || + fnum < 0 || fnum >= MAXFUNCS) { pci_parse_slot_usage(opt); goto done; } - if (pci_slotinfo[snum].si_funcs[fnum].fi_name != NULL) { + if (pci_businfo[bnum] == NULL) + pci_businfo[bnum] = calloc(1, sizeof(struct businfo)); + + bi = pci_businfo[bnum]; + si = &bi->slotinfo[snum]; + + if (si->si_funcs[fnum].fi_name != NULL) { fprintf(stderr, "pci slot %d:%d already occupied!\n", snum, fnum); goto done; @@ -179,12 +205,12 @@ pci_parse_slot(char *opt) } error = 0; - pci_slotinfo[snum].si_funcs[fnum].fi_name = emul; - pci_slotinfo[snum].si_funcs[fnum].fi_param = config; + si->si_funcs[fnum].fi_name = emul; + si->si_funcs[fnum].fi_param = config; done: if (error) - free(cpy); + free(str); return (error); } @@ -665,8 +691,8 @@ pci_emul_finddev(char *name) } static int -pci_emul_init(struct vmctx *ctx, struct pci_devemu *pde, int slot, int func, - char *params) +pci_emul_init(struct vmctx *ctx, struct pci_devemu *pde, int bus, int slot, + int func, struct funcinfo *fi) { struct pci_devinst *pdi; int err; @@ -675,7 +701,7 @@ pci_emul_init(struct vmctx *ctx, struct bzero(pdi, sizeof(*pdi)); pdi->pi_vmctx = ctx; - pdi->pi_bus = 0; + pdi->pi_bus = bus; pdi->pi_slot = slot; pdi->pi_func = func; pthread_mutex_init(&pdi->pi_lintr.lock, NULL); @@ -692,13 +718,11 @@ pci_emul_init(struct vmctx *ctx, struct pci_set_cfgdata8(pdi, PCIR_COMMAND, PCIM_CMD_PORTEN | PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN); - err = (*pde->pe_init)(ctx, pdi, params); - if (err != 0) { + err = (*pde->pe_init)(ctx, pdi, fi->fi_param); + if (err == 0) + fi->fi_devi = pdi; + else free(pdi); - } else { - pci_emul_devices++; - pci_slotinfo[slot].si_funcs[func].fi_devi = pdi; - } return (err); } @@ -1006,31 +1030,68 @@ pci_emul_fallback_handler(struct vmctx * return (0); } +#define BUSIO_ROUNDUP 32 +#define BUSMEM_ROUNDUP (1024 * 1024) + int init_pci(struct vmctx *ctx) { struct pci_devemu *pde; + struct businfo *bi; + struct slotinfo *si; struct funcinfo *fi; size_t lowmem; - int slot, func; + int bus, slot, func; int error; pci_emul_iobase = PCI_EMUL_IOBASE; pci_emul_membase32 = vm_get_lowmem_limit(ctx); pci_emul_membase64 = PCI_EMUL_MEMBASE64; - for (slot = 0; slot < MAXSLOTS; slot++) { - for (func = 0; func < MAXFUNCS; func++) { - fi = &pci_slotinfo[slot].si_funcs[func]; - if (fi->fi_name != NULL) { + for (bus = 0; bus < MAXBUSES; bus++) { + if ((bi = pci_businfo[bus]) == NULL) + continue; + /* + * Keep track of the i/o and memory resources allocated to + * this bus. + */ + bi->iobase = pci_emul_iobase; + bi->membase32 = pci_emul_membase32; + bi->membase64 = pci_emul_membase64; + + for (slot = 0; slot < MAXSLOTS; slot++) { + si = &bi->slotinfo[slot]; + for (func = 0; func < MAXFUNCS; func++) { + fi = &si->si_funcs[func]; + if (fi->fi_name == NULL) + continue; pde = pci_emul_finddev(fi->fi_name); assert(pde != NULL); - error = pci_emul_init(ctx, pde, slot, func, - fi->fi_param); + error = pci_emul_init(ctx, pde, bus, slot, + func, fi); if (error) return (error); } } + + /* + * Add some slop to the I/O and memory resources decoded by + * this bus to give a guest some flexibility if it wants to + * reprogram the BARs. + */ + pci_emul_iobase += BUSIO_ROUNDUP; + pci_emul_iobase = roundup2(pci_emul_iobase, BUSIO_ROUNDUP); + bi->iolimit = pci_emul_iobase; + + pci_emul_membase32 += BUSMEM_ROUNDUP; + pci_emul_membase32 = roundup2(pci_emul_membase32, + BUSMEM_ROUNDUP); + bi->memlimit32 = pci_emul_membase32; + + pci_emul_membase64 += BUSMEM_ROUNDUP; + pci_emul_membase64 = roundup2(pci_emul_membase64, + BUSMEM_ROUNDUP); + bi->memlimit64 = pci_emul_membase64; } /* @@ -1060,7 +1121,7 @@ init_pci(struct vmctx *ctx) } static void -pci_prt_entry(int slot, int pin, int ioapic_irq, void *arg) +pci_prt_entry(int bus, int slot, int pin, int ioapic_irq, void *arg) { int *count; @@ -1075,96 +1136,158 @@ pci_prt_entry(int slot, int pin, int ioa (*count)--; } -void -pci_write_dsdt(void) +/* + * A bhyve virtual machine has a flat PCI hierarchy with a root port + * corresponding to each PCI bus. + */ +static void +pci_bus_write_dsdt(int bus) { + struct businfo *bi; + struct slotinfo *si; struct pci_devinst *pi; int count, slot, func; + /* + * If there are no devices on this 'bus' then just return. + */ + if ((bi = pci_businfo[bus]) == NULL) { + /* + * Bus 0 is special because it decodes the I/O ports used + * for PCI config space access even if there are no devices + * on it. + */ + if (bus != 0) + return; + } + dsdt_indent(1); dsdt_line("Scope (_SB)"); dsdt_line("{"); - dsdt_line(" Device (PCI0)"); + dsdt_line(" Device (PC%02X)", bus); dsdt_line(" {"); dsdt_line(" Name (_HID, EisaId (\"PNP0A03\"))"); dsdt_line(" Name (_ADR, Zero)"); + + dsdt_line(" Method (_BBN, 0, NotSerialized)"); + dsdt_line(" {"); + dsdt_line(" Return (0x%08X)", bus); + dsdt_line(" }"); dsdt_line(" Name (_CRS, ResourceTemplate ()"); dsdt_line(" {"); dsdt_line(" WordBusNumber (ResourceProducer, MinFixed, " "MaxFixed, PosDecode,"); dsdt_line(" 0x0000, // Granularity"); - dsdt_line(" 0x0000, // Range Minimum"); - dsdt_line(" 0x00FF, // Range Maximum"); + dsdt_line(" 0x%04X, // Range Minimum", bus); + dsdt_line(" 0x%04X, // Range Maximum", bus); dsdt_line(" 0x0000, // Translation Offset"); - dsdt_line(" 0x0100, // Length"); + dsdt_line(" 0x0001, // Length"); dsdt_line(" ,, )"); - dsdt_indent(3); - dsdt_fixed_ioport(0xCF8, 8); - dsdt_unindent(3); - dsdt_line(" WordIO (ResourceProducer, MinFixed, MaxFixed, " - "PosDecode, EntireRange,"); - dsdt_line(" 0x0000, // Granularity"); - dsdt_line(" 0x0000, // Range Minimum"); - dsdt_line(" 0x0CF7, // Range Maximum"); - dsdt_line(" 0x0000, // Translation Offset"); - dsdt_line(" 0x0CF8, // Length"); - dsdt_line(" ,, , TypeStatic)"); + + if (bus == 0) { + dsdt_indent(3); + dsdt_fixed_ioport(0xCF8, 8); + dsdt_unindent(3); + + dsdt_line(" WordIO (ResourceProducer, MinFixed, MaxFixed, " + "PosDecode, EntireRange,"); + dsdt_line(" 0x0000, // Granularity"); + dsdt_line(" 0x0000, // Range Minimum"); + dsdt_line(" 0x0CF7, // Range Maximum"); + dsdt_line(" 0x0000, // Translation Offset"); + dsdt_line(" 0x0CF8, // Length"); + dsdt_line(" ,, , TypeStatic)"); + + dsdt_line(" WordIO (ResourceProducer, MinFixed, MaxFixed, " + "PosDecode, EntireRange,"); + dsdt_line(" 0x0000, // Granularity"); + dsdt_line(" 0x0D00, // Range Minimum"); + dsdt_line(" 0x%04X, // Range Maximum", + PCI_EMUL_IOBASE - 1); + dsdt_line(" 0x0000, // Translation Offset"); + dsdt_line(" 0x%04X, // Length", + PCI_EMUL_IOBASE - 0x0D00); + dsdt_line(" ,, , TypeStatic)"); + + if (bi == NULL) { + dsdt_line(" })"); + goto done; + } + } + assert(bi != NULL); + + /* i/o window */ dsdt_line(" WordIO (ResourceProducer, MinFixed, MaxFixed, " "PosDecode, EntireRange,"); dsdt_line(" 0x0000, // Granularity"); - dsdt_line(" 0x0D00, // Range Minimum"); - dsdt_line(" 0xFFFF, // Range Maximum"); + dsdt_line(" 0x%04X, // Range Minimum", bi->iobase); + dsdt_line(" 0x%04X, // Range Maximum", + bi->iolimit - 1); dsdt_line(" 0x0000, // Translation Offset"); - dsdt_line(" 0xF300, // Length"); + dsdt_line(" 0x%04X, // Length", + bi->iolimit - bi->iobase); dsdt_line(" ,, , TypeStatic)"); + + /* mmio window (32-bit) */ dsdt_line(" DWordMemory (ResourceProducer, PosDecode, " "MinFixed, MaxFixed, NonCacheable, ReadWrite,"); dsdt_line(" 0x00000000, // Granularity"); - dsdt_line(" 0x%08lX, // Range Minimum\n", - pci_mem_hole.base); + dsdt_line(" 0x%08X, // Range Minimum\n", bi->membase32); dsdt_line(" 0x%08X, // Range Maximum\n", - PCI_EMUL_MEMLIMIT32 - 1); + bi->memlimit32 - 1); dsdt_line(" 0x00000000, // Translation Offset"); - dsdt_line(" 0x%08lX, // Length\n", - PCI_EMUL_MEMLIMIT32 - pci_mem_hole.base); + dsdt_line(" 0x%08X, // Length\n", + bi->memlimit32 - bi->membase32); dsdt_line(" ,, , AddressRangeMemory, TypeStatic)"); + + /* mmio window (64-bit) */ dsdt_line(" QWordMemory (ResourceProducer, PosDecode, " "MinFixed, MaxFixed, NonCacheable, ReadWrite,"); dsdt_line(" 0x0000000000000000, // Granularity"); - dsdt_line(" 0x%016lX, // Range Minimum\n", - PCI_EMUL_MEMBASE64); + dsdt_line(" 0x%016lX, // Range Minimum\n", bi->membase64); dsdt_line(" 0x%016lX, // Range Maximum\n", - PCI_EMUL_MEMLIMIT64 - 1); + bi->memlimit64 - 1); dsdt_line(" 0x0000000000000000, // Translation Offset"); dsdt_line(" 0x%016lX, // Length\n", - PCI_EMUL_MEMLIMIT64 - PCI_EMUL_MEMBASE64); + bi->memlimit64 - bi->membase64); dsdt_line(" ,, , AddressRangeMemory, TypeStatic)"); dsdt_line(" })"); - count = pci_count_lintr(); + + count = pci_count_lintr(bus); if (count != 0) { dsdt_indent(2); dsdt_line("Name (_PRT, Package (0x%02X)", count); dsdt_line("{"); - pci_walk_lintr(pci_prt_entry, &count); + pci_walk_lintr(bus, pci_prt_entry, &count); dsdt_line("})"); dsdt_unindent(2); } dsdt_indent(2); for (slot = 0; slot < MAXSLOTS; slot++) { + si = &bi->slotinfo[slot]; for (func = 0; func < MAXFUNCS; func++) { - pi = pci_slotinfo[slot].si_funcs[func].fi_devi; + pi = si->si_funcs[func].fi_devi; if (pi != NULL && pi->pi_d->pe_write_dsdt != NULL) pi->pi_d->pe_write_dsdt(pi); } } dsdt_unindent(2); - +done: dsdt_line(" }"); dsdt_line("}"); dsdt_unindent(1); } +void +pci_write_dsdt(void) +{ + int bus; + + for (bus = 0; bus < MAXBUSES; bus++) + pci_bus_write_dsdt(bus); +} + int pci_msi_enabled(struct pci_devinst *pi) { @@ -1231,13 +1354,17 @@ pci_lintr_permitted(struct pci_devinst * int pci_lintr_request(struct pci_devinst *pi) { + struct businfo *bi; struct slotinfo *si; int bestpin, bestcount, irq, pin; + bi = pci_businfo[pi->pi_bus]; + assert(bi != NULL); + /* * First, allocate a pin from our slot. */ - si = &pci_slotinfo[pi->pi_slot]; + si = &bi->slotinfo[pi->pi_slot]; bestpin = 0; bestcount = si->si_intpins[0].ii_count; for (pin = 1; pin < 4; pin++) { @@ -1318,31 +1445,41 @@ pci_lintr_update(struct pci_devinst *pi) } int -pci_count_lintr(void) +pci_count_lintr(int bus) { int count, slot, pin; + struct slotinfo *slotinfo; count = 0; - for (slot = 0; slot < MAXSLOTS; slot++) { - for (pin = 0; pin < 4; pin++) { - if (pci_slotinfo[slot].si_intpins[pin].ii_count != 0) - count++; + if (pci_businfo[bus] != NULL) { + for (slot = 0; slot < MAXSLOTS; slot++) { + slotinfo = &pci_businfo[bus]->slotinfo[slot]; + for (pin = 0; pin < 4; pin++) { + if (slotinfo->si_intpins[pin].ii_count != 0) + count++; + } } } return (count); } void -pci_walk_lintr(pci_lintr_cb cb, void *arg) +pci_walk_lintr(int bus, pci_lintr_cb cb, void *arg) { + struct businfo *bi; + struct slotinfo *si; struct intxinfo *ii; int slot, pin; + if ((bi = pci_businfo[bus]) == NULL) + return; + for (slot = 0; slot < MAXSLOTS; slot++) { + si = &bi->slotinfo[slot]; for (pin = 0; pin < 4; pin++) { - ii = &pci_slotinfo[slot].si_intpins[pin]; + ii = &si->si_intpins[pin]; if (ii->ii_count != 0) - cb(slot, pin + 1, ii->ii_ioapic_irq, arg); + cb(bus, slot, pin + 1, ii->ii_ioapic_irq, arg); } } } @@ -1352,14 +1489,19 @@ pci_walk_lintr(pci_lintr_cb cb, void *ar * Return 0 otherwise. */ static int -pci_emul_is_mfdev(int slot) +pci_emul_is_mfdev(int bus, int slot) { + struct businfo *bi; + struct slotinfo *si; int f, numfuncs; numfuncs = 0; - for (f = 0; f < MAXFUNCS; f++) { - if (pci_slotinfo[slot].si_funcs[f].fi_devi != NULL) { - numfuncs++; + if ((bi = pci_businfo[bus]) != NULL) { + si = &bi->slotinfo[slot]; + for (f = 0; f < MAXFUNCS; f++) { + if (si->si_funcs[f].fi_devi != NULL) { + numfuncs++; + } } } return (numfuncs > 1); @@ -1370,12 +1512,12 @@ pci_emul_is_mfdev(int slot) * whether or not is a multi-function being emulated in the pci 'slot'. */ static void -pci_emul_hdrtype_fixup(int slot, int off, int bytes, uint32_t *rv) +pci_emul_hdrtype_fixup(int bus, int slot, int off, int bytes, uint32_t *rv) { int mfdev; if (off <= PCIR_HDRTYPE && off + bytes > PCIR_HDRTYPE) { - mfdev = pci_emul_is_mfdev(slot); + mfdev = pci_emul_is_mfdev(bus, slot); switch (bytes) { case 1: case 2: @@ -1492,16 +1634,19 @@ static int pci_emul_cfgdata(struct vmctx *ctx, int vcpu, int in, int port, int bytes, uint32_t *eax, void *arg) { + struct businfo *bi; + struct slotinfo *si; struct pci_devinst *pi; struct pci_devemu *pe; int coff, idx, needcfg; uint64_t addr, bar, mask; assert(bytes == 1 || bytes == 2 || bytes == 4); - - if (cfgbus == 0) - pi = pci_slotinfo[cfgslot].si_funcs[cfgfunc].fi_devi; - else + + if ((bi = pci_businfo[cfgbus]) != NULL) { + si = &bi->slotinfo[cfgslot]; + pi = si->si_funcs[cfgfunc].fi_devi; + } else pi = NULL; coff = cfgoff + (port - CONF1_DATA_PORT); @@ -1544,7 +1689,7 @@ pci_emul_cfgdata(struct vmctx *ctx, int *eax = pci_get_cfgdata32(pi, coff); } - pci_emul_hdrtype_fixup(cfgslot, coff, bytes, eax); + pci_emul_hdrtype_fixup(cfgbus, cfgslot, coff, bytes, eax); } else { /* Let the device emulation override the default handler */ if (pe->pe_cfgwrite != NULL && @@ -1646,7 +1791,7 @@ SYSRES_IO(0xC00, 2); /* * Define a dummy test device */ -#define DIOSZ 20 +#define DIOSZ 8 #define DMEMSZ 4096 struct pci_emul_dsoftc { uint8_t ioregs[DIOSZ]; Modified: head/usr.sbin/bhyve/pci_emul.h ============================================================================== --- head/usr.sbin/bhyve/pci_emul.h Fri Feb 14 21:20:16 2014 (r261903) +++ head/usr.sbin/bhyve/pci_emul.h Fri Feb 14 21:34:08 2014 (r261904) @@ -199,7 +199,7 @@ struct pciecap { uint16_t slot_status2; } __packed; -typedef void (*pci_lintr_cb)(int slot, int pin, int ioapic_irq, void *arg); +typedef void (*pci_lintr_cb)(int b, int s, int pin, int ioapic_irq, void *arg); int init_pci(struct vmctx *ctx); void msicap_cfgwrite(struct pci_devinst *pi, int capoff, int offset, @@ -229,8 +229,8 @@ int pci_emul_add_msixcap(struct pci_devi int pci_emul_msix_twrite(struct pci_devinst *pi, uint64_t offset, int size, uint64_t value); uint64_t pci_emul_msix_tread(struct pci_devinst *pi, uint64_t offset, int size); -int pci_count_lintr(void); -void pci_walk_lintr(pci_lintr_cb cb, void *arg); +int pci_count_lintr(int bus); +void pci_walk_lintr(int bus, pci_lintr_cb cb, void *arg); void pci_write_dsdt(void); static __inline void Modified: head/usr.sbin/bhyve/pci_lpc.c ============================================================================== --- head/usr.sbin/bhyve/pci_lpc.c Fri Feb 14 21:20:16 2014 (r261903) +++ head/usr.sbin/bhyve/pci_lpc.c Fri Feb 14 21:34:08 2014 (r261904) @@ -277,8 +277,20 @@ pci_lpc_init(struct vmctx *ctx, struct p /* * Do not allow more than one LPC bridge to be configured. */ - if (lpc_bridge != NULL) + if (lpc_bridge != NULL) { + fprintf(stderr, "Only one LPC bridge is allowed.\n"); return (-1); + } + + /* + * Enforce that the LPC can only be configured on bus 0. This + * simplifies the ACPI DSDT because it can provide a decode for + * all legacy i/o ports behind bus 0. + */ + if (pi->pi_bus != 0) { + fprintf(stderr, "LPC bridge can be present only on bus 0.\n"); + return (-1); + } if (lpc_init() != 0) return (-1); From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 21:46:04 2014 Return-Path: Delivered-To: svn-src-all@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 BF06B748; Fri, 14 Feb 2014 21:46: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 A909D1A20; Fri, 14 Feb 2014 21:46:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1ELk4B7050199; Fri, 14 Feb 2014 21:46:04 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1ELk4GP050198; Fri, 14 Feb 2014 21:46:04 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201402142146.s1ELk4GP050198@svn.freebsd.org> From: Neel Natu Date: Fri, 14 Feb 2014 21:46:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261905 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 21:46:04 -0000 Author: neel Date: Fri Feb 14 21:46:04 2014 New Revision: 261905 URL: http://svnweb.freebsd.org/changeset/base/261905 Log: Update bhyve(8) man page to describe the usage of the "-s" option to assign bus numbers to emulated devices. Also add the restriction that the LPC bridge emulation can only be configured on bus 0. Reviewed by: grehan@ Modified: head/usr.sbin/bhyve/bhyve.8 Modified: head/usr.sbin/bhyve/bhyve.8 ============================================================================== --- head/usr.sbin/bhyve/bhyve.8 Fri Feb 14 21:34:08 2014 (r261904) +++ head/usr.sbin/bhyve/bhyve.8 Fri Feb 14 21:46:04 2014 (r261905) @@ -98,12 +98,17 @@ There are 32 available slots, with the o per slot. .Bl -tag -width 10n .It Ar slot -.Ar pcislot Ns Op Ar :function +.Ar pcislot[:function] + +.Ar bus:pcislot:function .Pp The .Ar pcislot -value is 0 to 31 and the optional function value is 0 to 7. +value is 0 to 31. The optional function value is 0 to 7. The optional +.Ar bus +value is 0 to 255. If not specified, the function value defaults to 0. +If not specified, the bus value defaults to 0. .It Ar emulation .Bl -tag -width 10n .It Li hostbridge | Li amd_hostbridge @@ -128,7 +133,8 @@ AHCI controller attached to a SATA hard- .It Li uart PCI 16550 serial device. .It Li lpc -LPC PCI-ISA bridge with COM1 and COM2 16550 serial ports. +LPC PCI-ISA bridge with COM1 and COM2 16550 serial ports. The LPC bridge +emulation can only be configured on bus 0. .El .It Op Ar conf This optional parameter describes the backend for device emulations. From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 23:19:51 2014 Return-Path: Delivered-To: svn-src-all@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 CFC08EF; Fri, 14 Feb 2014 23:19: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 B951611E4; Fri, 14 Feb 2014 23:19:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1ENJp79086236; Fri, 14 Feb 2014 23:19:51 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1ENJptX086235; Fri, 14 Feb 2014 23:19:51 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201402142319.s1ENJptX086235@svn.freebsd.org> From: Adrian Chadd Date: Fri, 14 Feb 2014 23:19:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261906 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 23:19:51 -0000 Author: adrian Date: Fri Feb 14 23:19:51 2014 New Revision: 261906 URL: http://svnweb.freebsd.org/changeset/base/261906 Log: Include the CPU id in the per-CPU timer swi thread descriptions. Original patch by: jhb Modified: head/sys/kern/kern_timeout.c Modified: head/sys/kern/kern_timeout.c ============================================================================== --- head/sys/kern/kern_timeout.c Fri Feb 14 21:46:04 2014 (r261905) +++ head/sys/kern/kern_timeout.c Fri Feb 14 23:19:51 2014 (r261906) @@ -352,12 +352,14 @@ static void start_softclock(void *dummy) { struct callout_cpu *cc; + char name[MAXCOMLEN]; #ifdef SMP int cpu; #endif cc = CC_CPU(timeout_cpu); - if (swi_add(&clk_intr_event, "clock", softclock, cc, SWI_CLOCK, + snprintf(name, sizeof(name), "clock (%d)", timeout_cpu); + if (swi_add(&clk_intr_event, name, softclock, cc, SWI_CLOCK, INTR_MPSAFE, &cc->cc_cookie)) panic("died while creating standard software ithreads"); #ifdef SMP @@ -367,7 +369,8 @@ start_softclock(void *dummy) cc = CC_CPU(cpu); cc->cc_callout = NULL; /* Only cpu0 handles timeout(9). */ callout_cpu_init(cc); - if (swi_add(NULL, "clock", softclock, cc, SWI_CLOCK, + snprintf(name, sizeof(name), "clock (%d)", cpu); + if (swi_add(NULL, name, softclock, cc, SWI_CLOCK, INTR_MPSAFE, &cc->cc_cookie)) panic("died while creating standard software ithreads"); } From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 23:38:43 2014 Return-Path: Delivered-To: svn-src-all@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 27E04346; Fri, 14 Feb 2014 23:38:43 +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 12648131C; Fri, 14 Feb 2014 23:38:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1ENcg5V093752; Fri, 14 Feb 2014 23:38:42 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1ENcg9J093751; Fri, 14 Feb 2014 23:38:42 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201402142338.s1ENcg9J093751@svn.freebsd.org> From: Dimitry Andric Date: Fri, 14 Feb 2014 23:38:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261907 - head/sys/dev/cxgbe/iw_cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Feb 2014 23:38:43 -0000 Author: dim Date: Fri Feb 14 23:38:42 2014 New Revision: 261907 URL: http://svnweb.freebsd.org/changeset/base/261907 Log: In cxgbe, conditionalize the t4_pgprot_wc() function, since it is only used when DOT5 is defined. Reviewed by: np MFC after: 3 days Modified: head/sys/dev/cxgbe/iw_cxgbe/provider.c Modified: head/sys/dev/cxgbe/iw_cxgbe/provider.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/provider.c Fri Feb 14 23:19:51 2014 (r261906) +++ head/sys/dev/cxgbe/iw_cxgbe/provider.c Fri Feb 14 23:38:42 2014 (r261907) @@ -113,10 +113,12 @@ static struct ib_ucontext *c4iw_alloc_uc return &context->ibucontext; } +#ifdef DOT5 static inline pgprot_t t4_pgprot_wc(pgprot_t prot) { return pgprot_writecombine(prot); } +#endif static int c4iw_mmap(struct ib_ucontext *context, struct vm_area_struct *vma) { From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 02:30:34 2014 Return-Path: Delivered-To: svn-src-all@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 EDD5B707; Sat, 15 Feb 2014 02:30: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 D73931DA8; Sat, 15 Feb 2014 02:30:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1F2UYf8061193; Sat, 15 Feb 2014 02:30:34 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1F2UYD6061192; Sat, 15 Feb 2014 02:30:34 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402150230.s1F2UYD6061192@svn.freebsd.org> From: Ian Lepore Date: Sat, 15 Feb 2014 02:30:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261908 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 02:30:35 -0000 Author: ian Date: Sat Feb 15 02:30:34 2014 New Revision: 261908 URL: http://svnweb.freebsd.org/changeset/base/261908 Log: Fix a typo, C_ALSOLUTE -> C_ABSOLUTE. Modified: head/share/man/man9/timeout.9 Modified: head/share/man/man9/timeout.9 ============================================================================== --- head/share/man/man9/timeout.9 Fri Feb 14 23:38:42 2014 (r261907) +++ head/share/man/man9/timeout.9 Sat Feb 15 02:30:34 2014 (r261908) @@ -357,7 +357,7 @@ The following .Fa flags may be specified: .Bl -tag -width ".Dv C_DIRECT_EXEC" -.It Dv C_ALSOLUTE +.It Dv C_ABSOLUTE Handle the .Fa sbt argument as absolute time of the event since boot, or relative time otherwise. From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 04:53:05 2014 Return-Path: Delivered-To: svn-src-all@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 717FB807; Sat, 15 Feb 2014 04:53: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 5AD1D155A; Sat, 15 Feb 2014 04:53:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1F4r5cw019087; Sat, 15 Feb 2014 04:53:05 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1F4r423019083; Sat, 15 Feb 2014 04:53:04 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201402150453.s1F4r423019083@svn.freebsd.org> From: Luigi Rizzo Date: Sat, 15 Feb 2014 04:53:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261909 - in head: sys/conf sys/dev/netmap sys/modules/netmap sys/net tools/tools/netmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 04:53:05 -0000 Author: luigi Date: Sat Feb 15 04:53:04 2014 New Revision: 261909 URL: http://svnweb.freebsd.org/changeset/base/261909 Log: This new version of netmap brings you the following: - netmap pipes, providing bidirectional blocking I/O while moving 100+ Mpps between processes using shared memory channels (no mistake: over one hundred million. But mind you, i said *moving* not *processing*); - kqueue support (BHyVe needs it); - improved user library. Just the interface name lets you select a NIC, host port, VALE switch port, netmap pipe, and individual queues. The upcoming netmap-enabled libpcap will use this feature. - optional extra buffers associated to netmap ports, for applications that need to buffer data yet don't want to make copies. - segmentation offloading for the VALE switch, useful between VMs. and a number of bug fixes and performance improvements. My colleagues Giuseppe Lettieri and Vincenzo Maffione did a substantial amount of work on these features so we owe them a big thanks. There are some external repositories that can be of interest: https://code.google.com/p/netmap our public repository for netmap/VALE code, including linux versions and other stuff that does not belong here, such as python bindings. https://code.google.com/p/netmap-libpcap a clone of the libpcap repository with netmap support. With this any libpcap client has access to most netmap feature with no recompilation. E.g. tcpdump can filter packets at 10-15 Mpps. https://code.google.com/p/netmap-ipfw a userspace version of ipfw+dummynet which uses netmap to send/receive packets. Speed is up in the 7-10 Mpps range per core for simple rulesets. Both netmap-libpcap and netmap-ipfw will be merged upstream at some point, but while this happens it is useful to have access to them. And yes, this code will be merged soon. It is infinitely better than the version currently in 10 and 9. MFC after: 3 days Added: head/sys/dev/netmap/netmap_offloadings.c (contents, props changed) head/sys/dev/netmap/netmap_pipe.c (contents, props changed) Deleted: head/tools/tools/netmap/click-test.cfg head/tools/tools/netmap/nm_util.c head/tools/tools/netmap/nm_util.h head/tools/tools/netmap/pcap.c Modified: head/sys/conf/files head/sys/dev/netmap/netmap.c head/sys/dev/netmap/netmap_freebsd.c head/sys/dev/netmap/netmap_generic.c head/sys/dev/netmap/netmap_kern.h head/sys/dev/netmap/netmap_mem2.c head/sys/dev/netmap/netmap_mem2.h head/sys/dev/netmap/netmap_vale.c head/sys/modules/netmap/Makefile head/sys/net/netmap.h head/sys/net/netmap_user.h head/tools/tools/netmap/Makefile head/tools/tools/netmap/README head/tools/tools/netmap/bridge.c head/tools/tools/netmap/pkt-gen.c head/tools/tools/netmap/vale-ctl.c Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Feb 15 02:30:34 2014 (r261908) +++ head/sys/conf/files Sat Feb 15 04:53:04 2014 (r261909) @@ -1875,8 +1875,10 @@ dev/ncv/ncr53c500_pccard.c optional ncv dev/netmap/netmap.c optional netmap dev/netmap/netmap_freebsd.c optional netmap dev/netmap/netmap_generic.c optional netmap -dev/netmap/netmap_mbq.c optional netmap +dev/netmap/netmap_mbq.c optional netmap dev/netmap/netmap_mem2.c optional netmap +dev/netmap/netmap_offloadings.c optional netmap +dev/netmap/netmap_pipe.c optional netmap dev/netmap/netmap_vale.c optional netmap # compile-with "${NORMAL_C} -Wconversion -Wextra" dev/nge/if_nge.c optional nge Modified: head/sys/dev/netmap/netmap.c ============================================================================== --- head/sys/dev/netmap/netmap.c Sat Feb 15 02:30:34 2014 (r261908) +++ head/sys/dev/netmap/netmap.c Sat Feb 15 04:53:04 2014 (r261909) @@ -156,9 +156,11 @@ ports attached to the switch) /* reduce conditional code */ -#define init_waitqueue_head(x) // only needed in linux - +// linux API, use for the knlist in FreeBSD +#define init_waitqueue_head(x) knlist_init_mtx(&(x)->si_note, NULL) +void freebsd_selwakeup(struct selinfo *si, int pri); +#define OS_selwakeup(a, b) freebsd_selwakeup(a, b) #elif defined(linux) @@ -231,6 +233,7 @@ static int netmap_admode = NETMAP_ADMODE int netmap_generic_mit = 100*1000; /* Generic mitigation interval in nanoseconds. */ int netmap_generic_ringsize = 1024; /* Generic ringsize. */ +int netmap_generic_rings = 1; /* number of queues in generic. */ SYSCTL_INT(_dev_netmap, OID_AUTO, flags, CTLFLAG_RW, &netmap_flags, 0 , ""); SYSCTL_INT(_dev_netmap, OID_AUTO, fwd, CTLFLAG_RW, &netmap_fwd, 0 , ""); @@ -238,6 +241,7 @@ SYSCTL_INT(_dev_netmap, OID_AUTO, mmap_u SYSCTL_INT(_dev_netmap, OID_AUTO, admode, CTLFLAG_RW, &netmap_admode, 0 , ""); SYSCTL_INT(_dev_netmap, OID_AUTO, generic_mit, CTLFLAG_RW, &netmap_generic_mit, 0 , ""); SYSCTL_INT(_dev_netmap, OID_AUTO, generic_ringsize, CTLFLAG_RW, &netmap_generic_ringsize, 0 , ""); +SYSCTL_INT(_dev_netmap, OID_AUTO, generic_rings, CTLFLAG_RW, &netmap_generic_rings, 0 , ""); NMG_LOCK_T netmap_global_lock; @@ -270,28 +274,30 @@ netmap_set_all_rings(struct ifnet *ifp, { struct netmap_adapter *na; int i; + u_int ntx, nrx; if (!(ifp->if_capenable & IFCAP_NETMAP)) return; na = NA(ifp); - for (i = 0; i <= na->num_tx_rings; i++) { + ntx = netmap_real_tx_rings(na); + nrx = netmap_real_rx_rings(na); + + for (i = 0; i < ntx; i++) { if (stopped) netmap_disable_ring(na->tx_rings + i); else na->tx_rings[i].nkr_stopped = 0; - na->nm_notify(na, i, NR_TX, NAF_DISABLE_NOTIFY | - (i == na->num_tx_rings ? NAF_GLOBAL_NOTIFY: 0)); + na->nm_notify(na, i, NR_TX, NAF_DISABLE_NOTIFY); } - for (i = 0; i <= na->num_rx_rings; i++) { + for (i = 0; i < nrx; i++) { if (stopped) netmap_disable_ring(na->rx_rings + i); else na->rx_rings[i].nkr_stopped = 0; - na->nm_notify(na, i, NR_RX, NAF_DISABLE_NOTIFY | - (i == na->num_rx_rings ? NAF_GLOBAL_NOTIFY: 0)); + na->nm_notify(na, i, NR_RX, NAF_DISABLE_NOTIFY); } } @@ -426,14 +432,73 @@ netmap_update_config(struct netmap_adapt return 1; } +static int +netmap_txsync_compat(struct netmap_kring *kring, int flags) +{ + struct netmap_adapter *na = kring->na; + return na->nm_txsync(na, kring->ring_id, flags); +} + +static int +netmap_rxsync_compat(struct netmap_kring *kring, int flags) +{ + struct netmap_adapter *na = kring->na; + return na->nm_rxsync(na, kring->ring_id, flags); +} + +static int +netmap_txsync_to_host_compat(struct netmap_kring *kring, int flags) +{ + (void)flags; + netmap_txsync_to_host(kring->na); + return 0; +} + +static int +netmap_rxsync_from_host_compat(struct netmap_kring *kring, int flags) +{ + (void)flags; + netmap_rxsync_from_host(kring->na, NULL, NULL); + return 0; +} + + +/* create the krings array and initialize the fields common to all adapters. + * The array layout is this: + * + * +----------+ + * na->tx_rings ----->| | \ + * | | } na->num_tx_ring + * | | / + * +----------+ + * | | host tx kring + * na->rx_rings ----> +----------+ + * | | \ + * | | } na->num_rx_rings + * | | / + * +----------+ + * | | host rx kring + * +----------+ + * na->tailroom ----->| | \ + * | | } tailroom bytes + * | | / + * +----------+ + * + * Note: for compatibility, host krings are created even when not needed. + * The tailroom space is currently used by vale ports for allocating leases. + */ int -netmap_krings_create(struct netmap_adapter *na, u_int ntx, u_int nrx, u_int tailroom) +netmap_krings_create(struct netmap_adapter *na, u_int tailroom) { u_int i, len, ndesc; struct netmap_kring *kring; + u_int ntx, nrx; + + /* account for the (possibly fake) host rings */ + ntx = na->num_tx_rings + 1; + nrx = na->num_rx_rings + 1; - // XXX additional space for extra rings ? len = (ntx + nrx) * sizeof(struct netmap_kring) + tailroom; na->tx_rings = malloc((size_t)len, M_DEVBUF, M_NOWAIT | M_ZERO); @@ -454,12 +519,19 @@ netmap_krings_create(struct netmap_adapt kring->na = na; kring->ring_id = i; kring->nkr_num_slots = ndesc; + if (i < na->num_tx_rings) { + kring->nm_sync = netmap_txsync_compat; // XXX + } else if (i == na->num_tx_rings) { + kring->nm_sync = netmap_txsync_to_host_compat; + } /* * IMPORTANT: Always keep one slot empty. */ kring->rhead = kring->rcur = kring->nr_hwcur = 0; kring->rtail = kring->nr_hwtail = ndesc - 1; snprintf(kring->name, sizeof(kring->name) - 1, "%s TX%d", NM_IFPNAME(na->ifp), i); + ND("ktx %s h %d c %d t %d", + kring->name, kring->rhead, kring->rcur, kring->rtail); mtx_init(&kring->q_lock, "nm_txq_lock", NULL, MTX_DEF); init_waitqueue_head(&kring->si); } @@ -471,9 +543,16 @@ netmap_krings_create(struct netmap_adapt kring->na = na; kring->ring_id = i; kring->nkr_num_slots = ndesc; + if (i < na->num_rx_rings) { + kring->nm_sync = netmap_rxsync_compat; // XXX + } else if (i == na->num_rx_rings) { + kring->nm_sync = netmap_rxsync_from_host_compat; + } kring->rhead = kring->rcur = kring->nr_hwcur = 0; kring->rtail = kring->nr_hwtail = 0; snprintf(kring->name, sizeof(kring->name) - 1, "%s RX%d", NM_IFPNAME(na->ifp), i); + ND("krx %s h %d c %d t %d", + kring->name, kring->rhead, kring->rcur, kring->rtail); mtx_init(&kring->q_lock, "nm_rxq_lock", NULL, MTX_DEF); init_waitqueue_head(&kring->si); } @@ -486,17 +565,15 @@ netmap_krings_create(struct netmap_adapt } -/* XXX check boundaries */ +/* undo the actions performed by netmap_krings_create */ void netmap_krings_delete(struct netmap_adapter *na) { - int i; + struct netmap_kring *kring = na->tx_rings; - for (i = 0; i < na->num_tx_rings + 1; i++) { - mtx_destroy(&na->tx_rings[i].q_lock); - } - for (i = 0; i < na->num_rx_rings + 1; i++) { - mtx_destroy(&na->rx_rings[i].q_lock); + /* we rely on the krings layout described above */ + for ( ; kring != na->tailroom; kring++) { + mtx_destroy(&kring->q_lock); } free(na->tx_rings, M_DEVBUF); na->tx_rings = na->rx_rings = na->tailroom = NULL; @@ -677,6 +754,20 @@ netmap_do_unregif(struct netmap_priv_d * netmap_mem_if_delete(na, nifp); } +static __inline int +nm_tx_si_user(struct netmap_priv_d *priv) +{ + return (priv->np_na != NULL && + (priv->np_txqlast - priv->np_txqfirst > 1)); +} + +static __inline int +nm_rx_si_user(struct netmap_priv_d *priv) +{ + return (priv->np_na != NULL && + (priv->np_rxqlast - priv->np_rxqfirst > 1)); +} + /* * returns 1 if this is the last instance and we can free priv @@ -702,6 +793,10 @@ netmap_dtor_locked(struct netmap_priv_d priv->np_nifp = NULL; netmap_drop_memory_locked(priv); if (priv->np_na) { + if (nm_tx_si_user(priv)) + na->tx_si_users--; + if (nm_rx_si_user(priv)) + na->rx_si_users--; netmap_adapter_put(na); priv->np_na = NULL; } @@ -864,22 +959,8 @@ netmap_txsync_to_host(struct netmap_adap struct netmap_kring *kring = &na->tx_rings[na->num_tx_rings]; struct netmap_ring *ring = kring->ring; u_int const lim = kring->nkr_num_slots - 1; - u_int const head = nm_txsync_prologue(kring); + u_int const head = kring->rhead; struct mbq q; - int error; - - error = nm_kr_tryget(kring); - if (error) { - if (error == NM_KR_BUSY) - D("ring %p busy (user error)", kring); - return; - } - if (head > lim) { - D("invalid ring index in stack TX kring %p", kring); - netmap_ring_reinit(kring); - nm_kr_put(kring); - return; - } /* Take packets from hwcur to head and pass them up. * force head = cur since netmap_grab_packets() stops at head @@ -896,7 +977,6 @@ netmap_txsync_to_host(struct netmap_adap kring->nr_hwtail -= lim + 1; nm_txsync_finalize(kring); - nm_kr_put(kring); netmap_send_up(na->ifp, &q); } @@ -921,27 +1001,15 @@ netmap_rxsync_from_host(struct netmap_ad struct netmap_ring *ring = kring->ring; u_int nm_i, n; u_int const lim = kring->nkr_num_slots - 1; - u_int const head = nm_rxsync_prologue(kring); + u_int const head = kring->rhead; int ret = 0; struct mbq *q = &kring->rx_queue; (void)pwait; /* disable unused warnings */ - - if (head > lim) { - netmap_ring_reinit(kring); - return EINVAL; - } - - if (kring->nkr_stopped) /* check a first time without lock */ - return EBUSY; + (void)td; mtx_lock(&q->lock); - if (kring->nkr_stopped) { /* check again with lock held */ - ret = EBUSY; - goto unlock_out; - } - /* First part: import newly received packets */ n = mbq_len(q); if (n) { /* grab packets from the queue */ @@ -982,8 +1050,6 @@ netmap_rxsync_from_host(struct netmap_ad if (kring->rcur == kring->rtail && td) /* no bufs available */ selrecord(td, &kring->si); -unlock_out: - mtx_unlock(&q->lock); return ret; } @@ -1107,19 +1173,26 @@ netmap_get_hw_na(struct ifnet *ifp, stru int netmap_get_na(struct nmreq *nmr, struct netmap_adapter **na, int create) { - struct ifnet *ifp; + struct ifnet *ifp = NULL; int error = 0; - struct netmap_adapter *ret; + struct netmap_adapter *ret = NULL; *na = NULL; /* default return value */ /* first try to see if this is a bridge port. */ NMG_LOCK_ASSERT(); + error = netmap_get_pipe_na(nmr, na, create); + if (error || *na != NULL) + return error; + error = netmap_get_bdg_na(nmr, na, create); - if (error || *na != NULL) /* valid match in netmap_get_bdg_na() */ + if (error) return error; + if (*na != NULL) /* valid match in netmap_get_bdg_na() */ + goto pipes; + ifp = ifunit_ref(nmr->nr_name); if (ifp == NULL) { return ENXIO; @@ -1129,18 +1202,23 @@ netmap_get_na(struct nmreq *nmr, struct if (error) goto out; - if (ret != NULL) { - /* Users cannot use the NIC attached to a bridge directly */ - if (NETMAP_OWNED_BY_KERN(ret)) { - error = EBUSY; - goto out; - } - error = 0; - *na = ret; - netmap_adapter_get(ret); + /* Users cannot use the NIC attached to a bridge directly */ + if (NETMAP_OWNED_BY_KERN(ret)) { + error = EBUSY; + goto out; } + *na = ret; + netmap_adapter_get(ret); + +pipes: + error = netmap_pipe_alloc(*na, nmr); + out: - if_rele(ifp); + if (error && ret != NULL) + netmap_adapter_put(ret); + + if (ifp) + if_rele(ifp); return error; } @@ -1365,45 +1443,88 @@ netmap_ring_reinit(struct netmap_kring * * for all rings is the same as a single ring. */ static int -netmap_set_ringid(struct netmap_priv_d *priv, u_int ringid) +netmap_set_ringid(struct netmap_priv_d *priv, uint16_t ringid, uint32_t flags) { struct netmap_adapter *na = priv->np_na; - struct ifnet *ifp = na->ifp; - u_int i = ringid & NETMAP_RING_MASK; - /* initially (np_qfirst == np_qlast) we don't want to lock */ - u_int lim = na->num_rx_rings; - - if (na->num_tx_rings > lim) - lim = na->num_tx_rings; - if ( (ringid & NETMAP_HW_RING) && i >= lim) { - D("invalid ring id %d", i); - return (EINVAL); - } - priv->np_ringid = ringid; - if (ringid & NETMAP_SW_RING) { - priv->np_qfirst = NETMAP_SW_RING; - priv->np_qlast = 0; - } else if (ringid & NETMAP_HW_RING) { - priv->np_qfirst = i; - priv->np_qlast = i + 1; - } else { - priv->np_qfirst = 0; - priv->np_qlast = NETMAP_HW_RING ; + u_int j, i = ringid & NETMAP_RING_MASK; + u_int reg = flags & NR_REG_MASK; + + if (reg == NR_REG_DEFAULT) { + /* convert from old ringid to flags */ + if (ringid & NETMAP_SW_RING) { + reg = NR_REG_SW; + } else if (ringid & NETMAP_HW_RING) { + reg = NR_REG_ONE_NIC; + } else { + reg = NR_REG_ALL_NIC; + } + D("deprecated API, old ringid 0x%x -> ringid %x reg %d", ringid, i, reg); + } + switch (reg) { + case NR_REG_ALL_NIC: + case NR_REG_PIPE_MASTER: + case NR_REG_PIPE_SLAVE: + priv->np_txqfirst = 0; + priv->np_txqlast = na->num_tx_rings; + priv->np_rxqfirst = 0; + priv->np_rxqlast = na->num_rx_rings; + ND("%s %d %d", "ALL/PIPE", + priv->np_rxqfirst, priv->np_rxqlast); + break; + case NR_REG_SW: + case NR_REG_NIC_SW: + if (!(na->na_flags & NAF_HOST_RINGS)) { + D("host rings not supported"); + return EINVAL; + } + priv->np_txqfirst = (reg == NR_REG_SW ? + na->num_tx_rings : 0); + priv->np_txqlast = na->num_tx_rings + 1; + priv->np_rxqfirst = (reg == NR_REG_SW ? + na->num_rx_rings : 0); + priv->np_rxqlast = na->num_rx_rings + 1; + ND("%s %d %d", reg == NR_REG_SW ? "SW" : "NIC+SW", + priv->np_rxqfirst, priv->np_rxqlast); + break; + case NR_REG_ONE_NIC: + if (i >= na->num_tx_rings && i >= na->num_rx_rings) { + D("invalid ring id %d", i); + return EINVAL; + } + /* if not enough rings, use the first one */ + j = i; + if (j >= na->num_tx_rings) + j = 0; + priv->np_txqfirst = j; + priv->np_txqlast = j + 1; + j = i; + if (j >= na->num_rx_rings) + j = 0; + priv->np_rxqfirst = j; + priv->np_rxqlast = j + 1; + break; + default: + D("invalid regif type %d", reg); + return EINVAL; } priv->np_txpoll = (ringid & NETMAP_NO_TX_POLL) ? 0 : 1; - if (netmap_verbose) { - if (ringid & NETMAP_SW_RING) - D("ringid %s set to SW RING", NM_IFPNAME(ifp)); - else if (ringid & NETMAP_HW_RING) - D("ringid %s set to HW RING %d", NM_IFPNAME(ifp), - priv->np_qfirst); - else - D("ringid %s set to all %d HW RINGS", NM_IFPNAME(ifp), lim); - } + priv->np_flags = (flags & ~NR_REG_MASK) | reg; + if (nm_tx_si_user(priv)) + na->tx_si_users++; + if (nm_rx_si_user(priv)) + na->rx_si_users++; + if (netmap_verbose) { + D("%s: tx [%d,%d) rx [%d,%d) id %d", + NM_IFPNAME(na->ifp), + priv->np_txqfirst, + priv->np_txqlast, + priv->np_rxqfirst, + priv->np_rxqlast, + i); + } return 0; } - /* * possibly move the interface to netmap-mode. * If success it returns a pointer to netmap_if, otherwise NULL. @@ -1411,7 +1532,7 @@ netmap_set_ringid(struct netmap_priv_d * */ struct netmap_if * netmap_do_regif(struct netmap_priv_d *priv, struct netmap_adapter *na, - uint16_t ringid, int *err) + uint16_t ringid, uint32_t flags, int *err) { struct ifnet *ifp = na->ifp; struct netmap_if *nifp = NULL; @@ -1421,7 +1542,7 @@ netmap_do_regif(struct netmap_priv_d *pr /* ring configuration may have changed, fetch from the card */ netmap_update_config(na); priv->np_na = na; /* store the reference */ - error = netmap_set_ringid(priv, ringid); + error = netmap_set_ringid(priv, ringid, flags); if (error) goto out; /* ensure allocators are ready */ @@ -1501,26 +1622,12 @@ netmap_ioctl(struct cdev *dev, u_long cm struct nmreq *nmr = (struct nmreq *) data; struct netmap_adapter *na = NULL; int error; - u_int i, lim; + u_int i, qfirst, qlast; struct netmap_if *nifp; struct netmap_kring *krings; (void)dev; /* UNUSED */ (void)fflag; /* UNUSED */ -#ifdef linux -#define devfs_get_cdevpriv(pp) \ - ({ *(struct netmap_priv_d **)pp = ((struct file *)td)->private_data; \ - (*pp ? 0 : ENOENT); }) - -/* devfs_set_cdevpriv cannot fail on linux */ -#define devfs_set_cdevpriv(p, fn) \ - ({ ((struct file *)td)->private_data = p; (p ? 0 : EINVAL); }) - - -#define devfs_clear_cdevpriv() do { \ - netmap_dtor(priv); ((struct file *)td)->private_data = 0; \ - } while (0) -#endif /* linux */ if (cmd == NIOCGINFO || cmd == NIOCREGIF) { /* truncate name */ @@ -1530,6 +1637,9 @@ netmap_ioctl(struct cdev *dev, u_long cm nmr->nr_name, nmr->nr_version, NETMAP_API); nmr->nr_version = NETMAP_API; + } + if (nmr->nr_version < NETMAP_MIN_API || + nmr->nr_version > NETMAP_MAX_API) { return EINVAL; } } @@ -1564,7 +1674,8 @@ netmap_ioctl(struct cdev *dev, u_long cm nmd = na->nm_mem; /* get memory allocator */ } - error = netmap_mem_get_info(nmd, &nmr->nr_memsize, &memflags); + error = netmap_mem_get_info(nmd, &nmr->nr_memsize, &memflags, + &nmr->nr_arg2); if (error) break; if (na == NULL) /* only memory info */ @@ -1576,8 +1687,6 @@ netmap_ioctl(struct cdev *dev, u_long cm nmr->nr_tx_rings = na->num_tx_rings; nmr->nr_rx_slots = na->num_rx_desc; nmr->nr_tx_slots = na->num_tx_desc; - if (memflags & NETMAP_MEM_PRIVATE) - nmr->nr_ringid |= NETMAP_PRIV_MEM; netmap_adapter_put(na); } while (0); NMG_UNLOCK(); @@ -1587,7 +1696,7 @@ netmap_ioctl(struct cdev *dev, u_long cm /* possibly attach/detach NIC and VALE switch */ i = nmr->nr_cmd; if (i == NETMAP_BDG_ATTACH || i == NETMAP_BDG_DETACH - || i == NETMAP_BDG_OFFSET) { + || i == NETMAP_BDG_VNET_HDR) { error = netmap_bdg_ctl(nmr, NULL); break; } else if (i != 0) { @@ -1602,7 +1711,7 @@ netmap_ioctl(struct cdev *dev, u_long cm u_int memflags; if (priv->np_na != NULL) { /* thread already registered */ - error = netmap_set_ringid(priv, nmr->nr_ringid); + error = EBUSY; break; } /* find the interface and a reference */ @@ -1615,27 +1724,39 @@ netmap_ioctl(struct cdev *dev, u_long cm error = EBUSY; break; } - nifp = netmap_do_regif(priv, na, nmr->nr_ringid, &error); + nifp = netmap_do_regif(priv, na, nmr->nr_ringid, nmr->nr_flags, &error); if (!nifp) { /* reg. failed, release priv and ref */ netmap_adapter_put(na); priv->np_nifp = NULL; break; } + priv->np_td = td; // XXX kqueue, debugging only /* return the offset of the netmap_if object */ nmr->nr_rx_rings = na->num_rx_rings; nmr->nr_tx_rings = na->num_tx_rings; nmr->nr_rx_slots = na->num_rx_desc; nmr->nr_tx_slots = na->num_tx_desc; - error = netmap_mem_get_info(na->nm_mem, &nmr->nr_memsize, &memflags); + error = netmap_mem_get_info(na->nm_mem, &nmr->nr_memsize, &memflags, + &nmr->nr_arg2); if (error) { netmap_adapter_put(na); break; } if (memflags & NETMAP_MEM_PRIVATE) { - nmr->nr_ringid |= NETMAP_PRIV_MEM; *(uint32_t *)(uintptr_t)&nifp->ni_flags |= NI_PRIV_MEM; } + priv->np_txsi = (priv->np_txqlast - priv->np_txqfirst > 1) ? + &na->tx_si : &na->tx_rings[priv->np_txqfirst].si; + priv->np_rxsi = (priv->np_rxqlast - priv->np_rxqfirst > 1) ? + &na->rx_si : &na->rx_rings[priv->np_rxqfirst].si; + + if (nmr->nr_arg3) { + D("requested %d extra buffers", nmr->nr_arg3); + nmr->nr_arg3 = netmap_extra_alloc(na, + &nifp->ni_bufs_head, nmr->nr_arg3); + D("got %d extra buffers", nmr->nr_arg3); + } nmr->nr_offset = netmap_mem_if_offset(na->nm_mem, nifp); } while (0); NMG_UNLOCK(); @@ -1666,21 +1787,17 @@ netmap_ioctl(struct cdev *dev, u_long cm break; } - if (priv->np_qfirst == NETMAP_SW_RING) { /* host rings */ - if (cmd == NIOCTXSYNC) - netmap_txsync_to_host(na); - else - netmap_rxsync_from_host(na, NULL, NULL); - break; + if (cmd == NIOCTXSYNC) { + krings = na->tx_rings; + qfirst = priv->np_txqfirst; + qlast = priv->np_txqlast; + } else { + krings = na->rx_rings; + qfirst = priv->np_rxqfirst; + qlast = priv->np_rxqlast; } - /* find the last ring to scan */ - lim = priv->np_qlast; - if (lim == NETMAP_HW_RING) - lim = (cmd == NIOCTXSYNC) ? - na->num_tx_rings : na->num_rx_rings; - krings = (cmd == NIOCTXSYNC) ? na->tx_rings : na->rx_rings; - for (i = priv->np_qfirst; i < lim; i++) { + for (i = qfirst; i < qlast; i++) { struct netmap_kring *kring = krings + i; if (nm_kr_tryget(kring)) { error = EBUSY; @@ -1694,14 +1811,14 @@ netmap_ioctl(struct cdev *dev, u_long cm if (nm_txsync_prologue(kring) >= kring->nkr_num_slots) { netmap_ring_reinit(kring); } else { - na->nm_txsync(na, i, NAF_FORCE_RECLAIM); + kring->nm_sync(kring, NAF_FORCE_RECLAIM); } if (netmap_verbose & NM_VERB_TXSYNC) D("post txsync ring %d cur %d hwcur %d", i, kring->ring->cur, kring->nr_hwcur); } else { - na->nm_rxsync(na, i, NAF_FORCE_READ); + kring->nm_sync(kring, NAF_FORCE_READ); microtime(&na->rx_rings[i].ring->ts); } nm_kr_put(kring); @@ -1772,9 +1889,9 @@ netmap_poll(struct cdev *dev, int events struct ifnet *ifp; struct netmap_kring *kring; u_int i, check_all_tx, check_all_rx, want_tx, want_rx, revents = 0; - u_int lim_tx, lim_rx; struct mbq q; /* packets from hw queues to host stack */ void *pwait = dev; /* linux compatibility */ + int is_kevent = 0; /* * In order to avoid nested locks, we need to "double check" @@ -1786,7 +1903,19 @@ netmap_poll(struct cdev *dev, int events (void)pwait; mbq_init(&q); - if (devfs_get_cdevpriv((void **)&priv) != 0 || priv == NULL) + /* + * XXX kevent has curthread->tp_fop == NULL, + * so devfs_get_cdevpriv() fails. We circumvent this by passing + * priv as the first argument, which is also useful to avoid + * the selrecord() which are not necessary in that case. + */ + if (devfs_get_cdevpriv((void **)&priv) != 0) { + is_kevent = 1; + if (netmap_verbose) + D("called from kevent"); + priv = (struct netmap_priv_d *)dev; + } + if (priv == NULL) return POLLERR; if (priv->np_nifp == NULL) { @@ -1811,28 +1940,6 @@ netmap_poll(struct cdev *dev, int events want_tx = events & (POLLOUT | POLLWRNORM); want_rx = events & (POLLIN | POLLRDNORM); - lim_tx = na->num_tx_rings; - lim_rx = na->num_rx_rings; - - if (priv->np_qfirst == NETMAP_SW_RING) { - // XXX locking ? - /* handle the host stack ring */ - if (priv->np_txpoll || want_tx) { - /* push any packets up, then we are always ready */ - netmap_txsync_to_host(na); - revents |= want_tx; - } - if (want_rx) { - kring = &na->rx_rings[lim_rx]; - /* XXX replace with rxprologue etc. */ - if (nm_ring_empty(kring->ring)) - netmap_rxsync_from_host(na, td, dev); - if (!nm_ring_empty(kring->ring)) - revents |= want_rx; - } - return (revents); - } - /* * check_all_{tx|rx} are set if the card has more than one queue AND @@ -1847,19 +1954,15 @@ netmap_poll(struct cdev *dev, int events * there are pending packets to send. The latter can be disabled * passing NETMAP_NO_TX_POLL in the NIOCREG call. */ - check_all_tx = (priv->np_qlast == NETMAP_HW_RING) && (lim_tx > 1); - check_all_rx = (priv->np_qlast == NETMAP_HW_RING) && (lim_rx > 1); - - if (priv->np_qlast != NETMAP_HW_RING) { - lim_tx = lim_rx = priv->np_qlast; - } + check_all_tx = nm_tx_si_user(priv); + check_all_rx = nm_rx_si_user(priv); /* * We start with a lock free round which is cheap if we have * slots available. If this fails, then lock and call the sync * routines. */ - for (i = priv->np_qfirst; want_rx && i < lim_rx; i++) { + for (i = priv->np_rxqfirst; want_rx && i < priv->np_rxqlast; i++) { kring = &na->rx_rings[i]; /* XXX compare ring->cur and kring->tail */ if (!nm_ring_empty(kring->ring)) { @@ -1867,7 +1970,7 @@ netmap_poll(struct cdev *dev, int events want_rx = 0; /* also breaks the loop */ } } - for (i = priv->np_qfirst; want_tx && i < lim_tx; i++) { + for (i = priv->np_txqfirst; want_tx && i < priv->np_txqlast; i++) { kring = &na->tx_rings[i]; /* XXX compare ring->cur and kring->tail */ if (!nm_ring_empty(kring->ring)) { @@ -1891,7 +1994,7 @@ netmap_poll(struct cdev *dev, int events * used to skip rings with no pending transmissions. */ flush_tx: - for (i = priv->np_qfirst; i < lim_tx; i++) { + for (i = priv->np_txqfirst; i < priv->np_txqlast; i++) { int found = 0; kring = &na->tx_rings[i]; @@ -1906,7 +2009,7 @@ flush_tx: netmap_ring_reinit(kring); revents |= POLLERR; } else { - if (na->nm_txsync(na, i, 0)) + if (kring->nm_sync(kring, 0)) revents |= POLLERR; } @@ -1921,12 +2024,12 @@ flush_tx: if (found) { /* notify other listeners */ revents |= want_tx; want_tx = 0; - na->nm_notify(na, i, NR_TX, NAF_GLOBAL_NOTIFY); + na->nm_notify(na, i, NR_TX, 0); } } - if (want_tx && retry_tx) { + if (want_tx && retry_tx && !is_kevent) { selrecord(td, check_all_tx ? - &na->tx_si : &na->tx_rings[priv->np_qfirst].si); + &na->tx_si : &na->tx_rings[priv->np_txqfirst].si); retry_tx = 0; goto flush_tx; } @@ -1940,7 +2043,7 @@ flush_tx: int send_down = 0; /* transparent mode */ /* two rounds here to for race avoidance */ do_retry_rx: - for (i = priv->np_qfirst; i < lim_rx; i++) { + for (i = priv->np_rxqfirst; i < priv->np_rxqlast; i++) { int found = 0; kring = &na->rx_rings[i]; @@ -1962,7 +2065,7 @@ do_retry_rx: netmap_grab_packets(kring, &q, netmap_fwd); } - if (na->nm_rxsync(na, i, 0)) + if (kring->nm_sync(kring, 0)) revents |= POLLERR; if (netmap_no_timestamp == 0 || kring->ring->flags & NR_TIMESTAMP) { @@ -1974,24 +2077,26 @@ do_retry_rx: if (found) { revents |= want_rx; retry_rx = 0; - na->nm_notify(na, i, NR_RX, NAF_GLOBAL_NOTIFY); + na->nm_notify(na, i, NR_RX, 0); } } /* transparent mode XXX only during first pass ? */ - kring = &na->rx_rings[lim_rx]; - if (check_all_rx - && (netmap_fwd || kring->ring->flags & NR_FORWARD)) { - /* XXX fix to use kring fields */ - if (nm_ring_empty(kring->ring)) - send_down = netmap_rxsync_from_host(na, td, dev); - if (!nm_ring_empty(kring->ring)) - revents |= want_rx; + if (na->na_flags & NAF_HOST_RINGS) { + kring = &na->rx_rings[na->num_rx_rings]; + if (check_all_rx + && (netmap_fwd || kring->ring->flags & NR_FORWARD)) { + /* XXX fix to use kring fields */ + if (nm_ring_empty(kring->ring)) + send_down = netmap_rxsync_from_host(na, td, dev); + if (!nm_ring_empty(kring->ring)) + revents |= want_rx; + } } - if (retry_rx) + if (retry_rx && !is_kevent) selrecord(td, check_all_rx ? - &na->rx_si : &na->rx_rings[priv->np_qfirst].si); + &na->rx_si : &na->rx_rings[priv->np_rxqfirst].si); if (send_down > 0 || retry_rx) { retry_rx = 0; if (send_down) @@ -2032,14 +2137,14 @@ netmap_notify(struct netmap_adapter *na, if (tx == NR_TX) { kring = na->tx_rings + n_ring; - selwakeuppri(&kring->si, PI_NET); - if (flags & NAF_GLOBAL_NOTIFY) - selwakeuppri(&na->tx_si, PI_NET); + OS_selwakeup(&kring->si, PI_NET); + if (na->tx_si_users > 0) + OS_selwakeup(&na->tx_si, PI_NET); } else { kring = na->rx_rings + n_ring; - selwakeuppri(&kring->si, PI_NET); - if (flags & NAF_GLOBAL_NOTIFY) - selwakeuppri(&na->rx_si, PI_NET); + OS_selwakeup(&kring->si, PI_NET); + if (na->rx_si_users > 0) + OS_selwakeup(&na->rx_si, PI_NET); } return 0; } @@ -2090,6 +2195,7 @@ netmap_detach_common(struct netmap_adapt D("freeing leftover tx_rings"); na->nm_krings_delete(na); } + netmap_pipe_dealloc(na); if (na->na_flags & NAF_MEM_OWNER) netmap_mem_private_delete(na->nm_mem); bzero(na, sizeof(*na)); @@ -2120,6 +2226,7 @@ netmap_attach(struct netmap_adapter *arg if (hwna == NULL) goto fail; hwna->up = *arg; + hwna->up.na_flags |= NAF_HOST_RINGS; if (netmap_attach_common(&hwna->up)) { free(hwna, M_DEVBUF); goto fail; @@ -2177,12 +2284,10 @@ NM_DBG(netmap_adapter_put)(struct netmap return 1; } - int netmap_hw_krings_create(struct netmap_adapter *na) { - int ret = netmap_krings_create(na, - na->num_tx_rings + 1, na->num_rx_rings + 1, 0); + int ret = netmap_krings_create(na, 0); if (ret == 0) { /* initialize the mbq for the sw rx ring */ mbq_safe_init(&na->rx_rings[na->num_rx_rings].rx_queue); @@ -2370,7 +2475,7 @@ netmap_reset(struct netmap_adapter *na, * We do the wakeup here, but the ring is not yet reconfigured. * However, we are under lock so there are no races. */ - na->nm_notify(na, n, tx, NAF_GLOBAL_NOTIFY); + na->nm_notify(na, n, tx, 0); return kring->ring->slot; } @@ -2405,15 +2510,13 @@ netmap_common_irq(struct ifnet *ifp, u_i return; // not a physical queue kring = na->rx_rings + q; kring->nr_kflags |= NKR_PENDINTR; // XXX atomic ? - na->nm_notify(na, q, NR_RX, - (na->num_rx_rings > 1 ? NAF_GLOBAL_NOTIFY : 0)); + na->nm_notify(na, q, NR_RX, 0); *work_done = 1; /* do not fire napi again */ } else { /* TX path */ if (q >= na->num_tx_rings) return; // not a physical queue kring = na->tx_rings + q; - na->nm_notify(na, q, NR_TX, - (na->num_tx_rings > 1 ? NAF_GLOBAL_NOTIFY : 0)); + na->nm_notify(na, q, NR_TX, 0); } } Modified: head/sys/dev/netmap/netmap_freebsd.c ============================================================================== --- head/sys/dev/netmap/netmap_freebsd.c Sat Feb 15 02:30:34 2014 (r261908) +++ head/sys/dev/netmap/netmap_freebsd.c Sat Feb 15 04:53:04 2014 (r261909) @@ -29,8 +29,10 @@ #include #include #include /* defines used in kernel.h */ +#include /* POLLIN, POLLOUT */ #include /* types used in module initialization */ #include /* DEV_MODULE */ +#include #include @@ -49,6 +51,8 @@ #include #include #include /* bus_dmamap_* */ +#include /* in6_cksum_pseudo() */ +#include /* in_pseudo(), in_cksum_hdr() */ #include #include @@ -57,6 +61,73 @@ /* ======================== FREEBSD-SPECIFIC ROUTINES ================== */ +rawsum_t nm_csum_raw(uint8_t *data, size_t len, rawsum_t cur_sum) +{ + /* TODO XXX please use the FreeBSD implementation for this. */ + uint16_t *words = (uint16_t *)data; + int nw = len / 2; + int i; + + for (i = 0; i < nw; i++) + cur_sum += be16toh(words[i]); + + if (len & 1) + cur_sum += (data[len-1] << 8); + + return cur_sum; +} + +/* Fold a raw checksum: 'cur_sum' is in host byte order, while the + * return value is in network byte order. + */ +uint16_t nm_csum_fold(rawsum_t cur_sum) +{ + /* TODO XXX please use the FreeBSD implementation for this. */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 07:01:46 2014 Return-Path: Delivered-To: svn-src-all@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 E1D00DEA; Sat, 15 Feb 2014 07:01: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 CB3591C6E; Sat, 15 Feb 2014 07:01:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1F71kqT068634; Sat, 15 Feb 2014 07:01:46 GMT (envelope-from jmg@svn.freebsd.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1F71kN6068633; Sat, 15 Feb 2014 07:01:46 GMT (envelope-from jmg@svn.freebsd.org) Message-Id: <201402150701.s1F71kN6068633@svn.freebsd.org> From: John-Mark Gurney Date: Sat, 15 Feb 2014 07:01:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261910 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 07:01:47 -0000 Author: jmg Date: Sat Feb 15 07:01:45 2014 New Revision: 261910 URL: http://svnweb.freebsd.org/changeset/base/261910 Log: document _JAIL as a possible option to set a cpuset for a jail.. MFC after: 3 days Modified: head/lib/libc/sys/cpuset.2 Modified: head/lib/libc/sys/cpuset.2 ============================================================================== --- head/lib/libc/sys/cpuset.2 Sat Feb 15 04:53:04 2014 (r261909) +++ head/lib/libc/sys/cpuset.2 Sat Feb 15 07:01:45 2014 (r261910) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 8, 2010 +.Dd February 14, 2014 .Dt CPUSET 2 .Os .Sh NAME @@ -98,6 +98,7 @@ argument may have the following values: .Bl -column CPU_WHICH_CPUSET -offset indent .It Dv CPU_WHICH_TID Ta "id is lwpid_t (thread id)" .It Dv CPU_WHICH_PID Ta "id is pid_t (process id)" +.It Dv CPU_WHICH_JAIL Ta "id is jid (jail id)" .It Dv CPU_WHICH_CPUSET Ta "id is a cpusetid_t (cpuset id)" .It Dv CPU_WHICH_IRQ Ta "id is an irq number" .El From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 07:40:41 2014 Return-Path: Delivered-To: svn-src-all@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 1CD462F8; Sat, 15 Feb 2014 07:40:41 +0000 (UTC) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) by mx1.freebsd.org (Postfix) with ESMTP id CF67D1F8D; Sat, 15 Feb 2014 07:40:40 +0000 (UTC) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by alto.onthenet.com.au (Postfix) with ESMTPS id 3F6F41239F; Sat, 15 Feb 2014 17:40:33 +1000 (EST) Received: from Peters-MacBook-Pro.local (67.111.71.6.ptr.us.xo.net [67.111.71.6]) by dommail.onthenet.com.au (MOS 4.2.4-GA) with ESMTP id BRV37716 (AUTH peterg@ptree32.com.au); Sat, 15 Feb 2014 17:40:32 +1000 Message-ID: <52FF19EE.1090100@freebsd.org> Date: Fri, 14 Feb 2014 23:40:30 -0800 From: Peter Grehan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: Luigi Rizzo , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r261909 - in head: sys/conf sys/dev/netmap sys/modules/netmap sys/net tools/tools/netmap References: <201402150453.s1F4r423019083@svn.freebsd.org> In-Reply-To: <201402150453.s1F4r423019083@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 07:40:41 -0000 > - kqueue support (BHyVe needs it); Thanks for that !! later, Peter. From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 07:57:02 2014 Return-Path: Delivered-To: svn-src-all@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 614B869B; Sat, 15 Feb 2014 07:57: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 4CFEA103C; Sat, 15 Feb 2014 07:57:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1F7v2PQ088398; Sat, 15 Feb 2014 07:57:02 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1F7v2Op088397; Sat, 15 Feb 2014 07:57:02 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201402150757.s1F7v2Op088397@svn.freebsd.org> From: Adrian Chadd Date: Sat, 15 Feb 2014 07:57:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261911 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 07:57:02 -0000 Author: adrian Date: Sat Feb 15 07:57:01 2014 New Revision: 261911 URL: http://svnweb.freebsd.org/changeset/base/261911 Log: Make sure that the flowtable flowid is only set to m_flowid if there isn't one already supplied. The previous flowtable code also did this. Reviewed by: glebius Sponsored by: Netflix, Inc. Modified: head/sys/net/flowtable.c Modified: head/sys/net/flowtable.c ============================================================================== --- head/sys/net/flowtable.c Sat Feb 15 07:01:45 2014 (r261910) +++ head/sys/net/flowtable.c Sat Feb 15 07:57:01 2014 (r261911) @@ -1002,7 +1002,7 @@ flowtable_lookup_common(struct flowtable } success: - if (m->m_flags & M_FLOWID) { + if (! (m->m_flags & M_FLOWID)) { m->m_flags |= M_FLOWID; m->m_pkthdr.flowid = fle->f_fhash; } From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 08:23:32 2014 Return-Path: Delivered-To: svn-src-all@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 66D83B62; Sat, 15 Feb 2014 08:23:32 +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 5187B11E8; Sat, 15 Feb 2014 08:23:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1F8NWZp000193; Sat, 15 Feb 2014 08:23:32 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1F8NWN4000192; Sat, 15 Feb 2014 08:23:32 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201402150823.s1F8NWN4000192@svn.freebsd.org> From: Luigi Rizzo Date: Sat, 15 Feb 2014 08:23:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261912 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 08:23:32 -0000 Author: luigi Date: Sat Feb 15 08:23:31 2014 New Revision: 261912 URL: http://svnweb.freebsd.org/changeset/base/261912 Log: complete svn 261909 - new netmap version. since i updated the manpage i might as well commit it. MFC after: 3 days Modified: head/share/man/man4/netmap.4 Modified: head/share/man/man4/netmap.4 ============================================================================== --- head/share/man/man4/netmap.4 Sat Feb 15 07:57:01 2014 (r261911) +++ head/share/man/man4/netmap.4 Sat Feb 15 08:23:31 2014 (r261912) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 4, 2014 +.Dd February 13, 2014 .Dt NETMAP 4 .Os .Sh NAME @@ -36,6 +36,9 @@ .br .Nm VALE .Nd a fast VirtuAl Local Ethernet using the netmap API +.br +.Nm netmap pipes +.Nd a shared memory packet transport channel .Sh SYNOPSIS .Cd device netmap .Sh DESCRIPTION @@ -45,38 +48,55 @@ for both userspace and kernel clients. It runs on FreeBSD and Linux, and includes .Nm VALE , -a very fast and modular in-kernel software switch/dataplane. +a very fast and modular in-kernel software switch/dataplane, +and +.Nm netmap pipes , +a shared memory packet transport channel. +All these are accessed interchangeably with the same API. .Pp -.Nm +.Nm , VALE and -.Nm VALE -are one order of magnitude faster than sockets, bpf or -native switches based on -.Xr tun/tap 4 , -reaching 14.88 Mpps with much less than one core on a 10 Gbit NIC, -and 20 Mpps per core for VALE ports. +.Nm netmap pipes +are at least one order of magnitude faster than +standard OS mechanisms +(sockets, bpf, tun/tap interfaces, native switches, pipes), +reaching 14.88 million packets per second (Mpps) +with much less than one core on a 10 Gbit NIC, +about 20 Mpps per core for VALE ports, +and over 100 Mpps for netmap pipes. .Pp Userspace clients can dynamically switch NICs into .Nm mode and send and receive raw packets through memory mapped buffers. -A selectable file descriptor supports -synchronization and blocking I/O. -.Pp Similarly, .Nm VALE -can dynamically create switch instances and ports, +switch instances and ports, and +.Nm netmap pipes +can be created dynamically, providing high speed packet I/O between processes, virtual machines, NICs and the host stack. .Pp -For best performance, .Nm -requires explicit support in device drivers; -however, the +suports both non-blocking I/O through +.Xr ioctls() , +synchronization and blocking I/O through a file descriptor +and standard OS mechanisms such as +.Xr select 2 , +.Xr poll 2 , +.Xr epoll 2 , +.Xr kqueue 2 . +.Nm VALE +and +.Nm netmap pipes +are implemented by a single kernel module, which also emulates the .Nm -API can be emulated on top of unmodified device drivers, -at the price of reduced performance -(but still better than sockets or BPF/pcap). +API over standard drivers for devices without native +.Nm +support. +For best performance, +.Nm +requires explicit support in device drivers. .Pp In the rest of this (long) manual page we document various aspects of the @@ -114,10 +134,26 @@ mode use the same memory region, accessible to all processes who own .Nm /dev/netmap file descriptors bound to NICs. +Independent .Nm VALE -ports instead use separate memory regions. +and +.Nm netmap pipe +ports +by default use separate memory regions, +but can be independently configured to share memory. .Pp .Sh ENTERING AND EXITING NETMAP MODE +The following section describes the system calls to create +and control +.Nm netmap +ports (including +.Nm VALE +and +.Nm netmap pipe +ports). +Simpler, higher level functions are described in section +.Xr LIBRARIES . +.Pp Ports and rings are created and controlled through a file descriptor, created by opening a special device .Dl fd = open("/dev/netmap"); @@ -186,12 +222,11 @@ API. The main structures and fields are .Bd -literal struct netmap_if { ... - const uint32_t ni_flags; /* properties */ + const uint32_t ni_flags; /* properties */ ... - const uint32_t ni_tx_rings; /* NIC tx rings */ - const uint32_t ni_rx_rings; /* NIC rx rings */ - const uint32_t ni_extra_tx_rings; /* extra tx rings */ - const uint32_t ni_extra_rx_rings; /* extra rx rings */ + const uint32_t ni_tx_rings; /* NIC tx rings */ + const uint32_t ni_rx_rings; /* NIC rx rings */ + uint32_t ni_bufs_head; /* head of extra bufs list */ ... }; .Ed @@ -204,11 +239,14 @@ The number of tx and rx rings normally depends on the hardware. NICs also have an extra tx/rx ring pair connected to the host stack. .Em NIOCREGIF -can request additional tx/rx rings, -to be used between multiple processes/threads -accessing the same -.Nm -port. +can also request additional unbound buffers in the same memory space, +to be used as temporary storage for packets. +.Pa ni_bufs_head +contains the index of the first of these free rings, +which are connected in a list (the first uint32_t of each +buffer being the index of the next buffer in the list). +A 0 indicates the end of the list. +.Pp .It Dv struct netmap_ring (one per ring) .Bd -literal struct netmap_ring { @@ -221,9 +259,9 @@ struct netmap_ring { const uint32_t tail; /* (k) first buf owned by kernel */ ... uint32_t flags; - struct timeval ts; /* (k) time of last rxsync() */ + struct timeval ts; /* (k) time of last rxsync() */ ... - struct netmap_slot slot[0]; /* array of slots */ + struct netmap_slot slot[0]; /* array of slots */ } .Ed .Pp @@ -482,14 +520,16 @@ struct nmreq { uint32_t nr_version; /* (i) API version */ uint32_t nr_offset; /* (o) nifp offset in mmap region */ uint32_t nr_memsize; /* (o) size of the mmap region */ - uint32_t nr_tx_slots; /* (o) slots in tx rings */ - uint32_t nr_rx_slots; /* (o) slots in rx rings */ - uint16_t nr_tx_rings; /* (o) number of tx rings */ - uint16_t nr_rx_rings; /* (o) number of tx rings */ - uint16_t nr_ringid; /* (i) ring(s) we care about */ + uint32_t nr_tx_slots; /* (i/o) slots in tx rings */ + uint32_t nr_rx_slots; /* (i/o) slots in rx rings */ + uint16_t nr_tx_rings; /* (i/o) number of tx rings */ + uint16_t nr_rx_rings; /* (i/o) number of tx rings */ + uint16_t nr_ringid; /* (i/o) ring(s) we care about */ uint16_t nr_cmd; /* (i) special command */ - uint16_t nr_arg1; /* (i) extra arguments */ - uint16_t nr_arg2; /* (i) extra arguments */ + uint16_t nr_arg1; /* (i/o) extra arguments */ + uint16_t nr_arg2; /* (i/o) extra arguments */ + uint32_t nr_arg3; /* (i/o) extra arguments */ + uint32_t nr_flags /* (i/o) open mode */ ... }; .Ed @@ -537,20 +577,59 @@ it from the host stack. Multiple file descriptors can be bound to the same port, with proper synchronization left to the user. .Pp -On return, it gives the same info as NIOCGINFO, and nr_ringid -indicates the identity of the rings controlled through the file +.Dv NIOCREGIF can also bind a file descriptor to one endpoint of a +.Em netmap pipe , +consisting of two netmap ports with a crossover connection. +A netmap pipe share the same memory space of the parent port, +and is meant to enable configuration where a master process acts +as a dispatcher towards slave processes. +.Pp +To enable this function, the +.Pa nr_arg1 +field of the structure can be used as a hint to the kernel to +indicate how many pipes we expect to use, and reserve extra space +in the memory region. +.Pp +On return, it gives the same info as NIOCGINFO, +with +.Pa nr_ringid +and +.Pa nr_flags +indicating the identity of the rings controlled through the file descriptor. .Pp +.Va nr_flags .Va nr_ringid selects which rings are controlled through this file descriptor. -Possible values are: +Possible values of +.Pa nr_flags +are indicated below, together with the naming schemes +that application libraries (such as the +.Nm nm_open +indicated below) can use to indicate the specific set of rings. +In the example below, "netmap:foo" is any valid netmap port name. +.Pp .Bl -tag -width XXXXX -.It 0 -(default) all hardware rings -.It NETMAP_SW_RING +.It NR_REG_ALL_NIC "netmap:foo" +(default) all hardware ring pairs +.It NR_REG_SW_NIC "netmap:foo^" the ``host rings'', connecting to the host stack. -.It NETMAP_HW_RING | i -the i-th hardware ring . +.It NR_RING_NIC_SW "netmap:foo+ +all hardware rings and the host rings +.It NR_REG_ONE_NIC "netmap:foo-i" +only the i-th hardware ring pair, where the number is in +.Pa nr_ringid ; +.It NR_REG_PIPE_MASTER "netmap:foo{i" +the master side of the netmap pipe whose identifier (i) is in +.Pa nr_ringid ; +.It NR_REG_PIPE_SLAVE "netmap:foo}i" +the slave side of the netmap pipe whose identifier (i) is in +.Pa nr_ringid . +.Pp +The identifier of a pipe must be thought as part of the pipe name, +and does not need to be sequential. On return the pipe +will only have a single ring pair with index 0, +irrespective of the value of i. .El .Pp By default, a @@ -579,7 +658,7 @@ number of slots available for transmissi tells the hardware of consumed packets, and asks for newly available packets. .El -.Sh SELECT AND POLL +.Sh SELECT, POLL, EPOLL, KQUEUE. .Xr select 2 and .Xr poll 2 @@ -588,16 +667,26 @@ on a file descriptor process rings as indicated in .Sx TRANSMIT RINGS and -.Sx RECEIVE RINGS -when write (POLLOUT) and read (POLLIN) events are requested. -.Pp -Both block if no slots are available in the ring ( -.Va ring->cur == ring->tail ) +.Sx RECEIVE RINGS , +respectively when write (POLLOUT) and read (POLLIN) events are requested. +Both block if no slots are available in the ring +.Va ( ring->cur == ring->tail ) . +Depending on the platform, +.Xr epoll 2 +and +.Xr kqueue 2 +are supported too. .Pp -Packets in transmit rings are normally pushed out even without +Packets in transmit rings are normally pushed out +(and buffers reclaimed) even without requesting write events. Passing the NETMAP_NO_TX_SYNC flag to .Em NIOCREGIF disables this feature. +By default, receive rings are processed only if read +events are requested. Passing the NETMAP_DO_RX_SYNC flag to +.Em NIOCREGIF updates receive rings even without read events. +Note that on epoll and kqueue, NETMAP_NO_TX_SYNC and NETMAP_DO_RX_SYNC +only have an effect when some event is posted for the file descriptor. .Sh LIBRARIES The .Nm @@ -620,7 +709,7 @@ before .Pp The following functions are available: .Bl -tag -width XXXXX -.It Va struct nm_desc_t * nm_open(const char *ifname, const char *ring_name, int flags, int ring_flags) +.It Va struct nm_desc * nm_open(const char *ifname, const struct nmreq *req, uint64_t flags, const struct nm_desc *arg) similar to .Xr pcap_open , binds a file descriptor to a port. @@ -629,26 +718,36 @@ binds a file descriptor to a port. is a port name, in the form "netmap:XXX" for a NIC and "valeXXX:YYY" for a .Nm VALE port. +.It Va req +provides the initial values for the argument to the NIOCREGIF ioctl. +The nm_flags and nm_ringid values are overwritten by parsing +ifname and flags, and other fields can be overridden through +the other two arguments. +.It Va arg +points to a struct nm_desc containing arguments (e.g. from a previously +open file descriptor) that should override the defaults. +The fields are used as described below .It Va flags -can be set to -.Va NETMAP_SW_RING -to bind to the host ring pair, -or to NETMAP_HW_RING to bind to a specific ring. -.Va ring_name -with NETMAP_HW_RING, -is interpreted as a string or an integer indicating the ring to use. -.It Va ring_flags -is copied directly into the ring flags, to specify additional parameters -such as NR_TIMESTAMP or NR_FORWARD. +can be set to a combination of the following flags: +.Va NETMAP_NO_TX_POLL , +.Va NETMAP_DO_RX_POLL +(copied into nr_ringid); +.Va NM_OPEN_NO_MMAP (if arg points to the same memory region, +avoids the mmap and uses the values from it); +.Va NM_OPEN_IFNAME (ignores ifname and uses the values in arg); +.Va NM_OPEN_ARG1 , +.Va NM_OPEN_ARG2 , +.Va NM_OPEN_ARG3 (uses the fields from arg); +.Va NM_OPEN_RING_CFG (uses the ring number and sizes from arg). .El -.It Va int nm_close(struct nm_desc_t *d) +.It Va int nm_close(struct nm_desc *d) closes the file descriptor, unmaps memory, frees resources. -.It Va int nm_inject(struct nm_desc_t *d, const void *buf, size_t size) +.It Va int nm_inject(struct nm_desc *d, const void *buf, size_t size) similar to pcap_inject(), pushes a packet to a ring, returns the size of the packet is successful, or 0 on error; -.It Va int nm_dispatch(struct nm_desc_t *d, int cnt, nm_cb_t cb, u_char *arg) +.It Va int nm_dispatch(struct nm_desc *d, int cnt, nm_cb_t cb, u_char *arg) similar to pcap_dispatch(), applies a callback to incoming packets -.It Va u_char * nm_nextpkt(struct nm_desc_t *d, struct nm_hdr_t *hdr) +.It Va u_char * nm_nextpkt(struct nm_desc *d, struct nm_pkthdr *hdr) similar to pcap_next(), fetches the next packet .Pp .El @@ -740,9 +839,11 @@ performance. .Sh SYSTEM CALLS .Nm uses -.Xr select 2 +.Xr select 2 , +.Xr poll 2 , +.Xr epoll and -.Xr poll 2 +.Xr kqueue to wake up processes when significant events occur, and .Xr mmap 2 to map memory. @@ -872,10 +973,10 @@ A simple receiver can be implemented usi ... void receiver(void) { - struct nm_desc_t *d; + struct nm_desc *d; struct pollfd fds; u_char *buf; - struct nm_hdr_t h; + struct nm_pkthdr h; ... d = nm_open("netmap:ix0", NULL, 0, 0); fds.fd = NETMAP_FD(d); @@ -910,6 +1011,13 @@ to replenish the receive ring: ... .Ed .Ss ACCESSING THE HOST STACK +The host stack is for all practical purposes just a regular ring pair, +which you can access with the netmap API (e.g. with +.Dl nm_open("netmap:eth0^", ... ) ; +All packets that the host would send to an interface in +.Nm +mode end up into the RX ring, whereas all packets queued to the +TX ring are send up to the host stack. .Ss VALE SWITCH A simple way to test the performance of a .Nm VALE @@ -917,6 +1025,10 @@ switch is to attach a sender and a recei e.g. running the following in two different terminals: .Dl pkt-gen -i vale1:a -f rx # receiver .Dl pkt-gen -i vale1:b -f tx # sender +The same example can be used to test netmap pipes, by simply +changing port names, e.g. +.Dl pkt-gen -i vale:x{3 -f rx # receiver on the master side +.Dl pkt-gen -i vale:x}3 -f tx # sender on the slave side .Pp The following command attaches an interface and the host stack to a switch: @@ -935,6 +1047,14 @@ Communications of the ACM, 55 (3), pp.45 .Pp Luigi Rizzo, netmap: a novel framework for fast packet I/O, Usenix ATC'12, June 2012, Boston +.Pp +Luigi Rizzo, Giuseppe Lettieri, +VALE, a switched ethernet for virtual machines, +ACM CoNEXT'12, December 2012, Nice +.Pp +Luigi Rizzo, Giuseppe Lettieri, Vincenzo Maffione, +Speeding up packet I/O in virtual machines, +ACM/IEEE ANCS'13, October 2013, San Jose .Sh AUTHORS .An -nosplit The @@ -953,20 +1073,3 @@ and .Nm VALE have been funded by the European Commission within FP7 Projects CHANGE (257422) and OPENLAB (287581). -.Pp -.Ss SPECIAL MODES -When the device name has the form -.Dl valeXXX:ifname (ifname is an existing interface) -the physical interface -(and optionally the corrisponding host stack endpoint) -are connected or disconnected from the -.Nm VALE -switch named XXX. -In this case the -.Pa ioctl() -is only used only for configuration, typically through the -.Xr vale-ctl -command. -The file descriptor cannot be used for I/O, and should be -closed after issuing the -.Pa ioctl() . From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 10:53:44 2014 Return-Path: Delivered-To: svn-src-all@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 A368CE1A; Sat, 15 Feb 2014 10:53:44 +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 8F0F71BD0; Sat, 15 Feb 2014 10:53:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1FAri4u061293; Sat, 15 Feb 2014 10:53:44 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1FArinQ061292; Sat, 15 Feb 2014 10:53:44 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201402151053.s1FArinQ061292@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sat, 15 Feb 2014 10:53:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261913 - head/lib/libcrypt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 10:53:44 -0000 Author: des Date: Sat Feb 15 10:53:44 2014 New Revision: 261913 URL: http://svnweb.freebsd.org/changeset/base/261913 Log: Switch the hardcoded default hash function from MD5 / DES to SHA512. Modified: head/lib/libcrypt/crypt.c Modified: head/lib/libcrypt/crypt.c ============================================================================== --- head/lib/libcrypt/crypt.c Sat Feb 15 08:23:31 2014 (r261912) +++ head/lib/libcrypt/crypt.c Sat Feb 15 10:53:44 2014 (r261913) @@ -79,11 +79,7 @@ static const struct { } }; -#ifdef HAS_DES -#define CRYPT_DEFAULT "des" -#else -#define CRYPT_DEFAULT "md5" -#endif +#define CRYPT_DEFAULT "sha512" static int crypt_type = -1; From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 11:42:57 2014 Return-Path: Delivered-To: svn-src-all@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 F229869F; Sat, 15 Feb 2014 11:42:56 +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 DB2E61F74; Sat, 15 Feb 2014 11:42:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1FBguNR080111; Sat, 15 Feb 2014 11:42:56 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1FBguib080110; Sat, 15 Feb 2014 11:42:56 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201402151142.s1FBguib080110@svn.freebsd.org> From: Dimitry Andric Date: Sat, 15 Feb 2014 11:42:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261914 - head/sys/fs/nandfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 11:42:57 -0000 Author: dim Date: Sat Feb 15 11:42:56 2014 New Revision: 261914 URL: http://svnweb.freebsd.org/changeset/base/261914 Log: In sys/fs/nandfs/nandfs_vfsops.c, #if 0 an unused static function. MFC after: 3 days Modified: head/sys/fs/nandfs/nandfs_vfsops.c Modified: head/sys/fs/nandfs/nandfs_vfsops.c ============================================================================== --- head/sys/fs/nandfs/nandfs_vfsops.c Sat Feb 15 10:53:44 2014 (r261913) +++ head/sys/fs/nandfs/nandfs_vfsops.c Sat Feb 15 11:42:56 2014 (r261914) @@ -285,6 +285,7 @@ nandfs_sblocks_in_block(struct nandfs_de return (fsdev->nd_devblocksize / sizeof(struct nandfs_super_block)); } +#if 0 static __inline int nandfs_sblocks_in_first_block(struct nandfs_device *fsdev) { @@ -297,6 +298,7 @@ nandfs_sblocks_in_first_block(struct nan return (n); } +#endif static int nandfs_write_superblock_at(struct nandfs_device *fsdev, From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 12:25:02 2014 Return-Path: Delivered-To: svn-src-all@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 C2520382; Sat, 15 Feb 2014 12:25: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 AAEDE1294; Sat, 15 Feb 2014 12:25:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1FCP2De096283; Sat, 15 Feb 2014 12:25:02 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1FCP2D8096279; Sat, 15 Feb 2014 12:25:02 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201402151225.s1FCP2D8096279@svn.freebsd.org> From: Dimitry Andric Date: Sat, 15 Feb 2014 12:25:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261915 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 12:25:02 -0000 Author: dim Date: Sat Feb 15 12:25:01 2014 New Revision: 261915 URL: http://svnweb.freebsd.org/changeset/base/261915 Log: Under sys/netpfil/ipfw, surround two IPv6-specific static functions with #ifdef INET6, since they are unused when INET6 is disabled. MFC after: 3 days Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c head/sys/netpfil/ipfw/ip_fw_table.c Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_dynamic.c Sat Feb 15 11:42:56 2014 (r261914) +++ head/sys/netpfil/ipfw/ip_fw_dynamic.c Sat Feb 15 12:25:01 2014 (r261915) @@ -248,6 +248,7 @@ SYSEND #endif /* SYSCTL_NODE */ +#ifdef INET6 static __inline int hash_packet6(struct ipfw_flow_id *id) { @@ -259,6 +260,7 @@ hash_packet6(struct ipfw_flow_id *id) (id->dst_port) ^ (id->src_port); return i; } +#endif /* * IMPORTANT: the hash function for dynamic rules must be commutative Modified: head/sys/netpfil/ipfw/ip_fw_table.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_table.c Sat Feb 15 11:42:56 2014 (r261914) +++ head/sys/netpfil/ipfw/ip_fw_table.c Sat Feb 15 12:25:01 2014 (r261915) @@ -123,6 +123,7 @@ struct table_xentry { #define OFF_LEN_IFACE (8 * offsetof(struct xaddr_iface, ifname)) +#ifdef INET6 static inline void ipv6_writemask(struct in6_addr *addr6, uint8_t mask) { @@ -132,6 +133,7 @@ ipv6_writemask(struct in6_addr *addr6, u *cp++ = 0xFFFFFFFF; *cp = htonl(mask ? ~((1 << (32 - mask)) - 1) : 0); } +#endif int ipfw_add_table_entry(struct ip_fw_chain *ch, uint16_t tbl, void *paddr, From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 12:37:27 2014 Return-Path: Delivered-To: svn-src-all@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 56108752; Sat, 15 Feb 2014 12:37: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 41A86136A; Sat, 15 Feb 2014 12:37:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1FCbRJ8000508; Sat, 15 Feb 2014 12:37:27 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1FCbRnh000507; Sat, 15 Feb 2014 12:37:27 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201402151237.s1FCbRnh000507@svn.freebsd.org> From: Dimitry Andric Date: Sat, 15 Feb 2014 12:37:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261916 - head/sys/dev/xen/console X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 12:37:27 -0000 Author: dim Date: Sat Feb 15 12:37:26 2014 New Revision: 261916 URL: http://svnweb.freebsd.org/changeset/base/261916 Log: In sys/dev/xen/console/console.c, #if 0 an unused static function. MFC after: 3 days Modified: head/sys/dev/xen/console/console.c Modified: head/sys/dev/xen/console/console.c ============================================================================== --- head/sys/dev/xen/console/console.c Sat Feb 15 12:25:01 2014 (r261915) +++ head/sys/dev/xen/console/console.c Sat Feb 15 12:37:26 2014 (r261916) @@ -356,6 +356,7 @@ xcclose(struct tty *tp) xen_console_up = 0; } +#if 0 static inline int __xencons_put_char(int ch) { @@ -365,6 +366,7 @@ __xencons_put_char(int ch) wbuf[WBUF_MASK(wp++)] = _ch; return 1; } +#endif static void From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 13:13:01 2014 Return-Path: Delivered-To: svn-src-all@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 85F9C48D; Sat, 15 Feb 2014 13:13:01 +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 71F941632; Sat, 15 Feb 2014 13:13:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1FDD16j016750; Sat, 15 Feb 2014 13:13:01 GMT (envelope-from zbb@svn.freebsd.org) Received: (from zbb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1FDD1IK016747; Sat, 15 Feb 2014 13:13:01 GMT (envelope-from zbb@svn.freebsd.org) Message-Id: <201402151313.s1FDD1IK016747@svn.freebsd.org> From: Zbigniew Bodek Date: Sat, 15 Feb 2014 13:13:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261917 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 13:13:01 -0000 Author: zbb Date: Sat Feb 15 13:13:00 2014 New Revision: 261917 URL: http://svnweb.freebsd.org/changeset/base/261917 Log: Always clear L1 PTE descriptor when removing superpage on ARM Invalidate L1 PTE regardles of existance of the corresponding l2_bucket. This is relevant when superpage is entered via pmap_enter_object() and will fix crash on entering page in place of not properly removed superpage. Modified: head/sys/arm/arm/pmap-v6.c head/sys/arm/include/pmap.h Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Sat Feb 15 12:37:26 2014 (r261916) +++ head/sys/arm/arm/pmap-v6.c Sat Feb 15 13:13:00 2014 (r261917) @@ -3700,13 +3700,14 @@ pmap_remove_section(pmap_t pmap, vm_offs KASSERT(l2b->l2b_occupancy == L2_PTE_NUM_TOTAL, ("pmap_remove_section: l2_bucket occupancy error")); pmap_free_l2_bucket(pmap, l2b, L2_PTE_NUM_TOTAL); - /* - * Now invalidate L1 slot as it was not invalidated in - * pmap_free_l2_bucket() due to L1_TYPE mismatch. - */ - *pl1pd = 0; - PTE_SYNC(pl1pd); } + /* Now invalidate L1 slot */ + *pl1pd = 0; + PTE_SYNC(pl1pd); + if (L1_S_EXECUTABLE(l1pd)) + cpu_tlb_flushID_SE(sva); + else + cpu_tlb_flushD_SE(sva); } /* Modified: head/sys/arm/include/pmap.h ============================================================================== --- head/sys/arm/include/pmap.h Sat Feb 15 12:37:26 2014 (r261916) +++ head/sys/arm/include/pmap.h Sat Feb 15 13:13:00 2014 (r261917) @@ -527,6 +527,7 @@ extern int pmap_needs_pte_sync; #define L1_S_PROT_MASK (L1_S_PROT_W|L1_S_PROT_U) #define L1_S_REF (L1_S_AP(AP_REF)) /* Reference flag */ #define L1_S_WRITABLE(pd) (!((pd) & L1_S_PROT_W)) +#define L1_S_EXECUTABLE(pd) (!((pd) & L1_S_XN)) #define L1_S_REFERENCED(pd) ((pd) & L1_S_REF) #define L1_S_PROT(ku, pr) (((((ku) == PTE_KERNEL) ? 0 : L1_S_PROT_U) | \ From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 13:13:02 2014 Return-Path: Delivered-To: svn-src-all@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 0830648E; Sat, 15 Feb 2014 13:13:02 +0000 (UTC) Received: from mail.jr-hosting.nl (mail.jr-hosting.nl [IPv6:2a01:4f8:141:5ffd::25]) by mx1.freebsd.org (Postfix) with ESMTP id 618F71630; Sat, 15 Feb 2014 13:13:01 +0000 (UTC) Received: from [10.0.2.17] (a44084.upc-a.chello.nl [62.163.44.84]) by mail.jr-hosting.nl (Postfix) with ESMTPSA id B15F53F47A; Sat, 15 Feb 2014 14:12:58 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_24859574-6FB0-4CB4-AA44-F3209D12DD57"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: svn commit: r261868 - in stable/10: share/man/man4 sys/dev/usb sys/dev/usb/wlan From: Remko Lodder In-Reply-To: <201402140345.s1E3jn2c017508@svn.freebsd.org> Date: Sat, 15 Feb 2014 14:12:56 +0100 Message-Id: <2C809600-4CD1-448C-A6C9-47F3904F4632@FreeBSD.org> References: <201402140345.s1E3jn2c017508@svn.freebsd.org> To: Kevin Lo X-Mailer: Apple Mail (2.1827) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 13:13:02 -0000 --Apple-Mail=_24859574-6FB0-4CB4-AA44-F3209D12DD57 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On 14 Feb 2014, at 04:45, Kevin Lo wrote: > Author: kevlo > Date: Fri Feb 14 03:45:49 2014 > New Revision: 261868 > URL: http://svnweb.freebsd.org/changeset/base/261868 >=20 > Log: > MFC r259544, r259545, r259546, r259547, r259812, r259939, r260219, = r260542, > r261118, r261124, r261330: >=20 > - Add support for the MediaTek/Ralink RT3593 chipset. > - Various minor USB WLAN fixes and improvements. Cool, this seems to add support for my Raspberry Pi=92s Nano-wlan module = (RTL8188EU)! Thanks a lot! Remko >=20 > Modified: > stable/10/share/man/man4/run.4 > stable/10/sys/dev/usb/usbdevs > stable/10/sys/dev/usb/wlan/if_run.c > stable/10/sys/dev/usb/wlan/if_runreg.h > stable/10/sys/dev/usb/wlan/if_runvar.h > Directory Properties: > stable/10/ (props changed) >=20 > Modified: stable/10/share/man/man4/run.4 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/10/share/man/man4/run.4 Fri Feb 14 03:34:12 2014 = (r261867) > +++ stable/10/share/man/man4/run.4 Fri Feb 14 03:45:49 2014 = (r261868) > @@ -16,7 +16,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd November 11, 2013 > +.Dd January 3, 2014 > .Dt RUN 4 > .Os > .Sh NAME > @@ -64,8 +64,17 @@ The RT3000U is a single-chip solution ba > an RT3020 (1T1R), RT3021 (1T2R) or RT3022 (2T2R) single-band radio > transceiver. > .Pp > -The RT3900E is a single-chip solution based on an RT5390 MAC/BBP and > -an RT5370 (1T1R) or RT5372 (2T2R) single-band radio transceiver. > +The RT3900E is a single-chip USB 2.0 802.11n solution. > +The MAC/Baseband Processor can be an RT3593, RT5390, RT5392 or an = RT5592. > +The radio can be an RT3053, RT5370, RT5372 or an RT5572. > +The RT3053 chip operates in the 2GHz and 5GHz spectra and supports up = to > +3 transmit paths and 3 receiver paths (3T3R). > +The RT5370 chip operates in the 2GHz spectrum and supports 1 transmit = path > +and 1 receiver path (1T1R). > +The RT5372 chip operates in the 2GHz spectrum and supports up to 2 = transmit > +paths and 2 receiver paths (2T2R). > +The RT5572 chip operates in the 2GHz and 5GHz spectra and supports up = to > +2 transmit paths and 2 receiver paths (2T2R). > .Pp > These are the modes the > .Nm > @@ -116,11 +125,13 @@ driver supports the following wireless a > .It Airlink101 AWLL6090 > .It ASUS USB-N11 > .It ASUS USB-N13 ver. A1 > +.It ASUS USB-N66 > .It ASUS WL-160N > .It Belkin F5D8051 ver 3000 > .It Belkin F5D8053 > .It Belkin F5D8055 > .It Belkin F6D4050 ver 1 > +.It Belkin F9L1103 > .It Buffalo WLI-UC-AG300N > .It Buffalo WLI-UC-G300N > .It Buffalo WLI-UC-G301N > @@ -132,13 +143,15 @@ driver supports the following wireless a > .It Corega CG-WLUSB300AGN > .It Corega CG-WLUSB300GNM > .It D-Link DWA-130 rev B1 > -.It D-Link DWA-140 rev B1, B2, B3 > +.It D-Link DWA-140 rev B1, B2, B3, D1 > .It D-Link DWA-160 rev B2 > +.It D-Link DWA-162 > .It DrayTek Vigor N61 > .It Edimax EW-7711UAn > .It Edimax EW-7711UTn > .It Edimax EW-7717Un > .It Edimax EW-7718Un > +.It Edimax EW-7733UnD > .It Gigabyte GN-WB30N > .It Gigabyte GN-WB31N > .It Gigabyte GN-WB32L > @@ -164,6 +177,7 @@ driver supports the following wireless a > .It TP-LINK TL-WN727N v3 > .It Unex DNUR-81 > .It Unex DNUR-82 > +.It ZyXEL NWD2705 > .It ZyXEL NWD210N > .It ZyXEL NWD270N > .El > @@ -235,4 +249,4 @@ driver was written by > The > .Nm > driver does not support any of the 802.11n capabilities offered by the > -RT2800 and RT3000 chipsets. > +RT2800, RT3000 and RT3900 chipsets. >=20 > Modified: stable/10/sys/dev/usb/usbdevs > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/10/sys/dev/usb/usbdevs Fri Feb 14 03:34:12 2014 = (r261867) > +++ stable/10/sys/dev/usb/usbdevs Fri Feb 14 03:45:49 2014 = (r261868) > @@ -1183,6 +1183,7 @@ product ASUS USBN13 0x1784 USB-N13 > product ASUS RT3070_1 0x1790 RT3070 > product ASUS USBN10 0x1786 USB-N10 > product ASUS RTL8192CU 0x17ab RTL8192CU > +product ASUS USBN66 0x17ad USB-N66 > product ASUS RTL8192SU 0x1791 RTL8192SU > product ASUS A730W 0x4202 ASUS MyPal A730W > product ASUS P535 0x420f ASUS P535 PDA > @@ -1285,6 +1286,7 @@ product BELKIN F5U409 0x0409 F5U409 = Ser > product BELKIN F6C550AVR 0x0551 F6C550-AVR UPS > product BELKIN F5U120 0x1203 F5U120-PC Hub > product BELKIN RTL8188CU 0x1102 RTL8188CU Wireless Adapter > +product BELKIN F9L1103 0x1103 F9L1103 Wireless Adapter > product BELKIN RTL8192CU 0x2102 RTL8192CU Wireless Adapter > product BELKIN F7D2102 0x2103 F7D2102 Wireless Adapter > product BELKIN ZD1211B 0x4050 ZD1211B > @@ -1598,6 +1600,8 @@ product DLINK RT3072 0x3c0a RT3072 > product DLINK DWA140B3 0x3c15 DWA-140 rev B3 > product DLINK DWA160B2 0x3c1a DWA-160 rev B2 > product DLINK DWA127 0x3c1b DWA-127 Wireless Adapter > +product DLINK DWA162 0x3c1f DWA-162 Wireless Adapter > +product DLINK DWA140D1 0x3c20 DWA-140 rev D1 > product DLINK DSB650C 0x4000 10Mbps Ethernet > product DLINK DSB650TX1 0x4001 10/100 Ethernet > product DLINK DSB650TX 0x4002 10/100 Ethernet > @@ -1658,6 +1662,7 @@ product EDIMAX RTL8192SU_3 0x7622 RTL819 > product EDIMAX RT2870_1 0x7711 RT2870 > product EDIMAX EW7717 0x7717 EW-7717 > product EDIMAX EW7718 0x7718 EW-7718 > +product EDIMAX EW7733UND 0x7733 EW-7733UnD > product EDIMAX EW7811UN 0x7811 EW-7811Un > product EDIMAX RTL8192CU 0x7822 RTL8192CU >=20 > @@ -3617,11 +3622,13 @@ product RALINK RT2573 0x2573 = RT2501USB=20 > product RALINK RT2671 0x2671 RT2601USB Wireless Adapter > product RALINK RT2770 0x2770 RT2770 > product RALINK RT2870 0x2870 RT2870 > +product RALINK RT_STOR 0x2878 USB Storage > product RALINK RT3070 0x3070 RT3070 > product RALINK RT3071 0x3071 RT3071 > product RALINK RT3072 0x3072 RT3072 > product RALINK RT3370 0x3370 RT3370 > product RALINK RT3572 0x3572 RT3572 > +product RALINK RT3573 0x3573 RT3573 > product RALINK RT5370 0x5370 RT5370 > product RALINK RT5572 0x5572 RT5572 > product RALINK RT8070 0x8070 RT8070 > @@ -3643,10 +3650,11 @@ product REALTEK RTL8171 0x8171 = RTL8171 > product REALTEK RTL8172 0x8172 RTL8172 > product REALTEK RTL8173 0x8173 RTL8173 > product REALTEK RTL8174 0x8174 RTL8174 > -product REALTEK RTL8188CE_1 0x817e RTL8188CE > -product REALTEK RTL8188CU_0 0x8176 RTL8188CU > -product REALTEK RTL8188CU_1 0x817a RTL8188CU > -product REALTEK RTL8188CU_2 0x817b RTL8188CU > +product REALTEK RTL8188CU_0 0x8176 RTL8188CU > +product REALTEK RTL8188EU 0x8179 RTL8188EU > +product REALTEK RTL8188CE_1 0x817e RTL8188CE > +product REALTEK RTL8188CU_1 0x817a RTL8188CU > +product REALTEK RTL8188CU_2 0x817b RTL8188CU > product REALTEK RTL8187 0x8187 RTL8187 Wireless Adapter > product REALTEK RTL8187B_0 0x8189 RTL8187B Wireless Adapter > product REALTEK RTL8187B_1 0x8197 RTL8187B Wireless Adapter > @@ -4486,3 +4494,4 @@ product ZYXEL G202 0x3410 G-202 > product ZYXEL RT2870_1 0x3416 RT2870 > product ZYXEL RT2870_2 0x341a RT2870 > product ZYXEL RTL8192CU 0x341f RTL8192CU > +product ZYXEL NWD2705 0x3421 NWD2705 >=20 > Modified: stable/10/sys/dev/usb/wlan/if_run.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/10/sys/dev/usb/wlan/if_run.c Fri Feb 14 03:34:12 2014 = (r261867) > +++ stable/10/sys/dev/usb/wlan/if_run.c Fri Feb 14 03:45:49 2014 = (r261868) > @@ -2,7 +2,7 @@ > * Copyright (c) 2008,2010 Damien Bergamini > * ported to FreeBSD by Akinori Furukoshi > * USB Consulting, Hans Petter Selasky > - * Copyright (c) 2013 Kevin Lo > + * Copyright (c) 2013-2014 Kevin Lo > * > * Permission to use, copy, modify, and distribute this software for = any > * purpose with or without fee is hereby granted, provided that the = above > @@ -69,14 +69,15 @@ __FBSDID("$FreeBSD$"); > #include > #include "usbdevs.h" >=20 > -#define USB_DEBUG_VAR run_debug > +#define USB_DEBUG_VAR run_debug > #include > +#include >=20 > #include > #include >=20 > #ifdef USB_DEBUG > -#define RUN_DEBUG > +#define RUN_DEBUG > #endif >=20 > #ifdef RUN_DEBUG > @@ -86,17 +87,19 @@ SYSCTL_INT(_hw_usb_run, OID_AUTO, debug, > "run debug level"); > #endif >=20 > -#define IEEE80211_HAS_ADDR4(wh) \ > +#define IEEE80211_HAS_ADDR4(wh) \ > (((wh)->i_fc[1] & IEEE80211_FC1_DIR_MASK) =3D=3D = IEEE80211_FC1_DIR_DSTODS) >=20 > /* > * Because of LOR in run_key_delete(), use atomic instead. > * '& RUN_CMDQ_MASQ' is to loop cmdq[]. > */ > -#define RUN_CMDQ_GET(c) (atomic_fetchadd_32((c), 1) & = RUN_CMDQ_MASQ) > +#define RUN_CMDQ_GET(c) (atomic_fetchadd_32((c), 1) & = RUN_CMDQ_MASQ) >=20 > static const STRUCT_USB_HOST_ID run_devs[] =3D { > -#define RUN_DEV(v,p) { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) = } > +#define RUN_DEV(v,p) { USB_VP(USB_VENDOR_##v, = USB_PRODUCT_##v##_##p) } > +#define RUN_DEV_EJECT(v,p) \ > + { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, 0) } > RUN_DEV(ABOCOM, RT2770), > RUN_DEV(ABOCOM, RT2870), > RUN_DEV(ABOCOM, RT3070), > @@ -135,6 +138,7 @@ static const STRUCT_USB_HOST_ID run_devs > RUN_DEV(ASUS, RT2870_5), > RUN_DEV(ASUS, USBN13), > RUN_DEV(ASUS, RT3070_1), > + RUN_DEV(ASUS, USBN66), > RUN_DEV(ASUS, USB_N53), > RUN_DEV(ASUS2, USBN11), > RUN_DEV(AZUREWAVE, RT2870_1), > @@ -142,6 +146,7 @@ static const STRUCT_USB_HOST_ID run_devs > RUN_DEV(AZUREWAVE, RT3070_1), > RUN_DEV(AZUREWAVE, RT3070_2), > RUN_DEV(AZUREWAVE, RT3070_3), > + RUN_DEV(BELKIN, F9L1103), > RUN_DEV(BELKIN, F5D8053V3), > RUN_DEV(BELKIN, F5D8055), > RUN_DEV(BELKIN, F5D8055V2), > @@ -174,6 +179,7 @@ static const STRUCT_USB_HOST_ID run_devs > RUN_DEV(DLINK, DWA127), > RUN_DEV(DLINK, DWA140B3), > RUN_DEV(DLINK, DWA160B2), > + RUN_DEV(DLINK, DWA162), > RUN_DEV(DLINK2, DWA130), > RUN_DEV(DLINK2, RT2870_1), > RUN_DEV(DLINK2, RT2870_2), > @@ -186,6 +192,7 @@ static const STRUCT_USB_HOST_ID run_devs > RUN_DEV(DLINK2, RT3072_1), > RUN_DEV(EDIMAX, EW7717), > RUN_DEV(EDIMAX, EW7718), > + RUN_DEV(EDIMAX, EW7733UND), > RUN_DEV(EDIMAX, RT2870_1), > RUN_DEV(ENCORE, RT3070_1), > RUN_DEV(ENCORE, RT3070_2), > @@ -257,6 +264,7 @@ static const STRUCT_USB_HOST_ID run_devs > RUN_DEV(RALINK, RT3072), > RUN_DEV(RALINK, RT3370), > RUN_DEV(RALINK, RT3572), > + RUN_DEV(RALINK, RT3573), > RUN_DEV(RALINK, RT5370), > RUN_DEV(RALINK, RT5572), > RUN_DEV(RALINK, RT8070), > @@ -306,6 +314,9 @@ static const STRUCT_USB_HOST_ID run_devs > RUN_DEV(ZINWELL, RT3072_2), > RUN_DEV(ZYXEL, RT2870_1), > RUN_DEV(ZYXEL, RT2870_2), > + RUN_DEV(ZYXEL, NWD2705), > + RUN_DEV_EJECT(RALINK, RT_STOR), > +#undef RUN_DEV_EJECT > #undef RUN_DEV > }; >=20 > @@ -321,6 +332,9 @@ static usb_callback_t run_bulk_tx_callba > static usb_callback_t run_bulk_tx_callback4; > static usb_callback_t run_bulk_tx_callback5; >=20 > +static void run_autoinst(void *, struct usb_device *, > + struct usb_attach_arg *); > +static int run_driver_loaded(struct module *, int, void *); > static void run_bulk_tx_callbackN(struct usb_xfer *xfer, > usb_error_t error, u_int index); > static struct ieee80211vap *run_vap_create(struct ieee80211com *, > @@ -344,6 +358,7 @@ static int run_write(struct run_softc *, > static int run_write_region_1(struct run_softc *, uint16_t, > const uint8_t *, int); > static int run_set_region_4(struct run_softc *, uint16_t, uint32_t, = int); > +static int run_efuse_read(struct run_softc *, uint16_t, uint16_t *, = int); > static int run_efuse_read_2(struct run_softc *, uint16_t, uint16_t = *); > static int run_eeprom_read_2(struct run_softc *, uint16_t, uint16_t = *); > static int run_rt2870_rf_write(struct run_softc *, uint32_t); > @@ -353,6 +368,8 @@ static int run_bbp_read(struct run_softc > static int run_bbp_write(struct run_softc *, uint8_t, uint8_t); > static int run_mcu_cmd(struct run_softc *, uint8_t, uint16_t); > static const char *run_get_rf(uint16_t); > +static void run_rt3593_get_txpower(struct run_softc *); > +static void run_get_txpower(struct run_softc *); > static int run_read_eeprom(struct run_softc *); > static struct ieee80211_node *run_node_alloc(struct ieee80211vap *, > const uint8_t mac[IEEE80211_ADDR_LEN]); > @@ -390,12 +407,14 @@ static int run_raw_xmit(struct ieee80211 > const struct ieee80211_bpf_params *); > static void run_start(struct ifnet *); > static int run_ioctl(struct ifnet *, u_long, caddr_t); > +static void run_iq_calib(struct run_softc *, u_int); > static void run_set_agc(struct run_softc *, uint8_t); > static void run_select_chan_group(struct run_softc *, int); > static void run_set_rx_antenna(struct run_softc *, int); > static void run_rt2870_set_chan(struct run_softc *, u_int); > static void run_rt3070_set_chan(struct run_softc *, u_int); > static void run_rt3572_set_chan(struct run_softc *, u_int); > +static void run_rt3593_set_chan(struct run_softc *, u_int); > static void run_rt5390_set_chan(struct run_softc *, u_int); > static void run_rt5592_set_chan(struct run_softc *, u_int); > static int run_set_chan(struct run_softc *, struct = ieee80211_channel *); > @@ -424,10 +443,13 @@ static void run_update_promisc(struct if > static void run_rt5390_bbp_init(struct run_softc *); > static int run_bbp_init(struct run_softc *); > static int run_rt3070_rf_init(struct run_softc *); > +static void run_rt3593_rf_init(struct run_softc *); > static void run_rt5390_rf_init(struct run_softc *); > static int run_rt3070_filter_calib(struct run_softc *, uint8_t, = uint8_t, > uint8_t *); > static void run_rt3070_rf_setup(struct run_softc *); > +static void run_rt3593_rf_setup(struct run_softc *); > +static void run_rt5390_rf_setup(struct run_softc *); > static int run_txrx_enable(struct run_softc *); > static void run_adjust_freq_offset(struct run_softc *); > static void run_init(void *); > @@ -435,6 +457,30 @@ static void run_init_locked(struct run_s > static void run_stop(void *); > static void run_delay(struct run_softc *, u_int); >=20 > +static eventhandler_tag run_etag; > + > +static const struct rt2860_rate { > + uint8_t rate; > + uint8_t mcs; > + enum ieee80211_phytype phy; > + uint8_t ctl_ridx; > + uint16_t sp_ack_dur; > + uint16_t lp_ack_dur; > +} rt2860_rates[] =3D { > + { 2, 0, IEEE80211_T_DS, 0, 314, 314 }, > + { 4, 1, IEEE80211_T_DS, 1, 258, 162 }, > + { 11, 2, IEEE80211_T_DS, 2, 223, 127 }, > + { 22, 3, IEEE80211_T_DS, 3, 213, 117 }, > + { 12, 0, IEEE80211_T_OFDM, 4, 60, 60 }, > + { 18, 1, IEEE80211_T_OFDM, 4, 52, 52 }, > + { 24, 2, IEEE80211_T_OFDM, 6, 48, 48 }, > + { 36, 3, IEEE80211_T_OFDM, 6, 44, 44 }, > + { 48, 4, IEEE80211_T_OFDM, 8, 44, 44 }, > + { 72, 5, IEEE80211_T_OFDM, 8, 40, 40 }, > + { 96, 6, IEEE80211_T_OFDM, 8, 40, 40 }, > + { 108, 7, IEEE80211_T_OFDM, 8, 40, 40 } > +}; > + > static const struct { > uint16_t reg; > uint32_t val; > @@ -497,6 +543,8 @@ static const struct { > RT3070_DEF_RF > },rt3572_def_rf[] =3D { > RT3572_DEF_RF > +},rt3593_def_rf[] =3D { > + RT3593_DEF_RF > },rt5390_def_rf[] =3D { > RT5390_DEF_RF > },rt5392_def_rf[] =3D { > @@ -589,6 +637,46 @@ static const struct usb_config run_confi > } > }; >=20 > +static void > +run_autoinst(void *arg, struct usb_device *udev, > + struct usb_attach_arg *uaa) > +{ > + struct usb_interface *iface; > + struct usb_interface_descriptor *id; > + > + if (uaa->dev_state !=3D UAA_DEV_READY) > + return; > + > + iface =3D usbd_get_iface(udev, 0); > + if (iface =3D=3D NULL) > + return; > + id =3D iface->idesc; > + if (id =3D=3D NULL || id->bInterfaceClass !=3D UICLASS_MASS) > + return; > + if (usbd_lookup_id_by_uaa(run_devs, sizeof(run_devs), uaa)) > + return; > + > + if (usb_msc_eject(udev, 0, MSC_EJECT_STOPUNIT) =3D=3D 0) > + uaa->dev_state =3D UAA_DEV_EJECTING; > +} > + > +static int > +run_driver_loaded(struct module *mod, int what, void *arg) > +{ > + switch (what) { > + case MOD_LOAD: > + run_etag =3D EVENTHANDLER_REGISTER(usb_dev_configured, > + run_autoinst, NULL, EVENTHANDLER_PRI_ANY); > + break; > + case MOD_UNLOAD: > + EVENTHANDLER_DEREGISTER(usb_dev_configured, run_etag); > + break; > + default: > + return (EOPNOTSUPP); > + } > + return (0); > +} > + > static int > run_match(device_t self) > { > @@ -710,7 +798,8 @@ run_attach(device_t self) > setbit(&bands, IEEE80211_MODE_11B); > setbit(&bands, IEEE80211_MODE_11G); > if (sc->rf_rev =3D=3D RT2860_RF_2750 || sc->rf_rev =3D=3D = RT2860_RF_2850 || > - sc->rf_rev =3D=3D RT3070_RF_3052 || sc->rf_rev =3D=3D = RT5592_RF_5592) > + sc->rf_rev =3D=3D RT3070_RF_3052 || sc->rf_rev =3D=3D = RT3593_RF_3053 || > + sc->rf_rev =3D=3D RT5592_RF_5592) > setbit(&bands, IEEE80211_MODE_11A); > ieee80211_init_channels(ic, NULL, &bands); >=20 > @@ -1061,9 +1150,11 @@ run_load_microcode(struct run_softc *sc) > } >=20 > /* write microcode image */ > - run_write_region_1(sc, RT2870_FW_BASE, base, 4096); > - run_write(sc, RT2860_H2M_MAILBOX_CID, 0xffffffff); > - run_write(sc, RT2860_H2M_MAILBOX_STATUS, 0xffffffff); > + if (sc->mac_ver !=3D 0x3593) { > + run_write_region_1(sc, RT2870_FW_BASE, base, 4096); > + run_write(sc, RT2860_H2M_MAILBOX_CID, 0xffffffff); > + run_write(sc, RT2860_H2M_MAILBOX_STATUS, 0xffffffff); > + } >=20 > req.bmRequestType =3D UT_WRITE_VENDOR_DEVICE; > req.bRequest =3D RT2870_RESET; > @@ -1078,15 +1169,16 @@ run_load_microcode(struct run_softc *sc) >=20 > run_delay(sc, 10); >=20 > + run_write(sc, RT2860_H2M_BBPAGENT, 0); > run_write(sc, RT2860_H2M_MAILBOX, 0); > + run_write(sc, RT2860_H2M_INTSRC, 0); > if ((error =3D run_mcu_cmd(sc, RT2860_MCU_CMD_RFRESET, 0)) !=3D = 0) > goto fail; >=20 > /* wait until microcontroller is ready */ > for (ntries =3D 0; ntries < 1000; ntries++) { > - if ((error =3D run_read(sc, RT2860_SYS_CTRL, &tmp)) !=3D = 0) { > + if ((error =3D run_read(sc, RT2860_SYS_CTRL, &tmp)) !=3D = 0) > goto fail; > - } > if (tmp & RT2860_MCU_READY) > break; > run_delay(sc, 10); > @@ -1248,9 +1340,8 @@ run_set_region_4(struct run_softc *sc, u > return (error); > } >=20 > -/* Read 16-bit from eFUSE ROM (RT3070 only.) */ > static int > -run_efuse_read_2(struct run_softc *sc, uint16_t addr, uint16_t *val) > +run_efuse_read(struct run_softc *sc, uint16_t addr, uint16_t *val, = int count) > { > uint32_t tmp; > uint16_t reg; > @@ -1259,7 +1350,8 @@ run_efuse_read_2(struct run_softc *sc, u > if ((error =3D run_read(sc, RT3070_EFUSE_CTRL, &tmp)) !=3D 0) > return (error); >=20 > - addr *=3D 2; > + if (count =3D=3D 2) > + addr *=3D 2; > /*- > * Read one 16-byte block into registers EFUSE_DATA[0-3]: > * DATA0: F E D C > @@ -1289,10 +1381,19 @@ run_efuse_read_2(struct run_softc *sc, u > if ((error =3D run_read(sc, reg, &tmp)) !=3D 0) > return (error); >=20 > - *val =3D (addr & 2) ? tmp >> 16 : tmp & 0xffff; > + tmp >>=3D (8 * (addr & 0x3)); > + *val =3D (addr & 1) ? tmp >> 16 : tmp & 0xffff; > + > return (0); > } >=20 > +/* Read 16-bit from eFUSE ROM for RT3xxx. */ > +static int > +run_efuse_read_2(struct run_softc *sc, uint16_t addr, uint16_t *val) > +{ > + return (run_efuse_read(sc, addr, val, 2)); > +} > + > static int > run_eeprom_read_2(struct run_softc *sc, uint16_t addr, uint16_t *val) > { > @@ -1305,7 +1406,7 @@ run_eeprom_read_2(struct run_softc *sc,=20 > req.bRequest =3D RT2870_EEPROM_READ; > USETW(req.wValue, 0); > USETW(req.wIndex, addr); > - USETW(req.wLength, sizeof tmp); > + USETW(req.wLength, sizeof(tmp)); >=20 > error =3D usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, &tmp); > if (error =3D=3D 0) > @@ -1500,6 +1601,7 @@ run_get_rf(uint16_t rev) > case RT3070_RF_3021: return "RT3021"; > case RT3070_RF_3022: return "RT3022"; > case RT3070_RF_3052: return "RT3052"; > + case RT3593_RF_3053: return "RT3053"; > case RT5592_RF_5592: return "RT5592"; > case RT5390_RF_5370: return "RT5370"; > case RT5390_RF_5372: return "RT5372"; > @@ -1507,6 +1609,125 @@ run_get_rf(uint16_t rev) > return ("unknown"); > } >=20 > +static void > +run_rt3593_get_txpower(struct run_softc *sc) > +{ > + uint16_t addr, val; > + int i; > + > + /* Read power settings for 2GHz channels. */ > + for (i =3D 0; i < 14; i +=3D 2) { > + addr =3D (sc->ntxchains =3D=3D 3) ? = RT3593_EEPROM_PWR2GHZ_BASE1 : > + RT2860_EEPROM_PWR2GHZ_BASE1; > + run_srom_read(sc, addr + i / 2, &val); > + sc->txpow1[i + 0] =3D (int8_t)(val & 0xff); > + sc->txpow1[i + 1] =3D (int8_t)(val >> 8); > + > + addr =3D (sc->ntxchains =3D=3D 3) ? = RT3593_EEPROM_PWR2GHZ_BASE2 : > + RT2860_EEPROM_PWR2GHZ_BASE2; > + run_srom_read(sc, addr + i / 2, &val); > + sc->txpow2[i + 0] =3D (int8_t)(val & 0xff); > + sc->txpow2[i + 1] =3D (int8_t)(val >> 8); > + > + if (sc->ntxchains =3D=3D 3) { > + run_srom_read(sc, RT3593_EEPROM_PWR2GHZ_BASE3 + = i / 2, > + &val); > + sc->txpow3[i + 0] =3D (int8_t)(val & 0xff); > + sc->txpow3[i + 1] =3D (int8_t)(val >> 8); > + } > + } > + /* Fix broken Tx power entries. */ > + for (i =3D 0; i < 14; i++) { > + if (sc->txpow1[i] > 31) > + sc->txpow1[i] =3D 5; > + if (sc->txpow2[i] > 31) > + sc->txpow2[i] =3D 5; > + if (sc->ntxchains =3D=3D 3) { > + if (sc->txpow3[i] > 31) > + sc->txpow3[i] =3D 5; > + } > + } > + /* Read power settings for 5GHz channels. */ > + for (i =3D 0; i < 40; i +=3D 2) { > + run_srom_read(sc, RT3593_EEPROM_PWR5GHZ_BASE1 + i / 2, = &val); > + sc->txpow1[i + 14] =3D (int8_t)(val & 0xff); > + sc->txpow1[i + 15] =3D (int8_t)(val >> 8); > + > + run_srom_read(sc, RT3593_EEPROM_PWR5GHZ_BASE2 + i / 2, = &val); > + sc->txpow2[i + 14] =3D (int8_t)(val & 0xff); > + sc->txpow2[i + 15] =3D (int8_t)(val >> 8); > + > + if (sc->ntxchains =3D=3D 3) { > + run_srom_read(sc, RT3593_EEPROM_PWR5GHZ_BASE3 + = i / 2, > + &val); > + sc->txpow3[i + 14] =3D (int8_t)(val & 0xff); > + sc->txpow3[i + 15] =3D (int8_t)(val >> 8); > + } > + } > +} > + > +static void > +run_get_txpower(struct run_softc *sc) > +{ > + uint16_t val; > + int i; > + > + /* Read power settings for 2GHz channels. */ > + for (i =3D 0; i < 14; i +=3D 2) { > + run_srom_read(sc, RT2860_EEPROM_PWR2GHZ_BASE1 + i / 2, = &val); > + sc->txpow1[i + 0] =3D (int8_t)(val & 0xff); > + sc->txpow1[i + 1] =3D (int8_t)(val >> 8); > + > + if (sc->mac_ver !=3D 0x5390) { > + run_srom_read(sc, > + RT2860_EEPROM_PWR2GHZ_BASE2 + i / 2, &val); > + sc->txpow2[i + 0] =3D (int8_t)(val & 0xff); > + sc->txpow2[i + 1] =3D (int8_t)(val >> 8); > + } > + } > + /* Fix broken Tx power entries. */ > + for (i =3D 0; i < 14; i++) { > + if (sc->mac_ver >=3D 0x5390) { > + if (sc->txpow1[i] < 0 || sc->txpow1[i] > 27) > + sc->txpow1[i] =3D 5; > + } else { > + if (sc->txpow1[i] < 0 || sc->txpow1[i] > 31) > + sc->txpow1[i] =3D 5; > + } > + if (sc->mac_ver > 0x5390) { > + if (sc->txpow2[i] < 0 || sc->txpow2[i] > 27) > + sc->txpow2[i] =3D 5; > + } else if (sc->mac_ver < 0x5390) { > + if (sc->txpow2[i] < 0 || sc->txpow2[i] > 31) > + sc->txpow2[i] =3D 5; > + } > + DPRINTF("chan %d: power1=3D%d, power2=3D%d\n", > + rt2860_rf2850[i].chan, sc->txpow1[i], = sc->txpow2[i]); > + } > + /* Read power settings for 5GHz channels. */ > + for (i =3D 0; i < 40; i +=3D 2) { > + run_srom_read(sc, RT2860_EEPROM_PWR5GHZ_BASE1 + i / 2, = &val); > + sc->txpow1[i + 14] =3D (int8_t)(val & 0xff); > + sc->txpow1[i + 15] =3D (int8_t)(val >> 8); > + > + run_srom_read(sc, RT2860_EEPROM_PWR5GHZ_BASE2 + i / 2, = &val); > + sc->txpow2[i + 14] =3D (int8_t)(val & 0xff); > + sc->txpow2[i + 15] =3D (int8_t)(val >> 8); > + } > + /* Fix broken Tx power entries. */ > + for (i =3D 0; i < 40; i++ ) { > + if (sc->mac_ver !=3D 0x5592) { > + if (sc->txpow1[14 + i] < -7 || sc->txpow1[14 + = i] > 15) > + sc->txpow1[14 + i] =3D 5; > + if (sc->txpow2[14 + i] < -7 || sc->txpow2[14 + = i] > 15) > + sc->txpow2[14 + i] =3D 5; > + } > + DPRINTF("chan %d: power1=3D%d, power2=3D%d\n", > + rt2860_rf2850[14 + i].chan, sc->txpow1[14 + i], > + sc->txpow2[14 + i]); > + } > +} > + > static int > run_read_eeprom(struct run_softc *sc) > { > @@ -1520,7 +1741,7 @@ run_read_eeprom(struct run_softc *sc) > if (sc->mac_ver >=3D 0x3070) { > run_read(sc, RT3070_EFUSE_CTRL, &tmp); > DPRINTF("EFUSE_CTRL=3D0x%08x\n", tmp); > - if (tmp & RT3070_SEL_EFUSE) > + if ((tmp & RT3070_SEL_EFUSE) || sc->mac_ver =3D=3D = 0x3593) > sc->sc_srom_read =3D run_efuse_read_2; > } >=20 > @@ -1539,7 +1760,7 @@ run_read_eeprom(struct run_softc *sc) > sc->sc_bssid[4] =3D val & 0xff; > sc->sc_bssid[5] =3D val >> 8; >=20 > - if (sc->mac_ver < 0x5390) { > + if (sc->mac_ver < 0x3593) { > /* read vender BBP settings */ > for (i =3D 0; i < 10; i++) { > run_srom_read(sc, RT2860_EEPROM_BBP_BASE + i, = &val); > @@ -1562,16 +1783,22 @@ run_read_eeprom(struct run_softc *sc) > } >=20 > /* read RF frequency offset from EEPROM */ > - run_srom_read(sc, RT2860_EEPROM_FREQ_LEDS, &val); > + run_srom_read(sc, (sc->mac_ver !=3D 0x3593) ? = RT2860_EEPROM_FREQ_LEDS : > + RT3593_EEPROM_FREQ, &val); > sc->freq =3D ((val & 0xff) !=3D 0xff) ? val & 0xff : 0; > DPRINTF("EEPROM freq offset %d\n", sc->freq & 0xff); >=20 > + run_srom_read(sc, (sc->mac_ver !=3D 0x3593) ? = RT2860_EEPROM_FREQ_LEDS : > + RT3593_EEPROM_FREQ_LEDS, &val); > if (val >> 8 !=3D 0xff) { > /* read LEDs operating mode */ > sc->leds =3D val >> 8; > - run_srom_read(sc, RT2860_EEPROM_LED1, &sc->led[0]); > - run_srom_read(sc, RT2860_EEPROM_LED2, &sc->led[1]); > - run_srom_read(sc, RT2860_EEPROM_LED3, &sc->led[2]); > + run_srom_read(sc, (sc->mac_ver !=3D 0x3593) ? = RT2860_EEPROM_LED1 : > + RT3593_EEPROM_LED1, &sc->led[0]); > + run_srom_read(sc, (sc->mac_ver !=3D 0x3593) ? = RT2860_EEPROM_LED2 : > + RT3593_EEPROM_LED2, &sc->led[1]); > + run_srom_read(sc, (sc->mac_ver !=3D 0x3593) ? = RT2860_EEPROM_LED3 : > + RT3593_EEPROM_LED3, &sc->led[2]); > } else { > /* broken EEPROM, use default settings */ > sc->leds =3D 0x01; > @@ -1589,6 +1816,8 @@ run_read_eeprom(struct run_softc *sc) > run_srom_read(sc, RT2860_EEPROM_ANTENNA, &val); >=20 > if (val =3D=3D 0xffff) { > + device_printf(sc->sc_dev, > + "invalid EEPROM antenna info, using default\n"); > DPRINTF("invalid EEPROM antenna info, using default\n"); > if (sc->mac_ver =3D=3D 0x3572) { > /* default to RF3052 2T2R */ > @@ -1633,60 +1862,11 @@ run_read_eeprom(struct run_softc *sc) > sc->rfswitch =3D val & 1; > } >=20 > - /* read power settings for 2GHz channels */ > - for (i =3D 0; i < 14; i +=3D 2) { > - run_srom_read(sc, RT2860_EEPROM_PWR2GHZ_BASE1 + i / 2, = &val); > - sc->txpow1[i + 0] =3D (int8_t)(val & 0xff); > - sc->txpow1[i + 1] =3D (int8_t)(val >> 8); > - > - if (sc->mac_ver !=3D 0x5390) { > - run_srom_read(sc, > - RT2860_EEPROM_PWR2GHZ_BASE2 + i / 2, &val); > - sc->txpow2[i + 0] =3D (int8_t)(val & 0xff); > - sc->txpow2[i + 1] =3D (int8_t)(val >> 8); > - } > - } > - /* fix broken Tx power entries */ > - for (i =3D 0; i < 14; i++) { > - if (sc->mac_ver >=3D 0x5390) { > - if (sc->txpow1[i] < 0 || sc->txpow1[i] > 27) > - sc->txpow1[i] =3D 5; > - } else { > - if (sc->txpow1[i] < 0 || sc->txpow1[i] > 31) > - sc->txpow1[i] =3D 5; > - } > - if (sc->mac_ver > 0x5390) { > - if (sc->txpow2[i] < 0 || sc->txpow2[i] > 27) > - sc->txpow2[i] =3D 5; > - } else if (sc->mac_ver < 0x5390) { > - if (sc->txpow2[i] < 0 || sc->txpow2[i] > 31) > - sc->txpow2[i] =3D 5; > - } > - DPRINTF("chan %d: power1=3D%d, power2=3D%d\n", > - rt2860_rf2850[i].chan, sc->txpow1[i], = sc->txpow2[i]); > - } > - /* read power settings for 5GHz channels */ > - for (i =3D 0; i < 40; i +=3D 2) { > - run_srom_read(sc, RT2860_EEPROM_PWR5GHZ_BASE1 + i / 2, = &val); > - sc->txpow1[i + 14] =3D (int8_t)(val & 0xff); > - sc->txpow1[i + 15] =3D (int8_t)(val >> 8); > - > - run_srom_read(sc, RT2860_EEPROM_PWR5GHZ_BASE2 + i / 2, = &val); > - sc->txpow2[i + 14] =3D (int8_t)(val & 0xff); > - sc->txpow2[i + 15] =3D (int8_t)(val >> 8); > - } > - /* fix broken Tx power entries */ > - for (i =3D 0; i < 40; i++ ) { > - if (sc->mac_ver !=3D 0x5592) { > - if (sc->txpow1[14 + i] < -7 || sc->txpow1[14 + = i] > 15) > - sc->txpow1[14 + i] =3D 5; > - if (sc->txpow2[14 + i] < -7 || sc->txpow2[14 + = i] > 15) > - sc->txpow2[14 + i] =3D 5; > - } > - DPRINTF("chan %d: power1=3D%d, power2=3D%d\n", > - rt2860_rf2850[14 + i].chan, sc->txpow1[14 + i], > - sc->txpow2[14 + i]); > - } > + /* Read Tx power settings. */ > + if (sc->mac_ver =3D=3D 0x3593) > + run_rt3593_get_txpower(sc); > + else > + run_get_txpower(sc); >=20 > /* read Tx power compensation for each Tx rate */ > run_srom_read(sc, RT2860_EEPROM_DELTAPWR, &val); > @@ -1722,27 +1902,38 @@ run_read_eeprom(struct run_softc *sc) > sc->txpow40mhz_2ghz[ridx], = sc->txpow40mhz_5ghz[ridx]); > } >=20 > - /* read RSSI offsets and LNA gains from EEPROM */ > - run_srom_read(sc, RT2860_EEPROM_RSSI1_2GHZ, &val); > + /* Read RSSI offsets and LNA gains from EEPROM. */ > + run_srom_read(sc, (sc->mac_ver !=3D 0x3593) ? = RT2860_EEPROM_RSSI1_2GHZ : > + RT3593_EEPROM_RSSI1_2GHZ, &val); > sc->rssi_2ghz[0] =3D val & 0xff; /* Ant A */ > sc->rssi_2ghz[1] =3D val >> 8; /* Ant B */ > - run_srom_read(sc, RT2860_EEPROM_RSSI2_2GHZ, &val); > + run_srom_read(sc, (sc->mac_ver !=3D 0x3593) ? = RT2860_EEPROM_RSSI2_2GHZ : > + RT3593_EEPROM_RSSI2_2GHZ, &val); > if (sc->mac_ver >=3D 0x3070) { > - /* > - * On RT3070 chips (limited to 2 Rx chains), this ROM > - * field contains the Tx mixer gain for the 2GHz band. > - */ > - if ((val & 0xff) !=3D 0xff) > - sc->txmixgain_2ghz =3D val & 0x7; > + if (sc->mac_ver =3D=3D 0x3593) { > + sc->txmixgain_2ghz =3D 0; > + sc->rssi_2ghz[2] =3D val & 0xff; /* Ant C = */ > + } else { > + /* > + * On RT3070 chips (limited to 2 Rx chains), = this ROM > + * field contains the Tx mixer gain for the 2GHz = band. > + */ > + if ((val & 0xff) !=3D 0xff) > + sc->txmixgain_2ghz =3D val & 0x7; > + } > DPRINTF("tx mixer gain=3D%u (2GHz)\n", = sc->txmixgain_2ghz); > } else > sc->rssi_2ghz[2] =3D val & 0xff; /* Ant C */ > + if (sc->mac_ver =3D=3D 0x3593) > + run_srom_read(sc, RT3593_EEPROM_LNA_5GHZ, &val); > sc->lna[2] =3D val >> 8; /* channel group 2 */ >=20 > - run_srom_read(sc, RT2860_EEPROM_RSSI1_5GHZ, &val); > + run_srom_read(sc, (sc->mac_ver !=3D 0x3593) ? = RT2860_EEPROM_RSSI1_5GHZ : > + RT3593_EEPROM_RSSI1_5GHZ, &val); > sc->rssi_5ghz[0] =3D val & 0xff; /* Ant A */ > sc->rssi_5ghz[1] =3D val >> 8; /* Ant B */ > - run_srom_read(sc, RT2860_EEPROM_RSSI2_5GHZ, &val); > + run_srom_read(sc, (sc->mac_ver !=3D 0x3593) ? = RT2860_EEPROM_RSSI2_5GHZ : > + RT3593_EEPROM_RSSI2_5GHZ, &val); > if (sc->mac_ver =3D=3D 0x3572) { > /* > * On RT3572 chips (limited to 2 Rx chains), this ROM > @@ -1753,9 +1944,14 @@ run_read_eeprom(struct run_softc *sc) > DPRINTF("tx mixer gain=3D%u (5GHz)\n", = sc->txmixgain_5ghz); > } else > sc->rssi_5ghz[2] =3D val & 0xff; /* Ant C */ > + if (sc->mac_ver =3D=3D 0x3593) { > + sc->txmixgain_5ghz =3D 0; > + run_srom_read(sc, RT3593_EEPROM_LNA_5GHZ, &val); > + } > sc->lna[3] =3D val >> 8; /* channel group 3 */ >=20 > - run_srom_read(sc, RT2860_EEPROM_LNA, &val); > + run_srom_read(sc, (sc->mac_ver !=3D 0x3593) ? RT2860_EEPROM_LNA = : > + RT3593_EEPROM_LNA, &val); > sc->lna[0] =3D val & 0xff; /* channel group 0 */ > sc->lna[1] =3D val >> 8; /* channel group 1 */ >=20 > @@ -2570,9 +2766,11 @@ run_rx_frame(struct run_softc *sc, struc >=20 > rxwi =3D mtod(m, struct rt2860_rxwi *); > len =3D le16toh(rxwi->len) & 0xfff; > - rxwisize =3D (sc->mac_ver =3D=3D 0x5592) ? > - sizeof(struct rt2860_rxwi) + sizeof(uint64_t) : > - sizeof(struct rt2860_rxwi); > + rxwisize =3D sizeof(struct rt2860_rxwi); > + if (sc->mac_ver =3D=3D 0x5592) > + rxwisize +=3D sizeof(uint64_t); > + else if (sc->mac_ver =3D=3D 0x3593) > + rxwisize +=3D sizeof(uint32_t); > if (__predict_false(len > dmalen)) { > m_freem(m); > ifp->if_ierrors++; > @@ -2683,9 +2881,11 @@ run_bulk_rx_callback(struct usb_xfer *xf > uint16_t rxwisize; > int xferlen; >=20 > - rxwisize =3D (sc->mac_ver =3D=3D 0x5592) ? > - sizeof(struct rt2860_rxwi) + sizeof(uint64_t) : > - sizeof(struct rt2860_rxwi); > + rxwisize =3D sizeof(struct rt2860_rxwi); > + if (sc->mac_ver =3D=3D 0x5592) > + rxwisize +=3D sizeof(uint64_t); > + else if (sc->mac_ver =3D=3D 0x3593) > + rxwisize +=3D sizeof(uint32_t); >=20 > usbd_xfer_status(xfer, &xferlen, NULL, NULL, NULL); >=20 > @@ -2869,10 +3069,10 @@ tr_setup: > STAILQ_REMOVE_HEAD(&pq->tx_qh, next); >=20 > m =3D data->m; > - size =3D (sc->mac_ver =3D=3D 0x5592) ?=20 > - RUN_MAX_TXSZ + sizeof(uint32_t) : RUN_MAX_TXSZ; > + size =3D (sc->mac_ver =3D=3D 0x5592) ? > + sizeof(data->desc) + sizeof(uint32_t) : = sizeof(data->desc); > if ((m->m_pkthdr.len + > - sizeof(data->desc) + 3 + 8) > size) { > + size + 3 + 8) > RUN_MAX_TXSZ) { > DPRINTF("data overflow, %u bytes\n", > m->m_pkthdr.len); >=20 > @@ -2884,8 +3084,6 @@ tr_setup: > } >=20 > pc =3D usbd_xfer_get_frame(xfer, 0); > - size =3D (sc->mac_ver =3D=3D 0x5592) ? > - sizeof(data->desc) + sizeof(uint32_t) : = sizeof(data->desc); > usbd_copy_in(pc, 0, &data->desc, size); > usbd_m_copy_in(pc, size, m, 0, m->m_pkthdr.len); > size +=3D m->m_pkthdr.len; > @@ -3599,6 +3797,107 @@ run_ioctl(struct ifnet *ifp, u_long cmd, > } >=20 > static void > +run_iq_calib(struct run_softc *sc, u_int chan) > +{ > + uint16_t val; > + > + /* Tx0 IQ gain. */ > + run_bbp_write(sc, 158, 0x2c); > + if (chan <=3D 14) > + run_efuse_read(sc, RT5390_EEPROM_IQ_GAIN_CAL_TX0_2GHZ, = &val, 1); > + else if (chan <=3D 64) { > + run_efuse_read(sc, > + RT5390_EEPROM_IQ_GAIN_CAL_TX0_CH36_TO_CH64_5GHZ, > + &val, 1); > + } else if (chan <=3D 138) { > + run_efuse_read(sc, > + RT5390_EEPROM_IQ_GAIN_CAL_TX0_CH100_TO_CH138_5GHZ, > + &val, 1); > + } else if (chan <=3D 165) { > + run_efuse_read(sc, > + RT5390_EEPROM_IQ_GAIN_CAL_TX0_CH140_TO_CH165_5GHZ, > + &val, 1); > + } else > + val =3D 0; > + run_bbp_write(sc, 159, val); > + > + /* Tx0 IQ phase. */ > + run_bbp_write(sc, 158, 0x2d); > + if (chan <=3D 14) { > + run_efuse_read(sc, RT5390_EEPROM_IQ_PHASE_CAL_TX0_2GHZ, > + &val, 1); > + } else if (chan <=3D 64) { > + run_efuse_read(sc, > + RT5390_EEPROM_IQ_PHASE_CAL_TX0_CH36_TO_CH64_5GHZ, > + &val, 1); > + } else if (chan <=3D 138) { > + run_efuse_read(sc, > + RT5390_EEPROM_IQ_PHASE_CAL_TX0_CH100_TO_CH138_5GHZ, > + &val, 1); > + } else if (chan <=3D 165) { > + run_efuse_read(sc, > + RT5390_EEPROM_IQ_PHASE_CAL_TX0_CH140_TO_CH165_5GHZ, > + &val, 1); > + } else > + val =3D 0; > + run_bbp_write(sc, 159, val); > + > + /* Tx1 IQ gain. */ > + run_bbp_write(sc, 158, 0x4a); > + if (chan <=3D 14) { > + run_efuse_read(sc, RT5390_EEPROM_IQ_GAIN_CAL_TX1_2GHZ, > + &val, 1); > + } else if (chan <=3D 64) { > + run_efuse_read(sc, > + RT5390_EEPROM_IQ_GAIN_CAL_TX1_CH36_TO_CH64_5GHZ, > + &val, 1); > + } else if (chan <=3D 138) { > + run_efuse_read(sc, > + RT5390_EEPROM_IQ_GAIN_CAL_TX1_CH100_TO_CH138_5GHZ, > + &val, 1); > + } else if (chan <=3D 165) { > + run_efuse_read(sc, > + RT5390_EEPROM_IQ_GAIN_CAL_TX1_CH140_TO_CH165_5GHZ, > + &val, 1); > + } else > + val =3D 0; > + run_bbp_write(sc, 159, val); > + > + /* Tx1 IQ phase. */ > + run_bbp_write(sc, 158, 0x4b); > + if (chan <=3D 14) { > + run_efuse_read(sc, RT5390_EEPROM_IQ_PHASE_CAL_TX1_2GHZ, > + &val, 1); > + } else if (chan <=3D 64) { > + run_efuse_read(sc, > + RT5390_EEPROM_IQ_PHASE_CAL_TX1_CH36_TO_CH64_5GHZ, > + &val, 1); > + } else if (chan <=3D 138) { > + run_efuse_read(sc, > + RT5390_EEPROM_IQ_PHASE_CAL_TX1_CH100_TO_CH138_5GHZ, > + &val, 1); > + } else if (chan <=3D 165) { > + run_efuse_read(sc, > + RT5390_EEPROM_IQ_PHASE_CAL_TX1_CH140_TO_CH165_5GHZ, > + &val, 1); > + } else > + val =3D 0; > + run_bbp_write(sc, 159, val); > + > + /* RF IQ compensation control. */ > + run_bbp_write(sc, 158, 0x04); > + run_efuse_read(sc, RT5390_EEPROM_RF_IQ_COMPENSATION_CTL, > + &val, 1); > + run_bbp_write(sc, 159, val); > + > + /* RF IQ imbalance compensation control. */ > + run_bbp_write(sc, 158, 0x03); > + run_efuse_read(sc, > + RT5390_EEPROM_RF_IQ_IMBALANCE_COMPENSATION_CTL, &val, 1); > + run_bbp_write(sc, 159, val); > +} > + > +static void > run_set_agc(struct run_softc *sc, uint8_t agc) > { > uint8_t bbp; > @@ -3626,6 +3925,11 @@ run_select_chan_group(struct run_softc * > if (sc->mac_ver < 0x3572) > run_bbp_write(sc, 86, 0x00); >=20 > + if (sc->mac_ver =3D=3D 0x3593) { > + run_bbp_write(sc, 77, 0x98); > + run_bbp_write(sc, 83, (group =3D=3D 0) ? 0x8a : 0x9a); > + } > + > if (group =3D=3D 0) { > if (sc->ext_2ghz_lna) { > if (sc->mac_ver >=3D 0x5390) > @@ -3656,7 +3960,8 @@ run_select_chan_group(struct run_softc * > } else if (sc->mac_ver >=3D 0x5390) > run_bbp_write(sc, 75, 0x50); > else { > - run_bbp_write(sc, 82, 0x84); > + run_bbp_write(sc, 82, > + (sc->mac_ver =3D=3D 0x3593) ? 0x62 : = 0x84); > run_bbp_write(sc, 75, 0x50); > } > } > @@ -3682,7 +3987,8 @@ run_select_chan_group(struct run_softc * > } else if (sc->mac_ver =3D=3D 0x3572) > run_bbp_write(sc, 82, 0x94); > else > - run_bbp_write(sc, 82, 0xf2); > + run_bbp_write(sc, 82, > + (sc->mac_ver =3D=3D 0x3593) ? 0x82 : 0xf2); > if (sc->ext_5ghz_lna) > run_bbp_write(sc, 75, 0x46); > else=20 > @@ -3696,12 +4002,18 @@ run_select_chan_group(struct run_softc * >=20 > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** --=20 /"\ Best regards, | remko@FreeBSD.org \ / Remko Lodder | remko@EFnet X http://www.evilcoder.org/ | / \ ASCII Ribbon Campaign | Against HTML Mail and News --Apple-Mail=_24859574-6FB0-4CB4-AA44-F3209D12DD57 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQIcBAEBAgAGBQJS/2fYAAoJEKjD27JZ84ywadsP/1hG2jw8oIRDppgwoMOB88Ik 3aR9WBVWfaizrwyokyu1IGI9WQIDvyy3CpgSChZLbCxmkPRJ862KIGPa7s7oIh5x yAUDlt0hMCRj0/5xucE61+h4uYnFMaWqTzlze4m/hP010XXCajkc7Ce4IN50awst y1IPNxThMWg32cLT5dTY2ZB6h7ecUIO5B55baf4Nfen7crf0uUPaGtsHCR7BY9/J U9X/YWavcrC8ycf1gvNgo5Ph4DucI2kJk0fPnl3gUidBrTdGyN20QKHlEIMSTA1h JA5HBCzkj/SwJU4HYN8e+MyIAGQLvJmYdobh3SIXPkKXTrwIg1cbz8gyGSuxkwHA KLIXZO4UBiux/Qv+ETpc3snE6Hk/6i5MxWnwydw9MaZ08dM+Ng/YAf6qnTlkIqIF vWnqQFw+t8m124IqeCNzu0G8PqolF1VmYdwJpZeLheYF5wR7MumUNnLiNcH6uXyw nCU1i27+kqKdTOGTfTpChfKFLwXZ90uq10bZJjW/59o/fU096bqRO0lDVKBMnOyM 6y9j0gYR6mFGIC0HSOHk+LEu877AgYkCja246CJ/ygLz3kAExgsJ7UkhINkLt0Lq 8/fJg1Cc4nybCmFInEtGFY/o3NNov8f9a2rYRNF4Ocy1/J0+usqBVHFUJ4cSwCy4 zs0sJuKgULcPwMQ3tMvw =Qh57 -----END PGP SIGNATURE----- --Apple-Mail=_24859574-6FB0-4CB4-AA44-F3209D12DD57-- From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 13:17:52 2014 Return-Path: Delivered-To: svn-src-all@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 A98528FD; Sat, 15 Feb 2014 13:17: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 7C0EF1657; Sat, 15 Feb 2014 13:17:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1FDHq0x017618; Sat, 15 Feb 2014 13:17:52 GMT (envelope-from zbb@svn.freebsd.org) Received: (from zbb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1FDHq68017617; Sat, 15 Feb 2014 13:17:52 GMT (envelope-from zbb@svn.freebsd.org) Message-Id: <201402151317.s1FDHq68017617@svn.freebsd.org> From: Zbigniew Bodek Date: Sat, 15 Feb 2014 13:17:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261918 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 13:17:52 -0000 Author: zbb Date: Sat Feb 15 13:17:51 2014 New Revision: 261918 URL: http://svnweb.freebsd.org/changeset/base/261918 Log: Ensure proper TLB invalidation on superpage promotion and demotion on ARM Base pages within newly created superpage need to be invalidated so that new mapping is "visible" immediately after creation. Modified: head/sys/arm/arm/pmap-v6.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Sat Feb 15 13:13:00 2014 (r261917) +++ head/sys/arm/arm/pmap-v6.c Sat Feb 15 13:17:51 2014 (r261918) @@ -3854,6 +3854,24 @@ pmap_promote_section(pmap_t pmap, vm_off * Map the superpage. */ pmap_map_section(pmap, first_va, l2pte_pa(firstpte), prot, TRUE); + /* + * Invalidate all possible TLB mappings for small + * pages within the newly created superpage. + * Rely on the first PTE's attributes since they + * have to be consistent across all of the base pages + * within the superpage. If page is not executable it + * is at least referenced. + * The fastest way to do that is to invalidate whole + * TLB at once instead of executing 256 CP15 TLB + * invalidations by single entry. TLBs usually maintain + * several dozen entries so loss of unrelated entries is + * still a less agresive approach. + */ + if (L2_S_EXECUTABLE(firstpte)) + cpu_tlb_flushID(); + else + cpu_tlb_flushD(); + pmap_section_promotions++; CTR2(KTR_PMAP, "pmap_promote_section: success for va %#x" " in pmap %p", first_va, pmap); @@ -3889,7 +3907,7 @@ pmap_demote_section(pmap_t pmap, vm_offs struct l2_bucket *l2b; struct pv_entry *l1pdpve; struct md_page *pvh; - pd_entry_t *pl1pd, l1pd; + pd_entry_t *pl1pd, l1pd, newl1pd; pt_entry_t *firstptep, newpte; vm_offset_t pa; vm_page_t m; @@ -3969,9 +3987,14 @@ pmap_demote_section(pmap_t pmap, vm_offs pmap_pv_demote_section(pmap, va, pa); /* Now fix-up L1 */ - l1pd = l2b->l2b_phys | L1_C_DOM(pmap->pm_domain) | L1_C_PROTO; - *pl1pd = l1pd; + newl1pd = l2b->l2b_phys | L1_C_DOM(pmap->pm_domain) | L1_C_PROTO; + *pl1pd = newl1pd; PTE_SYNC(pl1pd); + /* Invalidate old TLB mapping */ + if (L1_S_EXECUTABLE(l1pd)) + cpu_tlb_flushID_SE(va); + else if (L1_S_REFERENCED(l1pd)) + cpu_tlb_flushD_SE(va); pmap_section_demotions++; CTR2(KTR_PMAP, "pmap_demote_section: success for va %#x" From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 13:20:18 2014 Return-Path: Delivered-To: svn-src-all@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 6408DA54; Sat, 15 Feb 2014 13:20: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 4FFD51667; Sat, 15 Feb 2014 13:20:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1FDKIqI017969; Sat, 15 Feb 2014 13:20:18 GMT (envelope-from zbb@svn.freebsd.org) Received: (from zbb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1FDKIM7017968; Sat, 15 Feb 2014 13:20:18 GMT (envelope-from zbb@svn.freebsd.org) Message-Id: <201402151320.s1FDKIM7017968@svn.freebsd.org> From: Zbigniew Bodek Date: Sat, 15 Feb 2014 13:20:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261919 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 13:20:18 -0000 Author: zbb Date: Sat Feb 15 13:20:17 2014 New Revision: 261919 URL: http://svnweb.freebsd.org/changeset/base/261919 Log: Fix superpage promotion on ARM with respect to RO/RW and wired attributes It was possible to create RW superpage mapping even if the base pages were RO due to wrong setting of the prot flag passed to pmap_map_section(). Promotion attempt should be canceled in case of attributes mismatch between any two base pages. Since we still use pv_flags to maintain permission to write (PVF_WRITE) and wired status (PVF_WIRED) for a page, it is also necessary to take those variables into account. Modified: head/sys/arm/arm/pmap-v6.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Sat Feb 15 13:17:51 2014 (r261918) +++ head/sys/arm/arm/pmap-v6.c Sat Feb 15 13:20:17 2014 (r261919) @@ -3794,10 +3794,13 @@ pmap_promote_section(pmap_t pmap, vm_off * we just configure protections for the section mapping * that is going to be created. */ - if (!L2_S_WRITABLE(firstpte) && (first_pve->pv_flags & PVF_WRITE)) { - first_pve->pv_flags &= ~PVF_WRITE; + if ((first_pve->pv_flags & PVF_WRITE) != 0) { + if (!L2_S_WRITABLE(firstpte)) { + first_pve->pv_flags &= ~PVF_WRITE; + prot &= ~VM_PROT_WRITE; + } + } else prot &= ~VM_PROT_WRITE; - } if (!L2_S_EXECUTABLE(firstpte)) prot &= ~VM_PROT_EXECUTE; @@ -3842,6 +3845,12 @@ pmap_promote_section(pmap_t pmap, vm_off if (!L2_S_WRITABLE(oldpte) && (pve->pv_flags & PVF_WRITE)) pve->pv_flags &= ~PVF_WRITE; + if (pve->pv_flags != first_pve->pv_flags) { + pmap_section_p_failures++; + CTR2(KTR_PMAP, "pmap_promote_section: failure for " + "va %#x in pmap %p", va, pmap); + return; + } old_va -= PAGE_SIZE; pa -= PAGE_SIZE; From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 13:22:37 2014 Return-Path: Delivered-To: svn-src-all@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 C4817C1C; Sat, 15 Feb 2014 13:22:37 +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 B115916D1; Sat, 15 Feb 2014 13:22:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1FDMbfR020909; Sat, 15 Feb 2014 13:22:37 GMT (envelope-from zbb@svn.freebsd.org) Received: (from zbb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1FDMb1X020908; Sat, 15 Feb 2014 13:22:37 GMT (envelope-from zbb@svn.freebsd.org) Message-Id: <201402151322.s1FDMb1X020908@svn.freebsd.org> From: Zbigniew Bodek Date: Sat, 15 Feb 2014 13:22:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261920 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 13:22:37 -0000 Author: zbb Date: Sat Feb 15 13:22:37 2014 New Revision: 261920 URL: http://svnweb.freebsd.org/changeset/base/261920 Log: Avoid redundant superpage promotion attempts on ARM Because pmap_enter_locked() is called from few different functions some redundancy in superpage promotion attempts can be observed. Hence, avoid promotion in pmap_enter_object() (if the object can be mapped by superpage it will be handled by pmap_enter_object() itself) and also do not waste time in pmap_enter_quick(). From now on the promotion will be performed only in pmap_enter(). Modified: head/sys/arm/arm/pmap-v6.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Sat Feb 15 13:20:17 2014 (r261919) +++ head/sys/arm/arm/pmap-v6.c Sat Feb 15 13:22:37 2014 (r261920) @@ -2924,10 +2924,21 @@ void pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m, vm_prot_t prot, boolean_t wired) { + struct l2_bucket *l2b; rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); pmap_enter_locked(pmap, va, access, m, prot, wired, M_WAITOK); + /* + * If both the l2b_occupancy and the reservation are fully + * populated, then attempt promotion. + */ + l2b = pmap_get_l2_bucket(pmap, va); + if ((l2b != NULL) && (l2b->l2b_occupancy == L2_PTE_NUM_TOTAL) && + sp_enabled && (m->flags & PG_FICTITIOUS) == 0 && + vm_reserv_level_iffullpop(m) == 0) + pmap_promote_section(pmap, va); + PMAP_UNLOCK(pmap); rw_wunlock(&pvh_global_lock); } @@ -3153,14 +3164,6 @@ validate: if ((pmap != pmap_kernel()) && (pmap == &curproc->p_vmspace->vm_pmap)) cpu_icache_sync_range(va, PAGE_SIZE); - /* - * If both the l2b_occupancy and the reservation are fully - * populated, then attempt promotion. - */ - if ((l2b->l2b_occupancy == L2_PTE_NUM_TOTAL) && - sp_enabled && (m->flags & PG_FICTITIOUS) == 0 && - vm_reserv_level_iffullpop(m) == 0) - pmap_promote_section(pmap, va); } /* From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 13:24:58 2014 Return-Path: Delivered-To: svn-src-all@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 9AA5AD8F; Sat, 15 Feb 2014 13:24:58 +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 85D2816E2; Sat, 15 Feb 2014 13:24:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1FDOwCc021167; Sat, 15 Feb 2014 13:24:58 GMT (envelope-from zbb@svn.freebsd.org) Received: (from zbb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1FDOwjq021166; Sat, 15 Feb 2014 13:24:58 GMT (envelope-from zbb@svn.freebsd.org) Message-Id: <201402151324.s1FDOwjq021166@svn.freebsd.org> From: Zbigniew Bodek Date: Sat, 15 Feb 2014 13:24:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261921 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 13:24:58 -0000 Author: zbb Date: Sat Feb 15 13:24:58 2014 New Revision: 261921 URL: http://svnweb.freebsd.org/changeset/base/261921 Log: Remove spurious assertion from pmap_extract_locked() on ARM The condition under assertion is no longer valid since superpages support is operating on section mappings. Modified: head/sys/arm/arm/pmap-v6.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Sat Feb 15 13:22:37 2014 (r261920) +++ head/sys/arm/arm/pmap-v6.c Sat Feb 15 13:24:58 2014 (r261921) @@ -3328,10 +3328,6 @@ pmap_extract_locked(pmap_t pmap, vm_offs l1idx = L1_IDX(va); l1pd = pmap->pm_l1->l1_kva[l1idx]; if (l1pte_section_p(l1pd)) { - /* - * These should only happen for the kernel pmap. - */ - KASSERT(pmap == kernel_pmap, ("unexpected section")); /* XXX: what to do about the bits > 32 ? */ if (l1pd & L1_S_SUPERSEC) pa = (l1pd & L1_SUP_FRAME) | (va & L1_SUP_OFFSET); From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 13:27:46 2014 Return-Path: Delivered-To: svn-src-all@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 015EF93; Sat, 15 Feb 2014 13:27: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 E11B416F9; Sat, 15 Feb 2014 13:27:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1FDRj5i021590; Sat, 15 Feb 2014 13:27:45 GMT (envelope-from zbb@svn.freebsd.org) Received: (from zbb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1FDRjED021589; Sat, 15 Feb 2014 13:27:45 GMT (envelope-from zbb@svn.freebsd.org) Message-Id: <201402151327.s1FDRjED021589@svn.freebsd.org> From: Zbigniew Bodek Date: Sat, 15 Feb 2014 13:27:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261922 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 13:27:46 -0000 Author: zbb Date: Sat Feb 15 13:27:45 2014 New Revision: 261922 URL: http://svnweb.freebsd.org/changeset/base/261922 Log: Handle pmap_enter() on already promoted mappings for ARMv6/v7 Attempt to demote the superpage if trying to pmap_enter() on one. Panic only when the particular superpage should no longer exist for that pmap and address. Modified: head/sys/arm/arm/pmap-v6.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Sat Feb 15 13:24:58 2014 (r261921) +++ head/sys/arm/arm/pmap-v6.c Sat Feb 15 13:27:45 2014 (r261922) @@ -2973,8 +2973,10 @@ pmap_enter_locked(pmap_t pmap, vm_offset } pl1pd = &pmap->pm_l1->l1_kva[L1_IDX(va)]; - if ((*pl1pd & L1_TYPE_MASK) == L1_S_PROTO) - panic("pmap_enter_locked: attempt pmap_enter_on 1MB page"); + if ((va < VM_MAXUSER_ADDRESS) && + (*pl1pd & L1_TYPE_MASK) == L1_S_PROTO) { + (void)pmap_demote_section(pmap, va); + } user = 0; /* @@ -3014,6 +3016,10 @@ do_l2b_alloc: } } + pl1pd = &pmap->pm_l1->l1_kva[L1_IDX(va)]; + if ((*pl1pd & L1_TYPE_MASK) == L1_S_PROTO) + panic("pmap_enter: attempt to enter on 1MB page, va: %#x", va); + ptep = &l2b->l2b_kva[l2pte_index(va)]; opte = *ptep; From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 14:50:47 2014 Return-Path: Delivered-To: svn-src-all@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 C5820C51; Sat, 15 Feb 2014 14:50: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 AF0751CB0; Sat, 15 Feb 2014 14:50:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1FEol48056675; Sat, 15 Feb 2014 14:50:47 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1FEolaV056357; Sat, 15 Feb 2014 14:50:47 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201402151450.s1FEolaV056357@svn.freebsd.org> From: Bryan Drewery Date: Sat, 15 Feb 2014 14:50:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261931 - in head/etc: defaults rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 14:50:47 -0000 Author: bdrewery Date: Sat Feb 15 14:50:47 2014 New Revision: 261931 URL: http://svnweb.freebsd.org/changeset/base/261931 Log: Allow overriding rctl.conf(5) file location for /etc/rc.d/rctl Reviewed by: trasz Approved by: bapt (mentor) MFC after: 1 week Modified: head/etc/defaults/rc.conf head/etc/rc.d/rctl Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Sat Feb 15 14:46:48 2014 (r261930) +++ head/etc/defaults/rc.conf Sat Feb 15 14:50:47 2014 (r261931) @@ -660,6 +660,10 @@ mixer_enable="YES" # Run the sound mixer opensm_enable="NO" # Opensm(8) for infiniband devices defaults to off casperd_enable="YES" # casperd(8) daemon +# rctl(8) requires kernel options RACCT and RCTL +rctl_enable="NO" # Load rctl(8) rules on boot +rctl_rules="/etc/rctl.conf" # rctl(8) ruleset. See rctl.conf(5). + ############################################################## ### Jail Configuration (see rc.conf(5) manual page) ########## ############################################################## Modified: head/etc/rc.d/rctl ============================================================================== --- head/etc/rc.d/rctl Sat Feb 15 14:46:48 2014 (r261930) +++ head/etc/rc.d/rctl Sat Feb 15 14:50:47 2014 (r261931) @@ -15,7 +15,7 @@ stop_cmd="rctl_stop" rctl_start() { - if [ -f /etc/rctl.conf ]; then + if [ -f ${rctl_rules} ]; then while read var comments do case ${var} in @@ -25,7 +25,7 @@ rctl_start() rctl -a "${var}" ;; esac - done < /etc/rctl.conf + done < ${rctl_rules} fi } From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 14:52:12 2014 Return-Path: Delivered-To: svn-src-all@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 ADFA4E7C; Sat, 15 Feb 2014 14:52:12 +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 9AE9A1D1C; Sat, 15 Feb 2014 14:52:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1FEqC2X058132; Sat, 15 Feb 2014 14:52:12 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1FEqC79058131; Sat, 15 Feb 2014 14:52:12 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201402151452.s1FEqC79058131@svn.freebsd.org> From: Bryan Drewery Date: Sat, 15 Feb 2014 14:52:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261932 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 14:52:12 -0000 Author: bdrewery Date: Sat Feb 15 14:52:12 2014 New Revision: 261932 URL: http://svnweb.freebsd.org/changeset/base/261932 Log: Add forgotten rc.conf(5) update with r261931 Reviewed by: trasz Approved by: bapt (mentor) MFC after: 1 week Modified: head/share/man/man5/rc.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Sat Feb 15 14:50:47 2014 (r261931) +++ head/share/man/man5/rc.conf.5 Sat Feb 15 14:52:12 2014 (r261932) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 13, 2014 +.Dd February 15, 2014 .Dt RC.CONF 5 .Os .Sh NAME @@ -4429,6 +4429,26 @@ interface if desired. Defines the total number of seconds to wait for link to become usable, polled at a 1-second interval. The default is 30. +.It Va rctl_enable +.Pq Vt bool +Set to +.Dq Li YES +to load +.Xr rctl 8 +rules from the defined ruleset. +The kernel must be built with +.Cd "options RACCT" +and +.Cd "options RCTL" . +.It Va rctl_rules +.Pq Vt str +Set to +.Pa /etc/rctl.conf +by default. +This variables contains the +.Xr rctl.conf 5 +ruleset to load for +.Xr rctl 8 . .El .Sh FILES .Bl -tag -width ".Pa /etc/defaults/rc.conf" -compact From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 14:55:36 2014 Return-Path: Delivered-To: svn-src-all@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 08A78FF3; Sat, 15 Feb 2014 14:55: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 E63841D34; Sat, 15 Feb 2014 14:55:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1FEtZcG058570; Sat, 15 Feb 2014 14:55:35 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1FEtZbP058569; Sat, 15 Feb 2014 14:55:35 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201402151455.s1FEtZbP058569@svn.freebsd.org> From: Kevin Lo Date: Sat, 15 Feb 2014 14:55:35 +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: r261933 - stable/9/sys/dev/usb/wlan X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 14:55:36 -0000 Author: kevlo Date: Sat Feb 15 14:55:35 2014 New Revision: 261933 URL: http://svnweb.freebsd.org/changeset/base/261933 Log: MFC r255238: Add support for DLINK DWA-127 Wireless Adapter. Modified: stable/9/sys/dev/usb/wlan/if_run.c (contents, props changed) Modified: stable/9/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_run.c Sat Feb 15 14:52:12 2014 (r261932) +++ stable/9/sys/dev/usb/wlan/if_run.c Sat Feb 15 14:55:35 2014 (r261933) @@ -176,6 +176,7 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(CYBERTAN, RT2870), RUN_DEV(DLINK, RT2870), RUN_DEV(DLINK, RT3072), + RUN_DEV(DLINK, DWA127), RUN_DEV(DLINK, DWA140B3), RUN_DEV(DLINK, DWA160B2), RUN_DEV(DLINK, DWA162), From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 14:56:51 2014 Return-Path: Delivered-To: svn-src-all@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 5974B286; Sat, 15 Feb 2014 14:56: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 436401D3F; Sat, 15 Feb 2014 14:56:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1FEup3X058919; Sat, 15 Feb 2014 14:56:51 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1FEup8X058918; Sat, 15 Feb 2014 14:56:51 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201402151456.s1FEup8X058918@svn.freebsd.org> From: Bryan Drewery Date: Sat, 15 Feb 2014 14:56:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261934 - head/usr.bin/rctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 14:56:51 -0000 Author: bdrewery Date: Sat Feb 15 14:56:50 2014 New Revision: 261934 URL: http://svnweb.freebsd.org/changeset/base/261934 Log: Rework rctl(8) manpage - Note that kernel options are required - Shift parameters around in SYNOPSIS to make it more clear that there are different modes - For all literal symbols such as 'process' or 'loginclass' or 'wallclock', etc, make them into bold symbols with .Sy - For each subject:subject-id:etc: use .Em to underline to make it more clear they relate to the rule syntax - Document how devd(8) support works - Move RSS warning to BUGS and replace RSS with 'memoryuse' since 'RSS' is not defined in the manpage - Add more examples around listing existing rules - Make rule syntax into a list to improve readability - Add a list of subjects and their corresponding subject-id same as RESOURCES/ACTIONS have lists - Note that rctl(8) takes affect on all current and future processes - Note that amount can take human numbers - Add reference to login.conf(5) in few places login class is mentioned Reviewed by: trasz Approved by: bapt (mentor) MFC after: 1 week Modified: head/usr.bin/rctl/rctl.8 Modified: head/usr.bin/rctl/rctl.8 ============================================================================== --- head/usr.bin/rctl/rctl.8 Sat Feb 15 14:55:35 2014 (r261933) +++ head/usr.bin/rctl/rctl.8 Sat Feb 15 14:56:50 2014 (r261934) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 3, 2012 +.Dd February 14, 2014 .Dt RCTL 8 .Os .Sh NAME @@ -40,17 +40,24 @@ .Fl a .Op Ar rule .Nm +.Fl l .Op Fl h .Op Fl n -.Fl l .Op Ar filter .Nm .Fl r .Op Ar filter .Nm -.Op Fl h .Fl u +.Op Fl h .Op Ar filter +.Pp +.Nm +requires the kernel to be compiled with: +.Bd -ragged -offset indent +.Cd "options RACCT" +.Cd "options RCTL" +.Ed .Sh DESCRIPTION When called without options, the .Nm @@ -77,8 +84,15 @@ Remove rules matching .Ar filter from the RCTL database. .It Fl u Ar filter -Display resource usage for a subject (process, user, login class -or jail) matching the +Display resource usage for a subject +.Po +.Sy process , +.Sy user , +.Sy loginclass +or +.Sy jail +.Pc +matching the .Ar filter . .It Fl h "Human-readable" output. @@ -87,24 +101,49 @@ Gigabyte, Terabyte and Petabyte. .It Fl n Display user IDs numerically rather than converting them to a user name. .El +.Pp +Modifying rules affects all currently running and future processes matching +the rule. .Sh RULE SYNTAX Syntax for a rule is subject:subject-id:resource:action=amount/per. .Pp -Subject defines the kind of entity the rule applies to. -It can be either process, user, login class, or jail. -.Pp -Subject ID identifies the subject. -It can be a process ID, user name, numerical user ID, login class name, +.Bl -tag -width "subject-id" -compact -offset indent +.It subject +defines the kind of entity the rule applies to. +It can be either +.Sy process , +.Sy user , +.Sy loginclass , +or +.Sy jail . +.It subject-id +identifies the +.Em subject . +It can be a process ID, user name, numerical user ID, login class name from +.Xr login.conf 5 , or jail name. -.Pp -Resource identifies the resource the rule controls. -.Pp -Action defines what will happen when a process exceeds the allowed amount. -.Pp -Amount defines how much of the resource a process can use before -the defined action triggers. -.Pp -The per field defines what entity the amount gets accounted for. +.It resource +identifies the resource the rule controls. +See the +.Sx RESOURCES +section below for details. +.It action +defines what will happen when a process exceeds the allowed +.Em amount . +See the +.Sx ACTIONS +section below for details. +.It amount +defines how much of the resource a process can use before +the defined +.Em action +triggers. +Resources which limit bytes may use prefixes from +.Xr expand_number 3 . +.It per +defines what entity the +.Em amount +gets accounted for. For example, rule "loginclass:users:vmem:deny=100M/process" means that each process of any user belonging to login class "users" may allocate up to 100MB of virtual memory. @@ -114,58 +153,86 @@ by all the processes of that user will n Rule "loginclass:users:vmem:deny=100M/loginclass" would mean that the sum of virtual memory allocated by all processes of all users belonging to that login class will not exceed 100MB. +.El .Pp -Valid rule has all those fields specified, except for the per, which defaults -to the value of subject. -.Pp -A filter is a rule for which one of more fields other than per is left empty. +A valid rule has all those fields specified, except for +.Em per , +which defaults +to the value of +.Em subject . +.Pp +A filter is a rule for which one of more fields other than +.Em per +is left empty. For example, a filter that matches every rule could be written as ":::=/", or, in short, ":". A filter that matches all the login classes would be "loginclass:". -A filter that matches all defined rules for maxproc resource would be +A filter that matches all defined rules for +.Sy maxproc +resource would be "::maxproc". +.Sh SUBJECTS +.Bl -column -offset 3n "pseudoterminals" ".Sy username or numerical User ID" +.It Em subject Ta Em subject-id +.It Sy process Ta numerical Process ID +.It Sy user Ta user name or numerical User ID +.It Sy loginclass Ta login class from +.Xr login.conf 5 +.It Sy jail Ta jail name +.El .Sh RESOURCES .Bl -column -offset 3n "pseudoterminals" -.It cputime Ta "CPU time, in seconds" -.It datasize Ta "data size, in bytes" -.It stacksize Ta "stack size, in bytes" -.It coredumpsize Ta "core dump size, in bytes" -.It memoryuse Ta "resident set size, in bytes" -.It memorylocked Ta "locked memory, in bytes" -.It maxproc Ta "number of processes" -.It openfiles Ta "file descriptor table size" -.It vmemoryuse Ta "address space limit, in bytes" -.It pseudoterminals Ta "number of PTYs" -.It swapuse Ta "swap usage, in bytes" -.It nthr Ta "number of threads" -.It msgqqueued Ta "number of queued SysV messages" -.It msgqsize Ta "SysV message queue size, in bytes" -.It nmsgq Ta "number of SysV message queues" -.It nsem Ta "number of SysV semaphores" -.It nsemop Ta "number of SysV semaphores modified in a single semop(2) call" -.It nshm Ta "number of SysV shared memory segments" -.It shmsize Ta "SysV shared memory size, in bytes" -.It wallclock Ta "wallclock time, in seconds" -.It pcpu Ta "%CPU, in percents of a single CPU core" +.It Em resource +.It Sy cputime Ta "CPU time, in seconds" +.It Sy datasize Ta "data size, in bytes" +.It Sy stacksize Ta "stack size, in bytes" +.It Sy coredumpsize Ta "core dump size, in bytes" +.It Sy memoryuse Ta "resident set size, in bytes" +.It Sy memorylocked Ta "locked memory, in bytes" +.It Sy maxproc Ta "number of processes" +.It Sy openfiles Ta "file descriptor table size" +.It Sy vmemoryuse Ta "address space limit, in bytes" +.It Sy pseudoterminals Ta "number of PTYs" +.It Sy swapuse Ta "swap usage, in bytes" +.It Sy nthr Ta "number of threads" +.It Sy msgqqueued Ta "number of queued SysV messages" +.It Sy msgqsize Ta "SysV message queue size, in bytes" +.It Sy nmsgq Ta "number of SysV message queues" +.It Sy nsem Ta "number of SysV semaphores" +.It Sy nsemop Ta "number of SysV semaphores modified in a single semop(2) call" +.It Sy nshm Ta "number of SysV shared memory segments" +.It Sy shmsize Ta "SysV shared memory size, in bytes" +.It Sy wallclock Ta "wallclock time, in seconds" +.It Sy pcpu Ta "%CPU, in percents of a single CPU core" .El .Sh ACTIONS .Bl -column -offset 3n "pseudoterminals" -.It deny Ta "deny the allocation; not supported for cpu and wallclock" -.It log Ta "log a warning to the console" -.It devctl Ta "send notification to" +.It Em action +.It Sy deny Ta deny the allocation; not supported for +.Sy cpu +and +.Sy wallclock +.It Sy log Ta "log a warning to the console" +.It Sy devctl Ta "send notification to" .Xr devd 8 -.It "sig* e.g. sigterm; send a signal to the offending process" -.El -.Pp +using +.Sy system += "RCTL", +.Sy subsystem += "rule", +.Sy type += "matched" +.It sig* e.g. +.Sy sigterm ; +send a signal to the offending process. See .Xr signal 3 -for a list of supported signals. +for a list of supported signals +.El .Pp Not all actions are supported for all resources. -Attempt to add rule with action not supported by a given resource will result -in error. -.Pp -Note that limiting RSS may kill the machine due to thrashing. +Attempting to add a rule with an action not supported by a given resource will +result in error. .Sh EXIT STATUS .Ex -std .Sh EXAMPLES @@ -180,6 +247,15 @@ Display resource usage information for j .Pp Display all the rules applicable to process with PID 512: .Dl Nm Fl l Ar process:512 +.Pp +Display all rules: +.Dl Nm +.Pp +Display all rules matching user "joe": +.Dl Nm Ar user:joe +.Pp +Display all rules matching login classes: +.Dl Nm Ar loginclass: .Sh SEE ALSO .Xr rctl.conf 5 .Sh HISTORY @@ -193,3 +269,7 @@ The .Nm command was written by .An Edward Tomasz Napierala Aq trasz@FreeBSD.org . +.Sh BUGS +Limiting +.Sy memoryuse +may kill the machine due to thrashing. From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 16:22:52 2014 Return-Path: Delivered-To: svn-src-all@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 53AB93B1; Sat, 15 Feb 2014 16:22: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 3E34614BD; Sat, 15 Feb 2014 16:22:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1FGMqaT095602; Sat, 15 Feb 2014 16:22:52 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1FGMqVT095601; Sat, 15 Feb 2014 16:22:52 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201402151622.s1FGMqVT095601@svn.freebsd.org> From: Gleb Smirnoff Date: Sat, 15 Feb 2014 16:22:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261937 - head/sbin/pfctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 16:22:52 -0000 Author: glebius Date: Sat Feb 15 16:22:51 2014 New Revision: 261937 URL: http://svnweb.freebsd.org/changeset/base/261937 Log: Better build fix. Modified: head/sbin/pfctl/pfctl.c Modified: head/sbin/pfctl/pfctl.c ============================================================================== --- head/sbin/pfctl/pfctl.c Sat Feb 15 16:19:31 2014 (r261936) +++ head/sbin/pfctl/pfctl.c Sat Feb 15 16:22:51 2014 (r261937) @@ -792,17 +792,18 @@ pfctl_print_rule_counters(struct pf_rule } if (opts & PF_OPT_VERBOSE) { printf(" [ Evaluations: %-8llu Packets: %-8llu " - "Bytes: %-10llu States: %-6ju]\n", + "Bytes: %-10llu States: %-6"PRIuPTR"]\n", (unsigned long long)rule->evaluations, (unsigned long long)(rule->packets[0] + rule->packets[1]), (unsigned long long)(rule->bytes[0] + - rule->bytes[1]), (uintmax_t)rule->states_cur); + rule->bytes[1]), + (uintptr_t)rule->states_cur); if (!(opts & PF_OPT_DEBUG)) printf(" [ Inserted: uid %u pid %u " - "State Creations: %-6ju]\n", + "State Creations: %-6"PRIuPTR"]\n", (unsigned)rule->cuid, (unsigned)rule->cpid, - (uintmax_t)rule->states_tot); + (uintptr_t)rule->states_tot); } } @@ -904,7 +905,7 @@ pfctl_show_rules(int dev, char *path, in case PFCTL_SHOW_LABELS: if (pr.rule.label[0]) { printf("%s %llu %llu %llu %llu" - " %llu %llu %llu %llu\n", + " %llu %llu %llu %"PRIuPTR"\n", pr.rule.label, (unsigned long long)pr.rule.evaluations, (unsigned long long)(pr.rule.packets[0] + @@ -915,7 +916,7 @@ pfctl_show_rules(int dev, char *path, in (unsigned long long)pr.rule.bytes[0], (unsigned long long)pr.rule.packets[1], (unsigned long long)pr.rule.bytes[1], - (unsigned long long)pr.rule.states_tot); + (uintptr_t)pr.rule.states_tot); } break; case PFCTL_SHOW_RULES: From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 17:20:01 2014 Return-Path: Delivered-To: svn-src-all@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 94D786E6; Sat, 15 Feb 2014 17:20:01 +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 6DAF5189C; Sat, 15 Feb 2014 17:20:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1FHJuTM018157; Sat, 15 Feb 2014 17:20:01 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1FHJtxT018152; Sat, 15 Feb 2014 17:19:55 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402151719.s1FHJtxT018152@svn.freebsd.org> From: Ian Lepore Date: Sat, 15 Feb 2014 17:19:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261938 - in head/sys: arm/freescale/imx boot/fdt/dts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 17:20:01 -0000 Author: ian Date: Sat Feb 15 17:19:55 2014 New Revision: 261938 URL: http://svnweb.freebsd.org/changeset/base/261938 Log: Add a driver to provide access to imx6 on-chip one-time-programmble data. Submitted by: Steven Lawrance Added: head/sys/arm/freescale/imx/imx6_ocotp.c (contents, props changed) head/sys/arm/freescale/imx/imx6_ocotpreg.h (contents, props changed) head/sys/arm/freescale/imx/imx6_ocotpvar.h (contents, props changed) Modified: head/sys/arm/freescale/imx/files.imx6 head/sys/boot/fdt/dts/imx6.dtsi Modified: head/sys/arm/freescale/imx/files.imx6 ============================================================================== --- head/sys/arm/freescale/imx/files.imx6 Sat Feb 15 16:22:51 2014 (r261937) +++ head/sys/arm/freescale/imx/files.imx6 Sat Feb 15 17:19:55 2014 (r261938) @@ -22,6 +22,8 @@ arm/freescale/imx/imx6_anatop.c standar arm/freescale/imx/imx6_ccm.c standard arm/freescale/imx/imx6_machdep.c standard arm/freescale/imx/imx6_pl310.c standard +arm/freescale/imx/imx6_ocotp.c standard +arm/freescale/imx/imx6_tempmon.c standard arm/freescale/imx/imx_machdep.c standard arm/freescale/imx/imx_gpt.c standard Added: head/sys/arm/freescale/imx/imx6_ocotp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/freescale/imx/imx6_ocotp.c Sat Feb 15 17:19:55 2014 (r261938) @@ -0,0 +1,155 @@ +/*- + * Copyright (c) 2014 Steven Lawrance + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * Access to the Freescale i.MX6 On-Chip One-Time-Programmable Memory + */ + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include +#include +#include + +struct ocotp_softc { + device_t dev; + struct resource *mem_res; +}; + +static struct ocotp_softc *ocotp_sc; + +static inline uint32_t +RD4(struct ocotp_softc *sc, bus_size_t off) +{ + return (bus_read_4(sc->mem_res, off)); +} + + +static int +ocotp_detach(device_t dev) +{ + struct ocotp_softc *sc; + + sc = device_get_softc(dev); + + if (sc->mem_res != NULL) + bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->mem_res); + + ocotp_sc = NULL; + + return (0); +} + +static int +ocotp_attach(device_t dev) +{ + struct ocotp_softc *sc; + int err, rid; + + sc = device_get_softc(dev); + sc->dev = dev; + + /* Allocate bus_space resources. */ + rid = 0; + sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (sc->mem_res == NULL) { + device_printf(dev, "Cannot allocate memory resources\n"); + err = ENXIO; + goto out; + } + + ocotp_sc = sc; + err = 0; + +out: + if (err != 0) + ocotp_detach(dev); + + return (err); +} + +static int +ocotp_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_is_compatible(dev, "fsl,imx6q-ocotp") == 0) + return (ENXIO); + + device_set_desc(dev, + "Freescale i.MX6 On-Chip One-Time-Programmable Memory"); + + return (BUS_PROBE_DEFAULT); +} + +uint32_t +imx6_ocotp_read_4(bus_size_t off) +{ + + if (ocotp_sc == NULL) + panic("imx6_ocotp_read_4: softc not set!"); + + if (off > IMX6_OCOTP_LAST_REG) + panic("imx6_ocotp_read_4: offset out of range"); + + return (RD4(ocotp_sc, off)); +} + +static device_method_t ocotp_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, ocotp_probe), + DEVMETHOD(device_attach, ocotp_attach), + DEVMETHOD(device_detach, ocotp_detach), + + DEVMETHOD_END +}; + +static driver_t ocotp_driver = { + "ocotp", + ocotp_methods, + sizeof(struct ocotp_softc) +}; + +static devclass_t ocotp_devclass; + +DRIVER_MODULE(ocotp, simplebus, ocotp_driver, ocotp_devclass, 0, 0); + Added: head/sys/arm/freescale/imx/imx6_ocotpreg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/freescale/imx/imx6_ocotpreg.h Sat Feb 15 17:19:55 2014 (r261938) @@ -0,0 +1,81 @@ +/*- + * Copyright (c) 2014 Steven Lawrance + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef IMX6_OCOTPREG_H +#define IMX6_OCOTPREG_H + +#define IMX6_OCOTP_CTRL 0x000 +#define IMX6_OCOTP_CTRL_SET 0x004 +#define IMX6_OCOTP_CTRL_CLR 0x008 +#define IMX6_OCOTP_CTRL_TOG 0x00C +#define IMX6_OCOTP_TIMING 0x010 +#define IMX6_OCOTP_DATA 0x020 +#define IMX6_OCOTP_READ_CTRL 0x030 +#define IMX6_OCOTP_READ_FUSE_DATA 0x040 +#define IMX6_OCOTP_SW_STICKY 0x050 +#define IMX6_OCOTP_SCS 0x060 +#define IMX6_OCOTP_SCS_SET 0x064 +#define IMX6_OCOTP_SCS_CLR 0x068 +#define IMX6_OCOTP_SCS_TOG 0x06C +#define IMX6_OCOTP_VERSION 0x090 +#define IMX6_OCOTP_LOCK 0x400 +#define IMX6_OCOTP_CFG0 0x410 +#define IMX6_OCOTP_CFG1 0x420 +#define IMX6_OCOTP_CFG2 0x430 +#define IMX6_OCOTP_CFG3 0x440 +#define IMX6_OCOTP_CFG4 0x450 +#define IMX6_OCOTP_CFG5 0x460 +#define IMX6_OCOTP_CFG6 0x470 +#define IMX6_OCOTP_MEM0 0x480 +#define IMX6_OCOTP_MEM1 0x490 +#define IMX6_OCOTP_MEM2 0x4A0 +#define IMX6_OCOTP_MEM3 0x4B0 +#define IMX6_OCOTP_ANA0 0x4D0 +#define IMX6_OCOTP_ANA1 0x4E0 +#define IMX6_OCOTP_ANA2 0x4F0 +#define IMX6_OCOTP_SRK0 0x580 +#define IMX6_OCOTP_SRK1 0x590 +#define IMX6_OCOTP_SRK2 0x5A0 +#define IMX6_OCOTP_SRK3 0x5B0 +#define IMX6_OCOTP_SRK4 0x5C0 +#define IMX6_OCOTP_SRK5 0x5D0 +#define IMX6_OCOTP_SRK6 0x5E0 +#define IMX6_OCOTP_SRK7 0x5F0 +#define IMX6_OCOTP_HSJC_RESP0 0x600 +#define IMX6_OCOTP_HSJC_RESP1 0x610 +#define IMX6_OCOTP_MAC0 0x620 +#define IMX6_OCOTP_MAC1 0x630 +#define IMX6_OCOTP_GP1 0x660 +#define IMX6_OCOTP_GP2 0x670 +#define IMX6_OCOTP_MISC_CONF 0x6D0 +#define IMX6_OCOTP_FIELD_RETURN 0x6E0 +#define IMX6_OCOTP_SRK_REVOKE 0x6F0 + +#define IMX6_OCOTP_LAST_REG IMX6_OCOTP_SRK_REVOKE + +#endif Added: head/sys/arm/freescale/imx/imx6_ocotpvar.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/freescale/imx/imx6_ocotpvar.h Sat Feb 15 17:19:55 2014 (r261938) @@ -0,0 +1,34 @@ +/*- + * Copyright (c) 2014 Steven Lawrance + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef IMX6_OCOTPVAR_H +#define IMX6_OCOTPVAR_H + +uint32_t imx6_ocotp_read_4(bus_size_t _offset); + +#endif Modified: head/sys/boot/fdt/dts/imx6.dtsi ============================================================================== --- head/sys/boot/fdt/dts/imx6.dtsi Sat Feb 15 16:22:51 2014 (r261937) +++ head/sys/boot/fdt/dts/imx6.dtsi Sat Feb 15 17:19:55 2014 (r261938) @@ -337,6 +337,11 @@ bus-width = <0x4>; status ="disabled"; }; + + ocotp0: ocotp@021bc000 { + compatible = "fsl,imx6q-ocotp"; + reg = <0x021bc000 0x4000>; + } }; }; }; From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 17:23:51 2014 Return-Path: Delivered-To: svn-src-all@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 916D684A; Sat, 15 Feb 2014 17:23:51 +0000 (UTC) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 7A8281910; Sat, 15 Feb 2014 17:23:50 +0000 (UTC) Received: from c122-106-144-87.carlnfd1.nsw.optusnet.com.au (c122-106-144-87.carlnfd1.nsw.optusnet.com.au [122.106.144.87]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id 29492D4353F; Sun, 16 Feb 2014 04:03:43 +1100 (EST) Date: Sun, 16 Feb 2014 04:02:32 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dimitry Andric Subject: Re: svn commit: r261916 - head/sys/dev/xen/console In-Reply-To: <201402151237.s1FCbRnh000507@svn.freebsd.org> Message-ID: <20140216035823.I2978@besplex.bde.org> References: <201402151237.s1FCbRnh000507@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=HZAtEE08 c=1 sm=1 tr=0 a=p/w0leo876FR0WNmYI1KeA==:117 a=PO7r1zJSAAAA:8 a=3iJA4HwJju4A:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=FBIJrv5t4GUA:10 a=jGUZrl8DfiWc276YmdAA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 17:23:51 -0000 On Sat, 15 Feb 2014, Dimitry Andric wrote: > Log: > In sys/dev/xen/console/console.c, #if 0 an unused static function. > > MFC after: 3 days > > Modified: > head/sys/dev/xen/console/console.c > > Modified: head/sys/dev/xen/console/console.c > ============================================================================== > --- head/sys/dev/xen/console/console.c Sat Feb 15 12:25:01 2014 (r261915) > +++ head/sys/dev/xen/console/console.c Sat Feb 15 12:37:26 2014 (r261916) > @@ -356,6 +356,7 @@ xcclose(struct tty *tp) > xen_console_up = 0; > } > > +#if 0 > static inline int > __xencons_put_char(int ch) > { > @@ -365,6 +366,7 @@ __xencons_put_char(int ch) > wbuf[WBUF_MASK(wp++)] = _ch; > return 1; > } > +#endif > > static void Why? There are hundreds if not thousands of static inline functions in headers, and most of these functions are not always used, so there would be [hundreds if not thousands] * [number of #includes] compiler warnings if compilers warned about things like this. They could handle include files specially, but shouldn't. Bruce From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 17:55:35 2014 Return-Path: Delivered-To: svn-src-all@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 A24A5698; Sat, 15 Feb 2014 17:55:35 +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 8D4641B0D; Sat, 15 Feb 2014 17:55:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1FHtZ8Y033509; Sat, 15 Feb 2014 17:55:35 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1FHtZiQ033508; Sat, 15 Feb 2014 17:55:35 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402151755.s1FHtZiQ033508@svn.freebsd.org> From: Ian Lepore Date: Sat, 15 Feb 2014 17:55:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261939 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 17:55:35 -0000 Author: ian Date: Sat Feb 15 17:55:35 2014 New Revision: 261939 URL: http://svnweb.freebsd.org/changeset/base/261939 Log: Convert the "R1B fix" from a busy-loop in the interrupt handler to a callout. Modified: head/sys/arm/freescale/imx/imx_sdhci.c Modified: head/sys/arm/freescale/imx/imx_sdhci.c ============================================================================== --- head/sys/arm/freescale/imx/imx_sdhci.c Sat Feb 15 17:19:55 2014 (r261938) +++ head/sys/arm/freescale/imx/imx_sdhci.c Sat Feb 15 17:55:35 2014 (r261939) @@ -35,13 +35,18 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include #include +#include #include #include +#include #include #include #include +#include #include #include @@ -65,6 +70,8 @@ struct imx_sdhci_softc { struct resource * irq_res; void * intr_cookie; struct sdhci_slot slot; + struct callout r1bfix_callout; + sbintime_t r1bfix_timeout_at; uint32_t baseclk_hz; uint32_t sdclockreg_freq_bits; uint32_t cmd_and_mode; @@ -130,6 +137,8 @@ struct imx_sdhci_softc { #define SDHC_PROT_CDTL (1 << 6) #define SDHC_PROT_CDSS (1 << 7) +#define SDHC_INT_STATUS 0x30 + #define SDHC_CLK_IPGEN (1 << 0) #define SDHC_CLK_HCKEN (1 << 1) #define SDHC_CLK_PEREN (1 << 2) @@ -147,6 +156,7 @@ static struct ofw_compat_data compat_dat };; static void imx_sdhc_set_clock(struct imx_sdhci_softc *sc, int enable); +static void imx_sdhci_r1bfix_func(void *arg); static inline uint32_t RD4(struct imx_sdhci_softc *sc, bus_size_t off) @@ -532,46 +542,107 @@ imx_sdhc_set_clock(struct imx_sdhci_soft RD4(sc, SDHC_VEND_SPEC) | SDHC_VEND_FRC_SDCLK_ON); } +static boolean_t +imx_sdhci_r1bfix_is_wait_done(struct imx_sdhci_softc *sc) +{ + uint32_t inhibit; + + mtx_assert(&sc->slot.mtx, MA_OWNED); + + /* + * Check the DAT0 line status using both the DLA (data line active) and + * CDIHB (data inhibit) bits in the present state register. In theory + * just DLA should do the trick, but in practice it takes both. If the + * DAT0 line is still being held and we're not yet beyond the timeout + * point, just schedule another callout to check again later. + */ + inhibit = RD4(sc, SDHC_PRES_STATE) & (SDHC_PRES_DLA | SDHC_PRES_CDIHB); + + if (inhibit && getsbinuptime() < sc->r1bfix_timeout_at) { + callout_reset_sbt(&sc->r1bfix_callout, SBT_1MS, 0, + imx_sdhci_r1bfix_func, sc, 0); + return (false); + } + + /* + * If we reach this point with the inhibit bits still set, we've got a + * timeout, synthesize a DATA_TIMEOUT interrupt. Otherwise the DAT0 + * line has been released, and we synthesize a DATA_END, and if the type + * of fix needed was on a command-without-data we also now add in the + * original INT_RESPONSE that we suppressed earlier. + */ + if (inhibit) + sc->r1bfix_intmask |= SDHCI_INT_DATA_TIMEOUT; + else { + sc->r1bfix_intmask |= SDHCI_INT_DATA_END; + if (sc->r1bfix_type == R1BFIX_NODATA) + sc->r1bfix_intmask |= SDHCI_INT_RESPONSE; + } + + sc->r1bfix_type = R1BFIX_NONE; + return (true); +} + +static void +imx_sdhci_r1bfix_func(void * arg) +{ + struct imx_sdhci_softc *sc = arg; + boolean_t r1bwait_done; + + mtx_lock(&sc->slot.mtx); + r1bwait_done = imx_sdhci_r1bfix_is_wait_done(sc); + mtx_unlock(&sc->slot.mtx); + if (r1bwait_done) + sdhci_generic_intr(&sc->slot); +} + static void imx_sdhci_intr(void *arg) { struct imx_sdhci_softc *sc = arg; uint32_t intmask; - intmask = RD4(sc, SDHCI_INT_STATUS); + mtx_lock(&sc->slot.mtx); /* * Manually check the DAT0 line for R1B response types that the - * controller fails to handle properly. + * controller fails to handle properly. The controller asserts the done + * interrupt while the card is still asserting busy with the DAT0 line. * - * To do the NODATA fix, when the RESPONSE (COMMAND_COMPLETE) interrupt - * occurs, we have to wait for the DAT0 line to be released, then - * synthesize a DATA_END (TRANSFER_COMPLETE) interrupt, which we do by - * storing SDHCI_INT_DATA_END into a variable that gets ORed into the - * return value when the SDHCI_INT_STATUS register is read. + * We check DAT0 immediately because most of the time, especially on a + * read, the card will actually be done by time we get here. If it's + * not, then the wait_done routine will schedule a callout to re-check + * periodically until it is done. In that case we clear the interrupt + * out of the hardware now so that we can present it later when the DAT0 + * line is released. * - * For the AC12 fix, when the DATA_END interrupt occurs we wait for the - * DAT0 line to be released, and the waiting is all the fix we need. - */ - if ((sc->r1bfix_type == R1BFIX_NODATA && - (intmask & SDHCI_INT_RESPONSE)) || - (sc->r1bfix_type == R1BFIX_AC12 && - (intmask & SDHCI_INT_DATA_END))) { - uint32_t count; - count = 0; - /* XXX use a callout or something instead of busy-waiting. */ - while (count < 250000 && - (RD4(sc, SDHC_PRES_STATE) & SDHC_PRES_DLA)) { - ++count; - DELAY(1); + * If we need to wait for the the DAT0 line to be released, we set up a + * timeout point 250ms in the future. This number comes from the SD + * spec, which allows a command to take that long. In the real world, + * cards tend to take 10-20ms for a long-running command such as a write + * or erase that spans two pages. + */ + switch (sc->r1bfix_type) { + case R1BFIX_NODATA: + intmask = RD4(sc, SDHC_INT_STATUS) & SDHCI_INT_RESPONSE; + break; + case R1BFIX_AC12: + intmask = RD4(sc, SDHC_INT_STATUS) & SDHCI_INT_DATA_END; + break; + default: + intmask = 0; + break; + } + if (intmask) { + sc->r1bfix_timeout_at = getsbinuptime() + 250 * SBT_1MS; + if (!imx_sdhci_r1bfix_is_wait_done(sc)) { + WR4(sc, SDHC_INT_STATUS, intmask); + bus_barrier(sc->mem_res, SDHC_INT_STATUS, 4, + BUS_SPACE_BARRIER_WRITE); } - if (count >= 250000) - sc->r1bfix_intmask = SDHCI_INT_DATA_TIMEOUT; - else if (sc->r1bfix_type == R1BFIX_NODATA) - sc->r1bfix_intmask = SDHCI_INT_DATA_END; - sc->r1bfix_type = R1BFIX_NONE; } + mtx_unlock(&sc->slot.mtx); sdhci_generic_intr(&sc->slot); } @@ -660,6 +731,7 @@ imx_sdhci_attach(device_t dev) } sdhci_init_slot(dev, &sc->slot, 0); + callout_init(&sc->r1bfix_callout, true); /* * If the slot is flagged with the non-removable property, set our flag @@ -670,7 +742,7 @@ imx_sdhci_attach(device_t dev) * We don't have gpio support yet. If there's a cd-gpios property just * force the SDHCI_CARD_PRESENT bit on for now. If there isn't really a * card there it will fail to probe at the mmc layer and nothing bad - * happens except instantiating a /dev/mmcN device for an empty slot. + * happens except instantiating an mmcN device for an empty slot. */ node = ofw_bus_get_node(dev); if (OF_hasprop(node, "non-removable")) From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 17:59:33 2014 Return-Path: Delivered-To: svn-src-all@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 8AD47A84; Sat, 15 Feb 2014 17:59: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 7736E1B1F; Sat, 15 Feb 2014 17:59:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1FHxX85034121; Sat, 15 Feb 2014 17:59:33 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1FHxXNH034120; Sat, 15 Feb 2014 17:59:33 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402151759.s1FHxXNH034120@svn.freebsd.org> From: Ian Lepore Date: Sat, 15 Feb 2014 17:59:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261940 - head/sys/dev/sdhci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 17:59:33 -0000 Author: ian Date: Sat Feb 15 17:59:32 2014 New Revision: 261940 URL: http://svnweb.freebsd.org/changeset/base/261940 Log: Increase the wait time for acquiring the bus from 10 to 250ms. Normally it never needs to wait here at all; waiting is done at the end of the prior command. When doing a crash dump, the normal interrupt mechanism isn't used; instead the interrupt handler is called repeatedly in a polling-like manner. This can subvert hardware-specific drivers and lead to trying to start a new command while the previous command is still busy on the bus. Since the SD spec says the longest a card can take to execute any command is 250ms, use that as a timeout. Modified: head/sys/dev/sdhci/sdhci.c Modified: head/sys/dev/sdhci/sdhci.c ============================================================================== --- head/sys/dev/sdhci/sdhci.c Sat Feb 15 17:55:35 2014 (r261939) +++ head/sys/dev/sdhci/sdhci.c Sat Feb 15 17:59:32 2014 (r261940) @@ -767,8 +767,17 @@ sdhci_start_command(struct sdhci_slot *s /* We shouldn't wait for DAT for stop commands. */ if (cmd == slot->req->stop) mask &= ~SDHCI_DAT_INHIBIT; - /* Wait for bus no more then 10 ms. */ - timeout = 10; + /* + * Wait for bus no more then 250 ms. Typically there will be no wait + * here at all, but when writing a crash dump we may be bypassing the + * host platform's interrupt handler, and in some cases that handler + * may be working around hardware quirks such as not respecting r1b + * busy indications. In those cases, this wait-loop serves the purpose + * of waiting for the prior command and data transfers to be done, and + * SD cards are allowed to take up to 250ms for write and erase ops. + * (It's usually more like 20-30ms in the real world.) + */ + timeout = 250; while (state & mask) { if (timeout == 0) { slot_printf(slot, "Controller never released " From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 18:03:42 2014 Return-Path: Delivered-To: svn-src-all@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 31DC7C7E; Sat, 15 Feb 2014 18:03:42 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DCD841BC8; Sat, 15 Feb 2014 18:03:41 +0000 (UTC) Received: from [192.168.1.108] (047-109-045-062.dynamic.caiway.nl [62.45.109.47]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id D79BB5C45; Sat, 15 Feb 2014 19:03:30 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_6FA9FA4F-CBC9-4595-8457-F3F0DDF37480"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: svn commit: r261916 - head/sys/dev/xen/console From: Dimitry Andric In-Reply-To: <20140216035823.I2978@besplex.bde.org> Date: Sat, 15 Feb 2014 19:03:24 +0100 Message-Id: <3D4CA3E5-3B69-4D46-953D-A2C8B051DDFB@FreeBSD.org> References: <201402151237.s1FCbRnh000507@svn.freebsd.org> <20140216035823.I2978@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1827) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 18:03:42 -0000 --Apple-Mail=_6FA9FA4F-CBC9-4595-8457-F3F0DDF37480 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 15 Feb 2014, at 18:02, Bruce Evans wrote: > On Sat, 15 Feb 2014, Dimitry Andric wrote: ... > Why? There are hundreds if not thousands of static inline functions in > headers, and most of these functions are not always used, so there would > be [hundreds if not thousands] * [number of #includes] compiler warnings > if compilers warned about things like this. They could handle include > files specially, but shouldn't. Some compilers (e.g. clang 3.4) do warn about this. :-) If code is unused, it should be cleaned up, IMHO. But because I got several remarks in the past that deleting code might sometimes inconvenience developers, I prefer to just use #if 0 instead. For some contributed sources, or sources which have no maintainer or an unresponsive maintainer, I usually just disable the warning instead. But that won't clean up the dead code... -Dimitry --Apple-Mail=_6FA9FA4F-CBC9-4595-8457-F3F0DDF37480 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iEYEARECAAYFAlL/q/AACgkQsF6jCi4glqOIkgCgxDkTJ53YtGGvVZ27/hzA3bnd BQ0AoO7dIPwGIZ7MWAA/V9eZx9VEztTh =ujzm -----END PGP SIGNATURE----- --Apple-Mail=_6FA9FA4F-CBC9-4595-8457-F3F0DDF37480-- From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 18:36:31 2014 Return-Path: Delivered-To: svn-src-all@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 984672FE; Sat, 15 Feb 2014 18:36:31 +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 83ED41DAC; Sat, 15 Feb 2014 18:36:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1FIaVuK051176; Sat, 15 Feb 2014 18:36:31 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1FIaVpL051175; Sat, 15 Feb 2014 18:36:31 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201402151836.s1FIaVpL051175@svn.freebsd.org> From: "George V. Neville-Neil" Date: Sat, 15 Feb 2014 18:36:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261943 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 18:36:31 -0000 Author: gnn Date: Sat Feb 15 18:36:31 2014 New Revision: 261943 URL: http://svnweb.freebsd.org/changeset/base/261943 Log: Summary: Two quick edits to the implementation notes as they're no longer stored in netinet but in netpfil. Modified: head/sys/netpfil/ipfw/dummynet.txt Modified: head/sys/netpfil/ipfw/dummynet.txt ============================================================================== --- head/sys/netpfil/ipfw/dummynet.txt Sat Feb 15 18:07:31 2014 (r261942) +++ head/sys/netpfil/ipfw/dummynet.txt Sat Feb 15 18:36:31 2014 (r261943) @@ -202,10 +202,10 @@ Almost all objects in this implementatio Files ----- The dummynet code is split in several files. -All kernel code is in sys/netinet/ipfw except ip_dummynet.h +All kernel code is in sys/netpfil/ipfw except ip_dummynet.h All userland code is in sbin/ipfw. Files are -- sys/netinet/ip_dummynet.h defines the kernel-userland API +- sys/netpfil/ip_dummynet.h defines the kernel-userland API - ip_dn_private.h contains the kernel-specific APIs and data structures - dn_sched.h defines the scheduler API From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 18:59:22 2014 Return-Path: Delivered-To: svn-src-all@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 AAB65EEB; Sat, 15 Feb 2014 18:59:22 +0000 (UTC) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 765411029; Sat, 15 Feb 2014 18:59:22 +0000 (UTC) Received: from [192.168.0.7] (cpc28-cmbg15-2-0-cust64.5-4.cable.virginm.net [86.27.189.65]) (authenticated bits=0) by theravensnest.org (8.14.7/8.14.5) with ESMTP id s1FIxAEi070915 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 15 Feb 2014 18:59:12 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: svn commit: r261916 - head/sys/dev/xen/console From: David Chisnall In-Reply-To: <20140216035823.I2978@besplex.bde.org> Date: Sat, 15 Feb 2014 18:59:05 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <8C22DE47-60F2-47C0-938D-590324818872@FreeBSD.org> References: <201402151237.s1FCbRnh000507@svn.freebsd.org> <20140216035823.I2978@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1827) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Dimitry Andric X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 18:59:22 -0000 On 15 Feb 2014, at 17:02, Bruce Evans wrote: > Why? There are hundreds if not thousands of static inline functions = in > headers, and most of these functions are not always used, so there = would > be [hundreds if not thousands] * [number of #includes] compiler = warnings > if compilers warned about things like this. They could handle include > files specially, but shouldn't. They do, and absolutely should, handle include files separately. If you = have a static inline function in a header that is not used in a specific = compilation unit, then that is a little bit of extra work for the = compiler as it has to parse it without it being used, but it is not a = problem. It is a safe assumption that it is used by at least one = compilation unit and so is not dead code (and even if it isn't yet, it = is part of an API, and so removing it would be an error). In contrast, a static inline function in the main source file for a = compilation unit is definitely a bug. It is obviously dead code. It is = likely that it either should have been removed when all callers were = deleted, or should not have been static but accidentally was. =20 David From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 20:36:55 2014 Return-Path: Delivered-To: svn-src-all@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 808115D4; Sat, 15 Feb 2014 20:36:55 +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 69BE41765; Sat, 15 Feb 2014 20:36:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1FKat47099804; Sat, 15 Feb 2014 20:36:55 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1FKatA8099803; Sat, 15 Feb 2014 20:36:55 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402152036.s1FKatA8099803@svn.freebsd.org> From: Ian Lepore Date: Sat, 15 Feb 2014 20:36:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261944 - head/sys/dev/mmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 20:36:55 -0000 Author: ian Date: Sat Feb 15 20:36:54 2014 New Revision: 261944 URL: http://svnweb.freebsd.org/changeset/base/261944 Log: If no compatible cards were found after probing the bus, say so. Modified: head/sys/dev/mmc/mmc.c Modified: head/sys/dev/mmc/mmc.c ============================================================================== --- head/sys/dev/mmc/mmc.c Sat Feb 15 18:36:31 2014 (r261943) +++ head/sys/dev/mmc/mmc.c Sat Feb 15 20:36:54 2014 (r261944) @@ -1572,6 +1572,7 @@ mmc_go_discovery(struct mmc_softc *sc) if (bootverbose || mmc_debug) device_printf(sc->dev, "Current OCR: 0x%08x\n", mmcbr_get_ocr(dev)); if (mmcbr_get_ocr(dev) == 0) { + device_printf(sc->dev, "No compatible cards found on bus\n"); mmc_delete_cards(sc); mmc_power_down(sc); return; From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 20:45:54 2014 Return-Path: Delivered-To: svn-src-all@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 2395E75C; Sat, 15 Feb 2014 20:45: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 013D61804; Sat, 15 Feb 2014 20:45:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1FKjrgN003609; Sat, 15 Feb 2014 20:45:53 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1FKjr8v003607; Sat, 15 Feb 2014 20:45:53 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402152045.s1FKjr8v003607@svn.freebsd.org> From: Ian Lepore Date: Sat, 15 Feb 2014 20:45:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261945 - head/sys/dev/sdhci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 20:45:54 -0000 Author: ian Date: Sat Feb 15 20:45:53 2014 New Revision: 261945 URL: http://svnweb.freebsd.org/changeset/base/261945 Log: Add timeout logic to sdhci, separate from the timeouts done by the hardware. If the hardware is not in a good state (like maybe clocks aren't running because of a configuration glitch) its timeout clock may also not work correctly, and the next command sent will hang that thread forever. The thread in question is usually the one and only thread (at init time) or a bio queue worker thread whose lockup will eventually lead to the whole system locking up when it runs out of buffers. No sd card command should take longer than 250ms. This new code establishes a 1-second timeout to allow plenty of safety margin over that. Modified: head/sys/dev/sdhci/sdhci.c head/sys/dev/sdhci/sdhci.h Modified: head/sys/dev/sdhci/sdhci.c ============================================================================== --- head/sys/dev/sdhci/sdhci.c Sat Feb 15 20:36:54 2014 (r261944) +++ head/sys/dev/sdhci/sdhci.c Sat Feb 15 20:45:53 2014 (r261945) @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -609,6 +610,7 @@ sdhci_init_slot(device_t dev, struct sdh TASK_INIT(&slot->card_task, 0, sdhci_card_task, slot); callout_init(&slot->card_callout, 1); + callout_init_mtx(&slot->timeout_callout, &slot->mtx, 0); return (0); } @@ -623,6 +625,7 @@ sdhci_cleanup_slot(struct sdhci_slot *sl { device_t d; + callout_drain(&slot->timeout_callout); callout_drain(&slot->card_callout); taskqueue_drain(taskqueue_swi_giant, &slot->card_task); @@ -702,6 +705,32 @@ sdhci_generic_update_ios(device_t brdev, return (0); } +static void +sdhci_req_done(struct sdhci_slot *slot) +{ + struct mmc_request *req; + + if (slot->req != NULL && slot->curcmd != NULL) { + callout_stop(&slot->timeout_callout); + req = slot->req; + slot->req = NULL; + slot->curcmd = NULL; + req->done(req); + } +} + +static void +sdhci_timeout(void *arg) +{ + struct sdhci_slot *slot = arg; + + if (slot->curcmd != NULL) { + sdhci_reset(slot, SDHCI_RESET_ALL); + slot->curcmd->error = MMC_ERR_TIMEOUT; + sdhci_req_done(slot); + } +} + static void sdhci_set_transfer_mode(struct sdhci_slot *slot, struct mmc_data *data) @@ -727,7 +756,6 @@ sdhci_set_transfer_mode(struct sdhci_slo static void sdhci_start_command(struct sdhci_slot *slot, struct mmc_command *cmd) { - struct mmc_request *req = slot->req; int flags, timeout; uint32_t mask, state; @@ -740,9 +768,7 @@ sdhci_start_command(struct sdhci_slot *s if ((cmd->flags & MMC_RSP_136) && (cmd->flags & MMC_RSP_BUSY)) { slot_printf(slot, "Unsupported response type!\n"); cmd->error = MMC_ERR_FAILED; - slot->req = NULL; - slot->curcmd = NULL; - req->done(req); + sdhci_req_done(slot); return; } @@ -754,9 +780,7 @@ sdhci_start_command(struct sdhci_slot *s slot->power == 0 || slot->clock == 0) { cmd->error = MMC_ERR_FAILED; - slot->req = NULL; - slot->curcmd = NULL; - req->done(req); + sdhci_req_done(slot); return; } /* Always wait for free CMD bus. */ @@ -784,9 +808,7 @@ sdhci_start_command(struct sdhci_slot *s "inhibit bit(s).\n"); sdhci_dumpregs(slot); cmd->error = MMC_ERR_FAILED; - slot->req = NULL; - slot->curcmd = NULL; - req->done(req); + sdhci_req_done(slot); return; } timeout--; @@ -828,6 +850,8 @@ sdhci_start_command(struct sdhci_slot *s sdhci_set_transfer_mode(slot, cmd->data); /* Start command. */ WR2(slot, SDHCI_COMMAND_FLAGS, (cmd->opcode << 8) | (flags & 0xff)); + /* Start timeout callout; no command should take more than a second. */ + callout_reset(&slot->timeout_callout, hz, sdhci_timeout, slot); } static void @@ -1013,10 +1037,7 @@ sdhci_start(struct sdhci_slot *slot) sdhci_reset(slot, SDHCI_RESET_DATA); } - /* We must be done -- bad idea to do this while locked? */ - slot->req = NULL; - slot->curcmd = NULL; - req->done(req); + sdhci_req_done(slot); } int Modified: head/sys/dev/sdhci/sdhci.h ============================================================================== --- head/sys/dev/sdhci/sdhci.h Sat Feb 15 20:36:54 2014 (r261944) +++ head/sys/dev/sdhci/sdhci.h Sat Feb 15 20:45:53 2014 (r261945) @@ -241,6 +241,7 @@ struct sdhci_slot { bus_addr_t paddr; /* DMA buffer address */ struct task card_task; /* Card presence check task */ struct callout card_callout; /* Card insert delay callout */ + struct callout timeout_callout;/* Card command/data response timeout */ struct mmc_host host; /* Host parameters */ struct mmc_request *req; /* Current request */ struct mmc_command *curcmd; /* Current command of current request */ From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 21:21:59 2014 Return-Path: Delivered-To: svn-src-all@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 2C1FFD7D; Sat, 15 Feb 2014 21:21: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 0A3731A78; Sat, 15 Feb 2014 21:21:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1FLLwSh018769; Sat, 15 Feb 2014 21:21:58 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1FLLw3H018763; Sat, 15 Feb 2014 21:21:58 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402152121.s1FLLw3H018763@svn.freebsd.org> From: Ian Lepore Date: Sat, 15 Feb 2014 21:21:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261946 - in head/sys/arm/freescale: . imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 21:21:59 -0000 Author: ian Date: Sat Feb 15 21:21:57 2014 New Revision: 261946 URL: http://svnweb.freebsd.org/changeset/base/261946 Log: It turns out Freescale cleverly made the ocotp device compatible across several different families of SoCs, so move it to the freescale directory and prefix everything with fsl rather than imx6. Added: head/sys/arm/freescale/fsl_ocotp.c - copied, changed from r261943, head/sys/arm/freescale/imx/imx6_ocotp.c head/sys/arm/freescale/fsl_ocotpreg.h - copied, changed from r261943, head/sys/arm/freescale/imx/imx6_ocotpreg.h head/sys/arm/freescale/fsl_ocotpvar.h - copied, changed from r261943, head/sys/arm/freescale/imx/imx6_ocotpvar.h Deleted: head/sys/arm/freescale/imx/imx6_ocotp.c head/sys/arm/freescale/imx/imx6_ocotpreg.h head/sys/arm/freescale/imx/imx6_ocotpvar.h Modified: head/sys/arm/freescale/imx/files.imx6 Copied and modified: head/sys/arm/freescale/fsl_ocotp.c (from r261943, head/sys/arm/freescale/imx/imx6_ocotp.c) ============================================================================== --- head/sys/arm/freescale/imx/imx6_ocotp.c Sat Feb 15 18:36:31 2014 (r261943, copy source) +++ head/sys/arm/freescale/fsl_ocotp.c Sat Feb 15 21:21:57 2014 (r261946) @@ -43,9 +43,8 @@ __FBSDID("$FreeBSD$"); #include -#include -#include -#include +#include +#include struct ocotp_softc { device_t dev; @@ -112,7 +111,7 @@ ocotp_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (ofw_bus_is_compatible(dev, "fsl,imx6q-ocotp") == 0) + if (ofw_bus_is_compatible(dev, "fsl,fslq-ocotp") == 0) return (ENXIO); device_set_desc(dev, @@ -122,14 +121,14 @@ ocotp_probe(device_t dev) } uint32_t -imx6_ocotp_read_4(bus_size_t off) +fsl_ocotp_read_4(bus_size_t off) { if (ocotp_sc == NULL) - panic("imx6_ocotp_read_4: softc not set!"); + panic("fsl_ocotp_read_4: softc not set!"); - if (off > IMX6_OCOTP_LAST_REG) - panic("imx6_ocotp_read_4: offset out of range"); + if (off > FSL_OCOTP_LAST_REG) + panic("fsl_ocotp_read_4: offset out of range"); return (RD4(ocotp_sc, off)); } Copied and modified: head/sys/arm/freescale/fsl_ocotpreg.h (from r261943, head/sys/arm/freescale/imx/imx6_ocotpreg.h) ============================================================================== --- head/sys/arm/freescale/imx/imx6_ocotpreg.h Sat Feb 15 18:36:31 2014 (r261943, copy source) +++ head/sys/arm/freescale/fsl_ocotpreg.h Sat Feb 15 21:21:57 2014 (r261946) @@ -26,56 +26,56 @@ * $FreeBSD$ */ -#ifndef IMX6_OCOTPREG_H -#define IMX6_OCOTPREG_H +#ifndef FSL_OCOTPREG_H +#define FSL_OCOTPREG_H -#define IMX6_OCOTP_CTRL 0x000 -#define IMX6_OCOTP_CTRL_SET 0x004 -#define IMX6_OCOTP_CTRL_CLR 0x008 -#define IMX6_OCOTP_CTRL_TOG 0x00C -#define IMX6_OCOTP_TIMING 0x010 -#define IMX6_OCOTP_DATA 0x020 -#define IMX6_OCOTP_READ_CTRL 0x030 -#define IMX6_OCOTP_READ_FUSE_DATA 0x040 -#define IMX6_OCOTP_SW_STICKY 0x050 -#define IMX6_OCOTP_SCS 0x060 -#define IMX6_OCOTP_SCS_SET 0x064 -#define IMX6_OCOTP_SCS_CLR 0x068 -#define IMX6_OCOTP_SCS_TOG 0x06C -#define IMX6_OCOTP_VERSION 0x090 -#define IMX6_OCOTP_LOCK 0x400 -#define IMX6_OCOTP_CFG0 0x410 -#define IMX6_OCOTP_CFG1 0x420 -#define IMX6_OCOTP_CFG2 0x430 -#define IMX6_OCOTP_CFG3 0x440 -#define IMX6_OCOTP_CFG4 0x450 -#define IMX6_OCOTP_CFG5 0x460 -#define IMX6_OCOTP_CFG6 0x470 -#define IMX6_OCOTP_MEM0 0x480 -#define IMX6_OCOTP_MEM1 0x490 -#define IMX6_OCOTP_MEM2 0x4A0 -#define IMX6_OCOTP_MEM3 0x4B0 -#define IMX6_OCOTP_ANA0 0x4D0 -#define IMX6_OCOTP_ANA1 0x4E0 -#define IMX6_OCOTP_ANA2 0x4F0 -#define IMX6_OCOTP_SRK0 0x580 -#define IMX6_OCOTP_SRK1 0x590 -#define IMX6_OCOTP_SRK2 0x5A0 -#define IMX6_OCOTP_SRK3 0x5B0 -#define IMX6_OCOTP_SRK4 0x5C0 -#define IMX6_OCOTP_SRK5 0x5D0 -#define IMX6_OCOTP_SRK6 0x5E0 -#define IMX6_OCOTP_SRK7 0x5F0 -#define IMX6_OCOTP_HSJC_RESP0 0x600 -#define IMX6_OCOTP_HSJC_RESP1 0x610 -#define IMX6_OCOTP_MAC0 0x620 -#define IMX6_OCOTP_MAC1 0x630 -#define IMX6_OCOTP_GP1 0x660 -#define IMX6_OCOTP_GP2 0x670 -#define IMX6_OCOTP_MISC_CONF 0x6D0 -#define IMX6_OCOTP_FIELD_RETURN 0x6E0 -#define IMX6_OCOTP_SRK_REVOKE 0x6F0 +#define FSL_OCOTP_CTRL 0x000 +#define FSL_OCOTP_CTRL_SET 0x004 +#define FSL_OCOTP_CTRL_CLR 0x008 +#define FSL_OCOTP_CTRL_TOG 0x00C +#define FSL_OCOTP_TIMING 0x010 +#define FSL_OCOTP_DATA 0x020 +#define FSL_OCOTP_READ_CTRL 0x030 +#define FSL_OCOTP_READ_FUSE_DATA 0x040 +#define FSL_OCOTP_SW_STICKY 0x050 +#define FSL_OCOTP_SCS 0x060 +#define FSL_OCOTP_SCS_SET 0x064 +#define FSL_OCOTP_SCS_CLR 0x068 +#define FSL_OCOTP_SCS_TOG 0x06C +#define FSL_OCOTP_VERSION 0x090 +#define FSL_OCOTP_LOCK 0x400 +#define FSL_OCOTP_CFG0 0x410 +#define FSL_OCOTP_CFG1 0x420 +#define FSL_OCOTP_CFG2 0x430 +#define FSL_OCOTP_CFG3 0x440 +#define FSL_OCOTP_CFG4 0x450 +#define FSL_OCOTP_CFG5 0x460 +#define FSL_OCOTP_CFG6 0x470 +#define FSL_OCOTP_MEM0 0x480 +#define FSL_OCOTP_MEM1 0x490 +#define FSL_OCOTP_MEM2 0x4A0 +#define FSL_OCOTP_MEM3 0x4B0 +#define FSL_OCOTP_ANA0 0x4D0 +#define FSL_OCOTP_ANA1 0x4E0 +#define FSL_OCOTP_ANA2 0x4F0 +#define FSL_OCOTP_SRK0 0x580 +#define FSL_OCOTP_SRK1 0x590 +#define FSL_OCOTP_SRK2 0x5A0 +#define FSL_OCOTP_SRK3 0x5B0 +#define FSL_OCOTP_SRK4 0x5C0 +#define FSL_OCOTP_SRK5 0x5D0 +#define FSL_OCOTP_SRK6 0x5E0 +#define FSL_OCOTP_SRK7 0x5F0 +#define FSL_OCOTP_HSJC_RESP0 0x600 +#define FSL_OCOTP_HSJC_RESP1 0x610 +#define FSL_OCOTP_MAC0 0x620 +#define FSL_OCOTP_MAC1 0x630 +#define FSL_OCOTP_GP1 0x660 +#define FSL_OCOTP_GP2 0x670 +#define FSL_OCOTP_MISC_CONF 0x6D0 +#define FSL_OCOTP_FIELD_RETURN 0x6E0 +#define FSL_OCOTP_SRK_REVOKE 0x6F0 -#define IMX6_OCOTP_LAST_REG IMX6_OCOTP_SRK_REVOKE +#define FSL_OCOTP_LAST_REG FSL_OCOTP_SRK_REVOKE #endif Copied and modified: head/sys/arm/freescale/fsl_ocotpvar.h (from r261943, head/sys/arm/freescale/imx/imx6_ocotpvar.h) ============================================================================== --- head/sys/arm/freescale/imx/imx6_ocotpvar.h Sat Feb 15 18:36:31 2014 (r261943, copy source) +++ head/sys/arm/freescale/fsl_ocotpvar.h Sat Feb 15 21:21:57 2014 (r261946) @@ -26,9 +26,9 @@ * $FreeBSD$ */ -#ifndef IMX6_OCOTPVAR_H -#define IMX6_OCOTPVAR_H +#ifndef FSL_OCOTPVAR_H +#define FSL_OCOTPVAR_H -uint32_t imx6_ocotp_read_4(bus_size_t _offset); +uint32_t fsl_ocotp_read_4(bus_size_t _offset); #endif Modified: head/sys/arm/freescale/imx/files.imx6 ============================================================================== --- head/sys/arm/freescale/imx/files.imx6 Sat Feb 15 20:45:53 2014 (r261945) +++ head/sys/arm/freescale/imx/files.imx6 Sat Feb 15 21:21:57 2014 (r261946) @@ -17,13 +17,12 @@ kern/kern_clocksource.c standard arm/arm/gic.c standard arm/arm/pl310.c standard arm/arm/bus_space-v6.c standard +arm/freescale/fsl_ocotp.c standard arm/freescale/imx/common.c standard arm/freescale/imx/imx6_anatop.c standard arm/freescale/imx/imx6_ccm.c standard arm/freescale/imx/imx6_machdep.c standard arm/freescale/imx/imx6_pl310.c standard -arm/freescale/imx/imx6_ocotp.c standard -arm/freescale/imx/imx6_tempmon.c standard arm/freescale/imx/imx_machdep.c standard arm/freescale/imx/imx_gpt.c standard From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 21:59:01 2014 Return-Path: Delivered-To: svn-src-all@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 37DB8693; Sat, 15 Feb 2014 21:59:01 +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 232A91CAB; Sat, 15 Feb 2014 21:59:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1FLx1Kj031053; Sat, 15 Feb 2014 21:59:01 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1FLx0cR031052; Sat, 15 Feb 2014 21:59:00 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402152159.s1FLx0cR031052@svn.freebsd.org> From: Ian Lepore Date: Sat, 15 Feb 2014 21:59:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261947 - head/sys/arm/freescale X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 21:59:01 -0000 Author: ian Date: Sat Feb 15 21:59:00 2014 New Revision: 261947 URL: http://svnweb.freebsd.org/changeset/base/261947 Log: Sweep up a couple crumbs left over from the imx6->fsl renaming. Modified: head/sys/arm/freescale/fsl_ocotp.c Modified: head/sys/arm/freescale/fsl_ocotp.c ============================================================================== --- head/sys/arm/freescale/fsl_ocotp.c Sat Feb 15 21:21:57 2014 (r261946) +++ head/sys/arm/freescale/fsl_ocotp.c Sat Feb 15 21:59:00 2014 (r261947) @@ -56,6 +56,7 @@ static struct ocotp_softc *ocotp_sc; static inline uint32_t RD4(struct ocotp_softc *sc, bus_size_t off) { + return (bus_read_4(sc->mem_res, off)); } @@ -111,11 +112,11 @@ ocotp_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (ofw_bus_is_compatible(dev, "fsl,fslq-ocotp") == 0) + if (ofw_bus_is_compatible(dev, "fsl,imx6q-ocotp") == 0) return (ENXIO); device_set_desc(dev, - "Freescale i.MX6 On-Chip One-Time-Programmable Memory"); + "Freescale On-Chip One-Time-Programmable Memory"); return (BUS_PROBE_DEFAULT); } From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 22:15:25 2014 Return-Path: Delivered-To: svn-src-all@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 18042C7C; Sat, 15 Feb 2014 22:15: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 03D0E1DD5; Sat, 15 Feb 2014 22:15:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1FMFOvj039275; Sat, 15 Feb 2014 22:15:24 GMT (envelope-from marcus@svn.freebsd.org) Received: (from marcus@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1FMFOjo039274; Sat, 15 Feb 2014 22:15:24 GMT (envelope-from marcus@svn.freebsd.org) Message-Id: <201402152215.s1FMFOjo039274@svn.freebsd.org> From: Joe Marcus Clarke Date: Sat, 15 Feb 2014 22:15:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261948 - head/games/fortune/datfiles X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 22:15:25 -0000 Author: marcus (doc,ports committer) Date: Sat Feb 15 22:15:24 2014 New Revision: 261948 URL: http://svnweb.freebsd.org/changeset/base/261948 Log: Correct a typo in Malcolm MacDougall's name. Approved by: gabor Modified: head/games/fortune/datfiles/fortunes Modified: head/games/fortune/datfiles/fortunes ============================================================================== --- head/games/fortune/datfiles/fortunes Sat Feb 15 21:59:00 2014 (r261947) +++ head/games/fortune/datfiles/fortunes Sat Feb 15 22:15:24 2014 (r261948) @@ -41033,7 +41033,7 @@ Sex is an emotion in motion. % Sex is as honest a product benefit for fragrance [perfume] as taste is for diet Coke. - -- Malcolm DacDougall + -- Malcolm MacDougall % Sex is good, but not as good as fresh sweet corn. -- Garrison Keillor From owner-svn-src-all@FreeBSD.ORG Sat Feb 15 23:23:14 2014 Return-Path: Delivered-To: svn-src-all@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 53E5A984; Sat, 15 Feb 2014 23:23:14 +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 3DCD51341; Sat, 15 Feb 2014 23:23:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1FNNExZ069424; Sat, 15 Feb 2014 23:23:14 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1FNNEEm069423; Sat, 15 Feb 2014 23:23:14 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201402152323.s1FNNEEm069423@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 15 Feb 2014 23:23: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: r261952 - stable/9/usr.bin/kdump X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 23:23:14 -0000 Author: jilles Date: Sat Feb 15 23:23:13 2014 New Revision: 261952 URL: http://svnweb.freebsd.org/changeset/base/261952 Log: MFC r242482: kdump: Also decode fcntl commands containing underscores and digits. The commands F_SETLK_REMOTE, F_DUPFD_CLOEXEC and F_DUP2FD_CLOEXEC were not decoded. Modified: stable/9/usr.bin/kdump/mksubr Directory Properties: stable/9/usr.bin/kdump/ (props changed) Modified: stable/9/usr.bin/kdump/mksubr ============================================================================== --- stable/9/usr.bin/kdump/mksubr Sat Feb 15 22:53:45 2014 (r261951) +++ stable/9/usr.bin/kdump/mksubr Sat Feb 15 23:23:13 2014 (r261952) @@ -471,7 +471,7 @@ fcntlcmdname(int cmd, int arg, int decim { switch (cmd) { _EOF_ -egrep "^#[[:space:]]*define[[:space:]]+F_[A-Z]+[[:space:]]+[0-9]+[[:space:]]*" \ +egrep "^#[[:space:]]*define[[:space:]]+F_[A-Z0-9_]+[[:space:]]+[0-9]+[[:space:]]*" \ $include_dir/sys/fcntl.h | \ awk 'BEGIN { o=0 } { for (i = 1; i <= NF; i++) \ if ($i ~ /define/) \